@memori.ai/memori-webcomponent 6.8.2 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,7 +56,7 @@ var r,i,o,s,a,l,c,u,d,h,p,f,m,g,v,y,b,x,S,w,_,C,A;if(e(t.exports,"unstable_now",
56
56
  * This source code is licensed under the MIT license found in the
57
57
  * LICENSE file in the root directory of this source tree.
58
58
  */
59
- e.exports=function(t){var n={},r=o("kyWRD"),i=o("85Hg2"),s=o("kMsGZ");function a(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 l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,c=60103,u=60106,d=60107,h=60108,p=60114,f=60109,m=60110,g=60112,v=60113,y=60120,b=60115,x=60116,S=60121,w=60129,_=60130,C=60131;if("function"==typeof Symbol&&Symbol.for){var A=Symbol.for;c=A("react.element"),u=A("react.portal"),d=A("react.fragment"),h=A("react.strict_mode"),p=A("react.profiler"),f=A("react.provider"),m=A("react.context"),g=A("react.forward_ref"),v=A("react.suspense"),y=A("react.suspense_list"),b=A("react.memo"),x=A("react.lazy"),S=A("react.block"),A("react.scope"),w=A("react.debug_trace_mode"),_=A("react.offscreen"),C=A("react.legacy_hidden")}var E="function"==typeof Symbol&&Symbol.iterator;function T(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=E&&e[E]||e["@@iterator"])?e:null}function M(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case d:return"Fragment";case u:return"Portal";case p:return"Profiler";case h:return"StrictMode";case v:return"Suspense";case y:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case m:return(e.displayName||"Context")+".Consumer";case f:return(e._context.displayName||"Context")+".Provider";case g:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case b:return M(e.type);case S:return M(e._render);case x:t=e._payload,e=e._init;try{return M(e(t))}catch(e){}}return null}function I(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function R(e){if(I(e)!==e)throw Error(a(188))}function P(e){var t=e.alternate;if(!t){if(null===(t=I(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return R(i),e;if(o===r)return R(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}function k(e){if(!(e=P(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function O(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var N,L=t.getPublicInstance,D=t.getRootHostContext,B=t.getChildHostContext,z=t.prepareForCommit,F=t.resetAfterCommit,U=t.createInstance,j=t.appendInitialChild,H=t.finalizeInitialChildren,V=t.prepareUpdate,G=t.shouldSetTextContent,W=t.createTextInstance,q=t.scheduleTimeout,K=t.cancelTimeout,J=t.noTimeout,Q=t.isPrimaryRenderer,Y=t.supportsMutation,Z=t.supportsPersistence,X=t.supportsHydration,$=t.getInstanceFromNode,ee=t.makeOpaqueHydratingObject,te=t.makeClientId,ne=t.beforeActiveInstanceBlur,re=t.afterActiveInstanceBlur,ie=t.preparePortalMount,oe=t.supportsTestSelectors,se=t.findFiberRoot,ae=t.getBoundingRect,le=t.getTextContent,ce=t.isHiddenSubtree,ue=t.matchAccessibilityRole,de=t.setFocusIfFocusable,he=t.setupIntersectionObserver,pe=t.appendChild,fe=t.appendChildToContainer,me=t.commitTextUpdate,ge=t.commitMount,ve=t.commitUpdate,ye=t.insertBefore,be=t.insertInContainerBefore,xe=t.removeChild,Se=t.removeChildFromContainer,we=t.resetTextContent,_e=t.hideInstance,Ce=t.hideTextInstance,Ae=t.unhideInstance,Ee=t.unhideTextInstance,Te=t.clearContainer,Me=t.cloneInstance,Ie=t.createContainerChildSet,Re=t.appendChildToContainerChildSet,Pe=t.finalizeContainerChildren,ke=t.replaceContainerChildren,Oe=t.cloneHiddenInstance,Ne=t.cloneHiddenTextInstance,Le=t.canHydrateInstance,De=t.canHydrateTextInstance,Be=t.isSuspenseInstancePending,ze=t.isSuspenseInstanceFallback,Fe=t.getNextHydratableSibling,Ue=t.getFirstHydratableChild,je=t.hydrateInstance,He=t.hydrateTextInstance,Ve=t.getNextHydratableInstanceAfterSuspenseInstance,Ge=t.commitHydratedContainer,We=t.commitHydratedSuspenseInstance;function qe(e){if(void 0===N)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return"\n"+N+e}var Ke=!1;function Je(e,t){if(!e||Ke)return"";Ke=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a])return"\n"+i[s].replace(" at new "," at ")}while(1<=s&&0<=a);break}}}finally{Ke=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qe(e):""}var Qe=[],Ye=-1;function Ze(e){return{current:e}}function Xe(e){0>Ye||(e.current=Qe[Ye],Qe[Ye]=null,Ye--)}function $e(e,t){Ye++,Qe[Ye]=e.current,e.current=t}var et={},tt=Ze(et),nt=Ze(!1),rt=et;function it(e,t){var n=e.type.contextTypes;if(!n)return et;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ot(e){return null!=(e=e.childContextTypes)}function st(){Xe(nt),Xe(tt)}function at(e,t,n){if(tt.current!==et)throw Error(a(168));$e(tt,t),$e(nt,n)}function lt(e,t,n){var i=e.stateNode;if(e=t.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var o in i=i.getChildContext())if(!(o in e))throw Error(a(108,M(t)||"Unknown",o));return r({},n,i)}function ct(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||et,rt=tt.current,$e(tt,e),$e(nt,nt.current),!0}function ut(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=lt(e,t,rt),r.__reactInternalMemoizedMergedChildContext=e,Xe(nt),Xe(tt),$e(tt,e)):Xe(nt),$e(nt,n)}var dt=null,ht=null;(0,s.unstable_now)();var pt=0,ft=8;function mt(e){if(0!=(1&e))return ft=15,1;if(0!=(2&e))return ft=14,2;if(0!=(4&e))return ft=13,4;var t=24&e;return 0!==t?(ft=12,t):0!=(32&e)?(ft=11,32):0!==(t=192&e)?(ft=10,t):0!=(256&e)?(ft=9,256):0!==(t=3584&e)?(ft=8,t):0!=(4096&e)?(ft=7,4096):0!==(t=4186112&e)?(ft=6,t):0!==(t=62914560&e)?(ft=5,t):67108864&e?(ft=4,67108864):0!=(134217728&e)?(ft=3,134217728):0!==(t=805306368&e)?(ft=2,t):0!=(1073741824&e)?(ft=1,1073741824):(ft=8,e)}function gt(e,t){var n=e.pendingLanes;if(0===n)return ft=0;var r=0,i=0,o=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(0!==o)r=o,i=ft=15;else if(0!==(o=134217727&n)){var l=o&~s;0!==l?(r=mt(l),i=ft):0!==(a&=o)&&(r=mt(a),i=ft)}else 0!==(o=n&~s)?(r=mt(o),i=ft):0!==a&&(r=mt(a),i=ft);if(0===r)return 0;if(r=n&((0>(r=31-wt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&s)){if(mt(t),i<=ft)return t;ft=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-wt(t)),r|=e[n],t&=~i;return r}function vt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function yt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=bt(24&~t))?yt(10,t):e;case 10:return 0===(e=bt(192&~t))?yt(8,t):e;case 8:return 0===(e=bt(3584&~t))&&(0===(e=bt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=bt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function bt(e){return e&-e}function xt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function St(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-wt(t)]=n}var wt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(_t(e)/Ct|0)|0},_t=Math.log,Ct=Math.LN2;var At=s.unstable_runWithPriority,Et=s.unstable_scheduleCallback,Tt=s.unstable_cancelCallback,Mt=s.unstable_shouldYield,It=s.unstable_requestPaint,Rt=s.unstable_now,Pt=s.unstable_getCurrentPriorityLevel,kt=s.unstable_ImmediatePriority,Ot=s.unstable_UserBlockingPriority,Nt=s.unstable_NormalPriority,Lt=s.unstable_LowPriority,Dt=s.unstable_IdlePriority,Bt={},zt=void 0!==It?It:function(){},Ft=null,Ut=null,jt=!1,Ht=Rt(),Vt=1e4>Ht?Rt:function(){return Rt()-Ht};function Gt(){switch(Pt()){case kt:return 99;case Ot:return 98;case Nt:return 97;case Lt:return 96;case Dt:return 95;default:throw Error(a(332))}}function Wt(e){switch(e){case 99:return kt;case 98:return Ot;case 97:return Nt;case 96:return Lt;case 95:return Dt;default:throw Error(a(332))}}function qt(e,t){return e=Wt(e),At(e,t)}function Kt(e,t,n){return e=Wt(e),Et(e,t,n)}function Jt(){if(null!==Ut){var e=Ut;Ut=null,Tt(e)}Qt()}function Qt(){if(!jt&&null!==Ft){jt=!0;var e=0;try{var t=Ft;qt(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ft=null}catch(t){throw null!==Ft&&(Ft=Ft.slice(e+1)),Et(kt,Jt),t}finally{jt=!1}}}var Yt=l.ReactCurrentBatchConfig;var Zt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Xt=Object.prototype.hasOwnProperty;function $t(e,t){if(Zt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Xt.call(t,n[r])||!Zt(e[n[r]],t[n[r]]))return!1;return!0}function en(e){switch(e.tag){case 5:return qe(e.type);case 16:return qe("Lazy");case 13:return qe("Suspense");case 19:return qe("SuspenseList");case 0:case 2:case 15:return e=Je(e.type,!1);case 11:return e=Je(e.type.render,!1);case 22:return e=Je(e.type._render,!1);case 1:return e=Je(e.type,!0);default:return""}}function tn(e,t){if(e&&e.defaultProps){for(var n in t=r({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var nn=Ze(null),rn=null,on=null,sn=null;function an(){sn=on=rn=null}function ln(e,t){e=e.type._context,Q?($e(nn,e._currentValue),e._currentValue=t):($e(nn,e._currentValue2),e._currentValue2=t)}function cn(e){var t=nn.current;Xe(nn),e=e.type._context,Q?e._currentValue=t:e._currentValue2=t}function un(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function dn(e,t){rn=e,sn=on=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Hr=!0),e.firstContext=null)}function hn(e,t){if(sn!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(sn=e,t=1073741823),t={context:e,observedBits:t,next:null},null===on){if(null===rn)throw Error(a(308));on=t,rn.dependencies={lanes:0,firstContext:t,responders:null}}else on=on.next=t;return Q?e._currentValue:e._currentValue2}var pn=!1;function fn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function mn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vn(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function yn(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bn(e,t,n,i){var o=e.updateQueue;pn=!1;var s=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var c=l,u=c.next;c.next=null,null===a?s=u:a.next=u,a=c;var d=e.alternate;if(null!==d){var h=(d=d.updateQueue).lastBaseUpdate;h!==a&&(null===h?d.firstBaseUpdate=u:h.next=u,d.lastBaseUpdate=c)}}if(null!==s){for(h=o.baseState,a=0,d=u=c=null;;){l=s.lane;var p=s.eventTime;if((i&l)===l){null!==d&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,m=s;switch(l=t,p=n,m.tag){case 1:if("function"==typeof(f=m.payload)){h=f.call(p,h,l);break e}h=f;break e;case 3:f.flags=-4097&f.flags|64;case 0:if(null==(l="function"==typeof(f=m.payload)?f.call(p,h,l):f))break e;h=r({},h,l);break e;case 2:pn=!0}}null!==s.callback&&(e.flags|=32,null===(l=o.effects)?o.effects=[s]:l.push(s))}else p={eventTime:p,lane:l,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(u=d=p,c=h):d=d.next=p,a|=l;if(null===(s=s.next)){if(null===(l=o.shared.pending))break;s=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}null===d&&(c=h),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,ho|=a,e.lanes=a,e.memoizedState=h}}function xn(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Sn=(new i.Component).refs;function wn(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:r({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var _n={isMounted:function(e){return!!(e=e._reactInternals)&&I(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Bo(),i=zo(e),o=gn(r,i);o.payload=t,null!=n&&(o.callback=n),vn(e,o),Fo(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Bo(),i=zo(e),o=gn(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),vn(e,o),Fo(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Bo(),r=zo(e),i=gn(n,r);i.tag=2,null!=t&&(i.callback=t),vn(e,i),Fo(e,r,n)}};function Cn(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!$t(n,r)||!$t(i,o))}function An(e,t,n){var r=!1,i=et,o=t.contextType;return"object"==typeof o&&null!==o?o=hn(o):(i=ot(t)?rt:tt.current,o=(r=null!=(r=t.contextTypes))?it(e,i):et),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=_n,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function En(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_n.enqueueReplaceState(t,t.state,null)}function Tn(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Sn,fn(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=hn(o):(o=ot(t)?rt:tt.current,i.context=it(e,o)),bn(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(wn(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&_n.enqueueReplaceState(i,i.state,null),bn(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}var Mn=Array.isArray;function In(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===Sn&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Rn(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Pn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Cs(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ms(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=In(e,t,n),r.return=e,r):((r=As(n.type,n.key,n.props,null,e.mode,r)).ref=In(e,t,n),r.return=e,r)}function p(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Is(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Es(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ms(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case c:return(n=As(t.type,t.key,t.props,null,e.mode,n)).ref=In(e,null,t),n.return=e,n;case u:return(t=Is(t,e.mode,n)).return=e,t}if(Mn(t)||T(t))return(t=Es(t,e.mode,n,null)).return=e,t;Rn(e,t)}return null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case c:return n.key===i?n.type===d?f(e,t,n.props.children,r,i):h(e,t,n,r):null;case u:return n.key===i?p(e,t,n,r):null}if(Mn(n)||T(n))return null!==i?null:f(e,t,n,r,null);Rn(e,n)}return null}function v(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case c:return e=e.get(null===r.key?n:r.key)||null,r.type===d?f(t,e,r.props.children,i,r.key):h(t,e,r,i);case u:return p(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Mn(r)||T(r))return f(t,e=e.get(n)||null,r,i,null);Rn(t,r)}return null}function y(i,s,a,l){for(var c=null,u=null,d=s,h=s=0,p=null;null!==d&&h<a.length;h++){d.index>h?(p=d,d=null):p=d.sibling;var f=g(i,d,a[h],l);if(null===f){null===d&&(d=p);break}e&&d&&null===f.alternate&&t(i,d),s=o(f,s,h),null===u?c=f:u.sibling=f,u=f,d=p}if(h===a.length)return n(i,d),c;if(null===d){for(;h<a.length;h++)null!==(d=m(i,a[h],l))&&(s=o(d,s,h),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);h<a.length;h++)null!==(p=v(d,i,h,a[h],l))&&(e&&null!==p.alternate&&d.delete(null===p.key?h:p.key),s=o(p,s,h),null===u?c=p:u.sibling=p,u=p);return e&&d.forEach((function(e){return t(i,e)})),c}function b(i,s,l,c){var u=T(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,h=s,p=s=0,f=null,y=l.next();null!==h&&!y.done;p++,y=l.next()){h.index>p?(f=h,h=null):f=h.sibling;var b=g(i,h,y.value,c);if(null===b){null===h&&(h=f);break}e&&h&&null===b.alternate&&t(i,h),s=o(b,s,p),null===d?u=b:d.sibling=b,d=b,h=f}if(y.done)return n(i,h),u;if(null===h){for(;!y.done;p++,y=l.next())null!==(y=m(i,y.value,c))&&(s=o(y,s,p),null===d?u=y:d.sibling=y,d=y);return u}for(h=r(i,h);!y.done;p++,y=l.next())null!==(y=v(h,i,p,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?p:y.key),s=o(y,s,p),null===d?u=y:d.sibling=y,d=y);return e&&h.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var h="object"==typeof o&&null!==o&&o.type===d&&null===o.key;h&&(o=o.props.children);var p="object"==typeof o&&null!==o;if(p)switch(o.$$typeof){case c:e:{for(p=o.key,h=r;null!==h;){if(h.key===p){if(7===h.tag){if(o.type===d){n(e,h.sibling),(r=i(h,o.props.children)).return=e,e=r;break e}}else if(h.elementType===o.type){n(e,h.sibling),(r=i(h,o.props)).ref=In(e,h,o),r.return=e,e=r;break e}n(e,h);break}t(e,h),h=h.sibling}o.type===d?((r=Es(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=As(o.type,o.key,o.props,null,e.mode,l)).ref=In(e,r,o),l.return=e,e=l)}return s(e);case u:e:{for(h=o.key;null!==r;){if(r.key===h){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Is(o,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Ms(o,e.mode,l)).return=e,e=r),s(e);if(Mn(o))return y(e,r,o,l);if(T(o))return b(e,r,o,l);if(p&&Rn(e,o),void 0===o&&!h)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,M(e.type)||"Component"))}return n(e,r)}}var kn=Pn(!0),On=Pn(!1),Nn={},Ln=Ze(Nn),Dn=Ze(Nn),Bn=Ze(Nn);function zn(e){if(e===Nn)throw Error(a(174));return e}function Fn(e,t){$e(Bn,t),$e(Dn,e),$e(Ln,Nn),e=D(t),Xe(Ln),$e(Ln,e)}function Un(){Xe(Ln),Xe(Dn),Xe(Bn)}function jn(e){var t=zn(Bn.current),n=zn(Ln.current);n!==(t=B(n,e.type,t))&&($e(Dn,e),$e(Ln,t))}function Hn(e){Dn.current===e&&(Xe(Ln),Xe(Dn))}var Vn=Ze(0);function Gn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Be(n)||ze(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=null,qn=null,Kn=!1;function Jn(e,t){var n=ws(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Qn(e,t){switch(e.tag){case 5:return null!==(t=Le(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=De(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function Yn(e){if(Kn){var t=qn;if(t){var n=t;if(!Qn(e,t)){if(!(t=Fe(n))||!Qn(e,t))return e.flags=-1025&e.flags|2,Kn=!1,void(Wn=e);Jn(Wn,n)}Wn=e,qn=Ue(t)}else e.flags=-1025&e.flags|2,Kn=!1,Wn=e}}function Zn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Wn=e}function Xn(e){if(!X||e!==Wn)return!1;if(!Kn)return Zn(e),Kn=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!G(t,e.memoizedProps))for(t=qn;t;)Jn(e,t),t=Fe(t);if(Zn(e),13===e.tag){if(!X)throw Error(a(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));qn=Ve(e)}else qn=Wn?Fe(e.stateNode):null;return!0}function $n(){X&&(qn=Wn=null,Kn=!1)}var er=[];function tr(){for(var e=0;e<er.length;e++){var t=er[e];Q?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}er.length=0}var nr=l.ReactCurrentDispatcher,rr=l.ReactCurrentBatchConfig,ir=0,or=null,sr=null,ar=null,lr=!1,cr=!1;function ur(){throw Error(a(321))}function dr(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zt(e[n],t[n]))return!1;return!0}function hr(e,t,n,r,i,o){if(ir=o,or=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,nr.current=null===e||null===e.memoizedState?zr:Fr,e=n(r,i),cr){o=0;do{if(cr=!1,!(25>o))throw Error(a(301));o+=1,ar=sr=null,t.updateQueue=null,nr.current=Ur,e=n(r,i)}while(cr)}if(nr.current=Br,t=null!==sr&&null!==sr.next,ir=0,ar=sr=or=null,lr=!1,t)throw Error(a(300));return e}function pr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ar?or.memoizedState=ar=e:ar=ar.next=e,ar}function fr(){if(null===sr){var e=or.alternate;e=null!==e?e.memoizedState:null}else e=sr.next;var t=null===ar?or.memoizedState:ar.next;if(null!==t)ar=t,sr=e;else{if(null===e)throw Error(a(310));e={memoizedState:(sr=e).memoizedState,baseState:sr.baseState,baseQueue:sr.baseQueue,queue:sr.queue,next:null},null===ar?or.memoizedState=ar=e:ar=ar.next=e}return ar}function mr(e,t){return"function"==typeof t?t(e):t}function gr(e){var t=fr(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=sr,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,c=i;do{var u=c.lane;if((ir&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,o=r):l=l.next=d,or.lanes|=u,ho|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=s,Zt(r,t.memoizedState)||(Hr=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function vr(e){var t=fr(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Zt(o,t.memoizedState)||(Hr=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function yr(e,t,n){var r=t._getVersion;r=r(t._source);var i=Q?t._workInProgressVersionPrimary:t._workInProgressVersionSecondary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(ir&e)===e)&&(Q?t._workInProgressVersionPrimary=r:t._workInProgressVersionSecondary=r,er.push(t))),e)return n(t._source);throw er.push(t),Error(a(350))}function br(e,t,n,r){var i=ro;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),l=nr.current,c=l.useState((function(){return yr(i,t,n)})),u=c[1],d=c[0];c=ar;var h=e.memoizedState,p=h.refs,f=p.getSnapshot,m=h.source;h=h.subscribe;var g=or;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=u;var e=o(t._source);if(!Zt(s,e)){e=n(t._source),Zt(d,e)||(u(e),e=zo(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var l=31-wt(a),c=1<<l;r[l]|=e,a&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=zo(g);i.mutableReadLanes|=r&i.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),Zt(f,n)&&Zt(m,t)&&Zt(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:mr,lastRenderedState:d}).dispatch=u=Dr.bind(null,or,e),c.queue=e,c.baseQueue=null,d=yr(i,t,n),c.memoizedState=c.baseState=d),d}function xr(e,t,n){return br(fr(),e,t,n)}function Sr(e){var t=pr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:mr,lastRenderedState:e}).dispatch=Dr.bind(null,or,e),[t.memoizedState,e]}function wr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=or.updateQueue)?(t={lastEffect:null},or.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function _r(e){return e={current:e},pr().memoizedState=e}function Cr(){return fr().memoizedState}function Ar(e,t,n,r){var i=pr();or.flags|=e,i.memoizedState=wr(1|t,n,void 0,void 0===r?null:r)}function Er(e,t,n,r){var i=fr();r=void 0===r?null:r;var o=void 0;if(null!==sr){var s=sr.memoizedState;if(o=s.destroy,null!==r&&dr(r,s.deps))return void wr(t,n,o,r)}or.flags|=e,i.memoizedState=wr(1|t,n,o,r)}function Tr(e,t){return Ar(516,4,e,t)}function Mr(e,t){return Er(516,4,e,t)}function Ir(e,t){return Er(4,2,e,t)}function Rr(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Pr(e,t,n){return n=null!=n?n.concat([e]):null,Er(4,2,Rr.bind(null,t,e),n)}function kr(){}function Or(e,t){var n=fr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Nr(e,t){var n=fr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Lr(e,t){var n=Gt();qt(98>n?98:n,(function(){e(!0)})),qt(97<n?97:n,(function(){var n=rr.transition;rr.transition=1;try{e(!1),t()}finally{rr.transition=n}}))}function Dr(e,t,n){var r=Bo(),i=zo(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(null===s?o.next=o:(o.next=s.next,s.next=o),t.pending=o,s=e.alternate,e===or||null!==s&&s===or)cr=lr=!0;else{if(0===e.lanes&&(null===s||0===s.lanes)&&null!==(s=t.lastRenderedReducer))try{var a=t.lastRenderedState,l=s(a,n);if(o.eagerReducer=s,o.eagerState=l,Zt(l,a))return}catch(e){}Fo(e,i,r)}}var Br={readContext:hn,useCallback:ur,useContext:ur,useEffect:ur,useImperativeHandle:ur,useLayoutEffect:ur,useMemo:ur,useReducer:ur,useRef:ur,useState:ur,useDebugValue:ur,useDeferredValue:ur,useTransition:ur,useMutableSource:ur,useOpaqueIdentifier:ur,unstable_isNewReconciler:!1},zr={readContext:hn,useCallback:function(e,t){return pr().memoizedState=[e,void 0===t?null:t],e},useContext:hn,useEffect:Tr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ar(4,2,Rr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ar(4,2,e,t)},useMemo:function(e,t){var n=pr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pr();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Dr.bind(null,or,e),[r.memoizedState,e]},useRef:_r,useState:Sr,useDebugValue:kr,useDeferredValue:function(e){var t=Sr(e),n=t[0],r=t[1];return Tr((function(){var t=rr.transition;rr.transition=1;try{r(e)}finally{rr.transition=t}}),[e]),n},useTransition:function(){var e=Sr(!1),t=e[0];return _r(e=Lr.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=pr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},br(r,e,t,n)},useOpaqueIdentifier:function(){if(Kn){var e=!1,t=ee((function(){throw e||(e=!0,n(te())),Error(a(355))})),n=Sr(t)[1];return 0==(2&or.mode)&&(or.flags|=516,wr(5,(function(){n(te())}),void 0,null)),t}return Sr(t=te()),t},unstable_isNewReconciler:!1},Fr={readContext:hn,useCallback:Or,useContext:hn,useEffect:Mr,useImperativeHandle:Pr,useLayoutEffect:Ir,useMemo:Nr,useReducer:gr,useRef:Cr,useState:function(){return gr(mr)},useDebugValue:kr,useDeferredValue:function(e){var t=gr(mr),n=t[0],r=t[1];return Mr((function(){var t=rr.transition;rr.transition=1;try{r(e)}finally{rr.transition=t}}),[e]),n},useTransition:function(){var e=gr(mr)[0];return[Cr().current,e]},useMutableSource:xr,useOpaqueIdentifier:function(){return gr(mr)[0]},unstable_isNewReconciler:!1},Ur={readContext:hn,useCallback:Or,useContext:hn,useEffect:Mr,useImperativeHandle:Pr,useLayoutEffect:Ir,useMemo:Nr,useReducer:vr,useRef:Cr,useState:function(){return vr(mr)},useDebugValue:kr,useDeferredValue:function(e){var t=vr(mr),n=t[0],r=t[1];return Mr((function(){var t=rr.transition;rr.transition=1;try{r(e)}finally{rr.transition=t}}),[e]),n},useTransition:function(){var e=vr(mr)[0];return[Cr().current,e]},useMutableSource:xr,useOpaqueIdentifier:function(){return vr(mr)[0]},unstable_isNewReconciler:!1},jr=l.ReactCurrentOwner,Hr=!1;function Vr(e,t,n,r){t.child=null===e?On(t,null,n,r):kn(t,e.child,n,r)}function Gr(e,t,n,r,i){n=n.render;var o=t.ref;return dn(t,i),r=hr(e,t,n,r,o,i),null===e||Hr?(t.flags|=1,Vr(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,di(e,t,i))}function Wr(e,t,n,r,i,o){if(null===e){var s=n.type;return"function"!=typeof s||_s(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=As(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=s,qr(e,t,s,r,i,o))}return s=e.child,0==(i&o)&&(i=s.memoizedProps,(n=null!==(n=n.compare)?n:$t)(i,r)&&e.ref===t.ref)?di(e,t,o):(t.flags|=1,(e=Cs(s,r)).ref=t.ref,e.return=t,t.child=e)}function qr(e,t,n,r,i,o){if(null!==e&&$t(e.memoizedProps,r)&&e.ref===t.ref){if(Hr=!1,0==(o&i))return t.lanes=e.lanes,di(e,t,o);0!=(16384&e.flags)&&(Hr=!0)}return Qr(e,t,n,r,o)}function Kr(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},Ko(t,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Ko(t,e),null;t.memoizedState={baseLanes:0},Ko(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ko(t,r);return Vr(e,t,i,n),t.child}function Jr(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Qr(e,t,n,r,i){var o=ot(n)?rt:tt.current;return o=it(t,o),dn(t,i),n=hr(e,t,n,r,o,i),null===e||Hr?(t.flags|=1,Vr(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,di(e,t,i))}function Yr(e,t,n,r,i){if(ot(n)){var o=!0;ct(t)}else o=!1;if(dn(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),An(t,n,r),Tn(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"==typeof c&&null!==c?c=hn(c):c=it(t,c=ot(n)?rt:tt.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&En(t,s,r,c),pn=!1;var h=t.memoizedState;s.state=h,bn(t,r,s,i),l=t.memoizedState,a!==r||h!==l||nt.current||pn?("function"==typeof u&&(wn(t,n,u,r),l=t.memoizedState),(a=pn||Cn(t,n,a,r,h,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4)):("function"==typeof s.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4),r=!1)}else{s=t.stateNode,mn(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:tn(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=hn(l):l=it(t,l=ot(n)?rt:tt.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&En(t,s,r,l),pn=!1,h=t.memoizedState,s.state=h,bn(t,r,s,i);var f=t.memoizedState;a!==d||h!==f||nt.current||pn?("function"==typeof p&&(wn(t,n,p,r),f=t.memoizedState),(c=pn||Cn(t,n,c,r,h,f,l))?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Zr(e,t,n,r,o,i)}function Zr(e,t,n,r,i,o){Jr(e,t);var s=0!=(64&t.flags);if(!r&&!s)return i&&ut(t,n,!1),di(e,t,o);r=t.stateNode,jr.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=kn(t,e.child,null,o),t.child=kn(t,null,a,o)):Vr(e,t,a,o),t.memoizedState=r.state,i&&ut(t,n,!0),t.child}function Xr(e){var t=e.stateNode;t.pendingContext?at(0,t.pendingContext,t.pendingContext!==t.context):t.context&&at(0,t.context,!1),Fn(e,t.containerInfo)}var $r,ei,ti,ni,ri={dehydrated:null,retryLane:0};function ii(e,t,n){var r,i=t.pendingProps,o=Vn.current,s=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(s=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),$e(Vn,1&o),null===e?(void 0!==i.fallback&&Yn(t),e=i.children,o=i.fallback,s?(e=oi(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=ri,e):"number"==typeof i.unstable_expectedLoadTime?(e=oi(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=ri,t.lanes=33554432,e):((n=Ts({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,s?(i=ai(e,t,i.children,i.fallback,n),s=t.child,o=e.child.memoizedState,s.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},s.childLanes=e.childLanes&~n,t.memoizedState=ri,i):(n=si(e,t,i.children,n),t.memoizedState=null,n))}function oi(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Ts(t,i,0,null),n=Es(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function si(e,t,n,r){var i=e.child;return e=i.sibling,n=Cs(i,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ai(e,t,n,r,i){var o=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return 0==(2&o)&&t.child!==s?((n=t.child).childLanes=0,n.pendingProps=a,null!==(s=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=s,s.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Cs(s,a),null!==e?r=Cs(e,r):(r=Es(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function li(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),un(e.return,t)}function ci(e,t,n,r,i,o){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i,s.lastEffect=o)}function ui(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Vr(e,t,r.children,n),0!=(2&(r=Vn.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&li(e,n);else if(19===e.tag)li(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if($e(Vn,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Gn(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ci(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Gn(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ci(t,!0,n,null,o,t.lastEffect);break;case"together":ci(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function di(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),ho|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function hi(e){e.flags|=4}if(Y)$r=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)j(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ei=function(){},ti=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var o=t.stateNode,s=zn(Ln.current);n=V(o,n,e,r,i,s),(t.updateQueue=n)&&hi(t)}},ni=function(e,t,n,r){n!==r&&hi(t)};else if(Z){$r=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Oe(o,i.type,i.memoizedProps,i)),j(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Ne(o,i.memoizedProps,i)),j(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.flags)&&(o=null!==i.memoizedState)){var s=i.child;if(null!==s&&(null!==s.child&&(s.child.return=s,$r(e,s,!0,o)),null!==(o=s.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var pi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Oe(o,i.type,i.memoizedProps,i)),Re(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Ne(o,i.memoizedProps,i)),Re(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.flags)&&(o=null!==i.memoizedState)){var s=i.child;if(null!==s&&(null!==s.child&&(s.child.return=s,pi(e,s,!0,o)),null!==(o=s.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};ei=function(e){var t=e.stateNode;if(null!==e.firstEffect){var n=t.containerInfo,r=Ie(n);pi(r,e,!1,!1),t.pendingChildren=r,hi(e),Pe(n,r)}},ti=function(e,t,n,r,i){var o=e.stateNode,s=e.memoizedProps;if((e=null===t.firstEffect)&&s===r)t.stateNode=o;else{var a=t.stateNode,l=zn(Ln.current),c=null;s!==r&&(c=V(a,n,s,r,i,l)),e&&null===c?t.stateNode=o:(o=Me(o,c,n,s,r,t,e,a),H(o,n,r,i,l)&&hi(t),t.stateNode=o,e?hi(t):$r(o,t,!1,!1))}},ni=function(e,t,n,r){n!==r?(e=zn(Bn.current),n=zn(Ln.current),t.stateNode=W(r,e,n,t),hi(t)):t.stateNode=e.stateNode}}else ei=function(){},ti=function(){},ni=function(){};function fi(e,t){if(!Kn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mi(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return ot(t.type)&&st(),null;case 3:return Un(),Xe(nt),Xe(tt),tr(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Xn(t)?hi(t):r.hydrate||(t.flags|=256)),ei(t),null;case 5:Hn(t);var i=zn(Bn.current);if(n=t.type,null!==e&&null!=t.stateNode)ti(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=zn(Ln.current),Xn(t)){if(!X)throw Error(a(175));e=je(t.stateNode,t.type,t.memoizedProps,i,e,t),t.updateQueue=e,null!==e&&hi(t)}else{var o=U(n,r,i,e,t);$r(o,t,!1,!1),t.stateNode=o,H(o,n,r,i,e)&&hi(t)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)ni(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(e=zn(Bn.current),i=zn(Ln.current),Xn(t)){if(!X)throw Error(a(176));He(t.stateNode,t.memoizedProps,t)&&hi(t)}else t.stateNode=W(r,e,i,t)}return null;case 13:return Xe(Vn),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,i=!1,null===e?void 0!==t.memoizedProps.fallback&&Xn(t):i=null!==e.memoizedState,r&&!i&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Vn.current)?0===lo&&(lo=3):(0!==lo&&3!==lo||(lo=4),null===ro||0==(134217727&ho)&&0==(134217727&po)||Vo(ro,oo))),Z&&r&&(t.flags|=4),Y&&(r||i)&&(t.flags|=4),null);case 4:return Un(),ei(t),null===e&&ie(t.stateNode.containerInfo),null;case 10:return cn(t),null;case 19:if(Xe(Vn),null===(r=t.memoizedState))return null;if(i=0!=(64&t.flags),null===(o=r.rendering))if(i)fi(r,!1);else{if(0!==lo||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(o=Gn(e))){for(t.flags|=64,fi(r,!1),null!==(e=o.updateQueue)&&(t.updateQueue=e,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,e=n,r=t.child;null!==r;)n=e,(i=r).flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(o=i.alternate)?(i.childLanes=0,i.lanes=n,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,n=o.dependencies,i.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext}),r=r.sibling;return $e(Vn,1&Vn.current|2),t.child}e=e.sibling}null!==r.tail&&Vt()>vo&&(t.flags|=64,i=!0,fi(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Gn(o))){if(t.flags|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),fi(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!Kn)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Vt()-r.renderingStartTime>vo&&1073741824!==n&&(t.flags|=64,i=!0,fi(r,!1),t.lanes=33554432);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Vt(),e.sibling=null,t=Vn.current,$e(Vn,i?1&t|2:1&t),e):null;case 23:case 24:return Jo(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function gi(e){switch(e.tag){case 1:ot(e.type)&&st();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Un(),Xe(nt),Xe(tt),tr(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Hn(e),null;case 13:return Xe(Vn),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return Xe(Vn),null;case 4:return Un(),null;case 10:return cn(e),null;case 23:case 24:return Jo(),null;default:return null}}function vi(e,t){try{var n="",r=t;do{n+=en(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function yi(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var bi="function"==typeof WeakMap?WeakMap:Map;function xi(e,t,n){(n=gn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){So||(So=!0,wo=r),yi(0,t)},n}function Si(e,t,n){(n=gn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return yi(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===_o?_o=new Set([this]):_o.add(this),yi(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var wi="function"==typeof WeakSet?WeakSet:Set;function _i(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){ds(e,t)}else t.current=null}function Ci(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:tn(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(Y&&256&t.flags&&Te(t.stateNode.containerInfo))}throw Error(a(163))}function Ai(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function Ei(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(ls(n,e),as(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:tn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&xn(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=L(n.child.stateNode);break;case 1:e=n.child.stateNode}xn(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&ge(e,n.type,n.memoizedProps,n));case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(X&&null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&We(n)))))}throw Error(a(163))}function Ti(e,t){if(Y)for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?_e(r):Ae(n.stateNode,n.memoizedProps)}else if(6===n.tag)r=n.stateNode,t?Ce(r):Ee(r,n.memoizedProps);else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Mi(e,t){if(ht&&"function"==typeof ht.onCommitFiberUnmount)try{ht.onCommitFiberUnmount(dt,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))ls(t,n);else{r=t;try{i()}catch(e){ds(r,e)}}n=n.next}while(n!==e)}break;case 1:if(_i(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){ds(t,e)}break;case 5:_i(t);break;case 4:Y?Li(e,t):Z&&Z&&(t=t.stateNode.containerInfo,e=Ie(t),ke(t,e))}}function Ii(e,t){for(var n=t;;)if(Mi(e,n),null===n.child||Y&&4===n.tag){if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else n.child.return=n,n=n.child}function Ri(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Pi(e){return 5===e.tag||3===e.tag||4===e.tag}function ki(e){if(Y){e:{for(var t=e.return;null!==t;){if(Pi(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(we(t),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Pi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Oi(e,n,t):Ni(e,n,t)}}function Oi(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?be(n,e,t):fe(n,e);else if(4!==r&&null!==(e=e.child))for(Oi(e,t,n),e=e.sibling;null!==e;)Oi(e,t,n),e=e.sibling}function Ni(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?ye(n,e,t):pe(n,e);else if(4!==r&&null!==(e=e.child))for(Ni(e,t,n),e=e.sibling;null!==e;)Ni(e,t,n),e=e.sibling}function Li(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag)Ii(e,i),r?Se(n,i.stateNode):xe(n,i.stateNode);else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(Mi(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Di(e,t){if(Y){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ai(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&ve(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(a(162));return n=t.memoizedProps,void me(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(X&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,Ge(t.containerInfo))));case 13:return Bi(t),void zi(t);case 19:return void zi(t);case 23:case 24:return void Ti(t,null!==t.memoizedState)}throw Error(a(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ai(3,t);case 12:case 23:case 24:return;case 13:return Bi(t),void zi(t);case 19:return void zi(t);case 3:X&&((n=t.stateNode).hydrate&&(n.hydrate=!1,Ge(n.containerInfo)))}e:if(Z){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,ke(t.containerInfo,t.pendingChildren);break e}throw Error(a(163))}}function Bi(e){null!==e.memoizedState&&(go=Vt(),Y&&Ti(e.child,!0))}function zi(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new wi),t.forEach((function(t){var r=ps.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Fi(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ui=0,ji=1,Hi=2,Vi=3,Gi=4;if("function"==typeof Symbol&&Symbol.for){var Wi=Symbol.for;Ui=Wi("selector.component"),ji=Wi("selector.has_pseudo_class"),Hi=Wi("selector.role"),Vi=Wi("selector.test_id"),Gi=Wi("selector.text")}function qi(e){var t=$(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(a(364));return t}if(null===(e=se(e)))throw Error(a(362));return e.stateNode.current}function Ki(e,t){switch(t.$$typeof){case Ui:if(e.type===t.value)return!0;break;case ji:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],i=e[n++],o=t[i];if(5!==r.tag||!ce(r)){for(;null!=o&&Ki(r,o);)o=t[++i];if(i===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,i),r=r.sibling}}t=!1}return t;case Hi:if(5===e.tag&&ue(e.stateNode,t.value))return!0;break;case Gi:if((5===e.tag||6===e.tag)&&null!==(e=le(e))&&0<=e.indexOf(t.value))return!0;break;case Vi:if(5===e.tag&&("string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase()))return!0;break;default:throw Error(a(365,t))}return!1}function Ji(e){switch(e.$$typeof){case Ui:return"<"+(M(e.value)||"Unknown")+">";case ji:return":has("+(Ji(e)||"")+")";case Hi:return'[role="'+e.value+'"]';case Gi:return'"'+e.value+'"';case Vi:return'[data-testname="'+e.value+'"]';default:throw Error(a(365,e))}}function Qi(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var i=e[r++],o=e[r++],s=t[o];if(5!==i.tag||!ce(i)){for(;null!=s&&Ki(i,s);)s=t[++o];if(o===t.length)n.push(i);else for(i=i.child;null!==i;)e.push(i,o),i=i.sibling}}return n}function Yi(e,t){if(!oe)throw Error(a(363));e=Qi(e=qi(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)ce(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var Zi=null;var Xi=Math.ceil,$i=l.ReactCurrentDispatcher,eo=l.ReactCurrentOwner,to=l.IsSomeRendererActing,no=0,ro=null,io=null,oo=0,so=0,ao=Ze(0),lo=0,co=null,uo=0,ho=0,po=0,fo=0,mo=null,go=0,vo=1/0;function yo(){vo=Vt()+500}var bo,xo=null,So=!1,wo=null,_o=null,Co=!1,Ao=null,Eo=90,To=[],Mo=[],Io=null,Ro=0,Po=null,ko=-1,Oo=0,No=0,Lo=null,Do=!1;function Bo(){return 0!=(48&no)?Vt():-1!==ko?ko:ko=Vt()}function zo(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Gt()?1:2;if(0===Oo&&(Oo=uo),0!==Yt.transition){0!==No&&(No=null!==mo?mo.pendingLanes:0),e=Oo;var t=4186112&~No;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Gt(),0!=(4&no)&&98===e?e=yt(12,Oo):e=yt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),Oo),e}function Fo(e,t,n){if(50<Ro)throw Ro=0,Po=null,Error(a(185));if(null===(e=Uo(e,t)))return null;St(e,t,n),e===ro&&(po|=t,4===lo&&Vo(e,oo));var r=Gt();1===t?0!=(8&no)&&0==(48&no)?Go(e):(jo(e,n),0===no&&(yo(),Jt())):(0==(4&no)||98!==r&&99!==r||(null===Io?Io=new Set([e]):Io.add(e)),jo(e,n)),mo=e}function Uo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function jo(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-wt(s),c=1<<l,u=o[l];if(-1===u){if(0==(c&r)||0!=(c&i)){u=t,mt(c);var d=ft;o[l]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=gt(e,e===ro?oo:0),t=ft,0===r)null!==n&&(n!==Bt&&Tt(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Bt&&Tt(n)}15===t?(n=Go.bind(null,e),null===Ft?(Ft=[n],Ut=Et(kt,Qt)):Ft.push(n),n=Bt):14===t?n=Kt(99,Go.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Kt(n,Ho.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function Ho(e){if(ko=-1,No=Oo=0,0!=(48&no))throw Error(a(327));var t=e.callbackNode;if(ss()&&e.callbackNode!==t)return null;var n=gt(e,e===ro?oo:0);if(0===n)return null;var r=n,i=no;no|=16;var o=Zo();for(ro===e&&oo===r||(yo(),Qo(e,r));;)try{es();break}catch(t){Yo(e,t)}if(an(),$i.current=o,no=i,null!==io?r=0:(ro=null,oo=0,r=lo),0!=(uo&po))Qo(e,0);else if(0!==r){if(2===r&&(no|=64,e.hydrate&&(e.hydrate=!1,Te(e.containerInfo)),0!==(n=vt(e))&&(r=Xo(e,n))),1===r)throw t=co,Qo(e,0),Vo(e,n),jo(e,Vt()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:rs(e);break;case 3:if(Vo(e,n),(62914560&n)===n&&10<(r=go+500-Vt())){if(0!==gt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){Bo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=q(rs.bind(null,e),r);break}rs(e);break;case 4:if(Vo(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-wt(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Vt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Xi(n/1960))-n)){e.timeoutHandle=q(rs.bind(null,e),n);break}rs(e);break;default:throw Error(a(329))}}return jo(e,Vt()),e.callbackNode===t?Ho.bind(null,e):null}function Vo(e,t){for(t&=~fo,t&=~po,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),r=1<<n;e[n]=-1,t&=~r}}function Go(e){if(0!=(48&no))throw Error(a(327));if(ss(),e===ro&&0!=(e.expiredLanes&oo)){var t=oo,n=Xo(e,t);0!=(uo&po)&&(n=Xo(e,t=gt(e,t)))}else n=Xo(e,t=gt(e,0));if(0!==e.tag&&2===n&&(no|=64,e.hydrate&&(e.hydrate=!1,Te(e.containerInfo)),0!==(t=vt(e))&&(n=Xo(e,t))),1===n)throw n=co,Qo(e,0),Vo(e,t),jo(e,Vt()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,rs(e),jo(e,Vt()),null}function Wo(e,t){var n=no;no|=1;try{return e(t)}finally{0===(no=n)&&(yo(),Jt())}}function qo(e,t){var n=no;if(0!=(48&n))return e(t);no|=1;try{if(e)return qt(99,e.bind(null,t))}finally{no=n,Jt()}}function Ko(e,t){$e(ao,so),so|=t,uo|=t}function Jo(){so=ao.current,Xe(ao)}function Qo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==J&&(e.timeoutHandle=J,K(n)),null!==io)for(n=io.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&st();break;case 3:Un(),Xe(nt),Xe(tt),tr();break;case 5:Hn(r);break;case 4:Un();break;case 13:case 19:Xe(Vn);break;case 10:cn(r);break;case 23:case 24:Jo()}n=n.return}ro=e,io=Cs(e.current,null),oo=so=uo=t,lo=0,co=null,fo=po=ho=0}function Yo(e,t){for(;;){var n=io;try{if(an(),nr.current=Br,lr){for(var r=or.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}lr=!1}if(ir=0,ar=sr=or=null,cr=!1,eo.current=null,null===n||null===n.return){lo=1,co=t,io=null;break}e:{var o=e,s=n.return,a=n,l=t;if(t=oo,a.flags|=2048,a.firstEffect=a.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l;if(0==(2&a.mode)){var u=a.alternate;u?(a.updateQueue=u.updateQueue,a.memoizedState=u.memoizedState,a.lanes=u.lanes):(a.updateQueue=null,a.memoizedState=null)}var d=0!=(1&Vn.current),h=s;do{var p;if(p=13===h.tag){var f=h.memoizedState;if(null!==f)p=null!==f.dehydrated;else{var m=h.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(p){var g=h.updateQueue;if(null===g){var v=new Set;v.add(c),h.updateQueue=v}else g.add(c);if(0==(2&h.mode)){if(h.flags|=64,a.flags|=16384,a.flags&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=gn(-1,1);y.tag=2,vn(a,y)}a.lanes|=1;break e}l=void 0,a=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new bi,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(a)){l.add(a);var x=hs.bind(null,o,c,a);c.then(x,x)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);l=Error((M(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==lo&&(lo=2),l=vi(l,a),h=s;do{switch(h.tag){case 3:o=l,h.flags|=4096,t&=-t,h.lanes|=t,yn(h,xi(0,o,t));break e;case 1:o=l;var S=h.type,w=h.stateNode;if(0==(64&h.flags)&&("function"==typeof S.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===_o||!_o.has(w)))){h.flags|=4096,t&=-t,h.lanes|=t,yn(h,Si(h,o,t));break e}}h=h.return}while(null!==h)}ns(n)}catch(e){t=e,io===n&&null!==n&&(io=n=n.return);continue}break}}function Zo(){var e=$i.current;return $i.current=Br,null===e?Br:e}function Xo(e,t){var n=no;no|=16;var r=Zo();for(ro===e&&oo===t||Qo(e,t);;)try{$o();break}catch(t){Yo(e,t)}if(an(),no=n,$i.current=r,null!==io)throw Error(a(261));return ro=null,oo=0,lo}function $o(){for(;null!==io;)ts(io)}function es(){for(;null!==io&&!Mt();)ts(io)}function ts(e){var t=bo(e.alternate,e,so);e.memoizedProps=e.pendingProps,null===t?ns(e):io=t,eo.current=null}function ns(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=mi(n,t,so)))return void(io=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&so)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=gi(t)))return n.flags&=2047,void(io=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(io=t);io=t=e}while(null!==t);0===lo&&(lo=5)}function rs(e){var t=Gt();return qt(99,is.bind(null,e,t)),null}function is(e,t){do{ss()}while(null!==Ao);if(0!=(48&no))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-wt(o),u=1<<c;i[c]=0,s[c]=-1,l[c]=-1,o&=~u}if(null!==Io&&0==(24&r)&&Io.has(e)&&Io.delete(e),e===ro&&(io=ro=null,oo=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){i=no,no|=32,eo.current=null,Lo=z(e.containerInfo),Do=!1,xo=r;do{try{os()}catch(e){if(null===xo)throw Error(a(330));ds(xo,e),xo=xo.nextEffect}}while(null!==xo);Lo=null,xo=r;do{try{for(s=e;null!==xo;){var d=xo.flags;if(16&d&&Y&&we(xo.stateNode),128&d){var h=xo.alternate;if(null!==h){var p=h.ref;null!==p&&("function"==typeof p?p(null):p.current=null)}}switch(1038&d){case 2:ki(xo),xo.flags&=-3;break;case 6:ki(xo),xo.flags&=-3,Di(xo.alternate,xo);break;case 1024:xo.flags&=-1025;break;case 1028:xo.flags&=-1025,Di(xo.alternate,xo);break;case 4:Di(xo.alternate,xo);break;case 8:l=s,o=xo,Y?Li(l,o):Ii(l,o);var f=o.alternate;Ri(o),null!==f&&Ri(f)}xo=xo.nextEffect}}catch(e){if(null===xo)throw Error(a(330));ds(xo,e),xo=xo.nextEffect}}while(null!==xo);Do&&re(),F(e.containerInfo),e.current=n,xo=r;do{try{for(d=e;null!==xo;){var m=xo.flags;if(36&m&&Ei(d,xo.alternate,xo),128&m){h=void 0;var g=xo.ref;if(null!==g){var v=xo.stateNode;if(5===xo.tag)h=L(v);else h=v;"function"==typeof g?g(h):g.current=h}}xo=xo.nextEffect}}catch(e){if(null===xo)throw Error(a(330));ds(xo,e),xo=xo.nextEffect}}while(null!==xo);xo=null,zt(),no=i}else e.current=n;if(Co)Co=!1,Ao=e,Eo=t;else for(xo=r;null!==xo;)t=xo.nextEffect,xo.nextEffect=null,8&xo.flags&&((m=xo).sibling=null,m.stateNode=null),xo=t;if(0===(r=e.pendingLanes)&&(_o=null),1===r?e===Po?Ro++:(Ro=0,Po=e):Ro=0,n=n.stateNode,ht&&"function"==typeof ht.onCommitFiberRoot)try{ht.onCommitFiberRoot(dt,n,void 0,64==(64&n.current.flags))}catch(e){}if(jo(e,Vt()),So)throw So=!1,e=wo,wo=null,e;return 0!=(8&no)||Jt(),null}function os(){for(;null!==xo;){var e=xo.alternate;Do||null===Lo||(0!=(8&xo.flags)?O(xo,Lo)&&(Do=!0,ne()):13===xo.tag&&Fi(e,xo)&&O(xo,Lo)&&(Do=!0,ne()));var t=xo.flags;0!=(256&t)&&Ci(e,xo),0==(512&t)||Co||(Co=!0,Kt(97,(function(){return ss(),null}))),xo=xo.nextEffect}}function ss(){if(90!==Eo){var e=97<Eo?97:Eo;return Eo=90,qt(e,cs)}return!1}function as(e,t){To.push(t,e),Co||(Co=!0,Kt(97,(function(){return ss(),null})))}function ls(e,t){Mo.push(t,e),Co||(Co=!0,Kt(97,(function(){return ss(),null})))}function cs(){if(null===Ao)return!1;var e=Ao;if(Ao=null,0!=(48&no))throw Error(a(331));var t=no;no|=32;var n=Mo;Mo=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"==typeof s)try{s()}catch(e){if(null===o)throw Error(a(330));ds(o,e)}}for(n=To,To=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(e){if(null===o)throw Error(a(330));ds(o,e)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return no=t,Jt(),!0}function us(e,t,n){vn(e,t=xi(0,t=vi(n,t),1)),t=Bo(),null!==(e=Uo(e,1))&&(St(e,1,t),jo(e,t))}function ds(e,t){if(3===e.tag)us(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){us(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===_o||!_o.has(r))){var i=Si(n,e=vi(t,e),1);if(vn(n,i),i=Bo(),null!==(n=Uo(n,1)))St(n,1,i),jo(n,i);else if("function"==typeof r.componentDidCatch&&(null===_o||!_o.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function hs(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Bo(),e.pingedLanes|=e.suspendedLanes&n,ro===e&&(oo&n)===n&&(4===lo||3===lo&&(62914560&oo)===oo&&500>Vt()-go?Qo(e,0):fo|=n),jo(e,t)}function ps(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Gt()?1:2:(0===Oo&&(Oo=uo),0===(t=bt(62914560&~Oo))&&(t=4194304))),n=Bo(),null!==(e=Uo(e,t))&&(St(e,t,n),jo(e,n))}bo=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||nt.current)Hr=!0;else{if(0==(n&r)){switch(Hr=!1,t.tag){case 3:Xr(t),$n();break;case 5:jn(t);break;case 1:ot(t.type)&&ct(t);break;case 4:Fn(t,t.stateNode.containerInfo);break;case 10:ln(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?ii(e,t,n):($e(Vn,1&Vn.current),null!==(t=di(e,t,n))?t.sibling:null);$e(Vn,1&Vn.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return ui(e,t,n);t.flags|=64}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),$e(Vn,Vn.current),r)break;return null;case 23:case 24:return t.lanes=0,Kr(e,t,n)}return di(e,t,n)}Hr=0!=(16384&e.flags)}else Hr=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=it(t,tt.current),dn(t,n),i=hr(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ot(r)){var o=!0;ct(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,fn(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&wn(t,r,s,e),i.updater=_n,t.stateNode=i,i._reactInternals=t,Tn(t,r,e,n),t=Zr(null,t,r,!0,o,n)}else t.tag=0,Vr(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return _s(e)?1:0;if(null!=e){if((e=e.$$typeof)===g)return 11;if(e===b)return 14}return 2}(i),e=tn(i,e),o){case 0:t=Qr(null,t,i,e,n);break e;case 1:t=Yr(null,t,i,e,n);break e;case 11:t=Gr(null,t,i,e,n);break e;case 14:t=Wr(null,t,i,tn(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Qr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 1:return r=t.type,i=t.pendingProps,Yr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 3:if(Xr(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,mn(e,t),bn(t,r,null,n),(r=t.memoizedState.element)===i)$n(),t=di(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(X?(qn=Ue(t.stateNode.containerInfo),Wn=t,o=Kn=!0):o=!1),o){if(X&&null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)o=e[i],s=e[i+1],Q?o._workInProgressVersionPrimary=s:o._workInProgressVersionSecondary=s,er.push(o);for(n=On(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Vr(e,t,r,n),$n();t=t.child}return t;case 5:return jn(t),null===e&&Yn(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,G(r,i)?s=null:null!==o&&G(r,o)&&(t.flags|=16),Jr(e,t),Vr(e,t,s,n),t.child;case 6:return null===e&&Yn(t),null;case 13:return ii(e,t,n);case 4:return Fn(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=kn(t,null,r,n):Vr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Gr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 7:return Vr(e,t,t.pendingProps,n),t.child;case 8:case 12:return Vr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,ln(t,o=i.value),null!==s){var l=s.value;if(0===(o=Zt(l,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!nt.current){t=di(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&o)){1===l.tag&&((u=gn(-1,n&-n)).tag=2,vn(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),un(l.return,n),c.lanes|=n;break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}}Vr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,dn(t,n),r=r(i=hn(i,o.unstable_observedBits)),t.flags|=1,Vr(e,t,r,n),t.child;case 14:return o=tn(i=t.type,t.pendingProps),Wr(e,t,i,o=tn(i.type,o),r,n);case 15:return qr(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tn(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ot(r)?(e=!0,ct(t)):e=!1,dn(t,n),An(t,r,i),Tn(t,r,i,n),Zr(null,t,r,!0,e,n);case 19:return ui(e,t,n);case 23:case 24:return Kr(e,t,n)}throw Error(a(156,t.tag))};var fs={current:!1},ms=s.unstable_flushAllWithoutAsserting,gs="function"==typeof ms;function vs(){if(void 0!==ms)return ms();for(var e=!1;ss();)e=!0;return e}function ys(t){try{vs(),function(t){if(null===Zi)try{var n=("require"+Math.random()).slice(0,7);Zi=(e&&e[n]).call(e,"timers").setImmediate}catch(e){Zi=function(e){var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}Zi(t)}((function(){vs()?ys(t):t()}))}catch(e){t(e)}}var bs=0,xs=!1;function Ss(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ws(e,t,n,r){return new Ss(e,t,n,r)}function _s(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cs(e,t){var n=e.alternate;return null===n?((n=ws(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function As(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)_s(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case d:return Es(n.children,i,o,t);case w:s=8,i|=16;break;case h:s=8,i|=1;break;case p:return(e=ws(12,n,t,8|i)).elementType=p,e.type=p,e.lanes=o,e;case v:return(e=ws(13,n,t,i)).type=v,e.elementType=v,e.lanes=o,e;case y:return(e=ws(19,n,t,i)).elementType=y,e.lanes=o,e;case _:return Ts(n,i,o,t);case C:return(e=ws(24,n,t,i)).elementType=C,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case f:s=10;break e;case m:s=9;break e;case g:s=11;break e;case b:s=14;break e;case x:s=16,r=null;break e;case S:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=ws(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Es(e,t,n,r){return(e=ws(7,e,r,t)).lanes=n,e}function Ts(e,t,n,r){return(e=ws(23,e,r,t)).elementType=_,e.lanes=n,e}function Ms(e,t,n){return(e=ws(6,e,null,t)).lanes=n,e}function Is(e,t,n){return(t=ws(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=J,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=xt(0),this.expirationTimes=xt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xt(0),X&&(this.mutableSourceEagerHydrationData=null)}function Ps(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=k(t))?null:e.stateNode}function ks(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Os(e,t){ks(e,t),(e=e.alternate)&&ks(e,t)}function Ns(e){return null===(e=k(e))?null:e.stateNode}function Ls(){return null}return n.IsThisRendererActing=fs,n.act=function(e){function t(){bs--,to.current=n,fs.current=r}!1===xs&&(xs=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),bs++;var n=to.current,r=fs.current;to.current=!0,fs.current=!0;try{var i=Wo(e)}catch(e){throw t(),e}if(null!==i&&"object"==typeof i&&"function"==typeof i.then)return{then:function(e,r){i.then((function(){1<bs||!0===gs&&!0===n?(t(),e()):ys((function(n){t(),n?r(n):e()}))}),(function(e){t(),r(e)}))}};try{1!==bs||!1!==gs&&!1!==n||vs(),t()}catch(e){throw t(),e}return{then:function(e){e()}}},n.attemptContinuousHydration=function(e){13===e.tag&&(Fo(e,67108864,Bo()),Os(e,67108864))},n.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=Bo(),n=zo(e);Fo(e,n,t),Os(e,n)}},n.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.hydrate){var n=mt(t.pendingLanes);t.expiredLanes|=n&t.pendingLanes,jo(t,Vt()),0==(48&no)&&(yo(),Jt())}break;case 13:var r=Bo();qo((function(){return Fo(e,1,r)})),Os(e,4)}},n.attemptUserBlockingHydration=function(e){13===e.tag&&(Fo(e,4,Bo()),Os(e,4))},n.batchedEventUpdates=function(e,t){var n=no;no|=2;try{return e(t)}finally{0===(no=n)&&(yo(),Jt())}},n.batchedUpdates=Wo,n.createComponentSelector=function(e){return{$$typeof:Ui,value:e}},n.createContainer=function(e,t,n){return e=new Rs(e,t,n),t=ws(3,null,null,2===t?7:1===t?3:0),e.current=t,t.stateNode=e,fn(t),e},n.createHasPsuedoClassSelector=function(e){return{$$typeof:ji,value:e}},n.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:u,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},n.createRoleSelector=function(e){return{$$typeof:Hi,value:e}},n.createTestNameSelector=function(e){return{$$typeof:Vi,value:e}},n.createTextSelector=function(e){return{$$typeof:Gi,value:e}},n.deferredUpdates=function(e){return qt(97,e)},n.discreteUpdates=function(e,t,n,r,i){var o=no;no|=4;try{return qt(98,e.bind(null,t,n,r,i))}finally{0===(no=o)&&(yo(),Jt())}},n.findAllNodes=Yi,n.findBoundingRects=function(e,t){if(!oe)throw Error(a(363));t=Yi(e,t),e=[];for(var n=0;n<t.length;n++)e.push(ae(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,i=r+n.width,o=n.y,s=o+n.height,l=t-1;0<=l;l--)if(t!==l){var c=e[l],u=c.x,d=u+c.width,h=c.y,p=h+c.height;if(r>=u&&o>=h&&i<=d&&s<=p){e.splice(t,1);break}if(!(r!==u||n.width!==c.width||p<o||h>s)){h>o&&(c.height+=h-o,c.y=o),p<s&&(c.height=s-h),e.splice(t,1);break}if(!(o!==h||n.height!==c.height||d<r||u>i)){u>r&&(c.width+=u-r,c.x=r),d<i&&(c.width=i-u),e.splice(t,1);break}}return e},n.findHostInstance=Ps,n.findHostInstanceWithNoPortals=function(e){return null===(e=function(e){if(!(e=P(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}(e))?null:20===e.tag?e.stateNode.instance:e.stateNode},n.findHostInstanceWithWarning=function(e){return Ps(e)},n.flushControlled=function(e){var t=no;no|=1;try{qt(99,e)}finally{0===(no=t)&&(yo(),Jt())}},n.flushDiscreteUpdates=function(){0==(49&no)&&(function(){if(null!==Io){var e=Io;Io=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,jo(e,Vt())}))}Jt()}(),ss())},n.flushPassiveEffects=ss,n.flushSync=qo,n.focusWithin=function(e,t){if(!oe)throw Error(a(363));for(t=Qi(e=qi(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!ce(n)){if(5===n.tag&&de(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},n.getCurrentUpdateLanePriority=function(){return pt},n.getFindAllNodesFailureDescription=function(e,t){if(!oe)throw Error(a(363));var n=0,r=[];e=[qi(e),0];for(var i=0;i<e.length;){var o=e[i++],s=e[i++],l=t[s];if((5!==o.tag||!ce(o))&&(Ki(o,l)&&(r.push(Ji(l)),++s>n&&(n=s)),s<t.length))for(o=o.child;null!==o;)e.push(o,s),o=o.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Ji(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},n.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?L(e.child.stateNode):e.child.stateNode:null},n.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:Ns,findFiberByHostInstance:e.findFiberByHostInstance||Ls,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.isDisabled&&t.supportsFiber)try{dt=t.inject(e),ht=t}catch(e){}e=!0}return e},n.observeVisibleRects=function(e,t,n,r){if(!oe)throw Error(a(363));e=Yi(e,t);var i=he(e,n,r).disconnect;return{disconnect:function(){i()}}},n.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},n.runWithPriority=function(e,t){var n=pt;try{return pt=e,t()}finally{pt=n}},n.shouldSuspend=function(){return!1},n.unbatchedUpdates=function(e,t){var n=no;no&=-2,no|=8;try{return e(t)}finally{0===(no=n)&&(yo(),Jt())}},n.updateContainer=function(e,t,n,r){var i=t.current,o=Bo(),s=zo(i);e:if(n){t:{if(I(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(ot(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(ot(c)){n=lt(n,c,l);break e}}n=l}else n=et;return null===t.context?t.context=n:t.pendingContext=n,(t=gn(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),vn(i,t),Fo(i,s,o),s},n}})),o("juxiN").register(JSON.parse('{"adfgW":"index.js","cmazm":"abap.bc6c1a94.js","jPTA1":"abnf.a3fdbafa.js","jdWNC":"actionscript.59d9b9ea.js","2CBqg":"ada.7ae8a3a8.js","3wHhO":"agda.c22a72e2.js","kFVdl":"al.43edf93f.js","3V4RR":"antlr4.fab93bd9.js","ksX9L":"apacheconf.1ea6f6bc.js","3N81M":"apex.5f5d0b00.js","lBh32":"apl.f0e0255a.js","1cOI2":"applescript.f8873ad2.js","hwV5I":"aql.0596cd74.js","cxQUy":"arduino.8a10351d.js","h8XDs":"arff.b6eba224.js","1glOK":"asciidoc.3591554e.js","5YI5Q":"asm6502.eb3baf93.js","5aM2c":"asmatmel.93b67168.js","aKcNk":"aspnet.a154be94.js","bYGuI":"csharp.60bc2788.js","4ffJ6":"autohotkey.dc99c6b5.js","6o8gr":"autoit.7bd54007.js","d0QlI":"avisynth.506bbdad.js","1vpfH":"avro-idl.ab78e3d7.js","d78C2":"basic.09310972.js","1V5ou":"batch.5c48c918.js","h9qnw":"bbcode.4e0cb2f2.js","eluAn":"bicep.e394696d.js","jD2Yh":"birb.54766d79.js","3ligT":"bison.2c2552ab.js","cSnAi":"bnf.ec556d42.js","gmloY":"brainfuck.4e81eb1d.js","77rtQ":"brightscript.3c7cc723.js","hfFki":"bro.8db28f8a.js","8SYqo":"bsl.260fabfb.js","i4HkI":"cfscript.92c90b90.js","1rBYK":"chaiscript.76481f4b.js","gQYEz":"cil.622792d1.js","bq2uf":"clike.36346267.js","h7tza":"clojure.9da4900e.js","aK2oY":"cmake.234b57e3.js","3V5TZ":"cobol.2e8bd2ea.js","72v5N":"coffeescript.261b318a.js","lNJYg":"concurnas.9d189a8c.js","cHo4f":"coq.917e2a53.js","7GKmU":"crystal.d23925f3.js","a5f4n":"cshtml.92086949.js","2nOzn":"csp.9b5dd573.js","iZH8k":"css-extras.7f3088a6.js","3V9km":"css.fb6f00e3.js","7TCh4":"csv.06af3522.js","8MqYl":"cypher.6af6e534.js","6Oo3A":"d.303192e5.js","6ks0D":"dart.6fb62874.js","huqsT":"dataweave.e97ef31d.js","YtcLG":"dax.013d5e9a.js","1s9Hz":"dhall.d5ee83ba.js","b677V":"diff.9ef56ea8.js","ak2pO":"django.13b0bb49.js","8LDFZ":"dns-zone-file.189b08c5.js","1awLf":"docker.1da9769e.js","9dPYr":"dot.8dca92f3.js","e2ZjS":"ebnf.58c0fa63.js","9h8KW":"editorconfig.9c7b63a5.js","4SWgd":"eiffel.090bab86.js","6HmuU":"ejs.0ee535c3.js","2KAkF":"elixir.dc192ee6.js","jPV3v":"elm.c88782bd.js","agNrQ":"erb.55ec7cf0.js","9BmS2":"erlang.956455fa.js","fqf1c":"etlua.79f6dba5.js","cgMSr":"lua.88c0a077.js","92McF":"excel-formula.d0dd1424.js","juFxG":"factor.e311ca38.js","1dWPh":"false.a93fe44c.js","2k0b2":"firestore-security-rules.4ea155d7.js","dvL1Q":"flow.96e0f48a.js","5oumN":"fortran.0811bc79.js","fP8jO":"fsharp.0119d0fd.js","7L6sP":"ftl.c5671dbe.js","2ujce":"gap.b0574953.js","hzgIA":"gcode.29260c31.js","5MUDD":"gdscript.545f127b.js","ghckm":"gedcom.d53f8a81.js","ian9z":"gherkin.0c5a099f.js","dsuH3":"git.2d89a25c.js","dvV8S":"glsl.0bf837a6.js","6BDWE":"gml.04204c1b.js","btSYt":"gn.cbb4c3be.js","j94Lr":"go-module.2bebc9b8.js","207xG":"go.cc49e5b2.js","iQ4Nh":"graphql.3d658adb.js","9E9pJ":"groovy.3e5836cd.js","hLXUt":"haml.9a056759.js","5ob5h":"handlebars.8c13dfe6.js","1nDhS":"haskell.3c80aa72.js","kQehe":"haxe.40a1dc98.js","1sziu":"hcl.84488f47.js","28Tam":"hlsl.323b0c17.js","awNOU":"hoon.df16cb45.js","eeLMI":"hpkp.9c950797.js","gjEKw":"hsts.0440ab7b.js","3bCJ7":"http.96d5f1c1.js","id4YZ":"ichigojam.c0bd16f5.js","5TKHe":"icon.439feb9f.js","eijPh":"icu-message-format.e96f6551.js","lv8gR":"idris.d3811412.js","bW8K3":"iecst.3fdbbc52.js","b8EBv":"ignore.00726ce9.js","jOS96":"inform7.65978ef5.js","dn3Yf":"ini.1cbb0515.js","iUSU6":"io.e628fd7e.js","6wbwo":"j.b959d174.js","5qA0j":"java.0ffd8069.js","hdx4d":"javadoc.b99752ae.js","jRMSs":"javadoclike.8cc3d825.js","l2DRD":"javascript.fe729813.js","cpOeo":"javastacktrace.cc22fb4b.js","fSVrK":"jexl.2cce5cc0.js","03mi8":"jolie.d8f352cd.js","j6YjP":"jq.65b95777.js","6JQIv":"js-extras.7d041902.js","5nVrm":"js-templates.a3463d0b.js","9gPZY":"jsdoc.0c5cc4d3.js","8q0xA":"json5.b9de5531.js","fIx8j":"jsonp.eefdc553.js","a3ur7":"jsstacktrace.8d3a2b71.js","bKtxi":"julia.679e1c74.js","9vqI0":"keepalived.e694c167.js","lDUCl":"keyman.d1406200.js","gcEXq":"kotlin.fd040b34.js","cxxOt":"kumir.b2072cfc.js","b8NIc":"kusto.98546fcc.js","iXz7U":"latex.ecc17a0d.js","9nRbn":"latte.18295a4f.js","lWxq2":"less.a8a986ab.js","7dEcL":"lilypond.0423d709.js","ck7Ll":"scheme.4039466f.js","hI3m3":"liquid.533f073c.js","7qpQZ":"lisp.b075bd53.js","8Cm1D":"livescript.2b19fb05.js","9sT8D":"llvm.6b74465d.js","gQkTU":"log.b74346d6.js","86y52":"lolcode.0fbc730a.js","6bXdx":"magma.bbb66246.js","hDIxO":"makefile.bf1a7653.js","4wRUQ":"markdown.4a5510a8.js","66rgq":"markup.973a8c4c.js","iAx9A":"matlab.caaa1e9f.js","5SXMq":"maxscript.58a0bf4d.js","gnQ55":"mel.c5da9d2e.js","8G54S":"mermaid.ced53190.js","gfXsu":"mizar.4e6d6035.js","7nZsb":"mongodb.5c4e0cf9.js","hUs37":"monkey.9be800f3.js","fKqwA":"moonscript.fc782589.js","luHXo":"n1ql.7f05115f.js","j0sqX":"n4js.318f41b7.js","avS2d":"nand2tetris-hdl.be3bb656.js","8fNUI":"naniscript.ec3afc9a.js","6PKtR":"nasm.1ee2623a.js","2LUGi":"neon.1d5a4ec8.js","esMLb":"nevod.6908715c.js","jQ8dR":"nginx.404fbeb4.js","1kuW2":"nim.36bf497b.js","7YxPR":"nix.3af3b6b2.js","b1EPY":"nsis.94e1fb71.js","j169M":"objectivec.49a6b342.js","1b4qw":"ocaml.c5fca1eb.js","c0JxA":"opencl.4194613a.js","54ivl":"openqasm.4b589cb3.js","kYO5l":"oz.498e9cbd.js","811Qi":"parigp.ed6a3789.js","gXO52":"parser.3329b2ab.js","4SQCy":"pascal.82aebbcf.js","9KuwN":"pascaligo.4bbd3a85.js","eM7TR":"pcaxis.e636466e.js","6w6GH":"peoplecode.32e124c6.js","eQPpI":"perl.7d72d7fd.js","b83gb":"php-extras.9606406b.js","l8BPM":"phpdoc.617f8af6.js","2cVRv":"plsql.482f8da9.js","gOyA3":"powerquery.486ee359.js","1BYb4":"powershell.856a4dd0.js","lIwm5":"processing.2c7d4403.js","cHCln":"prolog.812b5c86.js","d460J":"promql.8e6b9da4.js","lAnQP":"properties.40afd4d0.js","dG8OA":"protobuf.84963e3e.js","eRbDh":"psl.9c32166c.js","27W0o":"pug.54462c11.js","75Y4h":"puppet.2646aef5.js","kgGGG":"pure.a10bd6b4.js","hFuIq":"purebasic.629b75cd.js","db2yj":"purescript.216751ba.js","8ZppB":"q.b46a94a4.js","iFM89":"qml.bd71f711.js","7FNJV":"qore.d7e006f8.js","6AsUF":"qsharp.7bab07d1.js","7Xrsp":"r.3036c5c0.js","dh9BI":"racket.b867dd29.js","8pRTf":"reason.405183ad.js","kUbHD":"regex.aa4684b4.js","bNx4l":"rego.61da6b5d.js","jbksA":"renpy.ff0ce389.js","gP26j":"rest.91bee177.js","6FCYh":"rip.33f479a4.js","lEjxk":"roboconf.0ba2e9bf.js","c8BOJ":"robotframework.72ccad61.js","elAoE":"rust.9a35cb62.js","eDL1o":"sas.b3b3be64.js","gIQMB":"sass.165275f3.js","i7Y8T":"scala.a51a6234.js","OzRer":"shell-session.c47a7880.js","hZA2W":"smali.46e3f703.js","gT51y":"smalltalk.fb31e155.js","2OoIP":"smarty.abd6973e.js","33hrk":"sml.6d8c2545.js","3uuqi":"solidity.80562c5b.js","kHJvD":"solution-file.30e00f5f.js","6iiDq":"soy.46a7ec1f.js","2TkEp":"sparql.dbb56be0.js","eirDq":"turtle.b8836781.js","jmDes":"splunk-spl.149146f6.js","81dr7":"sqf.ea070acb.js","i4XqC":"squirrel.1efaf6f3.js","1zw3p":"stan.6efb4565.js","kfIG2":"stylus.d4d41ca4.js","dksml":"swift.ea86fdd0.js","4w3mZ":"systemd.df819c28.js","6b6p1":"t4-cs.b3eaa646.js","budu0":"t4-templating.db399052.js","7RUUk":"t4-vb.082c208c.js","2cwdT":"vbnet.ac572fcc.js","fBA7X":"tap.82e5520b.js","gqbYu":"yaml.3d0bf472.js","lCVk7":"tcl.fffb53bb.js","aKXaK":"textile.20ae1d45.js","ks7hU":"toml.69754057.js","kCJbl":"tremor.262b95d4.js","iZ71n":"tt2.f07906cb.js","5mLLA":"twig.a95c4964.js","i9AIa":"typoscript.3dbd38d9.js","iHNMy":"unrealscript.e5c3fc1d.js","bKWLJ":"uorazor.cf3ed6dc.js","2XcAn":"uri.59c4e10c.js","enDcg":"v.fe8e0874.js","db4Ta":"vala.386e6270.js","cmaSk":"velocity.9a0ffb21.js","29RKO":"verilog.4308f028.js","4aBVG":"vhdl.ca8ee4c0.js","6Jrfy":"vim.897929a5.js","kNyzl":"visual-basic.bc36aaac.js","4LJ5s":"warpscript.6d00b50f.js","6Ocza":"wasm.029f651e.js","hvPGO":"web-idl.97fc763d.js","lS90V":"wiki.1179d7f8.js","9LY8Y":"wolfram.7017e6a0.js","bFBdJ":"wren.d4121438.js","iskNq":"xeora.cce693be.js","ek7X7":"xml-doc.025d4193.js","hwA94":"xojo.843f212e.js","f8rnQ":"xquery.50701bd4.js","3Q9qv":"yang.2c70775f.js","a0Oht":"zig.e33efe11.js","dnGOp":"core.ade097c7.js"}'));var s;s=o("9Hk4c");var a={};!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),a=o("bU6y3");var l,c=o("85Hg2");l=o("bG9xl")();const u=e=>e?new URL(e.startsWith("http")?e:`https://${e}`).origin:"https://backend.memori.ai";var d=o("dCyaf");const h=(e,n)=>t(d)(`${n.apiUrl}${e}`,{...n,body:(null==n?void 0:n.body)?JSON.stringify(n.body):void 0,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",...null==n?void 0:n.headers}}).then((e=>(null==n?void 0:n.text)?e.text():e.json()));var p=e=>({getTenantPublicMemoriList:t=>h(`/TenantPublicMemori/${encodeURIComponent(t)}`,{apiUrl:e}),getTenantMetaverseMemoriList:t=>h(`/TenantMetaverseMemori/${encodeURIComponent(t)}`,{apiUrl:e}),getPublicMemoriList:t=>h(`/PublicMemori/${t}`,{apiUrl:e}),getAllMemori:t=>h(`/AllMemori/${t}`,{apiUrl:e}),getUserByIDMemoriList:(t,n,r)=>h(`/UserMemoriByID/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e}),getUserMemoriList:(t,n,r)=>h(`/UserMemori/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e}),getMemoriList:t=>h(`/Memori/${t}`,{apiUrl:e}),getSharedMemoriList:t=>h(`/SharedMemori/${t}`,{apiUrl:e}),getTenantCategories:t=>h(`/TenantMemoriCategories/${encodeURIComponent(t)}`,{apiUrl:e}),getMemoriConfigs:t=>h(`/MemoriConfigs/${t}`,{apiUrl:e}),createMemori:(t,n)=>h(`/Memori/${t}`,{apiUrl:e,body:n,method:"POST"}),updateMemori:(t,n)=>h(`/Memori/${t}/${n.memoriID}`,{apiUrl:e,body:n,method:"PATCH"}),deleteMemori:(t,n)=>h(`/Memori/${t}`,{apiUrl:e,body:n,method:"DELETE"}),getMemoriById:(t,n)=>h(`/Memori/${t}/${n}`,{apiUrl:e}),getMemoriByUserAndId:(t,n,r,i)=>h(`/MemoriById/${t}/${n}/${r}${i?`/${i}`:""}`,{apiUrl:e}),getMemori:(t,n,r,i)=>h(`/Memori/${encodeURIComponent(t)}/${encodeURIComponent(n)}/${encodeURIComponent(r)}/${null!=i?i:""}`,{apiUrl:e}),getMemoriSessions:(t,n,r,i)=>h(`/MemoriSessions/${t}/${n}${r?`/${r}`:""}${r&&i?`/${i}`:""}`,{apiUrl:e}),transferMemori:(t,n)=>h(`/TransferMemori/${t}`,{apiUrl:e,body:n,method:"POST"}),memoriContentUpdated:(t,n)=>h(`/MemoriContentUpdated/${t}/${n}`,{apiUrl:e,method:"POST"})}),f=e=>({userSignUp:t=>h("/User",{apiUrl:e,body:t,method:"POST"}),userConfirmSignUp:t=>h("/UserConfirm",{apiUrl:e,body:t,method:"POST"}),userLogin:t=>h("/Login",{apiUrl:e,body:t,method:"POST"}),userLogout:t=>h(`/Logout/${t}`,{apiUrl:e,method:"POST"}),getCurrentUser:t=>h(`/User/${t}`,{apiUrl:e}),getUser:(t,n)=>h(`/User/${t}/${n}`,{apiUrl:e}),getUsersList:t=>h(`/Users/${t}`,{apiUrl:e}),deleteUser:(t,n)=>h(`/User/${t}/${n}`,{apiUrl:e,method:"DELETE"}),updateUser:(t,n,r)=>h(`/User/${t}/${n}`,{apiUrl:e,method:"PATCH",body:r}),resetPassword:t=>h("/ResetPassword",{apiUrl:e,body:t,method:"POST"}),resetConfirm:t=>h("/ResetConfirm",{apiUrl:e,body:t,method:"POST"}),recoverUsername:t=>h("/RecoverUsername",{apiUrl:e,body:t,method:"POST"}),getTenantConfig:t=>h(`/Tenant/${t}`,{apiUrl:e}),resendVerificationCode:t=>h("/ResendVerificationCode",{apiUrl:e,body:t,method:"POST"}),createUser:(t,n)=>h(`/User/${t}`,{apiUrl:e,body:n,method:"POST"})}),m=e=>({getMemoriIntegrationsList:(t,n)=>h(`/Integrations/${t}/${n}`,{apiUrl:e}),getAllIntegrationsList:t=>h(`/AllIntegrations/${t}`,{apiUrl:e}),getIntegration:(t,n)=>h(`/Integration/${t}/${n}`,{apiUrl:e}),deleteIntegration:(t,n)=>h(`/Integration/${t}/${n}`,{apiUrl:e,method:"DELETE"}),createIntegration:(t,n)=>h(`/Integration/${t}`,{apiUrl:e,method:"POST",body:n}),updateIntegration:(t,n,r)=>h(`/Integration/${t}/${n}`,{apiUrl:e,method:"PATCH",body:r})}),g=e=>({getUploadAssetURL:(t,n,r)=>`${e}/Asset/${t}${n?`/${n}`:""}${r?`/${r}`:""}`,uploadAsset:async(t,n,r,i,o)=>{const s=new FormData,a=await fetch(n),l=await a.blob();s.append(t,l,t);const c=await fetch(`${e}/Asset/${r}${i?`/${i}`:""}${o?`/${o}`:""}`,{method:"POST",body:s});return await c.json()},getAsset:(t,n)=>h(`/Asset/${t}/${n}`,{apiUrl:e,method:"GET"}),updateAsset:(t,n,r)=>h(`/Asset/${t}/${n.split("/").reverse()[0]}`,{apiUrl:e,method:"PATCH",body:r}),deleteAsset:(t,n)=>h(`/Asset/${t}/${n.split("/").reverse()[0]}`,{apiUrl:e,method:"DELETE"})}),v=e=>({getSentInvitations:t=>h(`/SentInvitations/${t}`,{apiUrl:e}),getMemoriInvitations:(t,n)=>h(`/MemoriInvitations/${t}/${n}`,{apiUrl:e}),getReceivedInvitations:t=>h(`/ReceivedInvitations/${t}`,{apiUrl:e}),getAllInvitations:t=>h(`/AllInvitations/${t}`,{apiUrl:e}),getInvitation:(t,n)=>h(`/Invitation/${t}/${n}`,{apiUrl:e}),updateInvitation:(t,n)=>h(`/Invitation/${t}/${n.invitationID}`,{apiUrl:e,method:"PATCH",body:n}),deleteInvitation:(t,n)=>h(`/Invitation/${t}/${n}`,{apiUrl:e,method:"DELETE"}),acceptInvitation:(t,n)=>h(`/AcceptInvitation/${t}/${n}`,{apiUrl:e,method:"POST"}),rejectInvitation:(t,n)=>h(`/RejectInvitation/${t}/${n}`,{apiUrl:e,method:"POST"}),sendInvitation:(t,n)=>h(`/SendInvitation/${t}`,{apiUrl:e,method:"POST",body:n})}),y=e=>({getTenantConsumptionLogs:(t,n,r,i,o)=>h(`/TenantConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e}),getUserConsumptionLogs:(t,n,r,i,o)=>h(`/UserConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e}),getMemoriConsumptionLogs:(t,n,r,i,o)=>h(`/MemoriConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e})}),b=e=>({getTenantNotifications:t=>h(`/TenantNotifications/${t}`,{apiUrl:e}),getUserNotifications:t=>h(`/UserNotifications/${t}`,{apiUrl:e})}),x=e=>({importCSV:async(t,n,r,i)=>h(`/ImportExport/ImportCSV/${t}/${n}`,{apiUrl:e,method:"POST",body:{rows:r,...i}}),importTXT:async(t,n,r,i)=>h(`/ImportExport/ImportTXT/${t}/${n}`,{apiUrl:e,method:"POST",body:{rows:r,...i}}),exportCSV:async(t,n,r,i)=>h(`/ImportExport/ExportCSV/${t}/${n}`,{apiUrl:e,method:"POST",body:{csvSpecs:r,password:i},text:!0}),exportJSONL:async(t,n,r,i)=>h(`/ImportExport/ExportJSONL/${t}/${n}`,{apiUrl:e,method:"POST",body:{jsonlSpecs:r,password:i},text:!0})}),S=e=>({getProcesses:async(t,n)=>h(`/Processes/${t}${n?`/${n}`:""}`,{apiUrl:e,method:"GET"}),getMemoriProcesses:async(t,n,r)=>h(`/MemoriProcesses/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e,method:"GET"}),getProcessStatus:async(t,n)=>h(`/ProcessStatus/${t}/${n}`,{apiUrl:e,method:"GET"}),stopProcess:async(t,n)=>h(`/StopProcess/${t}/${n}`,{apiUrl:e,method:"POST"})}),w=e=>({analyzeUserQuery:async(t,n,r)=>h(`/Analysis/AnalyzeUserQuery/${t}/${n}`,{apiUrl:e,method:"POST",body:{...r}}),getUserQueryMatches:async(t,n,r,i,o)=>h(`/Analysis/AnalyzeUserQuery/${t}/${n}/${r}/${i}${o?`/${o}`:""}`,{apiUrl:e,method:"GET"})});var _=e=>({asset:g(e),memori:p(e),user:f(e),integration:m(e),invitation:v(e),consumptionLogs:y(e),notifications:b(e),importExport:x(e),process:S(e),analysis:w(e),...g(e),...p(e),...f(e),...m(e),...v(e),...y(e),...b(e),...x(e),...S(e),...w(e)}),C=e=>({getCorrelationPairs:async(t,n,r)=>h(`/CorrelationPairs/${t}${n?`/${n}${r?`/${r}`:""}`:""}`,{method:"GET",apiUrl:e}),postCorrelationPair:async(t,n)=>h(`/CorrelationPair/${t}`,{method:"POST",apiUrl:e,body:n}),deleteCorrelationPair:async(t,n)=>h(`/CorrelationPair/${t}/${n}`,{method:"DELETE",apiUrl:e})}),A=e=>({postTextEnteredEvent:async({sessionId:t,text:n})=>h(`/TextEnteredEvent/${t}`,{method:"POST",apiUrl:e,body:{text:n}}),postPlaceChangedEvent:async({sessionId:t,placeName:n,latitude:r,longitude:i,uncertaintyKm:o})=>h(`/PlaceChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{placeName:n,latitude:r,longitude:i,uncertaintyKm:o}}),postDateChangedEvent:async(t,n)=>h(`/DateChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{date:n}}),postTagChangedEvent:async(t,n)=>h(`/TagChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{tag:n}}),postTimeoutEvent:async t=>h(`/TimeoutEvent/${t}`,{method:"POST",apiUrl:e}),postMediumSelectedEvent:async(t,n)=>h(`/MediumSelectedEvent/${t}`,{method:"POST",apiUrl:e,body:{medium:n}}),postDateSelectedEvent:async t=>h(`/DateSelectedEvent/${t}`,{method:"GET",apiUrl:e}),postPlaceSelectedEvent:async t=>h(`/PlaceSelectedEvent/${t}`,{method:"GET",apiUrl:e}),postTagSelectedEvent:async t=>h(`/TagSelectedEvent/${t}`,{method:"GET",apiUrl:e})}),E=e=>({getIntents:async t=>h(`/Intents/${t}`,{method:"GET",apiUrl:e}),getIntent:async(t,n)=>h(`/Intent/${t}/${n}`,{method:"GET",apiUrl:e}),patchIntent:async(t,n)=>h(`/Intent/${t}/${n.intentID}`,{method:"PATCH",apiUrl:e,body:n}),deleteIntent:async(t,n)=>h(`/Intent/${t}/${n}`,{method:"DELETE",apiUrl:e}),createIntent:async(t,n)=>h(`/Intent/${t}`,{method:"POST",apiUrl:e,body:n}),getIntentSlots:async t=>h(`/IntentSlots/${t}`,{method:"GET",apiUrl:e}),getIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n}`,{method:"GET",apiUrl:e}),patchIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n.intentSlotID}`,{method:"PATCH",apiUrl:e,body:n}),deleteIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n}`,{method:"DELETE",apiUrl:e}),createIntentSlot:async(t,n)=>h(`/IntentSlot/${t}`,{method:"POST",apiUrl:e,body:n})}),T=e=>({getLocalizationKeys:async t=>h(`/LocalizationKeys/${t}`,{method:"GET",apiUrl:e}),getLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}/${n}`,{method:"GET",apiUrl:e}),deleteLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}/${n}`,{method:"DELETE",apiUrl:e}),postLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}`,{method:"POST",apiUrl:e,body:n}),patchLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}`,{method:"PATCH",apiUrl:e,body:n})}),M=e=>({getMedia:async(t,n)=>h(`/Media/${t}/${n}`,{method:"GET",apiUrl:e}),deleteMedia:async(t,n)=>h(`/Media/${t}/${n}`,{method:"DELETE",apiUrl:e}),getMedium:async(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),patchMedium:async(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),deleteMedium:(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),postMedium:async(t,n)=>h(`/Medium/${t}/${n}`,{method:"GET",apiUrl:e})}),I=e=>({getMemories:async(t,n)=>h(`/Memories/${t}${n?`/${n}`:""}`,{method:"GET",apiUrl:e}),getMemoriesPaginated:async(t,n,r,i)=>h(`/Memories/${t}/${n}/${r}${i?`/${i}`:""}`,{method:"GET",apiUrl:e}),getMemory:async(t,n)=>h(`/Memory/${t}/${n}`,{method:"GET",apiUrl:e}),patchMemory:async(t,n)=>h(`/Memory/${t}/${n.memoryID}`,{method:"PATCH",apiUrl:e,body:n}),deleteMemory:async(t,n)=>h(`/Memory/${t}/${n}`,{method:"DELETE",apiUrl:e}),postMemory:async(t,n)=>h(`/Memory/${t}`,{method:"POST",apiUrl:e,body:n}),getMemoryAccess:async(t,n)=>h(`/MemoryAccess/${t}/${n}`,{method:"GET",apiUrl:e})}),R=e=>({getWordVector:async(t,n)=>h(`/WordVector/${t}/${n}`,{method:"GET",apiUrl:e}),getSimilarWords:async(t,n)=>h(`/SimilarWords/${t}/${n}`,{method:"GET",apiUrl:e}),guessLanguage:async(t,n)=>h(`/GuessLanguage/${t}`,{method:"POST",apiUrl:e,body:{text:n}}),computeSimilarity:async(t,n,r,i,o)=>h(`/ComputeSimilarity/${t}`,{method:"POST",apiUrl:e,body:{referenceText:n,referenceTextType:r,comparisonText:i,comparisonTextType:o}}),checkWords:async(t,n)=>h(`/CheckWords/${t}`,{method:"POST",apiUrl:e,body:{text:n}})}),P=e=>({getPeople:async t=>h(`/People/${t}`,{method:"GET",apiUrl:e}),getPerson:async(t,n)=>h(`/Person/${t}/${n}`,{method:"GET",apiUrl:e}),patchPerson:async(t,n)=>h(`/Person/${t}/${n.personID}`,{method:"PATCH",body:n,apiUrl:e}),deletePerson:async(t,n)=>h(`/Person/${t}/${n}`,{method:"DELETE",apiUrl:e}),postPerson:async(t,n)=>h(`/Person/${t}`,{method:"POST",body:n,apiUrl:e})}),k=e=>({searchMemory:async(t,n)=>h(`/Search/${t}`,{method:"POST",body:n,apiUrl:e}),getRandomMemory:async(t,n)=>h(`/Random/${t}`,{method:"POST",body:n,apiUrl:e}),getHints:async(t,n)=>h(`/Hints/${t}`,{method:"POST",body:n,apiUrl:e}),getMemoryTags:async t=>h(`/MemoryTags/${t}`,{method:"GET",apiUrl:e})}),O=e=>({initSession:async t=>h("/Session",{method:"POST",body:t,apiUrl:e}),getSession:async t=>h(`/Session/${t}`,{method:"GET",apiUrl:e}),deleteSession:async t=>h(`/Session/${t}`,{method:"DELETE",apiUrl:e})}),N=e=>({getStatistics:async t=>h(`/Statistics/${t}`,{method:"GET",apiUrl:e}),getContentQualityIndexes:async t=>h(`/ContentQualityIndexes/${t}`,{method:"GET",apiUrl:e}),getTextQualityIndexes:async t=>h(`/TextQualityIndexes/${t}`,{method:"GET",apiUrl:e}),getEventLogs:async(t,n,r)=>h(`/EventLogs/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getMemoryEventLogs:async(t,n,r,i)=>h(`/EventLogs/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e}),getIntentEventLogs:async(t,n,r,i)=>h(`/EventLogs/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e})}),D=e=>({getUnansweredQuestions:async t=>h(`/UnansweredQuestions/${t}`,{method:"GET",apiUrl:e}),getUnansweredQuestionsPaginated:async(t,n,r)=>h(`/UnansweredQuestions/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),postUnansweredQuestion:async(t,n)=>h(`/UnansweredQuestion/${t}`,{method:"POST",apiUrl:e,body:n}),deleteUnansweredQuestion:async(t,n)=>h(`/UnansweredQuestion/${t}/${n}`,{method:"DELETE",apiUrl:e})}),B=e=>({getContextVars:async t=>h(`/ContextVars/${t}`,{method:"GET",apiUrl:e}),getContextVarNames:async t=>h(`/ContextVarNames/${t}`,{method:"GET",apiUrl:e}),getContextVarValues:async(t,n)=>h(`/ContextVarValues/${t}/${n}`,{method:"GET",apiUrl:e})}),z=e=>({getCustomWords:async t=>h(`/CustomWords/${t}`,{method:"GET",apiUrl:e}),getCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n}`,{method:"GET",apiUrl:e}),deleteCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n}`,{method:"DELETE",apiUrl:e}),postCustomWord:async(t,n)=>h(`/CustomWord/${t}`,{method:"POST",apiUrl:e,body:n}),patchCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n.customWordID}`,{method:"PATCH",apiUrl:e,body:n})}),F=e=>({getChatLogs:async(t,n,r)=>h(`/ChatLogs/${t}${n?`/${n}`:""}${n&&r?`/${r}`:""}`,{method:"GET",apiUrl:e}),getSessionChatLogs:async(t,n)=>h(`/SessionChatLogs/${t}/${n}`,{method:"GET",apiUrl:e}),deleteChatLogs:async(t,n,r)=>h(`/ChatLogs/${t}${n?`/${n}`:""}${n&&r?`/${r}`:""}`,{method:"DELETE",apiUrl:e}),deleteChatLog:async(t,n)=>h(`/ChatLog/${t}/${n}`,{method:"DELETE",apiUrl:e})}),U=e=>({getExpertReferences:async t=>h(`/ExpertReferences/${t}`,{method:"GET",apiUrl:e}),getExpertReferencesPaginated:async(t,n,r)=>h(`/ExpertReferences/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n}`,{method:"GET",apiUrl:e}),updateExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n.expertID}`,{method:"PATCH",apiUrl:e,body:n}),createExpertReference:async(t,n)=>h(`/ExpertReference/${t}`,{method:"POST",apiUrl:e,body:n}),deleteExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n}`,{method:"DELETE",apiUrl:e})}),j=e=>({getKnownFacts:async t=>h(`/KnownFacts/${t}`,{method:"GET",apiUrl:e}),getKnownFactsPaginated:async(t,n,r)=>h(`/KnownFacts/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getKnownFact:async(t,n)=>h(`/KnownFact/${t}/${n}`,{method:"GET",apiUrl:e}),deleteKnownFact:async(t,n)=>h(`/KnownFact/${t}/${n}`,{method:"DELETE",apiUrl:e})}),H=e=>({getMemoriUsers:async t=>h(`/Users/${t}`,{method:"GET",apiUrl:e}),getMemoriUsersPaginated:async(t,n,r)=>h(`/Users/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getMemoriUser:async(t,n)=>h(`/User/${t}/${n}`,{method:"GET",apiUrl:e}),getMemoriUserTopics:async(t,n)=>h(`/UserTopics/${t}/${n}`,{method:"GET",apiUrl:e}),getMemoriUserTopicsPaginated:async(t,n,r,i)=>h(`/UserTopics/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e})}),V=e=>({getTopics:async t=>h(`/Topics/${t}`,{method:"GET",apiUrl:e}),getTopicsPaginated:async(t,n,r)=>h(`/Topics/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getTopic:async(t,n)=>h(`/Topic/${t}/${n}`,{method:"GET",apiUrl:e}),getTopicUsers:async(t,n)=>h(`/TopicUsers/${t}/${n}`,{method:"GET",apiUrl:e}),getTopicUsersPaginated:async(t,n,r,i)=>h(`/TopicUsers/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e})}),G=e=>({getAllFunctions:async t=>h(`/Functions/${t}`,{method:"GET",apiUrl:e}),getFunctionsPaginated:async(t,n,r)=>h(`/Functions/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getFunction:async(t,n)=>h(`/Function/${t}/${n}`,{method:"GET",apiUrl:e}),patchFunction:async(t,n)=>h(`/Function/${t}/${n.functionID}`,{method:"PATCH",apiUrl:e,body:n}),deleteFunction:async(t,n)=>h(`/Function/${t}/${n}`,{method:"DELETE",apiUrl:e}),createFunction:async(t,n)=>h(`/Function/${t}`,{method:"POST",apiUrl:e,body:n})}),W=e=>({correlationPairs:C(e),...C(e),dialog:A(e),...A(e),intents:E(e),...E(e),localizationKeys:T(e),...T(e),media:M(e),...M(e),memories:I(e),...I(e),nlp:R(e),...R(e),people:P(e),...P(e),search:k(e),...k(e),session:O(e),...O(e),stats:N(e),...N(e),unansweredQuestions:D(e),...D(e),contextVars:B(e),...B(e),customDictionary:z(e),...z(e),chatLogs:F(e),...F(e),expertReferences:U(e),...U(e),knownFacts:j(e),...j(e),user:H(e),...H(e),topics:V(e),...V(e),functions:G(e),...G(e)}),q={};e(q,"allowedMediaTypes",(()=>K)),e(q,"anonTag",(()=>J));const K=["image/jpeg","image/png","image/jpg","image/gif","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf","video/mp4","video/avi","audio/mpeg3","audio/wav","audio/mpeg","video/mpeg","model/gltf-binary"],J="👤";var Q=e=>({getResourceUrl:({type:t,resourceURI:n,sessionID:r,baseURL:i="https://aisuru.com"})=>{let o="cover"===t?`${i}/images/memoriCover.png`:`${i}/images/memoriAvatar.png`;return n&&0!==n.length?n.includes("memoriai/memory")?`${n}?memori-ai-session-id=${r}`:n.startsWith("https://")||n.startsWith("http://")?`${n}${r?`/${r}`:""}`:n.startsWith("cloud://")?`${e.replace(/v2/,"v1")}/CloudAsset/${n.replace("cloud://","")}`:n.startsWith("guid://")?`${e.replace(/v2/,"v1")}/GuidAsset/${n.replace("guid://","")}`:o:o}});var Y=e=>{const t=u(e),n=`${t}/memori/v2`,r=`${t}/api/v2`;return{backend:_(r),...W(n),constants:{...q,HOSTNAME:t,BACKEND_URL:r,ENGINE_URL:n},asset:Q(r)}},Z=(c=o("85Hg2"),o("hcaHr")),X={},$=o("k9HYU");(X=function(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}).__esModule=!0,X.default=X;c=o("85Hg2");var ee=o("ffgrs"),te=o("22y1y"),ne=(c=o("85Hg2"),/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g),re={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ie=function(e){return re[e]};var oe,se={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(ne,ie)}},ae=(0,c.createContext)();function le(){return se}var ce=function(){function e(){t(ee)(this,e),this.usedNamespaces={}}return t(te)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function ue(){return oe}function de(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var he={};function pe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&he[t[0]]||("string"==typeof t[0]&&(he[t[0]]=new Date),de.apply(void 0,t))}function fe(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function me(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e))))}function ge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return pe("i18n.languages were undefined or empty",t.languages),!0;var r=void 0!==t.options.ignoreJSONStructure;return r?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):me(e,t,n)}function ve(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?ye(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xe=function(e,t){var n=(0,c.useRef)();return(0,c.useEffect)((function(){n.current=t?n.current:e}),[e,t]),n.current};function Se(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.i18n,i=(0,c.useContext)(ae)||{},o=i.i18n,s=i.defaultNS,a=r||o||ue();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new ce),!a){pe("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},u=[l,{},!1];return u.t=l,u.i18n={},u.ready=!1,u}a.options.react&&void 0!==a.options.react.wait&&pe("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=be(be(be({},le()),a.options.react),n),h=d.useSuspense,p=d.keyPrefix,f=e||s||a.options&&a.options.defaultNS;f="string"==typeof f?[f]:f||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(f);var m=(a.isInitialized||a.initializedStoreOnce)&&f.every((function(e){return ge(e,a,d)}));function g(){return a.getFixedT(null,"fallback"===d.nsMode?f:f[0],p)}var v=(0,c.useState)(g),y=t(Z)(v,2),b=y[0],x=y[1],S=f.join(),w=xe(S),_=(0,c.useRef)(!0);(0,c.useEffect)((function(){var e=d.bindI18n,t=d.bindI18nStore;function n(){_.current&&x(g)}return _.current=!0,m||h||fe(a,f,(function(){_.current&&x(g)})),m&&w&&w!==S&&_.current&&x(g),e&&a&&a.on(e,n),t&&a&&a.store.on(t,n),function(){_.current=!1,e&&a&&e.split(" ").forEach((function(e){return a.off(e,n)})),t&&a&&t.split(" ").forEach((function(e){return a.store.off(e,n)}))}}),[a,S]);var C=(0,c.useRef)(!0);(0,c.useEffect)((function(){_.current&&!C.current&&x(g),C.current=!1}),[a,p]);var A=[b,a,m];if(A.t=b,A.i18n=a,A.ready=m,m)return A;if(!m&&!h)return A;throw new Promise((function(e){fe(a,f,(function(){e()}))}))}var we={};!function(e,t,n,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t),s=i(n),a=i(r),l=function(e,t,n){return{endTime:t,insertTime:n,type:"exponentialRampToValue",value:e}},c=function(e,t,n){return{endTime:t,insertTime:n,type:"linearRampToValue",value:e}},u=function(e,t){return{startTime:t,type:"setValue",value:e}},d=function(e,t,n){return{duration:n,startTime:t,type:"setValueCurve",values:e}},h=function(e,t,n){var r=n.startTime,i=n.target,o=n.timeConstant;return i+(t-i)*Math.exp((r-e)/o)},p=function(e){return"exponentialRampToValue"===e.type},f=function(e){return"linearRampToValue"===e.type},m=function(e){return p(e)||f(e)},g=function(e){return"setValue"===e.type},v=function(e){return"setValueCurve"===e.type},y=function e(t,n,r,i){var o=t[n];return void 0===o?i:m(o)||g(o)?o.value:v(o)?o.values[o.values.length-1]:h(r,e(t,n-1,o.startTime,i),o)},b=function(e,t,n,r,i){return void 0===n?[r.insertTime,i]:m(n)?[n.endTime,n.value]:g(n)?[n.startTime,n.value]:v(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,y(e,t-1,n.startTime,i)]},x=function(e){return"cancelAndHold"===e.type},S=function(e){return"cancelScheduledValues"===e.type},w=function(e){return x(e)||S(e)?e.cancelTime:p(e)||f(e)?e.endTime:e.startTime},_=function(e,t,n,r){var i=r.endTime,o=r.value;return n===o?o:0<n&&0<o||n<0&&o<0?n*Math.pow(o/n,(e-t)/(i-t)):0},C=function(e,t,n,r){return n+(e-t)/(r.endTime-t)*(r.value-n)},A=function(e,t){var n=Math.floor(t),r=Math.ceil(t);return n===r?e[n]:(1-(t-n))*e[n]+(1-(r-t))*e[r]},E=function(e,t){var n=t.duration,r=t.startTime,i=t.values,o=(e-r)/n*(i.length-1);return A(i,o)},T=function(e){return"setTarget"===e.type},M=function(e){function t(e){s.default(this,t),this._automationEvents=[],this._currenTime=0,this._defaultValue=e}return a.default(t,[{key:e,value:function(){return this._automationEvents[Symbol.iterator]()}},{key:"add",value:function(e){var t=w(e);if(x(e)||S(e)){var n=this._automationEvents.findIndex((function(n){return S(e)&&v(n)?n.startTime+n.duration>=t:w(n)>=t})),r=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),x(e)){var i=this._automationEvents[this._automationEvents.length-1];if(void 0!==r&&m(r)){if(T(i))throw new Error("The internal list is malformed.");var o=v(i)?i.startTime+i.duration:w(i),s=v(i)?i.values[i.values.length-1]:i.value,a=p(r)?_(t,o,s,r):C(t,o,s,r),h=p(r)?l(a,t,this._currenTime):c(a,t,this._currenTime);this._automationEvents.push(h)}void 0!==i&&T(i)&&this._automationEvents.push(u(this.getValue(t),t)),void 0!==i&&v(i)&&i.startTime+i.duration>t&&(this._automationEvents[this._automationEvents.length-1]=d(new Float32Array([6,7]),i.startTime,t-i.startTime))}}else{var g=this._automationEvents.findIndex((function(e){return w(e)>t})),y=-1===g?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[g-1];if(void 0!==y&&v(y)&&w(y)+y.duration>t)return!1;var b=p(e)?l(e.value,e.endTime,this._currenTime):f(e)?c(e.value,t,this._currenTime):e;if(-1===g)this._automationEvents.push(b);else{if(v(e)&&t+e.duration>w(this._automationEvents[g]))return!1;this._automationEvents.splice(g,0,b)}}return!0}},{key:"flush",value:function(e){var t=this._automationEvents.findIndex((function(t){return w(t)>e}));if(t>1){var n=this._automationEvents.slice(t-1),r=n[0];T(r)&&n.unshift(u(y(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:"getValue",value:function(e){if(0===this._automationEvents.length)return this._defaultValue;var t=this._automationEvents.findIndex((function(t){return w(t)>e})),n=this._automationEvents[t],r=(-1===t?this._automationEvents.length:t)-1,i=this._automationEvents[r];if(void 0!==i&&T(i)&&(void 0===n||!m(n)||n.insertTime>e))return h(e,y(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(void 0!==i&&g(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==i&&v(i)&&(void 0===n||!m(n)||i.startTime+i.duration>e))return e<i.startTime+i.duration?E(e,i):i.values[i.values.length-1];if(void 0!==i&&m(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==n&&p(n)){var s=b(this._automationEvents,r,i,n,this._defaultValue),a=o.default(s,2),l=a[0],c=a[1];return _(e,l,c,n)}if(void 0!==n&&f(n)){var u=b(this._automationEvents,r,i,n,this._defaultValue),d=o.default(u,2),x=d[0],S=d[1];return C(e,x,S,n)}return this._defaultValue}}]),t}(Symbol.iterator),I=function(e){return{cancelTime:e,type:"cancelAndHold"}},R=function(e){return{cancelTime:e,type:"cancelScheduledValues"}},P=function(e,t){return{endTime:t,type:"exponentialRampToValue",value:e}},k=function(e,t){return{endTime:t,type:"linearRampToValue",value:e}},O=function(e,t,n){return{startTime:t,target:e,timeConstant:n,type:"setTarget"}};e.AutomationEventList=M,e.createCancelAndHoldAutomationEvent=I,e.createCancelScheduledValuesAutomationEvent=R,e.createExponentialRampToValueAutomationEvent=P,e.createLinearRampToValueAutomationEvent=k,e.createSetTargetAutomationEvent=O,e.createSetValueAutomationEvent=u,e.createSetValueCurveAutomationEvent=d,Object.defineProperty(e,"__esModule",{value:!0})}(we,o("hcaHr"),o("ffgrs"),o("22y1y"));const _e=new WeakSet,Ce=new WeakMap,Ae=new WeakMap,Ee=new WeakMap,Te=new WeakMap,Me=new WeakMap,Ie=new WeakMap,Re=new WeakMap,Pe=new WeakMap,ke=new WeakMap,Oe={construct:()=>Oe},Ne=e=>{try{new new Proxy(e,Oe)}catch{return!1}return!0},Le=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,De=(e,t)=>{const n=[];let r=e.replace(/^[\s]+/,""),i=r.match(Le);for(;null!==i;){const e=i[1].slice(1,-1),o=i[0].replace(/([\s]+)?;?$/,"").replace(e,new URL(e,t).toString());n.push(o),r=r.slice(i[0].length).replace(/^[\s]+/,""),i=r.match(Le)}return[n.join(";"),r]},Be=e=>{if(void 0!==e&&!Array.isArray(e))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},ze=e=>{if(!Ne(e))throw new TypeError("The given value for processorCtor should be a constructor.");if(null===e.prototype||"object"!=typeof e.prototype)throw new TypeError("The given value for processorCtor should have a prototype.")},Fe=(e,t)=>{const n=e.get(t);if(void 0===n)throw new Error("A value with the given key could not be found.");return n},Ue=(e,t)=>{const n=Array.from(e).filter(t);if(n.length>1)throw Error("More than one element was found.");if(0===n.length)throw Error("No element was found.");const[r]=n;return e.delete(r),r},je=(e,t,n,r)=>{const i=Fe(e,t),o=Ue(i,(e=>e[0]===n&&e[1]===r));return 0===i.size&&e.delete(t),o},He=e=>Fe(Ie,e),Ve=e=>{if(_e.has(e))throw new Error("The AudioNode is already stored.");_e.add(e),He(e).forEach((e=>e(!0)))},Ge=e=>"port"in e,We=e=>{if(!_e.has(e))throw new Error("The AudioNode is not stored.");_e.delete(e),He(e).forEach((e=>e(!1)))},qe=(e,t)=>{!Ge(e)&&t.every((e=>0===e.size))&&We(e)},Ke={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},Je=(e,t)=>e.context===t,Qe=e=>{try{e.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},Ye=()=>new DOMException("","IndexSizeError"),Ze=e=>{var t;e.getChannelData=(t=e.getChannelData,n=>{try{return t.call(e,n)}catch(e){if(12===e.code)throw Ye();throw e}})},Xe={numberOfChannels:1},$e=-34028234663852886e22,et=34028234663852886e22,tt=e=>_e.has(e),nt={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},rt=e=>"playbackRate"in e,it=e=>"frequency"in e&&"gain"in e,ot=e=>"offset"in e,st=e=>!("frequency"in e)&&"gain"in e,at=e=>"detune"in e&&"frequency"in e,lt=e=>"pan"in e,ct=e=>Fe(Ce,e),ut=e=>Fe(Ee,e),dt=(e,t)=>{const{activeInputs:n}=ct(e);n.forEach((n=>n.forEach((([n])=>{t.includes(e)||dt(n,[...t,e])}))));const r=rt(e)?[e.playbackRate]:Ge(e)?Array.from(e.parameters.values()):it(e)?[e.Q,e.detune,e.frequency,e.gain]:ot(e)?[e.offset]:st(e)?[e.gain]:at(e)?[e.detune,e.frequency]:lt(e)?[e.pan]:[];for(const e of r){const n=ut(e);void 0!==n&&n.activeInputs.forEach((([e])=>dt(e,t)))}tt(e)&&We(e)},ht=e=>{dt(e.destination,[])},pt=e=>void 0===e||"number"==typeof e||"string"==typeof e&&("balanced"===e||"interactive"===e||"playback"===e),ft=e=>"context"in e,mt=e=>ft(e[0]),gt=(e,t,n,r)=>{for(const t of e)if(n(t)){if(r)return!1;throw Error("The set contains at least one similar element.")}return e.add(t),!0},vt=(e,t,[n,r],i)=>{gt(e,[t,n,r],(e=>e[0]===t&&e[1]===n),i)},yt=(e,[t,n,r],i)=>{const o=e.get(t);void 0===o?e.set(t,new Set([[n,r]])):gt(o,[n,r],(e=>e[0]===n),i)},bt=e=>"inputs"in e,xt=(e,t,n,r)=>{if(bt(t)){const i=t.inputs[r];return e.connect(i,n,0),[i,n,0]}return e.connect(t,n,r),[t,n,r]},St=(e,t,n)=>{for(const r of e)if(r[0]===t&&r[1]===n)return e.delete(r),r;return null},wt=(e,t,n)=>Ue(e,(e=>e[0]===t&&e[1]===n)),_t=(e,t)=>{if(!He(e).delete(t))throw new Error("Missing the expected event listener.")},Ct=(e,t,n)=>{const r=Fe(e,t),i=Ue(r,(e=>e[0]===n));return 0===r.size&&e.delete(t),i},At=(e,t,n,r)=>{bt(t)?e.disconnect(t.inputs[r],n,0):e.disconnect(t,n,r)},Et=e=>Fe(Ae,e),Tt=e=>Fe(Te,e),Mt=e=>Re.has(e),It=e=>!_e.has(e),Rt=(e,t)=>new Promise((n=>{if(null!==t)n(!0);else{const t=e.createScriptProcessor(256,1,1),r=e.createGain(),i=e.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const s=e.createBufferSource();s.buffer=i,s.loop=!0,s.connect(t).connect(e.destination),s.connect(r),s.disconnect(r),t.onaudioprocess=r=>{const i=r.inputBuffer.getChannelData(0);Array.prototype.some.call(i,(e=>1===e))?n(!0):n(!1),s.stop(),t.onaudioprocess=null,s.disconnect(t),t.disconnect(e.destination)},s.start()}})),Pt=(e,t)=>{const n=new Map;for(const t of e)for(const e of t){const t=n.get(e);n.set(e,void 0===t?1:t+1)}n.forEach(((e,n)=>t(n,e)))},kt=e=>"context"in e,Ot=e=>{const t=new Map;var n,r;e.connect=(n=e.connect.bind(e),(e,r=0,i=0)=>{const o=kt(e)?n(e,r,i):n(e,r),s=t.get(e);return void 0===s?t.set(e,[{input:i,output:r}]):s.every((e=>e.input!==i||e.output!==r))&&s.push({input:i,output:r}),o}),e.disconnect=(r=e.disconnect,(n,i,o)=>{if(r.apply(e),void 0===n)t.clear();else if("number"==typeof n)for(const[e,r]of t){const i=r.filter((e=>e.output!==n));0===i.length?t.delete(e):t.set(e,i)}else if(t.has(n))if(void 0===i)t.delete(n);else{const e=t.get(n);if(void 0!==e){const r=e.filter((e=>e.output!==i&&(e.input!==o||void 0===o)));0===r.length?t.delete(n):t.set(n,r)}}for(const[n,r]of t)r.forEach((t=>{kt(n)?e.connect(n,t.output,t.input):e.connect(n,t.output)}))})},Nt=(e,t,n,r)=>{const{activeInputs:i,passiveInputs:o}=ut(t),{outputs:s}=ct(e),a=He(e),l=s=>{const a=Et(e),l=Tt(t);if(s){const t=Ct(o,e,n);vt(i,e,t,!1),r||Mt(e)||a.connect(l,n)}else{const t=wt(i,e,n);yt(o,t,!1),r||Mt(e)||a.disconnect(l,n)}};return!!gt(s,[t,n],(e=>e[0]===t&&e[1]===n),!0)&&(a.add(l),tt(e)?vt(i,e,[n,l],!0):yt(o,[e,n,l],!0),!0)},Lt=(e,t,n,r,i)=>{const[o,s]=((e,t,n,r)=>{const{activeInputs:i,passiveInputs:o}=ct(t),s=St(i[r],e,n);if(null===s)return[je(o,e,n,r)[2],!1];return[s[2],!0]})(e,n,r,i);if(null!==o&&(_t(e,o),!s||t||Mt(e)||At(Et(e),Et(n),r,i)),tt(n)){const{activeInputs:e}=ct(n);qe(n,e)}},Dt=(e,t,n,r)=>{const[i,o]=((e,t,n)=>{const{activeInputs:r,passiveInputs:i}=ut(t),o=St(r,e,n);if(null===o)return[Ct(i,e,n)[1],!1];return[o[2],!0]})(e,n,r);null!==i&&(_t(e,i),!o||t||Mt(e)||Et(e).disconnect(Tt(n),r))};class Bt{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach(((n,r)=>e.call(t,n,r,this)))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const zt={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}};function Ft(e,t,n,r,i){if("function"==typeof e.copyFromChannel)0===t[n].byteLength&&(t[n]=new Float32Array(128)),e.copyFromChannel(t[n],r,i);else{const o=e.getChannelData(r);if(0===t[n].byteLength)t[n]=o.slice(i,i+128);else{const e=new Float32Array(o.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);t[n].set(e)}}}const Ut=(e,t,n,r,i)=>{"function"==typeof e.copyToChannel?0!==t[n].byteLength&&e.copyToChannel(t[n],r,i):0!==t[n].byteLength&&e.getChannelData(r).set(t[n],i)},jt=(e,t)=>{const n=[];for(let r=0;r<e;r+=1){const e=[],i="number"==typeof t?t:t[r];for(let t=0;t<i;t+=1)e.push(new Float32Array(128));n.push(e)}return n},Ht=(e,t)=>{const n=Fe(ke,e),r=Et(t);return Fe(n,r)},Vt=async(e,t,n,r,i,o,s)=>{const a=null===t?128*Math.ceil(e.context.length/128):t.length,l=r.channelCount*r.numberOfInputs,c=i.reduce(((e,t)=>e+t),0),u=0===c?null:n.createBuffer(c,a,n.sampleRate);if(void 0===o)throw new Error("Missing the processor constructor.");const d=ct(e),h=await Ht(n,e),p=jt(r.numberOfInputs,r.channelCount),f=jt(r.numberOfOutputs,i),m=Array.from(e.parameters.keys()).reduce(((e,t)=>({...e,[t]:new Float32Array(128)})),{});for(let c=0;c<a;c+=128){if(r.numberOfInputs>0&&null!==t)for(let e=0;e<r.numberOfInputs;e+=1)for(let n=0;n<r.channelCount;n+=1)Ft(t,p[e],n,n,c);void 0!==o.parameterDescriptors&&null!==t&&o.parameterDescriptors.forEach((({name:e},n)=>{Ft(t,m,e,l+n,c)}));for(let e=0;e<r.numberOfInputs;e+=1)for(let t=0;t<i[e];t+=1)0===f[e][t].byteLength&&(f[e][t]=new Float32Array(128));try{const e=p.map(((e,t)=>0===d.activeInputs[t].size?[]:e)),t=s(c/n.sampleRate,n.sampleRate,(()=>h.process(e,f,m)));if(null!==u)for(let e=0,t=0;e<r.numberOfOutputs;e+=1){for(let n=0;n<i[e];n+=1)Ut(u,f[e],n,t+n,c);t+=i[e]}if(!t)break}catch(t){e.dispatchEvent(new ErrorEvent("processorerror",{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message}));break}}return u},Gt={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},Wt={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},qt={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},Kt={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},Jt={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},Qt=e=>{const{port1:t,port2:n}=new MessageChannel;return new Promise((r=>{const i=()=>{n.onmessage=null,t.close(),n.close(),r()};n.onmessage=()=>i();try{t.postMessage(e,[e])}finally{i()}}))},Yt={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},Zt=e=>"delayTime"in e,Xt=(e,t,n)=>{const r=t[n];if(void 0===r)throw e();return r},$t={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},en={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},tn=()=>new DOMException("","InvalidStateError"),nn=()=>new DOMException("","InvalidAccessError"),rn=e=>{var t;e.getFrequencyResponse=(t=e.getFrequencyResponse,(n,r,i)=>{if(n.length!==r.length||r.length!==i.length)throw nn();return t.call(e,n,r,i)})},on={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},sn=(e,t,n,r,i,o,s,a,l,c,u)=>{const d=c.length;let h=a;for(let a=0;a<d;a+=1){let d=n[0]*c[a];for(let t=1;t<i;t+=1){const r=h-t&l-1;d+=n[t]*o[r],d-=e[t]*s[r]}for(let e=i;e<r;e+=1)d+=n[e]*o[h-e&l-1];for(let n=i;n<t;n+=1)d-=e[n]*s[h-n&l-1];o[h]=c[a],s[h]=d,h=h+1&l-1,u[a]=d}return h},an={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},ln=e=>{const t=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n=e.decodeAudioData(t.buffer,(()=>{}));return void 0!==n&&(n.catch((()=>{})),!0)}catch{}return!1},cn={numberOfChannels:1},un=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n]&&(e[n]=r)},dn=(e,t)=>{un(e,t,"channelCount"),un(e,t,"channelCountMode"),un(e,t,"channelInterpretation")},hn=e=>"function"==typeof e.getFloatTimeDomainData,pn=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n].value&&(e[n].value=r)},fn=e=>{e.start=(t=>{let n=!1;return(r=0,i=0,o)=>{if(n)throw tn();t.call(e,r,i,o),n=!0}})(e.start)},mn=e=>{var t;e.start=(t=e.start,(n=0,r=0,i)=>{if("number"==typeof i&&i<0||r<0||n<0)throw new RangeError("The parameters can't be negative.");t.call(e,n,r,i)})},gn=e=>{var t;e.stop=(t=e.stop,(n=0)=>{if(n<0)throw new RangeError("The parameter can't be negative.");t.call(e,n)})},vn=e=>{const{port1:t}=new MessageChannel;try{t.postMessage(e)}finally{t.close()}},yn=(e,t)=>null===e?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(e*t))))),bn=e=>new Promise(((t,n)=>{const{port1:r,port2:i}=new MessageChannel;r.onmessage=({data:e})=>{r.close(),i.close(),t(e)},r.onmessageerror=({data:e})=>{r.close(),i.close(),n(e)},i.postMessage(e)})),xn=async(e,t)=>new e(await bn(t)),Sn=(e,t,n,r)=>{let i=ke.get(e);void 0===i&&(i=new WeakMap,ke.set(e,i));const o=xn(n,r);return i.set(t,o),o},wn=(e,t)=>{const n=e.createBiquadFilter();return dn(n,t),pn(n,t,"Q"),pn(n,t,"detune"),pn(n,t,"frequency"),pn(n,t,"gain"),un(n,t,"type"),n},_n=e=>{const t=e.numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>t,set:e=>{if(e!==t)throw tn()}}),Object.defineProperty(e,"channelCountMode",{get:()=>"explicit",set:e=>{if("explicit"!==e)throw tn()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>"discrete",set:e=>{if("discrete"!==e)throw tn()}})},Cn=(e,t)=>{const n=e.createChannelSplitter(t.numberOfOutputs);return dn(n,t),_n(n),n},An=(e,t)=>(e.connect=t.connect.bind(t),e.disconnect=t.disconnect.bind(t),e),En=(e,t)=>{const n=e.createDelay(t.maxDelayTime);return dn(n,t),pn(n,t,"delayTime"),n},Tn=(e,t)=>{const n=e.createGain();return dn(n,t),pn(n,t,"gain"),n};function Mn(e,t){const n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}function In(e,t){let n=[0,0];for(let o=e.length-1;o>=0;o-=1)i=t,n=[(r=n)[0]*i[0]-r[1]*i[1],r[0]*i[1]+r[1]*i[0]],n[0]+=e[o];var r,i;return n}const Rn=(e,t,n,r)=>e.createScriptProcessor(t,n,r),Pn=()=>new DOMException("","NotSupportedError"),kn={numberOfChannels:1},On={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},Nn={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},Ln={disableNormalization:!1},Dn={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},Bn=()=>new DOMException("","UnknownError"),zn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},Fn=(e,t,n)=>void 0===e.copyFromChannel?e.getChannelData(n)[0]:(e.copyFromChannel(t,n),t[0]),Un=e=>{if(null===e)return!1;const t=e.length;return t%2!=0?0!==e[Math.floor(t/2)]:e[t/2-1]+e[t/2]!==0},jn=(e,t,n,r)=>{let i=e;for(;!i.hasOwnProperty(t);)i=Object.getPrototypeOf(i);const{get:o,set:s}=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,{get:n(o),set:r(s)})},Hn=(e,t,n)=>{try{e.setValueAtTime(t,n)}catch(r){if(9!==r.code)throw r;Hn(e,t,n+1e-7)}},Vn=e=>{const t=e.createOscillator();try{t.start(-1)}catch(e){return e instanceof RangeError}return!1},Gn=e=>{const t=e.createBuffer(1,1,44100),n=e.createBufferSource();n.buffer=t,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},Wn=e=>{const t=e.createOscillator();try{t.stop(-1)}catch(e){return e instanceof RangeError}return!1},qn=(e,t)=>{const n=t.createGain();e.connect(n);const r=(i=e.disconnect,()=>{i.call(e,n),e.removeEventListener("ended",r)});var i;e.addEventListener("ended",r),An(e,n),e.stop=(t=>{let r=!1;return(i=0)=>{if(r)try{t.call(e,i)}catch{n.gain.setValueAtTime(0,i)}else t.call(e,i),r=!0}})(e.stop)},Kn=(e,t)=>n=>{const r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),"function"==typeof t?t.call(e,n):t.handleEvent.call(e,n)},Jn=(Qn=gt,(e,t,[n,r,i],o)=>{Qn(e[r],[t,n,i],(e=>e[0]===t&&e[1]===n),o)});var Qn;const Yn=(e=>(t,n,[r,i,o],s)=>{const a=t.get(r);void 0===a?t.set(r,new Set([[i,n,o]])):e(a,[i,n,o],(e=>e[0]===i&&e[1]===n),s)})(gt),Zn=(Xn=Ue,(e,t,n,r)=>Xn(e[r],(e=>e[0]===t&&e[1]===n)));var Xn;const $n=new WeakMap,er=(tr=$n,e=>{var t;return null!==(t=tr.get(e))&&void 0!==t?t:0});var tr;const nr=(rr=new Map,ir=new WeakMap,(e,t)=>{const n=ir.get(e);if(void 0!==n)return n;const r=rr.get(e);if(void 0!==r)return r;try{const n=t();return n instanceof Promise?(rr.set(e,n),n.catch((()=>!1)).then((t=>(rr.delete(e),ir.set(e,t),t)))):(ir.set(e,n),n)}catch{return ir.set(e,!1),!1}});var rr,ir;const or="undefined"==typeof window?null:window,sr=(ar=nr,lr=Ye,(e,t)=>{const n=e.createAnalyser();if(dn(n,t),!(t.maxDecibels>t.minDecibels))throw lr();return un(n,t,"fftSize"),un(n,t,"maxDecibels"),un(n,t,"minDecibels"),un(n,t,"smoothingTimeConstant"),ar(hn,(()=>hn(n)))||(e=>{e.getFloatTimeDomainData=t=>{const n=new Uint8Array(t.length);e.getByteTimeDomainData(n);const r=Math.max(n.length,e.fftSize);for(let e=0;e<r;e+=1)t[e]=.0078125*(n[e]-128);return t}})(n),n});var ar,lr;const cr=(ur=ct,e=>{const t=ur(e);if(null===t.renderer)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer});var ur;const dr=((e,t,n)=>async(r,i,o)=>{const s=e(r);await Promise.all(s.activeInputs.map(((e,s)=>Array.from(e).map((async([e,a])=>{const l=t(e),c=await l.render(e,i),u=r.context.destination;n(e)||r===u&&n(r)||c.connect(o,a,s)})))).reduce(((e,t)=>[...e,...t]),[]))})(ct,cr,Mt),hr=(pr=sr,fr=Et,mr=dr,()=>{const e=new WeakMap;return{render(t,n){const r=e.get(n);return void 0!==r?Promise.resolve(r):(async(t,n)=>{let r=fr(t);if(!Je(r,n)){const e={channelCount:r.channelCount,channelCountMode:r.channelCountMode,channelInterpretation:r.channelInterpretation,fftSize:r.fftSize,maxDecibels:r.maxDecibels,minDecibels:r.minDecibels,smoothingTimeConstant:r.smoothingTimeConstant};r=pr(n,e)}return e.set(n,r),await mr(t,n,r),r})(t,n)}}});var pr,fr,mr;const gr=(vr=Me,e=>{const t=vr.get(e);if(void 0===t)throw tn();return t});var vr;const yr=(e=>null===e?null:e.hasOwnProperty("OfflineAudioContext")?e.OfflineAudioContext:e.hasOwnProperty("webkitOfflineAudioContext")?e.webkitOfflineAudioContext:null)(or),br=(xr=yr,e=>null!==xr&&e instanceof xr);var xr;const Sr=new WeakMap,wr=(_r=Kn,class{constructor(e){this._nativeEventTarget=e,this._listeners=new WeakMap}addEventListener(e,t,n){if(null!==t){let r=this._listeners.get(t);void 0===r&&(r=_r(this,t),"function"==typeof t&&this._listeners.set(t,r)),this._nativeEventTarget.addEventListener(e,r,n)}}dispatchEvent(e){return this._nativeEventTarget.dispatchEvent(e)}removeEventListener(e,t,n){const r=null===t?void 0:this._listeners.get(t);this._nativeEventTarget.removeEventListener(e,void 0===r?null:r,n)}});var _r;const Cr=(e=>null===e?null:e.hasOwnProperty("AudioContext")?e.AudioContext:e.hasOwnProperty("webkitAudioContext")?e.webkitAudioContext:null)(or),Ar=(Er=Cr,e=>null!==Er&&e instanceof Er);var Er;const Tr=(e=>t=>null!==e&&"function"==typeof e.AudioNode&&t instanceof e.AudioNode)(or),Mr=(e=>t=>null!==e&&"function"==typeof e.AudioParam&&t instanceof e.AudioParam)(or),Ir=(e=>null===e?null:e.hasOwnProperty("AudioWorkletNode")?e.AudioWorkletNode:null)(or),Rr=((e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m)=>class extends c{constructor(t,r,i,o){super(i),this._context=t,this._nativeAudioNode=i;const s=u(t);d(s)&&!0!==n(Rt,(()=>Rt(s,m)))&&Ot(i),Ae.set(this,i),Ie.set(this,new Set),"closed"!==t.state&&r&&Ve(this),e(this,o,i)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(e){this._nativeAudioNode.channelCount=e}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(e){this._nativeAudioNode.channelCountMode=e}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(e){this._nativeAudioNode.channelInterpretation=e}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(e,n=0,a=0){if(n<0||n>=this._nativeAudioNode.numberOfOutputs)throw i();const c=u(this._context),d=f(c);if(h(e)||p(e))throw o();if(ft(e)){const i=Et(e);try{const t=xt(this._nativeAudioNode,i,n,a),r=It(this);(d||r)&&this._nativeAudioNode.disconnect(...t),"closed"!==this.context.state&&!r&&It(e)&&Ve(e)}catch(e){if(12===e.code)throw o();throw e}if(t(this,e,n,a,d)){const t=l([this],e);Pt(t,r(d))}return e}const m=Tt(e);if("playbackRate"===m.name&&1024===m.maxValue)throw s();try{this._nativeAudioNode.connect(m,n),(d||It(this))&&this._nativeAudioNode.disconnect(m,n)}catch(e){if(12===e.code)throw o();throw e}if(Nt(this,e,n,d)){const t=l([this],e);Pt(t,r(d))}}disconnect(e,t,n){let r;const s=u(this._context),c=f(s);if(void 0===e)r=((e,t)=>{const n=ct(e),r=[];for(const i of n.outputs)mt(i)?Lt(e,t,...i):Dt(e,t,...i),r.push(i[0]);return n.outputs.clear(),r})(this,c);else if("number"==typeof e){if(e<0||e>=this.numberOfOutputs)throw i();r=((e,t,n)=>{const r=ct(e),i=[];for(const o of r.outputs)o[1]===n&&(mt(o)?Lt(e,t,...o):Dt(e,t,...o),i.push(o[0]),r.outputs.delete(o));return i})(this,c,e)}else{if(void 0!==t&&(t<0||t>=this.numberOfOutputs))throw i();if(ft(e)&&void 0!==n&&(n<0||n>=e.numberOfInputs))throw i();if(r=((e,t,n,r,i)=>{const o=ct(e);return Array.from(o.outputs).filter((e=>!(e[0]!==n||void 0!==r&&e[1]!==r||void 0!==i&&e[2]!==i))).map((n=>(mt(n)?Lt(e,t,...n):Dt(e,t,...n),o.outputs.delete(n),n[0])))})(this,c,e,t,n),0===r.length)throw o()}for(const e of r){const t=l([this],e);Pt(t,a)}}})((Pr=Ce,(e,t,n)=>{const r=[];for(let e=0;e<n.numberOfInputs;e+=1)r.push(new Set);Pr.set(e,{activeInputs:r,outputs:new Set,passiveInputs:new WeakMap,renderer:t})}),((e,t,n,r,i,o,s,a,l,c,u,d,h)=>{const p=new WeakMap;return(f,m,g,v,y)=>{const{activeInputs:b,passiveInputs:x}=o(m),{outputs:S}=o(f),w=a(f),_=o=>{const a=l(m),c=l(f);if(o){const t=je(x,f,g,v);e(b,f,t,!1),y||d(f)||n(c,a,g,v),h(m)&&Ve(m)}else{const e=r(b,f,g,v);t(x,v,e,!1),y||d(f)||i(c,a,g,v);const n=s(m);if(0===n)u(m)&&qe(m,b);else{const e=p.get(m);void 0!==e&&clearTimeout(e),p.set(m,setTimeout((()=>{u(m)&&qe(m,b)}),1e3*n))}}};return!!c(S,[m,g,v],(e=>e[0]===m&&e[1]===g&&e[2]===v),!0)&&(w.add(_),u(f)?e(b,f,[g,v,_],!0):t(x,v,[f,g,_],!0),!0)}})(Jn,Yn,xt,Zn,At,ct,er,He,Et,gt,tt,Mt,It),nr,((e,t,n,r,i,o)=>s=>(a,l)=>{const c=e.get(a);if(void 0===c){if(!s&&o(a)){const e=r(a),{outputs:o}=n(a);for(const n of o)if(mt(n)){const i=r(n[0]);t(e,i,n[1],n[2])}else{const t=i(n[0]);e.disconnect(t,n[1])}}e.set(a,l)}else e.set(a,c+l)})(Re,At,ct,Et,Tt,tt),Ye,nn,Pn,((e,t,n,r,i,o,s,a)=>(l,c)=>{const u=t.get(l);if(void 0===u)throw new Error("Missing the expected cycle count.");const d=o(l.context),h=a(d);if(u===c){if(t.delete(l),!h&&s(l)){const t=r(l),{outputs:o}=n(l);for(const n of o)if(mt(n)){const i=r(n[0]);e(t,i,n[1],n[2])}else{const e=i(n[0]);t.connect(e,n[1])}}}else t.set(l,u-c)})(xt,Re,ct,Et,Tt,gr,tt,br),((e,t,n)=>function r(i,o){const s=ft(o)?o:n(e,o);if(Zt(s))return[];if(i[0]===s)return[i];if(i.includes(s))return[];const{outputs:a}=t(s);return Array.from(a).map((e=>r([...i,s],e[0]))).reduce(((e,t)=>e.concat(t)),[])})(Sr,ct,Fe),wr,gr,Ar,Tr,Mr,br,Ir);var Pr;const kr=((e,t,n,r,i,o)=>class extends e{constructor(e,n){const s=i(e),a={...Ke,...n},l=r(s,a);super(e,!1,l,o(s)?t():null),this._nativeAnalyserNode=l}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(e){this._nativeAnalyserNode.fftSize=e}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(e){const t=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=e,!(e>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=t,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(e){const t=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=e,!(this._nativeAnalyserNode.maxDecibels>e))throw this._nativeAnalyserNode.minDecibels=t,n()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(e){this._nativeAnalyserNode.smoothingTimeConstant=e}getByteFrequencyData(e){this._nativeAnalyserNode.getByteFrequencyData(e)}getByteTimeDomainData(e){this._nativeAnalyserNode.getByteTimeDomainData(e)}getFloatFrequencyData(e){this._nativeAnalyserNode.getFloatFrequencyData(e)}getFloatTimeDomainData(e){this._nativeAnalyserNode.getFloatTimeDomainData(e)}})(Rr,hr,Ye,sr,gr,br),Or=new WeakSet,Nr=(e=>null===e?null:e.hasOwnProperty("AudioBuffer")?e.AudioBuffer:null)(or),Lr=(Dr=new Uint32Array(1),e=>(Dr[0]=e,Dr[0]));var Dr;const Br=((e,t)=>n=>{n.copyFromChannel=(r,i,o=0)=>{const s=e(o),a=e(i);if(a>=n.numberOfChannels)throw t();const l=n.length,c=n.getChannelData(a),u=r.length;for(let e=s<0?-s:0;e+s<l&&e<u;e+=1)r[e]=c[e+s]},n.copyToChannel=(r,i,o=0)=>{const s=e(o),a=e(i);if(a>=n.numberOfChannels)throw t();const l=n.length,c=n.getChannelData(a),u=r.length;for(let e=s<0?-s:0;e+s<l&&e<u;e+=1)c[e+s]=r[e]}})(Lr,Ye),zr=(Fr=Lr,e=>{var t,n;e.copyFromChannel=(t=e.copyFromChannel,(n,r,i=0)=>{const o=Fr(i),s=Fr(r);if(o<e.length)return t.call(e,n,s,o)}),e.copyToChannel=(n=e.copyToChannel,(t,r,i=0)=>{const o=Fr(i),s=Fr(r);if(o<e.length)return n.call(e,t,s,o)})});var Fr;const Ur=((e,t,n,r,i,o,s,a)=>{let l=null;return class c{constructor(c){if(null===i)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:u,numberOfChannels:d,sampleRate:h}={...Xe,...c};null===l&&(l=new i(1,1,44100));const p=null!==r&&t(o,o)?new r({length:u,numberOfChannels:d,sampleRate:h}):l.createBuffer(d,u,h);if(0===p.numberOfChannels)throw n();return"function"!=typeof p.copyFromChannel?(s(p),Ze(p)):t(Qe,(()=>Qe(p)))||a(p),e.add(p),p}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===c.prototype||e.has(t)}}})(Or,nr,Pn,Nr,yr,(jr=Nr,()=>{if(null===jr)return!1;try{new jr({length:1,sampleRate:44100})}catch{return!1}return!0}),Br,zr);var jr;const Hr=(Vr=Tn,(e,t)=>{const n=Vr(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(n).connect(e.destination);const r=()=>{t.removeEventListener("ended",r),t.disconnect(n),n.disconnect()};t.addEventListener("ended",r)});var Vr;const Gr=(Wr=cr,qr=ut,Kr=Mt,async(e,t,n)=>{const r=qr(e);await Promise.all(Array.from(r.activeInputs).map((async([e,r])=>{const i=Wr(e),o=await i.render(e,t);Kr(e)||o.connect(n,r)})))});var Wr,qr,Kr;const Jr=(Qr=Gr,(e,t,n)=>Qr(t,e,n));var Qr;const Yr=((e,t,n,r,i,o,s,a,l,c,u)=>(d,h)=>{const p=d.createBufferSource();return dn(p,h),pn(p,h,"playbackRate"),un(p,h,"buffer"),un(p,h,"loop"),un(p,h,"loopEnd"),un(p,h,"loopStart"),t(n,(()=>n(d)))||fn(p),t(r,(()=>r(d)))||l(p),t(i,(()=>i(d)))||c(p,d),t(o,(()=>o(d)))||mn(p),t(s,(()=>s(d)))||u(p,d),t(a,(()=>a(d)))||gn(p),e(d,p),p})(Hr,nr,(e=>{const t=e.createBufferSource();t.start();try{t.start()}catch{return!0}return!1}),(e=>{const t=e.createBufferSource(),n=e.createBuffer(1,1,44100);t.buffer=n;try{t.start(0,1)}catch{return!1}return!0}),(e=>{const t=e.createBufferSource();t.start();try{t.stop()}catch{return!1}return!0}),Vn,Gn,Wn,(e=>{var t;e.start=(t=e.start,(n=0,r=0,i)=>{const o=e.buffer,s=null===o?r:Math.min(o.duration,r);null!==o&&s>o.duration-.5/e.context.sampleRate?t.call(e,n,0,0):t.call(e,n,s,i)})}),(Zr=jn,(e,t)=>{const n=t.createBuffer(1,1,44100);null===e.buffer&&(e.buffer=n),Zr(e,"buffer",(t=>()=>{const r=t.call(e);return r===n?null:r}),(t=>r=>t.call(e,null===r?n:r)))}),qn);var Zr;const Xr=((e,t)=>(n,r,i)=>(e(r).replay(i),t(r,n,i)))((e=>t=>{const n=e(t);if(null===n.renderer)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return n.renderer})(ut),Gr),$r=((e,t,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null;return{set start(e){s=e},set stop(e){a=e},render(l,c){const u=o.get(c);return void 0!==u?Promise.resolve(u):(async(l,c)=>{let u=n(l);const d=Je(u,c);if(!d){const e={buffer:u.buffer,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,loop:u.loop,loopEnd:u.loopEnd,loopStart:u.loopStart,playbackRate:u.playbackRate.value};u=t(c,e),null!==s&&u.start(...s),null!==a&&u.stop(a)}return o.set(c,u),d?await e(c,l.playbackRate,u.playbackRate):await r(c,l.playbackRate,u.playbackRate),await i(l,c,u),u})(l,c)}}})(Jr,Yr,Et,Xr,dr),ei=((e,t,n,r,i,o,s,a,l,c,u,d,h)=>(p,f,m,g=null,v=null)=>{const y=new(0,we.AutomationEventList)(m.defaultValue),b=f?r(y):null,x={get defaultValue(){return m.defaultValue},get maxValue(){return null===g?m.maxValue:g},get minValue(){return null===v?m.minValue:v},get value(){return m.value},set value(e){m.value=e,x.setValueAtTime(e,p.context.currentTime)},cancelAndHoldAtTime(e){if("function"==typeof m.cancelAndHoldAtTime)null===b&&y.flush(p.context.currentTime),y.add(i(e)),m.cancelAndHoldAtTime(e);else{const t=Array.from(y).pop();null===b&&y.flush(p.context.currentTime),y.add(i(e));const n=Array.from(y).pop();m.cancelScheduledValues(e),t!==n&&void 0!==n&&("exponentialRampToValue"===n.type?m.exponentialRampToValueAtTime(n.value,n.endTime):"linearRampToValue"===n.type?m.linearRampToValueAtTime(n.value,n.endTime):"setValue"===n.type?m.setValueAtTime(n.value,n.startTime):"setValueCurve"===n.type&&m.setValueCurveAtTime(n.values,n.startTime,n.duration))}return x},cancelScheduledValues:e=>(null===b&&y.flush(p.context.currentTime),y.add(o(e)),m.cancelScheduledValues(e),x),exponentialRampToValueAtTime(e,t){if(0===e)throw new RangeError;if(!Number.isFinite(t)||t<0)throw new RangeError;return null===b&&y.flush(p.context.currentTime),y.add(s(e,t)),m.exponentialRampToValueAtTime(e,t),x},linearRampToValueAtTime:(e,t)=>(null===b&&y.flush(p.context.currentTime),y.add(a(e,t)),m.linearRampToValueAtTime(e,t),x),setTargetAtTime:(e,t,n)=>(null===b&&y.flush(p.context.currentTime),y.add(l(e,t,n)),m.setTargetAtTime(e,t,n),x),setValueAtTime:(e,t)=>(null===b&&y.flush(p.context.currentTime),y.add(c(e,t)),m.setValueAtTime(e,t),x),setValueCurveAtTime(e,t,n){const r=e instanceof Float32Array?e:new Float32Array(e);if(null!==d&&"webkitAudioContext"===d.name){const e=t+n,i=p.context.sampleRate,o=Math.ceil(t*i),s=Math.floor(e*i),a=s-o,l=new Float32Array(a);for(let e=0;e<a;e+=1){const s=(r.length-1)/n*((o+e)/i-t),a=Math.floor(s),c=Math.ceil(s);l[e]=a===c?r[a]:(1-(s-a))*r[a]+(1-(c-s))*r[c]}null===b&&y.flush(p.context.currentTime),y.add(u(l,t,n)),m.setValueCurveAtTime(l,t,n);const c=s/i;c<e&&h(x,l[l.length-1],c),h(x,r[r.length-1],e)}else null===b&&y.flush(p.context.currentTime),y.add(u(r,t,n)),m.setValueCurveAtTime(r,t,n);return x}};return n.set(x,m),t.set(x,p),e(x,b),x})((ti=Ee,(e,t)=>{ti.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})}),Sr,Te,(e=>({replay(t){for(const n of e)if("exponentialRampToValue"===n.type){const{endTime:e,value:r}=n;t.exponentialRampToValueAtTime(r,e)}else if("linearRampToValue"===n.type){const{endTime:e,value:r}=n;t.linearRampToValueAtTime(r,e)}else if("setTarget"===n.type){const{startTime:e,target:r,timeConstant:i}=n;t.setTargetAtTime(r,e,i)}else if("setValue"===n.type){const{startTime:e,value:r}=n;t.setValueAtTime(r,e)}else{if("setValueCurve"!==n.type)throw new Error("Can't apply an unknown automation.");{const{duration:e,startTime:r,values:i}=n;t.setValueCurveAtTime(i,r,e)}}}})),we.createCancelAndHoldAutomationEvent,we.createCancelScheduledValuesAutomationEvent,we.createExponentialRampToValueAutomationEvent,we.createLinearRampToValueAutomationEvent,we.createSetTargetAutomationEvent,we.createSetValueAutomationEvent,we.createSetValueCurveAutomationEvent,Cr,Hn);var ti;const ni=((e,t,n,r,i,o,s,a)=>class extends e{constructor(e,r){const a=o(e),l={...nt,...r},c=i(a,l),u=s(a),d=u?t():null;super(e,!1,c,d),this._audioBufferSourceNodeRenderer=d,this._isBufferNullified=!1,this._isBufferSet=null!==l.buffer,this._nativeAudioBufferSourceNode=c,this._onended=null,this._playbackRate=n(this,u,c.playbackRate,et,$e)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(e){if(this._nativeAudioBufferSourceNode.buffer=e,null!==e){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(e){this._nativeAudioBufferSourceNode.loop=e}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(e){this._nativeAudioBufferSourceNode.loopEnd=e}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(e){this._nativeAudioBufferSourceNode.loopStart=e}get onended(){return this._onended}set onended(e){const t="function"==typeof e?a(this,e):null;this._nativeAudioBufferSourceNode.onended=t;const n=this._nativeAudioBufferSourceNode.onended;this._onended=null!==n&&n===t?e:n}get playbackRate(){return this._playbackRate}start(e=0,t=0,n){if(this._nativeAudioBufferSourceNode.start(e,t,n),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.start=void 0===n?[e,t]:[e,t,n]),"closed"!==this.context.state){Ve(this);const e=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",e),tt(this)&&We(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",e)}}stop(e=0){this._nativeAudioBufferSourceNode.stop(e),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=e)}})(Rr,$r,ei,tn,Yr,gr,br,Kn),ri=((e,t,n,r,i,o,s,a)=>class extends e{constructor(e,n){const r=o(e),l=s(r),c=i(r,n,l);super(e,!1,c,l?t(a):null),this._isNodeOfNativeOfflineAudioContext=l,this._nativeAudioDestinationNode=c}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(e>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=e}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=e}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}})(Rr,(e=>{const t=new WeakMap;return{render(n,r){const i=t.get(r);return void 0!==i?Promise.resolve(i):(async(n,r)=>{const i=r.destination;return t.set(r,i),await e(n,r,i),i})(n,r)}}}),Ye,tn,((e,t)=>(n,r,i)=>{const o=n.destination;if(o.channelCount!==r)try{o.channelCount=r}catch{}i&&"explicit"!==o.channelCountMode&&(o.channelCountMode="explicit"),0===o.maxChannelCount&&Object.defineProperty(o,"maxChannelCount",{value:r});const s=e(n,{channelCount:r,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,gain:1});return t(s,"channelCount",(e=>()=>e.call(s)),(e=>t=>{e.call(s,t);try{o.channelCount=t}catch(e){if(t>o.maxChannelCount)throw e}})),t(s,"channelCountMode",(e=>()=>e.call(s)),(e=>t=>{e.call(s,t),o.channelCountMode=t})),t(s,"channelInterpretation",(e=>()=>e.call(s)),(e=>t=>{e.call(s,t),o.channelInterpretation=t})),Object.defineProperty(s,"maxChannelCount",{get:()=>o.maxChannelCount}),s.connect(o),s})(Tn,jn),gr,br,dr),ii=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a)=>{let l=n(s);const c=Je(l,a);if(!c){const e={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=t(a,e)}return o.set(a,l),c?(await e(a,s.Q,l.Q),await e(a,s.detune,l.detune),await e(a,s.frequency,l.frequency),await e(a,s.gain,l.gain)):(await r(a,s.Q,l.Q),await r(a,s.detune,l.detune),await r(a,s.frequency,l.frequency),await r(a,s.gain,l.gain)),await i(s,a,l),l})(s,a)}}})(Jr,wn,Et,Xr,dr),oi=(e=>(t,n)=>e.set(t,n))($n),si=(ai=Rr,li=ei,ci=ii,ui=nn,di=wn,hi=gr,pi=br,fi=oi,class extends ai{constructor(e,t){const n=hi(e),r={...Gt,...t},i=di(n,r),o=pi(n);super(e,!1,i,o?ci():null),this._Q=li(this,o,i.Q,et,$e),this._detune=li(this,o,i.detune,1200*Math.log2(et),-1200*Math.log2(et)),this._frequency=li(this,o,i.frequency,e.sampleRate/2,0),this._gain=li(this,o,i.gain,40*Math.log10(et),$e),this._nativeBiquadFilterNode=i,fi(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(e){this._nativeBiquadFilterNode.type=e}getFrequencyResponse(e,t,n){try{this._nativeBiquadFilterNode.getFrequencyResponse(e,t,n)}catch(e){if(11===e.code)throw ui();throw e}if(e.length!==t.length||t.length!==n.length)throw ui()}});var ai,li,ci,ui,di,hi,pi,fi;const mi=((e,t)=>(n,r,i)=>{const o=new Set;var s,a;return n.connect=(s=n.connect,(i,a=0,l=0)=>{const c=0===o.size;if(t(i))return s.call(n,i,a,l),e(o,[i,a,l],(e=>e[0]===i&&e[1]===a&&e[2]===l),!0),c&&r(),i;s.call(n,i,a),e(o,[i,a],(e=>e[0]===i&&e[1]===a),!0),c&&r()}),n.disconnect=(a=n.disconnect,(e,r,s)=>{const l=o.size>0;if(void 0===e)a.apply(n),o.clear();else if("number"==typeof e){a.call(n,e);for(const t of o)t[1]===e&&o.delete(t)}else{t(e)?a.call(n,e,r,s):a.call(n,e,r);for(const t of o)t[0]!==e||void 0!==r&&t[1]!==r||void 0!==s&&t[2]!==s||o.delete(t)}const c=0===o.size;l&&c&&i()}),n})(gt,Tr),gi=(vi=tn,yi=mi,(e,t)=>{t.channelCount=1,t.channelCountMode="explicit",Object.defineProperty(t,"channelCount",{get:()=>1,set:()=>{throw vi()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:()=>{throw vi()}});const n=e.createBufferSource();yi(t,(()=>{const e=t.numberOfInputs;for(let r=0;r<e;r+=1)n.connect(t,0,r)}),(()=>n.disconnect(t)))});var vi,yi;const bi=((e,t)=>(n,r)=>{const i=n.createChannelMerger(r.numberOfInputs);return null!==e&&"webkitAudioContext"===e.name&&t(n,i),dn(i,r),i})(Cr,gi),xi=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const s=r.get(o);return void 0!==s?Promise.resolve(s):(async(i,o)=>{let s=t(i);if(!Je(s,o)){const t={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,numberOfInputs:s.numberOfInputs};s=e(o,t)}return r.set(o,s),await n(i,o,s),s})(i,o)}}})(bi,Et,dr),Si=((e,t,n,r,i)=>class extends e{constructor(e,o){const s=r(e),a={...Wt,...o};super(e,!1,n(s,a),i(s)?t():null)}})(Rr,xi,bi,gr,br),wi=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const s=r.get(o);return void 0!==s?Promise.resolve(s):(async(i,o)=>{let s=t(i);if(!Je(s,o)){const t={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,numberOfOutputs:s.numberOfOutputs};s=e(o,t)}return r.set(o,s),await n(i,o,s),s})(i,o)}}})(Cn,Et,dr),_i=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=r(e),l=o({...qt,...s});super(e,!1,n(a,l),i(a)?t():null)}})(Rr,wi,Cn,gr,br,(e=>({...e,channelCount:e.numberOfOutputs}))),Ci=((e,t,n,r)=>(i,{offset:o,...s})=>{const a=i.createBuffer(1,2,44100),l=t(i,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),c=n(i,{...s,gain:o}),u=a.getChannelData(0);u[0]=1,u[1]=1,l.buffer=a,l.loop=!0;const d={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(e){c.channelCount=e},get channelCountMode(){return c.channelCountMode},set channelCountMode(e){c.channelCountMode=e},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(e){c.channelInterpretation=e},get context(){return c.context},get inputs(){return[]},get numberOfInputs(){return l.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get offset(){return c.gain},get onended(){return l.onended},set onended(e){l.onended=e},addEventListener:(...e)=>l.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>l.dispatchEvent(e[0]),removeEventListener:(...e)=>l.removeEventListener(e[0],e[1],e[2]),start(e=0){l.start.call(l,e)},stop(e=0){l.stop.call(l,e)}};return e(i,l),r(An(d,c),(()=>l.connect(c)),(()=>l.disconnect(c)))})(Hr,Yr,Tn,mi),Ai=((e,t,n,r,i)=>(o,s)=>{if(void 0===o.createConstantSource)return n(o,s);const a=o.createConstantSource();return dn(a,s),pn(a,s,"offset"),t(r,(()=>r(o)))||mn(a),t(i,(()=>i(o)))||gn(a),e(o,a),a})(Hr,nr,Ci,Vn,Wn),Ei=((e,t,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null;return{set start(e){s=e},set stop(e){a=e},render(l,c){const u=o.get(c);return void 0!==u?Promise.resolve(u):(async(l,c)=>{let u=n(l);const d=Je(u,c);if(!d){const e={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,offset:u.offset.value};u=t(c,e),null!==s&&u.start(s),null!==a&&u.stop(a)}return o.set(c,u),d?await e(c,l.offset,u.offset):await r(c,l.offset,u.offset),await i(l,c,u),u})(l,c)}}})(Jr,Ai,Et,Xr,dr),Ti=((e,t,n,r,i,o,s)=>class extends e{constructor(e,s){const a=i(e),l={...Kt,...s},c=r(a,l),u=o(a),d=u?n():null;super(e,!1,c,d),this._constantSourceNodeRenderer=d,this._nativeConstantSourceNode=c,this._offset=t(this,u,c.offset,et,$e),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(e){const t="function"==typeof e?s(this,e):null;this._nativeConstantSourceNode.onended=t;const n=this._nativeConstantSourceNode.onended;this._onended=null!==n&&n===t?e:n}start(e=0){if(this._nativeConstantSourceNode.start(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.start=e),"closed"!==this.context.state){Ve(this);const e=()=>{this._nativeConstantSourceNode.removeEventListener("ended",e),tt(this)&&We(this)};this._nativeConstantSourceNode.addEventListener("ended",e)}}stop(e=0){this._nativeConstantSourceNode.stop(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=e)}})(Rr,ei,Ei,Ai,gr,br,Kn),Mi=((e,t)=>(n,r)=>{const i=n.createConvolver();if(dn(i,r),r.disableNormalization===i.normalize&&(i.normalize=!r.disableNormalization),un(i,r,"buffer"),r.channelCount>2)throw e();if(t(i,"channelCount",(e=>()=>e.call(i)),(t=>n=>{if(n>2)throw e();return t.call(i,n)})),"max"===r.channelCountMode)throw e();return t(i,"channelCountMode",(e=>()=>e.call(i)),(t=>n=>{if("max"===n)throw e();return t.call(i,n)})),i})(Pn,jn),Ii=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const s=r.get(o);return void 0!==s?Promise.resolve(s):(async(i,o)=>{let s=t(i);if(!Je(s,o)){const t={buffer:s.buffer,channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,disableNormalization:!s.normalize};s=e(o,t)}return r.set(o,s),bt(s)?await n(i,o,s.inputs[0]):await n(i,o,s),s})(i,o)}}})(Mi,Et,dr),Ri=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=r(e),l={...Jt,...s},c=n(a,l);super(e,!1,c,i(a)?t():null),this._isBufferNullified=!1,this._nativeConvolverNode=c,null!==l.buffer&&o(this,l.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(e){if(this._nativeConvolverNode.buffer=e,null===e&&null!==this._nativeConvolverNode.buffer){const e=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=e.createBuffer(1,1,e.sampleRate),this._isBufferNullified=!0,o(this,0)}else this._isBufferNullified=!1,o(this,null===this._nativeConvolverNode.buffer?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(e){this._nativeConvolverNode.normalize=e}})(Rr,Ii,Mi,gr,br,oi),Pi=((e,t,n,r,i)=>o=>{const s=new WeakMap;return{render(a,l){const c=s.get(l);return void 0!==c?Promise.resolve(c):(async(a,l)=>{let c=n(a);const u=Je(c,l);if(!u){const e={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,delayTime:c.delayTime.value,maxDelayTime:o};c=t(l,e)}return s.set(l,c),u?await e(l,a.delayTime,c.delayTime):await r(l,a.delayTime,c.delayTime),await i(a,l,c),c})(a,l)}}})(Jr,En,Et,Xr,dr),ki=((e,t,n,r,i,o,s)=>class extends e{constructor(e,a){const l=i(e),c={...Yt,...a},u=r(l,c),d=o(l);super(e,!1,u,d?n(c.maxDelayTime):null),this._delayTime=t(this,d,u.delayTime),s(this,c.maxDelayTime)}get delayTime(){return this._delayTime}})(Rr,ei,Pi,En,gr,br,oi),Oi=(Ni=Pn,(e,t)=>{const n=e.createDynamicsCompressor();if(dn(n,t),t.channelCount>2)throw Ni();if("max"===t.channelCountMode)throw Ni();return pn(n,t,"attack"),pn(n,t,"knee"),pn(n,t,"ratio"),pn(n,t,"release"),pn(n,t,"threshold"),n});var Ni;const Li=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a)=>{let l=n(s);const c=Je(l,a);if(!c){const e={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=t(a,e)}return o.set(a,l),c?(await e(a,s.attack,l.attack),await e(a,s.knee,l.knee),await e(a,s.ratio,l.ratio),await e(a,s.release,l.release),await e(a,s.threshold,l.threshold)):(await r(a,s.attack,l.attack),await r(a,s.knee,l.knee),await r(a,s.ratio,l.ratio),await r(a,s.release,l.release),await r(a,s.threshold,l.threshold)),await i(s,a,l),l})(s,a)}}})(Jr,Oi,Et,Xr,dr),Di=((e,t,n,r,i,o,s,a)=>class extends e{constructor(e,i){const l=o(e),c={...$t,...i},u=r(l,c),d=s(l);super(e,!1,u,d?n():null),this._attack=t(this,d,u.attack),this._knee=t(this,d,u.knee),this._nativeDynamicsCompressorNode=u,this._ratio=t(this,d,u.ratio),this._release=t(this,d,u.release),this._threshold=t(this,d,u.threshold),a(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(e){const t=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=e,e>2)throw this._nativeDynamicsCompressorNode.channelCount=t,i()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(e){const t=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=e,"max"===e)throw this._nativeDynamicsCompressorNode.channelCountMode=t,i()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return"number"==typeof this._nativeDynamicsCompressorNode.reduction.value?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}})(Rr,ei,Li,Oi,Pn,gr,br,oi),Bi=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a)=>{let l=n(s);const c=Je(l,a);if(!c){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=t(a,e)}return o.set(a,l),c?await e(a,s.gain,l.gain):await r(a,s.gain,l.gain),await i(s,a,l),l})(s,a)}}})(Jr,Tn,Et,Xr,dr),zi=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=i(e),l={...en,...s},c=r(a,l),u=o(a);super(e,!1,c,u?n():null),this._gain=t(this,u,c.gain,et,$e)}get gain(){return this._gain}})(Rr,ei,Bi,Tn,gr,br),Fi=((e,t,n,r)=>(i,o,{channelCount:s,channelCountMode:a,channelInterpretation:l,feedback:c,feedforward:u})=>{const d=yn(o,i.sampleRate),h=c instanceof Float64Array?c:new Float64Array(c),p=u instanceof Float64Array?u:new Float64Array(u),f=h.length,m=p.length,g=Math.min(f,m);if(0===f||f>20)throw r();if(0===h[0])throw t();if(0===m||m>20)throw r();if(0===p[0])throw t();if(1!==h[0]){for(let e=0;e<m;e+=1)p[e]/=h[0];for(let e=1;e<f;e+=1)h[e]/=h[0]}const v=n(i,d,s,s);v.channelCount=s,v.channelCountMode=a,v.channelInterpretation=l;const y=[],b=[],x=[];for(let e=0;e<s;e+=1){y.push(0);const e=new Float32Array(32),t=new Float32Array(32);e.fill(0),t.fill(0),b.push(e),x.push(t)}v.onaudioprocess=e=>{const t=e.inputBuffer,n=e.outputBuffer,r=t.numberOfChannels;for(let e=0;e<r;e+=1){const r=t.getChannelData(e),i=n.getChannelData(e);y[e]=sn(h,f,p,m,g,b[e],x[e],y[e],32,r,i)}};const S=i.sampleRate/2;return An({get bufferSize(){return d},get channelCount(){return v.channelCount},set channelCount(e){v.channelCount=e},get channelCountMode(){return v.channelCountMode},set channelCountMode(e){v.channelCountMode=e},get channelInterpretation(){return v.channelInterpretation},set channelInterpretation(e){v.channelInterpretation=e},get context(){return v.context},get inputs(){return[v]},get numberOfInputs(){return v.numberOfInputs},get numberOfOutputs(){return v.numberOfOutputs},addEventListener:(...e)=>v.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>v.dispatchEvent(e[0]),getFrequencyResponse(t,n,r){if(t.length!==n.length||n.length!==r.length)throw e();const i=t.length;for(let e=0;e<i;e+=1){const i=-Math.PI*(t[e]/S),o=[Math.cos(i),Math.sin(i)],s=Mn(In(p,o),In(h,o));n[e]=Math.sqrt(s[0]*s[0]+s[1]*s[1]),r[e]=Math.atan2(s[1],s[0])}},removeEventListener:(...e)=>v.removeEventListener(e[0],e[1],e[2])},v)})(nn,tn,Rn,Pn),Ui=((e,t,n,r)=>i=>e(ln,(()=>ln(i)))?Promise.resolve(e(r,r)).then((e=>{if(!e){const e=n(i,512,0,1);i.oncomplete=()=>{e.onaudioprocess=null,e.disconnect()},e.onaudioprocess=()=>i.currentTime,e.connect(i.destination)}return i.startRendering()})):new Promise((e=>{const n=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i.oncomplete=t=>{n.disconnect(),e(t.renderedBuffer)},n.connect(i.destination),i.startRendering()})))(nr,Tn,Rn,((e,t)=>()=>{if(null===t)return Promise.resolve(!1);const n=new t(1,1,44100),r=e(n,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise((e=>{n.oncomplete=()=>{r.disconnect(),e(0!==n.currentTime)},n.startRendering()}))})(Tn,yr)),ji=((e,t,n,r,i)=>(o,s)=>{const a=new WeakMap;let l=null;const c=async(c,u)=>{let d=null,h=t(c);const p=Je(h,u);if(void 0===u.createIIRFilter?d=e(u,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):p||(h=u.createIIRFilter(s,o)),a.set(u,null===d?h:d),null!==d){if(null===l){if(null===n)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new n(c.context.destination.channelCount,c.context.length,u.sampleRate);l=(async()=>{await r(c,e,e.destination);return((e,t,n,r)=>{const i=n instanceof Float64Array?n:new Float64Array(n),o=r instanceof Float64Array?r:new Float64Array(r),s=i.length,a=o.length,l=Math.min(s,a);if(1!==i[0]){for(let e=0;e<s;e+=1)o[e]/=i[0];for(let e=1;e<a;e+=1)i[e]/=i[0]}const c=new Float32Array(32),u=new Float32Array(32),d=t.createBuffer(e.numberOfChannels,e.length,e.sampleRate),h=e.numberOfChannels;for(let t=0;t<h;t+=1){const n=e.getChannelData(t),r=d.getChannelData(t);c.fill(0),u.fill(0),sn(i,s,o,a,l,c,u,0,32,n,r)}return d})(await i(e),u,o,s)})()}const e=await l;return d.buffer=e,d.start(0),d}return await r(c,u,h),h};return{render(e,t){const n=a.get(t);return void 0!==n?Promise.resolve(n):c(e,t)}}})(Yr,Et,yr,dr,Ui),Hi=(Vi=Fi,(e,t,n)=>{if(void 0===e.createIIRFilter)return Vi(e,t,n);const r=e.createIIRFilter(n.feedforward,n.feedback);return dn(r,n),r});var Vi;const Gi=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=r(e),l=i(a),c={...on,...s},u=t(a,l?null:e.baseLatency,c);super(e,!1,u,l?n(c.feedback,c.feedforward):null),rn(u),this._nativeIIRFilterNode=u,o(this,1)}getFrequencyResponse(e,t,n){return this._nativeIIRFilterNode.getFrequencyResponse(e,t,n)}})(Rr,Hi,ji,gr,br,oi),Wi=((e,t,n,r,i,o,s,a)=>(l,c)=>{const u=c.listener,{forwardX:d,forwardY:h,forwardZ:p,positionX:f,positionY:m,positionZ:g,upX:v,upY:y,upZ:b}=void 0===u.forwardX?(()=>{const d=new Float32Array(1),h=t(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),p=s(c);let f=!1,m=[0,0,-1,0,1,0],g=[0,0,0];const v=()=>{if(f)return;f=!0;const e=r(c,256,9,0);e.onaudioprocess=({inputBuffer:e})=>{const t=[o(e,d,0),o(e,d,1),o(e,d,2),o(e,d,3),o(e,d,4),o(e,d,5)];t.some(((e,t)=>e!==m[t]))&&(u.setOrientation(...t),m=t);const n=[o(e,d,6),o(e,d,7),o(e,d,8)];n.some(((e,t)=>e!==g[t]))&&(u.setPosition(...n),g=n)},h.connect(e)},y=e=>t=>{t!==m[e]&&(m[e]=t,u.setOrientation(...m))},b=e=>t=>{t!==g[e]&&(g[e]=t,u.setPosition(...g))},x=(t,r,o)=>{const s=n(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:r});s.connect(h,0,t),s.start(),Object.defineProperty(s.offset,"defaultValue",{get:()=>r});const u=e({context:l},p,s.offset,et,$e);var d,f,m,g,y,b,x;return a(u,"value",(e=>()=>e.call(u)),(e=>t=>{try{e.call(u,t)}catch(e){if(9!==e.code)throw e}v(),p&&o(t)})),u.cancelAndHoldAtTime=(d=u.cancelAndHoldAtTime,p?()=>{throw i()}:(...e)=>{const t=d.apply(u,e);return v(),t}),u.cancelScheduledValues=(f=u.cancelScheduledValues,p?()=>{throw i()}:(...e)=>{const t=f.apply(u,e);return v(),t}),u.exponentialRampToValueAtTime=(m=u.exponentialRampToValueAtTime,p?()=>{throw i()}:(...e)=>{const t=m.apply(u,e);return v(),t}),u.linearRampToValueAtTime=(g=u.linearRampToValueAtTime,p?()=>{throw i()}:(...e)=>{const t=g.apply(u,e);return v(),t}),u.setTargetAtTime=(y=u.setTargetAtTime,p?()=>{throw i()}:(...e)=>{const t=y.apply(u,e);return v(),t}),u.setValueAtTime=(b=u.setValueAtTime,p?()=>{throw i()}:(...e)=>{const t=b.apply(u,e);return v(),t}),u.setValueCurveAtTime=(x=u.setValueCurveAtTime,p?()=>{throw i()}:(...e)=>{const t=x.apply(u,e);return v(),t}),u};return{forwardX:x(0,0,y(0)),forwardY:x(1,0,y(1)),forwardZ:x(2,-1,y(2)),positionX:x(6,0,b(0)),positionY:x(7,0,b(1)),positionZ:x(8,0,b(2)),upX:x(3,0,y(3)),upY:x(4,1,y(4)),upZ:x(5,0,y(5))}})():u;return{get forwardX(){return d},get forwardY(){return h},get forwardZ(){return p},get positionX(){return f},get positionY(){return m},get positionZ(){return g},get upX(){return v},get upY(){return y},get upZ(){return b}}})(ei,bi,Ai,Rn,Pn,Fn,br,jn),qi=new WeakMap,Ki=((e,t,n,r,i,o)=>class extends n{constructor(n,o){super(n),this._nativeContext=n,Me.set(this,n),r(n)&&i.set(n,new Set),this._destination=new e(this,o),this._listener=t(this,n),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(e){const t="function"==typeof e?o(this,e):null;this._nativeContext.onstatechange=t;const n=this._nativeContext.onstatechange;this._onstatechange=null!==n&&n===t?e:n}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}})(ri,Wi,wr,br,qi,Kn),Ji=((e,t,n,r,i,o)=>(s,a)=>{const l=s.createOscillator();return dn(l,a),pn(l,a,"detune"),pn(l,a,"frequency"),void 0!==a.periodicWave?l.setPeriodicWave(a.periodicWave):un(l,a,"type"),t(n,(()=>n(s)))||mn(l),t(r,(()=>r(s)))||o(l,s),t(i,(()=>i(s)))||gn(l),e(s,l),l})(Hr,nr,Vn,Gn,Wn,qn),Qi=((e,t,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null,l=null;return{set periodicWave(e){s=e},set start(e){a=e},set stop(e){l=e},render(c,u){const d=o.get(u);return void 0!==d?Promise.resolve(d):(async(c,u)=>{let d=n(c);const h=Je(d,u);if(!h){const e={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:null===s?void 0:s,type:d.type};d=t(u,e),null!==a&&d.start(a),null!==l&&d.stop(l)}return o.set(u,d),h?(await e(u,c.detune,d.detune),await e(u,c.frequency,d.frequency)):(await r(u,c.detune,d.detune),await r(u,c.frequency,d.frequency)),await i(c,u,d),d})(c,u)}}})(Jr,Ji,Et,Xr,dr),Yi=((e,t,n,r,i,o,s)=>class extends e{constructor(e,s){const a=i(e),l={...On,...s},c=n(a,l),u=o(a),d=u?r():null,h=e.sampleRate/2;super(e,!1,c,d),this._detune=t(this,u,c.detune,153600,-153600),this._frequency=t(this,u,c.frequency,h,-h),this._nativeOscillatorNode=c,this._onended=null,this._oscillatorNodeRenderer=d,null!==this._oscillatorNodeRenderer&&void 0!==l.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=l.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(e){const t="function"==typeof e?s(this,e):null;this._nativeOscillatorNode.onended=t;const n=this._nativeOscillatorNode.onended;this._onended=null!==n&&n===t?e:n}get type(){return this._nativeOscillatorNode.type}set type(e){this._nativeOscillatorNode.type=e,null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(e){this._nativeOscillatorNode.setPeriodicWave(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=e)}start(e=0){if(this._nativeOscillatorNode.start(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.start=e),"closed"!==this.context.state){Ve(this);const e=()=>{this._nativeOscillatorNode.removeEventListener("ended",e),tt(this)&&We(this)};this._nativeOscillatorNode.addEventListener("ended",e)}}stop(e=0){this._nativeOscillatorNode.stop(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=e)}})(Rr,ei,Ji,Qi,gr,br,Kn),Zi=(Xi=Yr,(e,t)=>{const n=Xi(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=e.createBuffer(1,2,44100);return n.buffer=r,n.loop=!0,n.connect(t),n.start(),()=>{n.stop(),n.disconnect(t)}});var Xi;const $i=((e,t,n,r,i)=>(o,{curve:s,oversample:a,...l})=>{const c=o.createWaveShaper(),u=o.createWaveShaper();dn(c,l),dn(u,l);const d=n(o,{...l,gain:1}),h=n(o,{...l,gain:-1}),p=n(o,{...l,gain:1}),f=n(o,{...l,gain:-1});let m=null,g=!1,v=null;const y={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(e){d.channelCount=e,h.channelCount=e,c.channelCount=e,p.channelCount=e,u.channelCount=e,f.channelCount=e},get channelCountMode(){return c.channelCountMode},set channelCountMode(e){d.channelCountMode=e,h.channelCountMode=e,c.channelCountMode=e,p.channelCountMode=e,u.channelCountMode=e,f.channelCountMode=e},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(e){d.channelInterpretation=e,h.channelInterpretation=e,c.channelInterpretation=e,p.channelInterpretation=e,u.channelInterpretation=e,f.channelInterpretation=e},get context(){return c.context},get curve(){return v},set curve(n){if(null!==n&&n.length<2)throw t();if(null===n)c.curve=n,u.curve=n;else{const e=n.length,t=new Float32Array(e+2-e%2),r=new Float32Array(e+2-e%2);t[0]=n[0],r[0]=-n[e-1];const i=Math.ceil((e+1)/2),o=(e+1)/2-1;for(let s=1;s<i;s+=1){const a=s/i*o,l=Math.floor(a),c=Math.ceil(a);t[s]=l===c?n[l]:(1-(a-l))*n[l]+(1-(c-a))*n[c],r[s]=l===c?-n[e-1-l]:-(1-(a-l))*n[e-1-l]-(1-(c-a))*n[e-1-c]}t[i]=e%2==1?n[i-1]:(n[i-2]+n[i-1])/2,c.curve=t,u.curve=r}v=n,g&&(r(v)&&null===m?m=e(o,d):null!==m&&(m(),m=null))},get inputs(){return[d]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get oversample(){return c.oversample},set oversample(e){c.oversample=e,u.oversample=e},addEventListener:(...e)=>d.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>d.dispatchEvent(e[0]),removeEventListener:(...e)=>d.removeEventListener(e[0],e[1],e[2])};null!==s&&(y.curve=s instanceof Float32Array?s:new Float32Array(s)),a!==y.oversample&&(y.oversample=a);return i(An(y,p),(()=>{d.connect(c).connect(p),d.connect(h).connect(u).connect(f).connect(p),g=!0,r(v)&&(m=e(o,d))}),(()=>{d.disconnect(c),c.disconnect(p),d.disconnect(h),h.disconnect(u),u.disconnect(f),f.disconnect(p),g=!1,null!==m&&(m(),m=null)}))})(Zi,tn,Tn,Un,mi),eo=((e,t,n,r,i,o,s)=>(a,l)=>{const c=a.createWaveShaper();if(null!==o&&"webkitAudioContext"===o.name&&void 0===a.createGain().gain.automationRate)return n(a,l);dn(c,l);const u=null===l.curve||l.curve instanceof Float32Array?l.curve:new Float32Array(l.curve);if(null!==u&&u.length<2)throw t();un(c,{curve:u},"curve"),un(c,l,"oversample");let d=null,h=!1;s(c,"curve",(e=>()=>e.call(c)),(t=>n=>(t.call(c,n),h&&(r(n)&&null===d?d=e(a,c):r(n)||null===d||(d(),d=null)),n)));return i(c,(()=>{h=!0,r(c.curve)&&(d=e(a,c))}),(()=>{h=!1,null!==d&&(d(),d=null)}))})(Zi,tn,$i,Un,mi,Cr,jn),to=((e,t,n,r,i,o,s,a,l,c)=>(u,{coneInnerAngle:d,coneOuterAngle:h,coneOuterGain:p,distanceModel:f,maxDistance:m,orientationX:g,orientationY:v,orientationZ:y,panningModel:b,positionX:x,positionY:S,positionZ:w,refDistance:_,rolloffFactor:C,...A})=>{const E=u.createPanner();if(A.channelCount>2)throw s();if("max"===A.channelCountMode)throw s();dn(E,A);const T={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},M=n(u,{...T,channelInterpretation:"speakers",numberOfInputs:6}),I=r(u,{...A,gain:1}),R=r(u,{...T,gain:1}),P=r(u,{...T,gain:0}),k=r(u,{...T,gain:0}),O=r(u,{...T,gain:0}),N=r(u,{...T,gain:0}),L=r(u,{...T,gain:0}),D=i(u,256,6,1),B=o(u,{...T,curve:new Float32Array([1,1]),oversample:"none"});let z=[g,v,y],F=[x,S,w];const U=new Float32Array(1);D.onaudioprocess=({inputBuffer:e})=>{const t=[l(e,U,0),l(e,U,1),l(e,U,2)];t.some(((e,t)=>e!==z[t]))&&(E.setOrientation(...t),z=t);const n=[l(e,U,3),l(e,U,4),l(e,U,5)];n.some(((e,t)=>e!==F[t]))&&(E.setPosition(...n),F=n)},Object.defineProperty(P.gain,"defaultValue",{get:()=>0}),Object.defineProperty(k.gain,"defaultValue",{get:()=>0}),Object.defineProperty(O.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0}),Object.defineProperty(L.gain,"defaultValue",{get:()=>0});const j={get bufferSize(){},get channelCount(){return E.channelCount},set channelCount(e){if(e>2)throw s();I.channelCount=e,E.channelCount=e},get channelCountMode(){return E.channelCountMode},set channelCountMode(e){if("max"===e)throw s();I.channelCountMode=e,E.channelCountMode=e},get channelInterpretation(){return E.channelInterpretation},set channelInterpretation(e){I.channelInterpretation=e,E.channelInterpretation=e},get coneInnerAngle(){return E.coneInnerAngle},set coneInnerAngle(e){E.coneInnerAngle=e},get coneOuterAngle(){return E.coneOuterAngle},set coneOuterAngle(e){E.coneOuterAngle=e},get coneOuterGain(){return E.coneOuterGain},set coneOuterGain(e){if(e<0||e>1)throw t();E.coneOuterGain=e},get context(){return E.context},get distanceModel(){return E.distanceModel},set distanceModel(e){E.distanceModel=e},get inputs(){return[I]},get maxDistance(){return E.maxDistance},set maxDistance(e){if(e<0)throw new RangeError;E.maxDistance=e},get numberOfInputs(){return E.numberOfInputs},get numberOfOutputs(){return E.numberOfOutputs},get orientationX(){return R.gain},get orientationY(){return P.gain},get orientationZ(){return k.gain},get panningModel(){return E.panningModel},set panningModel(e){E.panningModel=e},get positionX(){return O.gain},get positionY(){return N.gain},get positionZ(){return L.gain},get refDistance(){return E.refDistance},set refDistance(e){if(e<0)throw new RangeError;E.refDistance=e},get rolloffFactor(){return E.rolloffFactor},set rolloffFactor(e){if(e<0)throw new RangeError;E.rolloffFactor=e},addEventListener:(...e)=>I.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>I.dispatchEvent(e[0]),removeEventListener:(...e)=>I.removeEventListener(e[0],e[1],e[2])};d!==j.coneInnerAngle&&(j.coneInnerAngle=d),h!==j.coneOuterAngle&&(j.coneOuterAngle=h),p!==j.coneOuterGain&&(j.coneOuterGain=p),f!==j.distanceModel&&(j.distanceModel=f),m!==j.maxDistance&&(j.maxDistance=m),g!==j.orientationX.value&&(j.orientationX.value=g),v!==j.orientationY.value&&(j.orientationY.value=v),y!==j.orientationZ.value&&(j.orientationZ.value=y),b!==j.panningModel&&(j.panningModel=b),x!==j.positionX.value&&(j.positionX.value=x),S!==j.positionY.value&&(j.positionY.value=S),w!==j.positionZ.value&&(j.positionZ.value=w),_!==j.refDistance&&(j.refDistance=_),C!==j.rolloffFactor&&(j.rolloffFactor=C),1===z[0]&&0===z[1]&&0===z[2]||E.setOrientation(...z),0===F[0]&&0===F[1]&&0===F[2]||E.setPosition(...F);return c(An(j,E),(()=>{I.connect(E),e(I,B,0,0),B.connect(R).connect(M,0,0),B.connect(P).connect(M,0,1),B.connect(k).connect(M,0,2),B.connect(O).connect(M,0,3),B.connect(N).connect(M,0,4),B.connect(L).connect(M,0,5),M.connect(D).connect(u.destination)}),(()=>{I.disconnect(E),a(I,B,0,0),B.disconnect(R),R.disconnect(M),B.disconnect(P),P.disconnect(M),B.disconnect(k),k.disconnect(M),B.disconnect(O),O.disconnect(M),B.disconnect(N),N.disconnect(M),B.disconnect(L),L.disconnect(M),M.disconnect(D),D.disconnect(u.destination)}))})(xt,tn,bi,Tn,Rn,eo,Pn,At,Fn,mi),no=(ro=to,(e,t)=>{const n=e.createPanner();return void 0===n.orientationX?ro(e,t):(dn(n,t),pn(n,t,"orientationX"),pn(n,t,"orientationY"),pn(n,t,"orientationZ"),pn(n,t,"positionX"),pn(n,t,"positionY"),pn(n,t,"positionZ"),un(n,t,"coneInnerAngle"),un(n,t,"coneOuterAngle"),un(n,t,"coneOuterGain"),un(n,t,"distanceModel"),un(n,t,"maxDistance"),un(n,t,"panningModel"),un(n,t,"refDistance"),un(n,t,"rolloffFactor"),n)});var ro;const io=((e,t,n,r,i,o,s,a,l,c)=>()=>{const u=new WeakMap;let d=null;return{render(h,p){const f=u.get(p);return void 0!==f?Promise.resolve(f):(async(h,p)=>{let f=null,m=o(h);const g={channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation},v={...g,coneInnerAngle:m.coneInnerAngle,coneOuterAngle:m.coneOuterAngle,coneOuterGain:m.coneOuterGain,distanceModel:m.distanceModel,maxDistance:m.maxDistance,panningModel:m.panningModel,refDistance:m.refDistance,rolloffFactor:m.rolloffFactor},y=Je(m,p);if("bufferSize"in m)f=r(p,{...g,gain:1});else if(!y){const e={...v,orientationX:m.orientationX.value,orientationY:m.orientationY.value,orientationZ:m.orientationZ.value,positionX:m.positionX.value,positionY:m.positionY.value,positionZ:m.positionZ.value};m=i(p,e)}if(u.set(p,null===f?m:f),null!==f){if(null===d){if(null===s)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new s(6,h.context.length,p.sampleRate),r=t(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});r.connect(e.destination),d=(async()=>{const t=await Promise.all([h.orientationX,h.orientationY,h.orientationZ,h.positionX,h.positionY,h.positionZ].map((async(t,r)=>{const i=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:0===r?1:0});return await a(e,t,i.offset),i})));for(let e=0;e<6;e+=1)t[e].connect(r,0,e),t[e].start(0);return c(e)})()}const e=await d,o=r(p,{...g,gain:1});await l(h,p,o);const u=[];for(let t=0;t<e.numberOfChannels;t+=1)u.push(e.getChannelData(t));let m=[u[0][0],u[1][0],u[2][0]],y=[u[3][0],u[4][0],u[5][0]],b=r(p,{...g,gain:1}),x=i(p,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]});o.connect(b).connect(x.inputs[0]),x.connect(f);for(let t=128;t<e.length;t+=128){const e=[u[0][t],u[1][t],u[2][t]],n=[u[3][t],u[4][t],u[5][t]];if(e.some(((e,t)=>e!==m[t]))||n.some(((e,t)=>e!==y[t]))){m=e,y=n;const s=t/p.sampleRate;b.gain.setValueAtTime(0,s),b=r(p,{...g,gain:0}),x=i(p,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]}),b.gain.setValueAtTime(1,s),o.connect(b).connect(x.inputs[0]),x.connect(f)}}return f}return y?(await e(p,h.orientationX,m.orientationX),await e(p,h.orientationY,m.orientationY),await e(p,h.orientationZ,m.orientationZ),await e(p,h.positionX,m.positionX),await e(p,h.positionY,m.positionY),await e(p,h.positionZ,m.positionZ)):(await a(p,h.orientationX,m.orientationX),await a(p,h.orientationY,m.orientationY),await a(p,h.orientationZ,m.orientationZ),await a(p,h.positionX,m.positionX),await a(p,h.positionY,m.positionY),await a(p,h.positionZ,m.positionZ)),bt(m)?await l(h,p,m.inputs[0]):await l(h,p,m),m})(h,p)}}})(Jr,bi,Ai,Tn,no,Et,yr,Xr,dr,Ui),oo=((e,t,n,r,i,o,s)=>class extends e{constructor(e,a){const l=i(e),c={...Nn,...a},u=n(l,c),d=o(l);super(e,!1,u,d?r():null),this._nativePannerNode=u,this._orientationX=t(this,d,u.orientationX,et,$e),this._orientationY=t(this,d,u.orientationY,et,$e),this._orientationZ=t(this,d,u.orientationZ,et,$e),this._positionX=t(this,d,u.positionX,et,$e),this._positionY=t(this,d,u.positionY,et,$e),this._positionZ=t(this,d,u.positionZ,et,$e),s(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(e){this._nativePannerNode.coneInnerAngle=e}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(e){this._nativePannerNode.coneOuterAngle=e}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(e){this._nativePannerNode.coneOuterGain=e}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(e){this._nativePannerNode.distanceModel=e}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(e){this._nativePannerNode.maxDistance=e}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(e){this._nativePannerNode.panningModel=e}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(e){this._nativePannerNode.refDistance=e}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(e){this._nativePannerNode.rolloffFactor=e}})(Rr,ei,no,io,gr,br,oi),so=(e=>(t,{disableNormalization:n,imag:r,real:i})=>{const o=r instanceof Float32Array?r:new Float32Array(r),s=i instanceof Float32Array?i:new Float32Array(i),a=t.createPeriodicWave(s,o,{disableNormalization:n});if(Array.from(r).length<2)throw e();return a})(Ye),ao=((e,t,n,r)=>class i{constructor(i,o){const s=t(i),a=r({...Ln,...o}),l=e(s,a);return n.add(l),l}static[Symbol.hasInstance](e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===i.prototype||n.has(e)}})(so,gr,new WeakSet,(e=>{const{imag:t,real:n}=e;return void 0===t?void 0===n?{...e,imag:[0,0],real:[0,0]}:{...e,imag:Array.from(n,(()=>0)),real:n}:void 0===n?{...e,imag:t,real:Array.from(t,(()=>0))}:{...e,imag:t,real:n}})),lo=((e,t,n,r,i,o)=>{const s=16385,a=new Float32Array([1,1]),l=Math.PI/2,c={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...c,oversample:"none"},d=(e,o,d,h,p)=>{if(1===o)return((e,t,i,o)=>{const d=new Float32Array(s),h=new Float32Array(s);for(let e=0;e<s;e+=1){const t=e/16384*l;d[e]=Math.cos(t),h[e]=Math.sin(t)}const p=n(e,{...c,gain:0}),f=r(e,{...u,curve:d}),m=r(e,{...u,curve:a}),g=n(e,{...c,gain:0}),v=r(e,{...u,curve:h});return{connectGraph(){t.connect(p),t.connect(void 0===m.inputs?m:m.inputs[0]),t.connect(g),m.connect(i),i.connect(void 0===f.inputs?f:f.inputs[0]),i.connect(void 0===v.inputs?v:v.inputs[0]),f.connect(p.gain),v.connect(g.gain),p.connect(o,0,0),g.connect(o,0,1)},disconnectGraph(){t.disconnect(p),t.disconnect(void 0===m.inputs?m:m.inputs[0]),t.disconnect(g),m.disconnect(i),i.disconnect(void 0===f.inputs?f:f.inputs[0]),i.disconnect(void 0===v.inputs?v:v.inputs[0]),f.disconnect(p.gain),v.disconnect(g.gain),p.disconnect(o,0,0),g.disconnect(o,0,1)}}})(e,d,h,p);if(2===o)return((e,i,o,d)=>{const h=new Float32Array(s),p=new Float32Array(s),f=new Float32Array(s),m=new Float32Array(s),g=Math.floor(8192.5);for(let e=0;e<s;e+=1)if(e>g){const t=(e-g)/(16384-g)*l;h[e]=Math.cos(t),p[e]=Math.sin(t),f[e]=0,m[e]=1}else{const t=e/(16384-g)*l;h[e]=1,p[e]=0,f[e]=Math.cos(t),m[e]=Math.sin(t)}const v=t(e,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),y=n(e,{...c,gain:0}),b=r(e,{...u,curve:h}),x=n(e,{...c,gain:0}),S=r(e,{...u,curve:p}),w=r(e,{...u,curve:a}),_=n(e,{...c,gain:0}),C=r(e,{...u,curve:f}),A=n(e,{...c,gain:0}),E=r(e,{...u,curve:m});return{connectGraph(){i.connect(v),i.connect(void 0===w.inputs?w:w.inputs[0]),v.connect(y,0),v.connect(x,0),v.connect(_,1),v.connect(A,1),w.connect(o),o.connect(void 0===b.inputs?b:b.inputs[0]),o.connect(void 0===S.inputs?S:S.inputs[0]),o.connect(void 0===C.inputs?C:C.inputs[0]),o.connect(void 0===E.inputs?E:E.inputs[0]),b.connect(y.gain),S.connect(x.gain),C.connect(_.gain),E.connect(A.gain),y.connect(d,0,0),_.connect(d,0,0),x.connect(d,0,1),A.connect(d,0,1)},disconnectGraph(){i.disconnect(v),i.disconnect(void 0===w.inputs?w:w.inputs[0]),v.disconnect(y,0),v.disconnect(x,0),v.disconnect(_,1),v.disconnect(A,1),w.disconnect(o),o.disconnect(void 0===b.inputs?b:b.inputs[0]),o.disconnect(void 0===S.inputs?S:S.inputs[0]),o.disconnect(void 0===C.inputs?C:C.inputs[0]),o.disconnect(void 0===E.inputs?E:E.inputs[0]),b.disconnect(y.gain),S.disconnect(x.gain),C.disconnect(_.gain),E.disconnect(A.gain),y.disconnect(d,0,0),_.disconnect(d,0,0),x.disconnect(d,0,1),A.disconnect(d,0,1)}}})(e,d,h,p);throw i()};return(t,{channelCount:r,channelCountMode:s,pan:a,...l})=>{if("max"===s)throw i();const c=e(t,{...l,channelCount:1,channelCountMode:s,numberOfInputs:2}),u=n(t,{...l,channelCount:r,channelCountMode:s,gain:1}),h=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:a});let{connectGraph:p,disconnectGraph:f}=d(t,r,u,h,c);Object.defineProperty(h.gain,"defaultValue",{get:()=>0}),Object.defineProperty(h.gain,"maxValue",{get:()=>1}),Object.defineProperty(h.gain,"minValue",{get:()=>-1});const m={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(e){u.channelCount!==e&&(g&&f(),({connectGraph:p,disconnectGraph:f}=d(t,e,u,h,c)),g&&p()),u.channelCount=e},get channelCountMode(){return u.channelCountMode},set channelCountMode(e){if("clamped-max"===e||"max"===e)throw i();u.channelCountMode=e},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(e){u.channelInterpretation=e},get context(){return u.context},get inputs(){return[u]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get pan(){return h.gain},addEventListener:(...e)=>u.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>u.dispatchEvent(e[0]),removeEventListener:(...e)=>u.removeEventListener(e[0],e[1],e[2])};let g=!1;return o(An(m,c),(()=>{p(),g=!0}),(()=>{f(),g=!1}))}})(bi,Cn,Tn,eo,Pn,mi),co=((e,t)=>(n,r)=>{const i=r.channelCountMode;if("clamped-max"===i)throw t();if(void 0===n.createStereoPanner)return e(n,r);const o=n.createStereoPanner();return dn(o,r),pn(o,r,"pan"),Object.defineProperty(o,"channelCountMode",{get:()=>i,set:e=>{if(e!==i)throw t()}}),o})(lo,Pn),uo=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a)=>{let l=n(s);const c=Je(l,a);if(!c){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=t(a,e)}return o.set(a,l),c?await e(a,s.pan,l.pan):await r(a,s.pan,l.pan),bt(l)?await i(s,a,l.inputs[0]):await i(s,a,l),l})(s,a)}}})(Jr,co,Et,Xr,dr),ho=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=i(e),l={...Dn,...s},c=n(a,l),u=o(a);super(e,!1,c,u?r():null),this._pan=t(this,u,c.pan)}get pan(){return this._pan}})(Rr,ei,co,uo,gr,br),po=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const s=r.get(o);return void 0!==s?Promise.resolve(s):(async(i,o)=>{let s=t(i);if(!Je(s,o)){const t={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,curve:s.curve,oversample:s.oversample};s=e(o,t)}return r.set(o,s),bt(s)?await n(i,o,s.inputs[0]):await n(i,o,s),s})(i,o)}}})(eo,Et,dr),fo=((e,t,n,r,i,o,s)=>class extends e{constructor(e,t){const a=i(e),l={...zn,...t},c=n(a,l);super(e,!0,c,o(a)?r():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=c,s(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(e){if(null===e)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(e.length<2)throw t();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=e}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(e){this._nativeWaveShaperNode.oversample=e}})(Rr,tn,eo,po,gr,br,oi),mo=(e=>null!==e&&e.isSecureContext)(or),go=(e=>(t,n,r)=>{Object.defineProperties(e,{currentFrame:{configurable:!0,get:()=>Math.round(t*n)},currentTime:{configurable:!0,get:()=>t}});try{return r()}finally{null!==e&&(delete e.currentFrame,delete e.currentTime)}})(or),vo=new WeakMap,yo=((e,t)=>n=>{let r=e.get(n);if(void 0!==r)return r;if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");return r=new t(1,1,44100),e.set(n,r),r})(vo,yr),bo=mo?((e,t,n,r,i,o,s,a,l,c,u,d,h)=>{let p=0;return(f,m,g={credentials:"omit"})=>{const v=u.get(f);if(void 0!==v&&v.has(m))return Promise.resolve();const y=c.get(f);if(void 0!==y){const e=y.get(m);if(void 0!==e)return e}const b=o(f),x=void 0===b.audioWorklet?i(m).then((([e,t])=>{const[r,i]=De(e,t);return n(`${r};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${i}\n})})(window,'_AWGS')`)})).then((()=>{const e=h._AWGS.pop();if(void 0===e)throw new SyntaxError;r(b.currentTime,b.sampleRate,(()=>e(class{},void 0,((e,n)=>{if(""===e.trim())throw t();const r=Pe.get(b);if(void 0!==r){if(r.has(e))throw t();ze(n),Be(n.parameterDescriptors),r.set(e,n)}else ze(n),Be(n.parameterDescriptors),Pe.set(b,new Map([[e,n]]))}),b.sampleRate,void 0,void 0)))})):Promise.all([i(m),Promise.resolve(e(d,d))]).then((([[e,t],n])=>{const r=p+1;p=r;const[i,o]=De(e,t),c=new Blob([`${i};((AudioWorkletProcessor,registerProcessor)=>{${o}\n})(${n?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${n?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${n?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${r}',class extends AudioWorkletProcessor{process(){return !1}})`],{type:"application/javascript; charset=utf-8"}),u=URL.createObjectURL(c);return b.audioWorklet.addModule(u,g).then((()=>{if(a(b))return b;const e=s(b);return e.audioWorklet.addModule(u,g).then((()=>e))})).then((e=>{if(null===l)throw new SyntaxError;try{new l(e,`__sac${r}`)}catch{throw new SyntaxError}})).finally((()=>URL.revokeObjectURL(u)))}));return void 0===y?c.set(f,new Map([[m,x]])):y.set(m,x),x.then((()=>{const e=u.get(f);void 0===e?u.set(f,new Set([m])):e.add(m)})).finally((()=>{const e=c.get(f);void 0!==e&&e.delete(m)})),x}})(nr,Pn,(e=>t=>new Promise(((n,r)=>{if(null===e)return void r(new SyntaxError);const i=e.document.head;if(null===i)r(new SyntaxError);else{const o=e.document.createElement("script"),s=new Blob([t],{type:"application/javascript"}),a=URL.createObjectURL(s),l=e.onerror,c=()=>{e.onerror=l,URL.revokeObjectURL(a)};e.onerror=(t,n,i,o,s)=>n===a||n===e.location.href&&1===i&&1===o?(c(),r(s),!1):null!==l?l(t,n,i,o,s):void 0,o.onerror=()=>{c(),r(new SyntaxError)},o.onload=()=>{c(),n()},o.src=a,o.type="module",i.appendChild(o)}})))(or),go,(xo=()=>new DOMException("","AbortError"),async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw xo()}),gr,yo,br,Ir,new WeakMap,new WeakMap,((e,t)=>async()=>{if(null===e)return!0;if(null===t)return!1;const n=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),r=new t(1,128,44100),i=URL.createObjectURL(n);let o=!1,s=!1;try{await r.audioWorklet.addModule(i);const t=new e(r,"a",{numberOfOutputs:0}),n=r.createOscillator();t.port.onmessage=()=>o=!0,t.onprocessorerror=()=>s=!0,n.connect(t),n.start(0),await r.startRendering()}catch{}finally{URL.revokeObjectURL(i)}return o&&!s})(Ir,yr),or):void 0;var xo;const So=((e,t)=>n=>e(n)||t(n))(Ar,br),wo=((e,t,n,r,i,o,s,a,l,c,u)=>(d,h)=>{const p=s(d)?d:o(d);if(i.has(h)){const e=n();return Promise.reject(e)}try{i.add(h)}catch{}return t(l,(()=>l(p)))?p.decodeAudioData(h).then((n=>(Qt(h).catch((()=>{})),t(a,(()=>a(n)))||u(n),e.add(n),n))):new Promise(((t,n)=>{const i=async()=>{try{await Qt(h)}catch{}},o=e=>{n(e),i()};try{p.decodeAudioData(h,(n=>{"function"!=typeof n.copyFromChannel&&(c(n),Ze(n)),e.add(n),i().then((()=>t(n)))}),(e=>{o(null===e?r():e)}))}catch(e){o(e)}}))})(Or,nr,(()=>new DOMException("","DataCloneError")),(()=>new DOMException("","EncodingError")),new WeakSet,gr,So,Qe,ln,Br,zr),_o=(Co=bo,Ao=kr,Eo=Ur,To=ni,Mo=si,Io=Si,Ro=_i,Po=Ti,ko=Ri,Oo=wo,No=ki,Lo=Di,Do=zi,Bo=Gi,zo=Ki,Fo=Yi,Uo=oo,jo=ao,Ho=ho,Vo=fo,class extends zo{constructor(e,t){super(e,t),this._nativeContext=e,this._audioWorklet=void 0===Co?void 0:{addModule:(e,t)=>Co(this,e,t)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new Ao(this)}createBiquadFilter(){return new Mo(this)}createBuffer(e,t,n){return new Eo({length:t,numberOfChannels:e,sampleRate:n})}createBufferSource(){return new To(this)}createChannelMerger(e=6){return new Io(this,{numberOfInputs:e})}createChannelSplitter(e=6){return new Ro(this,{numberOfOutputs:e})}createConstantSource(){return new Po(this)}createConvolver(){return new ko(this)}createDelay(e=1){return new No(this,{maxDelayTime:e})}createDynamicsCompressor(){return new Lo(this)}createGain(){return new Do(this)}createIIRFilter(e,t){return new Bo(this,{feedback:t,feedforward:e})}createOscillator(){return new Fo(this)}createPanner(){return new Uo(this)}createPeriodicWave(e,t,n={disableNormalization:!1}){return new jo(this,{...n,imag:t,real:e})}createStereoPanner(){return new Ho(this)}createWaveShaper(){return new Vo(this)}decodeAudioData(e,t,n){return Oo(this._nativeContext,e).then((e=>("function"==typeof t&&t(e),e)),(e=>{throw"function"==typeof n&&n(e),e}))}});var Co,Ao,Eo,To,Mo,Io,Ro,Po,ko,Oo,No,Lo,Do,Bo,zo,Fo,Uo,jo,Ho,Vo;const Go=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e),s=t(o,i);if(r(o))throw TypeError();super(e,!0,s,null),this._nativeMediaElementAudioSourceNode=s}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}})(Rr,((e,t)=>e.createMediaElementSource(t.mediaElement)),gr,br),Wo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e);if(r(o))throw new TypeError;const s={...an,...i},a=t(o,s);super(e,!1,a,null),this._nativeMediaStreamAudioDestinationNode=a}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}})(Rr,((e,t)=>{const n=e.createMediaStreamDestination();return dn(n,t),1===n.numberOfOutputs&&Object.defineProperty(n,"numberOfOutputs",{get:()=>0}),n}),gr,br),qo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e),s=t(o,i);if(r(o))throw new TypeError;super(e,!0,s,null),this._nativeMediaStreamAudioSourceNode=s}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}})(Rr,((e,{mediaStream:t})=>{const n=t.getAudioTracks();n.sort(((e,t)=>e.id<t.id?-1:e.id>t.id?1:0));const r=n.slice(0,1),i=e.createMediaStreamSource(new MediaStream(r));return Object.defineProperty(i,"mediaStream",{value:t}),i}),gr,br),Ko=((e,t)=>(n,{mediaStreamTrack:r})=>{if("function"==typeof n.createMediaStreamTrackSource)return n.createMediaStreamTrackSource(r);const i=new MediaStream([r]),o=n.createMediaStreamSource(i);if("audio"!==r.kind)throw e();if(t(n))throw new TypeError;return o})(tn,br),Jo=((e,t,n)=>class extends e{constructor(e,r){const i=n(e);super(e,!0,t(i,r),null)}})(Rr,Ko,gr),Qo=((e,t,n,r,i,o,s,a,l)=>class extends e{constructor(e={}){if(null===l)throw new Error("Missing the native AudioContext constructor.");let t;try{t=new l(e)}catch(e){if(12===e.code&&"sampleRate is not in range"===e.message)throw n();throw e}if(null===t)throw r();if(!pt(e.latencyHint))throw new TypeError(`The provided value '${e.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(void 0!==e.sampleRate&&t.sampleRate!==e.sampleRate)throw n();super(t,2);const{latencyHint:i}=e,{sampleRate:o}=t;if(this._baseLatency="number"==typeof t.baseLatency?t.baseLatency:"balanced"===i?512/o:"interactive"===i||void 0===i?256/o:"playback"===i?1024/o:128*Math.max(2,Math.min(128,Math.round(i*o/128)))/o,this._nativeAudioContext=t,"webkitAudioContext"===l.name?(this._nativeGainNode=t.createGain(),this._nativeOscillatorNode=t.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(t.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,"running"===t.state){this._state="suspended";const e=()=>{"suspended"===this._state&&(this._state=null),t.removeEventListener("statechange",e)};t.addEventListener("statechange",e)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then((()=>{throw t()})):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close().then((()=>{null!==this._nativeGainNode&&null!==this._nativeOscillatorNode&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),ht(this)})))}createMediaElementSource(e){return new i(this,{mediaElement:e})}createMediaStreamDestination(){return new o(this)}createMediaStreamSource(e){return new s(this,{mediaStream:e})}createMediaStreamTrackSource(e){return new a(this,{mediaStreamTrack:e})}resume(){return"suspended"===this._state?new Promise(((e,t)=>{const n=()=>{this._nativeAudioContext.removeEventListener("statechange",n),"running"===this._nativeAudioContext.state?e():this.resume().then(e,t)};this._nativeAudioContext.addEventListener("statechange",n)})):this._nativeAudioContext.resume().catch((e=>{if(void 0===e||15===e.code)throw t();throw e}))}suspend(){return this._nativeAudioContext.suspend().catch((e=>{if(void 0===e)throw t();throw e}))}})(_o,tn,Pn,Bn,Go,Wo,qo,Jo,Cr),Yo=(Zo=qi,e=>{const t=Zo.get(e);if(void 0===t)throw new Error("The context has no set of AudioWorkletNodes.");return t});var Zo;const Xo=($o=Yo,(e,t)=>{$o(e).add(t)});var $o;const es=(e=>(t,n,r=0,i=0)=>{const o=t[r];if(void 0===o)throw e();return kt(n)?o.connect(n,0,i):o.connect(n,0)})(Ye),ts=(e=>(t,n)=>{e(t).delete(n)})(Yo),ns=(e=>(t,n,r,i=0)=>void 0===n?t.forEach((e=>e.disconnect())):"number"==typeof n?Xt(e,t,n).disconnect():kt(n)?void 0===r?t.forEach((e=>e.disconnect(n))):void 0===i?Xt(e,t,r).disconnect(n,0):Xt(e,t,r).disconnect(n,0,i):void 0===r?t.forEach((e=>e.disconnect(n))):Xt(e,t,r).disconnect(n,0))(Ye),rs=new WeakMap,is=(os=rs,ss=Fe,e=>ss(os,e));var os,ss;const as=((e,t,n,r,i,o,s,a,l,c,u,d,h)=>(p,f,m,g)=>{if(0===g.numberOfInputs&&0===g.numberOfOutputs)throw l();const v=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(v.some((e=>e<1)))throw l();if(v.length!==g.numberOfOutputs)throw t();if("explicit"!==g.channelCountMode)throw l();const y=g.channelCount*g.numberOfInputs,b=v.reduce(((e,t)=>e+t),0),x=void 0===m.parameterDescriptors?0:m.parameterDescriptors.length;if(y+x>6||b>6)throw l();const S=new MessageChannel,w=[],_=[];for(let e=0;e<g.numberOfInputs;e+=1)w.push(s(p,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1})),_.push(i(p,{channelCount:g.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:g.channelCount}));const C=[];if(void 0!==m.parameterDescriptors)for(const{defaultValue:e,maxValue:t,minValue:n,name:r}of m.parameterDescriptors){const i=o(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:void 0!==g.parameterData[r]?g.parameterData[r]:void 0===e?0:e});Object.defineProperties(i.offset,{defaultValue:{get:()=>void 0===e?0:e},maxValue:{get:()=>void 0===t?et:t},minValue:{get:()=>void 0===n?$e:n}}),C.push(i)}const A=r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,y+x)}),E=yn(f,p.sampleRate),T=a(p,E,y+x,Math.max(1,b)),M=i(p,{channelCount:Math.max(1,b),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,b)}),I=[];for(let e=0;e<g.numberOfOutputs;e+=1)I.push(r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:v[e]}));for(let e=0;e<g.numberOfInputs;e+=1){w[e].connect(_[e]);for(let t=0;t<g.channelCount;t+=1)_[e].connect(A,t,e*g.channelCount+t)}const R=new Bt(void 0===m.parameterDescriptors?[]:m.parameterDescriptors.map((({name:e},t)=>{const n=C[t];return n.connect(A,0,y+t),n.start(0),[e,n.offset]})));A.connect(T);let P=g.channelInterpretation,k=null;const O=0===g.numberOfOutputs?[T]:I,N={get bufferSize(){return E},get channelCount(){return g.channelCount},set channelCount(e){throw n()},get channelCountMode(){return g.channelCountMode},set channelCountMode(e){throw n()},get channelInterpretation(){return P},set channelInterpretation(e){for(const t of w)t.channelInterpretation=e;P=e},get context(){return T.context},get inputs(){return w},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return k},set onprocessorerror(e){"function"==typeof k&&N.removeEventListener("processorerror",k),k="function"==typeof e?e:null,"function"==typeof k&&N.addEventListener("processorerror",k)},get parameters(){return R},get port(){return S.port2},addEventListener:(...e)=>T.addEventListener(e[0],e[1],e[2]),connect:e.bind(null,O),disconnect:c.bind(null,O),dispatchEvent:(...e)=>T.dispatchEvent(e[0]),removeEventListener:(...e)=>T.removeEventListener(e[0],e[1],e[2])},L=new Map;var D,B;S.port1.addEventListener=(D=S.port1.addEventListener,(...e)=>{if("message"===e[0]){const t="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;if(null!==t){const n=L.get(e[1]);void 0!==n?e[1]=n:(e[1]=e=>{u(p.currentTime,p.sampleRate,(()=>t(e)))},L.set(t,e[1]))}}return D.call(S.port1,e[0],e[1],e[2])}),S.port1.removeEventListener=(B=S.port1.removeEventListener,(...e)=>{if("message"===e[0]){const t=L.get(e[1]);void 0!==t&&(L.delete(e[1]),e[1]=t)}return B.call(S.port1,e[0],e[1],e[2])});let z=null;Object.defineProperty(S.port1,"onmessage",{get:()=>z,set:e=>{"function"==typeof z&&S.port1.removeEventListener("message",z),z="function"==typeof e?e:null,"function"==typeof z&&(S.port1.addEventListener("message",z),S.port1.start())}}),m.prototype.port=S.port1;let F=null;Sn(p,N,m,g).then((e=>F=e));const U=jt(g.numberOfInputs,g.channelCount),j=jt(g.numberOfOutputs,v),H=void 0===m.parameterDescriptors?[]:m.parameterDescriptors.reduce(((e,{name:t})=>({...e,[t]:new Float32Array(128)})),{});let V=!0;const G=()=>{g.numberOfOutputs>0&&T.disconnect(M);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=I[e];for(let r=0;r<v[e];r+=1)M.disconnect(n,t+r,r);t+=v[e]}},W=new Map;T.onaudioprocess=({inputBuffer:e,outputBuffer:t})=>{if(null!==F){const n=d(N);for(let r=0;r<E;r+=128){for(let t=0;t<g.numberOfInputs;t+=1)for(let n=0;n<g.channelCount;n+=1)Ft(e,U[t],n,n,r);void 0!==m.parameterDescriptors&&m.parameterDescriptors.forEach((({name:t},n)=>{Ft(e,H,t,y+n,r)}));for(let e=0;e<g.numberOfInputs;e+=1)for(let t=0;t<v[e];t+=1)0===j[e][t].byteLength&&(j[e][t]=new Float32Array(128));try{const e=U.map(((e,t)=>{if(n[t].size>0)return W.set(t,E/128),e;const r=W.get(t);return void 0===r?[]:(e.every((e=>e.every((e=>0===e))))&&(1===r?W.delete(t):W.set(t,r-1)),e)})),i=u(p.currentTime+r/p.sampleRate,p.sampleRate,(()=>F.process(e,j,H)));V=i;for(let e=0,n=0;e<g.numberOfOutputs;e+=1){for(let i=0;i<v[e];i+=1)Ut(t,j[e],i,n+i,r);n+=v[e]}}catch(e){V=!1,N.dispatchEvent(new ErrorEvent("processorerror",{colno:e.colno,filename:e.filename,lineno:e.lineno,message:e.message}))}if(!V){for(let e=0;e<g.numberOfInputs;e+=1){w[e].disconnect(_[e]);for(let t=0;t<g.channelCount;t+=1)_[r].disconnect(A,t,e*g.channelCount+t)}if(void 0!==m.parameterDescriptors){const e=m.parameterDescriptors.length;for(let t=0;t<e;t+=1){const e=C[t];e.disconnect(A,0,y+t),e.stop()}}A.disconnect(T),T.onaudioprocess=null,q?G():Q();break}}}};let q=!1;const K=s(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0}),J=()=>T.connect(K).connect(p.destination),Q=()=>{T.disconnect(K),K.disconnect()};return J(),h(N,(()=>{if(V){Q(),g.numberOfOutputs>0&&T.connect(M);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=I[e];for(let r=0;r<v[e];r+=1)M.connect(n,t+r,r);t+=v[e]}}q=!0}),(()=>{V&&(J(),G()),q=!1}))})(es,Ye,tn,bi,Cn,Ai,Tn,Rn,Pn,ns,go,is,mi),ls=((e,t,n,r,i)=>(o,s,a,l,c,u)=>{if(null!==a)try{const t=new a(o,l,u),r=new Map;let s=null;if(Object.defineProperties(t,{channelCount:{get:()=>u.channelCount,set:()=>{throw e()}},channelCountMode:{get:()=>"explicit",set:()=>{throw e()}},onprocessorerror:{get:()=>s,set:e=>{"function"==typeof s&&t.removeEventListener("processorerror",s),s="function"==typeof e?e:null,"function"==typeof s&&t.addEventListener("processorerror",s)}}}),t.addEventListener=(h=t.addEventListener,(...e)=>{if("processorerror"===e[0]){const t="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;if(null!==t){const n=r.get(e[1]);void 0!==n?e[1]=n:(e[1]=n=>{"error"===n.type?(Object.defineProperties(n,{type:{value:"processorerror"}}),t(n)):t(new ErrorEvent(e[0],{...n}))},r.set(t,e[1]))}}return h.call(t,"error",e[1],e[2]),h.call(t,...e)}),t.removeEventListener=(d=t.removeEventListener,(...e)=>{if("processorerror"===e[0]){const t=r.get(e[1]);void 0!==t&&(r.delete(e[1]),e[1]=t)}return d.call(t,"error",e[1],e[2]),d.call(t,e[0],e[1],e[2])}),0!==u.numberOfOutputs){const e=n(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(e).connect(o.destination);return i(t,(()=>e.disconnect()),(()=>e.connect(o.destination)))}return t}catch(e){if(11===e.code)throw r();throw e}var d,h;if(void 0===c)throw r();return vn(u),t(o,s,c,u)})(tn,as,Tn,Pn,mi),cs=((e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m)=>(g,v,y)=>{const b=new WeakMap;let x=null;return{render(S,w){a(w,S);const _=b.get(w);return void 0!==_?Promise.resolve(_):(async(a,S)=>{let w=u(a),_=null;const C=Je(w,S),A=Array.isArray(v.outputChannelCount)?v.outputChannelCount:Array.from(v.outputChannelCount);if(null===d){const e=A.reduce(((e,t)=>e+t),0),n=i(S,{channelCount:Math.max(1,e),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,e)}),o=[];for(let e=0;e<a.numberOfOutputs;e+=1)o.push(r(S,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:A[e]}));const c=s(S,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1});c.connect=t.bind(null,o),c.disconnect=l.bind(null,o),_=[n,o,c]}else C||(w=new d(S,g));if(b.set(S,null===_?w:_[2]),null!==_){if(null===x){if(void 0===y)throw new Error("Missing the processor constructor.");if(null===h)throw new Error("Missing the native OfflineAudioContext constructor.");const e=a.channelCount*a.numberOfInputs,t=void 0===y.parameterDescriptors?0:y.parameterDescriptors.length,n=e+t,l=async()=>{const l=new h(n,128*Math.ceil(a.context.length/128),S.sampleRate),c=[],u=[];for(let e=0;e<v.numberOfInputs;e+=1)c.push(s(l,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1})),u.push(i(l,{channelCount:v.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:v.channelCount}));const d=await Promise.all(Array.from(a.parameters.values()).map((async e=>{const t=o(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:e.value});return await p(l,e,t.offset),t}))),g=r(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,e+t)});for(let e=0;e<v.numberOfInputs;e+=1){c[e].connect(u[e]);for(let t=0;t<v.channelCount;t+=1)u[e].connect(g,t,e*v.channelCount+t)}for(const[t,n]of d.entries())n.connect(g,0,e+t),n.start(0);return g.connect(l.destination),await Promise.all(c.map((e=>f(a,l,e)))),m(l)};x=Vt(a,0===n?null:await l(),S,v,A,y,c)}const e=await x,t=n(S,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[l,u,d]=_;null!==e&&(t.buffer=e,t.start(0)),t.connect(l);for(let e=0,t=0;e<a.numberOfOutputs;e+=1){const n=u[e];for(let r=0;r<A[e];r+=1)l.connect(n,t+r,r);t+=A[e]}return d}if(C)for(const[t,n]of a.parameters.entries())await e(S,n,w.parameters.get(t));else for(const[e,t]of a.parameters.entries())await p(S,t,w.parameters.get(e));return await f(a,S,w),w})(S,w)}}})(Jr,es,Yr,bi,Cn,Ai,Tn,ts,ns,go,Et,Ir,yr,Xr,dr,Ui),us=(ds=vo,e=>ds.get(e));var ds;const hs=(e=>(t,n)=>{e.set(t,n)})(rs),ps=(mo&&((e,t,n,r,i,o,s,a,l,c,u,d,h,p)=>{})(Xo,Rr,ei,cs,ls,ct,us,gr,br,Ir,(e=>({...e,outputChannelCount:void 0!==e.outputChannelCount?e.outputChannelCount:1===e.numberOfInputs&&1===e.numberOfOutputs?[e.channelCount]:Array.from({length:e.numberOfOutputs},(()=>1))})),hs,(e=>{const{port1:t,port2:n}=new MessageChannel;try{t.postMessage(e)}finally{t.close(),n.close()}}),Kn),((e,t,n,r,i)=>{})(tn,Pn,Bn,Ki,Cr),((e,t)=>(n,r,i)=>{if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new t(n,r,i)}catch(t){if("SyntaxError"===t.name)throw e();throw t}})(Pn,yr)),fs=((e,t,n,r,i,o,s,a)=>(l,c)=>n(l).render(l,c).then((()=>Promise.all(Array.from(r(c)).map((e=>n(e).render(e,c)))))).then((()=>i(c))).then((n=>("function"!=typeof n.copyFromChannel?(s(n),Ze(n)):t(o,(()=>o(n)))||a(n),e.add(n),n))))(Or,nr,cr,Yo,Ui,Qe,Br,zr);ms=Ae,gs=Tr;var ms,gs;vs=Te,ys=Mr;var vs,ys;var bs={},xs=bs&&bs.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Ss=bs&&bs.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||xs(t,e,n)};Object.defineProperty(bs,"__esModule",{value:!0}),new(o("eoNXt").AgentConfig),Ss(o("fsJE0"),bs);var ws={};
59
+ e.exports=function(t){var n={},r=o("kyWRD"),i=o("85Hg2"),s=o("kMsGZ");function a(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 l=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,c=60103,u=60106,d=60107,h=60108,p=60114,f=60109,m=60110,g=60112,v=60113,y=60120,b=60115,x=60116,S=60121,w=60129,_=60130,C=60131;if("function"==typeof Symbol&&Symbol.for){var A=Symbol.for;c=A("react.element"),u=A("react.portal"),d=A("react.fragment"),h=A("react.strict_mode"),p=A("react.profiler"),f=A("react.provider"),m=A("react.context"),g=A("react.forward_ref"),v=A("react.suspense"),y=A("react.suspense_list"),b=A("react.memo"),x=A("react.lazy"),S=A("react.block"),A("react.scope"),w=A("react.debug_trace_mode"),_=A("react.offscreen"),C=A("react.legacy_hidden")}var E="function"==typeof Symbol&&Symbol.iterator;function T(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=E&&e[E]||e["@@iterator"])?e:null}function M(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case d:return"Fragment";case u:return"Portal";case p:return"Profiler";case h:return"StrictMode";case v:return"Suspense";case y:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case m:return(e.displayName||"Context")+".Consumer";case f:return(e._context.displayName||"Context")+".Provider";case g:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case b:return M(e.type);case S:return M(e._render);case x:t=e._payload,e=e._init;try{return M(e(t))}catch(e){}}return null}function I(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function R(e){if(I(e)!==e)throw Error(a(188))}function P(e){var t=e.alternate;if(!t){if(null===(t=I(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return R(i),e;if(o===r)return R(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}function k(e){if(!(e=P(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function O(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var N,L=t.getPublicInstance,D=t.getRootHostContext,B=t.getChildHostContext,z=t.prepareForCommit,F=t.resetAfterCommit,U=t.createInstance,j=t.appendInitialChild,H=t.finalizeInitialChildren,V=t.prepareUpdate,G=t.shouldSetTextContent,W=t.createTextInstance,q=t.scheduleTimeout,K=t.cancelTimeout,J=t.noTimeout,Q=t.isPrimaryRenderer,Y=t.supportsMutation,Z=t.supportsPersistence,X=t.supportsHydration,$=t.getInstanceFromNode,ee=t.makeOpaqueHydratingObject,te=t.makeClientId,ne=t.beforeActiveInstanceBlur,re=t.afterActiveInstanceBlur,ie=t.preparePortalMount,oe=t.supportsTestSelectors,se=t.findFiberRoot,ae=t.getBoundingRect,le=t.getTextContent,ce=t.isHiddenSubtree,ue=t.matchAccessibilityRole,de=t.setFocusIfFocusable,he=t.setupIntersectionObserver,pe=t.appendChild,fe=t.appendChildToContainer,me=t.commitTextUpdate,ge=t.commitMount,ve=t.commitUpdate,ye=t.insertBefore,be=t.insertInContainerBefore,xe=t.removeChild,Se=t.removeChildFromContainer,we=t.resetTextContent,_e=t.hideInstance,Ce=t.hideTextInstance,Ae=t.unhideInstance,Ee=t.unhideTextInstance,Te=t.clearContainer,Me=t.cloneInstance,Ie=t.createContainerChildSet,Re=t.appendChildToContainerChildSet,Pe=t.finalizeContainerChildren,ke=t.replaceContainerChildren,Oe=t.cloneHiddenInstance,Ne=t.cloneHiddenTextInstance,Le=t.canHydrateInstance,De=t.canHydrateTextInstance,Be=t.isSuspenseInstancePending,ze=t.isSuspenseInstanceFallback,Fe=t.getNextHydratableSibling,Ue=t.getFirstHydratableChild,je=t.hydrateInstance,He=t.hydrateTextInstance,Ve=t.getNextHydratableInstanceAfterSuspenseInstance,Ge=t.commitHydratedContainer,We=t.commitHydratedSuspenseInstance;function qe(e){if(void 0===N)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return"\n"+N+e}var Ke=!1;function Je(e,t){if(!e||Ke)return"";Ke=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a])return"\n"+i[s].replace(" at new "," at ")}while(1<=s&&0<=a);break}}}finally{Ke=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qe(e):""}var Qe=[],Ye=-1;function Ze(e){return{current:e}}function Xe(e){0>Ye||(e.current=Qe[Ye],Qe[Ye]=null,Ye--)}function $e(e,t){Ye++,Qe[Ye]=e.current,e.current=t}var et={},tt=Ze(et),nt=Ze(!1),rt=et;function it(e,t){var n=e.type.contextTypes;if(!n)return et;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ot(e){return null!=(e=e.childContextTypes)}function st(){Xe(nt),Xe(tt)}function at(e,t,n){if(tt.current!==et)throw Error(a(168));$e(tt,t),$e(nt,n)}function lt(e,t,n){var i=e.stateNode;if(e=t.childContextTypes,"function"!=typeof i.getChildContext)return n;for(var o in i=i.getChildContext())if(!(o in e))throw Error(a(108,M(t)||"Unknown",o));return r({},n,i)}function ct(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||et,rt=tt.current,$e(tt,e),$e(nt,nt.current),!0}function ut(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=lt(e,t,rt),r.__reactInternalMemoizedMergedChildContext=e,Xe(nt),Xe(tt),$e(tt,e)):Xe(nt),$e(nt,n)}var dt=null,ht=null;(0,s.unstable_now)();var pt=0,ft=8;function mt(e){if(0!=(1&e))return ft=15,1;if(0!=(2&e))return ft=14,2;if(0!=(4&e))return ft=13,4;var t=24&e;return 0!==t?(ft=12,t):0!=(32&e)?(ft=11,32):0!==(t=192&e)?(ft=10,t):0!=(256&e)?(ft=9,256):0!==(t=3584&e)?(ft=8,t):0!=(4096&e)?(ft=7,4096):0!==(t=4186112&e)?(ft=6,t):0!==(t=62914560&e)?(ft=5,t):67108864&e?(ft=4,67108864):0!=(134217728&e)?(ft=3,134217728):0!==(t=805306368&e)?(ft=2,t):0!=(1073741824&e)?(ft=1,1073741824):(ft=8,e)}function gt(e,t){var n=e.pendingLanes;if(0===n)return ft=0;var r=0,i=0,o=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(0!==o)r=o,i=ft=15;else if(0!==(o=134217727&n)){var l=o&~s;0!==l?(r=mt(l),i=ft):0!==(a&=o)&&(r=mt(a),i=ft)}else 0!==(o=n&~s)?(r=mt(o),i=ft):0!==a&&(r=mt(a),i=ft);if(0===r)return 0;if(r=n&((0>(r=31-wt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&s)){if(mt(t),i<=ft)return t;ft=i}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-wt(t)),r|=e[n],t&=~i;return r}function vt(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function yt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=bt(24&~t))?yt(10,t):e;case 10:return 0===(e=bt(192&~t))?yt(8,t):e;case 8:return 0===(e=bt(3584&~t))&&(0===(e=bt(4186112&~t))&&(e=512)),e;case 2:return 0===(t=bt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function bt(e){return e&-e}function xt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function St(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-wt(t)]=n}var wt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(_t(e)/Ct|0)|0},_t=Math.log,Ct=Math.LN2;var At=s.unstable_runWithPriority,Et=s.unstable_scheduleCallback,Tt=s.unstable_cancelCallback,Mt=s.unstable_shouldYield,It=s.unstable_requestPaint,Rt=s.unstable_now,Pt=s.unstable_getCurrentPriorityLevel,kt=s.unstable_ImmediatePriority,Ot=s.unstable_UserBlockingPriority,Nt=s.unstable_NormalPriority,Lt=s.unstable_LowPriority,Dt=s.unstable_IdlePriority,Bt={},zt=void 0!==It?It:function(){},Ft=null,Ut=null,jt=!1,Ht=Rt(),Vt=1e4>Ht?Rt:function(){return Rt()-Ht};function Gt(){switch(Pt()){case kt:return 99;case Ot:return 98;case Nt:return 97;case Lt:return 96;case Dt:return 95;default:throw Error(a(332))}}function Wt(e){switch(e){case 99:return kt;case 98:return Ot;case 97:return Nt;case 96:return Lt;case 95:return Dt;default:throw Error(a(332))}}function qt(e,t){return e=Wt(e),At(e,t)}function Kt(e,t,n){return e=Wt(e),Et(e,t,n)}function Jt(){if(null!==Ut){var e=Ut;Ut=null,Tt(e)}Qt()}function Qt(){if(!jt&&null!==Ft){jt=!0;var e=0;try{var t=Ft;qt(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ft=null}catch(t){throw null!==Ft&&(Ft=Ft.slice(e+1)),Et(kt,Jt),t}finally{jt=!1}}}var Yt=l.ReactCurrentBatchConfig;var Zt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Xt=Object.prototype.hasOwnProperty;function $t(e,t){if(Zt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Xt.call(t,n[r])||!Zt(e[n[r]],t[n[r]]))return!1;return!0}function en(e){switch(e.tag){case 5:return qe(e.type);case 16:return qe("Lazy");case 13:return qe("Suspense");case 19:return qe("SuspenseList");case 0:case 2:case 15:return e=Je(e.type,!1);case 11:return e=Je(e.type.render,!1);case 22:return e=Je(e.type._render,!1);case 1:return e=Je(e.type,!0);default:return""}}function tn(e,t){if(e&&e.defaultProps){for(var n in t=r({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var nn=Ze(null),rn=null,on=null,sn=null;function an(){sn=on=rn=null}function ln(e,t){e=e.type._context,Q?($e(nn,e._currentValue),e._currentValue=t):($e(nn,e._currentValue2),e._currentValue2=t)}function cn(e){var t=nn.current;Xe(nn),e=e.type._context,Q?e._currentValue=t:e._currentValue2=t}function un(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function dn(e,t){rn=e,sn=on=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Hr=!0),e.firstContext=null)}function hn(e,t){if(sn!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(sn=e,t=1073741823),t={context:e,observedBits:t,next:null},null===on){if(null===rn)throw Error(a(308));on=t,rn.dependencies={lanes:0,firstContext:t,responders:null}}else on=on.next=t;return Q?e._currentValue:e._currentValue2}var pn=!1;function fn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function mn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vn(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function yn(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bn(e,t,n,i){var o=e.updateQueue;pn=!1;var s=o.firstBaseUpdate,a=o.lastBaseUpdate,l=o.shared.pending;if(null!==l){o.shared.pending=null;var c=l,u=c.next;c.next=null,null===a?s=u:a.next=u,a=c;var d=e.alternate;if(null!==d){var h=(d=d.updateQueue).lastBaseUpdate;h!==a&&(null===h?d.firstBaseUpdate=u:h.next=u,d.lastBaseUpdate=c)}}if(null!==s){for(h=o.baseState,a=0,d=u=c=null;;){l=s.lane;var p=s.eventTime;if((i&l)===l){null!==d&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var f=e,m=s;switch(l=t,p=n,m.tag){case 1:if("function"==typeof(f=m.payload)){h=f.call(p,h,l);break e}h=f;break e;case 3:f.flags=-4097&f.flags|64;case 0:if(null==(l="function"==typeof(f=m.payload)?f.call(p,h,l):f))break e;h=r({},h,l);break e;case 2:pn=!0}}null!==s.callback&&(e.flags|=32,null===(l=o.effects)?o.effects=[s]:l.push(s))}else p={eventTime:p,lane:l,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(u=d=p,c=h):d=d.next=p,a|=l;if(null===(s=s.next)){if(null===(l=o.shared.pending))break;s=l.next,l.next=null,o.lastBaseUpdate=l,o.shared.pending=null}}null===d&&(c=h),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,ho|=a,e.lanes=a,e.memoizedState=h}}function xn(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Sn=(new i.Component).refs;function wn(e,t,n,i){n=null==(n=n(i,t=e.memoizedState))?t:r({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var _n={isMounted:function(e){return!!(e=e._reactInternals)&&I(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Bo(),i=zo(e),o=gn(r,i);o.payload=t,null!=n&&(o.callback=n),vn(e,o),Fo(e,i,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Bo(),i=zo(e),o=gn(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),vn(e,o),Fo(e,i,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Bo(),r=zo(e),i=gn(n,r);i.tag=2,null!=t&&(i.callback=t),vn(e,i),Fo(e,r,n)}};function Cn(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!$t(n,r)||!$t(i,o))}function An(e,t,n){var r=!1,i=et,o=t.contextType;return"object"==typeof o&&null!==o?o=hn(o):(i=ot(t)?rt:tt.current,o=(r=null!=(r=t.contextTypes))?it(e,i):et),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=_n,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function En(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_n.enqueueReplaceState(t,t.state,null)}function Tn(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Sn,fn(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=hn(o):(o=ot(t)?rt:tt.current,i.context=it(e,o)),bn(e,n,i,r),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(wn(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&_n.enqueueReplaceState(i,i.state,null),bn(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4)}var Mn=Array.isArray;function In(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=r.refs;t===Sn&&(t=r.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Rn(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Pn(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Cs(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function s(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ms(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n,r){return null!==t&&t.elementType===n.type?((r=i(t,n.props)).ref=In(e,t,n),r.return=e,r):((r=As(n.type,n.key,n.props,null,e.mode,r)).ref=In(e,t,n),r.return=e,r)}function p(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Is(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Es(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ms(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case c:return(n=As(t.type,t.key,t.props,null,e.mode,n)).ref=In(e,null,t),n.return=e,n;case u:return(t=Is(t,e.mode,n)).return=e,t}if(Mn(t)||T(t))return(t=Es(t,e.mode,n,null)).return=e,t;Rn(e,t)}return null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case c:return n.key===i?n.type===d?f(e,t,n.props.children,r,i):h(e,t,n,r):null;case u:return n.key===i?p(e,t,n,r):null}if(Mn(n)||T(n))return null!==i?null:f(e,t,n,r,null);Rn(e,n)}return null}function v(e,t,n,r,i){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case c:return e=e.get(null===r.key?n:r.key)||null,r.type===d?f(t,e,r.props.children,i,r.key):h(t,e,r,i);case u:return p(t,e=e.get(null===r.key?n:r.key)||null,r,i)}if(Mn(r)||T(r))return f(t,e=e.get(n)||null,r,i,null);Rn(t,r)}return null}function y(i,s,a,l){for(var c=null,u=null,d=s,h=s=0,p=null;null!==d&&h<a.length;h++){d.index>h?(p=d,d=null):p=d.sibling;var f=g(i,d,a[h],l);if(null===f){null===d&&(d=p);break}e&&d&&null===f.alternate&&t(i,d),s=o(f,s,h),null===u?c=f:u.sibling=f,u=f,d=p}if(h===a.length)return n(i,d),c;if(null===d){for(;h<a.length;h++)null!==(d=m(i,a[h],l))&&(s=o(d,s,h),null===u?c=d:u.sibling=d,u=d);return c}for(d=r(i,d);h<a.length;h++)null!==(p=v(d,i,h,a[h],l))&&(e&&null!==p.alternate&&d.delete(null===p.key?h:p.key),s=o(p,s,h),null===u?c=p:u.sibling=p,u=p);return e&&d.forEach((function(e){return t(i,e)})),c}function b(i,s,l,c){var u=T(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,h=s,p=s=0,f=null,y=l.next();null!==h&&!y.done;p++,y=l.next()){h.index>p?(f=h,h=null):f=h.sibling;var b=g(i,h,y.value,c);if(null===b){null===h&&(h=f);break}e&&h&&null===b.alternate&&t(i,h),s=o(b,s,p),null===d?u=b:d.sibling=b,d=b,h=f}if(y.done)return n(i,h),u;if(null===h){for(;!y.done;p++,y=l.next())null!==(y=m(i,y.value,c))&&(s=o(y,s,p),null===d?u=y:d.sibling=y,d=y);return u}for(h=r(i,h);!y.done;p++,y=l.next())null!==(y=v(h,i,p,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?p:y.key),s=o(y,s,p),null===d?u=y:d.sibling=y,d=y);return e&&h.forEach((function(e){return t(i,e)})),u}return function(e,r,o,l){var h="object"==typeof o&&null!==o&&o.type===d&&null===o.key;h&&(o=o.props.children);var p="object"==typeof o&&null!==o;if(p)switch(o.$$typeof){case c:e:{for(p=o.key,h=r;null!==h;){if(h.key===p){if(7===h.tag){if(o.type===d){n(e,h.sibling),(r=i(h,o.props.children)).return=e,e=r;break e}}else if(h.elementType===o.type){n(e,h.sibling),(r=i(h,o.props)).ref=In(e,h,o),r.return=e,e=r;break e}n(e,h);break}t(e,h),h=h.sibling}o.type===d?((r=Es(o.props.children,e.mode,l,o.key)).return=e,e=r):((l=As(o.type,o.key,o.props,null,e.mode,l)).ref=In(e,r,o),l.return=e,e=l)}return s(e);case u:e:{for(h=o.key;null!==r;){if(r.key===h){if(4===r.tag&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),(r=i(r,o.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Is(o,e.mode,l)).return=e,e=r}return s(e)}if("string"==typeof o||"number"==typeof o)return o=""+o,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,o)).return=e,e=r):(n(e,r),(r=Ms(o,e.mode,l)).return=e,e=r),s(e);if(Mn(o))return y(e,r,o,l);if(T(o))return b(e,r,o,l);if(p&&Rn(e,o),void 0===o&&!h)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,M(e.type)||"Component"))}return n(e,r)}}var kn=Pn(!0),On=Pn(!1),Nn={},Ln=Ze(Nn),Dn=Ze(Nn),Bn=Ze(Nn);function zn(e){if(e===Nn)throw Error(a(174));return e}function Fn(e,t){$e(Bn,t),$e(Dn,e),$e(Ln,Nn),e=D(t),Xe(Ln),$e(Ln,e)}function Un(){Xe(Ln),Xe(Dn),Xe(Bn)}function jn(e){var t=zn(Bn.current),n=zn(Ln.current);n!==(t=B(n,e.type,t))&&($e(Dn,e),$e(Ln,t))}function Hn(e){Dn.current===e&&(Xe(Ln),Xe(Dn))}var Vn=Ze(0);function Gn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Be(n)||ze(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=null,qn=null,Kn=!1;function Jn(e,t){var n=ws(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Qn(e,t){switch(e.tag){case 5:return null!==(t=Le(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=De(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function Yn(e){if(Kn){var t=qn;if(t){var n=t;if(!Qn(e,t)){if(!(t=Fe(n))||!Qn(e,t))return e.flags=-1025&e.flags|2,Kn=!1,void(Wn=e);Jn(Wn,n)}Wn=e,qn=Ue(t)}else e.flags=-1025&e.flags|2,Kn=!1,Wn=e}}function Zn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Wn=e}function Xn(e){if(!X||e!==Wn)return!1;if(!Kn)return Zn(e),Kn=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!G(t,e.memoizedProps))for(t=qn;t;)Jn(e,t),t=Fe(t);if(Zn(e),13===e.tag){if(!X)throw Error(a(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));qn=Ve(e)}else qn=Wn?Fe(e.stateNode):null;return!0}function $n(){X&&(qn=Wn=null,Kn=!1)}var er=[];function tr(){for(var e=0;e<er.length;e++){var t=er[e];Q?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}er.length=0}var nr=l.ReactCurrentDispatcher,rr=l.ReactCurrentBatchConfig,ir=0,or=null,sr=null,ar=null,lr=!1,cr=!1;function ur(){throw Error(a(321))}function dr(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zt(e[n],t[n]))return!1;return!0}function hr(e,t,n,r,i,o){if(ir=o,or=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,nr.current=null===e||null===e.memoizedState?zr:Fr,e=n(r,i),cr){o=0;do{if(cr=!1,!(25>o))throw Error(a(301));o+=1,ar=sr=null,t.updateQueue=null,nr.current=Ur,e=n(r,i)}while(cr)}if(nr.current=Br,t=null!==sr&&null!==sr.next,ir=0,ar=sr=or=null,lr=!1,t)throw Error(a(300));return e}function pr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ar?or.memoizedState=ar=e:ar=ar.next=e,ar}function fr(){if(null===sr){var e=or.alternate;e=null!==e?e.memoizedState:null}else e=sr.next;var t=null===ar?or.memoizedState:ar.next;if(null!==t)ar=t,sr=e;else{if(null===e)throw Error(a(310));e={memoizedState:(sr=e).memoizedState,baseState:sr.baseState,baseQueue:sr.baseQueue,queue:sr.queue,next:null},null===ar?or.memoizedState=ar=e:ar=ar.next=e}return ar}function mr(e,t){return"function"==typeof t?t(e):t}function gr(e){var t=fr(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=sr,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=s=o=null,c=i;do{var u=c.lane;if((ir&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(s=l=d,o=r):l=l.next=d,or.lanes|=u,ho|=u}c=c.next}while(null!==c&&c!==i);null===l?o=r:l.next=s,Zt(r,t.memoizedState)||(Hr=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function vr(e){var t=fr(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Zt(o,t.memoizedState)||(Hr=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function yr(e,t,n){var r=t._getVersion;r=r(t._source);var i=Q?t._workInProgressVersionPrimary:t._workInProgressVersionSecondary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(ir&e)===e)&&(Q?t._workInProgressVersionPrimary=r:t._workInProgressVersionSecondary=r,er.push(t))),e)return n(t._source);throw er.push(t),Error(a(350))}function br(e,t,n,r){var i=ro;if(null===i)throw Error(a(349));var o=t._getVersion,s=o(t._source),l=nr.current,c=l.useState((function(){return yr(i,t,n)})),u=c[1],d=c[0];c=ar;var h=e.memoizedState,p=h.refs,f=p.getSnapshot,m=h.source;h=h.subscribe;var g=or;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=u;var e=o(t._source);if(!Zt(s,e)){e=n(t._source),Zt(d,e)||(u(e),e=zo(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,a=e;0<a;){var l=31-wt(a),c=1<<l;r[l]|=e,a&=~c}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=p.getSnapshot,n=p.setSnapshot;try{n(e(t._source));var r=zo(g);i.mutableReadLanes|=r&i.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),Zt(f,n)&&Zt(m,t)&&Zt(h,r)||((e={pending:null,dispatch:null,lastRenderedReducer:mr,lastRenderedState:d}).dispatch=u=Dr.bind(null,or,e),c.queue=e,c.baseQueue=null,d=yr(i,t,n),c.memoizedState=c.baseState=d),d}function xr(e,t,n){return br(fr(),e,t,n)}function Sr(e){var t=pr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:mr,lastRenderedState:e}).dispatch=Dr.bind(null,or,e),[t.memoizedState,e]}function wr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=or.updateQueue)?(t={lastEffect:null},or.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function _r(e){return e={current:e},pr().memoizedState=e}function Cr(){return fr().memoizedState}function Ar(e,t,n,r){var i=pr();or.flags|=e,i.memoizedState=wr(1|t,n,void 0,void 0===r?null:r)}function Er(e,t,n,r){var i=fr();r=void 0===r?null:r;var o=void 0;if(null!==sr){var s=sr.memoizedState;if(o=s.destroy,null!==r&&dr(r,s.deps))return void wr(t,n,o,r)}or.flags|=e,i.memoizedState=wr(1|t,n,o,r)}function Tr(e,t){return Ar(516,4,e,t)}function Mr(e,t){return Er(516,4,e,t)}function Ir(e,t){return Er(4,2,e,t)}function Rr(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Pr(e,t,n){return n=null!=n?n.concat([e]):null,Er(4,2,Rr.bind(null,t,e),n)}function kr(){}function Or(e,t){var n=fr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Nr(e,t){var n=fr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&dr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Lr(e,t){var n=Gt();qt(98>n?98:n,(function(){e(!0)})),qt(97<n?97:n,(function(){var n=rr.transition;rr.transition=1;try{e(!1),t()}finally{rr.transition=n}}))}function Dr(e,t,n){var r=Bo(),i=zo(e),o={lane:i,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(null===s?o.next=o:(o.next=s.next,s.next=o),t.pending=o,s=e.alternate,e===or||null!==s&&s===or)cr=lr=!0;else{if(0===e.lanes&&(null===s||0===s.lanes)&&null!==(s=t.lastRenderedReducer))try{var a=t.lastRenderedState,l=s(a,n);if(o.eagerReducer=s,o.eagerState=l,Zt(l,a))return}catch(e){}Fo(e,i,r)}}var Br={readContext:hn,useCallback:ur,useContext:ur,useEffect:ur,useImperativeHandle:ur,useLayoutEffect:ur,useMemo:ur,useReducer:ur,useRef:ur,useState:ur,useDebugValue:ur,useDeferredValue:ur,useTransition:ur,useMutableSource:ur,useOpaqueIdentifier:ur,unstable_isNewReconciler:!1},zr={readContext:hn,useCallback:function(e,t){return pr().memoizedState=[e,void 0===t?null:t],e},useContext:hn,useEffect:Tr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ar(4,2,Rr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ar(4,2,e,t)},useMemo:function(e,t){var n=pr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pr();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Dr.bind(null,or,e),[r.memoizedState,e]},useRef:_r,useState:Sr,useDebugValue:kr,useDeferredValue:function(e){var t=Sr(e),n=t[0],r=t[1];return Tr((function(){var t=rr.transition;rr.transition=1;try{r(e)}finally{rr.transition=t}}),[e]),n},useTransition:function(){var e=Sr(!1),t=e[0];return _r(e=Lr.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=pr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},br(r,e,t,n)},useOpaqueIdentifier:function(){if(Kn){var e=!1,t=ee((function(){throw e||(e=!0,n(te())),Error(a(355))})),n=Sr(t)[1];return 0==(2&or.mode)&&(or.flags|=516,wr(5,(function(){n(te())}),void 0,null)),t}return Sr(t=te()),t},unstable_isNewReconciler:!1},Fr={readContext:hn,useCallback:Or,useContext:hn,useEffect:Mr,useImperativeHandle:Pr,useLayoutEffect:Ir,useMemo:Nr,useReducer:gr,useRef:Cr,useState:function(){return gr(mr)},useDebugValue:kr,useDeferredValue:function(e){var t=gr(mr),n=t[0],r=t[1];return Mr((function(){var t=rr.transition;rr.transition=1;try{r(e)}finally{rr.transition=t}}),[e]),n},useTransition:function(){var e=gr(mr)[0];return[Cr().current,e]},useMutableSource:xr,useOpaqueIdentifier:function(){return gr(mr)[0]},unstable_isNewReconciler:!1},Ur={readContext:hn,useCallback:Or,useContext:hn,useEffect:Mr,useImperativeHandle:Pr,useLayoutEffect:Ir,useMemo:Nr,useReducer:vr,useRef:Cr,useState:function(){return vr(mr)},useDebugValue:kr,useDeferredValue:function(e){var t=vr(mr),n=t[0],r=t[1];return Mr((function(){var t=rr.transition;rr.transition=1;try{r(e)}finally{rr.transition=t}}),[e]),n},useTransition:function(){var e=vr(mr)[0];return[Cr().current,e]},useMutableSource:xr,useOpaqueIdentifier:function(){return vr(mr)[0]},unstable_isNewReconciler:!1},jr=l.ReactCurrentOwner,Hr=!1;function Vr(e,t,n,r){t.child=null===e?On(t,null,n,r):kn(t,e.child,n,r)}function Gr(e,t,n,r,i){n=n.render;var o=t.ref;return dn(t,i),r=hr(e,t,n,r,o,i),null===e||Hr?(t.flags|=1,Vr(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,di(e,t,i))}function Wr(e,t,n,r,i,o){if(null===e){var s=n.type;return"function"!=typeof s||_s(s)||void 0!==s.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=As(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=s,qr(e,t,s,r,i,o))}return s=e.child,0==(i&o)&&(i=s.memoizedProps,(n=null!==(n=n.compare)?n:$t)(i,r)&&e.ref===t.ref)?di(e,t,o):(t.flags|=1,(e=Cs(s,r)).ref=t.ref,e.return=t,t.child=e)}function qr(e,t,n,r,i,o){if(null!==e&&$t(e.memoizedProps,r)&&e.ref===t.ref){if(Hr=!1,0==(o&i))return t.lanes=e.lanes,di(e,t,o);0!=(16384&e.flags)&&(Hr=!0)}return Qr(e,t,n,r,o)}function Kr(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},Ko(t,n);else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Ko(t,e),null;t.memoizedState={baseLanes:0},Ko(t,null!==o?o.baseLanes:n)}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Ko(t,r);return Vr(e,t,i,n),t.child}function Jr(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Qr(e,t,n,r,i){var o=ot(n)?rt:tt.current;return o=it(t,o),dn(t,i),n=hr(e,t,n,r,o,i),null===e||Hr?(t.flags|=1,Vr(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~i,di(e,t,i))}function Yr(e,t,n,r,i){if(ot(n)){var o=!0;ct(t)}else o=!1;if(dn(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),An(t,n,r),Tn(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"==typeof c&&null!==c?c=hn(c):c=it(t,c=ot(n)?rt:tt.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&En(t,s,r,c),pn=!1;var h=t.memoizedState;s.state=h,bn(t,r,s,i),l=t.memoizedState,a!==r||h!==l||nt.current||pn?("function"==typeof u&&(wn(t,n,u,r),l=t.memoizedState),(a=pn||Cn(t,n,a,r,h,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4)):("function"==typeof s.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4),r=!1)}else{s=t.stateNode,mn(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:tn(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=hn(l):l=it(t,l=ot(n)?rt:tt.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&En(t,s,r,l),pn=!1,h=t.memoizedState,s.state=h,bn(t,r,s,i);var f=t.memoizedState;a!==d||h!==f||nt.current||pn?("function"==typeof p&&(wn(t,n,p,r),f=t.memoizedState),(c=pn||Cn(t,n,c,r,h,f,l))?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=256),r=!1)}return Zr(e,t,n,r,o,i)}function Zr(e,t,n,r,i,o){Jr(e,t);var s=0!=(64&t.flags);if(!r&&!s)return i&&ut(t,n,!1),di(e,t,o);r=t.stateNode,jr.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=kn(t,e.child,null,o),t.child=kn(t,null,a,o)):Vr(e,t,a,o),t.memoizedState=r.state,i&&ut(t,n,!0),t.child}function Xr(e){var t=e.stateNode;t.pendingContext?at(0,t.pendingContext,t.pendingContext!==t.context):t.context&&at(0,t.context,!1),Fn(e,t.containerInfo)}var $r,ei,ti,ni,ri={dehydrated:null,retryLane:0};function ii(e,t,n){var r,i=t.pendingProps,o=Vn.current,s=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(s=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(o|=1),$e(Vn,1&o),null===e?(void 0!==i.fallback&&Yn(t),e=i.children,o=i.fallback,s?(e=oi(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=ri,e):"number"==typeof i.unstable_expectedLoadTime?(e=oi(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=ri,t.lanes=33554432,e):((n=Ts({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,s?(i=ai(e,t,i.children,i.fallback,n),s=t.child,o=e.child.memoizedState,s.memoizedState=null===o?{baseLanes:n}:{baseLanes:o.baseLanes|n},s.childLanes=e.childLanes&~n,t.memoizedState=ri,i):(n=si(e,t,i.children,n),t.memoizedState=null,n))}function oi(e,t,n,r){var i=e.mode,o=e.child;return t={mode:"hidden",children:t},0==(2&i)&&null!==o?(o.childLanes=0,o.pendingProps=t):o=Ts(t,i,0,null),n=Es(n,i,r,null),o.return=e,n.return=e,o.sibling=n,e.child=o,n}function si(e,t,n,r){var i=e.child;return e=i.sibling,n=Cs(i,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function ai(e,t,n,r,i){var o=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return 0==(2&o)&&t.child!==s?((n=t.child).childLanes=0,n.pendingProps=a,null!==(s=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=s,s.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Cs(s,a),null!==e?r=Cs(e,r):(r=Es(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function li(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),un(e.return,t)}function ci(e,t,n,r,i,o){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,lastEffect:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i,s.lastEffect=o)}function ui(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Vr(e,t,r.children,n),0!=(2&(r=Vn.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&li(e,n);else if(19===e.tag)li(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if($e(Vn,r),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Gn(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ci(t,!1,i,n,o,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Gn(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ci(t,!0,n,null,o,t.lastEffect);break;case"together":ci(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function di(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),ho|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Cs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Cs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function hi(e){e.flags|=4}if(Y)$r=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)j(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ei=function(){},ti=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var o=t.stateNode,s=zn(Ln.current);n=V(o,n,e,r,i,s),(t.updateQueue=n)&&hi(t)}},ni=function(e,t,n,r){n!==r&&hi(t)};else if(Z){$r=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Oe(o,i.type,i.memoizedProps,i)),j(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Ne(o,i.memoizedProps,i)),j(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.flags)&&(o=null!==i.memoizedState)){var s=i.child;if(null!==s&&(null!==s.child&&(s.child.return=s,$r(e,s,!0,o)),null!==(o=s.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var pi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Oe(o,i.type,i.memoizedProps,i)),Re(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Ne(o,i.memoizedProps,i)),Re(e,o);else if(4!==i.tag){if(13===i.tag&&0!=(4&i.flags)&&(o=null!==i.memoizedState)){var s=i.child;if(null!==s&&(null!==s.child&&(s.child.return=s,pi(e,s,!0,o)),null!==(o=s.sibling))){o.return=i,i=o;continue}}if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};ei=function(e){var t=e.stateNode;if(null!==e.firstEffect){var n=t.containerInfo,r=Ie(n);pi(r,e,!1,!1),t.pendingChildren=r,hi(e),Pe(n,r)}},ti=function(e,t,n,r,i){var o=e.stateNode,s=e.memoizedProps;if((e=null===t.firstEffect)&&s===r)t.stateNode=o;else{var a=t.stateNode,l=zn(Ln.current),c=null;s!==r&&(c=V(a,n,s,r,i,l)),e&&null===c?t.stateNode=o:(o=Me(o,c,n,s,r,t,e,a),H(o,n,r,i,l)&&hi(t),t.stateNode=o,e?hi(t):$r(o,t,!1,!1))}},ni=function(e,t,n,r){n!==r?(e=zn(Bn.current),n=zn(Ln.current),t.stateNode=W(r,e,n,t),hi(t)):t.stateNode=e.stateNode}}else ei=function(){},ti=function(){},ni=function(){};function fi(e,t){if(!Kn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mi(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return ot(t.type)&&st(),null;case 3:return Un(),Xe(nt),Xe(tt),tr(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Xn(t)?hi(t):r.hydrate||(t.flags|=256)),ei(t),null;case 5:Hn(t);var i=zn(Bn.current);if(n=t.type,null!==e&&null!=t.stateNode)ti(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=zn(Ln.current),Xn(t)){if(!X)throw Error(a(175));e=je(t.stateNode,t.type,t.memoizedProps,i,e,t),t.updateQueue=e,null!==e&&hi(t)}else{var o=U(n,r,i,e,t);$r(o,t,!1,!1),t.stateNode=o,H(o,n,r,i,e)&&hi(t)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)ni(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(e=zn(Bn.current),i=zn(Ln.current),Xn(t)){if(!X)throw Error(a(176));He(t.stateNode,t.memoizedProps,t)&&hi(t)}else t.stateNode=W(r,e,i,t)}return null;case 13:return Xe(Vn),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,i=!1,null===e?void 0!==t.memoizedProps.fallback&&Xn(t):i=null!==e.memoizedState,r&&!i&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Vn.current)?0===lo&&(lo=3):(0!==lo&&3!==lo||(lo=4),null===ro||0==(134217727&ho)&&0==(134217727&po)||Vo(ro,oo))),Z&&r&&(t.flags|=4),Y&&(r||i)&&(t.flags|=4),null);case 4:return Un(),ei(t),null===e&&ie(t.stateNode.containerInfo),null;case 10:return cn(t),null;case 19:if(Xe(Vn),null===(r=t.memoizedState))return null;if(i=0!=(64&t.flags),null===(o=r.rendering))if(i)fi(r,!1);else{if(0!==lo||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(o=Gn(e))){for(t.flags|=64,fi(r,!1),null!==(e=o.updateQueue)&&(t.updateQueue=e,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,e=n,r=t.child;null!==r;)n=e,(i=r).flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(o=i.alternate)?(i.childLanes=0,i.lanes=n,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,n=o.dependencies,i.dependencies=null===n?null:{lanes:n.lanes,firstContext:n.firstContext}),r=r.sibling;return $e(Vn,1&Vn.current|2),t.child}e=e.sibling}null!==r.tail&&Vt()>vo&&(t.flags|=64,i=!0,fi(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Gn(o))){if(t.flags|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),fi(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!Kn)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Vt()-r.renderingStartTime>vo&&1073741824!==n&&(t.flags|=64,i=!0,fi(r,!1),t.lanes=33554432);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Vt(),e.sibling=null,t=Vn.current,$e(Vn,i?1&t|2:1&t),e):null;case 23:case 24:return Jo(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function gi(e){switch(e.tag){case 1:ot(e.type)&&st();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Un(),Xe(nt),Xe(tt),tr(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Hn(e),null;case 13:return Xe(Vn),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return Xe(Vn),null;case 4:return Un(),null;case 10:return cn(e),null;case 23:case 24:return Jo(),null;default:return null}}function vi(e,t){try{var n="",r=t;do{n+=en(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function yi(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var bi="function"==typeof WeakMap?WeakMap:Map;function xi(e,t,n){(n=gn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){So||(So=!0,wo=r),yi(0,t)},n}function Si(e,t,n){(n=gn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return yi(0,t),r(i)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===_o?_o=new Set([this]):_o.add(this),yi(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var wi="function"==typeof WeakSet?WeakSet:Set;function _i(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){ds(e,t)}else t.current=null}function Ci(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:tn(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(Y&&256&t.flags&&Te(t.stateNode.containerInfo))}throw Error(a(163))}function Ai(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function Ei(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(ls(n,e),as(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:tn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&xn(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=L(n.child.stateNode);break;case 1:e=n.child.stateNode}xn(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&ge(e,n.type,n.memoizedProps,n));case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(X&&null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&We(n)))))}throw Error(a(163))}function Ti(e,t){if(Y)for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?_e(r):Ae(n.stateNode,n.memoizedProps)}else if(6===n.tag)r=n.stateNode,t?Ce(r):Ee(r,n.memoizedProps);else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Mi(e,t){if(ht&&"function"==typeof ht.onCommitFiberUnmount)try{ht.onCommitFiberUnmount(dt,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))ls(t,n);else{r=t;try{i()}catch(e){ds(r,e)}}n=n.next}while(n!==e)}break;case 1:if(_i(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){ds(t,e)}break;case 5:_i(t);break;case 4:Y?Li(e,t):Z&&Z&&(t=t.stateNode.containerInfo,e=Ie(t),ke(t,e))}}function Ii(e,t){for(var n=t;;)if(Mi(e,n),null===n.child||Y&&4===n.tag){if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else n.child.return=n,n=n.child}function Ri(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Pi(e){return 5===e.tag||3===e.tag||4===e.tag}function ki(e){if(Y){e:{for(var t=e.return;null!==t;){if(Pi(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(we(t),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Pi(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Oi(e,n,t):Ni(e,n,t)}}function Oi(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?be(n,e,t):fe(n,e);else if(4!==r&&null!==(e=e.child))for(Oi(e,t,n),e=e.sibling;null!==e;)Oi(e,t,n),e=e.sibling}function Ni(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?ye(n,e,t):pe(n,e);else if(4!==r&&null!==(e=e.child))for(Ni(e,t,n),e=e.sibling;null!==e;)Ni(e,t,n),e=e.sibling}function Li(e,t){for(var n,r,i=t,o=!1;;){if(!o){o=i.return;e:for(;;){if(null===o)throw Error(a(160));switch(n=o.stateNode,o.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}o=o.return}o=!0}if(5===i.tag||6===i.tag)Ii(e,i),r?Se(n,i.stateNode):xe(n,i.stateNode);else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(Mi(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(o=!1)}i.sibling.return=i.return,i=i.sibling}}function Di(e,t){if(Y){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ai(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&ve(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(a(162));return n=t.memoizedProps,void me(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(X&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,Ge(t.containerInfo))));case 13:return Bi(t),void zi(t);case 19:return void zi(t);case 23:case 24:return void Ti(t,null!==t.memoizedState)}throw Error(a(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Ai(3,t);case 12:case 23:case 24:return;case 13:return Bi(t),void zi(t);case 19:return void zi(t);case 3:X&&((n=t.stateNode).hydrate&&(n.hydrate=!1,Ge(n.containerInfo)))}e:if(Z){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,ke(t.containerInfo,t.pendingChildren);break e}throw Error(a(163))}}function Bi(e){null!==e.memoizedState&&(go=Vt(),Y&&Ti(e.child,!0))}function zi(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new wi),t.forEach((function(t){var r=ps.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Fi(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Ui=0,ji=1,Hi=2,Vi=3,Gi=4;if("function"==typeof Symbol&&Symbol.for){var Wi=Symbol.for;Ui=Wi("selector.component"),ji=Wi("selector.has_pseudo_class"),Hi=Wi("selector.role"),Vi=Wi("selector.test_id"),Gi=Wi("selector.text")}function qi(e){var t=$(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(a(364));return t}if(null===(e=se(e)))throw Error(a(362));return e.stateNode.current}function Ki(e,t){switch(t.$$typeof){case Ui:if(e.type===t.value)return!0;break;case ji:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],i=e[n++],o=t[i];if(5!==r.tag||!ce(r)){for(;null!=o&&Ki(r,o);)o=t[++i];if(i===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,i),r=r.sibling}}t=!1}return t;case Hi:if(5===e.tag&&ue(e.stateNode,t.value))return!0;break;case Gi:if((5===e.tag||6===e.tag)&&null!==(e=le(e))&&0<=e.indexOf(t.value))return!0;break;case Vi:if(5===e.tag&&("string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase()))return!0;break;default:throw Error(a(365,t))}return!1}function Ji(e){switch(e.$$typeof){case Ui:return"<"+(M(e.value)||"Unknown")+">";case ji:return":has("+(Ji(e)||"")+")";case Hi:return'[role="'+e.value+'"]';case Gi:return'"'+e.value+'"';case Vi:return'[data-testname="'+e.value+'"]';default:throw Error(a(365,e))}}function Qi(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var i=e[r++],o=e[r++],s=t[o];if(5!==i.tag||!ce(i)){for(;null!=s&&Ki(i,s);)s=t[++o];if(o===t.length)n.push(i);else for(i=i.child;null!==i;)e.push(i,o),i=i.sibling}}return n}function Yi(e,t){if(!oe)throw Error(a(363));e=Qi(e=qi(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)ce(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var Zi=null;var Xi=Math.ceil,$i=l.ReactCurrentDispatcher,eo=l.ReactCurrentOwner,to=l.IsSomeRendererActing,no=0,ro=null,io=null,oo=0,so=0,ao=Ze(0),lo=0,co=null,uo=0,ho=0,po=0,fo=0,mo=null,go=0,vo=1/0;function yo(){vo=Vt()+500}var bo,xo=null,So=!1,wo=null,_o=null,Co=!1,Ao=null,Eo=90,To=[],Mo=[],Io=null,Ro=0,Po=null,ko=-1,Oo=0,No=0,Lo=null,Do=!1;function Bo(){return 0!=(48&no)?Vt():-1!==ko?ko:ko=Vt()}function zo(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Gt()?1:2;if(0===Oo&&(Oo=uo),0!==Yt.transition){0!==No&&(No=null!==mo?mo.pendingLanes:0),e=Oo;var t=4186112&~No;return 0===(t&=-t)&&(0===(t=(e=4186112&~e)&-e)&&(t=8192)),t}return e=Gt(),0!=(4&no)&&98===e?e=yt(12,Oo):e=yt(e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),Oo),e}function Fo(e,t,n){if(50<Ro)throw Ro=0,Po=null,Error(a(185));if(null===(e=Uo(e,t)))return null;St(e,t,n),e===ro&&(po|=t,4===lo&&Vo(e,oo));var r=Gt();1===t?0!=(8&no)&&0==(48&no)?Go(e):(jo(e,n),0===no&&(yo(),Jt())):(0==(4&no)||98!==r&&99!==r||(null===Io?Io=new Set([e]):Io.add(e)),jo(e,n)),mo=e}function Uo(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function jo(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,i=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var l=31-wt(s),c=1<<l,u=o[l];if(-1===u){if(0==(c&r)||0!=(c&i)){u=t,mt(c);var d=ft;o[l]=10<=d?u+250:6<=d?u+5e3:-1}}else u<=t&&(e.expiredLanes|=c);s&=~c}if(r=gt(e,e===ro?oo:0),t=ft,0===r)null!==n&&(n!==Bt&&Tt(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==Bt&&Tt(n)}15===t?(n=Go.bind(null,e),null===Ft?(Ft=[n],Ut=Et(kt,Qt)):Ft.push(n),n=Bt):14===t?n=Kt(99,Go.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Kt(n,Ho.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function Ho(e){if(ko=-1,No=Oo=0,0!=(48&no))throw Error(a(327));var t=e.callbackNode;if(ss()&&e.callbackNode!==t)return null;var n=gt(e,e===ro?oo:0);if(0===n)return null;var r=n,i=no;no|=16;var o=Zo();for(ro===e&&oo===r||(yo(),Qo(e,r));;)try{es();break}catch(t){Yo(e,t)}if(an(),$i.current=o,no=i,null!==io?r=0:(ro=null,oo=0,r=lo),0!=(uo&po))Qo(e,0);else if(0!==r){if(2===r&&(no|=64,e.hydrate&&(e.hydrate=!1,Te(e.containerInfo)),0!==(n=vt(e))&&(r=Xo(e,n))),1===r)throw t=co,Qo(e,0),Vo(e,n),jo(e,Vt()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:rs(e);break;case 3:if(Vo(e,n),(62914560&n)===n&&10<(r=go+500-Vt())){if(0!==gt(e,0))break;if(((i=e.suspendedLanes)&n)!==n){Bo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=q(rs.bind(null,e),r);break}rs(e);break;case 4:if(Vo(e,n),(4186112&n)===n)break;for(r=e.eventTimes,i=-1;0<n;){var s=31-wt(n);o=1<<s,(s=r[s])>i&&(i=s),n&=~o}if(n=i,10<(n=(120>(n=Vt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Xi(n/1960))-n)){e.timeoutHandle=q(rs.bind(null,e),n);break}rs(e);break;default:throw Error(a(329))}}return jo(e,Vt()),e.callbackNode===t?Ho.bind(null,e):null}function Vo(e,t){for(t&=~fo,t&=~po,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),r=1<<n;e[n]=-1,t&=~r}}function Go(e){if(0!=(48&no))throw Error(a(327));if(ss(),e===ro&&0!=(e.expiredLanes&oo)){var t=oo,n=Xo(e,t);0!=(uo&po)&&(n=Xo(e,t=gt(e,t)))}else n=Xo(e,t=gt(e,0));if(0!==e.tag&&2===n&&(no|=64,e.hydrate&&(e.hydrate=!1,Te(e.containerInfo)),0!==(t=vt(e))&&(n=Xo(e,t))),1===n)throw n=co,Qo(e,0),Vo(e,t),jo(e,Vt()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,rs(e),jo(e,Vt()),null}function Wo(e,t){var n=no;no|=1;try{return e(t)}finally{0===(no=n)&&(yo(),Jt())}}function qo(e,t){var n=no;if(0!=(48&n))return e(t);no|=1;try{if(e)return qt(99,e.bind(null,t))}finally{no=n,Jt()}}function Ko(e,t){$e(ao,so),so|=t,uo|=t}function Jo(){so=ao.current,Xe(ao)}function Qo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==J&&(e.timeoutHandle=J,K(n)),null!==io)for(n=io.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&st();break;case 3:Un(),Xe(nt),Xe(tt),tr();break;case 5:Hn(r);break;case 4:Un();break;case 13:case 19:Xe(Vn);break;case 10:cn(r);break;case 23:case 24:Jo()}n=n.return}ro=e,io=Cs(e.current,null),oo=so=uo=t,lo=0,co=null,fo=po=ho=0}function Yo(e,t){for(;;){var n=io;try{if(an(),nr.current=Br,lr){for(var r=or.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}lr=!1}if(ir=0,ar=sr=or=null,cr=!1,eo.current=null,null===n||null===n.return){lo=1,co=t,io=null;break}e:{var o=e,s=n.return,a=n,l=t;if(t=oo,a.flags|=2048,a.firstEffect=a.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l;if(0==(2&a.mode)){var u=a.alternate;u?(a.updateQueue=u.updateQueue,a.memoizedState=u.memoizedState,a.lanes=u.lanes):(a.updateQueue=null,a.memoizedState=null)}var d=0!=(1&Vn.current),h=s;do{var p;if(p=13===h.tag){var f=h.memoizedState;if(null!==f)p=null!==f.dehydrated;else{var m=h.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!d)}}if(p){var g=h.updateQueue;if(null===g){var v=new Set;v.add(c),h.updateQueue=v}else g.add(c);if(0==(2&h.mode)){if(h.flags|=64,a.flags|=16384,a.flags&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var y=gn(-1,1);y.tag=2,vn(a,y)}a.lanes|=1;break e}l=void 0,a=t;var b=o.pingCache;if(null===b?(b=o.pingCache=new bi,l=new Set,b.set(c,l)):void 0===(l=b.get(c))&&(l=new Set,b.set(c,l)),!l.has(a)){l.add(a);var x=hs.bind(null,o,c,a);c.then(x,x)}h.flags|=4096,h.lanes=t;break e}h=h.return}while(null!==h);l=Error((M(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==lo&&(lo=2),l=vi(l,a),h=s;do{switch(h.tag){case 3:o=l,h.flags|=4096,t&=-t,h.lanes|=t,yn(h,xi(0,o,t));break e;case 1:o=l;var S=h.type,w=h.stateNode;if(0==(64&h.flags)&&("function"==typeof S.getDerivedStateFromError||null!==w&&"function"==typeof w.componentDidCatch&&(null===_o||!_o.has(w)))){h.flags|=4096,t&=-t,h.lanes|=t,yn(h,Si(h,o,t));break e}}h=h.return}while(null!==h)}ns(n)}catch(e){t=e,io===n&&null!==n&&(io=n=n.return);continue}break}}function Zo(){var e=$i.current;return $i.current=Br,null===e?Br:e}function Xo(e,t){var n=no;no|=16;var r=Zo();for(ro===e&&oo===t||Qo(e,t);;)try{$o();break}catch(t){Yo(e,t)}if(an(),no=n,$i.current=r,null!==io)throw Error(a(261));return ro=null,oo=0,lo}function $o(){for(;null!==io;)ts(io)}function es(){for(;null!==io&&!Mt();)ts(io)}function ts(e){var t=bo(e.alternate,e,so);e.memoizedProps=e.pendingProps,null===t?ns(e):io=t,eo.current=null}function ns(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=mi(n,t,so)))return void(io=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&so)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=gi(t)))return n.flags&=2047,void(io=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(io=t);io=t=e}while(null!==t);0===lo&&(lo=5)}function rs(e){var t=Gt();return qt(99,is.bind(null,e,t)),null}function is(e,t){do{ss()}while(null!==Ao);if(0!=(48&no))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,i=r,o=e.pendingLanes&~i;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=i,e.mutableReadLanes&=i,e.entangledLanes&=i,i=e.entanglements;for(var s=e.eventTimes,l=e.expirationTimes;0<o;){var c=31-wt(o),u=1<<c;i[c]=0,s[c]=-1,l[c]=-1,o&=~u}if(null!==Io&&0==(24&r)&&Io.has(e)&&Io.delete(e),e===ro&&(io=ro=null,oo=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){i=no,no|=32,eo.current=null,Lo=z(e.containerInfo),Do=!1,xo=r;do{try{os()}catch(e){if(null===xo)throw Error(a(330));ds(xo,e),xo=xo.nextEffect}}while(null!==xo);Lo=null,xo=r;do{try{for(s=e;null!==xo;){var d=xo.flags;if(16&d&&Y&&we(xo.stateNode),128&d){var h=xo.alternate;if(null!==h){var p=h.ref;null!==p&&("function"==typeof p?p(null):p.current=null)}}switch(1038&d){case 2:ki(xo),xo.flags&=-3;break;case 6:ki(xo),xo.flags&=-3,Di(xo.alternate,xo);break;case 1024:xo.flags&=-1025;break;case 1028:xo.flags&=-1025,Di(xo.alternate,xo);break;case 4:Di(xo.alternate,xo);break;case 8:l=s,o=xo,Y?Li(l,o):Ii(l,o);var f=o.alternate;Ri(o),null!==f&&Ri(f)}xo=xo.nextEffect}}catch(e){if(null===xo)throw Error(a(330));ds(xo,e),xo=xo.nextEffect}}while(null!==xo);Do&&re(),F(e.containerInfo),e.current=n,xo=r;do{try{for(d=e;null!==xo;){var m=xo.flags;if(36&m&&Ei(d,xo.alternate,xo),128&m){h=void 0;var g=xo.ref;if(null!==g){var v=xo.stateNode;if(5===xo.tag)h=L(v);else h=v;"function"==typeof g?g(h):g.current=h}}xo=xo.nextEffect}}catch(e){if(null===xo)throw Error(a(330));ds(xo,e),xo=xo.nextEffect}}while(null!==xo);xo=null,zt(),no=i}else e.current=n;if(Co)Co=!1,Ao=e,Eo=t;else for(xo=r;null!==xo;)t=xo.nextEffect,xo.nextEffect=null,8&xo.flags&&((m=xo).sibling=null,m.stateNode=null),xo=t;if(0===(r=e.pendingLanes)&&(_o=null),1===r?e===Po?Ro++:(Ro=0,Po=e):Ro=0,n=n.stateNode,ht&&"function"==typeof ht.onCommitFiberRoot)try{ht.onCommitFiberRoot(dt,n,void 0,64==(64&n.current.flags))}catch(e){}if(jo(e,Vt()),So)throw So=!1,e=wo,wo=null,e;return 0!=(8&no)||Jt(),null}function os(){for(;null!==xo;){var e=xo.alternate;Do||null===Lo||(0!=(8&xo.flags)?O(xo,Lo)&&(Do=!0,ne()):13===xo.tag&&Fi(e,xo)&&O(xo,Lo)&&(Do=!0,ne()));var t=xo.flags;0!=(256&t)&&Ci(e,xo),0==(512&t)||Co||(Co=!0,Kt(97,(function(){return ss(),null}))),xo=xo.nextEffect}}function ss(){if(90!==Eo){var e=97<Eo?97:Eo;return Eo=90,qt(e,cs)}return!1}function as(e,t){To.push(t,e),Co||(Co=!0,Kt(97,(function(){return ss(),null})))}function ls(e,t){Mo.push(t,e),Co||(Co=!0,Kt(97,(function(){return ss(),null})))}function cs(){if(null===Ao)return!1;var e=Ao;if(Ao=null,0!=(48&no))throw Error(a(331));var t=no;no|=32;var n=Mo;Mo=[];for(var r=0;r<n.length;r+=2){var i=n[r],o=n[r+1],s=i.destroy;if(i.destroy=void 0,"function"==typeof s)try{s()}catch(e){if(null===o)throw Error(a(330));ds(o,e)}}for(n=To,To=[],r=0;r<n.length;r+=2){i=n[r],o=n[r+1];try{var l=i.create;i.destroy=l()}catch(e){if(null===o)throw Error(a(330));ds(o,e)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return no=t,Jt(),!0}function us(e,t,n){vn(e,t=xi(0,t=vi(n,t),1)),t=Bo(),null!==(e=Uo(e,1))&&(St(e,1,t),jo(e,t))}function ds(e,t){if(3===e.tag)us(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){us(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===_o||!_o.has(r))){var i=Si(n,e=vi(t,e),1);if(vn(n,i),i=Bo(),null!==(n=Uo(n,1)))St(n,1,i),jo(n,i);else if("function"==typeof r.componentDidCatch&&(null===_o||!_o.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function hs(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Bo(),e.pingedLanes|=e.suspendedLanes&n,ro===e&&(oo&n)===n&&(4===lo||3===lo&&(62914560&oo)===oo&&500>Vt()-go?Qo(e,0):fo|=n),jo(e,t)}function ps(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Gt()?1:2:(0===Oo&&(Oo=uo),0===(t=bt(62914560&~Oo))&&(t=4194304))),n=Bo(),null!==(e=Uo(e,t))&&(St(e,t,n),jo(e,n))}bo=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||nt.current)Hr=!0;else{if(0==(n&r)){switch(Hr=!1,t.tag){case 3:Xr(t),$n();break;case 5:jn(t);break;case 1:ot(t.type)&&ct(t);break;case 4:Fn(t,t.stateNode.containerInfo);break;case 10:ln(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?ii(e,t,n):($e(Vn,1&Vn.current),null!==(t=di(e,t,n))?t.sibling:null);$e(Vn,1&Vn.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return ui(e,t,n);t.flags|=64}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),$e(Vn,Vn.current),r)break;return null;case 23:case 24:return t.lanes=0,Kr(e,t,n)}return di(e,t,n)}Hr=0!=(16384&e.flags)}else Hr=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=it(t,tt.current),dn(t,n),i=hr(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ot(r)){var o=!0;ct(t)}else o=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,fn(t);var s=r.getDerivedStateFromProps;"function"==typeof s&&wn(t,r,s,e),i.updater=_n,t.stateNode=i,i._reactInternals=t,Tn(t,r,e,n),t=Zr(null,t,r,!0,o,n)}else t.tag=0,Vr(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return _s(e)?1:0;if(null!=e){if((e=e.$$typeof)===g)return 11;if(e===b)return 14}return 2}(i),e=tn(i,e),o){case 0:t=Qr(null,t,i,e,n);break e;case 1:t=Yr(null,t,i,e,n);break e;case 11:t=Gr(null,t,i,e,n);break e;case 14:t=Wr(null,t,i,tn(i.type,e),r,n);break e}throw Error(a(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,Qr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 1:return r=t.type,i=t.pendingProps,Yr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 3:if(Xr(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,mn(e,t),bn(t,r,null,n),(r=t.memoizedState.element)===i)$n(),t=di(e,t,n);else{if((o=(i=t.stateNode).hydrate)&&(X?(qn=Ue(t.stateNode.containerInfo),Wn=t,o=Kn=!0):o=!1),o){if(X&&null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i<e.length;i+=2)o=e[i],s=e[i+1],Q?o._workInProgressVersionPrimary=s:o._workInProgressVersionSecondary=s,er.push(o);for(n=On(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Vr(e,t,r,n),$n();t=t.child}return t;case 5:return jn(t),null===e&&Yn(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,G(r,i)?s=null:null!==o&&G(r,o)&&(t.flags|=16),Jr(e,t),Vr(e,t,s,n),t.child;case 6:return null===e&&Yn(t),null;case 13:return ii(e,t,n);case 4:return Fn(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=kn(t,null,r,n):Vr(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Gr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 7:return Vr(e,t,t.pendingProps,n),t.child;case 8:case 12:return Vr(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,ln(t,o=i.value),null!==s){var l=s.value;if(0===(o=Zt(l,o)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,o):1073741823))){if(s.children===i.children&&!nt.current){t=di(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){s=l.child;for(var u=c.firstContext;null!==u;){if(u.context===r&&0!=(u.observedBits&o)){1===l.tag&&((u=gn(-1,n&-n)).tag=2,vn(l,u)),l.lanes|=n,null!==(u=l.alternate)&&(u.lanes|=n),un(l.return,n),c.lanes|=n;break}u=u.next}}else s=10===l.tag&&l.type===t.type?null:l.child;if(null!==s)s.return=l;else for(s=l;null!==s;){if(s===t){s=null;break}if(null!==(l=s.sibling)){l.return=s.return,s=l;break}s=s.return}l=s}}Vr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=(o=t.pendingProps).children,dn(t,n),r=r(i=hn(i,o.unstable_observedBits)),t.flags|=1,Vr(e,t,r,n),t.child;case 14:return o=tn(i=t.type,t.pendingProps),Wr(e,t,i,o=tn(i.type,o),r,n);case 15:return qr(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tn(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,ot(r)?(e=!0,ct(t)):e=!1,dn(t,n),An(t,r,i),Tn(t,r,i,n),Zr(null,t,r,!0,e,n);case 19:return ui(e,t,n);case 23:case 24:return Kr(e,t,n)}throw Error(a(156,t.tag))};var fs={current:!1},ms=s.unstable_flushAllWithoutAsserting,gs="function"==typeof ms;function vs(){if(void 0!==ms)return ms();for(var e=!1;ss();)e=!0;return e}function ys(t){try{vs(),function(t){if(null===Zi)try{var n=("require"+Math.random()).slice(0,7);Zi=(e&&e[n]).call(e,"timers").setImmediate}catch(e){Zi=function(e){var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}Zi(t)}((function(){vs()?ys(t):t()}))}catch(e){t(e)}}var bs=0,xs=!1;function Ss(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ws(e,t,n,r){return new Ss(e,t,n,r)}function _s(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Cs(e,t){var n=e.alternate;return null===n?((n=ws(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function As(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)_s(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case d:return Es(n.children,i,o,t);case w:s=8,i|=16;break;case h:s=8,i|=1;break;case p:return(e=ws(12,n,t,8|i)).elementType=p,e.type=p,e.lanes=o,e;case v:return(e=ws(13,n,t,i)).type=v,e.elementType=v,e.lanes=o,e;case y:return(e=ws(19,n,t,i)).elementType=y,e.lanes=o,e;case _:return Ts(n,i,o,t);case C:return(e=ws(24,n,t,i)).elementType=C,e.lanes=o,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case f:s=10;break e;case m:s=9;break e;case g:s=11;break e;case b:s=14;break e;case x:s=16,r=null;break e;case S:s=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=ws(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Es(e,t,n,r){return(e=ws(7,e,r,t)).lanes=n,e}function Ts(e,t,n,r){return(e=ws(23,e,r,t)).elementType=_,e.lanes=n,e}function Ms(e,t,n){return(e=ws(6,e,null,t)).lanes=n,e}function Is(e,t,n){return(t=ws(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rs(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=J,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=xt(0),this.expirationTimes=xt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xt(0),X&&(this.mutableSourceEagerHydrationData=null)}function Ps(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=k(t))?null:e.stateNode}function ks(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Os(e,t){ks(e,t),(e=e.alternate)&&ks(e,t)}function Ns(e){return null===(e=k(e))?null:e.stateNode}function Ls(){return null}return n.IsThisRendererActing=fs,n.act=function(e){function t(){bs--,to.current=n,fs.current=r}!1===xs&&(xs=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected.")),bs++;var n=to.current,r=fs.current;to.current=!0,fs.current=!0;try{var i=Wo(e)}catch(e){throw t(),e}if(null!==i&&"object"==typeof i&&"function"==typeof i.then)return{then:function(e,r){i.then((function(){1<bs||!0===gs&&!0===n?(t(),e()):ys((function(n){t(),n?r(n):e()}))}),(function(e){t(),r(e)}))}};try{1!==bs||!1!==gs&&!1!==n||vs(),t()}catch(e){throw t(),e}return{then:function(e){e()}}},n.attemptContinuousHydration=function(e){13===e.tag&&(Fo(e,67108864,Bo()),Os(e,67108864))},n.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=Bo(),n=zo(e);Fo(e,n,t),Os(e,n)}},n.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.hydrate){var n=mt(t.pendingLanes);t.expiredLanes|=n&t.pendingLanes,jo(t,Vt()),0==(48&no)&&(yo(),Jt())}break;case 13:var r=Bo();qo((function(){return Fo(e,1,r)})),Os(e,4)}},n.attemptUserBlockingHydration=function(e){13===e.tag&&(Fo(e,4,Bo()),Os(e,4))},n.batchedEventUpdates=function(e,t){var n=no;no|=2;try{return e(t)}finally{0===(no=n)&&(yo(),Jt())}},n.batchedUpdates=Wo,n.createComponentSelector=function(e){return{$$typeof:Ui,value:e}},n.createContainer=function(e,t,n){return e=new Rs(e,t,n),t=ws(3,null,null,2===t?7:1===t?3:0),e.current=t,t.stateNode=e,fn(t),e},n.createHasPsuedoClassSelector=function(e){return{$$typeof:ji,value:e}},n.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:u,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},n.createRoleSelector=function(e){return{$$typeof:Hi,value:e}},n.createTestNameSelector=function(e){return{$$typeof:Vi,value:e}},n.createTextSelector=function(e){return{$$typeof:Gi,value:e}},n.deferredUpdates=function(e){return qt(97,e)},n.discreteUpdates=function(e,t,n,r,i){var o=no;no|=4;try{return qt(98,e.bind(null,t,n,r,i))}finally{0===(no=o)&&(yo(),Jt())}},n.findAllNodes=Yi,n.findBoundingRects=function(e,t){if(!oe)throw Error(a(363));t=Yi(e,t),e=[];for(var n=0;n<t.length;n++)e.push(ae(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,i=r+n.width,o=n.y,s=o+n.height,l=t-1;0<=l;l--)if(t!==l){var c=e[l],u=c.x,d=u+c.width,h=c.y,p=h+c.height;if(r>=u&&o>=h&&i<=d&&s<=p){e.splice(t,1);break}if(!(r!==u||n.width!==c.width||p<o||h>s)){h>o&&(c.height+=h-o,c.y=o),p<s&&(c.height=s-h),e.splice(t,1);break}if(!(o!==h||n.height!==c.height||d<r||u>i)){u>r&&(c.width+=u-r,c.x=r),d<i&&(c.width=i-u),e.splice(t,1);break}}return e},n.findHostInstance=Ps,n.findHostInstanceWithNoPortals=function(e){return null===(e=function(e){if(!(e=P(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}(e))?null:20===e.tag?e.stateNode.instance:e.stateNode},n.findHostInstanceWithWarning=function(e){return Ps(e)},n.flushControlled=function(e){var t=no;no|=1;try{qt(99,e)}finally{0===(no=t)&&(yo(),Jt())}},n.flushDiscreteUpdates=function(){0==(49&no)&&(function(){if(null!==Io){var e=Io;Io=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,jo(e,Vt())}))}Jt()}(),ss())},n.flushPassiveEffects=ss,n.flushSync=qo,n.focusWithin=function(e,t){if(!oe)throw Error(a(363));for(t=Qi(e=qi(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!ce(n)){if(5===n.tag&&de(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},n.getCurrentUpdateLanePriority=function(){return pt},n.getFindAllNodesFailureDescription=function(e,t){if(!oe)throw Error(a(363));var n=0,r=[];e=[qi(e),0];for(var i=0;i<e.length;){var o=e[i++],s=e[i++],l=t[s];if((5!==o.tag||!ce(o))&&(Ki(o,l)&&(r.push(Ji(l)),++s>n&&(n=s)),s<t.length))for(o=o.child;null!==o;)e.push(o,s),o=o.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Ji(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},n.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?L(e.child.stateNode):e.child.stateNode:null},n.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:Ns,findFiberByHostInstance:e.findFiberByHostInstance||Ls,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.isDisabled&&t.supportsFiber)try{dt=t.inject(e),ht=t}catch(e){}e=!0}return e},n.observeVisibleRects=function(e,t,n,r){if(!oe)throw Error(a(363));e=Yi(e,t);var i=he(e,n,r).disconnect;return{disconnect:function(){i()}}},n.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},n.runWithPriority=function(e,t){var n=pt;try{return pt=e,t()}finally{pt=n}},n.shouldSuspend=function(){return!1},n.unbatchedUpdates=function(e,t){var n=no;no&=-2,no|=8;try{return e(t)}finally{0===(no=n)&&(yo(),Jt())}},n.updateContainer=function(e,t,n,r){var i=t.current,o=Bo(),s=zo(i);e:if(n){t:{if(I(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(ot(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var c=n.type;if(ot(c)){n=lt(n,c,l);break e}}n=l}else n=et;return null===t.context?t.context=n:t.pendingContext=n,(t=gn(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),vn(i,t),Fo(i,s,o),s},n}})),o("juxiN").register(JSON.parse('{"adfgW":"index.js","cmazm":"abap.bc6c1a94.js","jPTA1":"abnf.a3fdbafa.js","jdWNC":"actionscript.59d9b9ea.js","2CBqg":"ada.7ae8a3a8.js","3wHhO":"agda.c22a72e2.js","kFVdl":"al.43edf93f.js","3V4RR":"antlr4.fab93bd9.js","ksX9L":"apacheconf.1ea6f6bc.js","3N81M":"apex.5f5d0b00.js","lBh32":"apl.f0e0255a.js","1cOI2":"applescript.f8873ad2.js","hwV5I":"aql.0596cd74.js","cxQUy":"arduino.8a10351d.js","h8XDs":"arff.b6eba224.js","1glOK":"asciidoc.3591554e.js","5YI5Q":"asm6502.eb3baf93.js","5aM2c":"asmatmel.93b67168.js","aKcNk":"aspnet.a154be94.js","bYGuI":"csharp.60bc2788.js","4ffJ6":"autohotkey.dc99c6b5.js","6o8gr":"autoit.7bd54007.js","d0QlI":"avisynth.506bbdad.js","1vpfH":"avro-idl.ab78e3d7.js","d78C2":"basic.09310972.js","1V5ou":"batch.5c48c918.js","h9qnw":"bbcode.4e0cb2f2.js","eluAn":"bicep.e394696d.js","jD2Yh":"birb.54766d79.js","3ligT":"bison.2c2552ab.js","cSnAi":"bnf.ec556d42.js","gmloY":"brainfuck.4e81eb1d.js","77rtQ":"brightscript.3c7cc723.js","hfFki":"bro.8db28f8a.js","8SYqo":"bsl.260fabfb.js","i4HkI":"cfscript.92c90b90.js","1rBYK":"chaiscript.76481f4b.js","gQYEz":"cil.622792d1.js","bq2uf":"clike.36346267.js","h7tza":"clojure.9da4900e.js","aK2oY":"cmake.234b57e3.js","3V5TZ":"cobol.2e8bd2ea.js","72v5N":"coffeescript.261b318a.js","lNJYg":"concurnas.9d189a8c.js","cHo4f":"coq.917e2a53.js","7GKmU":"crystal.d23925f3.js","a5f4n":"cshtml.92086949.js","2nOzn":"csp.9b5dd573.js","iZH8k":"css-extras.7f3088a6.js","3V9km":"css.fb6f00e3.js","7TCh4":"csv.06af3522.js","8MqYl":"cypher.6af6e534.js","6Oo3A":"d.303192e5.js","6ks0D":"dart.6fb62874.js","huqsT":"dataweave.e97ef31d.js","YtcLG":"dax.013d5e9a.js","1s9Hz":"dhall.d5ee83ba.js","b677V":"diff.9ef56ea8.js","ak2pO":"django.13b0bb49.js","8LDFZ":"dns-zone-file.189b08c5.js","1awLf":"docker.1da9769e.js","9dPYr":"dot.8dca92f3.js","e2ZjS":"ebnf.58c0fa63.js","9h8KW":"editorconfig.9c7b63a5.js","4SWgd":"eiffel.090bab86.js","6HmuU":"ejs.0ee535c3.js","2KAkF":"elixir.dc192ee6.js","jPV3v":"elm.c88782bd.js","agNrQ":"erb.55ec7cf0.js","9BmS2":"erlang.956455fa.js","fqf1c":"etlua.79f6dba5.js","cgMSr":"lua.88c0a077.js","92McF":"excel-formula.d0dd1424.js","juFxG":"factor.e311ca38.js","1dWPh":"false.a93fe44c.js","2k0b2":"firestore-security-rules.4ea155d7.js","dvL1Q":"flow.96e0f48a.js","5oumN":"fortran.0811bc79.js","fP8jO":"fsharp.0119d0fd.js","7L6sP":"ftl.c5671dbe.js","2ujce":"gap.b0574953.js","hzgIA":"gcode.29260c31.js","5MUDD":"gdscript.545f127b.js","ghckm":"gedcom.d53f8a81.js","ian9z":"gherkin.0c5a099f.js","dsuH3":"git.2d89a25c.js","dvV8S":"glsl.0bf837a6.js","6BDWE":"gml.04204c1b.js","btSYt":"gn.cbb4c3be.js","j94Lr":"go-module.2bebc9b8.js","207xG":"go.cc49e5b2.js","iQ4Nh":"graphql.3d658adb.js","9E9pJ":"groovy.3e5836cd.js","hLXUt":"haml.9a056759.js","5ob5h":"handlebars.8c13dfe6.js","1nDhS":"haskell.3c80aa72.js","kQehe":"haxe.40a1dc98.js","1sziu":"hcl.84488f47.js","28Tam":"hlsl.323b0c17.js","awNOU":"hoon.df16cb45.js","eeLMI":"hpkp.9c950797.js","gjEKw":"hsts.0440ab7b.js","3bCJ7":"http.96d5f1c1.js","id4YZ":"ichigojam.c0bd16f5.js","5TKHe":"icon.439feb9f.js","eijPh":"icu-message-format.e96f6551.js","lv8gR":"idris.d3811412.js","bW8K3":"iecst.3fdbbc52.js","b8EBv":"ignore.00726ce9.js","jOS96":"inform7.65978ef5.js","dn3Yf":"ini.1cbb0515.js","iUSU6":"io.e628fd7e.js","6wbwo":"j.b959d174.js","5qA0j":"java.0ffd8069.js","hdx4d":"javadoc.b99752ae.js","jRMSs":"javadoclike.8cc3d825.js","l2DRD":"javascript.fe729813.js","cpOeo":"javastacktrace.cc22fb4b.js","fSVrK":"jexl.2cce5cc0.js","03mi8":"jolie.d8f352cd.js","j6YjP":"jq.65b95777.js","6JQIv":"js-extras.7d041902.js","5nVrm":"js-templates.a3463d0b.js","9gPZY":"jsdoc.0c5cc4d3.js","8q0xA":"json5.b9de5531.js","fIx8j":"jsonp.eefdc553.js","a3ur7":"jsstacktrace.8d3a2b71.js","bKtxi":"julia.679e1c74.js","9vqI0":"keepalived.e694c167.js","lDUCl":"keyman.d1406200.js","gcEXq":"kotlin.fd040b34.js","cxxOt":"kumir.b2072cfc.js","b8NIc":"kusto.98546fcc.js","iXz7U":"latex.ecc17a0d.js","9nRbn":"latte.18295a4f.js","lWxq2":"less.a8a986ab.js","7dEcL":"lilypond.0423d709.js","ck7Ll":"scheme.4039466f.js","hI3m3":"liquid.533f073c.js","7qpQZ":"lisp.b075bd53.js","8Cm1D":"livescript.2b19fb05.js","9sT8D":"llvm.6b74465d.js","gQkTU":"log.b74346d6.js","86y52":"lolcode.0fbc730a.js","6bXdx":"magma.bbb66246.js","hDIxO":"makefile.bf1a7653.js","4wRUQ":"markdown.4a5510a8.js","66rgq":"markup.973a8c4c.js","iAx9A":"matlab.caaa1e9f.js","5SXMq":"maxscript.58a0bf4d.js","gnQ55":"mel.c5da9d2e.js","8G54S":"mermaid.ced53190.js","gfXsu":"mizar.4e6d6035.js","7nZsb":"mongodb.5c4e0cf9.js","hUs37":"monkey.9be800f3.js","fKqwA":"moonscript.fc782589.js","luHXo":"n1ql.7f05115f.js","j0sqX":"n4js.318f41b7.js","avS2d":"nand2tetris-hdl.be3bb656.js","8fNUI":"naniscript.ec3afc9a.js","6PKtR":"nasm.1ee2623a.js","2LUGi":"neon.1d5a4ec8.js","esMLb":"nevod.6908715c.js","jQ8dR":"nginx.404fbeb4.js","1kuW2":"nim.36bf497b.js","7YxPR":"nix.3af3b6b2.js","b1EPY":"nsis.94e1fb71.js","j169M":"objectivec.49a6b342.js","1b4qw":"ocaml.c5fca1eb.js","c0JxA":"opencl.4194613a.js","54ivl":"openqasm.4b589cb3.js","kYO5l":"oz.498e9cbd.js","811Qi":"parigp.ed6a3789.js","gXO52":"parser.3329b2ab.js","4SQCy":"pascal.82aebbcf.js","9KuwN":"pascaligo.4bbd3a85.js","eM7TR":"pcaxis.e636466e.js","6w6GH":"peoplecode.32e124c6.js","eQPpI":"perl.7d72d7fd.js","b83gb":"php-extras.9606406b.js","l8BPM":"phpdoc.617f8af6.js","2cVRv":"plsql.482f8da9.js","gOyA3":"powerquery.486ee359.js","1BYb4":"powershell.856a4dd0.js","lIwm5":"processing.2c7d4403.js","cHCln":"prolog.812b5c86.js","d460J":"promql.8e6b9da4.js","lAnQP":"properties.40afd4d0.js","dG8OA":"protobuf.84963e3e.js","eRbDh":"psl.9c32166c.js","27W0o":"pug.54462c11.js","75Y4h":"puppet.2646aef5.js","kgGGG":"pure.a10bd6b4.js","hFuIq":"purebasic.629b75cd.js","db2yj":"purescript.216751ba.js","8ZppB":"q.b46a94a4.js","iFM89":"qml.bd71f711.js","7FNJV":"qore.d7e006f8.js","6AsUF":"qsharp.7bab07d1.js","7Xrsp":"r.3036c5c0.js","dh9BI":"racket.b867dd29.js","8pRTf":"reason.405183ad.js","kUbHD":"regex.aa4684b4.js","bNx4l":"rego.61da6b5d.js","jbksA":"renpy.ff0ce389.js","gP26j":"rest.91bee177.js","6FCYh":"rip.33f479a4.js","lEjxk":"roboconf.0ba2e9bf.js","c8BOJ":"robotframework.72ccad61.js","elAoE":"rust.9a35cb62.js","eDL1o":"sas.b3b3be64.js","gIQMB":"sass.165275f3.js","i7Y8T":"scala.a51a6234.js","OzRer":"shell-session.c47a7880.js","hZA2W":"smali.46e3f703.js","gT51y":"smalltalk.fb31e155.js","2OoIP":"smarty.abd6973e.js","33hrk":"sml.6d8c2545.js","3uuqi":"solidity.80562c5b.js","kHJvD":"solution-file.30e00f5f.js","6iiDq":"soy.46a7ec1f.js","2TkEp":"sparql.dbb56be0.js","eirDq":"turtle.b8836781.js","jmDes":"splunk-spl.149146f6.js","81dr7":"sqf.ea070acb.js","i4XqC":"squirrel.1efaf6f3.js","1zw3p":"stan.6efb4565.js","kfIG2":"stylus.d4d41ca4.js","dksml":"swift.ea86fdd0.js","4w3mZ":"systemd.df819c28.js","6b6p1":"t4-cs.b3eaa646.js","budu0":"t4-templating.db399052.js","7RUUk":"t4-vb.082c208c.js","2cwdT":"vbnet.ac572fcc.js","fBA7X":"tap.82e5520b.js","gqbYu":"yaml.3d0bf472.js","lCVk7":"tcl.fffb53bb.js","aKXaK":"textile.20ae1d45.js","ks7hU":"toml.69754057.js","kCJbl":"tremor.262b95d4.js","iZ71n":"tt2.f07906cb.js","5mLLA":"twig.a95c4964.js","i9AIa":"typoscript.3dbd38d9.js","iHNMy":"unrealscript.e5c3fc1d.js","bKWLJ":"uorazor.cf3ed6dc.js","2XcAn":"uri.59c4e10c.js","enDcg":"v.fe8e0874.js","db4Ta":"vala.386e6270.js","cmaSk":"velocity.9a0ffb21.js","29RKO":"verilog.4308f028.js","4aBVG":"vhdl.ca8ee4c0.js","6Jrfy":"vim.897929a5.js","kNyzl":"visual-basic.bc36aaac.js","4LJ5s":"warpscript.6d00b50f.js","6Ocza":"wasm.029f651e.js","hvPGO":"web-idl.97fc763d.js","lS90V":"wiki.1179d7f8.js","9LY8Y":"wolfram.7017e6a0.js","bFBdJ":"wren.d4121438.js","iskNq":"xeora.cce693be.js","ek7X7":"xml-doc.025d4193.js","hwA94":"xojo.843f212e.js","f8rnQ":"xquery.50701bd4.js","3Q9qv":"yang.2c70775f.js","a0Oht":"zig.e33efe11.js","dnGOp":"core.ade097c7.js"}'));var s;s=o("9Hk4c");var a={};!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),a=o("bU6y3");var l,c=o("85Hg2");l=o("bG9xl")();const u=e=>e?new URL(e.startsWith("http")?e:`https://${e}`).origin:"https://backend.memori.ai";var d=o("dCyaf");const h=(e,n)=>t(d)(`${n.apiUrl}${e}`,{...n,body:(null==n?void 0:n.body)?JSON.stringify(n.body):void 0,mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",...null==n?void 0:n.headers}}).then((e=>(null==n?void 0:n.text)?e.text():e.json()));var p=e=>({getTenantPublicMemoriList:t=>h(`/TenantPublicMemori/${encodeURIComponent(t)}`,{apiUrl:e}),getTenantMetaverseMemoriList:t=>h(`/TenantMetaverseMemori/${encodeURIComponent(t)}`,{apiUrl:e}),getPublicMemoriList:t=>h(`/PublicMemori/${t}`,{apiUrl:e}),getAllMemori:t=>h(`/AllMemori/${t}`,{apiUrl:e}),getUserByIDMemoriList:(t,n,r)=>h(`/UserMemoriByID/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e}),getUserMemoriList:(t,n,r)=>h(`/UserMemori/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e}),getMemoriList:t=>h(`/Memori/${t}`,{apiUrl:e}),getSharedMemoriList:t=>h(`/SharedMemori/${t}`,{apiUrl:e}),getTenantCategories:t=>h(`/TenantMemoriCategories/${encodeURIComponent(t)}`,{apiUrl:e}),getMemoriConfigs:t=>h(`/MemoriConfigs/${t}`,{apiUrl:e}),createMemori:(t,n)=>h(`/Memori/${t}`,{apiUrl:e,body:n,method:"POST"}),updateMemori:(t,n)=>h(`/Memori/${t}/${n.memoriID}`,{apiUrl:e,body:n,method:"PATCH"}),deleteMemori:(t,n)=>h(`/Memori/${t}`,{apiUrl:e,body:n,method:"DELETE"}),getMemoriById:(t,n)=>h(`/Memori/${t}/${n}`,{apiUrl:e}),getMemoriByUserAndId:(t,n,r,i)=>h(`/MemoriById/${t}/${n}/${r}${i?`/${i}`:""}`,{apiUrl:e}),getMemori:(t,n,r,i)=>h(`/Memori/${encodeURIComponent(t)}/${encodeURIComponent(n)}/${encodeURIComponent(r)}/${null!=i?i:""}`,{apiUrl:e}),getMemoriSessions:(t,n,r,i)=>h(`/MemoriSessions/${t}/${n}${r?`/${r}`:""}${r&&i?`/${i}`:""}`,{apiUrl:e}),transferMemori:(t,n)=>h(`/TransferMemori/${t}`,{apiUrl:e,body:n,method:"POST"}),memoriContentUpdated:(t,n)=>h(`/MemoriContentUpdated/${t}/${n}`,{apiUrl:e,method:"POST"})}),f=e=>({userSignUp:t=>h("/User",{apiUrl:e,body:t,method:"POST"}),userConfirmSignUp:t=>h("/UserConfirm",{apiUrl:e,body:t,method:"POST"}),userLogin:t=>h("/Login",{apiUrl:e,body:t,method:"POST"}),userLogout:t=>h(`/Logout/${t}`,{apiUrl:e,method:"POST"}),getCurrentUser:t=>h(`/User/${t}`,{apiUrl:e}),getUser:(t,n)=>h(`/User/${t}/${n}`,{apiUrl:e}),getUsersList:t=>h(`/Users/${t}`,{apiUrl:e}),deleteUser:(t,n)=>h(`/User/${t}/${n}`,{apiUrl:e,method:"DELETE"}),updateUser:(t,n,r)=>h(`/User/${t}/${n}`,{apiUrl:e,method:"PATCH",body:r}),resetPassword:t=>h("/ResetPassword",{apiUrl:e,body:t,method:"POST"}),resetConfirm:t=>h("/ResetConfirm",{apiUrl:e,body:t,method:"POST"}),recoverUsername:t=>h("/RecoverUsername",{apiUrl:e,body:t,method:"POST"}),getTenantConfig:t=>h(`/Tenant/${t}`,{apiUrl:e}),resendVerificationCode:t=>h("/ResendVerificationCode",{apiUrl:e,body:t,method:"POST"}),createUser:(t,n)=>h(`/User/${t}`,{apiUrl:e,body:n,method:"POST"})}),m=e=>({getMemoriIntegrationsList:(t,n)=>h(`/Integrations/${t}/${n}`,{apiUrl:e}),getAllIntegrationsList:t=>h(`/AllIntegrations/${t}`,{apiUrl:e}),getIntegration:(t,n)=>h(`/Integration/${t}/${n}`,{apiUrl:e}),deleteIntegration:(t,n)=>h(`/Integration/${t}/${n}`,{apiUrl:e,method:"DELETE"}),createIntegration:(t,n)=>h(`/Integration/${t}`,{apiUrl:e,method:"POST",body:n}),updateIntegration:(t,n,r)=>h(`/Integration/${t}/${n}`,{apiUrl:e,method:"PATCH",body:r})}),g=e=>({getUploadAssetURL:(t,n,r)=>`${e}/Asset/${t}${n?`/${n}`:""}${r?`/${r}`:""}`,uploadAsset:async(t,n,r,i,o)=>{const s=new FormData,a=await fetch(n),l=await a.blob();s.append(t,l,t);const c=await fetch(`${e}/Asset/${r}${i?`/${i}`:""}${o?`/${o}`:""}`,{method:"POST",body:s});return await c.json()},getAsset:(t,n)=>h(`/Asset/${t}/${n}`,{apiUrl:e,method:"GET"}),updateAsset:(t,n,r)=>h(`/Asset/${t}/${n.split("/").reverse()[0]}`,{apiUrl:e,method:"PATCH",body:r}),deleteAsset:(t,n)=>h(`/Asset/${t}/${n.split("/").reverse()[0]}`,{apiUrl:e,method:"DELETE"})}),v=e=>({getSentInvitations:t=>h(`/SentInvitations/${t}`,{apiUrl:e}),getMemoriInvitations:(t,n)=>h(`/MemoriInvitations/${t}/${n}`,{apiUrl:e}),getReceivedInvitations:t=>h(`/ReceivedInvitations/${t}`,{apiUrl:e}),getAllInvitations:t=>h(`/AllInvitations/${t}`,{apiUrl:e}),getInvitation:(t,n)=>h(`/Invitation/${t}/${n}`,{apiUrl:e}),updateInvitation:(t,n)=>h(`/Invitation/${t}/${n.invitationID}`,{apiUrl:e,method:"PATCH",body:n}),deleteInvitation:(t,n)=>h(`/Invitation/${t}/${n}`,{apiUrl:e,method:"DELETE"}),acceptInvitation:(t,n)=>h(`/AcceptInvitation/${t}/${n}`,{apiUrl:e,method:"POST"}),rejectInvitation:(t,n)=>h(`/RejectInvitation/${t}/${n}`,{apiUrl:e,method:"POST"}),sendInvitation:(t,n)=>h(`/SendInvitation/${t}`,{apiUrl:e,method:"POST",body:n})}),y=e=>({getTenantConsumptionLogs:(t,n,r,i,o)=>h(`/TenantConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e}),getUserConsumptionLogs:(t,n,r,i,o)=>h(`/UserConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e}),getMemoriConsumptionLogs:(t,n,r,i,o)=>h(`/MemoriConsumptionLogs/${t}/${n}/${r}${i?`/${i}`:""}${i&&o?`/${o}`:""}`,{apiUrl:e})}),b=e=>({getTenantNotifications:t=>h(`/TenantNotifications/${t}`,{apiUrl:e}),getUserNotifications:t=>h(`/UserNotifications/${t}`,{apiUrl:e})}),x=e=>({importCSV:async(t,n,r,i)=>h(`/ImportExport/ImportCSV/${t}/${n}`,{apiUrl:e,method:"POST",body:{rows:r,...i}}),importTXT:async(t,n,r,i)=>h(`/ImportExport/ImportTXT/${t}/${n}`,{apiUrl:e,method:"POST",body:{rows:r,...i}}),exportCSV:async(t,n,r,i)=>h(`/ImportExport/ExportCSV/${t}/${n}`,{apiUrl:e,method:"POST",body:{csvSpecs:r,password:i},text:!0}),exportJSONL:async(t,n,r,i)=>h(`/ImportExport/ExportJSONL/${t}/${n}`,{apiUrl:e,method:"POST",body:{jsonlSpecs:r,password:i},text:!0})}),S=e=>({getProcesses:async(t,n)=>h(`/Processes/${t}${n?`/${n}`:""}`,{apiUrl:e,method:"GET"}),getMemoriProcesses:async(t,n,r)=>h(`/MemoriProcesses/${t}/${n}${r?`/${r}`:""}`,{apiUrl:e,method:"GET"}),getProcessStatus:async(t,n)=>h(`/ProcessStatus/${t}/${n}`,{apiUrl:e,method:"GET"}),stopProcess:async(t,n)=>h(`/StopProcess/${t}/${n}`,{apiUrl:e,method:"POST"})}),w=e=>({analyzeUserQuery:async(t,n,r)=>h(`/Analysis/AnalyzeUserQuery/${t}/${n}`,{apiUrl:e,method:"POST",body:{...r}}),getUserQueryMatches:async(t,n,r,i,o)=>h(`/Analysis/AnalyzeUserQuery/${t}/${n}/${r}/${i}${o?`/${o}`:""}`,{apiUrl:e,method:"GET"})});var _=e=>({asset:g(e),memori:p(e),user:f(e),integration:m(e),invitation:v(e),consumptionLogs:y(e),notifications:b(e),importExport:x(e),process:S(e),analysis:w(e),...g(e),...p(e),...f(e),...m(e),...v(e),...y(e),...b(e),...x(e),...S(e),...w(e)}),C=e=>({getCorrelationPairs:async(t,n,r)=>h(`/CorrelationPairs/${t}${n?`/${n}${r?`/${r}`:""}`:""}`,{method:"GET",apiUrl:e}),postCorrelationPair:async(t,n)=>h(`/CorrelationPair/${t}`,{method:"POST",apiUrl:e,body:n}),deleteCorrelationPair:async(t,n)=>h(`/CorrelationPair/${t}/${n}`,{method:"DELETE",apiUrl:e})}),A=e=>({postTextEnteredEvent:async({sessionId:t,text:n})=>h(`/TextEnteredEvent/${t}`,{method:"POST",apiUrl:e,body:{text:n}}),postPlaceChangedEvent:async({sessionId:t,placeName:n,latitude:r,longitude:i,uncertaintyKm:o})=>h(`/PlaceChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{placeName:n,latitude:r,longitude:i,uncertaintyKm:o}}),postDateChangedEvent:async(t,n)=>h(`/DateChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{date:n}}),postTagChangedEvent:async(t,n)=>h(`/TagChangedEvent/${t}`,{method:"POST",apiUrl:e,body:{tag:n}}),postTimeoutEvent:async t=>h(`/TimeoutEvent/${t}`,{method:"POST",apiUrl:e}),postMediumSelectedEvent:async(t,n)=>h(`/MediumSelectedEvent/${t}`,{method:"POST",apiUrl:e,body:{medium:n}}),postDateSelectedEvent:async t=>h(`/DateSelectedEvent/${t}`,{method:"GET",apiUrl:e}),postPlaceSelectedEvent:async t=>h(`/PlaceSelectedEvent/${t}`,{method:"GET",apiUrl:e}),postTagSelectedEvent:async t=>h(`/TagSelectedEvent/${t}`,{method:"GET",apiUrl:e})}),E=e=>({getIntents:async t=>h(`/Intents/${t}`,{method:"GET",apiUrl:e}),getIntent:async(t,n)=>h(`/Intent/${t}/${n}`,{method:"GET",apiUrl:e}),patchIntent:async(t,n)=>h(`/Intent/${t}/${n.intentID}`,{method:"PATCH",apiUrl:e,body:n}),deleteIntent:async(t,n)=>h(`/Intent/${t}/${n}`,{method:"DELETE",apiUrl:e}),createIntent:async(t,n)=>h(`/Intent/${t}`,{method:"POST",apiUrl:e,body:n}),getIntentSlots:async t=>h(`/IntentSlots/${t}`,{method:"GET",apiUrl:e}),getIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n}`,{method:"GET",apiUrl:e}),patchIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n.intentSlotID}`,{method:"PATCH",apiUrl:e,body:n}),deleteIntentSlot:async(t,n)=>h(`/IntentSlot/${t}/${n}`,{method:"DELETE",apiUrl:e}),createIntentSlot:async(t,n)=>h(`/IntentSlot/${t}`,{method:"POST",apiUrl:e,body:n})}),T=e=>({getLocalizationKeys:async t=>h(`/LocalizationKeys/${t}`,{method:"GET",apiUrl:e}),getLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}/${n}`,{method:"GET",apiUrl:e}),deleteLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}/${n}`,{method:"DELETE",apiUrl:e}),postLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}`,{method:"POST",apiUrl:e,body:n}),patchLocalizationKey:async(t,n)=>h(`/LocalizationKey/${t}`,{method:"PATCH",apiUrl:e,body:n})}),M=e=>({getMedia:async(t,n)=>h(`/Media/${t}/${n}`,{method:"GET",apiUrl:e}),deleteMedia:async(t,n)=>h(`/Media/${t}/${n}`,{method:"DELETE",apiUrl:e}),getMedium:async(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),patchMedium:async(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),deleteMedium:(t,n,r)=>h(`/Medium/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),postMedium:async(t,n)=>h(`/Medium/${t}/${n}`,{method:"GET",apiUrl:e})}),I=e=>({getMemories:async(t,n)=>h(`/Memories/${t}${n?`/${n}`:""}`,{method:"GET",apiUrl:e}),getMemoriesPaginated:async(t,n,r,i)=>h(`/Memories/${t}/${n}/${r}${i?`/${i}`:""}`,{method:"GET",apiUrl:e}),getMemory:async(t,n)=>h(`/Memory/${t}/${n}`,{method:"GET",apiUrl:e}),patchMemory:async(t,n)=>h(`/Memory/${t}/${n.memoryID}`,{method:"PATCH",apiUrl:e,body:n}),deleteMemory:async(t,n)=>h(`/Memory/${t}/${n}`,{method:"DELETE",apiUrl:e}),postMemory:async(t,n)=>h(`/Memory/${t}`,{method:"POST",apiUrl:e,body:n}),getMemoryAccess:async(t,n)=>h(`/MemoryAccess/${t}/${n}`,{method:"GET",apiUrl:e})}),R=e=>({getWordVector:async(t,n)=>h(`/WordVector/${t}/${n}`,{method:"GET",apiUrl:e}),getSimilarWords:async(t,n)=>h(`/SimilarWords/${t}/${n}`,{method:"GET",apiUrl:e}),guessLanguage:async(t,n)=>h(`/GuessLanguage/${t}`,{method:"POST",apiUrl:e,body:{text:n}}),computeSimilarity:async(t,n,r,i,o)=>h(`/ComputeSimilarity/${t}`,{method:"POST",apiUrl:e,body:{referenceText:n,referenceTextType:r,comparisonText:i,comparisonTextType:o}}),checkWords:async(t,n)=>h(`/CheckWords/${t}`,{method:"POST",apiUrl:e,body:{text:n}})}),P=e=>({getPeople:async t=>h(`/People/${t}`,{method:"GET",apiUrl:e}),getPerson:async(t,n)=>h(`/Person/${t}/${n}`,{method:"GET",apiUrl:e}),patchPerson:async(t,n)=>h(`/Person/${t}/${n.personID}`,{method:"PATCH",body:n,apiUrl:e}),deletePerson:async(t,n)=>h(`/Person/${t}/${n}`,{method:"DELETE",apiUrl:e}),postPerson:async(t,n)=>h(`/Person/${t}`,{method:"POST",body:n,apiUrl:e})}),k=e=>({searchMemory:async(t,n)=>h(`/Search/${t}`,{method:"POST",body:n,apiUrl:e}),getRandomMemory:async(t,n)=>h(`/Random/${t}`,{method:"POST",body:n,apiUrl:e}),getHints:async(t,n)=>h(`/Hints/${t}`,{method:"POST",body:n,apiUrl:e}),getMemoryTags:async t=>h(`/MemoryTags/${t}`,{method:"GET",apiUrl:e})}),O=e=>({initSession:async t=>h("/Session",{method:"POST",body:t,apiUrl:e}),getSession:async t=>h(`/Session/${t}`,{method:"GET",apiUrl:e}),deleteSession:async t=>h(`/Session/${t}`,{method:"DELETE",apiUrl:e})}),N=e=>({getStatistics:async t=>h(`/Statistics/${t}`,{method:"GET",apiUrl:e}),getContentQualityIndexes:async t=>h(`/ContentQualityIndexes/${t}`,{method:"GET",apiUrl:e}),getTextQualityIndexes:async t=>h(`/TextQualityIndexes/${t}`,{method:"GET",apiUrl:e}),getEventLogs:async(t,n,r)=>h(`/EventLogs/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getMemoryEventLogs:async(t,n,r,i)=>h(`/EventLogs/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e}),getIntentEventLogs:async(t,n,r,i)=>h(`/EventLogs/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e})}),D=e=>({getUnansweredQuestions:async t=>h(`/UnansweredQuestions/${t}`,{method:"GET",apiUrl:e}),getUnansweredQuestionsPaginated:async(t,n,r)=>h(`/UnansweredQuestions/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),postUnansweredQuestion:async(t,n)=>h(`/UnansweredQuestion/${t}`,{method:"POST",apiUrl:e,body:n}),deleteUnansweredQuestion:async(t,n)=>h(`/UnansweredQuestion/${t}/${n}`,{method:"DELETE",apiUrl:e})}),B=e=>({getContextVars:async t=>h(`/ContextVars/${t}`,{method:"GET",apiUrl:e}),getContextVarNames:async t=>h(`/ContextVarNames/${t}`,{method:"GET",apiUrl:e}),getContextVarValues:async(t,n)=>h(`/ContextVarValues/${t}/${n}`,{method:"GET",apiUrl:e})}),z=e=>({getCustomWords:async t=>h(`/CustomWords/${t}`,{method:"GET",apiUrl:e}),getCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n}`,{method:"GET",apiUrl:e}),deleteCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n}`,{method:"DELETE",apiUrl:e}),postCustomWord:async(t,n)=>h(`/CustomWord/${t}`,{method:"POST",apiUrl:e,body:n}),patchCustomWord:async(t,n)=>h(`/CustomWord/${t}/${n.customWordID}`,{method:"PATCH",apiUrl:e,body:n})}),F=e=>({getChatLogs:async(t,n,r)=>h(`/ChatLogs/${t}${n?`/${n}`:""}${n&&r?`/${r}`:""}`,{method:"GET",apiUrl:e}),getSessionChatLogs:async(t,n)=>h(`/SessionChatLogs/${t}/${n}`,{method:"GET",apiUrl:e}),deleteChatLogs:async(t,n,r)=>h(`/ChatLogs/${t}${n?`/${n}`:""}${n&&r?`/${r}`:""}`,{method:"DELETE",apiUrl:e}),deleteChatLog:async(t,n)=>h(`/ChatLog/${t}/${n}`,{method:"DELETE",apiUrl:e})}),U=e=>({getExpertReferences:async t=>h(`/ExpertReferences/${t}`,{method:"GET",apiUrl:e}),getExpertReferencesPaginated:async(t,n,r)=>h(`/ExpertReferences/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n}`,{method:"GET",apiUrl:e}),updateExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n.expertID}`,{method:"PATCH",apiUrl:e,body:n}),createExpertReference:async(t,n)=>h(`/ExpertReference/${t}`,{method:"POST",apiUrl:e,body:n}),deleteExpertReference:async(t,n)=>h(`/ExpertReference/${t}/${n}`,{method:"DELETE",apiUrl:e})}),j=e=>({getKnownFacts:async t=>h(`/KnownFacts/${t}`,{method:"GET",apiUrl:e}),getKnownFactsPaginated:async(t,n,r)=>h(`/KnownFacts/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getKnownFact:async(t,n)=>h(`/KnownFact/${t}/${n}`,{method:"GET",apiUrl:e}),deleteKnownFact:async(t,n)=>h(`/KnownFact/${t}/${n}`,{method:"DELETE",apiUrl:e})}),H=e=>({getMemoriUsers:async t=>h(`/Users/${t}`,{method:"GET",apiUrl:e}),getMemoriUsersPaginated:async(t,n,r)=>h(`/Users/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getMemoriUser:async(t,n)=>h(`/User/${t}/${n}`,{method:"GET",apiUrl:e}),getMemoriUserTopics:async(t,n)=>h(`/UserTopics/${t}/${n}`,{method:"GET",apiUrl:e}),getMemoriUserTopicsPaginated:async(t,n,r,i)=>h(`/UserTopics/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e})}),V=e=>({getTopics:async t=>h(`/Topics/${t}`,{method:"GET",apiUrl:e}),getTopicsPaginated:async(t,n,r)=>h(`/Topics/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getTopic:async(t,n)=>h(`/Topic/${t}/${n}`,{method:"GET",apiUrl:e}),getTopicUsers:async(t,n)=>h(`/TopicUsers/${t}/${n}`,{method:"GET",apiUrl:e}),getTopicUsersPaginated:async(t,n,r,i)=>h(`/TopicUsers/${t}/${n}/${r}/${i}`,{method:"GET",apiUrl:e})}),G=e=>({getAllFunctions:async t=>h(`/Functions/${t}`,{method:"GET",apiUrl:e}),getFunctionsPaginated:async(t,n,r)=>h(`/Functions/${t}/${n}/${r}`,{method:"GET",apiUrl:e}),getFunction:async(t,n)=>h(`/Function/${t}/${n}`,{method:"GET",apiUrl:e}),patchFunction:async(t,n)=>h(`/Function/${t}/${n.functionID}`,{method:"PATCH",apiUrl:e,body:n}),deleteFunction:async(t,n)=>h(`/Function/${t}/${n}`,{method:"DELETE",apiUrl:e}),createFunction:async(t,n)=>h(`/Function/${t}`,{method:"POST",apiUrl:e,body:n})}),W=e=>({correlationPairs:C(e),...C(e),dialog:A(e),...A(e),intents:E(e),...E(e),localizationKeys:T(e),...T(e),media:M(e),...M(e),memories:I(e),...I(e),nlp:R(e),...R(e),people:P(e),...P(e),search:k(e),...k(e),session:O(e),...O(e),stats:N(e),...N(e),unansweredQuestions:D(e),...D(e),contextVars:B(e),...B(e),customDictionary:z(e),...z(e),chatLogs:F(e),...F(e),expertReferences:U(e),...U(e),knownFacts:j(e),...j(e),user:H(e),...H(e),topics:V(e),...V(e),functions:G(e),...G(e)}),q={};e(q,"allowedMediaTypes",(()=>K)),e(q,"anonTag",(()=>J));const K=["image/jpeg","image/png","image/jpg","image/gif","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/pdf","video/mp4","video/avi","audio/mpeg3","audio/wav","audio/mpeg","video/mpeg","model/gltf-binary"],J="👤";var Q=e=>({getResourceUrl:({type:t,resourceURI:n,sessionID:r,baseURL:i="https://aisuru.com"})=>{let o="cover"===t?`${i}/images/memoriCover.png`:`${i}/images/memoriAvatar.png`;return n&&0!==n.length?n.includes("memoriai/memory")?`${n}?memori-ai-session-id=${r}`:n.startsWith("https://")||n.startsWith("http://")?`${n}${r?`/${r}`:""}`:n.startsWith("cloud://")?`${e.replace(/v2/,"v1")}/CloudAsset/${n.replace("cloud://","")}`:n.startsWith("guid://")?`${e.replace(/v2/,"v1")}/GuidAsset/${n.replace("guid://","")}`:o:o}});var Y=(e,t)=>{const n=u(e),r=u(t),i=`${n}/api/v2`,o=t?`${r}/memori/v2`:`${n.replace("backend","engine")}/memori/v2`;return{backend:_(i),...W(o),constants:{...q,BACKEND_URL:i,ENGINE_URL:o},asset:Q(i)}},Z=(c=o("85Hg2"),o("hcaHr")),X={},$=o("k9HYU");(X=function(e,t,n){return(t=$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}).__esModule=!0,X.default=X;c=o("85Hg2");var ee=o("ffgrs"),te=o("22y1y"),ne=(c=o("85Hg2"),/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g),re={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ie=function(e){return re[e]};var oe,se={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(ne,ie)}},ae=(0,c.createContext)();function le(){return se}var ce=function(){function e(){t(ee)(this,e),this.usedNamespaces={}}return t(te)(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function ue(){return oe}function de(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var he={};function pe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&he[t[0]]||("string"==typeof t[0]&&(he[t[0]]=new Date),de.apply(void 0,t))}function fe(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}function me(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e))))}function ge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return pe("i18n.languages were undefined or empty",t.languages),!0;var r=void 0!==t.options.ignoreJSONStructure;return r?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):me(e,t,n)}function ve(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?ye(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ye(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xe=function(e,t){var n=(0,c.useRef)();return(0,c.useEffect)((function(){n.current=t?n.current:e}),[e,t]),n.current};function Se(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.i18n,i=(0,c.useContext)(ae)||{},o=i.i18n,s=i.defaultNS,a=r||o||ue();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new ce),!a){pe("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},u=[l,{},!1];return u.t=l,u.i18n={},u.ready=!1,u}a.options.react&&void 0!==a.options.react.wait&&pe("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=be(be(be({},le()),a.options.react),n),h=d.useSuspense,p=d.keyPrefix,f=e||s||a.options&&a.options.defaultNS;f="string"==typeof f?[f]:f||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(f);var m=(a.isInitialized||a.initializedStoreOnce)&&f.every((function(e){return ge(e,a,d)}));function g(){return a.getFixedT(null,"fallback"===d.nsMode?f:f[0],p)}var v=(0,c.useState)(g),y=t(Z)(v,2),b=y[0],x=y[1],S=f.join(),w=xe(S),_=(0,c.useRef)(!0);(0,c.useEffect)((function(){var e=d.bindI18n,t=d.bindI18nStore;function n(){_.current&&x(g)}return _.current=!0,m||h||fe(a,f,(function(){_.current&&x(g)})),m&&w&&w!==S&&_.current&&x(g),e&&a&&a.on(e,n),t&&a&&a.store.on(t,n),function(){_.current=!1,e&&a&&e.split(" ").forEach((function(e){return a.off(e,n)})),t&&a&&t.split(" ").forEach((function(e){return a.store.off(e,n)}))}}),[a,S]);var C=(0,c.useRef)(!0);(0,c.useEffect)((function(){_.current&&!C.current&&x(g),C.current=!1}),[a,p]);var A=[b,a,m];if(A.t=b,A.i18n=a,A.ready=m,m)return A;if(!m&&!h)return A;throw new Promise((function(e){fe(a,f,(function(){e()}))}))}var we={};!function(e,t,n,r){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t),s=i(n),a=i(r),l=function(e,t,n){return{endTime:t,insertTime:n,type:"exponentialRampToValue",value:e}},c=function(e,t,n){return{endTime:t,insertTime:n,type:"linearRampToValue",value:e}},u=function(e,t){return{startTime:t,type:"setValue",value:e}},d=function(e,t,n){return{duration:n,startTime:t,type:"setValueCurve",values:e}},h=function(e,t,n){var r=n.startTime,i=n.target,o=n.timeConstant;return i+(t-i)*Math.exp((r-e)/o)},p=function(e){return"exponentialRampToValue"===e.type},f=function(e){return"linearRampToValue"===e.type},m=function(e){return p(e)||f(e)},g=function(e){return"setValue"===e.type},v=function(e){return"setValueCurve"===e.type},y=function e(t,n,r,i){var o=t[n];return void 0===o?i:m(o)||g(o)?o.value:v(o)?o.values[o.values.length-1]:h(r,e(t,n-1,o.startTime,i),o)},b=function(e,t,n,r,i){return void 0===n?[r.insertTime,i]:m(n)?[n.endTime,n.value]:g(n)?[n.startTime,n.value]:v(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,y(e,t-1,n.startTime,i)]},x=function(e){return"cancelAndHold"===e.type},S=function(e){return"cancelScheduledValues"===e.type},w=function(e){return x(e)||S(e)?e.cancelTime:p(e)||f(e)?e.endTime:e.startTime},_=function(e,t,n,r){var i=r.endTime,o=r.value;return n===o?o:0<n&&0<o||n<0&&o<0?n*Math.pow(o/n,(e-t)/(i-t)):0},C=function(e,t,n,r){return n+(e-t)/(r.endTime-t)*(r.value-n)},A=function(e,t){var n=Math.floor(t),r=Math.ceil(t);return n===r?e[n]:(1-(t-n))*e[n]+(1-(r-t))*e[r]},E=function(e,t){var n=t.duration,r=t.startTime,i=t.values,o=(e-r)/n*(i.length-1);return A(i,o)},T=function(e){return"setTarget"===e.type},M=function(e){function t(e){s.default(this,t),this._automationEvents=[],this._currenTime=0,this._defaultValue=e}return a.default(t,[{key:e,value:function(){return this._automationEvents[Symbol.iterator]()}},{key:"add",value:function(e){var t=w(e);if(x(e)||S(e)){var n=this._automationEvents.findIndex((function(n){return S(e)&&v(n)?n.startTime+n.duration>=t:w(n)>=t})),r=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),x(e)){var i=this._automationEvents[this._automationEvents.length-1];if(void 0!==r&&m(r)){if(T(i))throw new Error("The internal list is malformed.");var o=v(i)?i.startTime+i.duration:w(i),s=v(i)?i.values[i.values.length-1]:i.value,a=p(r)?_(t,o,s,r):C(t,o,s,r),h=p(r)?l(a,t,this._currenTime):c(a,t,this._currenTime);this._automationEvents.push(h)}void 0!==i&&T(i)&&this._automationEvents.push(u(this.getValue(t),t)),void 0!==i&&v(i)&&i.startTime+i.duration>t&&(this._automationEvents[this._automationEvents.length-1]=d(new Float32Array([6,7]),i.startTime,t-i.startTime))}}else{var g=this._automationEvents.findIndex((function(e){return w(e)>t})),y=-1===g?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[g-1];if(void 0!==y&&v(y)&&w(y)+y.duration>t)return!1;var b=p(e)?l(e.value,e.endTime,this._currenTime):f(e)?c(e.value,t,this._currenTime):e;if(-1===g)this._automationEvents.push(b);else{if(v(e)&&t+e.duration>w(this._automationEvents[g]))return!1;this._automationEvents.splice(g,0,b)}}return!0}},{key:"flush",value:function(e){var t=this._automationEvents.findIndex((function(t){return w(t)>e}));if(t>1){var n=this._automationEvents.slice(t-1),r=n[0];T(r)&&n.unshift(u(y(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:"getValue",value:function(e){if(0===this._automationEvents.length)return this._defaultValue;var t=this._automationEvents.findIndex((function(t){return w(t)>e})),n=this._automationEvents[t],r=(-1===t?this._automationEvents.length:t)-1,i=this._automationEvents[r];if(void 0!==i&&T(i)&&(void 0===n||!m(n)||n.insertTime>e))return h(e,y(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(void 0!==i&&g(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==i&&v(i)&&(void 0===n||!m(n)||i.startTime+i.duration>e))return e<i.startTime+i.duration?E(e,i):i.values[i.values.length-1];if(void 0!==i&&m(i)&&(void 0===n||!m(n)))return i.value;if(void 0!==n&&p(n)){var s=b(this._automationEvents,r,i,n,this._defaultValue),a=o.default(s,2),l=a[0],c=a[1];return _(e,l,c,n)}if(void 0!==n&&f(n)){var u=b(this._automationEvents,r,i,n,this._defaultValue),d=o.default(u,2),x=d[0],S=d[1];return C(e,x,S,n)}return this._defaultValue}}]),t}(Symbol.iterator),I=function(e){return{cancelTime:e,type:"cancelAndHold"}},R=function(e){return{cancelTime:e,type:"cancelScheduledValues"}},P=function(e,t){return{endTime:t,type:"exponentialRampToValue",value:e}},k=function(e,t){return{endTime:t,type:"linearRampToValue",value:e}},O=function(e,t,n){return{startTime:t,target:e,timeConstant:n,type:"setTarget"}};e.AutomationEventList=M,e.createCancelAndHoldAutomationEvent=I,e.createCancelScheduledValuesAutomationEvent=R,e.createExponentialRampToValueAutomationEvent=P,e.createLinearRampToValueAutomationEvent=k,e.createSetTargetAutomationEvent=O,e.createSetValueAutomationEvent=u,e.createSetValueCurveAutomationEvent=d,Object.defineProperty(e,"__esModule",{value:!0})}(we,o("hcaHr"),o("ffgrs"),o("22y1y"));const _e=new WeakSet,Ce=new WeakMap,Ae=new WeakMap,Ee=new WeakMap,Te=new WeakMap,Me=new WeakMap,Ie=new WeakMap,Re=new WeakMap,Pe=new WeakMap,ke=new WeakMap,Oe={construct:()=>Oe},Ne=e=>{try{new new Proxy(e,Oe)}catch{return!1}return!0},Le=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,De=(e,t)=>{const n=[];let r=e.replace(/^[\s]+/,""),i=r.match(Le);for(;null!==i;){const e=i[1].slice(1,-1),o=i[0].replace(/([\s]+)?;?$/,"").replace(e,new URL(e,t).toString());n.push(o),r=r.slice(i[0].length).replace(/^[\s]+/,""),i=r.match(Le)}return[n.join(";"),r]},Be=e=>{if(void 0!==e&&!Array.isArray(e))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},ze=e=>{if(!Ne(e))throw new TypeError("The given value for processorCtor should be a constructor.");if(null===e.prototype||"object"!=typeof e.prototype)throw new TypeError("The given value for processorCtor should have a prototype.")},Fe=(e,t)=>{const n=e.get(t);if(void 0===n)throw new Error("A value with the given key could not be found.");return n},Ue=(e,t)=>{const n=Array.from(e).filter(t);if(n.length>1)throw Error("More than one element was found.");if(0===n.length)throw Error("No element was found.");const[r]=n;return e.delete(r),r},je=(e,t,n,r)=>{const i=Fe(e,t),o=Ue(i,(e=>e[0]===n&&e[1]===r));return 0===i.size&&e.delete(t),o},He=e=>Fe(Ie,e),Ve=e=>{if(_e.has(e))throw new Error("The AudioNode is already stored.");_e.add(e),He(e).forEach((e=>e(!0)))},Ge=e=>"port"in e,We=e=>{if(!_e.has(e))throw new Error("The AudioNode is not stored.");_e.delete(e),He(e).forEach((e=>e(!1)))},qe=(e,t)=>{!Ge(e)&&t.every((e=>0===e.size))&&We(e)},Ke={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},Je=(e,t)=>e.context===t,Qe=e=>{try{e.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},Ye=()=>new DOMException("","IndexSizeError"),Ze=e=>{var t;e.getChannelData=(t=e.getChannelData,n=>{try{return t.call(e,n)}catch(e){if(12===e.code)throw Ye();throw e}})},Xe={numberOfChannels:1},$e=-34028234663852886e22,et=34028234663852886e22,tt=e=>_e.has(e),nt={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},rt=e=>"playbackRate"in e,it=e=>"frequency"in e&&"gain"in e,ot=e=>"offset"in e,st=e=>!("frequency"in e)&&"gain"in e,at=e=>"detune"in e&&"frequency"in e,lt=e=>"pan"in e,ct=e=>Fe(Ce,e),ut=e=>Fe(Ee,e),dt=(e,t)=>{const{activeInputs:n}=ct(e);n.forEach((n=>n.forEach((([n])=>{t.includes(e)||dt(n,[...t,e])}))));const r=rt(e)?[e.playbackRate]:Ge(e)?Array.from(e.parameters.values()):it(e)?[e.Q,e.detune,e.frequency,e.gain]:ot(e)?[e.offset]:st(e)?[e.gain]:at(e)?[e.detune,e.frequency]:lt(e)?[e.pan]:[];for(const e of r){const n=ut(e);void 0!==n&&n.activeInputs.forEach((([e])=>dt(e,t)))}tt(e)&&We(e)},ht=e=>{dt(e.destination,[])},pt=e=>void 0===e||"number"==typeof e||"string"==typeof e&&("balanced"===e||"interactive"===e||"playback"===e),ft=e=>"context"in e,mt=e=>ft(e[0]),gt=(e,t,n,r)=>{for(const t of e)if(n(t)){if(r)return!1;throw Error("The set contains at least one similar element.")}return e.add(t),!0},vt=(e,t,[n,r],i)=>{gt(e,[t,n,r],(e=>e[0]===t&&e[1]===n),i)},yt=(e,[t,n,r],i)=>{const o=e.get(t);void 0===o?e.set(t,new Set([[n,r]])):gt(o,[n,r],(e=>e[0]===n),i)},bt=e=>"inputs"in e,xt=(e,t,n,r)=>{if(bt(t)){const i=t.inputs[r];return e.connect(i,n,0),[i,n,0]}return e.connect(t,n,r),[t,n,r]},St=(e,t,n)=>{for(const r of e)if(r[0]===t&&r[1]===n)return e.delete(r),r;return null},wt=(e,t,n)=>Ue(e,(e=>e[0]===t&&e[1]===n)),_t=(e,t)=>{if(!He(e).delete(t))throw new Error("Missing the expected event listener.")},Ct=(e,t,n)=>{const r=Fe(e,t),i=Ue(r,(e=>e[0]===n));return 0===r.size&&e.delete(t),i},At=(e,t,n,r)=>{bt(t)?e.disconnect(t.inputs[r],n,0):e.disconnect(t,n,r)},Et=e=>Fe(Ae,e),Tt=e=>Fe(Te,e),Mt=e=>Re.has(e),It=e=>!_e.has(e),Rt=(e,t)=>new Promise((n=>{if(null!==t)n(!0);else{const t=e.createScriptProcessor(256,1,1),r=e.createGain(),i=e.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const s=e.createBufferSource();s.buffer=i,s.loop=!0,s.connect(t).connect(e.destination),s.connect(r),s.disconnect(r),t.onaudioprocess=r=>{const i=r.inputBuffer.getChannelData(0);Array.prototype.some.call(i,(e=>1===e))?n(!0):n(!1),s.stop(),t.onaudioprocess=null,s.disconnect(t),t.disconnect(e.destination)},s.start()}})),Pt=(e,t)=>{const n=new Map;for(const t of e)for(const e of t){const t=n.get(e);n.set(e,void 0===t?1:t+1)}n.forEach(((e,n)=>t(n,e)))},kt=e=>"context"in e,Ot=e=>{const t=new Map;var n,r;e.connect=(n=e.connect.bind(e),(e,r=0,i=0)=>{const o=kt(e)?n(e,r,i):n(e,r),s=t.get(e);return void 0===s?t.set(e,[{input:i,output:r}]):s.every((e=>e.input!==i||e.output!==r))&&s.push({input:i,output:r}),o}),e.disconnect=(r=e.disconnect,(n,i,o)=>{if(r.apply(e),void 0===n)t.clear();else if("number"==typeof n)for(const[e,r]of t){const i=r.filter((e=>e.output!==n));0===i.length?t.delete(e):t.set(e,i)}else if(t.has(n))if(void 0===i)t.delete(n);else{const e=t.get(n);if(void 0!==e){const r=e.filter((e=>e.output!==i&&(e.input!==o||void 0===o)));0===r.length?t.delete(n):t.set(n,r)}}for(const[n,r]of t)r.forEach((t=>{kt(n)?e.connect(n,t.output,t.input):e.connect(n,t.output)}))})},Nt=(e,t,n,r)=>{const{activeInputs:i,passiveInputs:o}=ut(t),{outputs:s}=ct(e),a=He(e),l=s=>{const a=Et(e),l=Tt(t);if(s){const t=Ct(o,e,n);vt(i,e,t,!1),r||Mt(e)||a.connect(l,n)}else{const t=wt(i,e,n);yt(o,t,!1),r||Mt(e)||a.disconnect(l,n)}};return!!gt(s,[t,n],(e=>e[0]===t&&e[1]===n),!0)&&(a.add(l),tt(e)?vt(i,e,[n,l],!0):yt(o,[e,n,l],!0),!0)},Lt=(e,t,n,r,i)=>{const[o,s]=((e,t,n,r)=>{const{activeInputs:i,passiveInputs:o}=ct(t),s=St(i[r],e,n);if(null===s)return[je(o,e,n,r)[2],!1];return[s[2],!0]})(e,n,r,i);if(null!==o&&(_t(e,o),!s||t||Mt(e)||At(Et(e),Et(n),r,i)),tt(n)){const{activeInputs:e}=ct(n);qe(n,e)}},Dt=(e,t,n,r)=>{const[i,o]=((e,t,n)=>{const{activeInputs:r,passiveInputs:i}=ut(t),o=St(r,e,n);if(null===o)return[Ct(i,e,n)[1],!1];return[o[2],!0]})(e,n,r);null!==i&&(_t(e,i),!o||t||Mt(e)||Et(e).disconnect(Tt(n),r))};class Bt{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach(((n,r)=>e.call(t,n,r,this)))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const zt={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}};function Ft(e,t,n,r,i){if("function"==typeof e.copyFromChannel)0===t[n].byteLength&&(t[n]=new Float32Array(128)),e.copyFromChannel(t[n],r,i);else{const o=e.getChannelData(r);if(0===t[n].byteLength)t[n]=o.slice(i,i+128);else{const e=new Float32Array(o.buffer,i*Float32Array.BYTES_PER_ELEMENT,128);t[n].set(e)}}}const Ut=(e,t,n,r,i)=>{"function"==typeof e.copyToChannel?0!==t[n].byteLength&&e.copyToChannel(t[n],r,i):0!==t[n].byteLength&&e.getChannelData(r).set(t[n],i)},jt=(e,t)=>{const n=[];for(let r=0;r<e;r+=1){const e=[],i="number"==typeof t?t:t[r];for(let t=0;t<i;t+=1)e.push(new Float32Array(128));n.push(e)}return n},Ht=(e,t)=>{const n=Fe(ke,e),r=Et(t);return Fe(n,r)},Vt=async(e,t,n,r,i,o,s)=>{const a=null===t?128*Math.ceil(e.context.length/128):t.length,l=r.channelCount*r.numberOfInputs,c=i.reduce(((e,t)=>e+t),0),u=0===c?null:n.createBuffer(c,a,n.sampleRate);if(void 0===o)throw new Error("Missing the processor constructor.");const d=ct(e),h=await Ht(n,e),p=jt(r.numberOfInputs,r.channelCount),f=jt(r.numberOfOutputs,i),m=Array.from(e.parameters.keys()).reduce(((e,t)=>({...e,[t]:new Float32Array(128)})),{});for(let c=0;c<a;c+=128){if(r.numberOfInputs>0&&null!==t)for(let e=0;e<r.numberOfInputs;e+=1)for(let n=0;n<r.channelCount;n+=1)Ft(t,p[e],n,n,c);void 0!==o.parameterDescriptors&&null!==t&&o.parameterDescriptors.forEach((({name:e},n)=>{Ft(t,m,e,l+n,c)}));for(let e=0;e<r.numberOfInputs;e+=1)for(let t=0;t<i[e];t+=1)0===f[e][t].byteLength&&(f[e][t]=new Float32Array(128));try{const e=p.map(((e,t)=>0===d.activeInputs[t].size?[]:e)),t=s(c/n.sampleRate,n.sampleRate,(()=>h.process(e,f,m)));if(null!==u)for(let e=0,t=0;e<r.numberOfOutputs;e+=1){for(let n=0;n<i[e];n+=1)Ut(u,f[e],n,t+n,c);t+=i[e]}if(!t)break}catch(t){e.dispatchEvent(new ErrorEvent("processorerror",{colno:t.colno,filename:t.filename,lineno:t.lineno,message:t.message}));break}}return u},Gt={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},Wt={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},qt={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},Kt={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},Jt={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},Qt=e=>{const{port1:t,port2:n}=new MessageChannel;return new Promise((r=>{const i=()=>{n.onmessage=null,t.close(),n.close(),r()};n.onmessage=()=>i();try{t.postMessage(e,[e])}finally{i()}}))},Yt={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},Zt=e=>"delayTime"in e,Xt=(e,t,n)=>{const r=t[n];if(void 0===r)throw e();return r},$t={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},en={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},tn=()=>new DOMException("","InvalidStateError"),nn=()=>new DOMException("","InvalidAccessError"),rn=e=>{var t;e.getFrequencyResponse=(t=e.getFrequencyResponse,(n,r,i)=>{if(n.length!==r.length||r.length!==i.length)throw nn();return t.call(e,n,r,i)})},on={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},sn=(e,t,n,r,i,o,s,a,l,c,u)=>{const d=c.length;let h=a;for(let a=0;a<d;a+=1){let d=n[0]*c[a];for(let t=1;t<i;t+=1){const r=h-t&l-1;d+=n[t]*o[r],d-=e[t]*s[r]}for(let e=i;e<r;e+=1)d+=n[e]*o[h-e&l-1];for(let n=i;n<t;n+=1)d-=e[n]*s[h-n&l-1];o[h]=c[a],s[h]=d,h=h+1&l-1,u[a]=d}return h},an={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},ln=e=>{const t=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const n=e.decodeAudioData(t.buffer,(()=>{}));return void 0!==n&&(n.catch((()=>{})),!0)}catch{}return!1},cn={numberOfChannels:1},un=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n]&&(e[n]=r)},dn=(e,t)=>{un(e,t,"channelCount"),un(e,t,"channelCountMode"),un(e,t,"channelInterpretation")},hn=e=>"function"==typeof e.getFloatTimeDomainData,pn=(e,t,n)=>{const r=t[n];void 0!==r&&r!==e[n].value&&(e[n].value=r)},fn=e=>{e.start=(t=>{let n=!1;return(r=0,i=0,o)=>{if(n)throw tn();t.call(e,r,i,o),n=!0}})(e.start)},mn=e=>{var t;e.start=(t=e.start,(n=0,r=0,i)=>{if("number"==typeof i&&i<0||r<0||n<0)throw new RangeError("The parameters can't be negative.");t.call(e,n,r,i)})},gn=e=>{var t;e.stop=(t=e.stop,(n=0)=>{if(n<0)throw new RangeError("The parameter can't be negative.");t.call(e,n)})},vn=e=>{const{port1:t}=new MessageChannel;try{t.postMessage(e)}finally{t.close()}},yn=(e,t)=>null===e?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(e*t))))),bn=e=>new Promise(((t,n)=>{const{port1:r,port2:i}=new MessageChannel;r.onmessage=({data:e})=>{r.close(),i.close(),t(e)},r.onmessageerror=({data:e})=>{r.close(),i.close(),n(e)},i.postMessage(e)})),xn=async(e,t)=>new e(await bn(t)),Sn=(e,t,n,r)=>{let i=ke.get(e);void 0===i&&(i=new WeakMap,ke.set(e,i));const o=xn(n,r);return i.set(t,o),o},wn=(e,t)=>{const n=e.createBiquadFilter();return dn(n,t),pn(n,t,"Q"),pn(n,t,"detune"),pn(n,t,"frequency"),pn(n,t,"gain"),un(n,t,"type"),n},_n=e=>{const t=e.numberOfOutputs;Object.defineProperty(e,"channelCount",{get:()=>t,set:e=>{if(e!==t)throw tn()}}),Object.defineProperty(e,"channelCountMode",{get:()=>"explicit",set:e=>{if("explicit"!==e)throw tn()}}),Object.defineProperty(e,"channelInterpretation",{get:()=>"discrete",set:e=>{if("discrete"!==e)throw tn()}})},Cn=(e,t)=>{const n=e.createChannelSplitter(t.numberOfOutputs);return dn(n,t),_n(n),n},An=(e,t)=>(e.connect=t.connect.bind(t),e.disconnect=t.disconnect.bind(t),e),En=(e,t)=>{const n=e.createDelay(t.maxDelayTime);return dn(n,t),pn(n,t,"delayTime"),n},Tn=(e,t)=>{const n=e.createGain();return dn(n,t),pn(n,t,"gain"),n};function Mn(e,t){const n=t[0]*t[0]+t[1]*t[1];return[(e[0]*t[0]+e[1]*t[1])/n,(e[1]*t[0]-e[0]*t[1])/n]}function In(e,t){let n=[0,0];for(let o=e.length-1;o>=0;o-=1)i=t,n=[(r=n)[0]*i[0]-r[1]*i[1],r[0]*i[1]+r[1]*i[0]],n[0]+=e[o];var r,i;return n}const Rn=(e,t,n,r)=>e.createScriptProcessor(t,n,r),Pn=()=>new DOMException("","NotSupportedError"),kn={numberOfChannels:1},On={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},Nn={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},Ln={disableNormalization:!1},Dn={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},Bn=()=>new DOMException("","UnknownError"),zn={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},Fn=(e,t,n)=>void 0===e.copyFromChannel?e.getChannelData(n)[0]:(e.copyFromChannel(t,n),t[0]),Un=e=>{if(null===e)return!1;const t=e.length;return t%2!=0?0!==e[Math.floor(t/2)]:e[t/2-1]+e[t/2]!==0},jn=(e,t,n,r)=>{let i=e;for(;!i.hasOwnProperty(t);)i=Object.getPrototypeOf(i);const{get:o,set:s}=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,{get:n(o),set:r(s)})},Hn=(e,t,n)=>{try{e.setValueAtTime(t,n)}catch(r){if(9!==r.code)throw r;Hn(e,t,n+1e-7)}},Vn=e=>{const t=e.createOscillator();try{t.start(-1)}catch(e){return e instanceof RangeError}return!1},Gn=e=>{const t=e.createBuffer(1,1,44100),n=e.createBufferSource();n.buffer=t,n.start(),n.stop();try{return n.stop(),!0}catch{return!1}},Wn=e=>{const t=e.createOscillator();try{t.stop(-1)}catch(e){return e instanceof RangeError}return!1},qn=(e,t)=>{const n=t.createGain();e.connect(n);const r=(i=e.disconnect,()=>{i.call(e,n),e.removeEventListener("ended",r)});var i;e.addEventListener("ended",r),An(e,n),e.stop=(t=>{let r=!1;return(i=0)=>{if(r)try{t.call(e,i)}catch{n.gain.setValueAtTime(0,i)}else t.call(e,i),r=!0}})(e.stop)},Kn=(e,t)=>n=>{const r={value:e};return Object.defineProperties(n,{currentTarget:r,target:r}),"function"==typeof t?t.call(e,n):t.handleEvent.call(e,n)},Jn=(Qn=gt,(e,t,[n,r,i],o)=>{Qn(e[r],[t,n,i],(e=>e[0]===t&&e[1]===n),o)});var Qn;const Yn=(e=>(t,n,[r,i,o],s)=>{const a=t.get(r);void 0===a?t.set(r,new Set([[i,n,o]])):e(a,[i,n,o],(e=>e[0]===i&&e[1]===n),s)})(gt),Zn=(Xn=Ue,(e,t,n,r)=>Xn(e[r],(e=>e[0]===t&&e[1]===n)));var Xn;const $n=new WeakMap,er=(tr=$n,e=>{var t;return null!==(t=tr.get(e))&&void 0!==t?t:0});var tr;const nr=(rr=new Map,ir=new WeakMap,(e,t)=>{const n=ir.get(e);if(void 0!==n)return n;const r=rr.get(e);if(void 0!==r)return r;try{const n=t();return n instanceof Promise?(rr.set(e,n),n.catch((()=>!1)).then((t=>(rr.delete(e),ir.set(e,t),t)))):(ir.set(e,n),n)}catch{return ir.set(e,!1),!1}});var rr,ir;const or="undefined"==typeof window?null:window,sr=(ar=nr,lr=Ye,(e,t)=>{const n=e.createAnalyser();if(dn(n,t),!(t.maxDecibels>t.minDecibels))throw lr();return un(n,t,"fftSize"),un(n,t,"maxDecibels"),un(n,t,"minDecibels"),un(n,t,"smoothingTimeConstant"),ar(hn,(()=>hn(n)))||(e=>{e.getFloatTimeDomainData=t=>{const n=new Uint8Array(t.length);e.getByteTimeDomainData(n);const r=Math.max(n.length,e.fftSize);for(let e=0;e<r;e+=1)t[e]=.0078125*(n[e]-128);return t}})(n),n});var ar,lr;const cr=(ur=ct,e=>{const t=ur(e);if(null===t.renderer)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer});var ur;const dr=((e,t,n)=>async(r,i,o)=>{const s=e(r);await Promise.all(s.activeInputs.map(((e,s)=>Array.from(e).map((async([e,a])=>{const l=t(e),c=await l.render(e,i),u=r.context.destination;n(e)||r===u&&n(r)||c.connect(o,a,s)})))).reduce(((e,t)=>[...e,...t]),[]))})(ct,cr,Mt),hr=(pr=sr,fr=Et,mr=dr,()=>{const e=new WeakMap;return{render(t,n){const r=e.get(n);return void 0!==r?Promise.resolve(r):(async(t,n)=>{let r=fr(t);if(!Je(r,n)){const e={channelCount:r.channelCount,channelCountMode:r.channelCountMode,channelInterpretation:r.channelInterpretation,fftSize:r.fftSize,maxDecibels:r.maxDecibels,minDecibels:r.minDecibels,smoothingTimeConstant:r.smoothingTimeConstant};r=pr(n,e)}return e.set(n,r),await mr(t,n,r),r})(t,n)}}});var pr,fr,mr;const gr=(vr=Me,e=>{const t=vr.get(e);if(void 0===t)throw tn();return t});var vr;const yr=(e=>null===e?null:e.hasOwnProperty("OfflineAudioContext")?e.OfflineAudioContext:e.hasOwnProperty("webkitOfflineAudioContext")?e.webkitOfflineAudioContext:null)(or),br=(xr=yr,e=>null!==xr&&e instanceof xr);var xr;const Sr=new WeakMap,wr=(_r=Kn,class{constructor(e){this._nativeEventTarget=e,this._listeners=new WeakMap}addEventListener(e,t,n){if(null!==t){let r=this._listeners.get(t);void 0===r&&(r=_r(this,t),"function"==typeof t&&this._listeners.set(t,r)),this._nativeEventTarget.addEventListener(e,r,n)}}dispatchEvent(e){return this._nativeEventTarget.dispatchEvent(e)}removeEventListener(e,t,n){const r=null===t?void 0:this._listeners.get(t);this._nativeEventTarget.removeEventListener(e,void 0===r?null:r,n)}});var _r;const Cr=(e=>null===e?null:e.hasOwnProperty("AudioContext")?e.AudioContext:e.hasOwnProperty("webkitAudioContext")?e.webkitAudioContext:null)(or),Ar=(Er=Cr,e=>null!==Er&&e instanceof Er);var Er;const Tr=(e=>t=>null!==e&&"function"==typeof e.AudioNode&&t instanceof e.AudioNode)(or),Mr=(e=>t=>null!==e&&"function"==typeof e.AudioParam&&t instanceof e.AudioParam)(or),Ir=(e=>null===e?null:e.hasOwnProperty("AudioWorkletNode")?e.AudioWorkletNode:null)(or),Rr=((e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m)=>class extends c{constructor(t,r,i,o){super(i),this._context=t,this._nativeAudioNode=i;const s=u(t);d(s)&&!0!==n(Rt,(()=>Rt(s,m)))&&Ot(i),Ae.set(this,i),Ie.set(this,new Set),"closed"!==t.state&&r&&Ve(this),e(this,o,i)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(e){this._nativeAudioNode.channelCount=e}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(e){this._nativeAudioNode.channelCountMode=e}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(e){this._nativeAudioNode.channelInterpretation=e}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(e,n=0,a=0){if(n<0||n>=this._nativeAudioNode.numberOfOutputs)throw i();const c=u(this._context),d=f(c);if(h(e)||p(e))throw o();if(ft(e)){const i=Et(e);try{const t=xt(this._nativeAudioNode,i,n,a),r=It(this);(d||r)&&this._nativeAudioNode.disconnect(...t),"closed"!==this.context.state&&!r&&It(e)&&Ve(e)}catch(e){if(12===e.code)throw o();throw e}if(t(this,e,n,a,d)){const t=l([this],e);Pt(t,r(d))}return e}const m=Tt(e);if("playbackRate"===m.name&&1024===m.maxValue)throw s();try{this._nativeAudioNode.connect(m,n),(d||It(this))&&this._nativeAudioNode.disconnect(m,n)}catch(e){if(12===e.code)throw o();throw e}if(Nt(this,e,n,d)){const t=l([this],e);Pt(t,r(d))}}disconnect(e,t,n){let r;const s=u(this._context),c=f(s);if(void 0===e)r=((e,t)=>{const n=ct(e),r=[];for(const i of n.outputs)mt(i)?Lt(e,t,...i):Dt(e,t,...i),r.push(i[0]);return n.outputs.clear(),r})(this,c);else if("number"==typeof e){if(e<0||e>=this.numberOfOutputs)throw i();r=((e,t,n)=>{const r=ct(e),i=[];for(const o of r.outputs)o[1]===n&&(mt(o)?Lt(e,t,...o):Dt(e,t,...o),i.push(o[0]),r.outputs.delete(o));return i})(this,c,e)}else{if(void 0!==t&&(t<0||t>=this.numberOfOutputs))throw i();if(ft(e)&&void 0!==n&&(n<0||n>=e.numberOfInputs))throw i();if(r=((e,t,n,r,i)=>{const o=ct(e);return Array.from(o.outputs).filter((e=>!(e[0]!==n||void 0!==r&&e[1]!==r||void 0!==i&&e[2]!==i))).map((n=>(mt(n)?Lt(e,t,...n):Dt(e,t,...n),o.outputs.delete(n),n[0])))})(this,c,e,t,n),0===r.length)throw o()}for(const e of r){const t=l([this],e);Pt(t,a)}}})((Pr=Ce,(e,t,n)=>{const r=[];for(let e=0;e<n.numberOfInputs;e+=1)r.push(new Set);Pr.set(e,{activeInputs:r,outputs:new Set,passiveInputs:new WeakMap,renderer:t})}),((e,t,n,r,i,o,s,a,l,c,u,d,h)=>{const p=new WeakMap;return(f,m,g,v,y)=>{const{activeInputs:b,passiveInputs:x}=o(m),{outputs:S}=o(f),w=a(f),_=o=>{const a=l(m),c=l(f);if(o){const t=je(x,f,g,v);e(b,f,t,!1),y||d(f)||n(c,a,g,v),h(m)&&Ve(m)}else{const e=r(b,f,g,v);t(x,v,e,!1),y||d(f)||i(c,a,g,v);const n=s(m);if(0===n)u(m)&&qe(m,b);else{const e=p.get(m);void 0!==e&&clearTimeout(e),p.set(m,setTimeout((()=>{u(m)&&qe(m,b)}),1e3*n))}}};return!!c(S,[m,g,v],(e=>e[0]===m&&e[1]===g&&e[2]===v),!0)&&(w.add(_),u(f)?e(b,f,[g,v,_],!0):t(x,v,[f,g,_],!0),!0)}})(Jn,Yn,xt,Zn,At,ct,er,He,Et,gt,tt,Mt,It),nr,((e,t,n,r,i,o)=>s=>(a,l)=>{const c=e.get(a);if(void 0===c){if(!s&&o(a)){const e=r(a),{outputs:o}=n(a);for(const n of o)if(mt(n)){const i=r(n[0]);t(e,i,n[1],n[2])}else{const t=i(n[0]);e.disconnect(t,n[1])}}e.set(a,l)}else e.set(a,c+l)})(Re,At,ct,Et,Tt,tt),Ye,nn,Pn,((e,t,n,r,i,o,s,a)=>(l,c)=>{const u=t.get(l);if(void 0===u)throw new Error("Missing the expected cycle count.");const d=o(l.context),h=a(d);if(u===c){if(t.delete(l),!h&&s(l)){const t=r(l),{outputs:o}=n(l);for(const n of o)if(mt(n)){const i=r(n[0]);e(t,i,n[1],n[2])}else{const e=i(n[0]);t.connect(e,n[1])}}}else t.set(l,u-c)})(xt,Re,ct,Et,Tt,gr,tt,br),((e,t,n)=>function r(i,o){const s=ft(o)?o:n(e,o);if(Zt(s))return[];if(i[0]===s)return[i];if(i.includes(s))return[];const{outputs:a}=t(s);return Array.from(a).map((e=>r([...i,s],e[0]))).reduce(((e,t)=>e.concat(t)),[])})(Sr,ct,Fe),wr,gr,Ar,Tr,Mr,br,Ir);var Pr;const kr=((e,t,n,r,i,o)=>class extends e{constructor(e,n){const s=i(e),a={...Ke,...n},l=r(s,a);super(e,!1,l,o(s)?t():null),this._nativeAnalyserNode=l}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(e){this._nativeAnalyserNode.fftSize=e}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(e){const t=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=e,!(e>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=t,n()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(e){const t=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=e,!(this._nativeAnalyserNode.maxDecibels>e))throw this._nativeAnalyserNode.minDecibels=t,n()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(e){this._nativeAnalyserNode.smoothingTimeConstant=e}getByteFrequencyData(e){this._nativeAnalyserNode.getByteFrequencyData(e)}getByteTimeDomainData(e){this._nativeAnalyserNode.getByteTimeDomainData(e)}getFloatFrequencyData(e){this._nativeAnalyserNode.getFloatFrequencyData(e)}getFloatTimeDomainData(e){this._nativeAnalyserNode.getFloatTimeDomainData(e)}})(Rr,hr,Ye,sr,gr,br),Or=new WeakSet,Nr=(e=>null===e?null:e.hasOwnProperty("AudioBuffer")?e.AudioBuffer:null)(or),Lr=(Dr=new Uint32Array(1),e=>(Dr[0]=e,Dr[0]));var Dr;const Br=((e,t)=>n=>{n.copyFromChannel=(r,i,o=0)=>{const s=e(o),a=e(i);if(a>=n.numberOfChannels)throw t();const l=n.length,c=n.getChannelData(a),u=r.length;for(let e=s<0?-s:0;e+s<l&&e<u;e+=1)r[e]=c[e+s]},n.copyToChannel=(r,i,o=0)=>{const s=e(o),a=e(i);if(a>=n.numberOfChannels)throw t();const l=n.length,c=n.getChannelData(a),u=r.length;for(let e=s<0?-s:0;e+s<l&&e<u;e+=1)c[e+s]=r[e]}})(Lr,Ye),zr=(Fr=Lr,e=>{var t,n;e.copyFromChannel=(t=e.copyFromChannel,(n,r,i=0)=>{const o=Fr(i),s=Fr(r);if(o<e.length)return t.call(e,n,s,o)}),e.copyToChannel=(n=e.copyToChannel,(t,r,i=0)=>{const o=Fr(i),s=Fr(r);if(o<e.length)return n.call(e,t,s,o)})});var Fr;const Ur=((e,t,n,r,i,o,s,a)=>{let l=null;return class c{constructor(c){if(null===i)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:u,numberOfChannels:d,sampleRate:h}={...Xe,...c};null===l&&(l=new i(1,1,44100));const p=null!==r&&t(o,o)?new r({length:u,numberOfChannels:d,sampleRate:h}):l.createBuffer(d,u,h);if(0===p.numberOfChannels)throw n();return"function"!=typeof p.copyFromChannel?(s(p),Ze(p)):t(Qe,(()=>Qe(p)))||a(p),e.add(p),p}static[Symbol.hasInstance](t){return null!==t&&"object"==typeof t&&Object.getPrototypeOf(t)===c.prototype||e.has(t)}}})(Or,nr,Pn,Nr,yr,(jr=Nr,()=>{if(null===jr)return!1;try{new jr({length:1,sampleRate:44100})}catch{return!1}return!0}),Br,zr);var jr;const Hr=(Vr=Tn,(e,t)=>{const n=Vr(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(n).connect(e.destination);const r=()=>{t.removeEventListener("ended",r),t.disconnect(n),n.disconnect()};t.addEventListener("ended",r)});var Vr;const Gr=(Wr=cr,qr=ut,Kr=Mt,async(e,t,n)=>{const r=qr(e);await Promise.all(Array.from(r.activeInputs).map((async([e,r])=>{const i=Wr(e),o=await i.render(e,t);Kr(e)||o.connect(n,r)})))});var Wr,qr,Kr;const Jr=(Qr=Gr,(e,t,n)=>Qr(t,e,n));var Qr;const Yr=((e,t,n,r,i,o,s,a,l,c,u)=>(d,h)=>{const p=d.createBufferSource();return dn(p,h),pn(p,h,"playbackRate"),un(p,h,"buffer"),un(p,h,"loop"),un(p,h,"loopEnd"),un(p,h,"loopStart"),t(n,(()=>n(d)))||fn(p),t(r,(()=>r(d)))||l(p),t(i,(()=>i(d)))||c(p,d),t(o,(()=>o(d)))||mn(p),t(s,(()=>s(d)))||u(p,d),t(a,(()=>a(d)))||gn(p),e(d,p),p})(Hr,nr,(e=>{const t=e.createBufferSource();t.start();try{t.start()}catch{return!0}return!1}),(e=>{const t=e.createBufferSource(),n=e.createBuffer(1,1,44100);t.buffer=n;try{t.start(0,1)}catch{return!1}return!0}),(e=>{const t=e.createBufferSource();t.start();try{t.stop()}catch{return!1}return!0}),Vn,Gn,Wn,(e=>{var t;e.start=(t=e.start,(n=0,r=0,i)=>{const o=e.buffer,s=null===o?r:Math.min(o.duration,r);null!==o&&s>o.duration-.5/e.context.sampleRate?t.call(e,n,0,0):t.call(e,n,s,i)})}),(Zr=jn,(e,t)=>{const n=t.createBuffer(1,1,44100);null===e.buffer&&(e.buffer=n),Zr(e,"buffer",(t=>()=>{const r=t.call(e);return r===n?null:r}),(t=>r=>t.call(e,null===r?n:r)))}),qn);var Zr;const Xr=((e,t)=>(n,r,i)=>(e(r).replay(i),t(r,n,i)))((e=>t=>{const n=e(t);if(null===n.renderer)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return n.renderer})(ut),Gr),$r=((e,t,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null;return{set start(e){s=e},set stop(e){a=e},render(l,c){const u=o.get(c);return void 0!==u?Promise.resolve(u):(async(l,c)=>{let u=n(l);const d=Je(u,c);if(!d){const e={buffer:u.buffer,channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,loop:u.loop,loopEnd:u.loopEnd,loopStart:u.loopStart,playbackRate:u.playbackRate.value};u=t(c,e),null!==s&&u.start(...s),null!==a&&u.stop(a)}return o.set(c,u),d?await e(c,l.playbackRate,u.playbackRate):await r(c,l.playbackRate,u.playbackRate),await i(l,c,u),u})(l,c)}}})(Jr,Yr,Et,Xr,dr),ei=((e,t,n,r,i,o,s,a,l,c,u,d,h)=>(p,f,m,g=null,v=null)=>{const y=new(0,we.AutomationEventList)(m.defaultValue),b=f?r(y):null,x={get defaultValue(){return m.defaultValue},get maxValue(){return null===g?m.maxValue:g},get minValue(){return null===v?m.minValue:v},get value(){return m.value},set value(e){m.value=e,x.setValueAtTime(e,p.context.currentTime)},cancelAndHoldAtTime(e){if("function"==typeof m.cancelAndHoldAtTime)null===b&&y.flush(p.context.currentTime),y.add(i(e)),m.cancelAndHoldAtTime(e);else{const t=Array.from(y).pop();null===b&&y.flush(p.context.currentTime),y.add(i(e));const n=Array.from(y).pop();m.cancelScheduledValues(e),t!==n&&void 0!==n&&("exponentialRampToValue"===n.type?m.exponentialRampToValueAtTime(n.value,n.endTime):"linearRampToValue"===n.type?m.linearRampToValueAtTime(n.value,n.endTime):"setValue"===n.type?m.setValueAtTime(n.value,n.startTime):"setValueCurve"===n.type&&m.setValueCurveAtTime(n.values,n.startTime,n.duration))}return x},cancelScheduledValues:e=>(null===b&&y.flush(p.context.currentTime),y.add(o(e)),m.cancelScheduledValues(e),x),exponentialRampToValueAtTime(e,t){if(0===e)throw new RangeError;if(!Number.isFinite(t)||t<0)throw new RangeError;return null===b&&y.flush(p.context.currentTime),y.add(s(e,t)),m.exponentialRampToValueAtTime(e,t),x},linearRampToValueAtTime:(e,t)=>(null===b&&y.flush(p.context.currentTime),y.add(a(e,t)),m.linearRampToValueAtTime(e,t),x),setTargetAtTime:(e,t,n)=>(null===b&&y.flush(p.context.currentTime),y.add(l(e,t,n)),m.setTargetAtTime(e,t,n),x),setValueAtTime:(e,t)=>(null===b&&y.flush(p.context.currentTime),y.add(c(e,t)),m.setValueAtTime(e,t),x),setValueCurveAtTime(e,t,n){const r=e instanceof Float32Array?e:new Float32Array(e);if(null!==d&&"webkitAudioContext"===d.name){const e=t+n,i=p.context.sampleRate,o=Math.ceil(t*i),s=Math.floor(e*i),a=s-o,l=new Float32Array(a);for(let e=0;e<a;e+=1){const s=(r.length-1)/n*((o+e)/i-t),a=Math.floor(s),c=Math.ceil(s);l[e]=a===c?r[a]:(1-(s-a))*r[a]+(1-(c-s))*r[c]}null===b&&y.flush(p.context.currentTime),y.add(u(l,t,n)),m.setValueCurveAtTime(l,t,n);const c=s/i;c<e&&h(x,l[l.length-1],c),h(x,r[r.length-1],e)}else null===b&&y.flush(p.context.currentTime),y.add(u(r,t,n)),m.setValueCurveAtTime(r,t,n);return x}};return n.set(x,m),t.set(x,p),e(x,b),x})((ti=Ee,(e,t)=>{ti.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})}),Sr,Te,(e=>({replay(t){for(const n of e)if("exponentialRampToValue"===n.type){const{endTime:e,value:r}=n;t.exponentialRampToValueAtTime(r,e)}else if("linearRampToValue"===n.type){const{endTime:e,value:r}=n;t.linearRampToValueAtTime(r,e)}else if("setTarget"===n.type){const{startTime:e,target:r,timeConstant:i}=n;t.setTargetAtTime(r,e,i)}else if("setValue"===n.type){const{startTime:e,value:r}=n;t.setValueAtTime(r,e)}else{if("setValueCurve"!==n.type)throw new Error("Can't apply an unknown automation.");{const{duration:e,startTime:r,values:i}=n;t.setValueCurveAtTime(i,r,e)}}}})),we.createCancelAndHoldAutomationEvent,we.createCancelScheduledValuesAutomationEvent,we.createExponentialRampToValueAutomationEvent,we.createLinearRampToValueAutomationEvent,we.createSetTargetAutomationEvent,we.createSetValueAutomationEvent,we.createSetValueCurveAutomationEvent,Cr,Hn);var ti;const ni=((e,t,n,r,i,o,s,a)=>class extends e{constructor(e,r){const a=o(e),l={...nt,...r},c=i(a,l),u=s(a),d=u?t():null;super(e,!1,c,d),this._audioBufferSourceNodeRenderer=d,this._isBufferNullified=!1,this._isBufferSet=null!==l.buffer,this._nativeAudioBufferSourceNode=c,this._onended=null,this._playbackRate=n(this,u,c.playbackRate,et,$e)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(e){if(this._nativeAudioBufferSourceNode.buffer=e,null!==e){if(this._isBufferSet)throw r();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(e){this._nativeAudioBufferSourceNode.loop=e}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(e){this._nativeAudioBufferSourceNode.loopEnd=e}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(e){this._nativeAudioBufferSourceNode.loopStart=e}get onended(){return this._onended}set onended(e){const t="function"==typeof e?a(this,e):null;this._nativeAudioBufferSourceNode.onended=t;const n=this._nativeAudioBufferSourceNode.onended;this._onended=null!==n&&n===t?e:n}get playbackRate(){return this._playbackRate}start(e=0,t=0,n){if(this._nativeAudioBufferSourceNode.start(e,t,n),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.start=void 0===n?[e,t]:[e,t,n]),"closed"!==this.context.state){Ve(this);const e=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",e),tt(this)&&We(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",e)}}stop(e=0){this._nativeAudioBufferSourceNode.stop(e),null!==this._audioBufferSourceNodeRenderer&&(this._audioBufferSourceNodeRenderer.stop=e)}})(Rr,$r,ei,tn,Yr,gr,br,Kn),ri=((e,t,n,r,i,o,s,a)=>class extends e{constructor(e,n){const r=o(e),l=s(r),c=i(r,n,l);super(e,!1,c,l?t(a):null),this._isNodeOfNativeOfflineAudioContext=l,this._nativeAudioDestinationNode=c}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();if(e>this._nativeAudioDestinationNode.maxChannelCount)throw n();this._nativeAudioDestinationNode.channelCount=e}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(e){if(this._isNodeOfNativeOfflineAudioContext)throw r();this._nativeAudioDestinationNode.channelCountMode=e}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}})(Rr,(e=>{const t=new WeakMap;return{render(n,r){const i=t.get(r);return void 0!==i?Promise.resolve(i):(async(n,r)=>{const i=r.destination;return t.set(r,i),await e(n,r,i),i})(n,r)}}}),Ye,tn,((e,t)=>(n,r,i)=>{const o=n.destination;if(o.channelCount!==r)try{o.channelCount=r}catch{}i&&"explicit"!==o.channelCountMode&&(o.channelCountMode="explicit"),0===o.maxChannelCount&&Object.defineProperty(o,"maxChannelCount",{value:r});const s=e(n,{channelCount:r,channelCountMode:o.channelCountMode,channelInterpretation:o.channelInterpretation,gain:1});return t(s,"channelCount",(e=>()=>e.call(s)),(e=>t=>{e.call(s,t);try{o.channelCount=t}catch(e){if(t>o.maxChannelCount)throw e}})),t(s,"channelCountMode",(e=>()=>e.call(s)),(e=>t=>{e.call(s,t),o.channelCountMode=t})),t(s,"channelInterpretation",(e=>()=>e.call(s)),(e=>t=>{e.call(s,t),o.channelInterpretation=t})),Object.defineProperty(s,"maxChannelCount",{get:()=>o.maxChannelCount}),s.connect(o),s})(Tn,jn),gr,br,dr),ii=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a)=>{let l=n(s);const c=Je(l,a);if(!c){const e={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=t(a,e)}return o.set(a,l),c?(await e(a,s.Q,l.Q),await e(a,s.detune,l.detune),await e(a,s.frequency,l.frequency),await e(a,s.gain,l.gain)):(await r(a,s.Q,l.Q),await r(a,s.detune,l.detune),await r(a,s.frequency,l.frequency),await r(a,s.gain,l.gain)),await i(s,a,l),l})(s,a)}}})(Jr,wn,Et,Xr,dr),oi=(e=>(t,n)=>e.set(t,n))($n),si=(ai=Rr,li=ei,ci=ii,ui=nn,di=wn,hi=gr,pi=br,fi=oi,class extends ai{constructor(e,t){const n=hi(e),r={...Gt,...t},i=di(n,r),o=pi(n);super(e,!1,i,o?ci():null),this._Q=li(this,o,i.Q,et,$e),this._detune=li(this,o,i.detune,1200*Math.log2(et),-1200*Math.log2(et)),this._frequency=li(this,o,i.frequency,e.sampleRate/2,0),this._gain=li(this,o,i.gain,40*Math.log10(et),$e),this._nativeBiquadFilterNode=i,fi(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(e){this._nativeBiquadFilterNode.type=e}getFrequencyResponse(e,t,n){try{this._nativeBiquadFilterNode.getFrequencyResponse(e,t,n)}catch(e){if(11===e.code)throw ui();throw e}if(e.length!==t.length||t.length!==n.length)throw ui()}});var ai,li,ci,ui,di,hi,pi,fi;const mi=((e,t)=>(n,r,i)=>{const o=new Set;var s,a;return n.connect=(s=n.connect,(i,a=0,l=0)=>{const c=0===o.size;if(t(i))return s.call(n,i,a,l),e(o,[i,a,l],(e=>e[0]===i&&e[1]===a&&e[2]===l),!0),c&&r(),i;s.call(n,i,a),e(o,[i,a],(e=>e[0]===i&&e[1]===a),!0),c&&r()}),n.disconnect=(a=n.disconnect,(e,r,s)=>{const l=o.size>0;if(void 0===e)a.apply(n),o.clear();else if("number"==typeof e){a.call(n,e);for(const t of o)t[1]===e&&o.delete(t)}else{t(e)?a.call(n,e,r,s):a.call(n,e,r);for(const t of o)t[0]!==e||void 0!==r&&t[1]!==r||void 0!==s&&t[2]!==s||o.delete(t)}const c=0===o.size;l&&c&&i()}),n})(gt,Tr),gi=(vi=tn,yi=mi,(e,t)=>{t.channelCount=1,t.channelCountMode="explicit",Object.defineProperty(t,"channelCount",{get:()=>1,set:()=>{throw vi()}}),Object.defineProperty(t,"channelCountMode",{get:()=>"explicit",set:()=>{throw vi()}});const n=e.createBufferSource();yi(t,(()=>{const e=t.numberOfInputs;for(let r=0;r<e;r+=1)n.connect(t,0,r)}),(()=>n.disconnect(t)))});var vi,yi;const bi=((e,t)=>(n,r)=>{const i=n.createChannelMerger(r.numberOfInputs);return null!==e&&"webkitAudioContext"===e.name&&t(n,i),dn(i,r),i})(Cr,gi),xi=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const s=r.get(o);return void 0!==s?Promise.resolve(s):(async(i,o)=>{let s=t(i);if(!Je(s,o)){const t={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,numberOfInputs:s.numberOfInputs};s=e(o,t)}return r.set(o,s),await n(i,o,s),s})(i,o)}}})(bi,Et,dr),Si=((e,t,n,r,i)=>class extends e{constructor(e,o){const s=r(e),a={...Wt,...o};super(e,!1,n(s,a),i(s)?t():null)}})(Rr,xi,bi,gr,br),wi=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const s=r.get(o);return void 0!==s?Promise.resolve(s):(async(i,o)=>{let s=t(i);if(!Je(s,o)){const t={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,numberOfOutputs:s.numberOfOutputs};s=e(o,t)}return r.set(o,s),await n(i,o,s),s})(i,o)}}})(Cn,Et,dr),_i=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=r(e),l=o({...qt,...s});super(e,!1,n(a,l),i(a)?t():null)}})(Rr,wi,Cn,gr,br,(e=>({...e,channelCount:e.numberOfOutputs}))),Ci=((e,t,n,r)=>(i,{offset:o,...s})=>{const a=i.createBuffer(1,2,44100),l=t(i,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),c=n(i,{...s,gain:o}),u=a.getChannelData(0);u[0]=1,u[1]=1,l.buffer=a,l.loop=!0;const d={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(e){c.channelCount=e},get channelCountMode(){return c.channelCountMode},set channelCountMode(e){c.channelCountMode=e},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(e){c.channelInterpretation=e},get context(){return c.context},get inputs(){return[]},get numberOfInputs(){return l.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get offset(){return c.gain},get onended(){return l.onended},set onended(e){l.onended=e},addEventListener:(...e)=>l.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>l.dispatchEvent(e[0]),removeEventListener:(...e)=>l.removeEventListener(e[0],e[1],e[2]),start(e=0){l.start.call(l,e)},stop(e=0){l.stop.call(l,e)}};return e(i,l),r(An(d,c),(()=>l.connect(c)),(()=>l.disconnect(c)))})(Hr,Yr,Tn,mi),Ai=((e,t,n,r,i)=>(o,s)=>{if(void 0===o.createConstantSource)return n(o,s);const a=o.createConstantSource();return dn(a,s),pn(a,s,"offset"),t(r,(()=>r(o)))||mn(a),t(i,(()=>i(o)))||gn(a),e(o,a),a})(Hr,nr,Ci,Vn,Wn),Ei=((e,t,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null;return{set start(e){s=e},set stop(e){a=e},render(l,c){const u=o.get(c);return void 0!==u?Promise.resolve(u):(async(l,c)=>{let u=n(l);const d=Je(u,c);if(!d){const e={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,offset:u.offset.value};u=t(c,e),null!==s&&u.start(s),null!==a&&u.stop(a)}return o.set(c,u),d?await e(c,l.offset,u.offset):await r(c,l.offset,u.offset),await i(l,c,u),u})(l,c)}}})(Jr,Ai,Et,Xr,dr),Ti=((e,t,n,r,i,o,s)=>class extends e{constructor(e,s){const a=i(e),l={...Kt,...s},c=r(a,l),u=o(a),d=u?n():null;super(e,!1,c,d),this._constantSourceNodeRenderer=d,this._nativeConstantSourceNode=c,this._offset=t(this,u,c.offset,et,$e),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(e){const t="function"==typeof e?s(this,e):null;this._nativeConstantSourceNode.onended=t;const n=this._nativeConstantSourceNode.onended;this._onended=null!==n&&n===t?e:n}start(e=0){if(this._nativeConstantSourceNode.start(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.start=e),"closed"!==this.context.state){Ve(this);const e=()=>{this._nativeConstantSourceNode.removeEventListener("ended",e),tt(this)&&We(this)};this._nativeConstantSourceNode.addEventListener("ended",e)}}stop(e=0){this._nativeConstantSourceNode.stop(e),null!==this._constantSourceNodeRenderer&&(this._constantSourceNodeRenderer.stop=e)}})(Rr,ei,Ei,Ai,gr,br,Kn),Mi=((e,t)=>(n,r)=>{const i=n.createConvolver();if(dn(i,r),r.disableNormalization===i.normalize&&(i.normalize=!r.disableNormalization),un(i,r,"buffer"),r.channelCount>2)throw e();if(t(i,"channelCount",(e=>()=>e.call(i)),(t=>n=>{if(n>2)throw e();return t.call(i,n)})),"max"===r.channelCountMode)throw e();return t(i,"channelCountMode",(e=>()=>e.call(i)),(t=>n=>{if("max"===n)throw e();return t.call(i,n)})),i})(Pn,jn),Ii=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const s=r.get(o);return void 0!==s?Promise.resolve(s):(async(i,o)=>{let s=t(i);if(!Je(s,o)){const t={buffer:s.buffer,channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,disableNormalization:!s.normalize};s=e(o,t)}return r.set(o,s),bt(s)?await n(i,o,s.inputs[0]):await n(i,o,s),s})(i,o)}}})(Mi,Et,dr),Ri=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=r(e),l={...Jt,...s},c=n(a,l);super(e,!1,c,i(a)?t():null),this._isBufferNullified=!1,this._nativeConvolverNode=c,null!==l.buffer&&o(this,l.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(e){if(this._nativeConvolverNode.buffer=e,null===e&&null!==this._nativeConvolverNode.buffer){const e=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=e.createBuffer(1,1,e.sampleRate),this._isBufferNullified=!0,o(this,0)}else this._isBufferNullified=!1,o(this,null===this._nativeConvolverNode.buffer?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(e){this._nativeConvolverNode.normalize=e}})(Rr,Ii,Mi,gr,br,oi),Pi=((e,t,n,r,i)=>o=>{const s=new WeakMap;return{render(a,l){const c=s.get(l);return void 0!==c?Promise.resolve(c):(async(a,l)=>{let c=n(a);const u=Je(c,l);if(!u){const e={channelCount:c.channelCount,channelCountMode:c.channelCountMode,channelInterpretation:c.channelInterpretation,delayTime:c.delayTime.value,maxDelayTime:o};c=t(l,e)}return s.set(l,c),u?await e(l,a.delayTime,c.delayTime):await r(l,a.delayTime,c.delayTime),await i(a,l,c),c})(a,l)}}})(Jr,En,Et,Xr,dr),ki=((e,t,n,r,i,o,s)=>class extends e{constructor(e,a){const l=i(e),c={...Yt,...a},u=r(l,c),d=o(l);super(e,!1,u,d?n(c.maxDelayTime):null),this._delayTime=t(this,d,u.delayTime),s(this,c.maxDelayTime)}get delayTime(){return this._delayTime}})(Rr,ei,Pi,En,gr,br,oi),Oi=(Ni=Pn,(e,t)=>{const n=e.createDynamicsCompressor();if(dn(n,t),t.channelCount>2)throw Ni();if("max"===t.channelCountMode)throw Ni();return pn(n,t,"attack"),pn(n,t,"knee"),pn(n,t,"ratio"),pn(n,t,"release"),pn(n,t,"threshold"),n});var Ni;const Li=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a)=>{let l=n(s);const c=Je(l,a);if(!c){const e={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=t(a,e)}return o.set(a,l),c?(await e(a,s.attack,l.attack),await e(a,s.knee,l.knee),await e(a,s.ratio,l.ratio),await e(a,s.release,l.release),await e(a,s.threshold,l.threshold)):(await r(a,s.attack,l.attack),await r(a,s.knee,l.knee),await r(a,s.ratio,l.ratio),await r(a,s.release,l.release),await r(a,s.threshold,l.threshold)),await i(s,a,l),l})(s,a)}}})(Jr,Oi,Et,Xr,dr),Di=((e,t,n,r,i,o,s,a)=>class extends e{constructor(e,i){const l=o(e),c={...$t,...i},u=r(l,c),d=s(l);super(e,!1,u,d?n():null),this._attack=t(this,d,u.attack),this._knee=t(this,d,u.knee),this._nativeDynamicsCompressorNode=u,this._ratio=t(this,d,u.ratio),this._release=t(this,d,u.release),this._threshold=t(this,d,u.threshold),a(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(e){const t=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=e,e>2)throw this._nativeDynamicsCompressorNode.channelCount=t,i()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(e){const t=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=e,"max"===e)throw this._nativeDynamicsCompressorNode.channelCountMode=t,i()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return"number"==typeof this._nativeDynamicsCompressorNode.reduction.value?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}})(Rr,ei,Li,Oi,Pn,gr,br,oi),Bi=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a)=>{let l=n(s);const c=Je(l,a);if(!c){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=t(a,e)}return o.set(a,l),c?await e(a,s.gain,l.gain):await r(a,s.gain,l.gain),await i(s,a,l),l})(s,a)}}})(Jr,Tn,Et,Xr,dr),zi=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=i(e),l={...en,...s},c=r(a,l),u=o(a);super(e,!1,c,u?n():null),this._gain=t(this,u,c.gain,et,$e)}get gain(){return this._gain}})(Rr,ei,Bi,Tn,gr,br),Fi=((e,t,n,r)=>(i,o,{channelCount:s,channelCountMode:a,channelInterpretation:l,feedback:c,feedforward:u})=>{const d=yn(o,i.sampleRate),h=c instanceof Float64Array?c:new Float64Array(c),p=u instanceof Float64Array?u:new Float64Array(u),f=h.length,m=p.length,g=Math.min(f,m);if(0===f||f>20)throw r();if(0===h[0])throw t();if(0===m||m>20)throw r();if(0===p[0])throw t();if(1!==h[0]){for(let e=0;e<m;e+=1)p[e]/=h[0];for(let e=1;e<f;e+=1)h[e]/=h[0]}const v=n(i,d,s,s);v.channelCount=s,v.channelCountMode=a,v.channelInterpretation=l;const y=[],b=[],x=[];for(let e=0;e<s;e+=1){y.push(0);const e=new Float32Array(32),t=new Float32Array(32);e.fill(0),t.fill(0),b.push(e),x.push(t)}v.onaudioprocess=e=>{const t=e.inputBuffer,n=e.outputBuffer,r=t.numberOfChannels;for(let e=0;e<r;e+=1){const r=t.getChannelData(e),i=n.getChannelData(e);y[e]=sn(h,f,p,m,g,b[e],x[e],y[e],32,r,i)}};const S=i.sampleRate/2;return An({get bufferSize(){return d},get channelCount(){return v.channelCount},set channelCount(e){v.channelCount=e},get channelCountMode(){return v.channelCountMode},set channelCountMode(e){v.channelCountMode=e},get channelInterpretation(){return v.channelInterpretation},set channelInterpretation(e){v.channelInterpretation=e},get context(){return v.context},get inputs(){return[v]},get numberOfInputs(){return v.numberOfInputs},get numberOfOutputs(){return v.numberOfOutputs},addEventListener:(...e)=>v.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>v.dispatchEvent(e[0]),getFrequencyResponse(t,n,r){if(t.length!==n.length||n.length!==r.length)throw e();const i=t.length;for(let e=0;e<i;e+=1){const i=-Math.PI*(t[e]/S),o=[Math.cos(i),Math.sin(i)],s=Mn(In(p,o),In(h,o));n[e]=Math.sqrt(s[0]*s[0]+s[1]*s[1]),r[e]=Math.atan2(s[1],s[0])}},removeEventListener:(...e)=>v.removeEventListener(e[0],e[1],e[2])},v)})(nn,tn,Rn,Pn),Ui=((e,t,n,r)=>i=>e(ln,(()=>ln(i)))?Promise.resolve(e(r,r)).then((e=>{if(!e){const e=n(i,512,0,1);i.oncomplete=()=>{e.onaudioprocess=null,e.disconnect()},e.onaudioprocess=()=>i.currentTime,e.connect(i.destination)}return i.startRendering()})):new Promise((e=>{const n=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});i.oncomplete=t=>{n.disconnect(),e(t.renderedBuffer)},n.connect(i.destination),i.startRendering()})))(nr,Tn,Rn,((e,t)=>()=>{if(null===t)return Promise.resolve(!1);const n=new t(1,1,44100),r=e(n,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise((e=>{n.oncomplete=()=>{r.disconnect(),e(0!==n.currentTime)},n.startRendering()}))})(Tn,yr)),ji=((e,t,n,r,i)=>(o,s)=>{const a=new WeakMap;let l=null;const c=async(c,u)=>{let d=null,h=t(c);const p=Je(h,u);if(void 0===u.createIIRFilter?d=e(u,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):p||(h=u.createIIRFilter(s,o)),a.set(u,null===d?h:d),null!==d){if(null===l){if(null===n)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new n(c.context.destination.channelCount,c.context.length,u.sampleRate);l=(async()=>{await r(c,e,e.destination);return((e,t,n,r)=>{const i=n instanceof Float64Array?n:new Float64Array(n),o=r instanceof Float64Array?r:new Float64Array(r),s=i.length,a=o.length,l=Math.min(s,a);if(1!==i[0]){for(let e=0;e<s;e+=1)o[e]/=i[0];for(let e=1;e<a;e+=1)i[e]/=i[0]}const c=new Float32Array(32),u=new Float32Array(32),d=t.createBuffer(e.numberOfChannels,e.length,e.sampleRate),h=e.numberOfChannels;for(let t=0;t<h;t+=1){const n=e.getChannelData(t),r=d.getChannelData(t);c.fill(0),u.fill(0),sn(i,s,o,a,l,c,u,0,32,n,r)}return d})(await i(e),u,o,s)})()}const e=await l;return d.buffer=e,d.start(0),d}return await r(c,u,h),h};return{render(e,t){const n=a.get(t);return void 0!==n?Promise.resolve(n):c(e,t)}}})(Yr,Et,yr,dr,Ui),Hi=(Vi=Fi,(e,t,n)=>{if(void 0===e.createIIRFilter)return Vi(e,t,n);const r=e.createIIRFilter(n.feedforward,n.feedback);return dn(r,n),r});var Vi;const Gi=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=r(e),l=i(a),c={...on,...s},u=t(a,l?null:e.baseLatency,c);super(e,!1,u,l?n(c.feedback,c.feedforward):null),rn(u),this._nativeIIRFilterNode=u,o(this,1)}getFrequencyResponse(e,t,n){return this._nativeIIRFilterNode.getFrequencyResponse(e,t,n)}})(Rr,Hi,ji,gr,br,oi),Wi=((e,t,n,r,i,o,s,a)=>(l,c)=>{const u=c.listener,{forwardX:d,forwardY:h,forwardZ:p,positionX:f,positionY:m,positionZ:g,upX:v,upY:y,upZ:b}=void 0===u.forwardX?(()=>{const d=new Float32Array(1),h=t(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),p=s(c);let f=!1,m=[0,0,-1,0,1,0],g=[0,0,0];const v=()=>{if(f)return;f=!0;const e=r(c,256,9,0);e.onaudioprocess=({inputBuffer:e})=>{const t=[o(e,d,0),o(e,d,1),o(e,d,2),o(e,d,3),o(e,d,4),o(e,d,5)];t.some(((e,t)=>e!==m[t]))&&(u.setOrientation(...t),m=t);const n=[o(e,d,6),o(e,d,7),o(e,d,8)];n.some(((e,t)=>e!==g[t]))&&(u.setPosition(...n),g=n)},h.connect(e)},y=e=>t=>{t!==m[e]&&(m[e]=t,u.setOrientation(...m))},b=e=>t=>{t!==g[e]&&(g[e]=t,u.setPosition(...g))},x=(t,r,o)=>{const s=n(c,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:r});s.connect(h,0,t),s.start(),Object.defineProperty(s.offset,"defaultValue",{get:()=>r});const u=e({context:l},p,s.offset,et,$e);var d,f,m,g,y,b,x;return a(u,"value",(e=>()=>e.call(u)),(e=>t=>{try{e.call(u,t)}catch(e){if(9!==e.code)throw e}v(),p&&o(t)})),u.cancelAndHoldAtTime=(d=u.cancelAndHoldAtTime,p?()=>{throw i()}:(...e)=>{const t=d.apply(u,e);return v(),t}),u.cancelScheduledValues=(f=u.cancelScheduledValues,p?()=>{throw i()}:(...e)=>{const t=f.apply(u,e);return v(),t}),u.exponentialRampToValueAtTime=(m=u.exponentialRampToValueAtTime,p?()=>{throw i()}:(...e)=>{const t=m.apply(u,e);return v(),t}),u.linearRampToValueAtTime=(g=u.linearRampToValueAtTime,p?()=>{throw i()}:(...e)=>{const t=g.apply(u,e);return v(),t}),u.setTargetAtTime=(y=u.setTargetAtTime,p?()=>{throw i()}:(...e)=>{const t=y.apply(u,e);return v(),t}),u.setValueAtTime=(b=u.setValueAtTime,p?()=>{throw i()}:(...e)=>{const t=b.apply(u,e);return v(),t}),u.setValueCurveAtTime=(x=u.setValueCurveAtTime,p?()=>{throw i()}:(...e)=>{const t=x.apply(u,e);return v(),t}),u};return{forwardX:x(0,0,y(0)),forwardY:x(1,0,y(1)),forwardZ:x(2,-1,y(2)),positionX:x(6,0,b(0)),positionY:x(7,0,b(1)),positionZ:x(8,0,b(2)),upX:x(3,0,y(3)),upY:x(4,1,y(4)),upZ:x(5,0,y(5))}})():u;return{get forwardX(){return d},get forwardY(){return h},get forwardZ(){return p},get positionX(){return f},get positionY(){return m},get positionZ(){return g},get upX(){return v},get upY(){return y},get upZ(){return b}}})(ei,bi,Ai,Rn,Pn,Fn,br,jn),qi=new WeakMap,Ki=((e,t,n,r,i,o)=>class extends n{constructor(n,o){super(n),this._nativeContext=n,Me.set(this,n),r(n)&&i.set(n,new Set),this._destination=new e(this,o),this._listener=t(this,n),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(e){const t="function"==typeof e?o(this,e):null;this._nativeContext.onstatechange=t;const n=this._nativeContext.onstatechange;this._onstatechange=null!==n&&n===t?e:n}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}})(ri,Wi,wr,br,qi,Kn),Ji=((e,t,n,r,i,o)=>(s,a)=>{const l=s.createOscillator();return dn(l,a),pn(l,a,"detune"),pn(l,a,"frequency"),void 0!==a.periodicWave?l.setPeriodicWave(a.periodicWave):un(l,a,"type"),t(n,(()=>n(s)))||mn(l),t(r,(()=>r(s)))||o(l,s),t(i,(()=>i(s)))||gn(l),e(s,l),l})(Hr,nr,Vn,Gn,Wn,qn),Qi=((e,t,n,r,i)=>()=>{const o=new WeakMap;let s=null,a=null,l=null;return{set periodicWave(e){s=e},set start(e){a=e},set stop(e){l=e},render(c,u){const d=o.get(u);return void 0!==d?Promise.resolve(d):(async(c,u)=>{let d=n(c);const h=Je(d,u);if(!h){const e={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:null===s?void 0:s,type:d.type};d=t(u,e),null!==a&&d.start(a),null!==l&&d.stop(l)}return o.set(u,d),h?(await e(u,c.detune,d.detune),await e(u,c.frequency,d.frequency)):(await r(u,c.detune,d.detune),await r(u,c.frequency,d.frequency)),await i(c,u,d),d})(c,u)}}})(Jr,Ji,Et,Xr,dr),Yi=((e,t,n,r,i,o,s)=>class extends e{constructor(e,s){const a=i(e),l={...On,...s},c=n(a,l),u=o(a),d=u?r():null,h=e.sampleRate/2;super(e,!1,c,d),this._detune=t(this,u,c.detune,153600,-153600),this._frequency=t(this,u,c.frequency,h,-h),this._nativeOscillatorNode=c,this._onended=null,this._oscillatorNodeRenderer=d,null!==this._oscillatorNodeRenderer&&void 0!==l.periodicWave&&(this._oscillatorNodeRenderer.periodicWave=l.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(e){const t="function"==typeof e?s(this,e):null;this._nativeOscillatorNode.onended=t;const n=this._nativeOscillatorNode.onended;this._onended=null!==n&&n===t?e:n}get type(){return this._nativeOscillatorNode.type}set type(e){this._nativeOscillatorNode.type=e,null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(e){this._nativeOscillatorNode.setPeriodicWave(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.periodicWave=e)}start(e=0){if(this._nativeOscillatorNode.start(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.start=e),"closed"!==this.context.state){Ve(this);const e=()=>{this._nativeOscillatorNode.removeEventListener("ended",e),tt(this)&&We(this)};this._nativeOscillatorNode.addEventListener("ended",e)}}stop(e=0){this._nativeOscillatorNode.stop(e),null!==this._oscillatorNodeRenderer&&(this._oscillatorNodeRenderer.stop=e)}})(Rr,ei,Ji,Qi,gr,br,Kn),Zi=(Xi=Yr,(e,t)=>{const n=Xi(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=e.createBuffer(1,2,44100);return n.buffer=r,n.loop=!0,n.connect(t),n.start(),()=>{n.stop(),n.disconnect(t)}});var Xi;const $i=((e,t,n,r,i)=>(o,{curve:s,oversample:a,...l})=>{const c=o.createWaveShaper(),u=o.createWaveShaper();dn(c,l),dn(u,l);const d=n(o,{...l,gain:1}),h=n(o,{...l,gain:-1}),p=n(o,{...l,gain:1}),f=n(o,{...l,gain:-1});let m=null,g=!1,v=null;const y={get bufferSize(){},get channelCount(){return c.channelCount},set channelCount(e){d.channelCount=e,h.channelCount=e,c.channelCount=e,p.channelCount=e,u.channelCount=e,f.channelCount=e},get channelCountMode(){return c.channelCountMode},set channelCountMode(e){d.channelCountMode=e,h.channelCountMode=e,c.channelCountMode=e,p.channelCountMode=e,u.channelCountMode=e,f.channelCountMode=e},get channelInterpretation(){return c.channelInterpretation},set channelInterpretation(e){d.channelInterpretation=e,h.channelInterpretation=e,c.channelInterpretation=e,p.channelInterpretation=e,u.channelInterpretation=e,f.channelInterpretation=e},get context(){return c.context},get curve(){return v},set curve(n){if(null!==n&&n.length<2)throw t();if(null===n)c.curve=n,u.curve=n;else{const e=n.length,t=new Float32Array(e+2-e%2),r=new Float32Array(e+2-e%2);t[0]=n[0],r[0]=-n[e-1];const i=Math.ceil((e+1)/2),o=(e+1)/2-1;for(let s=1;s<i;s+=1){const a=s/i*o,l=Math.floor(a),c=Math.ceil(a);t[s]=l===c?n[l]:(1-(a-l))*n[l]+(1-(c-a))*n[c],r[s]=l===c?-n[e-1-l]:-(1-(a-l))*n[e-1-l]-(1-(c-a))*n[e-1-c]}t[i]=e%2==1?n[i-1]:(n[i-2]+n[i-1])/2,c.curve=t,u.curve=r}v=n,g&&(r(v)&&null===m?m=e(o,d):null!==m&&(m(),m=null))},get inputs(){return[d]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return c.numberOfOutputs},get oversample(){return c.oversample},set oversample(e){c.oversample=e,u.oversample=e},addEventListener:(...e)=>d.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>d.dispatchEvent(e[0]),removeEventListener:(...e)=>d.removeEventListener(e[0],e[1],e[2])};null!==s&&(y.curve=s instanceof Float32Array?s:new Float32Array(s)),a!==y.oversample&&(y.oversample=a);return i(An(y,p),(()=>{d.connect(c).connect(p),d.connect(h).connect(u).connect(f).connect(p),g=!0,r(v)&&(m=e(o,d))}),(()=>{d.disconnect(c),c.disconnect(p),d.disconnect(h),h.disconnect(u),u.disconnect(f),f.disconnect(p),g=!1,null!==m&&(m(),m=null)}))})(Zi,tn,Tn,Un,mi),eo=((e,t,n,r,i,o,s)=>(a,l)=>{const c=a.createWaveShaper();if(null!==o&&"webkitAudioContext"===o.name&&void 0===a.createGain().gain.automationRate)return n(a,l);dn(c,l);const u=null===l.curve||l.curve instanceof Float32Array?l.curve:new Float32Array(l.curve);if(null!==u&&u.length<2)throw t();un(c,{curve:u},"curve"),un(c,l,"oversample");let d=null,h=!1;s(c,"curve",(e=>()=>e.call(c)),(t=>n=>(t.call(c,n),h&&(r(n)&&null===d?d=e(a,c):r(n)||null===d||(d(),d=null)),n)));return i(c,(()=>{h=!0,r(c.curve)&&(d=e(a,c))}),(()=>{h=!1,null!==d&&(d(),d=null)}))})(Zi,tn,$i,Un,mi,Cr,jn),to=((e,t,n,r,i,o,s,a,l,c)=>(u,{coneInnerAngle:d,coneOuterAngle:h,coneOuterGain:p,distanceModel:f,maxDistance:m,orientationX:g,orientationY:v,orientationZ:y,panningModel:b,positionX:x,positionY:S,positionZ:w,refDistance:_,rolloffFactor:C,...A})=>{const E=u.createPanner();if(A.channelCount>2)throw s();if("max"===A.channelCountMode)throw s();dn(E,A);const T={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},M=n(u,{...T,channelInterpretation:"speakers",numberOfInputs:6}),I=r(u,{...A,gain:1}),R=r(u,{...T,gain:1}),P=r(u,{...T,gain:0}),k=r(u,{...T,gain:0}),O=r(u,{...T,gain:0}),N=r(u,{...T,gain:0}),L=r(u,{...T,gain:0}),D=i(u,256,6,1),B=o(u,{...T,curve:new Float32Array([1,1]),oversample:"none"});let z=[g,v,y],F=[x,S,w];const U=new Float32Array(1);D.onaudioprocess=({inputBuffer:e})=>{const t=[l(e,U,0),l(e,U,1),l(e,U,2)];t.some(((e,t)=>e!==z[t]))&&(E.setOrientation(...t),z=t);const n=[l(e,U,3),l(e,U,4),l(e,U,5)];n.some(((e,t)=>e!==F[t]))&&(E.setPosition(...n),F=n)},Object.defineProperty(P.gain,"defaultValue",{get:()=>0}),Object.defineProperty(k.gain,"defaultValue",{get:()=>0}),Object.defineProperty(O.gain,"defaultValue",{get:()=>0}),Object.defineProperty(N.gain,"defaultValue",{get:()=>0}),Object.defineProperty(L.gain,"defaultValue",{get:()=>0});const j={get bufferSize(){},get channelCount(){return E.channelCount},set channelCount(e){if(e>2)throw s();I.channelCount=e,E.channelCount=e},get channelCountMode(){return E.channelCountMode},set channelCountMode(e){if("max"===e)throw s();I.channelCountMode=e,E.channelCountMode=e},get channelInterpretation(){return E.channelInterpretation},set channelInterpretation(e){I.channelInterpretation=e,E.channelInterpretation=e},get coneInnerAngle(){return E.coneInnerAngle},set coneInnerAngle(e){E.coneInnerAngle=e},get coneOuterAngle(){return E.coneOuterAngle},set coneOuterAngle(e){E.coneOuterAngle=e},get coneOuterGain(){return E.coneOuterGain},set coneOuterGain(e){if(e<0||e>1)throw t();E.coneOuterGain=e},get context(){return E.context},get distanceModel(){return E.distanceModel},set distanceModel(e){E.distanceModel=e},get inputs(){return[I]},get maxDistance(){return E.maxDistance},set maxDistance(e){if(e<0)throw new RangeError;E.maxDistance=e},get numberOfInputs(){return E.numberOfInputs},get numberOfOutputs(){return E.numberOfOutputs},get orientationX(){return R.gain},get orientationY(){return P.gain},get orientationZ(){return k.gain},get panningModel(){return E.panningModel},set panningModel(e){E.panningModel=e},get positionX(){return O.gain},get positionY(){return N.gain},get positionZ(){return L.gain},get refDistance(){return E.refDistance},set refDistance(e){if(e<0)throw new RangeError;E.refDistance=e},get rolloffFactor(){return E.rolloffFactor},set rolloffFactor(e){if(e<0)throw new RangeError;E.rolloffFactor=e},addEventListener:(...e)=>I.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>I.dispatchEvent(e[0]),removeEventListener:(...e)=>I.removeEventListener(e[0],e[1],e[2])};d!==j.coneInnerAngle&&(j.coneInnerAngle=d),h!==j.coneOuterAngle&&(j.coneOuterAngle=h),p!==j.coneOuterGain&&(j.coneOuterGain=p),f!==j.distanceModel&&(j.distanceModel=f),m!==j.maxDistance&&(j.maxDistance=m),g!==j.orientationX.value&&(j.orientationX.value=g),v!==j.orientationY.value&&(j.orientationY.value=v),y!==j.orientationZ.value&&(j.orientationZ.value=y),b!==j.panningModel&&(j.panningModel=b),x!==j.positionX.value&&(j.positionX.value=x),S!==j.positionY.value&&(j.positionY.value=S),w!==j.positionZ.value&&(j.positionZ.value=w),_!==j.refDistance&&(j.refDistance=_),C!==j.rolloffFactor&&(j.rolloffFactor=C),1===z[0]&&0===z[1]&&0===z[2]||E.setOrientation(...z),0===F[0]&&0===F[1]&&0===F[2]||E.setPosition(...F);return c(An(j,E),(()=>{I.connect(E),e(I,B,0,0),B.connect(R).connect(M,0,0),B.connect(P).connect(M,0,1),B.connect(k).connect(M,0,2),B.connect(O).connect(M,0,3),B.connect(N).connect(M,0,4),B.connect(L).connect(M,0,5),M.connect(D).connect(u.destination)}),(()=>{I.disconnect(E),a(I,B,0,0),B.disconnect(R),R.disconnect(M),B.disconnect(P),P.disconnect(M),B.disconnect(k),k.disconnect(M),B.disconnect(O),O.disconnect(M),B.disconnect(N),N.disconnect(M),B.disconnect(L),L.disconnect(M),M.disconnect(D),D.disconnect(u.destination)}))})(xt,tn,bi,Tn,Rn,eo,Pn,At,Fn,mi),no=(ro=to,(e,t)=>{const n=e.createPanner();return void 0===n.orientationX?ro(e,t):(dn(n,t),pn(n,t,"orientationX"),pn(n,t,"orientationY"),pn(n,t,"orientationZ"),pn(n,t,"positionX"),pn(n,t,"positionY"),pn(n,t,"positionZ"),un(n,t,"coneInnerAngle"),un(n,t,"coneOuterAngle"),un(n,t,"coneOuterGain"),un(n,t,"distanceModel"),un(n,t,"maxDistance"),un(n,t,"panningModel"),un(n,t,"refDistance"),un(n,t,"rolloffFactor"),n)});var ro;const io=((e,t,n,r,i,o,s,a,l,c)=>()=>{const u=new WeakMap;let d=null;return{render(h,p){const f=u.get(p);return void 0!==f?Promise.resolve(f):(async(h,p)=>{let f=null,m=o(h);const g={channelCount:m.channelCount,channelCountMode:m.channelCountMode,channelInterpretation:m.channelInterpretation},v={...g,coneInnerAngle:m.coneInnerAngle,coneOuterAngle:m.coneOuterAngle,coneOuterGain:m.coneOuterGain,distanceModel:m.distanceModel,maxDistance:m.maxDistance,panningModel:m.panningModel,refDistance:m.refDistance,rolloffFactor:m.rolloffFactor},y=Je(m,p);if("bufferSize"in m)f=r(p,{...g,gain:1});else if(!y){const e={...v,orientationX:m.orientationX.value,orientationY:m.orientationY.value,orientationZ:m.orientationZ.value,positionX:m.positionX.value,positionY:m.positionY.value,positionZ:m.positionZ.value};m=i(p,e)}if(u.set(p,null===f?m:f),null!==f){if(null===d){if(null===s)throw new Error("Missing the native OfflineAudioContext constructor.");const e=new s(6,h.context.length,p.sampleRate),r=t(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});r.connect(e.destination),d=(async()=>{const t=await Promise.all([h.orientationX,h.orientationY,h.orientationZ,h.positionX,h.positionY,h.positionZ].map((async(t,r)=>{const i=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:0===r?1:0});return await a(e,t,i.offset),i})));for(let e=0;e<6;e+=1)t[e].connect(r,0,e),t[e].start(0);return c(e)})()}const e=await d,o=r(p,{...g,gain:1});await l(h,p,o);const u=[];for(let t=0;t<e.numberOfChannels;t+=1)u.push(e.getChannelData(t));let m=[u[0][0],u[1][0],u[2][0]],y=[u[3][0],u[4][0],u[5][0]],b=r(p,{...g,gain:1}),x=i(p,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]});o.connect(b).connect(x.inputs[0]),x.connect(f);for(let t=128;t<e.length;t+=128){const e=[u[0][t],u[1][t],u[2][t]],n=[u[3][t],u[4][t],u[5][t]];if(e.some(((e,t)=>e!==m[t]))||n.some(((e,t)=>e!==y[t]))){m=e,y=n;const s=t/p.sampleRate;b.gain.setValueAtTime(0,s),b=r(p,{...g,gain:0}),x=i(p,{...v,orientationX:m[0],orientationY:m[1],orientationZ:m[2],positionX:y[0],positionY:y[1],positionZ:y[2]}),b.gain.setValueAtTime(1,s),o.connect(b).connect(x.inputs[0]),x.connect(f)}}return f}return y?(await e(p,h.orientationX,m.orientationX),await e(p,h.orientationY,m.orientationY),await e(p,h.orientationZ,m.orientationZ),await e(p,h.positionX,m.positionX),await e(p,h.positionY,m.positionY),await e(p,h.positionZ,m.positionZ)):(await a(p,h.orientationX,m.orientationX),await a(p,h.orientationY,m.orientationY),await a(p,h.orientationZ,m.orientationZ),await a(p,h.positionX,m.positionX),await a(p,h.positionY,m.positionY),await a(p,h.positionZ,m.positionZ)),bt(m)?await l(h,p,m.inputs[0]):await l(h,p,m),m})(h,p)}}})(Jr,bi,Ai,Tn,no,Et,yr,Xr,dr,Ui),oo=((e,t,n,r,i,o,s)=>class extends e{constructor(e,a){const l=i(e),c={...Nn,...a},u=n(l,c),d=o(l);super(e,!1,u,d?r():null),this._nativePannerNode=u,this._orientationX=t(this,d,u.orientationX,et,$e),this._orientationY=t(this,d,u.orientationY,et,$e),this._orientationZ=t(this,d,u.orientationZ,et,$e),this._positionX=t(this,d,u.positionX,et,$e),this._positionY=t(this,d,u.positionY,et,$e),this._positionZ=t(this,d,u.positionZ,et,$e),s(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(e){this._nativePannerNode.coneInnerAngle=e}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(e){this._nativePannerNode.coneOuterAngle=e}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(e){this._nativePannerNode.coneOuterGain=e}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(e){this._nativePannerNode.distanceModel=e}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(e){this._nativePannerNode.maxDistance=e}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(e){this._nativePannerNode.panningModel=e}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(e){this._nativePannerNode.refDistance=e}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(e){this._nativePannerNode.rolloffFactor=e}})(Rr,ei,no,io,gr,br,oi),so=(e=>(t,{disableNormalization:n,imag:r,real:i})=>{const o=r instanceof Float32Array?r:new Float32Array(r),s=i instanceof Float32Array?i:new Float32Array(i),a=t.createPeriodicWave(s,o,{disableNormalization:n});if(Array.from(r).length<2)throw e();return a})(Ye),ao=((e,t,n,r)=>class i{constructor(i,o){const s=t(i),a=r({...Ln,...o}),l=e(s,a);return n.add(l),l}static[Symbol.hasInstance](e){return null!==e&&"object"==typeof e&&Object.getPrototypeOf(e)===i.prototype||n.has(e)}})(so,gr,new WeakSet,(e=>{const{imag:t,real:n}=e;return void 0===t?void 0===n?{...e,imag:[0,0],real:[0,0]}:{...e,imag:Array.from(n,(()=>0)),real:n}:void 0===n?{...e,imag:t,real:Array.from(t,(()=>0))}:{...e,imag:t,real:n}})),lo=((e,t,n,r,i,o)=>{const s=16385,a=new Float32Array([1,1]),l=Math.PI/2,c={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...c,oversample:"none"},d=(e,o,d,h,p)=>{if(1===o)return((e,t,i,o)=>{const d=new Float32Array(s),h=new Float32Array(s);for(let e=0;e<s;e+=1){const t=e/16384*l;d[e]=Math.cos(t),h[e]=Math.sin(t)}const p=n(e,{...c,gain:0}),f=r(e,{...u,curve:d}),m=r(e,{...u,curve:a}),g=n(e,{...c,gain:0}),v=r(e,{...u,curve:h});return{connectGraph(){t.connect(p),t.connect(void 0===m.inputs?m:m.inputs[0]),t.connect(g),m.connect(i),i.connect(void 0===f.inputs?f:f.inputs[0]),i.connect(void 0===v.inputs?v:v.inputs[0]),f.connect(p.gain),v.connect(g.gain),p.connect(o,0,0),g.connect(o,0,1)},disconnectGraph(){t.disconnect(p),t.disconnect(void 0===m.inputs?m:m.inputs[0]),t.disconnect(g),m.disconnect(i),i.disconnect(void 0===f.inputs?f:f.inputs[0]),i.disconnect(void 0===v.inputs?v:v.inputs[0]),f.disconnect(p.gain),v.disconnect(g.gain),p.disconnect(o,0,0),g.disconnect(o,0,1)}}})(e,d,h,p);if(2===o)return((e,i,o,d)=>{const h=new Float32Array(s),p=new Float32Array(s),f=new Float32Array(s),m=new Float32Array(s),g=Math.floor(8192.5);for(let e=0;e<s;e+=1)if(e>g){const t=(e-g)/(16384-g)*l;h[e]=Math.cos(t),p[e]=Math.sin(t),f[e]=0,m[e]=1}else{const t=e/(16384-g)*l;h[e]=1,p[e]=0,f[e]=Math.cos(t),m[e]=Math.sin(t)}const v=t(e,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),y=n(e,{...c,gain:0}),b=r(e,{...u,curve:h}),x=n(e,{...c,gain:0}),S=r(e,{...u,curve:p}),w=r(e,{...u,curve:a}),_=n(e,{...c,gain:0}),C=r(e,{...u,curve:f}),A=n(e,{...c,gain:0}),E=r(e,{...u,curve:m});return{connectGraph(){i.connect(v),i.connect(void 0===w.inputs?w:w.inputs[0]),v.connect(y,0),v.connect(x,0),v.connect(_,1),v.connect(A,1),w.connect(o),o.connect(void 0===b.inputs?b:b.inputs[0]),o.connect(void 0===S.inputs?S:S.inputs[0]),o.connect(void 0===C.inputs?C:C.inputs[0]),o.connect(void 0===E.inputs?E:E.inputs[0]),b.connect(y.gain),S.connect(x.gain),C.connect(_.gain),E.connect(A.gain),y.connect(d,0,0),_.connect(d,0,0),x.connect(d,0,1),A.connect(d,0,1)},disconnectGraph(){i.disconnect(v),i.disconnect(void 0===w.inputs?w:w.inputs[0]),v.disconnect(y,0),v.disconnect(x,0),v.disconnect(_,1),v.disconnect(A,1),w.disconnect(o),o.disconnect(void 0===b.inputs?b:b.inputs[0]),o.disconnect(void 0===S.inputs?S:S.inputs[0]),o.disconnect(void 0===C.inputs?C:C.inputs[0]),o.disconnect(void 0===E.inputs?E:E.inputs[0]),b.disconnect(y.gain),S.disconnect(x.gain),C.disconnect(_.gain),E.disconnect(A.gain),y.disconnect(d,0,0),_.disconnect(d,0,0),x.disconnect(d,0,1),A.disconnect(d,0,1)}}})(e,d,h,p);throw i()};return(t,{channelCount:r,channelCountMode:s,pan:a,...l})=>{if("max"===s)throw i();const c=e(t,{...l,channelCount:1,channelCountMode:s,numberOfInputs:2}),u=n(t,{...l,channelCount:r,channelCountMode:s,gain:1}),h=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:a});let{connectGraph:p,disconnectGraph:f}=d(t,r,u,h,c);Object.defineProperty(h.gain,"defaultValue",{get:()=>0}),Object.defineProperty(h.gain,"maxValue",{get:()=>1}),Object.defineProperty(h.gain,"minValue",{get:()=>-1});const m={get bufferSize(){},get channelCount(){return u.channelCount},set channelCount(e){u.channelCount!==e&&(g&&f(),({connectGraph:p,disconnectGraph:f}=d(t,e,u,h,c)),g&&p()),u.channelCount=e},get channelCountMode(){return u.channelCountMode},set channelCountMode(e){if("clamped-max"===e||"max"===e)throw i();u.channelCountMode=e},get channelInterpretation(){return u.channelInterpretation},set channelInterpretation(e){u.channelInterpretation=e},get context(){return u.context},get inputs(){return[u]},get numberOfInputs(){return u.numberOfInputs},get numberOfOutputs(){return u.numberOfOutputs},get pan(){return h.gain},addEventListener:(...e)=>u.addEventListener(e[0],e[1],e[2]),dispatchEvent:(...e)=>u.dispatchEvent(e[0]),removeEventListener:(...e)=>u.removeEventListener(e[0],e[1],e[2])};let g=!1;return o(An(m,c),(()=>{p(),g=!0}),(()=>{f(),g=!1}))}})(bi,Cn,Tn,eo,Pn,mi),co=((e,t)=>(n,r)=>{const i=r.channelCountMode;if("clamped-max"===i)throw t();if(void 0===n.createStereoPanner)return e(n,r);const o=n.createStereoPanner();return dn(o,r),pn(o,r,"pan"),Object.defineProperty(o,"channelCountMode",{get:()=>i,set:e=>{if(e!==i)throw t()}}),o})(lo,Pn),uo=((e,t,n,r,i)=>()=>{const o=new WeakMap;return{render(s,a){const l=o.get(a);return void 0!==l?Promise.resolve(l):(async(s,a)=>{let l=n(s);const c=Je(l,a);if(!c){const e={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=t(a,e)}return o.set(a,l),c?await e(a,s.pan,l.pan):await r(a,s.pan,l.pan),bt(l)?await i(s,a,l.inputs[0]):await i(s,a,l),l})(s,a)}}})(Jr,co,Et,Xr,dr),ho=((e,t,n,r,i,o)=>class extends e{constructor(e,s){const a=i(e),l={...Dn,...s},c=n(a,l),u=o(a);super(e,!1,c,u?r():null),this._pan=t(this,u,c.pan)}get pan(){return this._pan}})(Rr,ei,co,uo,gr,br),po=((e,t,n)=>()=>{const r=new WeakMap;return{render(i,o){const s=r.get(o);return void 0!==s?Promise.resolve(s):(async(i,o)=>{let s=t(i);if(!Je(s,o)){const t={channelCount:s.channelCount,channelCountMode:s.channelCountMode,channelInterpretation:s.channelInterpretation,curve:s.curve,oversample:s.oversample};s=e(o,t)}return r.set(o,s),bt(s)?await n(i,o,s.inputs[0]):await n(i,o,s),s})(i,o)}}})(eo,Et,dr),fo=((e,t,n,r,i,o,s)=>class extends e{constructor(e,t){const a=i(e),l={...zn,...t},c=n(a,l);super(e,!0,c,o(a)?r():null),this._isCurveNullified=!1,this._nativeWaveShaperNode=c,s(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(e){if(null===e)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(e.length<2)throw t();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=e}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(e){this._nativeWaveShaperNode.oversample=e}})(Rr,tn,eo,po,gr,br,oi),mo=(e=>null!==e&&e.isSecureContext)(or),go=(e=>(t,n,r)=>{Object.defineProperties(e,{currentFrame:{configurable:!0,get:()=>Math.round(t*n)},currentTime:{configurable:!0,get:()=>t}});try{return r()}finally{null!==e&&(delete e.currentFrame,delete e.currentTime)}})(or),vo=new WeakMap,yo=((e,t)=>n=>{let r=e.get(n);if(void 0!==r)return r;if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");return r=new t(1,1,44100),e.set(n,r),r})(vo,yr),bo=mo?((e,t,n,r,i,o,s,a,l,c,u,d,h)=>{let p=0;return(f,m,g={credentials:"omit"})=>{const v=u.get(f);if(void 0!==v&&v.has(m))return Promise.resolve();const y=c.get(f);if(void 0!==y){const e=y.get(m);if(void 0!==e)return e}const b=o(f),x=void 0===b.audioWorklet?i(m).then((([e,t])=>{const[r,i]=De(e,t);return n(`${r};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${i}\n})})(window,'_AWGS')`)})).then((()=>{const e=h._AWGS.pop();if(void 0===e)throw new SyntaxError;r(b.currentTime,b.sampleRate,(()=>e(class{},void 0,((e,n)=>{if(""===e.trim())throw t();const r=Pe.get(b);if(void 0!==r){if(r.has(e))throw t();ze(n),Be(n.parameterDescriptors),r.set(e,n)}else ze(n),Be(n.parameterDescriptors),Pe.set(b,new Map([[e,n]]))}),b.sampleRate,void 0,void 0)))})):Promise.all([i(m),Promise.resolve(e(d,d))]).then((([[e,t],n])=>{const r=p+1;p=r;const[i,o]=De(e,t),c=new Blob([`${i};((AudioWorkletProcessor,registerProcessor)=>{${o}\n})(${n?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${n?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${n?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${r}',class extends AudioWorkletProcessor{process(){return !1}})`],{type:"application/javascript; charset=utf-8"}),u=URL.createObjectURL(c);return b.audioWorklet.addModule(u,g).then((()=>{if(a(b))return b;const e=s(b);return e.audioWorklet.addModule(u,g).then((()=>e))})).then((e=>{if(null===l)throw new SyntaxError;try{new l(e,`__sac${r}`)}catch{throw new SyntaxError}})).finally((()=>URL.revokeObjectURL(u)))}));return void 0===y?c.set(f,new Map([[m,x]])):y.set(m,x),x.then((()=>{const e=u.get(f);void 0===e?u.set(f,new Set([m])):e.add(m)})).finally((()=>{const e=c.get(f);void 0!==e&&e.delete(m)})),x}})(nr,Pn,(e=>t=>new Promise(((n,r)=>{if(null===e)return void r(new SyntaxError);const i=e.document.head;if(null===i)r(new SyntaxError);else{const o=e.document.createElement("script"),s=new Blob([t],{type:"application/javascript"}),a=URL.createObjectURL(s),l=e.onerror,c=()=>{e.onerror=l,URL.revokeObjectURL(a)};e.onerror=(t,n,i,o,s)=>n===a||n===e.location.href&&1===i&&1===o?(c(),r(s),!1):null!==l?l(t,n,i,o,s):void 0,o.onerror=()=>{c(),r(new SyntaxError)},o.onload=()=>{c(),n()},o.src=a,o.type="module",i.appendChild(o)}})))(or),go,(xo=()=>new DOMException("","AbortError"),async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw xo()}),gr,yo,br,Ir,new WeakMap,new WeakMap,((e,t)=>async()=>{if(null===e)return!0;if(null===t)return!1;const n=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),r=new t(1,128,44100),i=URL.createObjectURL(n);let o=!1,s=!1;try{await r.audioWorklet.addModule(i);const t=new e(r,"a",{numberOfOutputs:0}),n=r.createOscillator();t.port.onmessage=()=>o=!0,t.onprocessorerror=()=>s=!0,n.connect(t),n.start(0),await r.startRendering()}catch{}finally{URL.revokeObjectURL(i)}return o&&!s})(Ir,yr),or):void 0;var xo;const So=((e,t)=>n=>e(n)||t(n))(Ar,br),wo=((e,t,n,r,i,o,s,a,l,c,u)=>(d,h)=>{const p=s(d)?d:o(d);if(i.has(h)){const e=n();return Promise.reject(e)}try{i.add(h)}catch{}return t(l,(()=>l(p)))?p.decodeAudioData(h).then((n=>(Qt(h).catch((()=>{})),t(a,(()=>a(n)))||u(n),e.add(n),n))):new Promise(((t,n)=>{const i=async()=>{try{await Qt(h)}catch{}},o=e=>{n(e),i()};try{p.decodeAudioData(h,(n=>{"function"!=typeof n.copyFromChannel&&(c(n),Ze(n)),e.add(n),i().then((()=>t(n)))}),(e=>{o(null===e?r():e)}))}catch(e){o(e)}}))})(Or,nr,(()=>new DOMException("","DataCloneError")),(()=>new DOMException("","EncodingError")),new WeakSet,gr,So,Qe,ln,Br,zr),_o=(Co=bo,Ao=kr,Eo=Ur,To=ni,Mo=si,Io=Si,Ro=_i,Po=Ti,ko=Ri,Oo=wo,No=ki,Lo=Di,Do=zi,Bo=Gi,zo=Ki,Fo=Yi,Uo=oo,jo=ao,Ho=ho,Vo=fo,class extends zo{constructor(e,t){super(e,t),this._nativeContext=e,this._audioWorklet=void 0===Co?void 0:{addModule:(e,t)=>Co(this,e,t)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new Ao(this)}createBiquadFilter(){return new Mo(this)}createBuffer(e,t,n){return new Eo({length:t,numberOfChannels:e,sampleRate:n})}createBufferSource(){return new To(this)}createChannelMerger(e=6){return new Io(this,{numberOfInputs:e})}createChannelSplitter(e=6){return new Ro(this,{numberOfOutputs:e})}createConstantSource(){return new Po(this)}createConvolver(){return new ko(this)}createDelay(e=1){return new No(this,{maxDelayTime:e})}createDynamicsCompressor(){return new Lo(this)}createGain(){return new Do(this)}createIIRFilter(e,t){return new Bo(this,{feedback:t,feedforward:e})}createOscillator(){return new Fo(this)}createPanner(){return new Uo(this)}createPeriodicWave(e,t,n={disableNormalization:!1}){return new jo(this,{...n,imag:t,real:e})}createStereoPanner(){return new Ho(this)}createWaveShaper(){return new Vo(this)}decodeAudioData(e,t,n){return Oo(this._nativeContext,e).then((e=>("function"==typeof t&&t(e),e)),(e=>{throw"function"==typeof n&&n(e),e}))}});var Co,Ao,Eo,To,Mo,Io,Ro,Po,ko,Oo,No,Lo,Do,Bo,zo,Fo,Uo,jo,Ho,Vo;const Go=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e),s=t(o,i);if(r(o))throw TypeError();super(e,!0,s,null),this._nativeMediaElementAudioSourceNode=s}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}})(Rr,((e,t)=>e.createMediaElementSource(t.mediaElement)),gr,br),Wo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e);if(r(o))throw new TypeError;const s={...an,...i},a=t(o,s);super(e,!1,a,null),this._nativeMediaStreamAudioDestinationNode=a}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}})(Rr,((e,t)=>{const n=e.createMediaStreamDestination();return dn(n,t),1===n.numberOfOutputs&&Object.defineProperty(n,"numberOfOutputs",{get:()=>0}),n}),gr,br),qo=((e,t,n,r)=>class extends e{constructor(e,i){const o=n(e),s=t(o,i);if(r(o))throw new TypeError;super(e,!0,s,null),this._nativeMediaStreamAudioSourceNode=s}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}})(Rr,((e,{mediaStream:t})=>{const n=t.getAudioTracks();n.sort(((e,t)=>e.id<t.id?-1:e.id>t.id?1:0));const r=n.slice(0,1),i=e.createMediaStreamSource(new MediaStream(r));return Object.defineProperty(i,"mediaStream",{value:t}),i}),gr,br),Ko=((e,t)=>(n,{mediaStreamTrack:r})=>{if("function"==typeof n.createMediaStreamTrackSource)return n.createMediaStreamTrackSource(r);const i=new MediaStream([r]),o=n.createMediaStreamSource(i);if("audio"!==r.kind)throw e();if(t(n))throw new TypeError;return o})(tn,br),Jo=((e,t,n)=>class extends e{constructor(e,r){const i=n(e);super(e,!0,t(i,r),null)}})(Rr,Ko,gr),Qo=((e,t,n,r,i,o,s,a,l)=>class extends e{constructor(e={}){if(null===l)throw new Error("Missing the native AudioContext constructor.");let t;try{t=new l(e)}catch(e){if(12===e.code&&"sampleRate is not in range"===e.message)throw n();throw e}if(null===t)throw r();if(!pt(e.latencyHint))throw new TypeError(`The provided value '${e.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(void 0!==e.sampleRate&&t.sampleRate!==e.sampleRate)throw n();super(t,2);const{latencyHint:i}=e,{sampleRate:o}=t;if(this._baseLatency="number"==typeof t.baseLatency?t.baseLatency:"balanced"===i?512/o:"interactive"===i||void 0===i?256/o:"playback"===i?1024/o:128*Math.max(2,Math.min(128,Math.round(i*o/128)))/o,this._nativeAudioContext=t,"webkitAudioContext"===l.name?(this._nativeGainNode=t.createGain(),this._nativeOscillatorNode=t.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(t.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,"running"===t.state){this._state="suspended";const e=()=>{"suspended"===this._state&&(this._state=null),t.removeEventListener("statechange",e)};t.addEventListener("statechange",e)}}get baseLatency(){return this._baseLatency}get state(){return null!==this._state?this._state:this._nativeAudioContext.state}close(){return"closed"===this.state?this._nativeAudioContext.close().then((()=>{throw t()})):("suspended"===this._state&&(this._state=null),this._nativeAudioContext.close().then((()=>{null!==this._nativeGainNode&&null!==this._nativeOscillatorNode&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),ht(this)})))}createMediaElementSource(e){return new i(this,{mediaElement:e})}createMediaStreamDestination(){return new o(this)}createMediaStreamSource(e){return new s(this,{mediaStream:e})}createMediaStreamTrackSource(e){return new a(this,{mediaStreamTrack:e})}resume(){return"suspended"===this._state?new Promise(((e,t)=>{const n=()=>{this._nativeAudioContext.removeEventListener("statechange",n),"running"===this._nativeAudioContext.state?e():this.resume().then(e,t)};this._nativeAudioContext.addEventListener("statechange",n)})):this._nativeAudioContext.resume().catch((e=>{if(void 0===e||15===e.code)throw t();throw e}))}suspend(){return this._nativeAudioContext.suspend().catch((e=>{if(void 0===e)throw t();throw e}))}})(_o,tn,Pn,Bn,Go,Wo,qo,Jo,Cr),Yo=(Zo=qi,e=>{const t=Zo.get(e);if(void 0===t)throw new Error("The context has no set of AudioWorkletNodes.");return t});var Zo;const Xo=($o=Yo,(e,t)=>{$o(e).add(t)});var $o;const es=(e=>(t,n,r=0,i=0)=>{const o=t[r];if(void 0===o)throw e();return kt(n)?o.connect(n,0,i):o.connect(n,0)})(Ye),ts=(e=>(t,n)=>{e(t).delete(n)})(Yo),ns=(e=>(t,n,r,i=0)=>void 0===n?t.forEach((e=>e.disconnect())):"number"==typeof n?Xt(e,t,n).disconnect():kt(n)?void 0===r?t.forEach((e=>e.disconnect(n))):void 0===i?Xt(e,t,r).disconnect(n,0):Xt(e,t,r).disconnect(n,0,i):void 0===r?t.forEach((e=>e.disconnect(n))):Xt(e,t,r).disconnect(n,0))(Ye),rs=new WeakMap,is=(os=rs,ss=Fe,e=>ss(os,e));var os,ss;const as=((e,t,n,r,i,o,s,a,l,c,u,d,h)=>(p,f,m,g)=>{if(0===g.numberOfInputs&&0===g.numberOfOutputs)throw l();const v=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(v.some((e=>e<1)))throw l();if(v.length!==g.numberOfOutputs)throw t();if("explicit"!==g.channelCountMode)throw l();const y=g.channelCount*g.numberOfInputs,b=v.reduce(((e,t)=>e+t),0),x=void 0===m.parameterDescriptors?0:m.parameterDescriptors.length;if(y+x>6||b>6)throw l();const S=new MessageChannel,w=[],_=[];for(let e=0;e<g.numberOfInputs;e+=1)w.push(s(p,{channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation,gain:1})),_.push(i(p,{channelCount:g.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:g.channelCount}));const C=[];if(void 0!==m.parameterDescriptors)for(const{defaultValue:e,maxValue:t,minValue:n,name:r}of m.parameterDescriptors){const i=o(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:void 0!==g.parameterData[r]?g.parameterData[r]:void 0===e?0:e});Object.defineProperties(i.offset,{defaultValue:{get:()=>void 0===e?0:e},maxValue:{get:()=>void 0===t?et:t},minValue:{get:()=>void 0===n?$e:n}}),C.push(i)}const A=r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,y+x)}),E=yn(f,p.sampleRate),T=a(p,E,y+x,Math.max(1,b)),M=i(p,{channelCount:Math.max(1,b),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,b)}),I=[];for(let e=0;e<g.numberOfOutputs;e+=1)I.push(r(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:v[e]}));for(let e=0;e<g.numberOfInputs;e+=1){w[e].connect(_[e]);for(let t=0;t<g.channelCount;t+=1)_[e].connect(A,t,e*g.channelCount+t)}const R=new Bt(void 0===m.parameterDescriptors?[]:m.parameterDescriptors.map((({name:e},t)=>{const n=C[t];return n.connect(A,0,y+t),n.start(0),[e,n.offset]})));A.connect(T);let P=g.channelInterpretation,k=null;const O=0===g.numberOfOutputs?[T]:I,N={get bufferSize(){return E},get channelCount(){return g.channelCount},set channelCount(e){throw n()},get channelCountMode(){return g.channelCountMode},set channelCountMode(e){throw n()},get channelInterpretation(){return P},set channelInterpretation(e){for(const t of w)t.channelInterpretation=e;P=e},get context(){return T.context},get inputs(){return w},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return k},set onprocessorerror(e){"function"==typeof k&&N.removeEventListener("processorerror",k),k="function"==typeof e?e:null,"function"==typeof k&&N.addEventListener("processorerror",k)},get parameters(){return R},get port(){return S.port2},addEventListener:(...e)=>T.addEventListener(e[0],e[1],e[2]),connect:e.bind(null,O),disconnect:c.bind(null,O),dispatchEvent:(...e)=>T.dispatchEvent(e[0]),removeEventListener:(...e)=>T.removeEventListener(e[0],e[1],e[2])},L=new Map;var D,B;S.port1.addEventListener=(D=S.port1.addEventListener,(...e)=>{if("message"===e[0]){const t="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;if(null!==t){const n=L.get(e[1]);void 0!==n?e[1]=n:(e[1]=e=>{u(p.currentTime,p.sampleRate,(()=>t(e)))},L.set(t,e[1]))}}return D.call(S.port1,e[0],e[1],e[2])}),S.port1.removeEventListener=(B=S.port1.removeEventListener,(...e)=>{if("message"===e[0]){const t=L.get(e[1]);void 0!==t&&(L.delete(e[1]),e[1]=t)}return B.call(S.port1,e[0],e[1],e[2])});let z=null;Object.defineProperty(S.port1,"onmessage",{get:()=>z,set:e=>{"function"==typeof z&&S.port1.removeEventListener("message",z),z="function"==typeof e?e:null,"function"==typeof z&&(S.port1.addEventListener("message",z),S.port1.start())}}),m.prototype.port=S.port1;let F=null;Sn(p,N,m,g).then((e=>F=e));const U=jt(g.numberOfInputs,g.channelCount),j=jt(g.numberOfOutputs,v),H=void 0===m.parameterDescriptors?[]:m.parameterDescriptors.reduce(((e,{name:t})=>({...e,[t]:new Float32Array(128)})),{});let V=!0;const G=()=>{g.numberOfOutputs>0&&T.disconnect(M);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=I[e];for(let r=0;r<v[e];r+=1)M.disconnect(n,t+r,r);t+=v[e]}},W=new Map;T.onaudioprocess=({inputBuffer:e,outputBuffer:t})=>{if(null!==F){const n=d(N);for(let r=0;r<E;r+=128){for(let t=0;t<g.numberOfInputs;t+=1)for(let n=0;n<g.channelCount;n+=1)Ft(e,U[t],n,n,r);void 0!==m.parameterDescriptors&&m.parameterDescriptors.forEach((({name:t},n)=>{Ft(e,H,t,y+n,r)}));for(let e=0;e<g.numberOfInputs;e+=1)for(let t=0;t<v[e];t+=1)0===j[e][t].byteLength&&(j[e][t]=new Float32Array(128));try{const e=U.map(((e,t)=>{if(n[t].size>0)return W.set(t,E/128),e;const r=W.get(t);return void 0===r?[]:(e.every((e=>e.every((e=>0===e))))&&(1===r?W.delete(t):W.set(t,r-1)),e)})),i=u(p.currentTime+r/p.sampleRate,p.sampleRate,(()=>F.process(e,j,H)));V=i;for(let e=0,n=0;e<g.numberOfOutputs;e+=1){for(let i=0;i<v[e];i+=1)Ut(t,j[e],i,n+i,r);n+=v[e]}}catch(e){V=!1,N.dispatchEvent(new ErrorEvent("processorerror",{colno:e.colno,filename:e.filename,lineno:e.lineno,message:e.message}))}if(!V){for(let e=0;e<g.numberOfInputs;e+=1){w[e].disconnect(_[e]);for(let t=0;t<g.channelCount;t+=1)_[r].disconnect(A,t,e*g.channelCount+t)}if(void 0!==m.parameterDescriptors){const e=m.parameterDescriptors.length;for(let t=0;t<e;t+=1){const e=C[t];e.disconnect(A,0,y+t),e.stop()}}A.disconnect(T),T.onaudioprocess=null,q?G():Q();break}}}};let q=!1;const K=s(p,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0}),J=()=>T.connect(K).connect(p.destination),Q=()=>{T.disconnect(K),K.disconnect()};return J(),h(N,(()=>{if(V){Q(),g.numberOfOutputs>0&&T.connect(M);for(let e=0,t=0;e<g.numberOfOutputs;e+=1){const n=I[e];for(let r=0;r<v[e];r+=1)M.connect(n,t+r,r);t+=v[e]}}q=!0}),(()=>{V&&(J(),G()),q=!1}))})(es,Ye,tn,bi,Cn,Ai,Tn,Rn,Pn,ns,go,is,mi),ls=((e,t,n,r,i)=>(o,s,a,l,c,u)=>{if(null!==a)try{const t=new a(o,l,u),r=new Map;let s=null;if(Object.defineProperties(t,{channelCount:{get:()=>u.channelCount,set:()=>{throw e()}},channelCountMode:{get:()=>"explicit",set:()=>{throw e()}},onprocessorerror:{get:()=>s,set:e=>{"function"==typeof s&&t.removeEventListener("processorerror",s),s="function"==typeof e?e:null,"function"==typeof s&&t.addEventListener("processorerror",s)}}}),t.addEventListener=(h=t.addEventListener,(...e)=>{if("processorerror"===e[0]){const t="function"==typeof e[1]?e[1]:"object"==typeof e[1]&&null!==e[1]&&"function"==typeof e[1].handleEvent?e[1].handleEvent:null;if(null!==t){const n=r.get(e[1]);void 0!==n?e[1]=n:(e[1]=n=>{"error"===n.type?(Object.defineProperties(n,{type:{value:"processorerror"}}),t(n)):t(new ErrorEvent(e[0],{...n}))},r.set(t,e[1]))}}return h.call(t,"error",e[1],e[2]),h.call(t,...e)}),t.removeEventListener=(d=t.removeEventListener,(...e)=>{if("processorerror"===e[0]){const t=r.get(e[1]);void 0!==t&&(r.delete(e[1]),e[1]=t)}return d.call(t,"error",e[1],e[2]),d.call(t,e[0],e[1],e[2])}),0!==u.numberOfOutputs){const e=n(o,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(e).connect(o.destination);return i(t,(()=>e.disconnect()),(()=>e.connect(o.destination)))}return t}catch(e){if(11===e.code)throw r();throw e}var d,h;if(void 0===c)throw r();return vn(u),t(o,s,c,u)})(tn,as,Tn,Pn,mi),cs=((e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m)=>(g,v,y)=>{const b=new WeakMap;let x=null;return{render(S,w){a(w,S);const _=b.get(w);return void 0!==_?Promise.resolve(_):(async(a,S)=>{let w=u(a),_=null;const C=Je(w,S),A=Array.isArray(v.outputChannelCount)?v.outputChannelCount:Array.from(v.outputChannelCount);if(null===d){const e=A.reduce(((e,t)=>e+t),0),n=i(S,{channelCount:Math.max(1,e),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,e)}),o=[];for(let e=0;e<a.numberOfOutputs;e+=1)o.push(r(S,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:A[e]}));const c=s(S,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1});c.connect=t.bind(null,o),c.disconnect=l.bind(null,o),_=[n,o,c]}else C||(w=new d(S,g));if(b.set(S,null===_?w:_[2]),null!==_){if(null===x){if(void 0===y)throw new Error("Missing the processor constructor.");if(null===h)throw new Error("Missing the native OfflineAudioContext constructor.");const e=a.channelCount*a.numberOfInputs,t=void 0===y.parameterDescriptors?0:y.parameterDescriptors.length,n=e+t,l=async()=>{const l=new h(n,128*Math.ceil(a.context.length/128),S.sampleRate),c=[],u=[];for(let e=0;e<v.numberOfInputs;e+=1)c.push(s(l,{channelCount:v.channelCount,channelCountMode:v.channelCountMode,channelInterpretation:v.channelInterpretation,gain:1})),u.push(i(l,{channelCount:v.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:v.channelCount}));const d=await Promise.all(Array.from(a.parameters.values()).map((async e=>{const t=o(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:e.value});return await p(l,e,t.offset),t}))),g=r(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,e+t)});for(let e=0;e<v.numberOfInputs;e+=1){c[e].connect(u[e]);for(let t=0;t<v.channelCount;t+=1)u[e].connect(g,t,e*v.channelCount+t)}for(const[t,n]of d.entries())n.connect(g,0,e+t),n.start(0);return g.connect(l.destination),await Promise.all(c.map((e=>f(a,l,e)))),m(l)};x=Vt(a,0===n?null:await l(),S,v,A,y,c)}const e=await x,t=n(S,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[l,u,d]=_;null!==e&&(t.buffer=e,t.start(0)),t.connect(l);for(let e=0,t=0;e<a.numberOfOutputs;e+=1){const n=u[e];for(let r=0;r<A[e];r+=1)l.connect(n,t+r,r);t+=A[e]}return d}if(C)for(const[t,n]of a.parameters.entries())await e(S,n,w.parameters.get(t));else for(const[e,t]of a.parameters.entries())await p(S,t,w.parameters.get(e));return await f(a,S,w),w})(S,w)}}})(Jr,es,Yr,bi,Cn,Ai,Tn,ts,ns,go,Et,Ir,yr,Xr,dr,Ui),us=(ds=vo,e=>ds.get(e));var ds;const hs=(e=>(t,n)=>{e.set(t,n)})(rs),ps=(mo&&((e,t,n,r,i,o,s,a,l,c,u,d,h,p)=>{})(Xo,Rr,ei,cs,ls,ct,us,gr,br,Ir,(e=>({...e,outputChannelCount:void 0!==e.outputChannelCount?e.outputChannelCount:1===e.numberOfInputs&&1===e.numberOfOutputs?[e.channelCount]:Array.from({length:e.numberOfOutputs},(()=>1))})),hs,(e=>{const{port1:t,port2:n}=new MessageChannel;try{t.postMessage(e)}finally{t.close(),n.close()}}),Kn),((e,t,n,r,i)=>{})(tn,Pn,Bn,Ki,Cr),((e,t)=>(n,r,i)=>{if(null===t)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new t(n,r,i)}catch(t){if("SyntaxError"===t.name)throw e();throw t}})(Pn,yr)),fs=((e,t,n,r,i,o,s,a)=>(l,c)=>n(l).render(l,c).then((()=>Promise.all(Array.from(r(c)).map((e=>n(e).render(e,c)))))).then((()=>i(c))).then((n=>("function"!=typeof n.copyFromChannel?(s(n),Ze(n)):t(o,(()=>o(n)))||a(n),e.add(n),n))))(Or,nr,cr,Yo,Ui,Qe,Br,zr);ms=Ae,gs=Tr;var ms,gs;vs=Te,ys=Mr;var vs,ys;var bs={},xs=bs&&bs.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Ss=bs&&bs.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||xs(t,e,n)};Object.defineProperty(bs,"__esModule",{value:!0}),new(o("eoNXt").AgentConfig),Ss(o("fsJE0"),bs);var ws={};
60
60
  /*!
61
61
  Copyright (c) 2018 Jed Watson.
62
62
  Licensed under the MIT License (MIT), see
@@ -236,7 +236,7 @@ to {
236
236
  * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
237
237
  * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
238
238
  */function Pf(){return Pf=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},Pf.apply(this,arguments)}function kf({bounds:e,boundsOptions:n,center:r,children:i,className:o,id:s,placeholder:a,style:l,whenReady:u,zoom:d,...h},p){const[f]=(0,c.useState)({className:o,id:s,style:l}),[m,g]=(0,c.useState)(null);(0,c.useImperativeHandle)(p,(()=>m?.map??null),[m]);const v=(0,c.useCallback)((t=>{if(null!==t&&null===m){const i=new(0,Rf.Map)(t,h);null!=r&&null!=d?i.setView(r,d):null!=e&&i.fitBounds(e,n),null!=u&&i.whenReady(u),g(Ef(i))}}),[]);(0,c.useEffect)((()=>()=>{m?.map.remove()}),[m]);const y=m?t(c).createElement(Mf,{value:m},i):a??null;return t(c).createElement("div",Pf({},f,{ref:v}),y)}!function(e){"use strict";var t="1.9.4";function n(e){var t,n,r,i;for(n=1,r=arguments.length;n<r;n++)for(t in i=arguments[n])e[t]=i[t];return e}var r=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function i(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var r=n.call(arguments,2);return function(){return e.apply(t,r.length?r.concat(n.call(arguments)):arguments)}}var o=0;function s(e){return"_leaflet_id"in e||(e._leaflet_id=++o),e._leaflet_id}function a(e,t,n){var r,i,o,s;return s=function(){r=!1,i&&(o.apply(n,i),i=!1)},o=function(){r?i=arguments:(e.apply(n,arguments),setTimeout(s,t),r=!0)},o}function l(e,t,n){var r=t[1],i=t[0],o=r-i;return e===r&&n?e:((e-i)%o+o)%o+i}function c(){return!1}function u(e,t){if(!1===t)return e;var n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}function d(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function h(e){return d(e).split(/\s+/)}function p(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?r(e.options):{}),t)e.options[n]=t[n];return e.options}function f(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function g(e,t){return e.replace(m,(function(e,n){var r=t[n];if(void 0===r)throw new Error("No value provided for variable "+e);return"function"==typeof r&&(r=r(t)),r}))}var v=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function y(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var b="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function x(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var S=0;function w(e){var t=+new Date,n=Math.max(0,16-(t-S));return S=t+n,window.setTimeout(e,n)}var _=window.requestAnimationFrame||x("RequestAnimationFrame")||w,C=window.cancelAnimationFrame||x("CancelAnimationFrame")||x("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function A(e,t,n){if(!n||_!==w)return _.call(window,i(e,t));e.call(t)}function E(e){e&&C.call(window,e)}var T={__proto__:null,extend:n,create:r,bind:i,get lastId(){return o},stamp:s,throttle:a,wrapNum:l,falseFn:c,formatNum:u,trim:d,splitWords:h,setOptions:p,getParamString:f,template:g,isArray:v,indexOf:y,emptyImageUrl:b,requestFn:_,cancelFn:C,requestAnimFrame:A,cancelAnimFrame:E};function M(){}function I(e){if("undefined"!=typeof L&&L&&L.Mixin){e=v(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}M.extend=function(e){var t=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=t.__super__=this.prototype,o=r(i);for(var s in o.constructor=t,t.prototype=o,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(t[s]=this[s]);return e.statics&&n(t,e.statics),e.includes&&(I(e.includes),n.apply(null,[o].concat(e.includes))),n(o,e),delete o.statics,delete o.includes,o.options&&(o.options=i.options?r(i.options):{},n(o.options,e.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=o._initHooks.length;e<t;e++)o._initHooks[e].call(this)}},t},M.include=function(e){var t=this.prototype.options;return n(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},M.mergeOptions=function(e){return n(this.prototype.options,e),this},M.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var R={on:function(e,t,n){if("object"==typeof e)for(var r in e)this._on(r,e[r],t);else for(var i=0,o=(e=h(e)).length;i<o;i++)this._on(e[i],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"==typeof e)for(var r in e)this._off(r,e[r],t);else{e=h(e);for(var i=1===arguments.length,o=0,s=e.length;o<s;o++)i?this._off(e[o]):this._off(e[o],t,n)}else delete this._events;return this},_on:function(e,t,n,r){if("function"==typeof t){if(!1===this._listens(e,t,n)){n===this&&(n=void 0);var i={fn:t,ctx:n};r&&(i.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(i)}}else console.warn("wrong listener type: "+typeof t)},_off:function(e,t,n){var r,i,o;if(this._events&&(r=this._events[e]))if(1!==arguments.length)if("function"==typeof t){var s=this._listens(e,t,n);if(!1!==s){var a=r[s];this._firingCount&&(a.fn=c,this._events[e]=r=r.slice()),r.splice(s,1)}}else console.warn("wrong listener type: "+typeof t);else{if(this._firingCount)for(i=0,o=r.length;i<o;i++)r[i].fn=c;delete this._events[e]}},fire:function(e,t,r){if(!this.listens(e,r))return this;var i=n({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var o=this._events[e];if(o){this._firingCount=this._firingCount+1||1;for(var s=0,a=o.length;s<a;s++){var l=o[s],c=l.fn;l.once&&this.off(e,c,l.ctx),c.call(l.ctx||this,i)}this._firingCount--}}return r&&this._propagateEvent(i),this},listens:function(e,t,n,r){"string"!=typeof e&&console.warn('"string" type argument expected');var i=t;"function"!=typeof t&&(r=!!t,i=void 0,n=void 0);var o=this._events&&this._events[e];if(o&&o.length&&!1!==this._listens(e,i,n))return!0;if(r)for(var s in this._eventParents)if(this._eventParents[s].listens(e,t,n,r))return!0;return!1},_listens:function(e,t,n){if(!this._events)return!1;var r=this._events[e]||[];if(!t)return!!r.length;n===this&&(n=void 0);for(var i=0,o=r.length;i<o;i++)if(r[i].fn===t&&r[i].ctx===n)return i;return!1},once:function(e,t,n){if("object"==typeof e)for(var r in e)this._on(r,e[r],t,!0);else for(var i=0,o=(e=h(e)).length;i<o;i++)this._on(e[i],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[s(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[s(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,n({layer:e.target,propagatedFrom:e.target},e),!0)}};R.addEventListener=R.on,R.removeEventListener=R.clearAllEventListeners=R.off,R.addOneTimeEventListener=R.once,R.fireEvent=R.fire,R.hasEventListeners=R.listens;var P=M.extend(R);function k(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var O=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};function N(e,t,n){return e instanceof k?e:v(e)?new k(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new k(e.x,e.y):new k(e,t,n)}function D(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r<i;r++)this.extend(n[r])}function B(e,t){return!e||e instanceof D?e:new D(e,t)}function z(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;r<i;r++)this.extend(n[r])}function F(e,t){return e instanceof z?e:new z(e,t)}function U(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function j(e,t,n){return e instanceof U?e:v(e)&&"object"!=typeof e[0]?3===e.length?new U(e[0],e[1],e[2]):2===e.length?new U(e[0],e[1]):null:null==e?e:"object"==typeof e&&"lat"in e?new U(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new U(e,t,n)}k.prototype={clone:function(){return new k(this.x,this.y)},add:function(e){return this.clone()._add(N(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(N(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new k(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new k(this.x/e.x,this.y/e.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=O(this.x),this.y=O(this.y),this},distanceTo:function(e){var t=(e=N(e)).x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return(e=N(e)).x===this.x&&e.y===this.y},contains:function(e){return e=N(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},D.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof k||"number"==typeof e[0]||"x"in e)t=n=N(e);else if(t=(e=B(e)).min,n=e.max,!t||!n)return this;return this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=t.clone(),this.max=n.clone()),this},getCenter:function(e){return N((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return N(this.min.x,this.max.y)},getTopRight:function(){return N(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return(e="number"==typeof e[0]||e instanceof k?N(e):B(e))instanceof D?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=B(e);var t=this.min,n=this.max,r=e.min,i=e.max,o=i.x>=t.x&&r.x<=n.x,s=i.y>=t.y&&r.y<=n.y;return o&&s},overlaps:function(e){e=B(e);var t=this.min,n=this.max,r=e.min,i=e.max,o=i.x>t.x&&r.x<n.x,s=i.y>t.y&&r.y<n.y;return o&&s},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,n=this.max,r=Math.abs(t.x-n.x)*e,i=Math.abs(t.y-n.y)*e;return B(N(t.x-r,t.y-i),N(n.x+r,n.y+i))},equals:function(e){return!!e&&(e=B(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},z.prototype={extend:function(e){var t,n,r=this._southWest,i=this._northEast;if(e instanceof U)t=e,n=e;else{if(!(e instanceof z))return e?this.extend(j(e)||F(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return r||i?(r.lat=Math.min(t.lat,r.lat),r.lng=Math.min(t.lng,r.lng),i.lat=Math.max(n.lat,i.lat),i.lng=Math.max(n.lng,i.lng)):(this._southWest=new U(t.lat,t.lng),this._northEast=new U(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,r=Math.abs(t.lat-n.lat)*e,i=Math.abs(t.lng-n.lng)*e;return new z(new U(t.lat-r,t.lng-i),new U(n.lat+r,n.lng+i))},getCenter:function(){return new U((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new U(this.getNorth(),this.getWest())},getSouthEast:function(){return new U(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e="number"==typeof e[0]||e instanceof U||"lat"in e?j(e):F(e);var t,n,r=this._southWest,i=this._northEast;return e instanceof z?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=r.lat&&n.lat<=i.lat&&t.lng>=r.lng&&n.lng<=i.lng},intersects:function(e){e=F(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),o=i.lat>=t.lat&&r.lat<=n.lat,s=i.lng>=t.lng&&r.lng<=n.lng;return o&&s},overlaps:function(e){e=F(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),i=e.getNorthEast(),o=i.lat>t.lat&&r.lat<n.lat,s=i.lng>t.lng&&r.lng<n.lng;return o&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=F(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}},U.prototype={equals:function(e,t){return!!e&&(e=j(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+u(this.lat,e)+", "+u(this.lng,e)+")"},distanceTo:function(e){return G.distance(this,j(e))},wrap:function(){return G.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return F([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new U(this.lat,this.lng,this.alt)}};var H,V={latLngToPoint:function(e,t){var n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)},pointToLatLng:function(e,t){var n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new D(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?l(e.lng,this.wrapLng,!0):e.lng;return new U(this.wrapLat?l(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),r=t.lat-n.lat,i=t.lng-n.lng;if(0===r&&0===i)return e;var o=e.getSouthWest(),s=e.getNorthEast();return new z(new U(o.lat-r,o.lng-i),new U(s.lat-r,s.lng-i))}},G=n({},V,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,r=e.lat*n,i=t.lat*n,o=Math.sin((t.lat-e.lat)*n/2),s=Math.sin((t.lng-e.lng)*n/2),a=o*o+Math.cos(r)*Math.cos(i)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),W=6378137,q={R:W,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),i=Math.sin(r*t);return new k(this.R*e.lng*t,this.R*Math.log((1+i)/(1-i))/2)},unproject:function(e){var t=180/Math.PI;return new U((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(H=W*Math.PI,new D([-H,-H],[H,H]))};function K(e,t,n,r){if(v(e))return this._a=e[0],this._b=e[1],this._c=e[2],void(this._d=e[3]);this._a=e,this._b=t,this._c=n,this._d=r}function J(e,t,n,r){return new K(e,t,n,r)}K.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new k((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};var Q=n({},G,{code:"EPSG:3857",projection:q,transformation:function(){var e=.5/(Math.PI*q.R);return J(e,.5,-e,.5)}()}),Y=n({},Q,{code:"EPSG:900913"});function Z(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function X(e,t){var n,r,i,o,s,a,l="";for(n=0,i=e.length;n<i;n++){for(r=0,o=(s=e[n]).length;r<o;r++)l+=(r?"L":"M")+(a=s[r]).x+" "+a.y;l+=t?ze.svg?"z":"x":""}return l||"M0 0"}var $,ee=document.documentElement.style,te="ActiveXObject"in window,ne=te&&!document.addEventListener,re="msLaunchUri"in navigator&&!("documentMode"in document),ie=Be("webkit"),oe=Be("android"),se=Be("android 2")||Be("android 3"),ae=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),le=oe&&Be("Google")&&ae<537&&!("AudioNode"in window),ce=!!window.opera,ue=!re&&Be("chrome"),de=Be("gecko")&&!ie&&!ce&&!te,he=!ue&&Be("safari"),pe=Be("phantom"),fe="OTransition"in ee,me=0===navigator.platform.indexOf("Win"),ge=te&&"transition"in ee,ve="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!se,ye="MozPerspective"in ee,be=!window.L_DISABLE_3D&&(ge||ve||ye)&&!fe&&!pe,xe="undefined"!=typeof orientation||Be("mobile"),Se=xe&&ie,we=xe&&ve,_e=!window.PointerEvent&&window.MSPointerEvent,Ce=!(!window.PointerEvent&&!_e),Ae="ontouchstart"in window||!!window.TouchEvent,Ee=!window.L_NO_TOUCH&&(Ae||Ce),Te=xe&&ce,Me=xe&&de,Ie=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Re=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",c,t),window.removeEventListener("testPassiveEventSupport",c,t)}catch(e){}return e}(),Pe=!!document.createElement("canvas").getContext,ke=!(!document.createElementNS||!Z("svg").createSVGRect),Oe=!!ke&&(($=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===($.firstChild&&$.firstChild.namespaceURI)),Ne=!ke&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}(),Le=0===navigator.platform.indexOf("Mac"),De=0===navigator.platform.indexOf("Linux");function Be(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var ze={ie:te,ielt9:ne,edge:re,webkit:ie,android:oe,android23:se,androidStock:le,opera:ce,chrome:ue,gecko:de,safari:he,phantom:pe,opera12:fe,win:me,ie3d:ge,webkit3d:ve,gecko3d:ye,any3d:be,mobile:xe,mobileWebkit:Se,mobileWebkit3d:we,msPointer:_e,pointer:Ce,touch:Ee,touchNative:Ae,mobileOpera:Te,mobileGecko:Me,retina:Ie,passiveEvents:Re,canvas:Pe,svg:ke,vml:Ne,inlineSvg:Oe,mac:Le,linux:De},Fe=ze.msPointer?"MSPointerDown":"pointerdown",Ue=ze.msPointer?"MSPointerMove":"pointermove",je=ze.msPointer?"MSPointerUp":"pointerup",He=ze.msPointer?"MSPointerCancel":"pointercancel",Ve={touchstart:Fe,touchmove:Ue,touchend:je,touchcancel:He},Ge={touchstart:et,touchmove:$e,touchend:$e,touchcancel:$e},We={},qe=!1;function Ke(e,t,n){return"touchstart"===t&&Xe(),Ge[t]?(n=Ge[t].bind(this,n),e.addEventListener(Ve[t],n,!1),n):(console.warn("wrong event specified:",t),c)}function Je(e,t,n){Ve[t]?e.removeEventListener(Ve[t],n,!1):console.warn("wrong event specified:",t)}function Qe(e){We[e.pointerId]=e}function Ye(e){We[e.pointerId]&&(We[e.pointerId]=e)}function Ze(e){delete We[e.pointerId]}function Xe(){qe||(document.addEventListener(Fe,Qe,!0),document.addEventListener(Ue,Ye,!0),document.addEventListener(je,Ze,!0),document.addEventListener(He,Ze,!0),qe=!0)}function $e(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],We)t.touches.push(We[n]);t.changedTouches=[t],e(t)}}function et(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Qt(t),$e(e,t)}function tt(e){var t,n,r={};for(n in e)t=e[n],r[n]=t&&t.bind?t.bind(e):t;return e=r,r.type="dblclick",r.detail=2,r.isTrusted=!1,r._simulated=!0,r}var nt=200;function rt(e,t){e.addEventListener("dblclick",t);var n,r=0;function i(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var i=Zt(e);if(!i.some((function(e){return e instanceof HTMLLabelElement&&e.attributes.for}))||i.some((function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement}))){var o=Date.now();o-r<=nt?2==++n&&t(tt(e)):n=1,r=o}}}else n=e.detail}return e.addEventListener("click",i),{dblclick:t,simDblclick:i}}function it(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}var ot,st,at,lt,ct,ut=Tt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),dt=Tt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ht="webkitTransition"===dt||"OTransition"===dt?dt+"End":"transitionend";function pt(e){return"string"==typeof e?document.getElementById(e):e}function ft(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var r=document.defaultView.getComputedStyle(e,null);n=r?r[t]:null}return"auto"===n?null:n}function mt(e,t,n){var r=document.createElement(e);return r.className=t||"",n&&n.appendChild(r),r}function gt(e){var t=e.parentNode;t&&t.removeChild(e)}function vt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function yt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function bt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function xt(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=Ct(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function St(e,t){if(void 0!==e.classList)for(var n=h(t),r=0,i=n.length;r<i;r++)e.classList.add(n[r]);else if(!xt(e,t)){var o=Ct(e);_t(e,(o?o+" ":"")+t)}}function wt(e,t){void 0!==e.classList?e.classList.remove(t):_t(e,d((" "+Ct(e)+" ").replace(" "+t+" "," ")))}function _t(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function Ct(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}function At(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&Et(e,t)}function Et(e,t){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(r)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+r+"(opacity="+t+")"}function Tt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function Mt(e,t,n){var r=t||new k(0,0);e.style[ut]=(ze.ie3d?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(n?" scale("+n+")":"")}function It(e,t){e._leaflet_pos=t,ze.any3d?Mt(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function Rt(e){return e._leaflet_pos||new k(0,0)}if("onselectstart"in document)ot=function(){Ft(window,"selectstart",Qt)},st=function(){jt(window,"selectstart",Qt)};else{var Pt=Tt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ot=function(){if(Pt){var e=document.documentElement.style;at=e[Pt],e[Pt]="none"}},st=function(){Pt&&(document.documentElement.style[Pt]=at,at=void 0)}}function kt(){Ft(window,"dragstart",Qt)}function Ot(){jt(window,"dragstart",Qt)}function Nt(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(Lt(),lt=e,ct=e.style.outlineStyle,e.style.outlineStyle="none",Ft(window,"keydown",Lt))}function Lt(){lt&&(lt.style.outlineStyle=ct,lt=void 0,ct=void 0,jt(window,"keydown",Lt))}function Dt(e){do{e=e.parentNode}while(!(e.offsetWidth&&e.offsetHeight||e===document.body));return e}function Bt(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var zt={__proto__:null,TRANSFORM:ut,TRANSITION:dt,TRANSITION_END:ht,get:pt,getStyle:ft,create:mt,remove:gt,empty:vt,toFront:yt,toBack:bt,hasClass:xt,addClass:St,removeClass:wt,setClass:_t,getClass:Ct,setOpacity:At,testProp:Tt,setTransform:Mt,setPosition:It,getPosition:Rt,get disableTextSelection(){return ot},get enableTextSelection(){return st},disableImageDrag:kt,enableImageDrag:Ot,preventOutline:Nt,restoreOutline:Lt,getSizedParentNode:Dt,getScale:Bt};function Ft(e,t,n,r){if(t&&"object"==typeof t)for(var i in t)Gt(e,i,t[i],n);else for(var o=0,s=(t=h(t)).length;o<s;o++)Gt(e,t[o],n,r);return this}var Ut="_leaflet_events";function jt(e,t,n,r){if(1===arguments.length)Ht(e),delete e[Ut];else if(t&&"object"==typeof t)for(var i in t)Wt(e,i,t[i],n);else if(t=h(t),2===arguments.length)Ht(e,(function(e){return-1!==y(t,e)}));else for(var o=0,s=t.length;o<s;o++)Wt(e,t[o],n,r);return this}function Ht(e,t){for(var n in e[Ut]){var r=n.split(/\d/)[0];t&&!t(r)||Wt(e,r,null,null,n)}}var Vt={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Gt(e,t,n,r){var i=t+s(n)+(r?"_"+s(r):"");if(e[Ut]&&e[Ut][i])return this;var o=function(t){return n.call(r||e,t||window.event)},a=o;!ze.touchNative&&ze.pointer&&0===t.indexOf("touch")?o=Ke(e,t,o):ze.touch&&"dblclick"===t?o=rt(e,o):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(Vt[t]||t,o,!!ze.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(o=function(t){t=t||window.event,tn(e,t)&&a(t)},e.addEventListener(Vt[t],o,!1)):e.addEventListener(t,a,!1):e.attachEvent("on"+t,o),e[Ut]=e[Ut]||{},e[Ut][i]=o}function Wt(e,t,n,r,i){i=i||t+s(n)+(r?"_"+s(r):"");var o=e[Ut]&&e[Ut][i];if(!o)return this;!ze.touchNative&&ze.pointer&&0===t.indexOf("touch")?Je(e,t,o):ze.touch&&"dblclick"===t?it(e,o):"removeEventListener"in e?e.removeEventListener(Vt[t]||t,o,!1):e.detachEvent("on"+t,o),e[Ut][i]=null}function qt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Kt(e){return Gt(e,"wheel",qt),this}function Jt(e){return Ft(e,"mousedown touchstart dblclick contextmenu",qt),e._leaflet_disable_click=!0,this}function Qt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Yt(e){return Qt(e),qt(e),this}function Zt(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function Xt(e,t){if(!t)return new k(e.clientX,e.clientY);var n=Bt(t),r=n.boundingClientRect;return new k((e.clientX-r.left)/n.x-t.clientLeft,(e.clientY-r.top)/n.y-t.clientTop)}var $t=ze.linux&&ze.chrome?window.devicePixelRatio:ze.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function en(e){return ze.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/$t:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function tn(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1}return n!==e}var nn={__proto__:null,on:Ft,off:jt,stopPropagation:qt,disableScrollPropagation:Kt,disableClickPropagation:Jt,preventDefault:Qt,stop:Yt,getPropagationPath:Zt,getMousePosition:Xt,getWheelDelta:en,isExternalTarget:tn,addListener:Ft,removeListener:jt},rn=P.extend({run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=Rt(e),this._offset=t.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=A(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),It(this._el,n),this.fire("step")},_complete:function(){E(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),on=P.extend({options:{crs:Q,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(e,t){t=p(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom)),t.center&&void 0!==t.zoom&&this.setView(j(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=dt&&ze.any3d&&!ze.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ft(this._proxy,ht,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,r){return t=void 0===t?this._zoom:this._limitZoom(t),e=this._limitCenter(j(e),t,this.options.maxBounds),r=r||{},this._stop(),this._loaded&&!r.reset&&!0!==r&&(void 0!==r.animate&&(r.zoom=n({animate:r.animate},r.zoom),r.pan=n({animate:r.animate,duration:r.duration},r.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,r.zoom):this._tryAnimatedPan(e,r.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,r.pan&&r.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(ze.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var r=this.getZoomScale(t),i=this.getSize().divideBy(2),o=(e instanceof k?e:this.latLngToContainerPoint(e)).subtract(i).multiplyBy(1-1/r),s=this.containerPointToLatLng(i.add(o));return this.setView(s,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():F(e);var n=N(t.paddingTopLeft||t.padding||[0,0]),r=N(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(e,!1,n.add(r));if((i="number"==typeof t.maxZoom?Math.min(t.maxZoom,i):i)===1/0)return{center:e.getCenter(),zoom:i};var o=r.subtract(n).divideBy(2),s=this.project(e.getSouthWest(),i),a=this.project(e.getNorthEast(),i);return{center:this.unproject(s.add(a).divideBy(2).add(o),i),zoom:i}},fitBounds:function(e,t){if(!(e=F(e)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(t=t||{},!(e=N(e).round()).x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new rn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){St(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,t,n){if(!1===(n=n||{}).animate||!ze.any3d)return this.setView(e,t,n);this._stop();var r=this.project(this.getCenter()),i=this.project(e),o=this.getSize(),s=this._zoom;e=j(e),t=void 0===t?s:t;var a=Math.max(o.x,o.y),l=a*this.getZoomScale(s,t),c=i.distanceTo(r)||1,u=1.42,d=u*u;function h(e){var t=(l*l-a*a+(e?-1:1)*d*d*c*c)/(2*(e?l:a)*d*c),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function p(e){return(Math.exp(e)-Math.exp(-e))/2}function f(e){return(Math.exp(e)+Math.exp(-e))/2}function m(e){return p(e)/f(e)}var g=h(0);function v(e){return a*(f(g)/f(g+u*e))}function y(e){return a*(f(g)*m(g+u*e)-p(g))/d}function b(e){return 1-Math.pow(1-e,1.5)}var x=Date.now(),S=(h(1)-g)/u,w=n.duration?1e3*n.duration:1e3*S*.8;function _(){var n=(Date.now()-x)/w,o=b(n)*S;n<=1?(this._flyToFrame=A(_,this),this._move(this.unproject(r.add(i.subtract(r).multiplyBy(y(o)/c)),s),this.getScaleZoom(a/v(o),s),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),_.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=F(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),r=this._limitCenter(n,this._zoom,F(e));return n.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=N((t=t||{}).paddingTopLeft||t.padding||[0,0]),r=N(t.paddingBottomRight||t.padding||[0,0]),i=this.project(this.getCenter()),o=this.project(e),s=this.getPixelBounds(),a=B([s.min.add(n),s.max.subtract(r)]),l=a.getSize();if(!a.contains(o)){this._enforcingBounds=!0;var c=o.subtract(a.getCenter()),u=a.extend(o).getSize().subtract(l);i.x+=c.x<0?-u.x:u.x,i.y+=c.y<0?-u.y:u.y,this.panTo(this.unproject(i),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),o=t.divideBy(2).round(),s=r.divideBy(2).round(),a=o.subtract(s);return a.x||a.y?(e.animate&&e.pan?this.panBy(a):(e.pan&&this._rawPanBy(a),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=n({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,r,e):navigator.geolocation.getCurrentPosition(t,r,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=new U(e.coords.latitude,e.coords.longitude),n=t.toBounds(2*e.coords.accuracy),r=this._locateOptions;if(r.setView){var i=this.getBoundsZoom(n);this.setView(t,r.maxZoom?Math.min(i,r.maxZoom):i)}var o={latlng:t,bounds:n,timestamp:e.timestamp};for(var s in e.coords)"number"==typeof e.coords[s]&&(o[s]=e.coords[s]);this.fire("locationfound",o)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(e){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),gt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(E(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)gt(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=mt("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new z(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=F(e),n=N(n||[0,0]);var r=this.getZoom()||0,i=this.getMinZoom(),o=this.getMaxZoom(),s=e.getNorthWest(),a=e.getSouthEast(),l=this.getSize().subtract(n),c=B(this.project(a,r),this.project(s,r)).getSize(),u=ze.any3d?this.options.zoomSnap:1,d=l.x/c.x,h=l.y/c.y,p=t?Math.max(d,h):Math.min(d,h);return r=this.getScaleZoom(p,r),u&&(r=Math.round(r/(u/100))*(u/100),r=t?Math.ceil(r/u)*u:Math.floor(r/u)*u),Math.max(i,Math.min(o,r))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new k(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new D(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var r=n.zoom(e*n.scale(t));return isNaN(r)?1/0:r},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(j(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(N(e),t)},layerPointToLatLng:function(e){var t=N(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(j(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(j(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(F(e))},distance:function(e,t){return this.options.crs.distance(j(e),j(t))},containerPointToLayerPoint:function(e){return N(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return N(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(N(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(e)))},mouseEventToContainerPoint:function(e){return Xt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=pt(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");Ft(t,"scroll",this._onScroll,this),this._containerId=s(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&ze.any3d,St(e,"leaflet-container"+(ze.touch?" leaflet-touch":"")+(ze.retina?" leaflet-retina":"")+(ze.ielt9?" leaflet-oldie":"")+(ze.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=ft(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),It(this._mapPane,new k(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(St(e.markerPane,"leaflet-zoom-hide"),St(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){It(this._mapPane,new k(0,0));var r=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var i=this._zoom!==t;this._moveStart(i,n)._move(e,t)._moveEnd(i),this.fire("viewreset"),r&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,r){void 0===t&&(t=this._zoom);var i=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),r?n&&n.pinch&&this.fire("zoom",n):((i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return E(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){It(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){this._targets={},this._targets[s(this._container)]=this;var t=e?jt:Ft;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),ze.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){E(this._resizeRequest),this._resizeRequest=A((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,r=[],i="mouseout"===t||"mouseover"===t,o=e.target||e.srcElement,a=!1;o;){if((n=this._targets[s(o)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(t,!0)){if(i&&!tn(o,e))break;if(r.push(n),i)break}if(o===this._container)break;o=o.parentNode}return r.length||a||i||!this.listens(t,!0)||(r=[this]),r},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t))){var n=e.type;"mousedown"===n&&Nt(t),this._fireDOMEvent(e,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,r){if("click"===e.type){var i=n({},e);i.type="preclick",this._fireDOMEvent(i,i.type,r)}var o=this._findEventTargets(e,t);if(r){for(var s=[],a=0;a<r.length;a++)r[a].listens(t,!0)&&s.push(r[a]);o=s.concat(o)}if(o.length){"contextmenu"===t&&Qt(e);var l=o[0],c={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);c.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(e),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=u?l.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(a=0;a<o.length;a++)if(o[a].fire(t,c,!0),c.originalEvent._stopped||!1===o[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,t))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return Rt(this._mapPane)||new k(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var r=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(r)},_latLngBoundsToNewLayerBounds:function(e,t,n){var r=this._getNewPixelOrigin(n,t);return B([this.project(e.getSouthWest(),t)._subtract(r),this.project(e.getNorthWest(),t)._subtract(r),this.project(e.getSouthEast(),t)._subtract(r),this.project(e.getNorthEast(),t)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var r=this.project(e,t),i=this.getSize().divideBy(2),o=new D(r.subtract(i),r.add(i)),s=this._getBoundsOffset(o,n,t);return Math.abs(s.x)<=1&&Math.abs(s.y)<=1?e:this.unproject(r.add(s),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),r=new D(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(r,t))},_getBoundsOffset:function(e,t,n){var r=B(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),i=r.min.subtract(e.min),o=r.max.subtract(e.max);return new k(this._rebound(i.x,-o.x),this._rebound(i.y,-o.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),r=ze.any3d?this.options.zoomSnap:1;return r&&(e=Math.round(e/r)*r),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){wt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n)||(this.panBy(n,t),0))},_createAnimProxy:function(){var e=this._proxy=mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",(function(e){var t=ut,n=this._proxy.style[t];Mt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){gt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();Mt(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),i=this._getCenterOffset(e)._divideBy(1-1/r);return!(!0!==n.animate&&!this.getSize().contains(i)||(A((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)}),this),0))},_animateZoom:function(e,t,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,St(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:r}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&wt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function sn(e,t){return new on(e,t)}var an=M.extend({options:{position:"topright"},initialize:function(e){p(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return St(t,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(t,r.firstChild):r.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(gt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),ln=function(e){return new an(e)};on.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",n=this._controlContainer=mt("div",t+"control-container",this._container);function r(r,i){var o=t+r+" "+t+i;e[r+i]=mt("div",o,n)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)gt(this._controlCorners[e]);gt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var cn=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,r){return n<r?-1:r<n?1:0}},initialize:function(e,t,n){for(var r in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return an.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(s(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){St(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(St(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):wt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return wt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=mt("div",e),n=this.options.collapsed;t.setAttribute("aria-haspopup",!0),Jt(t),Kt(t);var r=this._section=mt("section",e+"-list");n&&(this._map.on("click",this.collapse,this),Ft(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var i=this._layersLink=mt("a",e+"-toggle",t);i.href="#",i.title="Layers",i.setAttribute("role","button"),Ft(i,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){Qt(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=mt("div",e+"-base",r),this._separator=mt("div",e+"-separator",r),this._overlaysList=mt("div",e+"-overlays",r),t.appendChild(r)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&s(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(i((function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)}),this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;vt(this._baseLayersList),vt(this._overlaysList),this._layerControlInputs=[];var e,t,n,r,i=0;for(n=0;n<this._layers.length;n++)r=this._layers[n],this._addItem(r),t=t||r.overlay,e=e||!r.overlay,i+=r.overlay?0:1;return this.options.hideSingleBase&&(e=e&&i>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(s(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=n,r.firstChild},_addItem:function(e){var t,n=document.createElement("label"),r=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=r):t=this._createRadioElement("leaflet-base-layers_"+s(this),r),this._layerControlInputs.push(t),t.layerId=s(e.layer),Ft(t,"click",this._onInputClick,this);var i=document.createElement("span");i.innerHTML=" "+e.name;var o=document.createElement("span");return n.appendChild(o),o.appendChild(t),o.appendChild(i),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e,t,n=this._layerControlInputs,r=[],i=[];this._handlingClick=!0;for(var o=n.length-1;o>=0;o--)e=n[o],t=this._getLayer(e.layerId).layer,e.checked?r.push(t):e.checked||i.push(t);for(o=0;o<i.length;o++)this._map.hasLayer(i[o])&&this._map.removeLayer(i[o]);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])||this._map.addLayer(r[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,r=this._map.getZoom(),i=n.length-1;i>=0;i--)e=n[i],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&r<t.options.minZoom||void 0!==t.options.maxZoom&&r>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,Ft(e,"click",Qt),this.expand();var t=this;setTimeout((function(){jt(e,"click",Qt),t._preventClick=!1}))}}),un=function(e,t,n){return new cn(e,t,n)},dn=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=mt("div",t+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,r,i){var o=mt("a",n,r);return o.innerHTML=e,o.href="#",o.title=t,o.setAttribute("role","button"),o.setAttribute("aria-label",t),Jt(o),Ft(o,"click",Yt),Ft(o,"click",i,this),Ft(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";wt(this._zoomInButton,t),wt(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(St(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(St(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});on.mergeOptions({zoomControl:!0}),on.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new dn,this.addControl(this.zoomControl))}));var hn=function(e){return new dn(e)},pn=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=mt("div",t),r=this.options;return this._addScales(r,t+"-line",n),e.on(r.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=mt("div",t,n)),e.imperial&&(this._iScale=mt("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t,n,r,i=3.2808399*e;i>5280?(t=i/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" ft",r/i))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),fn=function(e){return new pn(e)},mn='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',gn=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(ze.inlineSvg?mn+" ":"")+"Leaflet</a>"},initialize:function(e){p(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=mt("div","leaflet-control-attribution"),Jt(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",(function(){this.removeAttribution(e.layer.getAttribution())}),this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});on.mergeOptions({attributionControl:!0}),on.addInitHook((function(){this.options.attributionControl&&(new gn).addTo(this)}));var vn=function(e){return new gn(e)};an.Layers=cn,an.Zoom=dn,an.Scale=pn,an.Attribution=gn,ln.layers=un,ln.zoom=hn,ln.scale=fn,ln.attribution=vn;var yn=M.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});yn.addTo=function(e,t){return e.addHandler(t,this),this};var bn={Events:R},xn=ze.touch?"touchstart mousedown":"mousedown",Sn=P.extend({options:{clickTolerance:3},initialize:function(e,t,n,r){p(this,r),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(Ft(this._dragStartTarget,xn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Sn._dragging===this&&this.finishDrag(!0),jt(this._dragStartTarget,xn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!xt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)Sn._dragging===this&&this.finishDrag();else if(!(Sn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(Sn._dragging=this,this._preventOutline&&Nt(this._element),kt(),ot(),this._moving))){this.fire("down");var t=e.touches?e.touches[0]:e,n=Dt(this._element);this._startPoint=new k(t.clientX,t.clientY),this._startPos=Rt(this._element),this._parentScale=Bt(n);var r="mousedown"===e.type;Ft(document,r?"mousemove":"touchmove",this._onMove,this),Ft(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new k(t.clientX,t.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Qt(e),this._moved||(this.fire("dragstart"),this._moved=!0,St(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),St(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=e,this._updatePosition()))}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),It(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){wt(document.body,"leaflet-dragging"),this._lastTarget&&(wt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),jt(document,"mousemove touchmove",this._onMove,this),jt(document,"mouseup touchend touchcancel",this._onUp,this),Ot(),st();var t=this._moved&&this._moving;this._moving=!1,Sn._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function wn(e,t,n){var r,i,o,s,a,l,c,u,d,h=[1,4,2,8];for(i=0,c=e.length;i<c;i++)e[i]._code=Ln(e[i],t);for(s=0;s<4;s++){for(u=h[s],r=[],i=0,o=(c=e.length)-1;i<c;o=i++)a=e[i],l=e[o],a._code&u?l._code&u||((d=Nn(l,a,u,t,n))._code=Ln(d,t),r.push(d)):(l._code&u&&((d=Nn(l,a,u,t,n))._code=Ln(d,t),r.push(d)),r.push(a));e=r}return e}function _n(e,t){var n,r,i,o,s,a,l,c,u;if(!e||0===e.length)throw new Error("latlngs not passed");zn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var d=j([0,0]),h=F(e);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(d=Cn(e));var p=e.length,f=[];for(n=0;n<p;n++){var m=j(e[n]);f.push(t.project(j([m.lat-d.lat,m.lng-d.lng])))}for(a=l=c=0,n=0,r=p-1;n<p;r=n++)i=f[n],o=f[r],s=i.y*o.x-o.y*i.x,l+=(i.x+o.x)*s,c+=(i.y+o.y)*s,a+=3*s;u=0===a?f[0]:[l/a,c/a];var g=t.unproject(N(u));return j([g.lat+d.lat,g.lng+d.lng])}function Cn(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var o=j(e[i]);t+=o.lat,n+=o.lng,r++}return j([t/r,n/r])}var An,En={__proto__:null,clipPolygon:wn,polygonCenter:_n,centroid:Cn};function Tn(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=Rn(e=kn(e,n),n)}function Mn(e,t,n){return Math.sqrt(Bn(e,t,n,!0))}function In(e,t,n){return Bn(e,t,n)}function Rn(e,t){var n=e.length,r=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(n);r[0]=r[n-1]=1,Pn(e,r,t,0,n-1);var i,o=[];for(i=0;i<n;i++)r[i]&&o.push(e[i]);return o}function Pn(e,t,n,r,i){var o,s,a,l=0;for(s=r+1;s<=i-1;s++)(a=Bn(e[s],e[r],e[i],!0))>l&&(o=s,l=a);l>n&&(t[o]=1,Pn(e,t,n,r,o),Pn(e,t,n,o,i))}function kn(e,t){for(var n=[e[0]],r=1,i=0,o=e.length;r<o;r++)Dn(e[r],e[i])>t&&(n.push(e[r]),i=r);return i<o-1&&n.push(e[o-1]),n}function On(e,t,n,r,i){var o,s,a,l=r?An:Ln(e,n),c=Ln(t,n);for(An=c;;){if(!(l|c))return[e,t];if(l&c)return!1;a=Ln(s=Nn(e,t,o=l||c,n,i),n),o===l?(e=s,l=a):(t=s,c=a)}}function Nn(e,t,n,r,i){var o,s,a=t.x-e.x,l=t.y-e.y,c=r.min,u=r.max;return 8&n?(o=e.x+a*(u.y-e.y)/l,s=u.y):4&n?(o=e.x+a*(c.y-e.y)/l,s=c.y):2&n?(o=u.x,s=e.y+l*(u.x-e.x)/a):1&n&&(o=c.x,s=e.y+l*(c.x-e.x)/a),new k(o,s,i)}function Ln(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Dn(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function Bn(e,t,n,r){var i,o=t.x,s=t.y,a=n.x-o,l=n.y-s,c=a*a+l*l;return c>0&&((i=((e.x-o)*a+(e.y-s)*l)/c)>1?(o=n.x,s=n.y):i>0&&(o+=a*i,s+=l*i)),a=e.x-o,l=e.y-s,r?a*a+l*l:new k(o,s)}function zn(e){return!v(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function Fn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),zn(e)}function Un(e,t){var n,r,i,o,s,a,l,c;if(!e||0===e.length)throw new Error("latlngs not passed");zn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var u=j([0,0]),d=F(e);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=Cn(e));var h=e.length,p=[];for(n=0;n<h;n++){var f=j(e[n]);p.push(t.project(j([f.lat-u.lat,f.lng-u.lng])))}for(n=0,r=0;n<h-1;n++)r+=p[n].distanceTo(p[n+1])/2;if(0===r)c=p[0];else for(n=0,o=0;n<h-1;n++)if(s=p[n],a=p[n+1],(o+=i=s.distanceTo(a))>r){l=(o-r)/i,c=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}var m=t.unproject(N(c));return j([m.lat+u.lat,m.lng+u.lng])}var jn={__proto__:null,simplify:Tn,pointToSegmentDistance:Mn,closestPointOnSegment:In,clipSegment:On,_getEdgeIntersection:Nn,_getBitCode:Ln,_sqClosestPointOnSegment:Bn,isFlat:zn,_flat:Fn,polylineCenter:Un},Hn={project:function(e){return new k(e.lng,e.lat)},unproject:function(e){return new U(e.y,e.x)},bounds:new D([-180,-90],[180,90])},Vn={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,r=e.lat*t,i=this.R_MINOR/n,o=Math.sqrt(1-i*i),s=o*Math.sin(r),a=Math.tan(Math.PI/4-r/2)/Math.pow((1-s)/(1+s),o/2);return r=-n*Math.log(Math.max(a,1e-10)),new k(e.lng*t*n,r)},unproject:function(e){for(var t,n=180/Math.PI,r=this.R,i=this.R_MINOR/r,o=Math.sqrt(1-i*i),s=Math.exp(-e.y/r),a=Math.PI/2-2*Math.atan(s),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)t=o*Math.sin(a),t=Math.pow((1-t)/(1+t),o/2),a+=c=Math.PI/2-2*Math.atan(s*t)-a;return new U(a*n,e.x*n/r)}},Gn={__proto__:null,LonLat:Hn,Mercator:Vn,SphericalMercator:q},Wn=n({},G,{code:"EPSG:3395",projection:Vn,transformation:function(){var e=.5/(Math.PI*Vn.R);return J(e,.5,-e,.5)}()}),qn=n({},G,{code:"EPSG:4326",projection:Hn,transformation:J(1/180,1,-1/180,.5)}),Kn=n({},V,{projection:Hn,transformation:J(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,r=t.lat-e.lat;return Math.sqrt(n*n+r*r)},infinite:!0});V.Earth=G,V.EPSG3395=Wn,V.EPSG3857=Q,V.EPSG900913=Y,V.EPSG4326=qn,V.Simple=Kn;var Jn=P.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[s(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[s(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once("remove",(function(){t.off(n,this)}),this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});on.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=s(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=s(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return s(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?v(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[s(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=s(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var r in this._zoomBoundLayers){var i=this._zoomBoundLayers[r].options;e=void 0===i.minZoom?e:Math.min(e,i.minZoom),t=void 0===i.maxZoom?t:Math.max(t,i.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Qn=Jn.extend({initialize:function(e,t){var n,r;if(p(this,t),this._layers={},e)for(n=0,r=e.length;n<r;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,r=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,r);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return s(e)}}),Yn=function(e,t){return new Qn(e,t)},Zn=Qn.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),Qn.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),Qn.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new z;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),Xn=function(e,t){return new Zn(e,t)},$n=M.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){p(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(n,t&&"IMG"===t.tagName?t:null);return this._setIconStyles(r,e),(this.options.crossOrigin||""===this.options.crossOrigin)&&(r.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),r},_setIconStyles:function(e,t){var n=this.options,r=n[t+"Size"];"number"==typeof r&&(r=[r,r]);var i=N(r),o=N("shadow"===t&&n.shadowAnchor||n.iconAnchor||i&&i.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),o&&(e.style.marginLeft=-o.x+"px",e.style.marginTop=-o.y+"px"),i&&(e.style.width=i.x+"px",e.style.height=i.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return ze.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function er(e){return new $n(e)}var tr=$n.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(e){return"string"!=typeof tr.imagePath&&(tr.imagePath=this._detectIconPath()),(this.options.imagePath||tr.imagePath)+$n.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var r=t.exec(e);return r&&r[n]};return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=mt("div","leaflet-default-icon-path",document.body),t=ft(e,"background-image")||ft(e,"backgroundImage");if(document.body.removeChild(e),t=this._stripUrl(t))return t;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),nr=yn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new Sn(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),St(e,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&wt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,r=this._marker.options.autoPanSpeed,i=this._marker.options.autoPanPadding,o=Rt(t._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=B(s.min._subtract(a).add(i),s.max._subtract(a).subtract(i));if(!l.contains(o)){var c=N((Math.max(l.max.x,o.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(r);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),It(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=A(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(E(this._panRequest),this._panRequest=A(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,r=Rt(t._icon),i=t._map.layerPointToLatLng(r);n&&It(n,r),t._latlng=i,e.latlng=i,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){E(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),rr=Jn.extend({options:{icon:new tr,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(e,t){p(this,t),this._latlng=j(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(e){var t=this._latlng;return this._latlng=j(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=e.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),St(n,t),e.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ft(n,"focus",this._panOnFocus,this);var i=e.icon.createShadow(this._shadow),o=!1;i!==this._shadow&&(this._removeShadow(),o=!0),i&&(St(i,t),i.alt=""),this._shadow=i,e.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),i&&o&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&jt(this._icon,"focus",this._panOnFocus,this),gt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&gt(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&It(this._icon,e),this._shadow&&It(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(St(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),nr)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new nr(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&At(this._icon,e),this._shadow&&At(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,n=t.iconSize?N(t.iconSize):N(0,0),r=t.iconAnchor?N(t.iconAnchor):N(0,0);e.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:n.subtract(r)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ir(e,t){return new rr(e,t)}var or=Jn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(e){this._renderer=e.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(e){return p(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),sr=or.extend({options:{fill:!0,radius:10},initialize:function(e,t){p(this,t),this._latlng=j(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=j(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return or.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),r=[e+n,t+n];this._pxBounds=new D(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ar(e,t){return new sr(e,t)}var lr=sr.extend({initialize:function(e,t,r){if("number"==typeof t&&(t=n({},r,{radius:t})),p(this,t),this._latlng=j(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new z(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:or.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,r=n.options.crs;if(r.distance===G.distance){var i=Math.PI/180,o=this._mRadius/G.R/i,s=n.project([t+o,e]),a=n.project([t-o,e]),l=s.add(a).divideBy(2),c=n.unproject(l).lat,u=Math.acos((Math.cos(o*i)-Math.sin(t*i)*Math.sin(c*i))/(Math.cos(t*i)*Math.cos(c*i)))/i;(isNaN(u)||0===u)&&(u=o/Math.cos(Math.PI/180*t)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([c,e-u]).x,this._radiusY=l.y-s.y}else{var d=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(d).x}this._updateBounds()}});function cr(e,t,n){return new lr(e,t,n)}var ur=or.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){p(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t,n,r=1/0,i=null,o=Bn,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],c=1,u=l.length;c<u;c++){var d=o(e,t=l[c-1],n=l[c],!0);d<r&&(r=d,i=o(e,t,n))}return i&&(i.distance=Math.sqrt(r)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Un(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=j(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new z,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return zn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=zn(e),r=0,i=e.length;r<i;r++)n?(t[r]=j(e[r]),this._bounds.extend(t[r])):t[r]=this._convertLatLngs(e[r]);return t},_project:function(){var e=new D;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new k(e,e);this._rawPxBounds&&(this._pxBounds=new D([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var r,i,o=e[0]instanceof U,s=e.length;if(o){for(i=[],r=0;r<s;r++)i[r]=this._map.latLngToLayerPoint(e[r]),n.extend(i[r]);t.push(i)}else for(r=0;r<s;r++)this._projectLatlngs(e[r],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else{var t,n,r,i,o,s,a,l=this._parts;for(t=0,r=0,i=this._rings.length;t<i;t++)for(n=0,o=(a=this._rings[t]).length;n<o-1;n++)(s=On(a[n],a[n+1],e,n,!0))&&(l[r]=l[r]||[],l[r].push(s[0]),s[1]===a[n+1]&&n!==o-2||(l[r].push(s[1]),r++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,r=e.length;n<r;n++)e[n]=Tn(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,r,i,o,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,o=this._parts.length;n<o;n++)for(r=0,i=(s=(a=this._parts[n]).length)-1;r<s;i=r++)if((t||0!==r)&&Mn(e,a[i],a[r])<=l)return!0;return!1}});function dr(e,t){return new ur(e,t)}ur._flat=Fn;var hr=ur.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return _n(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=ur.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof U&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){ur.prototype._setLatLngs.call(this,e),zn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return zn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new k(t,t);if(e=new D(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var r,i=0,o=this._rings.length;i<o;i++)(r=wn(this._rings[i],e,!0)).length&&this._parts.push(r)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,r,i,o,s,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(i=0,a=this._parts.length;i<a;i++)for(o=0,s=(l=(t=this._parts[i]).length)-1;o<l;s=o++)n=t[o],r=t[s],n.y>e.y!=r.y>e.y&&e.x<(r.x-n.x)*(e.y-n.y)/(r.y-n.y)+n.x&&(c=!c);return c||ur.prototype._containsPoint.call(this,e,!0)}});function pr(e,t){return new hr(e,t)}var fr=Zn.extend({initialize:function(e,t){p(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,r,i=v(e)?e:e.features;if(i){for(t=0,n=i.length;t<n;t++)((r=i[t]).geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var o=this.options;if(o.filter&&!o.filter(e))return this;var s=mr(e,o);return s?(s.feature=wr(e),s.defaultOptions=s.options,this.resetStyle(s),o.onEachFeature&&o.onEachFeature(e,s),this.addLayer(s)):this},resetStyle:function(e){return void 0===e?this.eachLayer(this.resetStyle,this):(e.options=n({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer((function(t){this._setLayerStyle(t,e)}),this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function mr(e,t){var n,r,i,o,s="Feature"===e.type?e.geometry:e,a=s?s.coordinates:null,l=[],c=t&&t.pointToLayer,u=t&&t.coordsToLatLng||vr;if(!a&&!s)return null;switch(s.type){case"Point":return gr(c,e,n=u(a),t);case"MultiPoint":for(i=0,o=a.length;i<o;i++)n=u(a[i]),l.push(gr(c,e,n,t));return new Zn(l);case"LineString":case"MultiLineString":return r=yr(a,"LineString"===s.type?0:1,u),new ur(r,t);case"Polygon":case"MultiPolygon":return r=yr(a,"Polygon"===s.type?1:2,u),new hr(r,t);case"GeometryCollection":for(i=0,o=s.geometries.length;i<o;i++){var d=mr({geometry:s.geometries[i],type:"Feature",properties:e.properties},t);d&&l.push(d)}return new Zn(l);case"FeatureCollection":for(i=0,o=s.features.length;i<o;i++){var h=mr(s.features[i],t);h&&l.push(h)}return new Zn(l);default:throw new Error("Invalid GeoJSON object.")}}function gr(e,t,n,r){return e?e(t,n):new rr(n,r&&r.markersInheritOptions&&r)}function vr(e){return new U(e[1],e[0],e[2])}function yr(e,t,n){for(var r,i=[],o=0,s=e.length;o<s;o++)r=t?yr(e[o],t-1,n):(n||vr)(e[o]),i.push(r);return i}function br(e,t){return void 0!==(e=j(e)).alt?[u(e.lng,t),u(e.lat,t),u(e.alt,t)]:[u(e.lng,t),u(e.lat,t)]}function xr(e,t,n,r){for(var i=[],o=0,s=e.length;o<s;o++)i.push(t?xr(e[o],zn(e[o])?0:t-1,n,r):br(e[o],r));return!t&&n&&i.length>0&&i.push(i[0].slice()),i}function Sr(e,t){return e.feature?n({},e.feature,{geometry:t}):wr(t)}function wr(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}var _r={toGeoJSON:function(e){return Sr(this,{type:"Point",coordinates:br(this.getLatLng(),e)})}};function Cr(e,t){return new fr(e,t)}rr.include(_r),lr.include(_r),sr.include(_r),ur.include({toGeoJSON:function(e){var t=!zn(this._latlngs);return Sr(this,{type:(t?"Multi":"")+"LineString",coordinates:xr(this._latlngs,t?1:0,!1,e)})}}),hr.include({toGeoJSON:function(e){var t=!zn(this._latlngs),n=t&&!zn(this._latlngs[0]),r=xr(this._latlngs,n?2:t?1:0,!0,e);return t||(r=[r]),Sr(this,{type:(n?"Multi":"")+"Polygon",coordinates:r})}}),Qn.include({toMultiPoint:function(e){var t=[];return this.eachLayer((function(n){t.push(n.toGeoJSON(e).geometry.coordinates)})),Sr(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var n="GeometryCollection"===t,r=[];return this.eachLayer((function(t){if(t.toGeoJSON){var i=t.toGeoJSON(e);if(n)r.push(i.geometry);else{var o=wr(i);"FeatureCollection"===o.type?r.push.apply(r,o.features):r.push(o)}}})),n?Sr(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});var Ar=Cr,Er=Jn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=F(t),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(St(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){gt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&yt(this._image),this},bringToBack:function(){return this._map&&bt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=F(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:mt("img");St(t,"leaflet-image-layer"),this._zoomAnimated&&St(t,"leaflet-zoom-animated"),this.options.className&&St(t,this.options.className),t.onselectstart=c,t.onmousemove=c,t.onload=i(this.fire,this,"load"),t.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;Mt(this._image,n,t)},_reset:function(){var e=this._image,t=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();It(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){At(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),Tr=function(e,t,n){return new Er(e,t,n)},Mr=Er.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:mt("video");if(St(t,"leaflet-image-layer"),this._zoomAnimated&&St(t,"leaflet-zoom-animated"),this.options.className&&St(t,this.options.className),t.onselectstart=c,t.onmousemove=c,t.onloadeddata=i(this.fire,this,"load"),e){for(var n=t.getElementsByTagName("source"),r=[],o=0;o<n.length;o++)r.push(n[o].src);this._url=n.length>0?r:[t.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var a=mt("source");a.src=this._url[s],t.appendChild(a)}}}});function Ir(e,t,n){return new Mr(e,t,n)}var Rr=Er.extend({_initImage:function(){var e=this._image=this._url;St(e,"leaflet-image-layer"),this._zoomAnimated&&St(e,"leaflet-zoom-animated"),this.options.className&&St(e,this.options.className),e.onselectstart=c,e.onmousemove=c}});function Pr(e,t,n){return new Rr(e,t,n)}var kr=Jn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof U||v(e))?(this._latlng=j(e),p(this,t)):(p(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&At(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&At(this._container,1),this.bringToFront(),this.options.interactive&&(St(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(At(this._container,0),this._removeTimeout=setTimeout(i(gt,void 0,this._container),200)):gt(this._container),this.options.interactive&&(wt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=j(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&yt(this._container),this},bringToBack:function(){return this._map&&bt(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof Zn){t=null;var n=this._source._layers;for(var r in n)if(n[r]._map){t=n[r];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else{if(!t.getBounds)throw new Error("Unable to get source layer LatLng.");e=t.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=N(this.options.offset),n=this._getAnchor();this._zoomAnimated?It(this._container,e.add(n)):t=t.add(e).add(n);var r=this._containerBottom=-t.y,i=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=r+"px",this._container.style.left=i+"px"}},_getAnchor:function(){return[0,0]}});on.include({_initOverlay:function(e,t,n,r){var i=t;return i instanceof e||(i=new e(r).setContent(t)),n&&i.setLatLng(n),i}}),Jn.include({_initOverlay:function(e,t,n,r){var i=n;return i instanceof e?(p(i,r),i._source=this):(i=t&&!r?t:new e(r,this)).setContent(n),i}});var Or=kr.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,kr.prototype.openOn.call(this,e)},onAdd:function(e){kr.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof or||this._source.on("preclick",qt))},onRemove:function(e){kr.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof or||this._source.off("preclick",qt))},getEvents:function(){var e=kr.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=mt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=mt("div",e+"-content-wrapper",t);if(this._contentNode=mt("div",e+"-content",n),Jt(t),Kt(this._contentNode),Ft(t,"contextmenu",qt),this._tipContainer=mt("div",e+"-tip-container",t),this._tip=mt("div",e+"-tip",this._tipContainer),this.options.closeButton){var r=this._closeButton=mt("a",e+"-close-button",t);r.setAttribute("role","button"),r.setAttribute("aria-label","Close popup"),r.href="#close",r.innerHTML='<span aria-hidden="true">&#215;</span>',Ft(r,"click",(function(e){Qt(e),this.close()}),this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="";var r=e.offsetHeight,i=this.options.maxHeight,o="leaflet-popup-scrolled";i&&r>i?(t.height=i+"px",St(e,o)):wt(e,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();It(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var e=this._map,t=parseInt(ft(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+t,r=this._containerWidth,i=new k(this._containerLeft,-n-this._containerBottom);i._add(Rt(this._container));var o=e.layerPointToContainerPoint(i),s=N(this.options.autoPanPadding),a=N(this.options.autoPanPaddingTopLeft||s),l=N(this.options.autoPanPaddingBottomRight||s),c=e.getSize(),u=0,d=0;o.x+r+l.x>c.x&&(u=o.x+r-c.x+l.x),o.x-u-a.x<0&&(u=o.x-a.x),o.y+n+l.y>c.y&&(d=o.y+n-c.y+l.y),o.y-d-a.y<0&&(d=o.y-a.y),(u||d)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([u,d]))}},_getAnchor:function(){return N(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Nr=function(e,t){return new Or(e,t)};on.mergeOptions({closePopupOnClick:!0}),on.include({openPopup:function(e,t,n){return this._initOverlay(Or,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),Jn.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Or,this._popup,e,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(e){return this._popup&&(this instanceof Zn||(this._popup._source=this),this._popup._prepareOpen(e||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Yt(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof or?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var Lr=kr.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){kr.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){kr.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=kr.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+s(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,r=this._map,i=this._container,o=r.latLngToContainerPoint(r.getCenter()),s=r.layerPointToContainerPoint(e),a=this.options.direction,l=i.offsetWidth,c=i.offsetHeight,u=N(this.options.offset),d=this._getAnchor();"top"===a?(t=l/2,n=c):"bottom"===a?(t=l/2,n=0):"center"===a?(t=l/2,n=c/2):"right"===a?(t=0,n=c/2):"left"===a?(t=l,n=c/2):s.x<o.x?(a="right",t=0,n=c/2):(a="left",t=l+2*(u.x+d.x),n=c/2),e=e.subtract(N(t,n,!0)).add(u).add(d),wt(i,"leaflet-tooltip-right"),wt(i,"leaflet-tooltip-left"),wt(i,"leaflet-tooltip-top"),wt(i,"leaflet-tooltip-bottom"),St(i,"leaflet-tooltip-"+a),It(i,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&At(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return N(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Dr=function(e,t){return new Lr(e,t)};on.include({openTooltip:function(e,t,n){return this._initOverlay(Lr,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),Jn.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Lr,this._tooltip,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(e){if(e||!this._tooltipHandlersAdded){var t=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof Zn||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&(Ft(t,"focus",(function(){this._tooltip._source=e,this.openTooltip()}),this),Ft(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once("moveend",(function(){t._openOnceFlag=!1,t._openTooltip(e)}))}else this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)},_moveTooltip:function(e){var t,n,r=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(t=this._map.mouseEventToContainerPoint(e.originalEvent),n=this._map.containerPointToLayerPoint(t),r=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(r)}});var Br=$n.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&"DIV"===e.tagName?e:document.createElement("div"),n=this.options;if(n.html instanceof Element?(vt(t),t.appendChild(n.html)):t.innerHTML=!1!==n.html?n.html:"",n.bgPos){var r=N(n.bgPos);t.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});function zr(e){return new Br(e)}$n.Default=tr;var Fr=Jn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:ze.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(e){p(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),gt(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(yt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(bt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof k?e:new k(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,r=-e(-1/0,1/0),i=0,o=n.length;i<o;i++)t=n[i].style.zIndex,n[i]!==this._container&&t&&(r=e(r,+t));isFinite(r)&&(this.options.zIndex=r+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!ze.ielt9){At(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var r in this._tiles){var i=this._tiles[r];if(i.current&&i.loaded){var o=Math.min(1,(e-i.loaded)/200);At(i.el,o),o<1?t=!0:(i.active?n=!0:this._onOpaqueTile(i),i.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(E(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=mt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(gt(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var r=this._levels[e],i=this._map;return r||((r=this._levels[e]={}).el=mt("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=t,r.origin=i.project(i.unproject(i.getPixelOrigin()),e).round(),r.zoom=e,this._setZoomTransform(r,i.getCenter(),i.getZoom()),c(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(t=this._tiles[e]).retain=t.current;for(e in this._tiles)if((t=this._tiles[e]).current&&!t.active){var r=t.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)gt(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,r){var i=Math.floor(e/2),o=Math.floor(t/2),s=n-1,a=new k(+i,+o);a.z=+s;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),s>r&&this._retainParent(i,o,s,r))},_retainChildren:function(e,t,n,r){for(var i=2*e;i<2*e+2;i++)for(var o=2*t;o<2*t+2;o++){var s=new k(i,o);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<r&&this._retainChildren(i,o,n+1,r))}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,r){var i=Math.round(t);i=void 0!==this.options.maxZoom&&i>this.options.maxZoom||void 0!==this.options.minZoom&&i<this.options.minZoom?void 0:this._clampZoom(i);var o=this.options.updateWhenZooming&&i!==this._tileZoom;r&&!o||(this._tileZoom=i,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==i&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var r=this._map.getZoomScale(n,e.zoom),i=e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t,n)).round();ze.any3d?Mt(e.el,i,r):It(e.el,i)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],r).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],r).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],r).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],r).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),r=t.getZoomScale(n,this._tileZoom),i=t.project(e,this._tileZoom).floor(),o=t.getSize().divideBy(2*r);return new D(i.subtract(o),i.add(o))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter()),void 0!==this._tileZoom){var r=this._getTiledPixelBounds(e),i=this._pxBoundsToTileRange(r),o=i.getCenter(),s=[],a=this.options.keepBuffer,l=new D(i.getBottomLeft().subtract([a,-a]),i.getTopRight().add([a,-a]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var u=this._tiles[c].coords;u.z===this._tileZoom&&l.contains(new k(u.x,u.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var d=i.min.y;d<=i.max.y;d++)for(var h=i.min.x;h<=i.max.x;h++){var p=new k(h,d);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:s.push(p)}}if(s.sort((function(e,t){return e.distanceTo(o)-t.distanceTo(o)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(h=0;h<s.length;h++)this._addTile(s[h],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(e);return F(this.options.bounds).overlaps(r)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),r=e.scaleBy(n),i=r.add(n);return[t.unproject(r,e.z),t.unproject(i,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new z(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new k(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(gt(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){St(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=c,e.onmousemove=c,ze.ielt9&&this.options.opacity<1&&At(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),r=this._tileCoordsToKey(e),o=this.createTile(this._wrapCoords(e),i(this._tileReady,this,e));this._initTile(o),this.createTile.length<2&&A(i(this._tileReady,this,e,null,o)),It(o,n),this._tiles[r]={el:o,coords:e,current:!0},t.appendChild(o),this.fire("tileloadstart",{tile:o,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var r=this._tileCoordsToKey(e);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(At(n.el,0),E(this._fadeFrame),this._fadeFrame=A(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(St(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),ze.ielt9||!this._map._fadeAnimated?A(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new k(this._wrapX?l(e.x,this._wrapX):e.x,this._wrapY?l(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new D(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Ur(e){return new Fr(e)}var jr=Fr.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=p(this,t)).detectRetina&&ze.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return Ft(n,"load",i(this._tileOnLoad,this,t,n)),Ft(n,"error",i(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:ze.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var r=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=r),t["-y"]=r}return g(this._url,n(t,this.options))},_tileOnLoad:function(e,t){ze.ielt9?setTimeout(i(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var r=this.options.errorTileUrl;r&&t.getAttribute("src")!==r&&(t.src=r),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=c,t.onerror=c,!t.complete)){t.src=b;var n=this._tiles[e].coords;gt(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",b),Fr.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==b))return Fr.prototype._tileReady.call(this,e,t,n)}});function Hr(e,t){return new jr(e,t)}var Vr=jr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var r=n({},this.defaultWmsParams);for(var i in t)i in this.options||(r[i]=t[i]);var o=(t=p(this,t)).detectRetina&&ze.retina?2:1,s=this.getTileSize();r.width=s.x*o,r.height=s.y*o,this.wmsParams=r},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,jr.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,r=B(n.project(t[0]),n.project(t[1])),i=r.min,o=r.max,s=(this._wmsVersion>=1.3&&this._crs===qn?[i.y,i.x,o.y,o.x]:[i.x,i.y,o.x,o.y]).join(","),a=jr.prototype.getTileUrl.call(this,e);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});function Gr(e,t){return new Vr(e,t)}jr.WMS=Vr,Hr.wms=Gr;var Wr=Jn.extend({options:{padding:.1},initialize:function(e){p(this,e),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),St(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),i=this._map.project(this._center,t),o=r.multiplyBy(-n).add(i).subtract(this._map._getNewPixelOrigin(e,t));ze.any3d?Mt(this._container,o,n):It(this._container,o)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new D(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qr=Wr.extend({options:{tolerance:0},getEvents:function(){var e=Wr.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Wr.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");Ft(e,"mousemove",this._onMouseMove,this),Ft(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ft(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){E(this._redrawRequest),delete this._ctx,gt(this._container),jt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wr.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),r=ze.retina?2:1;It(t,e.min),t.width=r*n.x,t.height=r*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",ze.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){Wr.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[s(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,r=t.prev;n?n.prev=r:this._drawLast=r,r?r.next=n:this._drawFirst=n,delete e._order,delete this._layers[s(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,n,r=e.options.dashArray.split(/[, ]+/),i=[];for(n=0;n<r.length;n++){if(t=Number(r[n]),isNaN(t))return;i.push(t)}e.options._dashArray=i}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||A(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new D,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)e=r.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,r,i,o,s=e._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(r=0,i=s[n].length;r<i;r++)o=s[n][r],l[r?"lineTo":"moveTo"](o.x,o.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var t=e._point,n=this._ctx,r=Math.max(Math.round(e._radius),1),i=(Math.max(Math.round(e._radiusY),1)||r)/r;1!==i&&(n.save(),n.scale(1,i)),n.beginPath(),n.arc(t.x,t.y/i,r,0,2*Math.PI,!1),1!==i&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,n,r=this._map.mouseEventToLayerPoint(e),i=this._drawFirst;i;i=i.next)(t=i.layer).options.interactive&&t._containsPoint(r)&&("click"!==e.type&&"preclick"!==e.type||!this._map._draggableMoved(t))&&(n=t);this._fireEvent(!!n&&[n],e)},_onMouseMove:function(e){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(wt(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,r,o=this._drawFirst;o;o=o.next)(n=o.layer).options.interactive&&n._containsPoint(t)&&(r=n);r!==this._hoveredLayer&&(this._handleMouseOut(e),r&&(St(this._container,"leaflet-interactive"),this._fireEvent([r],e,"mouseover"),this._hoveredLayer=r)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(i((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var n=t.next,r=t.prev;n&&(n.prev=r,r?r.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e))}},_bringToBack:function(e){var t=e._order;if(t){var n=t.next,r=t.prev;r&&(r.next=n,n?n.prev=r:r&&(this._drawLast=r),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}}});function Kr(e){return ze.canvas?new qr(e):null}var Jr=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Qr={_initContainer:function(){this._container=mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wr.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=Jr("shape");St(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=Jr("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[s(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;gt(t),e.removeInteractiveTarget(t),delete this._layers[s(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,r=e.options,i=e._container;i.stroked=!!r.stroke,i.filled=!!r.fill,r.stroke?(t||(t=e._stroke=Jr("stroke")),i.appendChild(t),t.weight=r.weight+"px",t.color=r.color,t.opacity=r.opacity,r.dashArray?t.dashStyle=v(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=r.lineCap.replace("butt","flat"),t.joinstyle=r.lineJoin):t&&(i.removeChild(t),e._stroke=null),r.fill?(n||(n=e._fill=Jr("fill")),i.appendChild(n),n.color=r.fillColor||r.color,n.opacity=r.fillOpacity):n&&(i.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),r=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+r+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){yt(e._container)},_bringToBack:function(e){bt(e._container)}},Yr=ze.vml?Jr:Z,Zr=Wr.extend({_initContainer:function(){this._container=Yr("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yr("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){gt(this._container),jt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Wr.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),It(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=Yr("path");e.options.className&&St(t,e.options.className),e.options.interactive&&St(t,"leaflet-interactive"),this._updateStyle(e),this._layers[s(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){gt(e._path),e.removeInteractiveTarget(e._path),delete this._layers[s(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,X(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),r="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",i=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+r+2*n+",0 "+r+2*-n+",0 ";this._setPath(e,i)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){yt(e._path)},_bringToBack:function(e){bt(e._path)}});function Xr(e){return ze.svg||ze.vml?new Zr(e):null}ze.vml&&Zr.include(Qr),on.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&Kr(e)||Xr(e)}});var $r=hr.extend({initialize:function(e,t){hr.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=F(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function ei(e,t){return new $r(e,t)}Zr.create=Yr,Zr.pointsToPath=X,fr.geometryToLayer=mr,fr.coordsToLatLng=vr,fr.coordsToLatLngs=yr,fr.latLngToCoords=br,fr.latLngsToCoords=xr,fr.getFeature=Sr,fr.asFeature=wr,on.mergeOptions({boxZoom:!0});var ti=yn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){Ft(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){jt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){gt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),ot(),kt(),this._startPoint=this._map.mouseEventToContainerPoint(e),Ft(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=mt("div","leaflet-zoom-box",this._container),St(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new D(this._point,this._startPoint),n=t.getSize();It(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(gt(this._box),wt(this._container,"leaflet-crosshair")),st(),Ot(),jt(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var t=new z(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});on.addInitHook("addHandler","boxZoom",ti),on.mergeOptions({doubleClickZoom:!0});var ni=yn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),r=t.options.zoomDelta,i=e.originalEvent.shiftKey?n-r:n+r;"center"===t.options.doubleClickZoom?t.setZoom(i):t.setZoomAround(e.containerPoint,i)}});on.addInitHook("addHandler","doubleClickZoom",ni),on.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ri=yn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new Sn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}St(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){wt(this._map._container,"leaflet-grab"),wt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=F(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-t+n)%e+t-n,o=(r+t+n)%e-t-n,s=Math.abs(i+n)<Math.abs(o+n)?i:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(e){var t=this._map,n=t.options,r=!n.inertia||e.noInertia||this._times.length<2;if(t.fire("dragend",e),r)t.fire("moveend");else{this._prunePositions(+new Date);var i=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=i.multiplyBy(s/o),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),u=a.multiplyBy(c/l),d=c/(n.inertiaDeceleration*s),h=u.multiplyBy(-d/2).round();h.x||h.y?(h=t._limitOffset(h,t.options.maxBounds),A((function(){t.panBy(h,{duration:d,easeLinearity:s,noMoveStart:!0,animate:!0})}))):t.fire("moveend")}}});on.addInitHook("addHandler","dragging",ri),on.mergeOptions({keyboard:!0,keyboardPanDelta:80});var ii=yn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),Ft(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),jt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,r=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(r,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t,n,r=this._panKeys={},i=this.keyCodes;for(t=0,n=i.left.length;t<n;t++)r[i.left[t]]=[-1*e,0];for(t=0,n=i.right.length;t<n;t++)r[i.right[t]]=[e,0];for(t=0,n=i.down.length;t<n;t++)r[i.down[t]]=[0,e];for(t=0,n=i.up.length;t<n;t++)r[i.up[t]]=[0,-1*e]},_setZoomDelta:function(e){var t,n,r=this._zoomKeys={},i=this.keyCodes;for(t=0,n=i.zoomIn.length;t<n;t++)r[i.zoomIn[t]]=e;for(t=0,n=i.zoomOut.length;t<n;t++)r[i.zoomOut[t]]=-e},_addHooks:function(){Ft(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){jt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n=e.keyCode,r=this._map;if(n in this._panKeys){if(!r._panAnim||!r._panAnim._inProgress)if(t=this._panKeys[n],e.shiftKey&&(t=N(t).multiplyBy(3)),r.options.maxBounds&&(t=r._limitOffset(N(t),r.options.maxBounds)),r.options.worldCopyJump){var i=r.wrapLatLng(r.unproject(r.project(r.getCenter()).add(t)));r.panTo(i)}else r.panBy(t)}else if(n in this._zoomKeys)r.setZoom(r.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!r._popup||!r._popup.options.closeOnEscapeKey)return;r.closePopup()}Yt(e)}}});on.addInitHook("addHandler","keyboard",ii),on.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var oi=yn.extend({addHooks:function(){Ft(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){jt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=en(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),Yt(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var r=this._delta/(4*this._map.options.wheelPxPerZoomLevel),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,o=n?Math.ceil(i/n)*n:i,s=e._limitZoom(t+(this._delta>0?o:-o))-t;this._delta=0,this._startTime=null,s&&("center"===e.options.scrollWheelZoom?e.setZoom(t+s):e.setZoomAround(this._lastMousePos,t+s))}});on.addInitHook("addHandler","scrollWheelZoom",oi);var si=600;on.mergeOptions({tapHold:ze.touchNative&&ze.safari&&ze.mobile,tapTolerance:15});var ai=yn.extend({addHooks:function(){Ft(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){jt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new k(t.clientX,t.clientY),this._holdTimeout=setTimeout(i((function(){this._cancel(),this._isTapValid()&&(Ft(document,"touchend",Qt),Ft(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))}),this),si),Ft(document,"touchend touchcancel contextmenu",this._cancel,this),Ft(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){jt(document,"touchend",Qt),jt(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),jt(document,"touchend touchcancel contextmenu",this._cancel,this),jt(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new k(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});on.addInitHook("addHandler","tapHold",ai),on.mergeOptions({touchZoom:ze.touch,bounceAtZoomLimits:!0});var li=yn.extend({addHooks:function(){St(this._map._container,"leaflet-touch-zoom"),Ft(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){wt(this._map._container,"leaflet-touch-zoom"),jt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(r)._divideBy(2))),this._startDist=n.distanceTo(r),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),Ft(document,"touchmove",this._onTouchMove,this),Ft(document,"touchend touchcancel",this._onTouchEnd,this),Qt(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),r=t.mouseEventToContainerPoint(e.touches[1]),o=n.distanceTo(r)/this._startDist;if(this._zoom=t.getScaleZoom(o,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&o<1||this._zoom>t.getMaxZoom()&&o>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),E(this._animRequest);var a=i(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=A(a,this,!0),Qt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,E(this._animRequest),jt(document,"touchmove",this._onTouchMove,this),jt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});on.addInitHook("addHandler","touchZoom",li),on.BoxZoom=ti,on.DoubleClickZoom=ni,on.Drag=ri,on.Keyboard=ii,on.ScrollWheelZoom=oi,on.TapHold=ai,on.TouchZoom=li,e.Bounds=D,e.Browser=ze,e.CRS=V,e.Canvas=qr,e.Circle=lr,e.CircleMarker=sr,e.Class=M,e.Control=an,e.DivIcon=Br,e.DivOverlay=kr,e.DomEvent=nn,e.DomUtil=zt,e.Draggable=Sn,e.Evented=P,e.FeatureGroup=Zn,e.GeoJSON=fr,e.GridLayer=Fr,e.Handler=yn,e.Icon=$n,e.ImageOverlay=Er,e.LatLng=U,e.LatLngBounds=z,e.Layer=Jn,e.LayerGroup=Qn,e.LineUtil=jn,e.Map=on,e.Marker=rr,e.Mixin=bn,e.Path=or,e.Point=k,e.PolyUtil=En,e.Polygon=hr,e.Polyline=ur,e.Popup=Or,e.PosAnimation=rn,e.Projection=Gn,e.Rectangle=$r,e.Renderer=Wr,e.SVG=Zr,e.SVGOverlay=Rr,e.TileLayer=jr,e.Tooltip=Lr,e.Transformation=K,e.Util=T,e.VideoOverlay=Mr,e.bind=i,e.bounds=B,e.canvas=Kr,e.circle=cr,e.circleMarker=ar,e.control=ln,e.divIcon=zr,e.extend=n,e.featureGroup=Xn,e.geoJSON=Cr,e.geoJson=Ar,e.gridLayer=Ur,e.icon=er,e.imageOverlay=Tr,e.latLng=j,e.latLngBounds=F,e.layerGroup=Yn,e.map=sn,e.marker=ir,e.point=N,e.polygon=pr,e.polyline=dr,e.popup=Nr,e.rectangle=ei,e.setOptions=p,e.stamp=s,e.svg=Xr,e.svgOverlay=Pr,e.tileLayer=Hr,e.tooltip=Dr,e.transformation=J,e.version=t,e.videoOverlay=Ir;var ci=window.L;e.noConflict=function(){return window.L=ci,this},window.L=e}(Rf);const Of=(0,(c=o("85Hg2")).forwardRef)(kf);c=o("85Hg2");function Nf(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function Lf(e,t){return null==t?function(t,n){const r=(0,c.useRef)();return r.current||(r.current=e(t,n)),r}:function(n,r){const i=(0,c.useRef)();i.current||(i.current=e(n,r));const o=(0,c.useRef)(n),{instance:s}=i.current;return(0,c.useEffect)((function(){o.current!==n&&(t(s,n,o.current),o.current=n)}),[s,n,r]),i}}c=o("85Hg2");function Df(e){function n(n,r){const{instance:i,context:o}=e(n).current;return(0,c.useImperativeHandle)(r,(()=>i)),null==n.children?null:t(c).createElement(Mf,{value:o},n.children)}return(0,c.forwardRef)(n)}function Bf(e){function t(t,n){const[r,i]=(0,c.useState)(!1),{instance:o}=e(t,i).current;(0,c.useImperativeHandle)(n,(()=>o)),(0,c.useEffect)((function(){r&&o.update()}),[o,r,t.children]);const s=o._contentNode;return s?(0,a.createPortal)(t.children,s):null}return(0,c.forwardRef)(t)}function zf(e){function t(t,n){const{instance:r}=e(t).current;return(0,c.useImperativeHandle)(n,(()=>r)),null}return(0,c.forwardRef)(t)}c=o("85Hg2");c=o("85Hg2"),c=o("85Hg2");function Ff(e,t){const n=(0,c.useRef)(t);(0,c.useEffect)((function(){t!==n.current&&null!=e.attributionControl&&(null!=n.current&&e.attributionControl.removeAttribution(n.current),null!=t&&e.attributionControl.addAttribution(t)),n.current=t}),[e,t])}c=o("85Hg2");function Uf(e,t){const n=(0,c.useRef)();(0,c.useEffect)((function(){return null!=t&&e.instance.on(t),n.current=t,function(){null!=n.current&&e.instance.off(n.current),n.current=null}}),[e,t])}function jf(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function Hf(e,t){(0,c.useEffect)((function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}}),[t,e])}function Vf(e){return function(t){const n=If(),r=e(jf(t,n),n);return Ff(n.map,t.attribution),Uf(r.current,t.eventHandlers),Hf(r.current,n),r}}function Gf(e,t){return function(n,r){const i=If(),o=e(jf(n,i),i);return Ff(i.map,n.attribution),Uf(o.current,n.eventHandlers),t(o.current,i,n,r),o}}c=o("85Hg2");const Wf=(qf=function({position:e,...t},n){const r=new(0,Rf.Marker)(e,t);return Nf(r,(i=n,o={overlayContainer:r},Object.freeze({...i,...o})));var i,o},Df(Vf(Lf(qf,(function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),null!=t.icon&&t.icon!==n.icon&&e.setIcon(t.icon),null!=t.zIndexOffset&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),null!=t.opacity&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),null!=e.dragging&&t.draggable!==n.draggable&&(!0===t.draggable?e.dragging.enable():e.dragging.disable())})))));var qf;c=o("85Hg2");const Kf=function(e,t){return Bf(Gf(Lf(e),t))}((function(e,t){return Nf(new(0,Rf.Popup)(e,t.overlayContainer),t)}),(function(e,t,{position:n},r){(0,c.useEffect)((function(){const{instance:i}=e;function o(e){e.popup===i&&(i.update(),r(!0))}function s(e){e.popup===i&&r(!1)}return t.map.on({popupopen:o,popupclose:s}),null==t.overlayContainer?(null!=n&&i.setLatLng(n),i.openOn(t.map)):t.overlayContainer.bindPopup(i),function(){t.map.off({popupopen:o,popupclose:s}),t.overlayContainer?.unbindPopup(),t.map.removeLayer(i)}}),[e,t,r,n])}));function Jf(e,t,n){const{opacity:r,zIndex:i}=t;null!=r&&r!==n.opacity&&e.setOpacity(r),null!=i&&i!==n.zIndex&&e.setZIndex(i)}const Qf=function(e,t){return zf(Vf(Lf(e,t)))}((function({url:e,...t},n){return Nf(new(0,Rf.TileLayer)(e,jf(t,n)),n)}),(function(e,t,n){Jf(e,t,n);const{url:r}=t;null!=r&&r!==n.url&&e.setUrl(r)}));c=o("85Hg2");function Yf(){return If().map}c=o("85Hg2");const Zf=()=>{let e=!1;if("maxTouchPoints"in navigator)e=navigator.maxTouchPoints>0;else if("msMaxTouchPoints"in navigator)e=navigator.msMaxTouchPoints>0;else{const n=window&&"matchMedia"in window&&matchMedia("(pointer:coarse)");if(n&&"(pointer:coarse)"===n.media)e=!!n.matches;else if("orientation"in window)e=!0;else{var t=null===navigator||void 0===navigator?void 0:navigator.userAgent;e=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(t)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(t)}}return e},Xf=()=>{var e;let t=(null===(e=null===navigator||void 0===navigator?void 0:navigator.userAgentData)||void 0===e?void 0:e.platform)||(null===navigator||void 0===navigator?void 0:navigator.platform)||"unknown",n=(null===navigator||void 0===navigator?void 0:navigator.userAgent)||"unknown";return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(t)||n.includes("Mac")&&"ontouchend"in document},$f=/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$_:;|,~+=\{\}\[\]%^&*-]).{8,}$/,em=/^\w+([.-]?[+]?\w+)*@\w+([.-]?\w+)*(\.\w{2,})+$/,tm=/^(?!.*\.\.)(?!.*\.$)[^\W][\w.+-]{2,32}$/;function nm(e,t){const n=(0,c.useRef)(),r=(0,c.useRef)(null);return(0,c.useEffect)((()=>(r.current=e,()=>{r.current=null})),[e]),(0,c.useEffect)((()=>()=>{clearTimeout(n.current)}),[]),(0,c.useMemo)((()=>(...e)=>{clearTimeout(n.current),n.current=window.setTimeout((()=>{r.current&&r.current(...e)}),t)}),[t])}const rm=e=>e.slice(0,e.length/2).trim().toLowerCase()===e.slice(e.length/2+1).trim().toLowerCase()?e.slice(0,e.length/2):e,im=e=>e.replaceAll(/[^\p{L}\p{N}\p{P}\p{Z}^$\n]/gu,"").trim(),om=e=>e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replaceAll(/```[\s\S]*?```/g,"")).replaceAll(/`[^`]*`/g,"")).replaceAll(/!\[[^\]]*\]\([^)]*\)/g,"")).replaceAll(/\[([^\]]*)\]\([^)]*\)/g,"$1")).replaceAll(/^> /gm,"")).replaceAll(/^#+ /gm,"")).replaceAll(/[*_]/g,"")).replaceAll(/---/g,"")).replaceAll(/~~/g,"")).replaceAll(/^\s*[-*+] /gm,"")).replaceAll(/^\s*\d+\.\s+/gm,"")).replaceAll(/^\|.*\|$/gm,"")).replaceAll(/\$\$[\s\S]*?\$\$/g,"")).replaceAll(/\$[\s\S]*?\$/g,"")).replaceAll(/\\\([\s\S]*?\\\)/g,"")).replaceAll(/\\\[[\s\S]*?\\\]/g,"")).replaceAll(/\s+/g," ").trim(),sm=e=>{const t=document.createElement("textarea");return t.textContent=e,t.innerHTML};function am(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}c=o("85Hg2"),c=o("85Hg2");function lm(e,t){let[n,r]=(0,c.useState)(e),i=Ah(e);return _h((()=>r(i.current)),[i,r,...t]),n}c=o("85Hg2");function cm(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";return"string"==typeof n&&"button"===n.toLowerCase()?"button":void 0}function um(e,t){let[n,r]=(0,c.useState)((()=>cm(e)));return _h((()=>{r(cm(e))}),[e.type,e.as]),_h((()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")}),[n,t]),n}c=o("85Hg2");function dm({container:e,accept:t,walk:n,enabled:r=!0}){let i=(0,c.useRef)(t),o=(0,c.useRef)(n);(0,c.useEffect)((()=>{i.current=t,o.current=n}),[t,n]),_h((()=>{if(!e||!r)return;let t=hp(e);if(!t)return;let n=i.current,s=o.current,a=Object.assign((e=>n(e)),{acceptNode:n}),l=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)s(l.currentNode)}),[e,r,i,o])}var hm=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(hm||{});function pm(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1,o=(()=>{switch(e.focus){case 0:return n.findIndex((e=>!t.resolveDisabled(e)));case 1:{let e=n.slice().reverse().findIndex(((e,n,r)=>!(-1!==i&&r.length-n-1>=i)&&!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 2:return n.findIndex(((e,n)=>!(n<=i)&&!t.resolveDisabled(e)));case 3:{let e=n.slice().reverse().findIndex((e=>!t.resolveDisabled(e)));return-1===e?e:n.length-1-e}case 4:return n.findIndex((n=>t.resolveId(n)===e.id));case 5:return null;default:!function(e){throw new Error("Unexpected object: "+e)}(e)}})();return-1===o?r:o}function fm(e={},t=null,n=[]){for(let[r,i]of Object.entries(e))gm(n,mm(t,r),i);return n}function mm(e,t){return e?e+"["+t+"]":t}function gm(e,t,n){if(Array.isArray(n))for(let[r,i]of n.entries())gm(e,mm(t,r.toString()),i);else n instanceof Date?e.push([t,n.toISOString()]):"boolean"==typeof n?e.push([t,n?"1":"0"]):"string"==typeof n?e.push([t,n]):"number"==typeof n?e.push([t,`${n}`]):null==n?e.push([t,""]):fm(n,t,e)}function vm(e){var t;let n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n)for(let e of n.elements)if("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type)return void e.click()}c=o("85Hg2");function ym(e,t,n){let[r,i]=(0,c.useState)(n),o=void 0!==e,s=(0,c.useRef)(o),a=(0,c.useRef)(!1),l=(0,c.useRef)(!1);return!o||s.current||a.current?!o&&s.current&&!l.current&&(l.current=!0,s.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(a.current=!0,s.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[o?e:r,Mh((e=>(o||i(e),null==t?void 0:t(e))))]}var bm=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(bm||{}),xm=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(xm||{}),Sm=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Sm||{}),wm=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e))(wm||{});function _m(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=Cp(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let Cm={1:e=>e.dataRef.current.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1},0(e){if(e.dataRef.current.disabled||0===e.comboboxState)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex((e=>n(e.dataRef.current.value)));return-1!==r&&(t=r),{...e,comboboxState:0,activeOptionIndex:t}},2(e,t){var n;if(e.dataRef.current.disabled||e.dataRef.current.optionsRef.current&&!e.dataRef.current.optionsPropsRef.current.static&&1===e.comboboxState)return e;let r=_m(e);if(null===r.activeOptionIndex){let e=r.options.findIndex((e=>!e.dataRef.current.disabled));-1!==e&&(r.activeOptionIndex=e)}let i=pm(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,activeOptionIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=_m(e,(e=>[...e,n]));null===e.activeOptionIndex&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n));let i={...e,...r,activationTrigger:1};return e.dataRef.current.__demoMode&&void 0===e.dataRef.current.value&&(i.activeOptionIndex=0),i},4:(e,t)=>{let n=_m(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}},5:(e,t)=>({...e,labelId:t.id})},Am=(0,c.createContext)(null);function Em(e){let t=(0,c.useContext)(Am);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Em),t}return t}Am.displayName="ComboboxActionsContext";let Tm=(0,c.createContext)(null);function Mm(e){let t=(0,c.useContext)(Tm);if(null===t){let t=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Mm),t}return t}function Im(e,t){return lh(t.type,Cm,e,t)}Tm.displayName="ComboboxDataContext";let Rm=c.Fragment;let Pm=mh((function(e,n){let{value:r,defaultValue:i,onChange:o,name:s,by:a=((e,t)=>e===t),disabled:l=!1,__demoMode:u=!1,nullable:d=!1,multiple:h=!1,...p}=e,[f,m]=ym(r,o,i),[g,v]=(0,c.useReducer)(Im,{dataRef:(0,c.createRef)(),comboboxState:u?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),y=(0,c.useRef)(!1),b=(0,c.useRef)({static:!1,hold:!1}),x=(0,c.useRef)(null),S=(0,c.useRef)(null),w=(0,c.useRef)(null),_=(0,c.useRef)(null),C=Mh("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a),A=(0,c.useCallback)((e=>lh(E.mode,{1:()=>f.some((t=>C(t,e))),0:()=>C(f,e)})),[f]),E=(0,c.useMemo)((()=>({...g,optionsPropsRef:b,labelRef:x,inputRef:S,buttonRef:w,optionsRef:_,value:f,disabled:l,mode:h?1:0,get activeOptionIndex(){if(y.current&&null===g.activeOptionIndex&&g.options.length>0){let e=g.options.findIndex((e=>!e.dataRef.current.disabled));if(-1!==e)return e}return g.activeOptionIndex},compare:C,isSelected:A,nullable:d,__demoMode:u})),[f,l,h,d,u,g]);_h((()=>{g.dataRef.current=E}),[E]),rf([E.buttonRef,E.inputRef,E.optionsRef],(()=>v({type:1})),0===E.comboboxState);let T=(0,c.useMemo)((()=>({open:0===E.comboboxState,disabled:l,activeIndex:E.activeOptionIndex,activeOption:null===E.activeOptionIndex?null:E.options[E.activeOptionIndex].dataRef.current.value,value:f})),[E,l,f]),M=Mh((e=>{let t=E.options.find((t=>t.id===e));!t||L(t.dataRef.current.value)})),I=Mh((()=>{if(null!==E.activeOptionIndex){let{dataRef:e,id:t}=E.options[E.activeOptionIndex];L(e.current.value),v({type:2,focus:hm.Specific,id:t})}})),R=Mh((()=>{v({type:0}),y.current=!0})),P=Mh((()=>{v({type:1}),y.current=!1})),k=Mh(((e,t,n)=>(y.current=!1,e===hm.Specific?v({type:2,focus:hm.Specific,id:t,trigger:n}):v({type:2,focus:e,trigger:n})))),O=Mh(((e,t)=>(v({type:3,id:e,dataRef:t}),()=>v({type:4,id:e})))),N=Mh((e=>(v({type:5,id:e}),()=>v({type:5,id:null})))),L=Mh((e=>lh(E.mode,{0:()=>null==m?void 0:m(e),1(){let t=E.value.slice(),n=t.findIndex((t=>C(t,e)));return-1===n?t.push(e):t.splice(n,1),null==m?void 0:m(t)}}))),D=(0,c.useMemo)((()=>({onChange:L,registerOption:O,registerLabel:N,goToOption:k,closeCombobox:P,openCombobox:R,selectActiveOption:I,selectOption:M})),[]),B=null===n?{}:{ref:n};return t(c).createElement(Am.Provider,{value:D},t(c).createElement(Tm.Provider,{value:E},t(c).createElement(Sh,{value:lh(E.comboboxState,{0:bh.Open,1:bh.Closed})},null!=s&&null!=f&&fm({[s]:f}).map((([e,n])=>t(c).createElement(dp,{features:up.Hidden,...gh({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:n})}))),hh({ourProps:B,theirProps:p,slot:T,defaultTag:Rm,name:"Combobox"}))))})),km=mh((function(e,t){var n,r;let{value:i,onChange:o,displayValue:s,type:a="text",...l}=e,u=Mm("Combobox.Input"),d=Em("Combobox.Input"),h=Ph(u.inputRef,t),p=`headlessui-combobox-input-${cp()}`,f=Uh(),m=!1;kp((([e,t],[n,r])=>{!u.inputRef.current||(0===r&&1===t?function(e){var t;let n=u.inputRef.current;if(!n||n.value===e)return;let r=Object.getOwnPropertyDescriptor(n.constructor.prototype,"value");null==(t=null==r?void 0:r.set)||t.call(n,e),m=!0,n.dispatchEvent(new Event("input",{bubbles:!0})),n.value=e,m=!1}(e):e!==n&&(u.inputRef.current.value=e))}),[(0,c.useMemo)((()=>{var e;return"function"==typeof s?null!=(e=s(u.value))?e:"":"string"==typeof u.value?u.value:""}),[u.value]),u.comboboxState]);let g=(0,c.useRef)(!1),v=Mh((()=>{g.current=!0})),y=Mh((()=>{setTimeout((()=>{g.current=!1}))})),b=Mh((e=>{switch(e.key){case ip.Backspace:case ip.Delete:if(0!==u.mode||!u.nullable)return;let t=e.currentTarget;f.requestAnimationFrame((()=>{""===t.value&&(d.onChange(null),u.optionsRef.current&&(u.optionsRef.current.scrollTop=0),d.goToOption(hm.Nothing))}));break;case ip.Enter:if(0!==u.comboboxState||g.current)return;if(e.preventDefault(),e.stopPropagation(),null===u.activeOptionIndex)return void d.closeCombobox();d.selectActiveOption(),0===u.mode&&d.closeCombobox();break;case ip.ArrowDown:return e.preventDefault(),e.stopPropagation(),lh(u.comboboxState,{0:()=>{d.goToOption(hm.Next)},1:()=>{d.openCombobox()}});case ip.ArrowUp:return e.preventDefault(),e.stopPropagation(),lh(u.comboboxState,{0:()=>{d.goToOption(hm.Previous)},1:()=>{d.openCombobox(),f.nextFrame((()=>{u.value||d.goToOption(hm.Last)}))}});case ip.Home:case ip.PageUp:return e.preventDefault(),e.stopPropagation(),d.goToOption(hm.First);case ip.End:case ip.PageDown:return e.preventDefault(),e.stopPropagation(),d.goToOption(hm.Last);case ip.Escape:return 0!==u.comboboxState?void 0:(e.preventDefault(),u.optionsRef.current&&!u.optionsPropsRef.current.static&&e.stopPropagation(),d.closeCombobox());case ip.Tab:if(0!==u.comboboxState)return;0===u.mode&&d.selectActiveOption(),d.closeCombobox()}})),x=Mh((e=>{m||d.openCombobox(),null==o||o(e)})),S=lm((()=>{if(u.labelId)return[u.labelId].join(" ")}),[u.labelId]),w=(0,c.useMemo)((()=>({open:0===u.comboboxState,disabled:u.disabled})),[u]);return hh({ourProps:{ref:h,id:p,role:"combobox",type:a,"aria-controls":null==(n=u.optionsRef.current)?void 0:n.id,"aria-expanded":u.disabled?void 0:0===u.comboboxState,"aria-activedescendant":null===u.activeOptionIndex||null==(r=u.options[u.activeOptionIndex])?void 0:r.id,"aria-multiselectable":1===u.mode||void 0,"aria-labelledby":S,disabled:u.disabled,onCompositionStart:v,onCompositionEnd:y,onKeyDown:b,onChange:x},theirProps:l,slot:w,defaultTag:"input",name:"Combobox.Input"})})),Om=mh((function(e,t){var n;let r=Mm("Combobox.Button"),i=Em("Combobox.Button"),o=Ph(r.buttonRef,t),s=`headlessui-combobox-button-${cp()}`,a=Uh(),l=Mh((e=>{switch(e.key){case ip.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===r.comboboxState&&i.openCombobox(),a.nextFrame((()=>{var e;return null==(e=r.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case ip.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===r.comboboxState&&(i.openCombobox(),a.nextFrame((()=>{r.value||i.goToOption(hm.Last)}))),a.nextFrame((()=>{var e;return null==(e=r.inputRef.current)?void 0:e.focus({preventScroll:!0})}));case ip.Escape:return 0!==r.comboboxState?void 0:(e.preventDefault(),r.optionsRef.current&&!r.optionsPropsRef.current.static&&e.stopPropagation(),i.closeCombobox(),a.nextFrame((()=>{var e;return null==(e=r.inputRef.current)?void 0:e.focus({preventScroll:!0})})));default:return}})),u=Mh((e=>{if(op(e.currentTarget))return e.preventDefault();0===r.comboboxState?i.closeCombobox():(e.preventDefault(),i.openCombobox()),a.nextFrame((()=>{var e;return null==(e=r.inputRef.current)?void 0:e.focus({preventScroll:!0})}))})),d=lm((()=>{if(r.labelId)return[r.labelId,s].join(" ")}),[r.labelId,s]),h=(0,c.useMemo)((()=>({open:0===r.comboboxState,disabled:r.disabled,value:r.value})),[r]),p=e;return hh({ourProps:{ref:o,id:s,type:um(e,r.buttonRef),tabIndex:-1,"aria-haspopup":!0,"aria-controls":null==(n=r.optionsRef.current)?void 0:n.id,"aria-expanded":r.disabled?void 0:0===r.comboboxState,"aria-labelledby":d,disabled:r.disabled,onClick:u,onKeyDown:l},theirProps:p,slot:h,defaultTag:"button",name:"Combobox.Button"})})),Nm=mh((function(e,t){let n=Mm("Combobox.Label"),r=`headlessui-combobox-label-${cp()}`,i=Em("Combobox.Label"),o=Ph(n.labelRef,t);_h((()=>i.registerLabel(r)),[r]);let s=Mh((()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})})),a=(0,c.useMemo)((()=>({open:0===n.comboboxState,disabled:n.disabled})),[n]);return hh({ourProps:{ref:o,id:r,onClick:s},theirProps:e,slot:a,defaultTag:"label",name:"Combobox.Label"})})),Lm=uh.RenderStrategy|uh.Static,Dm=mh((function(e,t){var n;let{hold:r=!1,...i}=e,o=Mm("Combobox.Options"),s=Ph(o.optionsRef,t),a=`headlessui-combobox-options-${cp()}`,l=xh(),u=null!==l?l===bh.Open:0===o.comboboxState;_h((()=>{var t;o.optionsPropsRef.current.static=null!=(t=e.static)&&t}),[o.optionsPropsRef,e.static]),_h((()=>{o.optionsPropsRef.current.hold=r}),[o.optionsPropsRef,r]),dm({container:o.optionsRef.current,enabled:0===o.comboboxState,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let d=lm((()=>{var e,t;return null!=(t=o.labelId)?t:null==(e=o.buttonRef.current)?void 0:e.id}),[o.labelId,o.buttonRef.current]),h=(0,c.useMemo)((()=>({open:0===o.comboboxState})),[o]);return hh({ourProps:{"aria-activedescendant":null===o.activeOptionIndex||null==(n=o.options[o.activeOptionIndex])?void 0:n.id,"aria-labelledby":d,role:"listbox",id:a,ref:s},theirProps:i,slot:h,defaultTag:"ul",features:Lm,visible:u,name:"Combobox.Options"})})),Bm=mh((function(e,t){var n,r;let{disabled:i=!1,value:o,...s}=e,a=Mm("Combobox.Option"),l=Em("Combobox.Option"),u=`headlessui-combobox-option-${cp()}`,d=null!==a.activeOptionIndex&&a.options[a.activeOptionIndex].id===u,h=a.isSelected(o),p=(0,c.useRef)(null),f=Ah({disabled:i,value:o,domRef:p,textValue:null==(r=null==(n=p.current)?void 0:n.textContent)?void 0:r.toLowerCase()}),m=Ph(t,p),g=Mh((()=>l.selectOption(u)));_h((()=>l.registerOption(u,f)),[f,u]);let v=(0,c.useRef)(!a.__demoMode);_h((()=>{if(!a.__demoMode)return;let e=Nh();return e.requestAnimationFrame((()=>{v.current=!0})),e.dispose}),[]),_h((()=>{if(0!==a.comboboxState||!d||!v.current||0===a.activationTrigger)return;let e=Nh();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[p,d,a.comboboxState,a.activationTrigger,a.activeOptionIndex]);let y=Mh((e=>{if(i)return e.preventDefault();g(),0===a.mode&&l.closeCombobox()})),b=Mh((()=>{if(i)return l.goToOption(hm.Nothing);l.goToOption(hm.Specific,u)})),x=Mh((()=>{i||d||l.goToOption(hm.Specific,u,0)})),S=Mh((()=>{i||!d||a.optionsPropsRef.current.hold||l.goToOption(hm.Nothing)})),w=(0,c.useMemo)((()=>({active:d,selected:h,disabled:i})),[d,h,i]);return hh({ourProps:{id:u,ref:m,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":h,disabled:void 0,onClick:y,onFocus:b,onPointerMove:x,onMouseMove:x,onPointerLeave:S,onMouseLeave:S},theirProps:s,slot:w,defaultTag:"li",name:"Combobox.Option"})})),zm=Object.assign(Pm,{Input:km,Button:Om,Label:Nm,Options:Dm,Option:Bm});const Fm=({center:e,size:n})=>{const r=If();return(0,c.useEffect)((()=>{const i=new(t(Rf).Circle)(e,n),o=r.layerContainer||r.map;return o.addLayer(i),()=>{o.removeLayer(i)}})),null},Um=({center:e,uncertainty:t})=>{const[n,r]=(0,c.useState)(!1),i=Yf(),o=(0,c.useCallback)((()=>{let n=void 0!==t?Math.round(Math.log2(1e7/t)):i.getZoom();i.setView(e,n)}),[e,t,i]);return(0,c.useEffect)((()=>{n||(o(),r(!0))}),[]),(0,c.useEffect)((()=>{o()}),[e,t,o]),null};let jm=t(Rf).icon({iconUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",shadowUrl:"https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12.5,20.5],shadowAnchor:[12.5,20.5]});t(Rf).Marker.prototype.options.icon=jm;const Hm=e=>{let t="Position";return(null==e?void 0:e.address)?t=[e.address.village||e.address.suburb,e.address.town||e.address.city||e.address.county||e.address.state,e.address.country].filter(Boolean).filter(((e,t,n)=>n.indexOf(e)===t)).join(", "):(null==e?void 0:e.display_name)&&(t=e.display_name),t};var Vm=({venue:e,setVenue:n,showUncertainty:r=!1,showGpsButton:i=!0,saveAndClose:o})=>{var a,l,u;const{t:d}=Se(),[h,p]=(0,c.useState)(!1),[f,m]=(0,c.useState)(!1),[g,v]=(0,c.useState)(!1),[y,b]=(0,c.useState)(""),[x,S]=(0,c.useState)([]),w=nm((async e=>{v(!0);try{let t=await fetch(`https://nominatim.openstreetmap.org/search?q=${e}&format=jsonv2&limit=5&addressdetails=1`),n=await t.json();S(n)}catch(e){console.error(e)}finally{v(!1)}}),1e3);return(0,c.useEffect)((()=>{p(!0)}),[]),(0,c.useEffect)((()=>{const e=document.createElement("link");return e.href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css",e.rel="stylesheet",e.integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=",e.crossOrigin="",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,s.jsxs)("fieldset",{className:"memori--venue-widget",children:[(0,s.jsx)("legend",{className:"sr-only",children:"Venue"}),(0,s.jsxs)("div",{className:"memori--venue-widget__form-item",children:[(0,s.jsx)("div",{className:"memori--venue-widget__geosuggest",children:f?(0,s.jsx)("p",{children:d("write_and_speak.updatingPosition")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"memori--venue-widget-search",children:(0,s.jsxs)(zm,{value:(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?{place_id:0,lat:null==e?void 0:e.latitude,lon:null==e?void 0:e.longitude,display_name:null==e?void 0:e.placeName}:void 0,onChange:e=>{console.log(e);const t=Hm(e);n({latitude:e.lat,longitude:e.lon,placeName:t,uncertainty:(null==e?void 0:e.boundingbox)?Af(e.boundingbox):2})},children:[(0,s.jsx)(zm.Input,{className:"memori--venue-widget-search--input",displayValue:e=>e?Hm(e):"",placeholder:d("searchVenue"),onChange:e=>{return t=e.target.value,b(t),void w(t);var t}}),(g||x.length>0||0===x.length&&""!==y)&&(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(zm.Options,{className:"memori--venue-widget-search--options",children:g?(0,s.jsx)(xf,{spinning:!0,children:(0,s.jsxs)("center",{className:"memori--venue-widget-search--option",children:[d("loading"),"..."]})}):0===x.length&&""!==y?(0,s.jsx)("center",{className:"memori--venue-widget-search--option",children:d("nothingFound")}):null==x?void 0:x.map((e=>(0,s.jsx)(zm.Option,{as:c.Fragment,value:e,children:({active:n,selected:r})=>(0,s.jsx)("li",{className:t(ws)("memori--venue-widget-search--option",{"memori--venue-widget-search--option-active":n,"memori--venue-widget-search--option-selected":r}),children:e.display_name})},e.place_id)))})})]})}),i&&(0,s.jsx)(Sf,{className:"memori--venue-widget__gps-button",primary:!0,loading:f,onClick:()=>{m(!0),(async()=>{m(!0),navigator.geolocation.getCurrentPosition((async e=>{let r={latitude:e.coords.latitude,longitude:e.coords.longitude,placeName:"Position",uncertainty:e.coords.accuracy/1e3};try{const t=await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e.coords.latitude}&lon=${e.coords.longitude}&format=jsonv2&addressdetails=1`),i=await t.json(),s=Hm(i);r={latitude:e.coords.latitude,longitude:e.coords.longitude,placeName:s,uncertainty:e.coords.accuracy/1e3},n(r)}catch(e){let i=e;console.error("[POSITION ERROR]",i),(null==i?void 0:i.message)&&t(Ju).error(i.message),n(r)}finally{o&&o(r)}m(!1)}),(e=>{console.error("[POSITION ERROR]",e),t(Ju).error(e.message),m(!1)}))})()},children:d("write_and_speak.useMyPosition")})]})}),(0,s.jsx)("div",{children:(0,s.jsx)(Sf,{outlined:!0,className:"memori--venue-widget__no-location-button",onClick:()=>{let e={latitude:0,longitude:0,placeName:"Position",uncertainty:0};n(e),o&&o(e)},children:d("write_and_speak.dontWantToProvidePosition")})}),r&&(0,s.jsxs)("label",{className:"memori--venue-widget__select-label",children:[(0,s.jsxs)("span",{children:[d("uncertain"),": "]}),(0,s.jsxs)("select",{className:"memori-select--button memori--venue-widget__uncertainty",value:parseFloat((null!==(a=null==e?void 0:e.uncertainty)&&void 0!==a?a:0).toFixed(2)),disabled:!(e&&e.placeName&&e.latitude&&e.longitude),onChange:t=>{n({...e,uncertainty:parseFloat(t.target.value)})},children:[(null==e?void 0:e.uncertainty)&&![0,1,2,5,10,20,50,100].includes(e.uncertainty)&&(0,s.jsxs)("option",{value:e.uncertainty,children:[e.uncertainty," Km"]}),(0,s.jsx)("option",{value:0,children:d("exactPosition")}),(0,s.jsx)("option",{value:1,children:"1 km"}),(0,s.jsx)("option",{value:2,children:"2 km"}),(0,s.jsx)("option",{value:5,children:"5 km"}),(0,s.jsx)("option",{value:10,children:"10 km"}),(0,s.jsx)("option",{value:20,children:"20 km"}),(0,s.jsx)("option",{value:50,children:"50 km"}),(0,s.jsx)("option",{value:100,children:"100 km"})]})]})]}),(0,s.jsxs)("div",{className:"memori--venue-widget__form-item",children:[(null==e?void 0:e.placeName)&&"Position"!==e.placeName&&(0,s.jsxs)("p",{className:"memori--venue--widget__place-name",children:[(0,s.jsx)("strong",{children:d("venue")}),": ",e.placeName]}),(0,s.jsx)("div",{className:"memori--venue-widget__map",children:h&&(0,s.jsxs)(Of,{className:"memori--venue-widget__map",center:(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?[e.latitude,e.longitude]:[44.66579,11.48823],zoom:13,scrollWheelZoom:!0,children:[(0,s.jsx)(Qf,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,s.jsx)(Um,{center:(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)?[e.latitude,e.longitude]:[44.66579,11.48823],uncertainty:1e3*(null!==(l=null==e?void 0:e.uncertainty)&&void 0!==l?l:0)}),(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)&&(0,s.jsx)(Wf,{position:[e.latitude,e.longitude],icon:jm,children:(0,s.jsx)(Kf,{children:null!==(u=e.placeName)&&void 0!==u?u:""})}),(null==e?void 0:e.latitude)&&(null==e?void 0:e.longitude)&&void 0!==(null==e?void 0:e.uncertainty)&&(0,s.jsx)(Fm,{center:[e.latitude,e.longitude],size:1e3*e.uncertainty})]})})]})]})};var Gm=({memori:e,open:t,onClose:n,venue:r,setVenue:i})=>{const{t:o}=Se();return(0,s.jsxs)(_f,{className:"memori-position-drawer",open:t,onClose:()=>n(r),title:o("widget.position")||"Position",animated:!1,children:[(0,s.jsx)("p",{children:o("write_and_speak.requirePositionHelp",{name:e.name})}),(0,s.jsx)(Vm,{venue:r,setVenue:i,showUncertainty:!1,saveAndClose:e=>{i(e),n(e)}})]})};c=o("85Hg2"),c=o("85Hg2");var Wm=({open:e=!1,onClose:n,className:r,title:i,description:o,children:a,footer:l,loading:u=!1,closable:d=!0,width:h="100%",widthMd:p="100%"})=>{const{t:f}=Se();return(0,s.jsx)(np,{appear:!0,show:e,as:t(c).Fragment,children:(0,s.jsxs)(yf,{open:e,onClose:n,className:t(ws)("memori-modal",r),children:[(0,s.jsx)(np.Child,{as:t(c).Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)("div",{className:"memori-modal--backdrop"})}),(0,s.jsx)("div",{className:"memori-modal--container",children:(0,s.jsx)("div",{className:"memori-modal--container-scrollable",children:(0,s.jsx)(np.Child,{as:t(c).Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsxs)(yf.Panel,{className:"memori-modal--panel",children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:`\n .memori-modal--panel {\n --memori-modal--width: ${h};\n --memori-modal--width-md: ${p};\n }\n `}}),d&&(0,s.jsx)("div",{className:"memori-modal--close",children:(0,s.jsx)(Sf,{ghost:!0,padded:!0,shape:"circle",icon:(0,s.jsx)(wf,{}),title:f("close")||"Close",onClick:()=>n(!1)})}),(0,s.jsxs)(xf,{spinning:u,children:[i&&(0,s.jsx)(yf.Title,{className:"memori-modal--title",children:i}),o&&(0,s.jsx)(yf.Description,{className:"memori-modal--description",children:o}),a,l&&(0,s.jsx)("div",{className:"memori-modal--footer",children:l})]})]})})})})]})})},qm=(c=o("85Hg2"),e=>"checkbox"===e.type),Km=e=>e instanceof Date,Jm=e=>null==e;const Qm=e=>"object"==typeof e;var Ym=e=>!Jm(e)&&!Array.isArray(e)&&Qm(e)&&!Km(e),Zm=e=>Ym(e)&&e.target?qm(e.target)?e.target.checked:e.target.value:e,Xm=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),$m=e=>Array.isArray(e)?e.filter(Boolean):[],eg=e=>void 0===e,tg=(e,t,n)=>{if(!t||!Ym(e))return n;const r=$m(t.split(/[,[\].]+?/)).reduce(((e,t)=>Jm(e)?e:e[t]),e);return eg(r)||r===e?eg(e[t])?n:e[t]:r};const ng="blur",rg="focusout",ig="onBlur",og="onChange",sg="onSubmit",ag="onTouched",lg="all",cg="max",ug="min",dg="maxLength",hg="minLength",pg="pattern",fg="required",mg="validate";t(c).createContext(null);var gg=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==lg&&(t._proxyFormState[i]=!r||lg),n&&(n[i]=!0),e[i]}});return i},vg=e=>Ym(e)&&!Object.keys(e).length,yg=(e,t,n)=>{const{name:r,...i}=e;return vg(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find((e=>t[e]===(!n||lg)))},bg=e=>Array.isArray(e)?e:[e];function xg(e){const n=t(c).useRef(e);n.current=e,t(c).useEffect((()=>{const t=!e.disabled&&n.current.subject.subscribe({next:n.current.callback});return()=>{t&&t.unsubscribe()}}),[e.disabled])}var Sg=e=>"string"==typeof e,wg=(e,t,n,r)=>Sg(e)?(r&&t.watch.add(e),tg(n,e)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),tg(n,e)))):(t.watchAll=!!r,n),_g="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function Cg(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(_g&&(e instanceof Blob||e instanceof FileList)||!n&&!Ym(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return Ym(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=Cg(e[n]);else t=e}return t}var Ag=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Eg=e=>/^\w*$/.test(e),Tg=e=>$m(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Mg(e,t,n){let r=-1;const i=Eg(t)?[t]:Tg(t),o=i.length,s=o-1;for(;++r<o;){const t=i[r];let o=n;if(r!==s){const n=e[t];o=Ym(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}e[t]=o,e=e[t]}return e}const Ig=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=tg(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else Ym(r)&&Ig(r,t)}}};var Rg=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),Pg=(e,t,n)=>{const r=$m(tg(e,n));return Mg(r,"root",t[n]),Mg(e,n,r),e},kg=e=>"boolean"==typeof e,Og=e=>"file"===e.type,Ng=e=>"function"==typeof e,Lg=e=>Sg(e)||t(c).isValidElement(e),Dg=e=>"radio"===e.type,Bg=e=>e instanceof RegExp;const zg={value:!1,isValid:!1},Fg={value:!0,isValid:!0};var Ug=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!eg(e[0].attributes.value)?eg(e[0].value)||""===e[0].value?Fg:{value:e[0].value,isValid:!0}:Fg:zg}return zg};const jg={isValid:!1,value:null};var Hg=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),jg):jg;function Vg(e,t,n="validate"){if(Lg(e)||Array.isArray(e)&&e.every(Lg)||kg(e)&&!e)return{type:n,message:Lg(e)?e:"",ref:t}}var Gg=e=>Ym(e)&&!Bg(e)?e:{value:e,message:""},Wg=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:c,min:u,max:d,pattern:h,validate:p,name:f,valueAsNumber:m,mount:g,disabled:v}=e._f;if(!g||v)return{};const y=s?s[0]:o,b=e=>{r&&y.reportValidity&&(y.setCustomValidity(kg(e)?"":e||""),y.reportValidity())},x={},S=Dg(o),w=qm(o),_=S||w,C=(m||Og(o))&&!o.value||""===t||Array.isArray(t)&&!t.length,A=Ag.bind(null,f,n,x),E=(e,t,n,r=dg,i=hg)=>{const s=e?t:n;x[f]={type:e?r:i,message:s,ref:o,...A(e?r:i,s)}};if(i?!Array.isArray(t)||!t.length:a&&(!_&&(C||Jm(t))||kg(t)&&!t||w&&!Ug(s).isValid||S&&!Hg(s).isValid)){const{value:e,message:t}=Lg(a)?{value:!!a,message:a}:Gg(a);if(e&&(x[f]={type:fg,message:t,ref:y,...A(fg,t)},!n))return b(t),x}if(!(C||Jm(u)&&Jm(d))){let e,r;const i=Gg(d),s=Gg(u);if(Jm(t)||isNaN(t)){const n=o.valueAsDate||new Date(t),a=e=>new Date((new Date).toDateString()+" "+e),l="time"==o.type,c="week"==o.type;Sg(i.value)&&t&&(e=l?a(t)>a(i.value):c?t>i.value:n>new Date(i.value)),Sg(s.value)&&t&&(r=l?a(t)<a(s.value):c?t<s.value:n<new Date(s.value))}else{const n=o.valueAsNumber||(t?+t:t);Jm(i.value)||(e=n>i.value),Jm(s.value)||(r=n<s.value)}if((e||r)&&(E(!!e,i.message,s.message,cg,ug),!n))return b(x[f].message),x}if((l||c)&&!C&&(Sg(t)||i&&Array.isArray(t))){const e=Gg(l),r=Gg(c),i=!Jm(e.value)&&t.length>e.value,o=!Jm(r.value)&&t.length<r.value;if((i||o)&&(E(i,e.message,r.message),!n))return b(x[f].message),x}if(h&&!C&&Sg(t)){const{value:e,message:r}=Gg(h);if(Bg(e)&&!t.match(e)&&(x[f]={type:pg,message:r,ref:o,...A(pg,r)},!n))return b(r),x}if(p)if(Ng(p)){const e=Vg(await p(t),y);if(e&&(x[f]={...e,...A(mg,e.message)},!n))return b(e.message),x}else if(Ym(p)){let e={};for(const r in p){if(!vg(e)&&!n)break;const i=Vg(await p[r](t),y,r);i&&(e={...i,...A(r,i.message)},b(i.message),n&&(x[f]=e))}if(!vg(e)&&(x[f]={ref:y,...e},!n))return x}return b(!0),x};var qg=e=>({isOnSubmit:!e||e===sg,isOnBlur:e===ig,isOnChange:e===og,isOnAll:e===lg,isOnTouch:e===ag});function Kg(e){for(const t in e)if(!eg(e[t]))return!1;return!0}function Jg(e,t){const n=Eg(t)?[t]:Tg(t),r=1==n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=eg(e)?r++:e[t[r++]];return e}(e,n),i=n[n.length-1];let o;r&&delete r[i];for(let t=0;t<n.slice(0,-1).length;t++){let r,i=-1;const s=n.slice(0,-(t+1)),a=s.length-1;for(t>0&&(o=e);++i<s.length;){const t=s[i];r=r?r[t]:e[t],a===i&&(Ym(r)&&vg(r)||Array.isArray(r)&&Kg(r))&&(o?delete o[t]:delete e[t]),o=r}}return e}function Qg(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var Yg=e=>Jm(e)||!Qm(e);function Zg(e,t){if(Yg(e)||Yg(t))return e===t;if(Km(e)&&Km(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(Km(n)&&Km(e)||Ym(n)&&Ym(e)||Array.isArray(n)&&Array.isArray(e)?!Zg(n,e):n!==e)return!1}}return!0}var Xg=e=>{const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$g=e=>"select-multiple"===e.type,ev=e=>Xg(e)&&e.isConnected,tv=e=>{for(const t in e)if(Ng(e[t]))return!0;return!1};function nv(e,t={}){const n=Array.isArray(e);if(Ym(e)||n)for(const n in e)Array.isArray(e[n])||Ym(e[n])&&!tv(e[n])?(t[n]=Array.isArray(e[n])?[]:{},nv(e[n],t[n])):Jm(e[n])||(t[n]=!0);return t}function rv(e,t,n){const r=Array.isArray(e);if(Ym(e)||r)for(const r in e)Array.isArray(e[r])||Ym(e[r])&&!tv(e[r])?eg(t)||Yg(n[r])?n[r]=Array.isArray(e[r])?nv(e[r],[]):{...nv(e[r])}:rv(e[r],Jm(t)?{}:t[r],n[r]):Zg(e[r],t[r])?delete n[r]:n[r]=!0;return n}var iv=(e,t)=>rv(e,t,nv(t)),ov=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>eg(e)?e:t?""===e?NaN:e?+e:e:n&&Sg(e)?new Date(e):r?r(e):e;function sv(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Og(t)?t.files:Dg(t)?Hg(e.refs).value:$g(t)?[...t.selectedOptions].map((({value:e})=>e)):qm(t)?Ug(e.refs).value:ov(eg(t.value)?e.ref.value:t.value,e)}var av=e=>eg(e)?e:Bg(e)?e.source:Ym(e)?Bg(e.value)?e.value.source:e.value:e;function lv(e,t,n){const r=tg(e,n);if(r||Eg(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),o=tg(t,r),s=tg(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(s&&s.type)return{name:r,error:s};i.pop()}return{name:n}}const cv={mode:sg,reValidateMode:og,shouldFocusError:!0};function uv(e={}){let t,n={...cv,...e},r={submitCount:0,isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=Cg(n.defaultValues)||{},s=n.shouldUnregister?{}:Cg(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c=0,u={};const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={watch:Qg(),array:Qg(),state:Qg()},p=qg(n.mode),f=qg(n.reValidateMode),m=n.criteriaMode===lg,g=async()=>{let e=!1;return d.isValid&&(e=n.resolver?vg((await x()).errors):await S(i,!0),e!==r.isValid&&(r.isValid=e,h.state.next({isValid:e}))),e},v=(e,t,n,r)=>{const l=tg(i,e);if(l){const i=tg(s,e,eg(n)?tg(o,e):n);eg(i)||r&&r.defaultChecked||t?Mg(s,e,t?i:sv(l._f)):C(e,i),a.mount&&g()}},y=(e,t,n,i,s)=>{let a=!1,l=!1;const c={name:e};if(d.isDirty&&(l=r.isDirty,r.isDirty=c.isDirty=w(),a=l!==c.isDirty),d.dirtyFields&&(!n||i)){l=tg(r.dirtyFields,e);const n=Zg(tg(o,e),t);n?Jg(r.dirtyFields,e):Mg(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,a=a||l!==!n}if(n){const t=tg(r.touchedFields,e);t||(Mg(r.touchedFields,e,n),c.touchedFields=r.touchedFields,a=a||d.touchedFields&&t!==n)}return a&&s&&h.state.next(c),a?c:{}},b=(n,i,o,s)=>{const a=tg(r.errors,n),l=d.isValid&&kg(i)&&r.isValid!==i;var p;if(e.delayError&&o?(p=()=>((e,t)=>{Mg(r.errors,e,t),h.state.next({errors:r.errors})})(n,o),t=e=>{clearTimeout(c),c=window.setTimeout(p,e)},t(e.delayError)):(clearTimeout(c),t=null,o?Mg(r.errors,n,o):Jg(r.errors,n)),(o?!Zg(a,o):a)||!vg(s)||l){const e={...s,...l&&kg(i)?{isValid:i}:{},errors:r.errors,name:n};r={...r,...e},h.state.next(e)}u[n]--,d.isValidating&&!Object.values(u).some((e=>e))&&(h.state.next({isValidating:!1}),u={})},x=async e=>n.resolver?await n.resolver({...s},n.context,((e,t,n,r)=>{const i={};for(const n of e){const e=tg(t,n);e&&Mg(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}})(e||l.mount,i,n.criteriaMode,n.shouldUseNativeValidation)):{},S=async(e,t,i={valid:!0})=>{for(const o in e){const a=e[o];if(a){const{_f:e,...o}=a;if(e){const o=l.array.has(e.name),c=await Wg(a,tg(s,e.name),m,n.shouldUseNativeValidation,o);if(c[e.name]&&(i.valid=!1,t))break;!t&&(tg(c,e.name)?o?Pg(r.errors,c,e.name):Mg(r.errors,e.name,c[e.name]):Jg(r.errors,e.name))}o&&await S(o,t,i)}}return i.valid},w=(e,t)=>(e&&t&&Mg(s,e,t),!Zg(I(),o)),_=(e,t,n)=>wg(e,l,{...a.mount?s:eg(t)?o:Sg(e)?{[e]:t}:t},n),C=(e,t,n={})=>{const r=tg(i,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&Mg(s,e,ov(t,n)),o=_g&&Xg(n.ref)&&Jm(t)?"":t,$g(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?qm(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):Og(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||h.watch.next({name:e})))}(n.shouldDirty||n.shouldTouch)&&y(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&M(e)},A=(e,t,n)=>{for(const r in t){const o=t[r],s=`${e}.${r}`,a=tg(i,s);!l.array.has(e)&&Yg(o)&&(!a||a._f)||Km(o)?C(s,o,n):A(s,o,n)}},E=(e,t,n={})=>{const a=tg(i,e),c=l.array.has(e),u=Cg(t);Mg(s,e,u),c?(h.array.next({name:e,values:s}),(d.isDirty||d.dirtyFields)&&n.shouldDirty&&(r.dirtyFields=iv(o,s),h.state.next({name:e,dirtyFields:r.dirtyFields,isDirty:w(e,u)}))):!a||a._f||Jm(u)?C(e,u,n):A(e,u,n),Rg(e,l)&&h.state.next({}),h.watch.next({name:e})},T=async e=>{const o=e.target;let a=o.name;const c=tg(i,a);if(c){let S,w;const _=o.type?sv(c._f):Zm(e),C=e.type===ng||e.type===rg,A=!((v=c._f).mount&&(v.required||v.min||v.max||v.maxLength||v.minLength||v.pattern||v.validate)||n.resolver||tg(r.errors,a)||c._f.deps)||((e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e))(C,tg(r.touchedFields,a),r.isSubmitted,f,p),E=Rg(a,l,C);Mg(s,a,_),C?(c._f.onBlur&&c._f.onBlur(e),t&&t(0)):c._f.onChange&&c._f.onChange(e);const T=y(a,_,C,!1),I=!vg(T)||E;if(!C&&h.watch.next({name:a,type:e.type}),A)return d.isValid&&g(),I&&h.state.next({name:a,...E?{}:T});if(!C&&E&&h.state.next({}),u[a]=u[a]?u[a]+1:1,h.state.next({isValidating:!0}),n.resolver){const{errors:e}=await x([a]),t=lv(r.errors,i,a),n=lv(e,i,t.name||a);S=n.error,a=n.name,w=vg(e)}else S=(await Wg(c,tg(s,a),m,n.shouldUseNativeValidation))[a],g();c._f.deps&&M(c._f.deps),b(a,w,S,T)}var v},M=async(e,t={})=>{let o,s;const a=bg(e);if(h.state.next({isValidating:!0}),n.resolver){const t=await(async e=>{const{errors:t}=await x();if(e)for(const n of e){const e=tg(t,n);e?Mg(r.errors,n,e):Jg(r.errors,n)}else r.errors=t;return t})(eg(e)?e:a);o=vg(t),s=e?!a.some((e=>tg(t,e))):o}else e?(s=(await Promise.all(a.map((async e=>{const t=tg(i,e);return await S(t&&t._f?{[e]:t}:t)})))).every(Boolean),(s||r.isValid)&&g()):s=o=await S(i);return h.state.next({...!Sg(e)||d.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!s&&Ig(i,(e=>e&&tg(r.errors,e)),e?a:l.mount),s},I=e=>{const t={...o,...a.mount?s:{}};return eg(e)?t:Sg(e)?tg(t,e):e.map((e=>tg(t,e)))},R=(e,t)=>({invalid:!!tg((t||r).errors,e),isDirty:!!tg((t||r).dirtyFields,e),isTouched:!!tg((t||r).touchedFields,e),error:tg((t||r).errors,e)}),P=(e,t={})=>{for(const a of e?bg(e):l.mount)l.mount.delete(a),l.array.delete(a),tg(i,a)&&(t.keepValue||(Jg(i,a),Jg(s,a)),!t.keepError&&Jg(r.errors,a),!t.keepDirty&&Jg(r.dirtyFields,a),!t.keepTouched&&Jg(r.touchedFields,a),!n.shouldUnregister&&!t.keepDefaultValue&&Jg(o,a));h.watch.next({}),h.state.next({...r,...t.keepDirty?{isDirty:w()}:{}}),!t.keepIsValid&&g()},k=(e,t={})=>{let r=tg(i,e);const c=kg(t.disabled);return Mg(i,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),l.mount.add(e),r?c&&Mg(s,e,t.disabled?void 0:tg(s,e,sv(r._f))):v(e,!0,t.value),{...c?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:av(t.min),max:av(t.max),minLength:av(t.minLength),maxLength:av(t.maxLength),pattern:av(t.pattern)}:{},name:e,onChange:T,onBlur:T,ref:s=>{if(s){k(e,t),r=tg(i,e);const n=eg(s.value)&&s.querySelectorAll&&s.querySelectorAll("input,select,textarea")[0]||s,a=(e=>Dg(e)||qm(e))(n),l=r._f.refs||[];if(a?l.find((e=>e===n)):n===r._f.ref)return;Mg(i,e,{_f:{...r._f,...a?{refs:[...l.filter(ev),n,...Array.isArray(tg(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),v(e,!1,void 0,n)}else r=tg(i,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Xm(l.array,e)||!a.action)&&l.unMount.add(e)}}},O=()=>n.shouldFocusError&&Ig(i,(e=>e&&tg(r.errors,e)),l.mount);return{control:{register:k,unregister:P,getFieldState:R,_executeSchema:x,_focusError:O,_getWatch:_,_getDirty:w,_updateValid:g,_removeUnmounted:()=>{for(const e of l.unMount){const t=tg(i,e);t&&(t._f.refs?t._f.refs.every((e=>!ev(e))):!ev(t._f.ref))&&P(e)}l.unMount=new Set},_updateFieldArray:(e,t=[],n,l,c=!0,u=!0)=>{if(l&&n){if(a.action=!0,u&&Array.isArray(tg(i,e))){const t=n(tg(i,e),l.argA,l.argB);c&&Mg(i,e,t)}if(u&&Array.isArray(tg(r.errors,e))){const t=n(tg(r.errors,e),l.argA,l.argB);c&&Mg(r.errors,e,t),((e,t)=>{!$m(tg(e,t)).length&&Jg(e,t)})(r.errors,e)}if(d.touchedFields&&u&&Array.isArray(tg(r.touchedFields,e))){const t=n(tg(r.touchedFields,e),l.argA,l.argB);c&&Mg(r.touchedFields,e,t)}d.dirtyFields&&(r.dirtyFields=iv(o,s)),h.state.next({isDirty:w(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Mg(s,e,t)},_getFieldArray:t=>$m(tg(a.mount?s:o,t,e.shouldUnregister?tg(o,t,[]):[])),_subjects:h,_proxyFormState:d,get _fields(){return i},get _formValues(){return s},get _stateFlags(){return a},set _stateFlags(e){a=e},get _defaultValues(){return o},get _names(){return l},set _names(e){l=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:M,register:k,handleSubmit:(e,t)=>async o=>{o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let a=!0,l=Cg(s);h.state.next({isSubmitting:!0});try{if(n.resolver){const{errors:e,values:t}=await x();r.errors=e,l=t}else await S(i);vg(r.errors)?(h.state.next({errors:{},isSubmitting:!0}),await e(l,o)):(t&&await t({...r.errors},o),O())}catch(e){throw a=!1,e}finally{r.isSubmitted=!0,h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:vg(r.errors)&&a,submitCount:r.submitCount+1,errors:r.errors})}},watch:(e,t)=>Ng(e)?h.watch.subscribe({next:n=>e(_(void 0,t),n)}):_(e,t,!0),setValue:E,getValues:I,reset:(t,n)=>((t,n={})=>{const c=t||o,u=Cg(c),p=t&&!vg(t)?u:o;if(n.keepDefaultValues||(o=c),!n.keepValues){if(n.keepDirtyValues)for(const e of l.mount)tg(r.dirtyFields,e)?Mg(p,e,tg(s,e)):E(e,tg(p,e));else{if(_g&&eg(t))for(const e of l.mount){const t=tg(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Xg(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}s=e.shouldUnregister?n.keepDefaultValues?Cg(o):{}:u,h.array.next({values:p}),h.watch.next({values:p})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!d.isValid||!!n.keepIsValid,a.watch=!!e.shouldUnregister,h.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:n.keepDirty||n.keepDirtyValues?r.isDirty:!(!n.keepDefaultValues||Zg(t,o)),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:n.keepDirty||n.keepDirtyValues?r.dirtyFields:n.keepDefaultValues&&t?iv(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})})(Ng(t)?t(s):t,n),resetField:(e,t={})=>{tg(i,e)&&(eg(t.defaultValue)?E(e,tg(o,e)):(E(e,t.defaultValue),Mg(o,e,t.defaultValue)),t.keepTouched||Jg(r.touchedFields,e),t.keepDirty||(Jg(r.dirtyFields,e),r.isDirty=t.defaultValue?w(e,tg(o,e)):w()),t.keepError||(Jg(r.errors,e),d.isValid&&g()),h.state.next({...r}))},clearErrors:e=>{e?bg(e).forEach((e=>Jg(r.errors,e))):r.errors={},h.state.next({errors:r.errors})},unregister:P,setError:(e,t,n)=>{const o=(tg(i,e,{_f:{}})._f||{}).ref;Mg(r.errors,e,{...t,ref:o}),h.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},setFocus:(e,t={})=>{const n=tg(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:R}}function dv(e={}){const n=t(c).useRef(),[r,i]=t(c).useState({isDirty:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:e.defaultValues});n.current||(n.current={...uv(e),formState:r});const o=n.current.control;return o._options=e,xg({subject:o._subjects.state,callback:t(c).useCallback((e=>{yg(e,o._proxyFormState,!0)&&(o._formState={...o._formState,...e},i({...o._formState}))}),[o])}),t(c).useEffect((()=>{o._stateFlags.mount||(o._proxyFormState.isValid&&o._updateValid(),o._stateFlags.mount=!0),o._stateFlags.watch&&(o._stateFlags.watch=!1,o._subjects.state.next({})),o._removeUnmounted()})),t(c).useEffect((()=>{r.submitCount&&o._focusError()}),[o,r.submitCount]),n.current.formState=gg(r,o),n.current}var hv=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}),(0,s.jsx)("path",{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"})]});var pv=({pwdOrTokens:e,setPwdOrTokens:t,onFinish:n,minimumNumberOfRecoveryTokens:r=1,showTokens:i=!0,openModal:o=!1,withModal:a=!1})=>{var l;const{t:u}=Se(),{register:d,handleSubmit:h,formState:{errors:p},setError:f}=dv(),[m,g]=(0,c.useState)(1),[v,y]=(0,c.useState)(!!e),b=(0,s.jsxs)("form",{name:"memoriAuth",onSubmit:h((t=>{var i,o,s;"password"===e&&!(null===(i=t.password)||void 0===i?void 0:i.length)||"tokens"===e&&(((null===(o=null==t?void 0:t.tokens)||void 0===o?void 0:o.length)||0)<r||!(null===(s=null==t?void 0:t.tokens)||void 0===s?void 0:s.every((e=>e.length))))?f("tokens",{type:"minLength",message:"Tokens"}):n&&n(t).then((()=>{y(!1)}))})),className:"memori-auth-widget--form",children:[("password"===e||!i)&&(0,s.jsxs)("fieldset",{className:"memori-auth-widget--password-fieldset",children:[(0,s.jsxs)("label",{children:["Password:"," ",(0,s.jsx)("input",{className:"memori-auth-widget--input",required:!0,type:"password",placeholder:"Password",...d("password",{required:!0})})]}),i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{}),(0,s.jsx)(Sf,{outlined:!0,onClick:()=>t("tokens"),children:u("auth.useRecoveryTokens")||"Recovery tokens"})]})]}),"tokens"===e&&i&&(0,s.jsxs)("fieldset",{className:"memori-auth-widget--tokens-fieldset",name:"tokens",children:[(0,s.jsxs)("legend",{children:[u("auth.tokens"),": "]}),(x=m,Array.from({length:x},((e,t)=>t))).map((e=>(0,s.jsx)("label",{className:"memori-auth-widget--token",children:(0,s.jsx)("input",{type:"password",className:"memori-auth-widget--input",placeholder:"Recovery token",required:!0,autoComplete:"off",...d(`tokens.${e}`,{required:!0})})},e))),(0,s.jsx)(Sf,{onClick:()=>g((e=>e+1)),className:"memori-auth-widget--token-add",icon:(0,s.jsx)(hv,{}),children:u("auth.addToken")||"Add token"}),(0,s.jsx)("hr",{}),(0,s.jsx)(Sf,{outlined:!0,onClick:()=>t("password"),children:u("auth.usePassword")||"Password"})]}),"minLength"===(null===(l=p.tokens)||void 0===l?void 0:l.type)&&(0,s.jsxs)("div",{className:"memori-auth-widget--error",children:[u("auth.atLeast")||"At least"," ",r]}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,className:"memori-auth-widget--submit",children:u("confirm")||"Submit"})]});var x;return a?(0,s.jsx)(Wm,{open:o||v,title:u("auth.title")||"Authentication",onClose:()=>t(null),closable:!1,children:b}):b};c=o("85Hg2");const fv=({type:e,resourceURI:t,sessionID:n,baseURL:r="",apiURL:i=""})=>{let o="cover"===e?`${r}/images/memoriCover.png`:`${r}/images/memoriAvatar.png?v=20231208`;try{return t&&0!==t.length?t.includes("memoriai/memory")&&!t.includes("memori-ai-session-id")&&n?`${t}?memori-ai-session-id=${n}`:(t.startsWith("https://")||t.startsWith("http://"))&&(new URL(t).hostname.includes("memori.ai")||new URL(t).hostname.includes("aclambda.online")||new URL(t).hostname.includes("localhost"))?`${t}${t.endsWith("/")||!n?"":"/"}${n||""}`:t.startsWith("cloud://")?`${(null==i?void 0:i.replace(/v2/,"v1"))||""}/CloudAsset/${t.replace("cloud://","")}`:t.startsWith("guid://")?`${(null==i?void 0:i.replace(/v2/,"v1"))||""}/GuidAsset/${t.replace("guid://","")}`:t||o:o}catch(e){return t||o}};c=o("85Hg2");var mv=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"})});var gv=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:e,"aria-label":t,children:(0,s.jsxs)("g",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",children:[(0,s.jsx)("path",{fillRule:"evenodd",d:"M0 4a4 4 0 014-4h16a4 4 0 014 4v16a4 4 0 01-4 4H4a4 4 0 01-4-4zm4-2.4A2.4 2.4 0 001.6 4v16A2.4 2.4 0 004 22.4h16a2.4 2.4 0 002.4-2.4V4A2.4 2.4 0 0020 1.6z",clipRule:"evenodd"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M9.715 8.442a.798.798 0 00-1.43 0l-3.2 6.4a.799.799 0 101.431.716l.579-1.158h3.811l.578 1.158a.8.8 0 001.431-.716zm.391 4.358L9 10.589 7.894 12.8z",clipRule:"evenodd"}),(0,s.jsx)("path",{fillRule:"evenodd",d:"M17 8c.552 0 1 .358 1 .8v6.4c0 .442-.448.8-1 .8s-1-.358-1-.8V8.8c0-.442.448-.8 1-.8z",clipRule:"evenodd"})]})});var vv=({content:e,className:n,align:r="right",disabled:i=!1,visible:o=!1,children:a})=>(0,s.jsxs)("div",{className:t(ws)("memori-tooltip",`memori-tooltip--align-${r}`,n,{"memori-tooltip--disabled":i,"memori-tooltip--visible":o}),children:[(0,s.jsx)("div",{className:"memori-tooltip--content",children:e}),(0,s.jsx)("div",{className:"memori-tooltip--trigger",children:a})]}),yv=(c=o("85Hg2"),c=o("85Hg2"),(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(yv||{})),bv=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(bv||{}),xv=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(xv||{});function Sv(e,t=(e=>e)){let n=null!==e.activeItemIndex?e.items[e.activeItemIndex]:null,r=Cp(t(e.items.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{items:r,activeItemIndex:i}}let wv={1:e=>1===e.menuState?e:{...e,activeItemIndex:null,menuState:1},0:e=>0===e.menuState?e:{...e,menuState:0},2:(e,t)=>{var n;let r=Sv(e),i=pm(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},3:(e,t)=>{let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeItemIndex?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find((e=>{var t;return(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))&&!e.dataRef.current.disabled})),o=i?e.items.indexOf(i):-1;return-1===o||o===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4:e=>""===e.searchQuery?e:{...e,searchQuery:"",searchActiveItemIndex:null},5:(e,t)=>{let n=Sv(e,(e=>[...e,{id:t.id,dataRef:t.dataRef}]));return{...e,...n}},6:(e,t)=>{let n=Sv(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},_v=(0,c.createContext)(null);function Cv(e){let t=(0,c.useContext)(_v);if(null===t){let t=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Cv),t}return t}function Av(e,t){return lh(t.type,wv,e,t)}_v.displayName="MenuContext";let Ev=c.Fragment,Tv=mh((function(e,n){let r=(0,c.useReducer)(Av,{menuState:1,buttonRef:(0,c.createRef)(),itemsRef:(0,c.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:o,buttonRef:s},a]=r,l=Ph(n);rf([s,o],((e,t)=>{var n;a({type:1}),xp(t,bp.Loose)||(e.preventDefault(),null==(n=s.current)||n.focus())}),0===i);let u=Mh((()=>{a({type:1})})),d=(0,c.useMemo)((()=>({open:0===i,close:u})),[i,u]),h=e,p={ref:l};return t(c).createElement(_v.Provider,{value:r},t(c).createElement(Sh,{value:lh(i,{0:bh.Open,1:bh.Closed})},hh({ourProps:p,theirProps:h,slot:d,defaultTag:Ev,name:"Menu"})))})),Mv=mh((function(e,t){var n;let[r,i]=Cv("Menu.Button"),o=Ph(r.buttonRef,t),s=`headlessui-menu-button-${cp()}`,a=Uh(),l=Mh((e=>{switch(e.key){case ip.Space:case ip.Enter:case ip.ArrowDown:e.preventDefault(),e.stopPropagation(),i({type:0}),a.nextFrame((()=>i({type:2,focus:hm.First})));break;case ip.ArrowUp:e.preventDefault(),e.stopPropagation(),i({type:0}),a.nextFrame((()=>i({type:2,focus:hm.Last})))}})),u=Mh((e=>{if(e.key===ip.Space)e.preventDefault()})),d=Mh((t=>{if(op(t.currentTarget))return t.preventDefault();e.disabled||(0===r.menuState?(i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),i({type:0})))})),h=(0,c.useMemo)((()=>({open:0===r.menuState})),[r]),p=e;return hh({ourProps:{ref:o,id:s,type:um(e,r.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=r.itemsRef.current)?void 0:n.id,"aria-expanded":e.disabled?void 0:0===r.menuState,onKeyDown:l,onKeyUp:u,onClick:d},theirProps:p,slot:h,defaultTag:"button",name:"Menu.Button"})})),Iv=uh.RenderStrategy|uh.Static,Rv=mh((function(e,t){var n,r;let[i,o]=Cv("Menu.Items"),s=Ph(i.itemsRef,t),a=Rp(i.itemsRef),l=`headlessui-menu-items-${cp()}`,u=Uh(),d=xh(),h=null!==d?d===bh.Open:0===i.menuState;(0,c.useEffect)((()=>{let e=i.itemsRef.current;!e||0===i.menuState&&e!==(null==a?void 0:a.activeElement)&&e.focus({preventScroll:!0})}),[i.menuState,i.itemsRef,a]),dm({container:i.itemsRef.current,enabled:0===i.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let p=Mh((e=>{var t,n;switch(u.dispose(),e.key){case ip.Space:if(""!==i.searchQuery)return e.preventDefault(),e.stopPropagation(),o({type:3,value:e.key});case ip.Enter:if(e.preventDefault(),e.stopPropagation(),o({type:1}),null!==i.activeItemIndex){let{dataRef:e}=i.items[i.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}Sp(i.buttonRef.current);break;case ip.ArrowDown:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:hm.Next});case ip.ArrowUp:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:hm.Previous});case ip.Home:case ip.PageUp:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:hm.First});case ip.End:case ip.PageDown:return e.preventDefault(),e.stopPropagation(),o({type:2,focus:hm.Last});case ip.Escape:e.preventDefault(),e.stopPropagation(),o({type:1}),Nh().nextFrame((()=>{var e;return null==(e=i.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case ip.Tab:e.preventDefault(),e.stopPropagation(),o({type:1}),Nh().nextFrame((()=>{Ap(i.buttonRef.current,e.shiftKey?mp.Previous:mp.Next)}));break;default:1===e.key.length&&(o({type:3,value:e.key}),u.setTimeout((()=>o({type:4})),350))}})),f=Mh((e=>{if(e.key===ip.Space)e.preventDefault()})),m=(0,c.useMemo)((()=>({open:0===i.menuState})),[i]),g=e;return hh({ourProps:{"aria-activedescendant":null===i.activeItemIndex||null==(n=i.items[i.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=i.buttonRef.current)?void 0:r.id,id:l,onKeyDown:p,onKeyUp:f,role:"menu",tabIndex:0,ref:s},theirProps:g,slot:m,defaultTag:"div",features:Iv,visible:h,name:"Menu.Items"})})),Pv=c.Fragment,kv=mh((function(e,t){let{disabled:n=!1,...r}=e,[i,o]=Cv("Menu.Item"),s=`headlessui-menu-item-${cp()}`,a=null!==i.activeItemIndex&&i.items[i.activeItemIndex].id===s,l=(0,c.useRef)(null),u=Ph(t,l);_h((()=>{if(0!==i.menuState||!a||0===i.activationTrigger)return;let e=Nh();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=l.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[l,a,i.menuState,i.activationTrigger,i.activeItemIndex]);let d=(0,c.useRef)({disabled:n,domRef:l});_h((()=>{d.current.disabled=n}),[d,n]),_h((()=>{var e,t;d.current.textValue=null==(t=null==(e=l.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[d,l]),_h((()=>(o({type:5,id:s,dataRef:d}),()=>o({type:6,id:s}))),[d,s]);let h=Mh((()=>{o({type:1})})),p=Mh((e=>{if(n)return e.preventDefault();o({type:1}),Sp(i.buttonRef.current)})),f=Mh((()=>{if(n)return o({type:2,focus:hm.Nothing});o({type:2,focus:hm.Specific,id:s})})),m=Mh((()=>{n||a||o({type:2,focus:hm.Specific,id:s,trigger:0})})),g=Mh((()=>{n||!a||o({type:2,focus:hm.Nothing})})),v=(0,c.useMemo)((()=>({active:a,disabled:n,close:h})),[a,n,h]);return hh({ourProps:{id:s,ref:u,role:"menuitem",tabIndex:!0===n?void 0:-1,"aria-disabled":!0===n||void 0,disabled:void 0,onClick:p,onFocus:f,onPointerMove:m,onMouseMove:m,onPointerLeave:g,onMouseLeave:g},theirProps:r,slot:v,defaultTag:Pv,name:"Menu.Item"})})),Ov=Object.assign(Tv,{Button:Mv,Items:Rv,Item:kv});var Nv=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:e,"aria-label":t,children:[(0,s.jsx)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9-4h2v2h-2zm0-6h2v4h-2z"})]});const Lv={"it-IT":"Non è quello che ti ho chiesto","fr-FR":"Ce n'est pas ce que je t'ai demandé","en-GB":"It's not what I asked"},Dv={"it-IT":"La risposta non era corretta","fr-FR":"La réponse n'était pas correcte","en-GB":"The answer was not correct"},Bv={"it-IT":"Non mi è piaciuta la risposta","fr-FR":"Je n'ai pas aimé la réponse","en-GB":"I didn't like the answer"};var zv=({memori:e,className:n,onNegativeClick:r,toggle:i=!1,dropdown:o=!1})=>{const[a,l]=(0,c.useState)(),u="it-IT"===e.culture?"it-IT":"fr-FR"===e.culture?"fr-FR":"en-GB",d=Lv[u],h=Dv[u],p=Bv[u];return(0,s.jsx)("div",{className:"memori-chat--feedback"+(n?` ${n}`:""),children:o?(0,s.jsxs)(Ov,{as:"div",className:"memori-chat--feedback-menu",children:[(0,s.jsx)(Ov.Button,{as:t(c).Fragment,children:(0,s.jsx)(Sf,{ghost:!0,shape:"circle",title:"Feedback",className:"memori-chat--feedback-menu-button",disabled:!!a,icon:(0,s.jsx)(Nv,{className:a?"memori-chat--feedback-clicked":void 0})})}),(0,s.jsx)(np,{as:t(c).Fragment,enter:"transition ease-out duration-200",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,s.jsx)(Ov.Items,{className:"memori-chat--feedback-menu-items",children:(0,s.jsxs)("div",{className:"memori-chat--feedback-menu-items-container",children:[(0,s.jsx)(Ov.Item,{children:({active:e})=>(0,s.jsx)("button",{className:"memori-chat--feedback-menu-item"+(e?" memori-chat--feedback-menu-item-active":""),onClick:()=>{l("up"===a&&i?void 0:"up")},children:p})},"ok"),(0,s.jsx)(Ov.Item,{children:({active:e})=>(0,s.jsx)("button",{className:"memori-chat--feedback-menu-item"+(e?" memori-chat--feedback-menu-item-active":""),onClick:()=>{l("down"===a&&i?void 0:"down"),r(d)},children:h})},"no")]})})})]}):(0,s.jsx)(vv,{align:"left",content:"Feedback",children:(0,s.jsx)(Sf,{title:"Feedback",onClick:()=>{l("down"===a&&i?void 0:"down"),r(d)},ghost:!0,shape:"circle",icon:(0,s.jsx)(Nv,{className:a?"memori-chat--feedback-clicked":void 0})})})})},Fv={};!function(e){"use strict";function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function n(t){e.defaults=t}e.defaults=t();const r=/[&<>"']/,i=new RegExp(r.source,"g"),o=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,s=new RegExp(o.source,"g"),a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},l=e=>a[e];function c(e,t){if(t){if(r.test(e))return e.replace(i,l)}else if(o.test(e))return e.replace(s,l);return e}const u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const h=/(^|[^\[])\^/g;function p(e,t){let n="string"==typeof e?e:e.source;t=t||"";const r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(h,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}function f(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch(e){return null}return e}const m={exec:()=>null};function g(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function v(e,t,n){const r=e.length;if(0===r)return"";let i=0;for(;i<r;){const o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.slice(0,r-i)}function y(e,t){if(-1===e.indexOf(t[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 b(e,t,n,r){const i=t.href,o=t.title?c(t.title):null,s=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:o,text:c(s)}}function x(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}class S{options;rules;lexer;constructor(t){this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:v(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=x(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=v(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=v(t[0].replace(/^ *>[ \t]?/gm,""),"\n"),n=this.lexer.state.top;this.lexer.state.top=!0;const r=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:r,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=new RegExp(`^( {0,3}${n})((?:[\t ][^\\n]*)?(?:\\n|$))`);let s="",a="",l=!1;for(;e;){let n=!1;if(!(t=o.exec(e)))break;if(this.rules.block.hr.test(e))break;s=t[0],e=e.substring(s.length);let r=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),c=e.split("\n",1)[0],u=0;this.options.pedantic?(u=2,a=r.trimStart()):(u=t[2].search(/[^ ]/),u=u>4?1:u,a=r.slice(u),u+=t[1].length);let d=!1;if(!r&&/^ *$/.test(c)&&(s+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;e;){const l=e.split("\n",1)[0];if(c=l,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),i.test(c))break;if(o.test(c))break;if(t.test(c))break;if(n.test(e))break;if(c.search(/[^ ]/)>=u||!c.trim())a+="\n"+c.slice(u);else{if(d)break;if(r.search(/[^ ]/)>=4)break;if(i.test(r))break;if(o.test(r))break;if(n.test(r))break;a+="\n"+c}d||c.trim()||(d=!0),s+=l+"\n",e=e.substring(l.length+1),r=c.slice(u)}}i.loose||(l?i.loose=!0:/\n *\n *$/.test(s)&&(l=!0));let h,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(a),p&&(h="[ ] "!==p[0],a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!p,checked:h,loose:!1,text:a,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){const t=i.items[e].tokens.filter((e=>"space"===e.type)),n=t.length>0&&t.some((e=>/\n.*\n/.test(e.raw)));i.loose=n}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const n=g(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),i=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const e of r)/^ *-+: *$/.test(e)?o.align.push("right"):/^ *:-+: *$/.test(e)?o.align.push("center"):/^ *:-+ *$/.test(e)?o.align.push("left"):o.align.push(null);for(const e of n)o.header.push({text:e,tokens:this.lexer.inline(e)});for(const e of i)o.rows.push(g(e,o.header.length).map((e=>({text:e,tokens:this.lexer.inline(e)}))));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:c(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=v(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=y(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),b(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return b(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(r&&(!r[3]||!n.match(/[\p{L}\p{N}]/u))&&(!r[1]&&!r[2]||!n||this.rules.inline.punctuation.exec(n))){const n=[...r[0]].length-1;let i,o,s=n,a=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(o=[...i].length,r[3]||r[4]){s+=o;continue}if((r[5]||r[6])&&n%3&&!((n+o)%3)){a+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+a);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+o);if(Math.min(n,o)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=c(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=c(t[1]),n="mailto:"+e):(e=c(t[1]),n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])e=c(t[0]),n="mailto:"+e;else{let r;do{r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(r!==t[0]);e=c(t[0]),n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:c(t[0]),{type:"text",raw:t[0],text:e}}}}const w=/^(?: *(?:\n|$))+/,_=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,C=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,A=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,E=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,T=/(?:[*+-]|\d{1,9}[.)])/,M=p(/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,T).getRegex(),I=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,R=/^[^\n]+/,P=/(?!\s*\])(?:\\.|[^\[\]\\])+/,k=p(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",P).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),O=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,T).getRegex(),N="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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",L=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,D=p("^ {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",L).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B=p(I).replace("hr",A).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",N).getRegex(),z={blockquote:p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",B).getRegex(),code:_,def:k,fences:C,heading:E,hr:A,html:D,lheading:M,list:O,newline:w,paragraph:B,table:m,text:R},F=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\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",N).getRegex(),U={...z,table:F,paragraph:p(I).replace("hr",A).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",F).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",N).getRegex()},j={...z,html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",L).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:m,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(I).replace("hr",A).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},H=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,V=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,G=/^( {2,}|\\)\n(?!\s*$)/,W=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,q="\\p{P}$+<=>`^|~",K=p(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,q).getRegex(),J=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,Q=p(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,q).getRegex(),Y=p("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,q).getRegex(),Z=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,q).getRegex(),X=p(/\\([punct])/,"gu").replace(/punct/g,q).getRegex(),$=p(/^<(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(),ee=p(L).replace("(?:--\x3e|$)","--\x3e").getRegex(),te=p("^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",ee).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ne=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,re=p(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ne).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ie=p(/^!?\[(label)\]\[(ref)\]/).replace("label",ne).replace("ref",P).getRegex(),oe=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",P).getRegex(),se=p("reflink|nolink(?!\\()","g").replace("reflink",ie).replace("nolink",oe).getRegex(),ae={_backpedal:m,anyPunctuation:X,autolink:$,blockSkip:J,br:G,code:V,del:m,emStrongLDelim:Q,emStrongRDelimAst:Y,emStrongRDelimUnd:Z,escape:H,link:re,nolink:oe,punctuation:K,reflink:ie,reflinkSearch:se,tag:te,text:W,url:m},le={...ae,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",ne).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ne).getRegex()},ce={...ae,escape:p(H).replace("])","~|])").getRegex(),url:p(/^((?: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\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.!#$%&'*+\/=?_`{\|}~-]+@)))/},ue={...ce,br:p(G).replace("{2,}","*").getRegex(),text:p(ce.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},de={normal:z,gfm:U,pedantic:j},he={normal:ae,gfm:ce,breaks:ue,pedantic:le};class pe{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new S,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:de.normal,inline:he.normal};this.options.pedantic?(n.block=de.pedantic,n.inline=he.pedantic):this.options.gfm&&(n.block=de.gfm,this.options.breaks?n.inline=he.breaks:n.inline=he.gfm),this.tokenizer.rules=n}static get rules(){return{block:de,inline:he}}static lex(e,t){return new pe(t).lex(e)}static lexInline(e,t){return new pe(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,r,i,o;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))r=t[t.length-1],o&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),o=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r,i,o,s,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(s||(a=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,a))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),s=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class fe{options;constructor(t){this.options=t||e.defaults}code(e,t,n){const r=(t||"").match(/^\S*/)?.[0];return e=e.replace(/\n$/,"")+"\n",r?'<pre><code class="language-'+c(r)+'">'+(n?e:c(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:c(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e,t){return e}heading(e,t,n){return`<h${t}>${e}</h${t}>\n`}hr(){return"<hr>\n"}list(e,t,n){const r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+r+">\n"}listitem(e,t,n){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){const r=f(e);if(null===r)return n;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>",i}image(e,t,n){const r=f(e);if(null===r)return n;let i=`<img src="${e=r}" alt="${n}"`;return t&&(i+=` title="${t}"`),i+=">",i}text(e){return e}}class me{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ge{options;renderer;textRenderer;constructor(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new fe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new me}static parse(e,t){return new ge(t).parse(e)}static parseInline(e,t){return new ge(t).parseInline(e)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){const i=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){n+=t||"";continue}}switch(i.type){case"space":continue;case"hr":n+=this.renderer.hr();continue;case"heading":{const e=i;n+=this.renderer.heading(this.parseInline(e.tokens),e.depth,d(this.parseInline(e.tokens,this.textRenderer)));continue}case"code":{const e=i;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=i;let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.renderer.tablecell(this.parseInline(e.header[t].tokens),{header:!0,align:e.align[t]});t+=this.renderer.tablerow(r);let o="";for(let t=0;t<e.rows.length;t++){const n=e.rows[t];r="";for(let t=0;t<n.length;t++)r+=this.renderer.tablecell(this.parseInline(n[t].tokens),{header:!1,align:e.align[t]});o+=this.renderer.tablerow(r)}n+=this.renderer.table(t,o);continue}case"blockquote":{const e=i,t=this.parse(e.tokens);n+=this.renderer.blockquote(t);continue}case"list":{const e=i,t=e.ordered,r=e.start,o=e.loose;let s="";for(let t=0;t<e.items.length;t++){const n=e.items[t],r=n.checked,i=n.task;let a="";if(n.task){const e=this.renderer.checkbox(!!r);o?n.tokens.length>0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):a+=e+" "}a+=this.parse(n.tokens,o),s+=this.renderer.listitem(a,i,!!r)}n+=this.renderer.list(s,t,r);continue}case"html":{const e=i;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let o=i,s=o.tokens?this.parseInline(o.tokens):o.text;for(;r+1<e.length&&"text"===e[r+1].type;)o=e[++r],s+="\n"+(o.tokens?this.parseInline(o.tokens):o.text);n+=t?this.renderer.paragraph(s):s;continue}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}parseInline(e,t){t=t||this.renderer;let n="";for(let r=0;r<e.length;r++){const i=e[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=e||"";continue}}switch(i.type){case"escape":{const e=i;n+=t.text(e.text);break}case"html":{const e=i;n+=t.html(e.text);break}case"link":{const e=i;n+=t.link(e.href,e.title,this.parseInline(e.tokens,t));break}case"image":{const e=i;n+=t.image(e.href,e.title,e.text);break}case"strong":{const e=i;n+=t.strong(this.parseInline(e.tokens,t));break}case"em":{const e=i;n+=t.em(this.parseInline(e.tokens,t));break}case"codespan":{const e=i;n+=t.codespan(e.text);break}case"br":n+=t.br();break;case"del":{const e=i;n+=t.del(this.parseInline(e.tokens,t));break}case"text":{const e=i;n+=t.text(e.text);break}default:{const e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return n}}class ve{options;constructor(t){this.options=t||e.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class ye{defaults=t();options=this.setOptions;parse=this.#e(pe.lex,ge.parse);parseInline=this.#e(pe.lexInline,ge.parseInline);Parser=ge;Renderer=fe;TextRenderer=me;Lexer=pe;Tokenizer=S;Hooks=ve;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":{const e=r;for(const r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(const r of e.rows)for(const e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{const e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach((r=>{n=n.concat(this.walkTokens(e[r],t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new fe(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if("options"===n)continue;const r=n,i=e.renderer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new S(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,i=e.tokenizer[r],o=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new ve;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if("options"===n)continue;const r=n,i=e.hooks[r],o=t[r];ve.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(i.call(t,e)).then((e=>o.call(t,e)));const n=i.call(t,e);return o.call(t,n)}:t[r]=(...e)=>{let n=i.apply(t,e);return!1===n&&(n=o.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return pe.lex(e,t??this.defaults)}parser(e,t){return ge.parse(e,t??this.defaults)}#e(e,t){return(n,r)=>{const i={...r},o={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const s=this.#t(!!o.silent,!!o.async);if(null==n)return s(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then((t=>e(t,o))).then((e=>o.hooks?o.hooks.processAllTokens(e):e)).then((e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then((()=>e)):e)).then((e=>t(e,o))).then((e=>o.hooks?o.hooks.postprocess(e):e)).catch(s);try{o.hooks&&(n=o.hooks.preprocess(n));let r=e(n,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=t(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(e){return s(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+c(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}}const be=new ye;function xe(e,t){return be.parse(e,t)}xe.options=xe.setOptions=function(e){return be.setOptions(e),xe.defaults=be.defaults,n(xe.defaults),xe},xe.getDefaults=t,xe.defaults=e.defaults,xe.use=function(...e){return be.use(...e),xe.defaults=be.defaults,n(xe.defaults),xe},xe.walkTokens=function(e,t){return be.walkTokens(e,t)},xe.parseInline=be.parseInline,xe.Parser=ge,xe.parser=ge.parse,xe.Renderer=fe,xe.TextRenderer=me,xe.Lexer=pe,xe.lexer=pe.lex,xe.Tokenizer=S,xe.Hooks=ve,xe.parse=xe;const Se=xe.options,we=xe.setOptions,_e=xe.use,Ce=xe.walkTokens,Ae=xe.parseInline,Ee=xe,Te=ge.parse,Me=pe.lex;e.Hooks=ve,e.Lexer=pe,e.Marked=ye,e.Parser=ge,e.Renderer=fe,e.TextRenderer=me,e.Tokenizer=S,e.getDefaults=t,e.lexer=Me,e.marked=xe,e.options=Se,e.parse=Ee,e.parseInline=Ae,e.parser=Te,e.setOptions=we,e.use=_e,e.walkTokens=Ce}(Fv);var Uv={};
239
- /*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */Uv=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),s||(s=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=S(Array.prototype.forEach),d=S(Array.prototype.pop),h=S(Array.prototype.push),p=S(String.prototype.toLowerCase),f=S(String.prototype.toString),m=S(String.prototype.match),g=S(String.prototype.replace),v=S(String.prototype.indexOf),y=S(String.prototype.trim),b=S(RegExp.prototype.test),x=w(TypeError);function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return l(e,t,r)}}function w(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return c(e,n)}}function _(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let o=r.length;for(;o--;){let t=r[o];if("string"==typeof t){const e=i(t);e!==t&&(n(r)||(r[o]=e),t=e)}e[t]=!0}return e}function C(t){const n=a(null);for(const[r,o]of e(t))void 0!==i(t,r)&&(n[r]=o);return n}function A(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}function n(e){return console.warn("fallback value for",e),null}return n}const E=o(["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"]),T=o(["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"]),M=o(["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"]),I=o(["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"]),R=o(["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"]),P=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=o(["#text"]),O=o(["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","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","xmlns","slot"]),N=o(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),L=o(["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"]),D=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=s(/<%[\w\W]*|[\w\W]*%>/gm),F=s(/\${[\w\W]*}/gm),U=s(/^data-[\-\w.\u00B7-\uFFFF]/),j=s(/^aria-[\-\w]+$/),H=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=s(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:B,ERB_EXPR:z,TMPLIT_EXPR:F,DATA_ATTR:U,ARIA_ATTR:j,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:G,DOCTYPE_NAME:W});const K=function(){return"undefined"==typeof window?null:window},J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Q(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const n=e=>Q(e);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const i=r,s=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:S,Element:w,NodeFilter:B,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:F,DOMParser:U,trustedTypes:j}=t,V=w.prototype,G=A(V,"cloneNode"),Y=A(V,"nextSibling"),Z=A(V,"childNodes"),X=A(V,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let $,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:ie}=r,{importNode:oe}=i;let se={};n.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:pe}=q;let{IS_ALLOWED_URI:fe}=q,me=null;const ge=_({},[...E,...T,...M,...R,...k]);let ve=null;const ye=_({},[...O,...N,...L,...D]);let be=Object.seal(a(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}})),xe=null,Se=null,we=!0,_e=!0,Ce=!1,Ae=!0,Ee=!1,Te=!1,Me=!1,Ie=!1,Re=!1,Pe=!1,ke=!1,Oe=!0,Ne=!1;const Le="user-content-";let De=!0,Be=!1,ze={},Fe=null;const Ue=_({},["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"]);let je=null;const He=_({},["audio","video","img","source","image","track"]);let Ve=null;const Ge=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Je=Ke,Qe=!1,Ye=null;const Ze=_({},[We,qe,Ke],f);let Xe=null;const $e=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),Xe=Xe=-1===$e.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Xe?f:p,me="ALLOWED_TAGS"in e?_({},e.ALLOWED_TAGS,tt):ge,ve="ALLOWED_ATTR"in e?_({},e.ALLOWED_ATTR,tt):ye,Ye="ALLOWED_NAMESPACES"in e?_({},e.ALLOWED_NAMESPACES,f):Ze,Ve="ADD_URI_SAFE_ATTR"in e?_(C(Ge),e.ADD_URI_SAFE_ATTR,tt):Ge,je="ADD_DATA_URI_TAGS"in e?_(C(He),e.ADD_DATA_URI_TAGS,tt):He,Fe="FORBID_CONTENTS"in e?_({},e.FORBID_CONTENTS,tt):Ue,xe="FORBID_TAGS"in e?_({},e.FORBID_TAGS,tt):{},Se="FORBID_ATTR"in e?_({},e.FORBID_ATTR,tt):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,_e=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,ke=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ne=e.SANITIZE_NAMED_PROPS||!1,De=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||H,Je=e.NAMESPACE||Ke,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(_e=!1),Pe&&(Re=!0),ze&&(me=_({},[...k]),ve=[],!0===ze.html&&(_(me,E),_(ve,O)),!0===ze.svg&&(_(me,T),_(ve,N),_(ve,D)),!0===ze.svgFilters&&(_(me,M),_(ve,N),_(ve,D)),!0===ze.mathMl&&(_(me,R),_(ve,L),_(ve,D))),e.ADD_TAGS&&(me===ge&&(me=C(me)),_(me,e.ADD_TAGS,tt)),e.ADD_ATTR&&(ve===ye&&(ve=C(ve)),_(ve,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&_(Ve,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Fe===Ue&&(Fe=C(Fe)),_(Fe,e.FORBID_CONTENTS,tt)),De&&(me["#text"]=!0),Te&&_(me,["html","head","body"]),me.table&&(_(me,["tbody"]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=e.TRUSTED_TYPES_POLICY,ee=$.createHTML("")}else void 0===$&&($=J(j,s)),null!==$&&"string"==typeof ee&&(ee=$.createHTML(""));o&&o(e),nt=e}},st=_({},["mi","mo","mn","ms","mtext"]),at=_({},["foreignobject","desc","title","annotation-xml"]),lt=_({},["title","style","font","a","script"]),ct=_({},T);_(ct,M),_(ct,I);const ut=_({},R);_(ut,P);const dt=function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=p(e.tagName),r=p(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||st[r]):Boolean(ct[n]):e.namespaceURI===We?t.namespaceURI===Ke?"math"===n:t.namespaceURI===qe?"math"===n&&at[r]:Boolean(ut[n]):e.namespaceURI===Ke?!(t.namespaceURI===qe&&!at[r])&&!(t.namespaceURI===We&&!st[r])&&!ut[n]&&(lt[n]||!ct[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))},ht=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ve[e])if(Re||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Je===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=$?$.createHTML(e):e;if(Je===Ke)try{t=(new U).parseFromString(i,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Qe?ee:i}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Je===Ke?ie.call(t,Te?"html":"body")[0]:Te?t.documentElement:o},mt=function(e){return ne.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT,null)},gt=function(e){return e instanceof F&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},vt=function(e){return"function"==typeof S&&e instanceof S},yt=function(e,t,r){se[e]&&u(se[e],(e=>{e.call(n,t,r,nt)}))},bt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return ht(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:me}),e.hasChildNodes()&&!vt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return ht(e),!0;if(!me[r]||xe[r]){if(!xe[r]&&St(r)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(r))return!1}if(De&&!Fe[r]){const t=X(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),Y(e))}return ht(e),!0}return e instanceof w&&!dt(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([ae,le,ce],(e=>{t=g(t,e," ")})),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(ht(e),!0)},xt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(_e&&!Se[t]&&b(ue,t));else if(we&&b(de,t));else if(!ve[t]||Se[t]){if(!(St(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(Ve[t]);else if(b(fe,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!je[e])if(Ce&&!b(he,g(n,pe,"")));else if(n)return!1;return!0},St=function(e){return e.indexOf("-")>0},wt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve};let i=t.length;for(;i--;){const o=t[i],{name:s,namespaceURI:a,value:l}=o,c=tt(s);let h="value"===s?l:y(l);if(r.attrName=c,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),h=r.attrValue,r.forceKeepAttr)continue;if(pt(s,e),!r.keepAttr)continue;if(!Ae&&b(/\/>/i,h)){pt(s,e);continue}Ee&&u([ae,le,ce],(e=>{h=g(h,e," ")}));const p=tt(e.nodeName);if(xt(p,c,h)){if(!Ne||"id"!==c&&"name"!==c||(pt(s,e),h=Le+h),$&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(a);else switch(j.getAttributeType(p,c)){case"TrustedHTML":h=$.createHTML(h);break;case"TrustedScriptURL":h=$.createScriptURL(h)}try{a?e.setAttributeNS(a,s,h):e.setAttribute(s,h),d(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},_t=function e(t){let n=null;const r=mt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),bt(n)||(n.content instanceof l&&e(n.content),wt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,a=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!vt(e)){if("function"!=typeof e.toString)throw x("toString is not a function");if("string"!=typeof(e=e.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||ot(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=tt(e.nodeName);if(!me[t]||xe[t])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)r=ft("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!Re&&!Ee&&!Te&&-1===e.indexOf("<"))return $&&ke?$.createHTML(e):e;if(r=ft(e),!r)return Re?null:ke?ee:""}r&&Ie&&ht(r.firstChild);const c=mt(Be?e:r);for(;s=c.nextNode();)bt(s)||(s.content instanceof l&&_t(s.content),wt(s));if(Be)return e;if(Re){if(Pe)for(a=re.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(ve.shadowroot||ve.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let d=Te?r.outerHTML:r.innerHTML;return Te&&me["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&b(W,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Ee&&u([ae,le,ce],(e=>{d=g(d,e," ")})),$&&ke?$.createHTML(d):d},n.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},n.clearConfig=function(){nt=null,Me=!1},n.isValidAttribute=function(e,t,n){nt||ot({});const r=tt(e),i=tt(t);return xt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],h(se[e],t))},n.removeHook=function(e){if(se[e])return d(se[e])},n.removeHooks=function(e){se[e]&&(se[e]=[])},n.removeAllHooks=function(){se={}},n}return Q()}();var jv=({className:e,title:t})=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",className:e,"aria-label":t,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"}),(0,s.jsx)("path",{d:"M12 17L12.01 17"})]});c=o("85Hg2"),c=o("85Hg2");var Hv=({rows:e,className:n,innerClassName:r,btnClassName:i,lineHeightMultiplier:o=1.2,defaultExpanded:a=!1,expandSymbol:l=(()=>"..."),collapseSymbol:u=(e=>"it"===e?"Mostra meno":"Show less"),children:d})=>{const{i18n:h}=Se(),p=h.language,f=u(p),m=l(p),[g,v]=(0,c.useState)(a),[y,b]=(0,c.useState)(!1),[x,S]=(0,c.useState)(16),w=(0,c.useRef)(null);return(0,c.useEffect)((()=>{if(w.current){let t=w.current.getBoundingClientRect().height,n=getComputedStyle(w.current),r=n.lineHeight,i="normal"!==r&&(null==r?void 0:r.length)?parseInt(r,10):o*parseInt(n.fontSize,10);console.table({rows:e,lineHeight:i,height:t,maxHeight:e*i,needsExpanding:t>e*i}),S(i),t&&t>e*i&&b(!0)}}),[e,w.current]),(0,s.jsxs)("div",{className:t(ws)("memori-expandable",n),children:[(0,s.jsx)("div",{ref:w,className:t(ws)("memori-expandable--inner",r),style:{maxHeight:g||!y?"9999px":x*e+"px"},children:d}),y&&!g&&(0,s.jsx)(Sf,{ghost:!0,padded:!1,className:i,onClick:()=>v(!0),children:m}),y&&g&&(0,s.jsx)(Sf,{ghost:!0,padded:!1,className:i,onClick:()=>v(!1),children:f})]})};const Vv=new Map(Object.entries({TENANT_NOT_FOUND:-1,TENANT_REGISTRATION_DISABLED:-2,TENANT_MISSING_NAME:-3,TENANT_MAX_USERS_REACHED:-4,TENANT_MAX_ADMINS_REACHED:-5,TENANT_ALREADY_EXISTS:-6,TENANT_MISSING_DESCRIPTION:-7,TENANT_CANT_SET_COMPLETION_PROVIDER:-8,USER_NOT_CONFIRMED:-11,USER_NOT_FOUND:-12,USER_OR_PASSWORD_INVALID:-13,USER_MUST_CHANGE_PASSWORD:-14,USER_MUST_ENTER_VERIFICATION_CODE:-15,USER_MISSING_TENANT:-21,USER_MISSING_NAME:-22,USER_MISSING_PASSWORD:-23,USER_MISSING_EMAIL:-24,USER_MISSING_VERIFICATION_CODE:-25,USER_NAME_ALREADY_USED:-26,USER_PASSWORD_NOT_CONFORMING_TO_POLICY:-27,USER_EMAIL_ALREADY_USED:-28,USER_EMAIL_INVALID:-29,USER_VERIFICATION_CODE_INVALID:-30,USER_MISSING_NAME_OR_EMAIL:-31,USER_NAME_INVALID:-32,USER_HAS_ONE_OR_MORE_MEMORI:-33,USER_MISSING_NEW_PASSWORD:-34,USER_CANT_CREATE_MEMORI:-35,USER_MAX_MEMORI_REACHED:-36,USER_TOO_MANY_ATTEMPTS:-38,USER_MUST_ACCEPT_TNC_AND_PP:-39,USER_BIRTH_DATE_CANT_BE_CHANGED:-40,USER_CANT_SET_COMPLETION_PROVIDER:-41,USER_CANT_ENABLE_DEEP_THOUGHT:-42,USER_CANT_ENABLE_DCM_INTEGRATION:-43,USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS:-44,USER_CREATION_BILLING_DENIED_PERMISSION:-46,MEMORI_NOT_FOUND:-51,MEMORI_NOT_ACCESSIBLE:-52,MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN:-53,SESSION_NOT_FOUND:-101,SESSION_IS_NOT_ADMINISTRATIVE:-102,SESSION_EXPIRED:-103,MEMORI_MISSING_CONFIGURATION:-201,MEMORI_CONFIGURATION_NOT_FOUND:-202,MEMORI_INVALID_PRIVACY_TYPE:-203,MEMORI_MISSING_PASSWORD:-204,MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS:-205,MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS:-206,MEMORI_INVALID_VOICE_TYPE:-207,MEMORI_MISSING_NAME:-208,MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS:-209,MEMORI_INVALID_ID:-210,MEMORI_NAME_ALREADY_USED:-211,MEMORI_INVALID_PIN:-212,MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION:-213,MEMORI_NO_PASSWORD_WHEN_PUBLIC:-214,MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS:-215,MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS:-216,MEMORI_TRANSFER_MISSING_DESTINATION_USER:-231,MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID:-232,MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT:-233,MEMORI_TRANSFER_NOTHING_TO_DO:-234,MEMORI_CONFIGURATION_CANT_BE_CHANGED:-251,MEMORI_MISSING_NEW_PASSWORD:-252,MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT:-261,MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT:-262,MEMORI_FEATURE_REQUIRES_SUBSCRIPTION:-271,INTEGRATION_NOT_FOUND:-301,INTEGRATION_INVALID_TYPE:-401,INTEGRATION_ALREADY_EXISTS:-402,INTEGRATION_MEMORI_IS_NOT_PUBLIC:-403,INTEGRATION_MISSING_INVOCATION_TEXT:-404,INTEGRATION_MISSING_DEVICE_EMAILS:-405,INTEGRATION_MEMORI_IS_EMPTY:-406,INTEGRATION_MISSING_PRIVACY_POLICY:-407,INTEGRATION_MISSING_CATEGORY:-408,INTEGRATION_MISSING_DESCRIPTION:-409,INTEGRATION_INVALID_INVOCATION_TEXT:-410,INTEGRATION_GOOGLE_NO_MORE_AVAILABLE:-411,UPLOAD_REQUIRES_MULTIPART_ENCODING:-501,UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY:-502,UPLOAD_MAX_LENGTH_EXCEEDED:-503,UPLOAD_FILE_IS_EMPTY:-504,UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE:-505,UPLOAD_MISSING_FILE_NAME:-506,UPLOAD_INVALID_MEMORY_ID:-507,UPLOAD_MISSING_FILE_CONTENT:-508,ASSET_NOT_FOUND:-601,ASSET_NOT_ACCESSIBLE:-602,ASSET_MISSING_SESSION_ID:-603,ASSET_INVALID_FILE_NAME:-604,INVITATION_NOT_FOUND:-701,INVITATION_NOT_ACCESSIBLE:-702,INVITATION_ALREADY_ACCEPTED:-703,INVITATION_ALREADY_REJECTED:-704,INVITATION_MISSING_DESTINATION_EMAIL:-705,INVITATION_DESTINATION_EMAIL_INVALID:-706,INVITATION_MISSING_TAG:-707,INVITATION_MISSING_PIN:-708,INVITATION_INVALID_PIN:-709,INVITATION_INVALID_TYPE:-710,INVITATION_MISSING_DESTINATION_NAME:-711,INVITATION_TAG_PIN_CANT_BE_CHANGED:-712,INVITATION_CANT_BE_CHANGED:-713,ACTIONLOG_INVALID_USER_ID:-801,ACTIONLOG_INVALID_DATE_FROM_FORMAT:-802,ACTIONLOG_INVALID_DATE_TO_FORMAT:-803,ACTIONLOG_INVALID_MEMORI_ID:-804,CONSUMPTIONLOG_INVALID_TYPE:-901,CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT:-902,CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT:-903,CONSUMPTIONLOG_INVALID_USER_ID:-904,CONSUMPTIONLOG_INVALID_MEMORI_ID:-905,NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD:-1001,PROCESS_INVALID_TYPE:-1401,PROCESS_ALREADY_RUNNING:-1401,PROCESS_NOT_FOUND:-1402,IMPORTCSV_MISSING_ROWS:-1501,IMPORTCSV_MISSING_CSV:-1502,IMPORTCSV_MISSING_SEPARATOR:-1503,IMPORTCSV_INVALID_SEPARATOR:-1504,IMPORTCSV_MISSING_HEADERS:-1505,IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR:-1506,IMPORTCSV_INVALID_RECEIVER_ID:-1507,IMPORTCSV_INVALID_MEDIA_LINK:-1508,IMPORTCSV_UNDETECTABLE_CHAR_ENCODING:-1521,IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI:-1531,IMPORTTXT_MISSING_ROWS:-1601,IMPORTTXT_INVALID_GRANULARITY:-1602,IMPORTTXT_INVALID_RECEIVER_ID:-1603,IMPORTTXT_INVALID_MEDIA_LINK:-1604,IMPORTTXT_UNDETECTABLE_CHAR_ENCODING:-1621,IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI:-1631,IMPORTTXT_IMPORT_LIMIT_EXCEEDED:-1632,IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY:-1633,IMPORTTXT_IMPORT_REQUIRES_PAYING:-1634,IMPORTTXT_BILLING_DENIED_PERMISSION:-1635,EXPORTCSV_MISSING_CSV_SPECS:-1801,EXPORTCSV_MISSING_SEPARATOR:-1802,EXPORTCSV_INVALID_SEPARATOR:-1803,EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR:-1804,EXPORTCSV_MISSING_NEW_LINE_CHAR:-1805,EXPORTCSV_INVALID_NEW_LINE_CHAR:-1806,EXPORTCSV_MISSING_PASSWORD:-1811,EXPORTJSONL_MISSING_JSONL_SPECS:-1821,EXPORTJSONL_MISSING_PLATFORM:-1822,EXPORTJSONL_INVALID_PLATFORM:-1823,EXPORTJSONL_MISSING_PASSWORD:-1831,EXPORTJSONL_EXPORT_REQUIRES_PAYING:-1832,ANALYSIS_MISSING_QUERY:-1901,ANALYSIS_CANT_ANALYZE_SECRET_MEMORI:-1902,ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT:-1903,BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS:-2001,BADGE_ASSIGNMENT_MISSING_REF_ID:-2002,BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND:-2003,BADGE_ASSIGNMENT_MISSING_ASSERTION_URL:-2004,BADGE_ASSIGNMENT_MISSING_BADGE_URL:-2005,BADGE_ASSIGNMENT_MISSING_ISSUER_URL:-2006,BADGE_ASSIGNMENT_INVALID_URL:-2007,BADGE_ASSIGNMENT_MISSING_RECIPIENT:-2021,BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE:-2022,BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY:-2023,BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE:-2024,BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE:-2025,BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY:-2026,BADGE_NOT_FOUND:-2051,OUTCOME_NO_DCM_CONFIGURED:-2071,OUTCOME_USER_BADGES_DISABLED:-2072}).map((([e,t])=>[t,e]))),Gv=e=>{if(!e)return"error.generic";if(401===e||403===e)return"error.unauthorized";if(404===e)return"error.notFound";if(422===e)return"error.unprocessableEntity";if(500===e)return"internal server error";let t=Vv.get(e);return t?`errors.${t}`:"error.generic"};var Wv=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"})});const qv=[{value:"IT",label:"Italiano"},{value:"EN",label:"English"},{value:"DE",label:"Deutsch"},{value:"ES",label:"Español"},{value:"FR",label:"Français"},{value:"PT",label:"Português"},{value:"UK",label:"Українська"},{value:"RU",label:"Русский"},{value:"PL",label:"Polski"},{value:"FI",label:"Suomi"},{value:"EL",label:"Ελληνικά"},{value:"AR",label:"العربية"},{value:"ZH",label:"中文"},{value:"JA",label:"日本語"}],Kv="👤",Jv=[{name:"text",lang:"text",mimeType:"text/plain",monacoLang:"plaintext",executable:!0},{name:"javascript/jsx",lang:"jsx",mimeType:"text/javascript",monacoLang:"javascript",executable:!0},{name:"typescript/tsx",lang:"tsx",mimeType:"text/ecmascript",monacoLang:"typescript",executable:!0},{name:"json",lang:"json",mimeType:"application/json",monacoLang:"json",executable:!0},{name:"css",lang:"scss",mimeType:"text/css",monacoLang:"css",executable:!0},{name:"html/xml",lang:"tsx",mimeType:"application/xml",monacoLang:"xml"},{name:"bash",lang:"bash",mimeType:"application/x-sh",monacoLang:"shell"},{name:"python",lang:"python",mimeType:"text/x-python",monacoLang:"python"},{name:"cpp/csharp",lang:"cpp",mimeType:"text/x-c++src",monacoLang:"cpp"},{name:"php",lang:"php",mimeType:"application/x-php",monacoLang:"php"},{name:"ruby",lang:"ruby",mimeType:"text/x-ruby",monacoLang:"ruby"},{name:"sql",lang:"sql",mimeType:"text/x-sql",monacoLang:"sql"}],Qv={it:[{text:"",delayAfter:10},{text:"Cerco l'esperto più adatto",delayAfter:5},{text:"Contatto l'esperto",delayAfter:3},{text:"Spiego all'esperto la domanda",delayAfter:2},{text:"L'esperto sta preparando una risposta",delayAfter:6},{text:"Genero una risposta adatta",delayAfter:3}],en:[{text:"",delayAfter:10},{text:"I'm looking for the most suitable expert",delayAfter:5},{text:"I'm contacting the expert",delayAfter:3},{text:"I'm explaining the question to the expert",delayAfter:2},{text:"The expert is preparing an answer",delayAfter:6},{text:"I am generating a suitable answer",delayAfter:3}]};var Yv={};function Zv(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}(Yv=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Zv(o,r,i,s,a,"next",e)}function a(e){Zv(o,r,i,s,a,"throw",e)}s(void 0)}))}}).__esModule=!0,Yv.default=Yv;var Xv={};function $v(){return Xv=$v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xv.__esModule=!0,Xv.default=Xv,$v.apply(this,arguments)}(Xv=$v).__esModule=!0,Xv.default=Xv;ee=o("ffgrs"),te=o("22y1y");var ey={},ty={};function ny(e,t){return ty=ny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ty.__esModule=!0,ty.default=ty,ny(e,t)}(ty=ny).__esModule=!0,ty.default=ty,(ey=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ty(e,t)}).__esModule=!0,ey.default=ey;var ry={},iy=o("lEJSL").default,oy={};(oy=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}).__esModule=!0,oy.default=oy,(ry=function(e,t){if(t&&("object"===iy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return oy(e)}).__esModule=!0,ry.default=ry;var sy={};function ay(e){return sy=ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sy.__esModule=!0,sy.default=sy,ay(e)}(sy=ay).__esModule=!0,sy.default=sy;var ly,cy=o("7qcgS")();ly=cy;try{regeneratorRuntime=cy}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=cy:Function("r","regeneratorRuntime = r")(cy)}c=o("85Hg2");var uy={},dy={};(dy=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}).__esModule=!0,dy.default=dy,(uy=function(e,t){if(null==e)return{};var n,r,i=dy(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}).__esModule=!0,uy.default=uy;var hy={},py={},fy=o("e3mvX");(py=function(e){if(Array.isArray(e))return fy(e)}).__esModule=!0,py.default=py;var my={};(my=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}).__esModule=!0,my.default=my;var gy=o("8xD61"),vy={};(vy=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}).__esModule=!0,vy.default=vy,(hy=function(e){return py(e)||my(e)||gy(e)||vy()}).__esModule=!0,hy.default=hy;c=o("85Hg2"),c=o("85Hg2");function yy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function by(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?yy(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xy={};function Sy(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return xy[r]||(xy[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),xy[r]}function wy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),i=Sy(r);return i.reduce((function(e,t){return by(by({},e),n[t])}),t)}function _y(e){return e.join(" ")}function Cy(e){var n=e.node,r=e.stylesheet,i=e.style,o=void 0===i?{}:i,s=e.useInlineStyles,a=e.key,l=n.properties,u=n.type,d=n.tagName,h=n.value;if("text"===u)return h;if(d){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,i){return Cy({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})}))}}(r,s);if(s){var m=Object.keys(r).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=l.className&&l.className.includes("token")?["token"]:[],v=l.className&&g.concat(l.className.filter((function(e){return!m.includes(e)})));p=by(by({},l),{},{className:_y(v)||void 0,style:wy(l.className,Object.assign({},l.style,o),r)})}else p=by(by({},l),{},{className:_y(l.className)});var y=f(n.children);return t(c).createElement(d,t(Xv)({key:a},p),y)}}var Ay=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Ey(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ty(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Ey(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ey(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var My=/\n/g;function Iy(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,o=void 0===i?{float:"left",paddingRight:"10px"}:i,s=e.numberStyle,a=void 0===s?{}:s,l=e.startingLineNumber;return t(c).createElement("code",{style:Object.assign({},r,o)},function(e){var n=e.lines,r=e.startingLineNumber,i=e.style;return n.map((function(e,n){var o=n+r;return t(c).createElement("span",{key:"line-".concat(n),className:"react-syntax-highlighter-line-number",style:"function"==typeof i?i(o):i},"".concat(o,"\n"))}))}({lines:n.replace(/\n$/,"").split("\n"),style:a,startingLineNumber:l}))}function Ry(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Py(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return Ty(Ty({},i),o)}function ky(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,s=e.lineProps,a=void 0===s?{}:s,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,h="function"==typeof a?a(n):a;if(h.className=c,n&&o){var p=Py(r,n,i);t.unshift(Ry(n,p))}return d&u&&(h.style=Ty(Ty({},h.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:h,children:t}}function Oy(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0;i<e.length;i++){var o=e[i];if("text"===o.type)r.push(ky({children:[o],className:t(hy)(new Set(n))}));else if(o.children){var s=n.concat(o.properties.className);Oy(o.children,s).forEach((function(e){return r.push(e)}))}}return r}function Ny(e,t,n,r,i,o,s,a,l){var c,u=Oy(e.value),d=[],h=-1,p=0;function f(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return ky({children:e,lineNumber:t,lineNumberStyle:a,largestLineNumber:s,showInlineLineNumbers:i,lineProps:n,className:o,showLineNumbers:r,wrapLongLines:l})}function m(e,t){if(r&&t&&i){var n=Py(a,t,s);e.unshift(Ry(t,n))}return e}function g(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?f(e,n,r):m(e,n)}for(var v=function(){var e=u[p],t=e.children[0].value;if(t.match(My)){var n=t.split("\n");n.forEach((function(t,i){var s=r&&d.length+o,a={type:"text",value:"".concat(t,"\n")};if(0===i){var l=g(u.slice(h+1,p).concat(ky({children:[a],className:e.properties.className})),s);d.push(l)}else if(i===n.length-1){var c=u[p+1]&&u[p+1].children&&u[p+1].children[0],f={type:"text",value:"".concat(t)};if(c){var m=ky({children:[f],className:e.properties.className});u.splice(p+1,0,m)}else{var v=g([f],s,e.properties.className);d.push(v)}}else{var y=g([a],s,e.properties.className);d.push(y)}})),h=p}p++};p<u.length;)v();if(h!==u.length-1){var y=u.slice(h+1,u.length);if(y&&y.length){var b=g(y,r&&d.length+o);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function Ly(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return Cy({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function Dy(e){return e&&void 0!==e.highlightAuto}function By(e,n){return function(r){var i=r.language,o=r.children,s=r.style,a=void 0===s?n:s,l=r.customStyle,u=void 0===l?{}:l,d=r.codeTagProps,h=void 0===d?{className:i?"language-".concat(i):void 0,style:Ty(Ty({},a['code[class*="language-"]']),a['code[class*="language-'.concat(i,'"]')])}:d,p=r.useInlineStyles,f=void 0===p||p,m=r.showLineNumbers,g=void 0!==m&&m,v=r.showInlineLineNumbers,y=void 0===v||v,b=r.startingLineNumber,x=void 0===b?1:b,S=r.lineNumberContainerStyle,w=r.lineNumberStyle,_=void 0===w?{}:w,C=r.wrapLines,A=r.wrapLongLines,E=void 0!==A&&A,T=r.lineProps,M=void 0===T?{}:T,I=r.renderer,R=r.PreTag,P=void 0===R?"pre":R,k=r.CodeTag,O=void 0===k?"code":k,N=r.code,L=void 0===N?(Array.isArray(o)?o[0]:o)||"":N,D=r.astGenerator,B=t(uy)(r,Ay);D=D||e;var z=g?t(c).createElement(Iy,{containerStyle:S,codeStyle:h.style||{},numberStyle:_,startingLineNumber:x,codeString:L}):null,F=a.hljs||a['pre[class*="language-"]']||{backgroundColor:"#fff"},U=Dy(D)?"hljs":"prismjs",j=f?Object.assign({},B,{style:Object.assign({},F,u)}):Object.assign({},B,{className:B.className?"".concat(U," ").concat(B.className):U,style:Object.assign({},u)});if(h.style=Ty(Ty({},h.style),{},E?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!D)return t(c).createElement(P,j,z,t(c).createElement(O,h,L));(void 0===C&&I||E)&&(C=!0),I=I||Ly;var H=[{type:"text",value:L}],V=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Dy(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:H});null===V.language&&(V.value=H);var G=Ny(V,C,M,g,y,x,V.value.length+x,_,E);return t(c).createElement(P,j,t(c).createElement(O,h,!y&&z,I({rows:G,stylesheet:a,useInlineStyles:f})))}}function zy(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=t(sy)(e);if(n){var o=t(sy)(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return t(ry)(this,r)}}var Fy,Uy,jy,Hy,Vy,Gy,Wy,qy=function(e,n){return function(){var r=t(Yv)(t(ly).mark((function r(i){var o;return t(ly).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:o=t.sent,i(e,o.default||o);case 4:case"end":return t.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()},Ky={abap:qy("abap",(function(){return o("bwHpE")})),abnf:qy("abnf",(function(){return o("daD87")})),actionscript:qy("actionscript",(function(){return o("lpEgO")})),ada:qy("ada",(function(){return o("1sGW9")})),agda:qy("agda",(function(){return o("e9VyR")})),al:qy("al",(function(){return o("kMFSe")})),antlr4:qy("antlr4",(function(){return o("8HlsP")})),apacheconf:qy("apacheconf",(function(){return o("isFCh")})),apex:qy("apex",(function(){return o("gUXVM")})),apl:qy("apl",(function(){return o("2L15v")})),applescript:qy("applescript",(function(){return o("8XyFT")})),aql:qy("aql",(function(){return o("gFWTI")})),arduino:qy("arduino",(function(){return o("jI3VB")})),arff:qy("arff",(function(){return o("6uYTH")})),asciidoc:qy("asciidoc",(function(){return o("gdYKH")})),asm6502:qy("asm6502",(function(){return o("ahFLg")})),asmatmel:qy("asmatmel",(function(){return o("4irIu")})),aspnet:qy("aspnet",(function(){return o("yDC6n")})),autohotkey:qy("autohotkey",(function(){return o("a4xpy")})),autoit:qy("autoit",(function(){return o("iNSix")})),avisynth:qy("avisynth",(function(){return o("kEBnk")})),avroIdl:qy("avroIdl",(function(){return o("lzthi")})),bash:qy("bash",(function(){return Promise.resolve(o("3aDLI"))})),basic:qy("basic",(function(){return o("cxDu6")})),batch:qy("batch",(function(){return o("6zDll")})),bbcode:qy("bbcode",(function(){return o("bPS87")})),bicep:qy("bicep",(function(){return o("8dy5f")})),birb:qy("birb",(function(){return o("3vHrY")})),bison:qy("bison",(function(){return o("bCjBS")})),bnf:qy("bnf",(function(){return o("4NqDW")})),brainfuck:qy("brainfuck",(function(){return o("4s0KX")})),brightscript:qy("brightscript",(function(){return o("jTsQ4")})),bro:qy("bro",(function(){return o("5lMc2")})),bsl:qy("bsl",(function(){return o("jBYxC")})),c:qy("c",(function(){return Promise.resolve(o("lyZgY"))})),cfscript:qy("cfscript",(function(){return o("coZDy")})),chaiscript:qy("chaiscript",(function(){return o("e1zEN")})),cil:qy("cil",(function(){return o("crKoM")})),clike:qy("clike",(function(){return o("4kO9t")})),clojure:qy("clojure",(function(){return o("01SpB")})),cmake:qy("cmake",(function(){return o("9yG4p")})),cobol:qy("cobol",(function(){return o("967Hn")})),coffeescript:qy("coffeescript",(function(){return o("7Yi6H")})),concurnas:qy("concurnas",(function(){return o("5tXmX")})),coq:qy("coq",(function(){return o("ektdr")})),cpp:qy("cpp",(function(){return Promise.resolve(o("lR39A"))})),crystal:qy("crystal",(function(){return o("8gt4L")})),csharp:qy("csharp",(function(){return o("7K6eJ")})),cshtml:qy("cshtml",(function(){return o("cVu4i")})),csp:qy("csp",(function(){return o("ecKo1")})),cssExtras:qy("cssExtras",(function(){return o("gnpv8")})),css:qy("css",(function(){return o("jx0H8")})),csv:qy("csv",(function(){return o("f9kmW")})),cypher:qy("cypher",(function(){return o("lojor")})),d:qy("d",(function(){return o("6Qa0U")})),dart:qy("dart",(function(){return o("74K1B")})),dataweave:qy("dataweave",(function(){return o("93H6c")})),dax:qy("dax",(function(){return o("cf9Y9")})),dhall:qy("dhall",(function(){return o("f6UWv")})),diff:qy("diff",(function(){return o("klPVo")})),django:qy("django",(function(){return o("jfxe9")})),dnsZoneFile:qy("dnsZoneFile",(function(){return o("5aMz5")})),docker:qy("docker",(function(){return o("kOauC")})),dot:qy("dot",(function(){return o("btE6k")})),ebnf:qy("ebnf",(function(){return o("aT88c")})),editorconfig:qy("editorconfig",(function(){return o("jWOl8")})),eiffel:qy("eiffel",(function(){return o("kHJaX")})),ejs:qy("ejs",(function(){return o("frfnA")})),elixir:qy("elixir",(function(){return o("hcrJ2")})),elm:qy("elm",(function(){return o("jd271")})),erb:qy("erb",(function(){return o("gczXL")})),erlang:qy("erlang",(function(){return o("FsabW")})),etlua:qy("etlua",(function(){return o("9DI9l")})),excelFormula:qy("excelFormula",(function(){return o("3QVue")})),factor:qy("factor",(function(){return o("ltNCT")})),falselang:qy("falselang",(function(){return o("g0Q6p")})),firestoreSecurityRules:qy("firestoreSecurityRules",(function(){return o("ukA2V")})),flow:qy("flow",(function(){return o("e5prn")})),fortran:qy("fortran",(function(){return o("gIEL6")})),fsharp:qy("fsharp",(function(){return o("3wQkt")})),ftl:qy("ftl",(function(){return o("7ZVWs")})),gap:qy("gap",(function(){return o("hOFj6")})),gcode:qy("gcode",(function(){return o("95BzQ")})),gdscript:qy("gdscript",(function(){return o("iul6t")})),gedcom:qy("gedcom",(function(){return o("e0qJM")})),gherkin:qy("gherkin",(function(){return o("2SHak")})),git:qy("git",(function(){return o("l6VFH")})),glsl:qy("glsl",(function(){return o("cEMfJ")})),gml:qy("gml",(function(){return o("8UVTr")})),gn:qy("gn",(function(){return o("kvibD")})),goModule:qy("goModule",(function(){return o("icqjF")})),go:qy("go",(function(){return o("jLkg8")})),graphql:qy("graphql",(function(){return o("aYGNi")})),groovy:qy("groovy",(function(){return o("4bTmH")})),haml:qy("haml",(function(){return o("h2A6V")})),handlebars:qy("handlebars",(function(){return o("79YVJ")})),haskell:qy("haskell",(function(){return o("bsiLW")})),haxe:qy("haxe",(function(){return o("94Kdj")})),hcl:qy("hcl",(function(){return o("9CheR")})),hlsl:qy("hlsl",(function(){return o("h3dqW")})),hoon:qy("hoon",(function(){return o("9WbsW")})),hpkp:qy("hpkp",(function(){return o("GiPN3")})),hsts:qy("hsts",(function(){return o("eaSn9")})),http:qy("http",(function(){return o("1uj7b")})),ichigojam:qy("ichigojam",(function(){return o("ge562")})),icon:qy("icon",(function(){return o("lVHUf")})),icuMessageFormat:qy("icuMessageFormat",(function(){return o("aYoUL")})),idris:qy("idris",(function(){return o("1RVAE")})),iecst:qy("iecst",(function(){return o("bi7Dr")})),ignore:qy("ignore",(function(){return o("cq0Pi")})),inform7:qy("inform7",(function(){return o("31K4E")})),ini:qy("ini",(function(){return o("l05OZ")})),io:qy("io",(function(){return o("6bY1b")})),j:qy("j",(function(){return o("1ebDS")})),java:qy("java",(function(){return o("iEZZI")})),javadoc:qy("javadoc",(function(){return o("aHy5a")})),javadoclike:qy("javadoclike",(function(){return o("5f3rE")})),javascript:qy("javascript",(function(){return o("7JDFI")})),javastacktrace:qy("javastacktrace",(function(){return o("gdCGE")})),jexl:qy("jexl",(function(){return o("cqMb9")})),jolie:qy("jolie",(function(){return o("cEDX4")})),jq:qy("jq",(function(){return o("kEWsh")})),jsExtras:qy("jsExtras",(function(){return o("74PI8")})),jsTemplates:qy("jsTemplates",(function(){return o("30TPr")})),jsdoc:qy("jsdoc",(function(){return o("9DH5c")})),json:qy("json",(function(){return Promise.resolve(o("l1Rj1"))})),json5:qy("json5",(function(){return o("920rv")})),jsonp:qy("jsonp",(function(){return o("9AwS1")})),jsstacktrace:qy("jsstacktrace",(function(){return o("bYXMr")})),jsx:qy("jsx",(function(){return Promise.resolve(o("6ho3O"))})),julia:qy("julia",(function(){return o("g0ibH")})),keepalived:qy("keepalived",(function(){return o("2hdnH")})),keyman:qy("keyman",(function(){return o("cIufI")})),kotlin:qy("kotlin",(function(){return o("c26dU")})),kumir:qy("kumir",(function(){return o("iYAha")})),kusto:qy("kusto",(function(){return o("9z1oX")})),latex:qy("latex",(function(){return o("lCPLU")})),latte:qy("latte",(function(){return o("c9oN0")})),less:qy("less",(function(){return o("hA3V9")})),lilypond:qy("lilypond",(function(){return o("hpHTA")})),liquid:qy("liquid",(function(){return o("kpZTm")})),lisp:qy("lisp",(function(){return o("chgK5")})),livescript:qy("livescript",(function(){return o("2gdiv")})),llvm:qy("llvm",(function(){return o("jUeFO")})),log:qy("log",(function(){return o("3BFSQ")})),lolcode:qy("lolcode",(function(){return o("lG9br")})),lua:qy("lua",(function(){return o("cVGpd")})),magma:qy("magma",(function(){return o("4LVzY")})),makefile:qy("makefile",(function(){return o("2NviD")})),markdown:qy("markdown",(function(){return o("jUFCF")})),markupTemplating:qy("markupTemplating",(function(){return Promise.resolve(o("t3W0d"))})),markup:qy("markup",(function(){return o("5hIXu")})),matlab:qy("matlab",(function(){return o("kPAC0")})),maxscript:qy("maxscript",(function(){return o("gHOJy")})),mel:qy("mel",(function(){return o("9mj6e")})),mermaid:qy("mermaid",(function(){return o("kozw5")})),mizar:qy("mizar",(function(){return o("2bN6W")})),mongodb:qy("mongodb",(function(){return o("eHKWX")})),monkey:qy("monkey",(function(){return o("7Fh0C")})),moonscript:qy("moonscript",(function(){return o("hDXwC")})),n1ql:qy("n1ql",(function(){return o("j9bkC")})),n4js:qy("n4js",(function(){return o("eTmBF")})),nand2tetrisHdl:qy("nand2tetrisHdl",(function(){return o("ezjCf")})),naniscript:qy("naniscript",(function(){return o("VxHk1")})),nasm:qy("nasm",(function(){return o("ly95T")})),neon:qy("neon",(function(){return o("7Fk34")})),nevod:qy("nevod",(function(){return o("3U8Qv")})),nginx:qy("nginx",(function(){return o("c6qVk")})),nim:qy("nim",(function(){return o("1JdCk")})),nix:qy("nix",(function(){return o("jcstS")})),nsis:qy("nsis",(function(){return o("kEJqW")})),objectivec:qy("objectivec",(function(){return o("lUP8A")})),ocaml:qy("ocaml",(function(){return o("lhTAD")})),opencl:qy("opencl",(function(){return o("8rxKO")})),openqasm:qy("openqasm",(function(){return o("ib0uL")})),oz:qy("oz",(function(){return o("csCUS")})),parigp:qy("parigp",(function(){return o("2DkHE")})),parser:qy("parser",(function(){return o("2cp75")})),pascal:qy("pascal",(function(){return o("fViVl")})),pascaligo:qy("pascaligo",(function(){return o("9Uuxa")})),pcaxis:qy("pcaxis",(function(){return o("jUdnN")})),peoplecode:qy("peoplecode",(function(){return o("l8w4e")})),perl:qy("perl",(function(){return o("aX7dM")})),phpExtras:qy("phpExtras",(function(){return o("3cMZl")})),php:qy("php",(function(){return Promise.resolve(o("5li5P"))})),phpdoc:qy("phpdoc",(function(){return o("bDyJN")})),plsql:qy("plsql",(function(){return o("cPuMN")})),powerquery:qy("powerquery",(function(){return o("jE1gU")})),powershell:qy("powershell",(function(){return o("k7t0j")})),processing:qy("processing",(function(){return o("jr8hV")})),prolog:qy("prolog",(function(){return o("hpuat")})),promql:qy("promql",(function(){return o("ckXC5")})),properties:qy("properties",(function(){return o("fAh6P")})),protobuf:qy("protobuf",(function(){return o("R6WqB")})),psl:qy("psl",(function(){return o("Al65w")})),pug:qy("pug",(function(){return o("dxbNS")})),puppet:qy("puppet",(function(){return o("lrSuh")})),pure:qy("pure",(function(){return o("6DKQK")})),purebasic:qy("purebasic",(function(){return o("7ZkSb")})),purescript:qy("purescript",(function(){return o("dBTYx")})),python:qy("python",(function(){return Promise.resolve(o("kiy5M"))})),q:qy("q",(function(){return o("4FXyy")})),qml:qy("qml",(function(){return o("2zZFj")})),qore:qy("qore",(function(){return o("iCK1Y")})),qsharp:qy("qsharp",(function(){return o("dvH9H")})),r:qy("r",(function(){return o("lQqRt")})),racket:qy("racket",(function(){return o("eHKmq")})),reason:qy("reason",(function(){return o("kkeLT")})),regex:qy("regex",(function(){return o("llX50")})),rego:qy("rego",(function(){return o("9hKdZ")})),renpy:qy("renpy",(function(){return o("cJgw5")})),rest:qy("rest",(function(){return o("867DK")})),rip:qy("rip",(function(){return o("3Odjx")})),roboconf:qy("roboconf",(function(){return o("gQ0Us")})),robotframework:qy("robotframework",(function(){return o("bLCgx")})),ruby:qy("ruby",(function(){return Promise.resolve(o("ch1PX"))})),rust:qy("rust",(function(){return o("cInT8")})),sas:qy("sas",(function(){return o("iz7eP")})),sass:qy("sass",(function(){return o("hrDC3")})),scala:qy("scala",(function(){return o("ub8Bf")})),scheme:qy("scheme",(function(){return o("7NAAt")})),scss:qy("scss",(function(){return Promise.resolve(o("fU6a0"))})),shellSession:qy("shellSession",(function(){return o("7kKCv")})),smali:qy("smali",(function(){return o("2lkCb")})),smalltalk:qy("smalltalk",(function(){return o("4280y")})),smarty:qy("smarty",(function(){return o("4hXYK")})),sml:qy("sml",(function(){return o("jh2E8")})),solidity:qy("solidity",(function(){return o("dTdF2")})),solutionFile:qy("solutionFile",(function(){return o("iI5tm")})),soy:qy("soy",(function(){return o("aoU5C")})),sparql:qy("sparql",(function(){return o("ggrvb")})),splunkSpl:qy("splunkSpl",(function(){return o("8LhCX")})),sqf:qy("sqf",(function(){return o("3tDsu")})),sql:qy("sql",(function(){return Promise.resolve(o("bnDV9"))})),squirrel:qy("squirrel",(function(){return o("bxaUV")})),stan:qy("stan",(function(){return o("dBqrq")})),stylus:qy("stylus",(function(){return o("JlHVK")})),swift:qy("swift",(function(){return o("c7NBs")})),systemd:qy("systemd",(function(){return o("jprZl")})),t4Cs:qy("t4Cs",(function(){return o("edsMI")})),t4Templating:qy("t4Templating",(function(){return o("bS9Wa")})),t4Vb:qy("t4Vb",(function(){return o("gYk20")})),tap:qy("tap",(function(){return o("byv7d")})),tcl:qy("tcl",(function(){return o("lUAIZ")})),textile:qy("textile",(function(){return o("7J2LO")})),toml:qy("toml",(function(){return o("eXtdM")})),tremor:qy("tremor",(function(){return o("vyajH")})),tsx:qy("tsx",(function(){return Promise.resolve(o("7cTnl"))})),tt2:qy("tt2",(function(){return o("8XOOm")})),turtle:qy("turtle",(function(){return o("1XvLQ")})),twig:qy("twig",(function(){return o("i9Fpp")})),typescript:qy("typescript",(function(){return Promise.resolve(o("fzL8k"))})),typoscript:qy("typoscript",(function(){return o("kKk69")})),unrealscript:qy("unrealscript",(function(){return o("jgq8Y")})),uorazor:qy("uorazor",(function(){return o("dsZ00")})),uri:qy("uri",(function(){return o("fqJRp")})),v:qy("v",(function(){return o("bgfyB")})),vala:qy("vala",(function(){return o("68x4q")})),vbnet:qy("vbnet",(function(){return o("eUhQs")})),velocity:qy("velocity",(function(){return o("fPNdV")})),verilog:qy("verilog",(function(){return o("2fM1V")})),vhdl:qy("vhdl",(function(){return o("hNF6q")})),vim:qy("vim",(function(){return o("75TCr")})),visualBasic:qy("visualBasic",(function(){return o("fc93z")})),warpscript:qy("warpscript",(function(){return o("jgHlG")})),wasm:qy("wasm",(function(){return o("dVZkI")})),webIdl:qy("webIdl",(function(){return o("9Jnxv")})),wiki:qy("wiki",(function(){return o("1Gimo")})),wolfram:qy("wolfram",(function(){return o("4SyRT")})),wren:qy("wren",(function(){return o("gaIVs")})),xeora:qy("xeora",(function(){return o("lagad")})),xmlDoc:qy("xmlDoc",(function(){return o("9DNYE")})),xojo:qy("xojo",(function(){return o("ksF4f")})),xquery:qy("xquery",(function(){return o("gXxHJ")})),yaml:qy("yaml",(function(){return o("6rk3j")})),yang:qy("yang",(function(){return o("kTyrQ")})),zig:qy("zig",(function(){return o("d3mFC")}))},Jy=(Uy=(Fy={loader:function(){return o("bB2YF").then((function(e){return e.default||e}))},isLanguageRegistered:function(e,t){return e.registered(t)},languageLoaders:Ky,registerLanguage:function(e,t,n){return e.register(n)}}).loader,jy=Fy.isLanguageRegistered,Hy=Fy.registerLanguage,Vy=Fy.languageLoaders,Gy=Fy.noAsyncLoadingLanguages,Wy=function(e){t(ey)(i,e);var n,r=zy(i);function i(){return t(ee)(this,i),r.apply(this,arguments)}return t(te)(i,[{key:"componentDidUpdate",value:function(){!i.isRegistered(this.props.language)&&Vy&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var e=this;i.astGeneratorPromise||i.loadAstGenerator(),i.astGenerator||i.astGeneratorPromise.then((function(){e.forceUpdate()})),!i.isRegistered(this.props.language)&&Vy&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var e=this,t=this.props.language;"text"!==t&&i.loadLanguage(t).then((function(){return e.forceUpdate()})).catch((function(){}))}},{key:"normalizeLanguage",value:function(e){return i.isSupportedLanguage(e)?e:"text"}},{key:"render",value:function(){return t(c).createElement(i.highlightInstance,t(Xv)({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:i.astGenerator}))}}],[{key:"preload",value:function(){return i.loadAstGenerator()}},{key:"loadLanguage",value:(n=t(Yv)(t(ly).mark((function e(n){var r;return t(ly).wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(r=Vy[n])){e.next=5;break}return e.abrupt("return",r(i.registerLanguage));case 5:throw new Error("Language ".concat(n," not supported"));case 6:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"isSupportedLanguage",value:function(e){return i.isRegistered(e)||"function"==typeof Vy[e]}},{key:"loadAstGenerator",value:function(){return i.astGeneratorPromise=Uy().then((function(e){i.astGenerator=e,Hy&&i.languages.forEach((function(t,n){return Hy(e,n,t)}))})),i.astGeneratorPromise}}]),i}(t(c).PureComponent),t(X)(Wy,"astGenerator",null),t(X)(Wy,"highlightInstance",By(null,{})),t(X)(Wy,"astGeneratorPromise",null),t(X)(Wy,"languages",new Map),t(X)(Wy,"supportedLanguages",Fy.supportedLanguages||Object.keys(Vy||{})),t(X)(Wy,"isRegistered",(function(e){if(Gy)return!0;if(!Hy)throw new Error("Current syntax highlighter doesn't support registration of languages");return Wy.astGenerator?jy(Wy.astGenerator,e):Wy.languages.has(e)})),t(X)(Wy,"registerLanguage",(function(e,t){if(!Hy)throw new Error("Current syntax highlighter doesn't support registration of languages");if(Wy.astGenerator)return Hy(Wy.astGenerator,e,t);Wy.languages.set(e,t)})),Wy),Qy={},Yy={};(Yy=function(e){return e&&e.__esModule?e:{default:e}}).__esModule=!0,Yy.default=Yy,Object.defineProperty(Qy,"__esModule",{value:!0}),Object.defineProperty(Qy,"a11yDark",{enumerable:!0,get:function(){return ob.default}}),Object.defineProperty(Qy,"atomDark",{enumerable:!0,get:function(){return sb.default}}),Object.defineProperty(Qy,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return ab.default}}),Object.defineProperty(Qy,"cb",{enumerable:!0,get:function(){return lb.default}}),Object.defineProperty(Qy,"coldarkCold",{enumerable:!0,get:function(){return cb.default}}),Object.defineProperty(Qy,"coldarkDark",{enumerable:!0,get:function(){return ub.default}}),Object.defineProperty(Qy,"coy",{enumerable:!0,get:function(){return Zy.default}}),Object.defineProperty(Qy,"coyWithoutShadows",{enumerable:!0,get:function(){return db.default}}),Object.defineProperty(Qy,"darcula",{enumerable:!0,get:function(){return hb.default}}),Object.defineProperty(Qy,"dark",{enumerable:!0,get:function(){return Xy.default}}),Object.defineProperty(Qy,"dracula",{enumerable:!0,get:function(){return pb.default}}),Object.defineProperty(Qy,"duotoneDark",{enumerable:!0,get:function(){return fb.default}}),Object.defineProperty(Qy,"duotoneEarth",{enumerable:!0,get:function(){return mb.default}}),Object.defineProperty(Qy,"duotoneForest",{enumerable:!0,get:function(){return gb.default}}),Object.defineProperty(Qy,"duotoneLight",{enumerable:!0,get:function(){return vb.default}}),Object.defineProperty(Qy,"duotoneSea",{enumerable:!0,get:function(){return yb.default}}),Object.defineProperty(Qy,"duotoneSpace",{enumerable:!0,get:function(){return bb.default}}),Object.defineProperty(Qy,"funky",{enumerable:!0,get:function(){return $y.default}}),Object.defineProperty(Qy,"ghcolors",{enumerable:!0,get:function(){return xb.default}}),Object.defineProperty(Qy,"gruvboxDark",{enumerable:!0,get:function(){return Sb.default}}),Object.defineProperty(Qy,"gruvboxLight",{enumerable:!0,get:function(){return wb.default}}),Object.defineProperty(Qy,"holiTheme",{enumerable:!0,get:function(){return _b.default}}),Object.defineProperty(Qy,"hopscotch",{enumerable:!0,get:function(){return Cb.default}}),Object.defineProperty(Qy,"lucario",{enumerable:!0,get:function(){return Ab.default}}),Object.defineProperty(Qy,"materialDark",{enumerable:!0,get:function(){return Eb.default}}),Object.defineProperty(Qy,"materialLight",{enumerable:!0,get:function(){return Tb.default}}),Object.defineProperty(Qy,"materialOceanic",{enumerable:!0,get:function(){return Mb.default}}),Object.defineProperty(Qy,"nightOwl",{enumerable:!0,get:function(){return Ib.default}}),Object.defineProperty(Qy,"nord",{enumerable:!0,get:function(){return Rb.default}}),Object.defineProperty(Qy,"okaidia",{enumerable:!0,get:function(){return eb.default}}),Object.defineProperty(Qy,"oneDark",{enumerable:!0,get:function(){return Pb.default}}),Object.defineProperty(Qy,"oneLight",{enumerable:!0,get:function(){return kb.default}}),Object.defineProperty(Qy,"pojoaque",{enumerable:!0,get:function(){return Ob.default}}),Object.defineProperty(Qy,"prism",{enumerable:!0,get:function(){return ib.default}}),Object.defineProperty(Qy,"shadesOfPurple",{enumerable:!0,get:function(){return Nb.default}}),Object.defineProperty(Qy,"solarizedDarkAtom",{enumerable:!0,get:function(){return Lb.default}}),Object.defineProperty(Qy,"solarizedlight",{enumerable:!0,get:function(){return tb.default}}),Object.defineProperty(Qy,"synthwave84",{enumerable:!0,get:function(){return Db.default}}),Object.defineProperty(Qy,"tomorrow",{enumerable:!0,get:function(){return nb.default}}),Object.defineProperty(Qy,"twilight",{enumerable:!0,get:function(){return rb.default}}),Object.defineProperty(Qy,"vs",{enumerable:!0,get:function(){return Bb.default}}),Object.defineProperty(Qy,"vscDarkPlus",{enumerable:!0,get:function(){return zb.default}}),Object.defineProperty(Qy,"xonokai",{enumerable:!0,get:function(){return Fb.default}}),Object.defineProperty(Qy,"zTouch",{enumerable:!0,get:function(){return Ub.default}});var Zy=Yy(o("jcF8U")),Xy=Yy(o("3Tppx")),$y=Yy(o("dBuK7")),eb=Yy(o("eEjWK")),tb=Yy(o("awG2g")),nb=Yy(o("2oFzQ")),rb=Yy(o("4Au6Q")),ib=Yy(o("dAPqs")),ob=Yy(o("8eAql")),sb=Yy(o("cv2QE")),ab=Yy(o("h5I9g")),lb=Yy(o("i4C5w")),cb=Yy(o("3kFKo")),ub=Yy(o("17zK0")),db=Yy(o("5Avqr")),hb=Yy(o("1jHMv")),pb=Yy(o("7Q8CE")),fb=Yy(o("jKUos")),mb=Yy(o("Uzm4J")),gb=Yy(o("7yfkN")),vb=Yy(o("lT2l1")),yb=Yy(o("fZ9um")),bb=Yy(o("1MoQL")),xb=Yy(o("4uys7")),Sb=Yy(o("kaYsk")),wb=Yy(o("kN6Vu")),_b=Yy(o("2Z6pG")),Cb=Yy(o("4jQJK")),Ab=Yy(o("bpXw0")),Eb=Yy(o("i4S8s")),Tb=Yy(o("5bNr4")),Mb=Yy(o("5ZYWT")),Ib=Yy(o("ihJCU")),Rb=Yy(o("8iIbg")),Pb=Yy(o("424u7")),kb=Yy(o("jPiNI")),Ob=Yy(o("OHVOA")),Nb=Yy(o("2OKTL")),Lb=Yy(o("2Mg8H")),Db=Yy(o("9Kud0")),Bb=Yy(o("eCrmR")),zb=Yy(o("8UhcQ")),Fb=Yy(o("dtU9z")),Ub=Yy(o("4xtLO")),jb={};Object.defineProperty(jb,"__esModule",{value:!0}),jb.default=void 0;var Hb=Yy(o("7cTnl")).default;jb.default=Hb;var Vb={};Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.default=void 0;var Gb=Yy(o("l1Rj1")).default;Vb.default=Gb;var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.default=void 0;var qb=Yy(o("fU6a0")).default;Wb.default=qb;var Kb={};Object.defineProperty(Kb,"__esModule",{value:!0}),Kb.default=void 0;var Jb=Yy(o("3aDLI")).default;Kb.default=Jb;var Qb={};Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.default=void 0;var Yb=Yy(o("kiy5M")).default;Qb.default=Yb;var Zb={};Object.defineProperty(Zb,"__esModule",{value:!0}),Zb.default=void 0;var Xb=Yy(o("lR39A")).default;Zb.default=Xb;var $b={};Object.defineProperty($b,"__esModule",{value:!0}),$b.default=void 0;var ex=Yy(o("5li5P")).default;$b.default=ex;var tx={};Object.defineProperty(tx,"__esModule",{value:!0}),tx.default=void 0;var nx=Yy(o("ch1PX")).default;tx.default=nx;var rx={};Object.defineProperty(rx,"__esModule",{value:!0}),rx.default=void 0;var ix=Yy(o("bnDV9")).default;rx.default=ix,Jy.registerLanguage("tsx",t(jb)),Jy.registerLanguage("json",t(Vb)),Jy.registerLanguage("scss",t(Wb)),Jy.registerLanguage("bash",t(Kb)),Jy.registerLanguage("python",t(Qb)),Jy.registerLanguage("cpp",t(Zb)),Jy.registerLanguage("php",t($b)),Jy.registerLanguage("ruby",t(tx)),Jy.registerLanguage("sql",t(rx));var ox=({medium:e,className:t,preview:n=!1,showLineNumbers:r=!0,showCopyButton:i=!0})=>{var o,a,l,c;const{t:u}=Se();return(0,s.jsxs)("div",{className:"memori-snippet",children:[(0,s.jsxs)("div",{className:"memori-snippet--content",children:[(0,s.jsx)(Jy,{"aria-labelledby":`#snippet-${e.mediumID}`,className:t,style:Qy.atomDark,showLineNumbers:r,language:null!==(a=null===(o=Jv.find((t=>e.mimeType===t.mimeType)))||void 0===o?void 0:o.lang)&&void 0!==a?a:"text",children:(null===(l=e.content)||void 0===l?void 0:l.length)&&e.content.length>200&&n?`${e.content.slice(0,200)}\n...`:`${e.content}`}),i&&(0,s.jsx)(Sf,{padded:!1,ghost:!0,className:"memori-snippet--copy-button",title:u("copy")||"Copy",icon:(0,s.jsx)(Wv,{}),onClick:()=>{var t;return navigator.clipboard.writeText(null!==(t=e.content)&&void 0!==t?t:"")}})]}),!!(null===(c=e.title)||void 0===c?void 0:c.length)&&(0,s.jsx)("p",{id:`snippet-${e.mediumID}`,className:"memori-snippet--caption",children:e.title})]})};c=o("85Hg2"),c=o("85Hg2");var sx,ax=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M574 665.4a8.03 8.03 0 0 0-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 0 0-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 0 0 0 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 0 0 0 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 0 0-11.3 0L372.3 598.7a8.03 8.03 0 0 0 0 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"})}),lx={};sx=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=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};function n(e,n){var r=e.el,i=e.elStyle,o=e.elHeight,s=e.rowsLimit,a=e.rowsWrapped,l=e.options,c=e.buffer,u=c;if(a===s+1)return t({},e);var d=c,h=a,p=o;return r.innerHTML=u=c.length?""+c+l.delimiter+n+l.replaceStr:""+n+l.replaceStr,parseFloat(i.height)>parseFloat(o)&&(h++,p=i.height,h===s+1)?(r.innerHTML=u="."===d[d.length-1]&&"..."===l.replaceStr?d+"..":""+d+l.replaceStr,t({},e,{elHeight:p,rowsWrapped:h})):(r.innerHTML=u=d.length?""+d+l.delimiter+n:""+n,t({},e,{buffer:u,elHeight:p,rowsWrapped:h}))}e.disableResponsive=function(e){window.removeEventListener("resize",e)},e.ellipsis=function e(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={replaceStr:"...",responsive:!1,debounceDelay:250,delimiter:" "},a=t({},s,o),l=r&&(r instanceof NodeList?r:1===r.nodeType?[r]:document.querySelectorAll(r)),c=[],u=0;u<l.length;u++){var d=l[u];c[u]=d.innerHTML;var h=d.innerHTML.split(a.delimiter);d.innerHTML="";var p=window.getComputedStyle(d);h.reduce(n,{el:d,buffer:d.innerHTML,elStyle:p,elHeight:0,rowsLimit:i,rowsWrapped:0,options:a})}if(a.responsive){var f=!1,m=window.innerWidth,g=function(){if(window.innerWidth!==m){m=window.innerWidth;for(var n=0;n<l.length;n++)l[n].innerHTML=c[n];e(r,i,t({},o,{responsive:!1}))}},v=function(){clearTimeout(f),f=setTimeout(g,a.debounceDelay)};return window.addEventListener("resize",v),v}}},"function"==typeof define&&define.amd?define(["exports"],sx):sx(lx);var cx=({loading:e=!1,className:n,title:r,description:i,cover:o,hoverable:a=!1,children:l})=>(0,s.jsx)("div",{className:t(ws)("memori-card",n,{"memori-card--loading":e,"memori-card--with-cover":o,"memori-card--hoverable":a}),children:(0,s.jsxs)(xf,{spinning:e,children:[o&&(0,s.jsx)("div",{className:"memori-card--cover",children:o}),(0,s.jsxs)("div",{className:"memori-card--content",children:[r&&(0,s.jsx)("h3",{className:"memori-card--title",children:r}),i&&(0,s.jsx)("p",{className:"memori-card--description",children:i}),(0,s.jsx)("div",{className:"memori-card--children",children:l})]})]})});const ux=({isChild:e=!1,item:n,baseUrl:r,onLinkPreviewInfo:i,descriptionOneLine:o=!1})=>{var a,l,u,d;const[h,p]=(0,c.useState)(null),f=(null===(a=n.url)||void 0===a?void 0:a.startsWith("http"))||!n.url||0===(null===(l=n.url)||void 0===l?void 0:l.length)?n.url:`https://${n.url}`;(0,c.useEffect)((()=>{var e,t;let o=(null===(e=n.url)||void 0===e?void 0:e.startsWith("http"))||!n.url||0===(null===(t=n.url)||void 0===t?void 0:t.length)?n.url:`https://${n.url}`;o&&o!==(null==h?void 0:h.urlKey)&&(async(e,t)=>{try{const n=await fetch(`${t||"https://aisuru.com"}/api/linkpreview/${encodeURIComponent(e)}`);return await n.json()}catch(e){return console.error("getSiteInfo",e),null}})(o,r).then((e=>{p(e?{...e,urlKey:o}:null),i&&e&&i(e)}))}),[null==n?void 0:n.url,r,i]);const m=n.title&&n.title.length>0?n.title:null==h?void 0:h.title,g=null==h?void 0:h.description,v=null==h?void 0:h.video,y=null!==(u=null==h?void 0:h.image)&&void 0!==u?u:null===(d=null==h?void 0:h.images)||void 0===d?void 0:d[0];return(0,c.useEffect)((()=>{setTimeout((()=>{(0,lx.ellipsis)(".memori-link-item--card .memori-card--description",3,{responsive:!0})}),300)}),[g,n.mediumID]),(0,s.jsx)("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:t(ws)("memori-link-item--link",{"memori-link-item--link--child":e}),onClick:t=>{e||(t.preventDefault(),t.stopPropagation(),window.open(f,"_blank",`toolbar=yes,top=${.1*window.innerHeight},left=${.1*window.innerWidth},width=${.8*window.innerWidth},height=${.8*window.innerHeight}`))},children:(0,s.jsx)(cx,{hoverable:!0,className:t(ws)("memori-link-item--card",{"memori-link-item--card-description-oneline":o,"memori-link-item--card-has-image":y,"memori-link-item--card-has-video":v}),cover:v?(0,s.jsx)("iframe",{width:"100%",height:"100%",src:v,title:"Video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):y?(0,s.jsx)("img",{className:"memori-link-item--card-cover-img",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",srcSet:y.includes("data:image")?void 0:y.startsWith("https")?y:`https://${y.replace("http://","")}`,alt:n.title}):(0,s.jsx)("div",{className:"memori-link-item--card-cover-icon",children:(0,s.jsx)(ax,{className:"memori-link-item--icon"})}),title:m,description:g})})};var dx=({items:e,baseUrl:t,descriptionOneLine:n=!1,onLinkPreviewInfo:r})=>(0,s.jsx)(np,{appear:!0,show:!0,as:"div",className:"memori-link-items",children:(0,s.jsx)("div",{className:"memori-link-items--grid",children:e.map(((e,i)=>(0,s.jsx)(np.Child,{as:"div",className:"memori-link-item",enter:"ease-out duration-500 delay-"+100*i,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(ux,{item:e,baseUrl:t,descriptionOneLine:n,onLinkPreviewInfo:r})},e.mediumID)))})});c=o("85Hg2");const hx=["va bene","no grazie","si","no","sì","arrivederci","non c'entrava","non mi è piaciuto"],px=async(e,t,n,r)=>{var i;const o=hx.indexOf(e.toLowerCase())>-1?"IT":null==n?void 0:n.toUpperCase(),s=await fetch(`${r||"https://aisuru.com"}/api/translate?text=${encodeURIComponent(e)}&target_lang=${t.toUpperCase()}${o?`&source_lang=${o}`:""}`,{method:"GET",headers:{Accept:"*/*"}}),a=await s.json();return null===(i=null==a?void 0:a.translations)||void 0===i?void 0:i[0]};c=o("85Hg2");var fx=({src:e,poster:t,alt:n=""})=>((0,c.useEffect)((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js",e.type="module",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,s.jsx)("div",{className:"model-viewer",children:(0,s.jsx)("model-viewer",{src:e,"ios-src":"",poster:t,alt:n,"shadow-intensity":"1","disable-zoom":!0,"camera-controls":!0,autoplay:!0})}));var mx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var gx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var vx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0 0 10.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 0 0-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"})});var yx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 0 0-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 0 0-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"})});const bx=({isChild:e=!1,item:t,sessionID:n,tenantID:r,preview:i=!1,baseURL:o,apiURL:a,onClick:l,customMediaRenderer:c})=>{var u,d;const h=fv({resourceURI:t.url,sessionID:n,tenantID:r,baseURL:o,apiURL:a}),p=null==c?void 0:c(t.mimeType);if(p)return p;const f=(null===(u=t.url)||void 0===u?void 0:u.startsWith("rgb("))||(null===(d=t.url)||void 0===d?void 0:d.startsWith("rgba("));switch(t.mimeType){case"image/jpeg":case"image/png":case"image/jpg":case"image/gif":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,className:"memori-media-item--card memori-media-item--image",cover:(0,s.jsxs)("picture",{className:"memori-media-item--figure",children:[!i&&!f&&(0,s.jsx)("source",{srcSet:[h,t.url,t.content].join(", "),type:t.mimeType}),f?(0,s.jsx)("div",{style:{minHeight:"150px",width:"100%",backgroundColor:t.url}}):(0,s.jsx)("img",{alt:t.title,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="}),t.title&&(0,s.jsx)("figcaption",{className:"memori-media-item--figure-caption",children:t.title})]})})});case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(yx,{className:"memori-media-item--icon"}),title:t.title})});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(vx,{className:"memori-media-item--icon"}),title:t.title})});case"application/pdf":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(gx,{className:"memori-media-item--icon"}),title:t.title})});case"video/mp4":case"video/quicktime":case"video/avi":case"video/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsxs)("video",{style:{width:"100%",height:"100%"},controls:!0,src:h,title:t.title,children:["video/quicktime"===t.mimeType&&(0,s.jsx)("source",{src:t.url,type:"video/mp4"}),(0,s.jsx)("source",{src:t.url,type:t.mimeType}),"Your browser does not support this video format.",(0,s.jsx)("br",{}),(0,s.jsx)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:"Download the video"})]}),title:t.title})});case"audio/mpeg3":case"audio/wav":case"audio/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)("audio",{style:{width:"100%",height:"100%"},controls:!0,src:h}),title:t.title})});case"model/gltf-binary":return(0,s.jsx)(fx,{src:h,alt:"",poster:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="});default:return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(mx,{className:"memori-media-item--icon"}),title:t.title})})}};var xx=(0,c.memo)((({items:e,sessionID:t,tenantID:n,translateTo:r,baseURL:i,apiURL:o,customMediaRenderer:a})=>{const[l,u]=(0,c.useState)(e),[d,h]=(0,c.useState)(),p=(0,c.useCallback)((async()=>{if(!r)return;const t=await Promise.all((null!=e?e:[]).map((async e=>{var t;if(!e.title)return e;try{const n=await px(e.title,r);return{...e,title:null!==(t=n.text)&&void 0!==t?t:e.title}}catch(t){return console.error(t),e}})));u(t)}),[r,e]);return(0,c.useEffect)((()=>{r&&p()}),[r,p]),(0,s.jsxs)(np,{appear:!0,show:!0,as:"div",className:"memori-media-items",children:[(0,s.jsx)("div",{className:"memori-media-items--grid",children:l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&!Jv.map((e=>e.mimeType)).includes(e.mimeType)})).sort(((e,t)=>e.creationTimestamp>t.creationTimestamp?1:e.creationTimestamp<t.creationTimestamp?-1:0)).map(((e,r)=>(0,s.jsx)(np.Child,{as:"div",className:"memori-media-item",enter:"ease-out duration-500 delay-"+100*r,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(bx,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,onClick:e=>{h(l.find((t=>t.mediumID===e)))},item:{...e,title:e.title,url:e.url,content:e.content},customMediaRenderer:a})},e.url+"&index="+r)))}),l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&Jv.map((e=>e.mimeType)).includes(e.mimeType)})).map((e=>(0,s.jsx)(np.Child,{as:"div",className:"memori-media-item--snippet",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(ox,{medium:e},e.mediumID)},e.mediumID))),l.filter((e=>{var t;return"text/css"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)})).map((e=>(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:e.content||""}},e.mediumID))),(null==d?void 0:d.mediumID)&&(0,s.jsx)(Wm,{width:"100%",widthMd:"100%",className:"memori-media-item--modal",open:!!d,onClose:()=>h(void 0),footer:null,children:(0,s.jsx)(bx,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,item:{...d,title:d.title,url:d.url,content:d.content},customMediaRenderer:a})})]})}));var Sx=(0,c.memo)((({hints:e=[],links:n=[],media:r=[],simulateUserPrompt:i=(()=>{}),sessionID:o,baseUrl:a,apiUrl:l,translateTo:u,customMediaRenderer:d})=>{const{t:h}=Se(),[p,f]=(0,c.useState)(!0),[m,g]=(0,c.useState)(6);return(0,c.useEffect)((()=>{f(!0)}),[e]),(0,s.jsxs)("div",{className:"memori-media-widget",children:[(null==r?void 0:r.length)>0&&(0,s.jsx)(xx,{items:r,sessionID:o,translateTo:u,baseURL:a,apiURL:l,customMediaRenderer:d}),(null==n?void 0:n.length)>0&&(0,s.jsx)(dx,{items:n,baseUrl:a}),(null==e?void 0:e.length)>0&&p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(np,{appear:!0,show:!0,as:"ul",className:"memori-media--hints",children:e.slice(0,m).map(((e,n)=>(0,s.jsx)(np.Child,{as:"li",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(Sf,{className:t(ws)("memori-media--hint"),primary:!0,onClick:()=>{i(e.originalText,e.text),f(!1)},onTouchEnd:()=>{i(e.originalText,e.text),f(!1)},children:e.text},e.text+n)},e.text+n)))}),e.length>m&&(0,s.jsx)("div",{className:"memori-hints--show-more",children:(0,s.jsx)(Sf,{className:"memori-hints--show-more-button",id:"showMoreHints",onClick:()=>g(m+6),children:h("expand")||"Expand"})})]})]})}));const wx=e=>e.endsWith("?")?e:`${e}?`;var _x=({message:e,apiURL:n,sessionID:r,visible:i=!0,initialMatches:o=[],closeDrawer:a,_TEST_loading:l=!1})=>{const{t:u}=Se(),d=Y(n).search.searchMemory,[h,p]=(0,c.useState)(o),[f,m]=(0,c.useState)(l),g=(0,c.useCallback)((async()=>{if(m(!0),!l){try{const{matches:n,...i}=await d(r,{searchType:"Semantic",numberOfResults:3,text:e.questionAnswered,date:e.date,placeName:e.placeName,placeLatitude:e.placeLatitude,placeLongitude:e.placeLongitude,placeUncertaintyKm:e.placeUncertaintyKm,contextVars:e.contextVars,tag:e.tag,memoryTags:e.memoryTags});0!==i.resultCode?(console.error(i),t(Ju).error(u(Gv(i.resultCode)))):p(null!=n?n:[])}catch(e){console.error("WHYTHISANSWER/FETCH",e),p(null!=o?o:[])}m(!1)}}),[e,r]);return(0,c.useEffect)((()=>{g()}),[g,e,r]),(0,s.jsxs)(_f,{open:i,width:"80%",animated:!1,className:"memori-whythisanswer-drawer",onClose:()=>a(),title:u("whyThisAnswer"),children:[(0,s.jsx)("p",{children:u("whyThisAnswerHelper")}),e.questionAnswered&&(0,s.jsxs)("p",{className:"memori--whythisanswer-question-answered",children:[(0,s.jsxs)("strong",{children:[u("question")||"Question",":"]})," ",e.questionAnswered]}),(0,s.jsxs)(xf,{primary:!0,spinning:f,children:[!f&&0===h.length&&(0,s.jsx)("p",{role:"info",className:"memori--whythisanswer-no-results",children:u("nothingFound")}),f&&0===h.length&&(0,s.jsxs)("ul",{className:"memori--whythisanswer-list memori--whythisanswer-skeleton",children:[(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:(0,s.jsx)("span",{className:"memori--whythisanswer-skeleton-text"})}),(0,s.jsx)("div",{className:"memori--whythisanswer-title-text",children:(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"})})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"})]}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-block"})]}),(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:(0,s.jsx)("span",{className:"memori--whythisanswer-skeleton-text"})}),(0,s.jsxs)("div",{className:"memori--whythisanswer-title-text",children:[(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"})]})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"})]}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-block"})]})]}),h.length>0&&(0,s.jsx)("ul",{className:"memori--whythisanswer-list",children:h.map((e=>{var t,n,r,i,o,a,l;return(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:e.confidenceLevel}),(0,s.jsxs)("div",{className:"memori--whythisanswer-title-text",children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:wx(null!==(t=e.memory.title)&&void 0!==t?t:"")})}),(0,s.jsx)("p",{children:null===(r=null===(n=e.memory.titleVariants)||void 0===n?void 0:n.map((e=>wx(e))))||void 0===r?void 0:r.join(" | ")})]})]}),null===(i=e.memory.answers)||void 0===i?void 0:i.map(((e,t)=>(0,s.jsx)("p",{className:"memori--whythisanswer-answer",children:(0,s.jsx)(Hv,{rows:3,children:e.text})},t))),(0,s.jsx)(Sx,{links:null===(o=e.memory.media)||void 0===o?void 0:o.filter((e=>"text/html"===e.mimeType))}),null===(l=null===(a=e.memory.media)||void 0===a?void 0:a.filter((e=>"text/plain"===e.mimeType)))||void 0===l?void 0:l.map((e=>(0,s.jsx)(Hv,{rows:2,lineHeightMultiplier:2,innerClassName:"memori--whythisanswer-snippet-expandable",children:(0,s.jsx)(ox,{medium:e,showCopyButton:!1,showLineNumbers:!1},e.mediumID)},e.mediumID)))]},e.memory.memoryID)}))})]})]})},Cx={};Cx=function(){"use strict";var e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=/[\0-\x1F\x7F-\x9F]/,n=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;function i(i){const o={};i=i||{},o.src_Any=e.source,o.src_Cc=t.source,o.src_Z=r.source,o.src_P=n.source,o.src_ZPCc=[o.src_Z,o.src_P,o.src_Cc].join("|"),o.src_ZCc=[o.src_Z,o.src_Cc].join("|");const s="[><|]";return o.src_pseudo_letter="(?:(?!"+s+"|"+o.src_ZPCc+")"+o.src_Any+")",o.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",o.src_auth="(?:(?:(?!"+o.src_ZCc+"|[@/\\[\\]()]).)+@)?",o.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",o.src_host_terminator="(?=$|"+s+"|"+o.src_ZPCc+")(?!"+(i["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+o.src_ZPCc+"))",o.src_path="(?:[/?#](?:(?!"+o.src_ZCc+"|"+s+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+o.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+o.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+o.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+o.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+o.src_ZCc+"|[']).)+\\'|\\'(?="+o.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+o.src_ZCc+"|[.]|$)|"+(i["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+o.src_ZCc+"|$)|;(?!"+o.src_ZCc+"|$)|\\!+(?!"+o.src_ZCc+"|[!]|$)|\\?(?!"+o.src_ZCc+"|[?]|$))+|\\/)?",o.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',o.src_xn="xn--[a-z0-9\\-]{1,59}",o.src_domain_root="(?:"+o.src_xn+"|"+o.src_pseudo_letter+"{1,63})",o.src_domain="(?:"+o.src_xn+"|(?:"+o.src_pseudo_letter+")|(?:"+o.src_pseudo_letter+"(?:-|"+o.src_pseudo_letter+"){0,61}"+o.src_pseudo_letter+"))",o.src_host="(?:(?:(?:(?:"+o.src_domain+")\\.)*"+o.src_domain+"))",o.tpl_host_fuzzy="(?:"+o.src_ip4+"|(?:(?:(?:"+o.src_domain+")\\.)+(?:%TLDS%)))",o.tpl_host_no_ip_fuzzy="(?:(?:(?:"+o.src_domain+")\\.)+(?:%TLDS%))",o.src_host_strict=o.src_host+o.src_host_terminator,o.tpl_host_fuzzy_strict=o.tpl_host_fuzzy+o.src_host_terminator,o.src_host_port_strict=o.src_host+o.src_port+o.src_host_terminator,o.tpl_host_port_fuzzy_strict=o.tpl_host_fuzzy+o.src_port+o.src_host_terminator,o.tpl_host_port_no_ip_fuzzy_strict=o.tpl_host_no_ip_fuzzy+o.src_port+o.src_host_terminator,o.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+o.src_ZPCc+"|>|$))",o.tpl_email_fuzzy="(^|"+s+'|"|\\(|'+o.src_ZCc+")("+o.src_email_name+"@"+o.tpl_host_fuzzy_strict+")",o.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+o.src_ZPCc+"))((?![$+<=>^`||])"+o.tpl_host_port_fuzzy_strict+o.src_path+")",o.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+o.src_ZPCc+"))((?![$+<=>^`||])"+o.tpl_host_port_no_ip_fuzzy_strict+o.src_path+")",o}function o(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function s(e){return Object.prototype.toString.call(e)}function a(e){return"[object String]"===s(e)}function l(e){return"[object Object]"===s(e)}function c(e){return"[object RegExp]"===s(e)}function u(e){return"[object Function]"===s(e)}function d(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const h={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function p(e){return Object.keys(e||{}).reduce((function(e,t){return e||h.hasOwnProperty(t)}),!1)}const f={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},m="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",g="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function v(e){e.__index__=-1,e.__text_cache__=""}function y(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function b(){return function(e,t){t.normalize(e)}}function x(e){const t=e.re=i(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(m),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];function s(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){const n=e.__schemas__[t];if(null===n)return;const r={validate:null,link:null};if(e.__compiled__[t]=r,l(n))return c(n.validate)?r.validate=y(n.validate):u(n.validate)?r.validate=n.validate:s(t,n),void(u(n.normalize)?r.normalize=n.normalize:n.normalize?s(t,n):r.normalize=b());a(n)?o.push(t):s(t,n)})),o.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:b()};const h=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(d).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),v(e)}function S(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function w(e,t){const n=new S(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function _(e,t){if(!(this instanceof _))return new _(e,t);t||p(e)&&(t=e,e={}),this.__opts__=o({},h,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},f,e),this.__compiled__={},this.__tlds__=g,this.__tlds_replaced__=!1,this.re={},x(this)}function C(e={},t={}){const n=new _(e,t);return E(n,t),{extensions:[{name:"autolink",level:"inline",start:e=>{const t=A(n,e);if(t)return t.index},tokenizer(e){if(this.lexer.state.inLink)return;const t=A(n,e);if(!t)return;let r;return 0===t.index?r=t.raw:1===t.index&&"<"===e.charAt(0)&&">"===e.charAt(t.lastIndex)&&(r=`<${t.raw}>`),r?{type:"link",raw:r,text:t.text,href:t.url,tokens:[{type:"text",raw:t.text,text:t.text}]}:void 0}}]}}function A(e,t){const n=e.match(t);if(n&&n.length)return n[0]}function E(e,t){const n=t.tlds;delete t.tlds;const r=t.tldsKeepOld;delete t.tldsKeepOld,n&&e.tlds(n,r)}return _.prototype.add=function(e,t){return this.__schemas__[e]=t,x(this),this},_.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,i,o,s,a,l,c;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(t=a.exec(e));)if(i=this.testSchemaAt(e,t[2],a.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=s))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},_.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(w(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(w(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},_.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,w(this,0)):null},_.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),x(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,x(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},_.prototype.onCompile=function(){},C}();var Ax={};Ax=function(e){"use strict";const t=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,n=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function r(e={}){return{extensions:[o(e,i(e,!1)),s(e,i(e,!0))]}}function i(t,n){return r=>e.renderToString(r.text,{...t,displayMode:r.displayMode})+(n?"\n":"")}function o(e,n){return{name:"inlineKatex",level:"inline",start(e){let n,r=e;for(;r;){if(n=r.indexOf("$"),-1===n)return;if((0===n||" "===r.charAt(n-1))&&r.substring(n).match(t))return n;r=r.substring(n+1).replace(/^\$+/,"")}},tokenizer(e,n){const r=e.match(t);if(r)return{type:"inlineKatex",raw:r[0],text:r[2].trim(),displayMode:2===r[1].length}},renderer:n}}function s(e,t){return{name:"blockKatex",level:"block",tokenizer(e,t){const r=e.match(n);if(r)return{type:"blockKatex",raw:r[0],text:r[2].trim(),displayMode:2===r[1].length}},renderer:t}}return r}(o("kqAxc"));const Ex=(e,t,n,r)=>{if(!t.rowspan)return"";return`${`<${n}`+(t.colspan>1?` colspan=${t.colspan}`:"")+(t.rowspan>1?` rowspan=${t.rowspan}`:"")+(r?` align=${r}`:"")+">"+e}</${n}>\n`},Tx=(e,t,n=[])=>{var r,i,o;const s=[...e.matchAll(/(?:[^|\\]|\\.?)+(?:\|+|$)/g)].map((e=>e[0]));(null===(r=s[0])||void 0===r?void 0:r.trim())||s.shift(),(null===(i=s[s.length-1])||void 0===i?void 0:i.trim())||s.pop();let a,l,c,u,d,h=0;for(a=0;a<s.length;a++){if(c=s[a].split(/\|+$/)[0],s[a]={rowspan:1,colspan:Math.max(s[a].length-c.length,1),text:c.trim().replace(/\\\|/g,"|")},"^"===c.slice(-1)&&n.length)for(d=0,l=0;l<n.length;l++){if(u=n[l],d===h&&u.colspan===s[a].colspan){s[a].rowSpanTarget=null!==(o=u.rowSpanTarget)&&void 0!==o?o:u,s[a].rowSpanTarget.text+=` ${s[a].text.slice(0,-1)}`,s[a].rowSpanTarget.rowspan+=1,s[a].rowspan=0;break}if(d+=u.colspan,d>h)break}h+=s[a].colspan}if(h>t)s.splice(t);else for(;h<t;)s.push({colspan:1,text:""}),h+=1;return s};Fv.marked.use({async:!1,gfm:!0,pedantic:!0,renderer:{link(e,t,n){const r=am(e);if(null===r)return n;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+t+'"'),i+=' target="_blank" rel="noopener noreferrer">'+n+"</a>",i}}}),Fv.marked.use(t(Cx)()),Fv.marked.use(t(Ax)({throwOnError:!0,output:"htmlAndMathml"})),Fv.marked.use({extensions:[{name:"spanTable",level:"block",start(e){var t;return null===(t=e.match(/^\n *([^\n ].*\|.*)\n/))||void 0===t?void 0:t.index},tokenizer(e,t){const n=new RegExp("^ *([^\\n ].*\\|.*\\n(?: *[^\\s].*\\n)*?) {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n| {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)| {0,3}#{1,6} | {0,3}>| {4}[^\\n]| {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n| {0,3}(?:[*+-]|1[.)]) |<\\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?: +|\\n|\\/?>)|<(?:script|pre|style|textarea|!--)).*(?:\\n|$))*)\\n*|$)").exec(e);if(n){const e={type:"spanTable",header:n[1].replace(/\n$/,"").split("\n"),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n$/,"").split("\n"):[]};e.header[0]=Tx(e.header[0]);const t=e.header[0].reduce(((e,t)=>e+t.colspan),0);if(t===e.align.length){let r,i,o,s;e.raw=n[0];let a=e.align.length;for(r=0;r<a;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]="right":/^ *:-+: *$/.test(e.align[r])?e.align[r]="center":/^ *:-+ *$/.test(e.align[r])?e.align[r]="left":e.align[r]=null;for(a=e.header.length,r=1;r<a;r++)e.header[r]=Tx(e.header[r],t,e.header[r-1]);for(a=e.rows.length,r=0;r<a;r++)e.rows[r]=Tx(e.rows[r],t,e.rows[r-1]);for(a=e.header.length,i=0;i<a;i++)for(s=e.header[i],o=0;o<s.length;o++)s[o].tokens=[],this.lexer.inline(s[o].text,s[o].tokens);for(a=e.rows.length,i=0;i<a;i++)for(s=e.rows[i],o=0;o<s.length;o++)s[o].tokens=[],this.lexer.inline(s[o].text,s[o].tokens);return e}}},renderer(e){let t,n,r,i,o,s,a='<div class="memori--responsive-table-wrapper"><table class="memori--table">';for(a+="<thead>",t=0;t<e.header.length;t++){r=e.header[t];let o=0;for(a+="<tr>",n=0;n<r.length;n++)i=r[n],s=this.parser.parseInline(i.tokens),a+=Ex(s,i,"th",e.align[o]),o+=i.colspan;a+="</tr>"}if(a+="</thead>",e.rows.length){for(a+="<tbody>",t=0;t<e.rows.length;t++){for(r=e.rows[t],o=0,a+="<tr>",n=0;n<r.length;n++)i=r[n],s=this.parser.parseInline(i.tokens),a+=Ex(s,i,"td",e.align[o]),o+=i.colspan;a+="</tr>"}a+="</tbody>"}return a+="</table></div>",a}}]});var Mx=({message:e,memori:n,tenant:r,baseUrl:i,apiUrl:o,sessionID:a,showFeedback:l,showWhyThisAnswer:u=!0,simulateUserPrompt:d,showAIicon:h=!0,isFirst:p=!1,user:f,userAvatar:m,experts:g})=>{var v,y,b,x,S,w;const{t:_}=Se(),[C,A]=(0,c.useState)(!1),E=e.fromUser?e.translatedText||e.text:(0,Uv.sanitize)(Fv.marked.parse((e.translatedText||e.text).replaceAll(/\[([^\]]+)\]\([^)]+\)/g,'<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>').replaceAll("(","\\(").replaceAll(")","\\)").replaceAll(/(?<!\\)\(/g,"\\(").replaceAll(/(?<!\\)\)/g,"\\)")).trim().replace(/\n/g,"<br>").replace(/(<br>)+/g,"<br><br>"),{ADD_ATTR:["target"]}).replaceAll(/(?<!\\)\[/g,"\\[").replaceAll(/(?<!\\)\]/g,"\\]").replace(/(<br>)+/g,"<br>");return(0,c.useLayoutEffect)((()=>{"undefined"==typeof window||e.fromUser||"MathJax"in window&&window.MathJax.typesetPromise&&window.MathJax.typesetPromise([".memori-chat--bubble-content"])}),[e.text,e.fromUser]),(0,s.jsxs)(s.Fragment,{children:[(e.initial||p)&&(0,s.jsx)("div",{className:"memori-chat--bubble-initial"}),(0,s.jsxs)(np,{show:!0,appear:!0,as:"div",className:t(ws)("memori-chat--bubble-container",{"memori-chat--bubble-from-user":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&h||l&&d}),children:[!e.fromUser&&(0,s.jsx)(np.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),title:(null===(v=e.emitter)||void 0===v?void 0:v.length)&&n.enableBoardOfExperts?e.emitter:n.name,children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:(null===(y=e.emitter)||void 0===y?void 0:y.length)&&n.enableBoardOfExperts?e.emitter:n.name,src:(null===(b=e.emitter)||void 0===b?void 0:b.length)&&n.enableBoardOfExperts&&(null==g?void 0:g.find((t=>t.name===e.emitter)))?`${o}/api/v1/memoriai/memori/avatar/${null===(x=g.find((t=>t.name===e.emitter)))||void 0===x?void 0:x.expertMemoriID}`:n.avatarURL&&n.avatarURL.length>0?fv({type:"avatar",tenantID:null==r?void 0:r.id,resourceURI:n.avatarURL,baseURL:i,apiURL:o}):fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:i||"https://www.aisuru.com",apiURL:o}),onError:e=>{e.currentTarget.src=n.avatarURL&&n.avatarURL.length>0?fv({type:"avatar",tenantID:null==r?void 0:r.id,resourceURI:n.avatarURL,baseURL:i}):fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:i}),e.currentTarget.onerror=null}})}),(0,s.jsxs)(np.Child,{as:"div",className:t(ws)("memori-chat--bubble",{"memori-chat--user-bubble":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&h||l&&d,"memori-chat--ai-generated":e.generatedByAI&&h,"memori-chat--with-feedback":l}),enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),children:[(0,s.jsx)("div",{dir:"auto",className:"memori-chat--bubble-content",dangerouslySetInnerHTML:{__html:E}}),(e.generatedByAI&&h||l&&d)&&(0,s.jsxs)("div",{className:"memori-chat--bubble-addon",children:[l&&!!d&&(0,s.jsx)(zv,{memori:n,className:"memori-chat--bubble-feedback",dropdown:!0,onNegativeClick:e=>{e&&d(e)}}),e.generatedByAI&&h&&(0,s.jsx)(vv,{align:"left",content:_("generatedByAI"),className:"memori-chat--bubble-action-icon memori-chat--bubble-action-icon--ai",children:(0,s.jsx)("span",{children:(0,s.jsx)(gv,{title:_("generatedByAI")||void 0})})}),!e.fromUser&&e.questionAnswered&&o&&u&&(0,s.jsx)(Sf,{ghost:!0,shape:"circle",title:_("whyThisAnswer")||void 0,className:"memori-chat--bubble-action-icon",onClick:()=>A(!0),disabled:C,icon:(0,s.jsx)(jv,{title:_("whyThisAnswer")||void 0})})]})]}),e.fromUser&&(0,s.jsx)(s.Fragment,{children:m&&"string"==typeof m||!m&&(null===(S=null==f?void 0:f.avatarURL)||void 0===S?void 0:S.length)?(0,s.jsx)(np.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:null!==(w=null==f?void 0:f.userName)&&void 0!==w?w:"User",src:null!=m?m:null==f?void 0:f.avatarURL})}):m?(0,s.jsx)(np.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:m}):(0,s.jsx)(np.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)(mv,{})})})]}),C&&o&&(0,s.jsx)(_x,{visible:C,message:e,closeDrawer:()=>A(!1),apiURL:o,sessionID:a})]})};c=o("85Hg2"),c=o("85Hg2");function Ix(e=0){let[t,n]=(0,c.useState)(e),r=(0,c.useCallback)((e=>n((t=>t|e))),[t]),i=(0,c.useCallback)((e=>Boolean(t&e)),[t]),o=(0,c.useCallback)((e=>n((t=>t&~e))),[n]),s=(0,c.useCallback)((e=>n((t=>t^e))),[n]);return{addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:s}}let Rx=(0,(c=o("85Hg2")).createContext)(null);function Px(){let e=(0,c.useContext)(Rx);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Px),e}return e}function kx(){let[e,n]=(0,c.useState)([]);return[e.length>0?e.join(" "):void 0,(0,c.useMemo)((()=>function(e){let r=Mh((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,c.useMemo)((()=>({register:r,slot:e.slot,name:e.name,props:e.props})),[r,e.slot,e.name,e.props]);return t(c).createElement(Rx.Provider,{value:i},e.children)}),[n])]}let Ox=mh((function(e,t){let{passive:n=!1,...r}=e,i=Px(),o=`headlessui-label-${cp()}`,s=Ph(t);_h((()=>i.register(o)),[o,i.register]);let a={ref:s,...i.props,id:o};return n&&("onClick"in a&&delete a.onClick,"onClick"in r&&delete r.onClick),hh({ourProps:a,theirProps:r,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})}));var Nx,Lx=((Nx=Lx||{})[Nx.RegisterOption=0]="RegisterOption",Nx[Nx.UnregisterOption=1]="UnregisterOption",Nx);let Dx={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Cp(n,(e=>e.element.current))}},1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},Bx=(0,c.createContext)(null);function zx(e){let t=(0,c.useContext)(Bx);if(null===t){let t=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zx),t}return t}function Fx(e,t){return lh(t.type,Dx,e,t)}Bx.displayName="RadioGroupContext";let Ux=mh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,...u}=e,d=Mh("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a),[h,p]=(0,c.useReducer)(Fx,{options:[]}),f=h.options,[m,g]=kx(),[v,y]=Zp(),b=`headlessui-radiogroup-${cp()}`,x=(0,c.useRef)(null),S=Ph(x,n),[w,_]=ym(r,s,i),C=(0,c.useMemo)((()=>f.find((e=>!e.propsRef.current.disabled))),[f]),A=(0,c.useMemo)((()=>f.some((e=>d(e.propsRef.current.value,w)))),[f,w]),E=Mh((e=>{var t;if(l||d(e,w))return!1;let n=null==(t=f.find((t=>d(t.propsRef.current.value,e))))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==_||_(e),!0)}));dm({container:x.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=Mh((e=>{let t=x.current;if(!t)return;let n=hp(t),r=f.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case ip.Enter:vm(e.currentTarget);break;case ip.ArrowLeft:case ip.ArrowUp:if(e.preventDefault(),e.stopPropagation(),Ep(r,mp.Previous|mp.WrapAround)===gp.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case ip.ArrowRight:case ip.ArrowDown:if(e.preventDefault(),e.stopPropagation(),Ep(r,mp.Next|mp.WrapAround)===gp.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case ip.Space:{e.preventDefault(),e.stopPropagation();let t=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));t&&E(t.propsRef.current.value)}}})),M=Mh((e=>(p({type:0,...e}),()=>p({type:1,id:e.id})))),I=(0,c.useMemo)((()=>({registerOption:M,firstOption:C,containsCheckedOption:A,change:E,disabled:l,value:w,compare:d})),[M,C,A,E,l,w,d]),R={ref:S,id:b,role:"radiogroup","aria-labelledby":m,"aria-describedby":v,onKeyDown:T},P=(0,c.useMemo)((()=>({value:w})),[w]);return t(c).createElement(y,{name:"RadioGroup.Description"},t(c).createElement(g,{name:"RadioGroup.Label"},t(c).createElement(Bx.Provider,{value:I},null!=o&&null!=w&&fm({[o]:w}).map((([e,n])=>t(c).createElement(dp,{features:up.Hidden,...gh({key:e,as:"input",type:"radio",checked:null!=n,hidden:!0,readOnly:!0,name:e,value:n})}))),hh({ourProps:R,theirProps:u,slot:P,defaultTag:"div",name:"RadioGroup"}))))}));var jx=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(jx||{});let Hx=mh((function(e,n){let r=(0,c.useRef)(null),i=Ph(r,n),o=`headlessui-radiogroup-option-${cp()}`,[s,a]=kx(),[l,u]=Zp(),{addFlag:d,removeFlag:h,hasFlag:p}=Ix(1),{value:f,disabled:m=!1,...g}=e,v=(0,c.useRef)({value:f,disabled:m});_h((()=>{v.current.value=f}),[f,v]),_h((()=>{v.current.disabled=m}),[m,v]);let{registerOption:y,disabled:b,change:x,firstOption:S,containsCheckedOption:w,value:_,compare:C}=zx("RadioGroup.Option");_h((()=>y({id:o,element:r,propsRef:v})),[o,y,r,e]);let A=Mh((e=>{var t;if(op(e.currentTarget))return e.preventDefault();!x(f)||(d(2),null==(t=r.current)||t.focus())})),E=Mh((e=>{if(op(e.currentTarget))return e.preventDefault();d(2)})),T=Mh((()=>h(2))),M=(null==S?void 0:S.id)===o,I=b||m,R=C(_,f),P={ref:i,id:o,role:"radio","aria-checked":R?"true":"false","aria-labelledby":s,"aria-describedby":l,"aria-disabled":!!I||void 0,tabIndex:I?-1:R||!w&&M?0:-1,onClick:I?void 0:A,onFocus:I?void 0:E,onBlur:I?void 0:T},k=(0,c.useMemo)((()=>({checked:R,disabled:I,active:p(2)})),[R,I,p]);return t(c).createElement(u,{name:"RadioGroup.Description"},t(c).createElement(a,{name:"RadioGroup.Label"},hh({ourProps:P,theirProps:g,slot:k,defaultTag:"div",name:"RadioGroup.Option"})))})),Vx=Object.assign(Ux,{Option:Hx,Label:Ox,Description:Xp});var Gx=({sendOnEnter:e,setSendOnEnter:n})=>{const{t:r}=Se();return(0,s.jsxs)(Ov,{as:"div",className:"memori-send-on-enter-menu",children:[(0,s.jsx)(Ov.Button,{className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button","memori--conversation-button"),children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)("span",{style:{display:"block",width:"1rem",height:"1rem"},children:"…"})})}),(0,s.jsx)(Ov.Items,{className:"memori-menu--overlay",children:(0,s.jsxs)(Vx,{value:e,onChange:n,children:[(0,s.jsx)(Vx.Option,{value:"keypress",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(Ov.Item,{children:(0,s.jsx)(Sf,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:r("widget.sendOnKeypress")})})}),(0,s.jsx)(Vx.Option,{value:"click",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(Ov.Item,{children:(0,s.jsx)(Sf,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:r("widget.sendOnClick")})})})]})})]})};c=o("85Hg2");var Wx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L863.9 169a7.9 7.9 0 0 0-8.9-8.9zM416.6 562.3a8.03 8.03 0 0 0-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"})});var qx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 0 0 0 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 0 0 391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 0 0-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"})});var Kx=({disabled:e=!1,value:n,onChange:r,onPressEnter:i,onFocus:o,onBlur:a})=>{const{t:l}=Se(),[u,d]=(0,c.useState)(!1);return(0,s.jsx)("div",{"data-testid":"chat-textarea",className:t(ws)("memori-chat-textarea",{"memori-chat-textarea--expanded":u,"memori-chat-textarea--disabled":e}),children:(0,s.jsxs)("div",{className:"memori-chat-textarea--inner",children:[(0,s.jsx)("textarea",{className:"memori-chat-textarea--input",disabled:e,value:n,onChange:e=>{r(e.target.value)},onKeyDownCapture:e=>{"Enter"===e.key&&!e.shiftKey&&i&&i(e)},onFocus:o,onBlur:a}),(0,s.jsx)("div",{className:"memori-chat-textarea--expand",children:(0,s.jsx)(Sf,{className:t(ws)("memori-chat-textarea--expand-button"),onClick:()=>d(!u),padded:!1,ghost:!0,title:u?l("collapse")||"Collapse":l("expand")||"Expand",icon:u?(0,s.jsx)(qx,{}):(0,s.jsx)(Wx,{})})})]})})};var Jx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})});c=o("85Hg2");var Qx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"})});var Yx=({listening:e,stopAudio:n,startListening:r,stopListening:i})=>{const{t:o}=Se(),[a,l]=(0,c.useState)(),u=(0,c.useRef)(null),d=e=>{e.preventDefault(),l(o("write_and_speak.holdToSpeak")||"Hold to record"),u.current||(u.current=setTimeout((()=>{n(),l(o("write_and_speak.releaseToEndListening")||"Release to end listening"),r()}),300))},h=()=>{u.current&&(clearTimeout(u.current),u.current=null),i(),l(void 0)};return(0,c.useEffect)((()=>()=>h()),[]),(0,s.jsx)(vv,{visible:!!a,content:(0,s.jsx)("span",{children:a||o("write_and_speak.pressAndHoldToSpeak")||"Press and hold to speak"}),align:"topLeft",className:"memori-mic-btn-tooltip",children:(0,s.jsx)(Sf,{primary:!0,className:t(ws)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":e}),title:e?o("write_and_speak.micButtonPopoverListening")||"Listening":o("write_and_speak.micButtonPopover")||"Start listening",onMouseDown:d,onTouchStart:d,onMouseUp:h,onMouseLeave:h,onTouchEnd:h,shape:"circle",icon:(0,s.jsx)(Qx,{})})})};var Zx=({dialogState:e,sendOnEnter:n="click",setSendOnEnter:r,userMessage:i="",onChangeUserMessage:o,sendMessage:a,onTextareaFocus:l,onTextareaBlur:c,onTextareaPressEnter:u,showMicrophone:d=!1,microphoneMode:h="HOLD_TO_TALK",listening:p=!1,stopAudio:f,startListening:m,stopListening:g})=>{const{t:v}=Se();return(0,s.jsxs)("fieldset",{id:"chat-fieldset",className:"memori-chat-inputs",disabled:"X2a"===(null==e?void 0:e.state)||"X3"===(null==e?void 0:e.state),children:[(0,s.jsx)(Gx,{sendOnEnter:n,setSendOnEnter:r}),(0,s.jsx)(Kx,{value:i,onChange:o,onPressEnter:u,onFocus:l,onBlur:c,disabled:["R2","R3","R4","R5","G3","X3"].includes((null==e?void 0:e.state)||"")}),(0,s.jsx)(Sf,{shape:"circle",primary:!!(null==i?void 0:i.length),disabled:!i||0===i.length,className:"memori-chat-inputs--send",onClick:()=>{a(i),f(),speechSynthesis.speak(new SpeechSynthesisUtterance(""))},title:v("send")||"Send",icon:(0,s.jsx)(Jx,{})}),d&&"HOLD_TO_TALK"===h&&(0,s.jsx)(Yx,{listening:p,startListening:m,stopListening:()=>{g(),(null==i?void 0:i.length)&&a(i)},stopAudio:f}),d&&"CONTINUOUS"===h&&(0,s.jsx)(Sf,{primary:!0,className:t(ws)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":p}),title:p?v("write_and_speak.micButtonPopoverListening")||"Listening":v("write_and_speak.micButtonPopover")||"Start listening",onClick:()=>{p?g():(f(),m())},shape:"circle",icon:(0,s.jsx)(Qx,{})})]})};c=o("85Hg2");const Xx={en:[{delayAfter:3,text:"Generating an accurate and fancy response..."},{delayAfter:3,text:"Generating a response that will blow your mind..."},{delayAfter:3,text:"Generating a response that will make you smile..."},{delayAfter:3,text:"Thinking of a response..."},{delayAfter:3,text:"Thinking of a response that will make you smile..."},{delayAfter:3,text:"Gathering my thoughts..."},{delayAfter:3,text:"Gathering my thoughts to give you a response..."}],it:[{delayAfter:3,text:"Sto generando una risposta accurata e fantasiosa..."},{delayAfter:3,text:"Sto generando una risposta che ti farà impazzire..."},{delayAfter:3,text:"Sto generando una risposta che ti farà sorridere..."},{delayAfter:3,text:"Sto pensando ad una risposta..."},{delayAfter:3,text:"Sto pensando ad una risposta che ti farà sorridere..."},{delayAfter:3,text:"Sto raccogliendo i miei pensieri..."},{delayAfter:3,text:"Sto raccogliendo i miei pensieri per darti una risposta..."}]},$x=(e=3)=>new Array(20*e).fill(" ").join("");var eS=({useDefaultSentences:e=!1,lang:t="en",sentence:n,sentences:r})=>{var i;const[o,a]=(0,c.useState)(0),[l,u]=(0,c.useState)((null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.length)?`${r[t][0].text.endsWith("...")||!r[t][0].text.length?r[t][0].text:`${r[t][0].text}...`}${$x(r[t][0].delayAfter)}`:n?`${n.endsWith("...")||!n.length?n:`${n}...`}${$x()}`:""),[d,h]=(0,c.useState)("");return(0,c.useEffect)((()=>{const i=setInterval((()=>{var i;const s=l[d.length];if(void 0!==s&&l.length>0)h((e=>e+s));else if((null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.length)&&o<r[t].length-1){const e=o+1,n=r[t][e];u(`${n.text.endsWith("...")||!n.text.length?n.text:`${n.text}...`}${$x(n.delayAfter)}`),h(""),a(e)}else if(!r&&!n&&e){const e=Xx[t][Math.floor(Math.random()*Xx[t].length)];u(`${e.text}${$x(e.delayAfter)}`),h("")}}),50);return()=>clearInterval(i)})),(0,s.jsx)("div",{className:"memori-chat--bubble",children:(0,s.jsxs)("div",{className:"memori-chat--bubble-typing",children:[(0,s.jsxs)("div",{id:"wave",children:[(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"})]}),l.length>0&&(0,s.jsx)("p",{children:d})]})})};var tS=(0,c.memo)((({memori:e,tenant:n,sessionID:r,baseUrl:i,apiUrl:o,translateTo:a,memoriTyping:l,typingText:u,showTypingText:d=!1,history:h=[],authToken:p,dialogState:f,simulateUserPrompt:m,showDates:g=!1,showContextPerLine:v=!1,showAIicon:y=!0,showWhyThisAnswer:b=!0,selectReceiverTag:x,preview:S=!1,instruct:w=!1,showInputs:_=!0,showMicrophone:C=!1,microphoneMode:A="HOLD_TO_TALK",sendOnEnter:E,setSendOnEnter:T,attachmentsMenuOpen:M,setAttachmentsMenuOpen:I,userMessage:R="",onChangeUserMessage:P,sendMessage:k,listening:O,isPlayingAudio:N,stopAudio:L,startListening:D,stopListening:B,resetTranscript:z,customMediaRenderer:F,user:U,userAvatar:j,experts:H})=>{var V,G,W,q,K,J,Q,Y;const Z=()=>{setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),200)};(0,c.useEffect)((()=>{!S&&Z()}),[h,S]);return(0,s.jsxs)("div",{className:t(ws)("memori-chat--wrapper",{"memori-chat-wrapper--translate":a}),id:"chat-wrapper",lang:null==a?void 0:a.toUpperCase(),"data-memori-lang":null!==(q=null===(W=null===(G=null===(V=e.culture)||void 0===V?void 0:V.split("-"))||void 0===G?void 0:G[0])||void 0===W?void 0:W.toUpperCase())&&void 0!==q?q:"EN",children:[(0,s.jsx)("div",{className:t(ws)("memori-chat--history",{"memori-chat--history-touch":Zf()}),children:(0,s.jsxs)("div",{className:t(ws)("memori-chat--content",{"memori-chat--content-touch":Zf()}),children:[(0,s.jsx)("div",{className:t(ws)("memori-chat--cover"),style:{backgroundImage:`url("${fv({type:"cover",tenantID:null==n?void 0:n.id,resourceURI:e.coverURL,baseURL:i,apiURL:o})}"), url("${fv({type:"cover",tenantID:null==n?void 0:n.id,baseURL:i||"https://www.aisuru.com",apiURL:o})}")`}}),h.map(((l,u)=>{var d,p,x,S;return(0,s.jsxs)(t(c).Fragment,{children:[(0,s.jsx)(Mx,{isFirst:0===u,message:l,memori:e,tenant:n,baseUrl:i,apiUrl:o,sessionID:r,simulateUserPrompt:m,showAIicon:y,showWhyThisAnswer:b,showFeedback:u===h.length-1&&!l.fromUser&&(null==f?void 0:f.acceptsFeedback),user:U,userAvatar:j,experts:H}),g&&!!l.timestamp&&(0,s.jsx)("small",{className:"memori-chat--timestamp "+(l.fromUser?"text-right":"text-left"),children:new Intl.DateTimeFormat("it",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l.timestamp.endsWith("Z")?l.timestamp:`${l.timestamp}Z`))}),v&&!!Object.keys(null!==(d=l.contextVars)&&void 0!==d?d:{}).length&&(0,s.jsx)("div",{className:"memori-chat--context-vars",children:Object.keys(null!==(p=l.contextVars)&&void 0!==p?p:{}).map((e=>{var t,n,r;return"-"===(null===(t=l.contextVars)||void 0===t?void 0:t[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag memori-chat--context-tag-canceled",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):"✔️"===(null===(n=l.contextVars)||void 0===n?void 0:n[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsxs)("span",{className:"memori-chat--context-tag-text",children:[e,": ",null===(r=l.contextVars)||void 0===r?void 0:r[e]]})},e)}))}),(0,s.jsx)(Sx,{simulateUserPrompt:m,media:null===(x=null==l?void 0:l.media)||void 0===x?void 0:x.filter((e=>"text/html"!==e.mimeType&&"text/plain"!==e.mimeType)),links:null===(S=null==l?void 0:l.media)||void 0===S?void 0:S.filter((e=>"text/html"===e.mimeType)),sessionID:r,baseUrl:i,apiUrl:o,translateTo:a,customMediaRenderer:F})]},u)})),(null==f?void 0:f.hints)&&f.hints.length>0&&!l&&(0,s.jsx)(Sx,{simulateUserPrompt:m,hints:f.translatedHints?f.translatedHints:f.hints.map((e=>({text:e,originalText:e})))}),!!l&&(0,s.jsx)(eS,{useDefaultSentences:d,lang:a?"it"===a.toLowerCase()?"it":"en":"it"===(null===(Q=null===(J=null===(K=e.culture)||void 0===K?void 0:K.split("-"))||void 0===J?void 0:J[0])||void 0===Q?void 0:Q.toLowerCase())?"it":"en",sentence:u,sentences:e.enableBoardOfExperts?Qv:void 0},u),(0,s.jsx)("div",{id:"end-messages-ref"})]})}),"X3"===(null==f?void 0:f.state)&&r&&(0,s.jsx)("div",{className:"memori-chat--known-tags",children:Object.keys(null!==(Y=f.knownTags)&&void 0!==Y?Y:{}).filter((t=>t!==e.giverTag)).map((e=>{var t;return(0,s.jsx)(Sf,{icon:(0,s.jsx)("span",{className:"memori-chat--known-tag-icon",children:e}),className:"memori-chat--known-tag",onClick:()=>x(e),children:null===(t=f.knownTags)||void 0===t?void 0:t[e]},e)}))}),_&&(0,s.jsx)(Zx,{userMessage:R,onChangeUserMessage:P,dialogState:f,instruct:w,authToken:p,sendMessage:k,microphoneMode:A,sendOnEnter:E,setSendOnEnter:T,attachmentsMenuOpen:M,setAttachmentsMenuOpen:I,onTextareaPressEnter:()=>{"keypress"===E&&(null==R?void 0:R.length)>0&&(B(),k(R),P(""),z())},onTextareaFocus:()=>{var e,t,n,r;B(),Zf()&&window.innerWidth<=768&&(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t||t.add("chat-focused"),null===(r=null===(n=document.querySelector(".memori.memori-widget"))||void 0===n?void 0:n.classList)||void 0===r||r.add("chat-focused"),setTimeout((()=>{Z()}),300))},onTextareaBlur:()=>{var e,t,n,r,i;(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t?void 0:t.contains("chat-focused"))&&(null===(n=document.getElementById("chat-wrapper"))||void 0===n||n.classList.remove("chat-focused"),null===(i=null===(r=document.querySelector(".memori.memori-widget"))||void 0===r?void 0:r.classList)||void 0===i||i.remove("chat-focused"),Z())},startListening:D,stopListening:B,stopAudio:L,listening:O,isPlayingAudio:N,showMicrophone:C})]})}));c=o("85Hg2");var nS=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z"}),(0,s.jsx)("path",{d:"M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4c-1.3-3.2-4.3-5.4-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z"})]});var rS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"})});var iS=({memoriName:e,blockedUntil:t,notEnoughCredits:n=!1,showGiverInfo:r=!1,showTitle:i=!1,marginLeft:o=!1})=>{const{t:a}=Se(),l=new Date(t||Date.now());return n||l>new Date(Date.now())?(0,s.jsx)(vv,{className:"blocked-memori-badge--tooltip",content:n?(0,s.jsx)(s.Fragment,{children:a("notEnoughCredits")}):(0,s.jsxs)(s.Fragment,{children:[!r&&a("memoriBlockedAnon",{name:e,date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(l)}),r&&a("memoriBlockedUntil",{date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(l)}),r&&` ${a("memoriBlockedReasonExceedChats")}`,r&&(0,s.jsx)("br",{}),r&&`\n${a("memoriBlockedGiverHelper")}`]}),children:(0,s.jsxs)("div",{className:"blocked-memori-badge--wrapper",children:[(0,s.jsx)("div",{className:"blocked-memori-badge "+(o?" margin-left":""),children:(0,s.jsx)(rS,{className:"blocked-memori-badge--icon"})}),i&&(0,s.jsx)("span",{className:"blocked-memori-badge--title",children:a("memoriBlockedTitle")})]})}):null};var oS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",width:"20",height:"16",viewBox:"0 0 640 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M211.2 96a64 64 0 10-128 0 64 64 0 10128 0zM32 256c0 17.7 14.3 32 32 32h85.6c10.1-39.4 38.6-71.5 75.8-86.6-9.7-6-21.2-9.4-33.4-9.4H96c-35.3 0-64 28.7-64 64zm461.6 32H576c17.7 0 32-14.3 32-32 0-35.3-28.7-64-64-64h-96c-11.7 0-22.7 3.1-32.1 8.6 38.1 14.8 67.4 47.3 77.7 87.4zm-102.4-61.6c-6.9-1.6-14.2-2.4-21.6-2.4h-96c-8.5 0-16.7 1.1-24.5 3.1-30.8 8.1-55.6 31.1-66.1 60.9-3.5 10-5.5 20.8-5.5 32 0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32 0-11.2-1.9-22-5.5-32-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 10-128 0 64 64 0 10128 0zm-241.6 96a80 80 0 100-160 80 80 0 100 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32h576c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"})});var sS=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",width:"20",height:"20",viewBox:"0 0 48 48",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M30.106 48v-2.745a2.213 2.213 0 012.213-2.212h6.11a2.392 2.392 0 002.326-2.466v-3.223a1.834 1.834 0 01.459-1.145 2.912 2.912 0 00.712-1.926l-.007-.667a1.016 1.016 0 01.651-.952h1.067a1.363 1.363 0 001.051-.456 1.304 1.304 0 00.19-1.395 67.032 67.032 0 01-3.037-7.51 4.767 4.767 0 01-.217-1.507l-.002-4.994a14.513 14.513 0 00-.552-3.963l-.006-.022a13.959 13.959 0 00-3.137-5.702q-.479-.516-1.006-1.003a17.67 17.67 0 00-.677-.623A18.303 18.303 0 0024.194 1a19.617 19.617 0 00-12.539 4.489 17.555 17.555 0 00-3.945 21.69C9.945 31.507 11.694 38.622 12.14 46v2",strokeMiterlimit:10}),(0,s.jsx)("path",{d:"M27.917 12L31.417 12"}),(0,s.jsx)("path",{d:"M27.917 26L31.417 26"}),(0,s.jsx)("path",{d:"M29.667 12L29.667 26"}),(0,s.jsx)("path",{d:"M23.992 26L19.904 12 19.226 12 15.159 26"}),(0,s.jsx)("path",{d:"M16.854 21.133L22.276 21.133"})]});c=o("85Hg2");var aS=({forceStatus:e,provider:t})=>{var n;const{t:r}=Se(),[i,o]=(0,c.useState)(null!=e?e:"operational"),a=(e=>{switch(e){case"DEFAULT":case"OpenAI":return{getStatus:async()=>{var e;const t=await fetch("https://status.openai.com/api/v2/summary.json"),n=null===(e=(await t.json()).components.find((e=>"API"===e.name)))||void 0===e?void 0:e.status;return null!=n?n:"operational"},statusPage:"https://status.openai.com/"};default:return{getStatus:async()=>"operational",statusPage:""}}})(t);return(0,c.useEffect)((()=>{e||a.getStatus().then((e=>o(e))).catch(console.log)}),[e,t]),"operational"!==i?(0,s.jsx)(vv,{className:"memori--completion-provider-status--tooltip",align:"topLeft",content:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:r("completionProviderDown",{provider:null!=t?t:r("completionProviderFallbackName")})}),!!(null===(n=a.statusPage)||void 0===n?void 0:n.length)&&(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:a.statusPage,rel:"noopener noreferrer",target:"_blank",children:r("completionProviderCheckStatusPage")})})]}),children:(0,s.jsx)(rS,{className:"memori--completion-provider-status--icon"})}):null};var lS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"})});var cS=({memori:e,tenant:t,gamificationLevel:n,language:r,userLang:i,setUserLang:o,baseUrl:a,apiUrl:l,position:u,openPositionDrawer:d,integrationConfig:h,instruct:p=!1,clickedStart:f,onClickStart:m,initializeTTS:g,_TEST_forceProviderStatus:v,isUserLoggedIn:y=!1,user:b,showLogin:x=!1,setShowLoginDrawer:S,notEnoughCredits:w=!1})=>{var _,C;const{t:A,i18n:E}=Se(),[T,M]=(0,c.useState)(e.description),[I,R]=(0,c.useState)(!0);return(0,c.useEffect)((()=>{var t,n,i,o,s,l;(null!==(n=null===(t=E.language)||void 0===t?void 0:t.toUpperCase())&&void 0!==n?n:"IT")!==(null!==(i=null==r?void 0:r.toUpperCase())&&void 0!==i?i:"IT")&&(null===(o=e.description)||void 0===o?void 0:o.length)&&px(e.description,null!==(l=null===(s=E.language)||void 0===s?void 0:s.toUpperCase())&&void 0!==l?l:"IT",r,a).then((e=>{M(e.text)})).catch(console.error)}),[E.language,r,e.description,a]),(0,s.jsxs)("div",{className:"memori--start-panel",children:[(0,s.jsxs)("div",{className:"memori--cover",style:{backgroundImage:`url("${fv({type:"cover",tenantID:null==t?void 0:t.id,resourceURI:e.coverURL,baseURL:a,apiURL:l})}"), url("${fv({type:"cover",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})}")`},children:[!!(null===(_=null==n?void 0:n.badge)||void 0===_?void 0:_.length)&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--gamification-badge",children:(0,s.jsx)(vv,{align:"left",content:`${A("gamification.level")} ${n.badge}, ${n.points} ${A("gamification.points")}`,children:(0,s.jsx)("span",{"aria-label":`${A("gamification.level")} ${n.badge}, ${n.points} ${A("gamification.points")}`,children:n.badge})})}),!!e.enableCompletions&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--completions-enabled",children:(0,s.jsx)(vv,{align:"left",content:A("completionsEnabled"),children:(0,s.jsx)("span",{"aria-label":A("completionsEnabled")||"Completions",children:(0,s.jsx)(gv,{})})})}),!!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--board-of-experts",children:(0,s.jsx)(vv,{align:"left",content:A("boardOfExperts"),children:(0,s.jsx)("span",{"aria-label":A("boardOfExperts")||"Board of Experts",children:(0,s.jsx)(oS,{})})})}),!!e.nsfw&&(0,s.jsx)("div",{className:"memori--nsfw",children:(0,s.jsx)(vv,{align:"left",content:A("nsfw"),children:(0,s.jsx)("span",{title:A("nsfw")||"NSFW",children:"🔞"})})})]}),(0,s.jsxs)("picture",{className:"memori--avatar",children:[(0,s.jsx)("source",{src:null!==(C=e.avatarURL)&&void 0!==C?C:fv({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l})}),(0,s.jsx)("img",{alt:e.name,src:e.avatarURL&&e.avatarURL.length>0?fv({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l}):fv({type:"avatar",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})})]}),(0,s.jsx)("h2",{className:"memori--title",children:e.name}),e.needsPosition&&!u&&(0,s.jsxs)("div",{className:"memori--needsPosition",children:[(0,s.jsx)("p",{children:A("write_and_speak.requirePositionHelp",{name:e.name})}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>d(),className:"memori--start-button",icon:(0,s.jsx)(lS,{}),children:A("widget.position")})]}),(e.needsPosition&&u||!e.needsPosition)&&(0,s.jsxs)("div",{className:"memori--description",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"memori--description-text",children:T&&I?T:e.description}),T!==e.description&&(0,s.jsx)(Sf,{ghost:!0,className:"memori--translation-toggle",icon:(0,s.jsx)(nS,{}),onClick:()=>{R((e=>!e))},children:A(I?"showOriginalText":"showTranslatedText")})]}),(null==h?void 0:h.multilanguage)&&!p&&(0,s.jsxs)("div",{className:"memori--language-chooser",children:[(0,s.jsx)("label",{id:"user-lang-pref-label",htmlFor:"user-lang-pref",children:A("write_and_speak.iWantToTalkToIn",{name:e.name})}),(0,s.jsx)("select",{id:"user-lang-pref",className:"memori-select--button",value:(null!=i?i:E.language).toUpperCase(),"aria-labelledby":"user-lang-pref-label",onChange:e=>{o(e.target.value)},children:qv.map((e=>(0,s.jsx)("option",{value:e.value,"aria-label":e.label,children:e.label},e.value)))})]}),(0,s.jsx)(Sf,{primary:!0,disabled:!!e.blockedUntil&&!e.isGiver||w,loading:f,onClick:e=>{try{window.speechSynthesis.speak(new SpeechSynthesisUtterance(""))}catch(e){console.error(e)}g&&g(),m&&m()},className:"memori--start-button",children:A("write_and_speak."+(p?"instructButton":"tryMeButton"))}),(0,s.jsx)(aS,{provider:e.completionProvider,forceStatus:v}),(0,s.jsx)("p",{className:"memori--start-description",children:A(p?"write_and_speak.pageInstructExplanation":"write_and_speak.pageTryMeExplanation")}),(e.blockedUntil||w)&&(0,s.jsx)(iS,{memoriName:e.name,blockedUntil:e.blockedUntil,notEnoughCredits:w,showGiverInfo:e.isGiver,showTitle:!0,marginLeft:!0}),!!e.enableDeepThought&&!p&&(0,s.jsxs)("div",{className:"memori--deep-thought-disclaimer",children:[(0,s.jsx)(vv,{align:"left",content:A("deepThoughtHelper"),children:(0,s.jsx)(sS,{})}),(0,s.jsx)("h2",{children:y&&(null==b?void 0:b.pAndCUAccepted)?A("deepThoughtDisclaimerTitle"):A("deepThought")}),y&&!(null==b?void 0:b.pAndCUAccepted)&&(0,s.jsx)("p",{children:A("deepThoughtPreDisclaimerNotAllowed")}),!y&&(0,s.jsx)("p",{children:A("deepThoughtPreDisclaimerUnlogged")}),!y&&x&&(0,s.jsx)("p",{children:(0,s.jsx)(Sf,{outlined:!0,padded:!1,onClick:()=>S(!0),children:"Login"})}),(0,s.jsx)("p",{className:"memori--deep-thought-disclaimer-text",children:A("deepThoughtDisclaimer")})]})]})]})},uS=(c=o("85Hg2"),c=o("85Hg2"),Z=o("hcaHr"),c=o("85Hg2"),["forwardedRef"]);function dS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hS(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?dS(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dS(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class pS extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,s.jsxs)("div",{style:{background:"rgba(255, 255, 255, 0.4)",color:"#000",padding:"2rem",borderRadius:"10px"},children:[(0,s.jsx)("h2",{children:this.props.t("error.generic")}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>this.setState({hasError:!1}),children:this.props.t("error.tryAgain")||"Try again"})]}):this.props.children}}var fS=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){function i(i){var o=i.forwardedRef,s=t(uy)(i,uS),a=Se(e,hS(hS({},s),{},{keyPrefix:n.keyPrefix})),l=t(Z)(a,3),u=l[0],d=l[1],h=l[2],p=hS(hS({},s),{},{t:u,i18n:d,tReady:h});return n.withRef&&o?p.ref=o:!n.withRef&&o&&(p.forwardedRef=o),(0,c.createElement)(r,p)}i.displayName="withI18nextTranslation(".concat(ve(r),")"),i.WrappedComponent=r;return n.withRef?(0,c.forwardRef)((function(e,t){return(0,c.createElement)(i,Object.assign({},e,{forwardedRef:t}))})):i}}(["common"])(pS),mS=(c=o("85Hg2"),c=o("85Hg2"),{});e(mS,"REVISION",(()=>gS)),e(mS,"MOUSE",(()=>vS)),e(mS,"TOUCH",(()=>yS)),e(mS,"CullFaceNone",(()=>bS)),e(mS,"CullFaceBack",(()=>xS)),e(mS,"CullFaceFront",(()=>SS)),e(mS,"CullFaceFrontBack",(()=>wS)),e(mS,"BasicShadowMap",(()=>_S)),e(mS,"PCFShadowMap",(()=>CS)),e(mS,"PCFSoftShadowMap",(()=>AS)),e(mS,"VSMShadowMap",(()=>ES)),e(mS,"FrontSide",(()=>TS)),e(mS,"BackSide",(()=>MS)),e(mS,"DoubleSide",(()=>IS)),e(mS,"NoBlending",(()=>RS)),e(mS,"NormalBlending",(()=>PS)),e(mS,"AdditiveBlending",(()=>kS)),e(mS,"SubtractiveBlending",(()=>OS)),e(mS,"MultiplyBlending",(()=>NS)),e(mS,"CustomBlending",(()=>LS)),e(mS,"AddEquation",(()=>DS)),e(mS,"SubtractEquation",(()=>BS)),e(mS,"ReverseSubtractEquation",(()=>zS)),e(mS,"MinEquation",(()=>FS)),e(mS,"MaxEquation",(()=>US)),e(mS,"ZeroFactor",(()=>jS)),e(mS,"OneFactor",(()=>HS)),e(mS,"SrcColorFactor",(()=>VS)),e(mS,"OneMinusSrcColorFactor",(()=>GS)),e(mS,"SrcAlphaFactor",(()=>WS)),e(mS,"OneMinusSrcAlphaFactor",(()=>qS)),e(mS,"DstAlphaFactor",(()=>KS)),e(mS,"OneMinusDstAlphaFactor",(()=>JS)),e(mS,"DstColorFactor",(()=>QS)),e(mS,"OneMinusDstColorFactor",(()=>YS)),e(mS,"SrcAlphaSaturateFactor",(()=>ZS)),e(mS,"NeverDepth",(()=>XS)),e(mS,"AlwaysDepth",(()=>$S)),e(mS,"LessDepth",(()=>ew)),e(mS,"LessEqualDepth",(()=>tw)),e(mS,"EqualDepth",(()=>nw)),e(mS,"GreaterEqualDepth",(()=>rw)),e(mS,"GreaterDepth",(()=>iw)),e(mS,"NotEqualDepth",(()=>ow)),e(mS,"MultiplyOperation",(()=>sw)),e(mS,"MixOperation",(()=>aw)),e(mS,"AddOperation",(()=>lw)),e(mS,"NoToneMapping",(()=>cw)),e(mS,"LinearToneMapping",(()=>uw)),e(mS,"ReinhardToneMapping",(()=>dw)),e(mS,"CineonToneMapping",(()=>hw)),e(mS,"ACESFilmicToneMapping",(()=>pw)),e(mS,"CustomToneMapping",(()=>fw)),e(mS,"UVMapping",(()=>mw)),e(mS,"CubeReflectionMapping",(()=>gw)),e(mS,"CubeRefractionMapping",(()=>vw)),e(mS,"EquirectangularReflectionMapping",(()=>yw)),e(mS,"EquirectangularRefractionMapping",(()=>bw)),e(mS,"CubeUVReflectionMapping",(()=>xw)),e(mS,"RepeatWrapping",(()=>Sw)),e(mS,"ClampToEdgeWrapping",(()=>ww)),e(mS,"MirroredRepeatWrapping",(()=>_w)),e(mS,"NearestFilter",(()=>Cw)),e(mS,"NearestMipmapNearestFilter",(()=>Aw)),e(mS,"NearestMipMapNearestFilter",(()=>Ew)),e(mS,"NearestMipmapLinearFilter",(()=>Tw)),e(mS,"NearestMipMapLinearFilter",(()=>Mw)),e(mS,"LinearFilter",(()=>Iw)),e(mS,"LinearMipmapNearestFilter",(()=>Rw)),e(mS,"LinearMipMapNearestFilter",(()=>Pw)),e(mS,"LinearMipmapLinearFilter",(()=>kw)),e(mS,"LinearMipMapLinearFilter",(()=>Ow)),e(mS,"UnsignedByteType",(()=>Nw)),e(mS,"ByteType",(()=>Lw)),e(mS,"ShortType",(()=>Dw)),e(mS,"UnsignedShortType",(()=>Bw)),e(mS,"IntType",(()=>zw)),e(mS,"UnsignedIntType",(()=>Fw)),e(mS,"FloatType",(()=>Uw)),e(mS,"HalfFloatType",(()=>jw)),e(mS,"UnsignedShort4444Type",(()=>Hw)),e(mS,"UnsignedShort5551Type",(()=>Vw)),e(mS,"UnsignedInt248Type",(()=>Gw)),e(mS,"AlphaFormat",(()=>Ww)),e(mS,"RGBFormat",(()=>qw)),e(mS,"RGBAFormat",(()=>Kw)),e(mS,"LuminanceFormat",(()=>Jw)),e(mS,"LuminanceAlphaFormat",(()=>Qw)),e(mS,"DepthFormat",(()=>Yw)),e(mS,"DepthStencilFormat",(()=>Zw)),e(mS,"RedFormat",(()=>Xw)),e(mS,"RedIntegerFormat",(()=>$w)),e(mS,"RGFormat",(()=>e_)),e(mS,"RGIntegerFormat",(()=>t_)),e(mS,"RGBAIntegerFormat",(()=>n_)),e(mS,"RGB_S3TC_DXT1_Format",(()=>r_)),e(mS,"RGBA_S3TC_DXT1_Format",(()=>i_)),e(mS,"RGBA_S3TC_DXT3_Format",(()=>o_)),e(mS,"RGBA_S3TC_DXT5_Format",(()=>s_)),e(mS,"RGB_PVRTC_4BPPV1_Format",(()=>a_)),e(mS,"RGB_PVRTC_2BPPV1_Format",(()=>l_)),e(mS,"RGBA_PVRTC_4BPPV1_Format",(()=>c_)),e(mS,"RGBA_PVRTC_2BPPV1_Format",(()=>u_)),e(mS,"RGB_ETC1_Format",(()=>d_)),e(mS,"RGB_ETC2_Format",(()=>h_)),e(mS,"RGBA_ETC2_EAC_Format",(()=>p_)),e(mS,"RGBA_ASTC_4x4_Format",(()=>f_)),e(mS,"RGBA_ASTC_5x4_Format",(()=>m_)),e(mS,"RGBA_ASTC_5x5_Format",(()=>g_)),e(mS,"RGBA_ASTC_6x5_Format",(()=>v_)),e(mS,"RGBA_ASTC_6x6_Format",(()=>y_)),e(mS,"RGBA_ASTC_8x5_Format",(()=>b_)),e(mS,"RGBA_ASTC_8x6_Format",(()=>x_)),e(mS,"RGBA_ASTC_8x8_Format",(()=>S_)),e(mS,"RGBA_ASTC_10x5_Format",(()=>w_)),e(mS,"RGBA_ASTC_10x6_Format",(()=>__)),e(mS,"RGBA_ASTC_10x8_Format",(()=>C_)),e(mS,"RGBA_ASTC_10x10_Format",(()=>A_)),e(mS,"RGBA_ASTC_12x10_Format",(()=>E_)),e(mS,"RGBA_ASTC_12x12_Format",(()=>T_)),e(mS,"RGBA_BPTC_Format",(()=>M_)),e(mS,"LoopOnce",(()=>I_)),e(mS,"LoopRepeat",(()=>R_)),e(mS,"LoopPingPong",(()=>P_)),e(mS,"InterpolateDiscrete",(()=>k_)),e(mS,"InterpolateLinear",(()=>O_)),e(mS,"InterpolateSmooth",(()=>N_)),e(mS,"ZeroCurvatureEnding",(()=>L_)),e(mS,"ZeroSlopeEnding",(()=>D_)),e(mS,"WrapAroundEnding",(()=>B_)),e(mS,"NormalAnimationBlendMode",(()=>z_)),e(mS,"AdditiveAnimationBlendMode",(()=>F_)),e(mS,"TrianglesDrawMode",(()=>U_)),e(mS,"TriangleStripDrawMode",(()=>j_)),e(mS,"TriangleFanDrawMode",(()=>H_)),e(mS,"LinearEncoding",(()=>V_)),e(mS,"sRGBEncoding",(()=>G_)),e(mS,"BasicDepthPacking",(()=>W_)),e(mS,"RGBADepthPacking",(()=>q_)),e(mS,"TangentSpaceNormalMap",(()=>K_)),e(mS,"ObjectSpaceNormalMap",(()=>J_)),e(mS,"NoColorSpace",(()=>Q_)),e(mS,"SRGBColorSpace",(()=>Y_)),e(mS,"LinearSRGBColorSpace",(()=>Z_)),e(mS,"ZeroStencilOp",(()=>X_)),e(mS,"KeepStencilOp",(()=>$_)),e(mS,"ReplaceStencilOp",(()=>eC)),e(mS,"IncrementStencilOp",(()=>tC)),e(mS,"DecrementStencilOp",(()=>nC)),e(mS,"IncrementWrapStencilOp",(()=>rC)),e(mS,"DecrementWrapStencilOp",(()=>iC)),e(mS,"InvertStencilOp",(()=>oC)),e(mS,"NeverStencilFunc",(()=>sC)),e(mS,"LessStencilFunc",(()=>aC)),e(mS,"EqualStencilFunc",(()=>lC)),e(mS,"LessEqualStencilFunc",(()=>cC)),e(mS,"GreaterStencilFunc",(()=>uC)),e(mS,"NotEqualStencilFunc",(()=>dC)),e(mS,"GreaterEqualStencilFunc",(()=>hC)),e(mS,"AlwaysStencilFunc",(()=>pC)),e(mS,"StaticDrawUsage",(()=>fC)),e(mS,"DynamicDrawUsage",(()=>mC)),e(mS,"StreamDrawUsage",(()=>gC)),e(mS,"StaticReadUsage",(()=>vC)),e(mS,"DynamicReadUsage",(()=>yC)),e(mS,"StreamReadUsage",(()=>bC)),e(mS,"StaticCopyUsage",(()=>xC)),e(mS,"DynamicCopyUsage",(()=>SC)),e(mS,"StreamCopyUsage",(()=>wC)),e(mS,"GLSL1",(()=>_C)),e(mS,"GLSL3",(()=>CC)),e(mS,"_SRGBAFormat",(()=>AC)),e(mS,"EventDispatcher",(()=>EC)),e(mS,"MathUtils",(()=>UC)),e(mS,"Vector2",(()=>jC)),e(mS,"Matrix3",(()=>HC)),e(mS,"ColorManagement",(()=>YC)),e(mS,"Color",(()=>rA)),e(mS,"ImageUtils",(()=>oA)),e(mS,"Source",(()=>sA)),e(mS,"Texture",(()=>cA)),e(mS,"Vector4",(()=>uA)),e(mS,"WebGLRenderTarget",(()=>dA)),e(mS,"DataArrayTexture",(()=>hA)),e(mS,"WebGLArrayRenderTarget",(()=>pA)),e(mS,"Data3DTexture",(()=>fA)),e(mS,"WebGL3DRenderTarget",(()=>mA)),e(mS,"WebGLMultipleRenderTargets",(()=>gA)),e(mS,"Quaternion",(()=>vA)),e(mS,"Vector3",(()=>yA)),e(mS,"Box3",(()=>SA)),e(mS,"Sphere",(()=>UA)),e(mS,"Ray",(()=>JA)),e(mS,"Matrix4",(()=>QA)),e(mS,"Euler",(()=>oE)),e(mS,"Layers",(()=>sE)),e(mS,"Object3D",(()=>xE)),e(mS,"Triangle",(()=>PE)),e(mS,"Material",(()=>OE)),e(mS,"MeshBasicMaterial",(()=>NE)),e(mS,"BufferAttribute",(()=>BE)),e(mS,"Int8BufferAttribute",(()=>zE)),e(mS,"Uint8BufferAttribute",(()=>FE)),e(mS,"Uint8ClampedBufferAttribute",(()=>UE)),e(mS,"Int16BufferAttribute",(()=>jE)),e(mS,"Uint16BufferAttribute",(()=>HE)),e(mS,"Int32BufferAttribute",(()=>VE)),e(mS,"Uint32BufferAttribute",(()=>GE)),e(mS,"Float16BufferAttribute",(()=>WE)),e(mS,"Float32BufferAttribute",(()=>qE)),e(mS,"Float64BufferAttribute",(()=>KE)),e(mS,"BufferGeometry",(()=>tT)),e(mS,"Mesh",(()=>bT)),e(mS,"BoxGeometry",(()=>ST)),e(mS,"UniformsUtils",(()=>CT)),e(mS,"ShaderMaterial",(()=>AT)),e(mS,"Camera",(()=>ET)),e(mS,"PerspectiveCamera",(()=>TT)),e(mS,"CubeCamera",(()=>IT)),e(mS,"CubeTexture",(()=>RT)),e(mS,"WebGLCubeRenderTarget",(()=>PT)),e(mS,"Plane",(()=>LT)),e(mS,"Frustum",(()=>zT)),e(mS,"PlaneGeometry",(()=>jT)),e(mS,"ShaderChunk",(()=>HT)),e(mS,"UniformsLib",(()=>VT)),e(mS,"ShaderLib",(()=>GT)),e(mS,"OrthographicCamera",(()=>ZT)),e(mS,"PMREMGenerator",(()=>sM)),e(mS,"MeshDepthMaterial",(()=>nR)),e(mS,"MeshDistanceMaterial",(()=>rR)),e(mS,"WebGLUtils",(()=>aR)),e(mS,"ArrayCamera",(()=>lR)),e(mS,"Group",(()=>cR)),e(mS,"DepthTexture",(()=>hR)),e(mS,"WebGLRenderer",(()=>gR)),e(mS,"WebGL1Renderer",(()=>vR)),e(mS,"FogExp2",(()=>yR)),e(mS,"Fog",(()=>bR)),e(mS,"Scene",(()=>xR)),e(mS,"InterleavedBuffer",(()=>SR)),e(mS,"InterleavedBufferAttribute",(()=>_R)),e(mS,"SpriteMaterial",(()=>CR)),e(mS,"Sprite",(()=>zR)),e(mS,"LOD",(()=>HR)),e(mS,"SkinnedMesh",(()=>JR)),e(mS,"Bone",(()=>QR)),e(mS,"DataTexture",(()=>YR)),e(mS,"Skeleton",(()=>$R)),e(mS,"InstancedBufferAttribute",(()=>eP)),e(mS,"InstancedMesh",(()=>oP)),e(mS,"LineBasicMaterial",(()=>sP)),e(mS,"Line",(()=>hP)),e(mS,"LineSegments",(()=>mP)),e(mS,"LineLoop",(()=>gP)),e(mS,"PointsMaterial",(()=>vP)),e(mS,"Points",(()=>wP)),e(mS,"VideoTexture",(()=>CP)),e(mS,"FramebufferTexture",(()=>AP)),e(mS,"CompressedTexture",(()=>EP)),e(mS,"CanvasTexture",(()=>TP)),e(mS,"Curve",(()=>MP)),e(mS,"EllipseCurve",(()=>IP)),e(mS,"ArcCurve",(()=>RP)),e(mS,"CatmullRomCurve3",(()=>DP)),e(mS,"CubicBezierCurve",(()=>UP)),e(mS,"CubicBezierCurve3",(()=>jP)),e(mS,"LineCurve",(()=>HP)),e(mS,"LineCurve3",(()=>VP)),e(mS,"QuadraticBezierCurve",(()=>GP)),e(mS,"QuadraticBezierCurve3",(()=>WP)),e(mS,"SplineCurve",(()=>qP)),e(mS,"CurvePath",(()=>JP)),e(mS,"Path",(()=>QP)),e(mS,"LatheGeometry",(()=>YP)),e(mS,"CapsuleGeometry",(()=>ZP)),e(mS,"CircleGeometry",(()=>XP)),e(mS,"CylinderGeometry",(()=>$P)),e(mS,"ConeGeometry",(()=>ek)),e(mS,"PolyhedronGeometry",(()=>tk)),e(mS,"DodecahedronGeometry",(()=>nk)),e(mS,"EdgesGeometry",(()=>ak)),e(mS,"Shape",(()=>lk)),e(mS,"ShapeUtils",(()=>Nk)),e(mS,"ExtrudeGeometry",(()=>Bk)),e(mS,"IcosahedronGeometry",(()=>Fk)),e(mS,"OctahedronGeometry",(()=>Uk)),e(mS,"RingGeometry",(()=>jk)),e(mS,"ShapeGeometry",(()=>Hk)),e(mS,"SphereGeometry",(()=>Vk)),e(mS,"TetrahedronGeometry",(()=>Gk)),e(mS,"TorusGeometry",(()=>Wk)),e(mS,"TorusKnotGeometry",(()=>qk)),e(mS,"TubeGeometry",(()=>Kk)),e(mS,"WireframeGeometry",(()=>Jk)),e(mS,"ShadowMaterial",(()=>Zk)),e(mS,"RawShaderMaterial",(()=>Xk)),e(mS,"MeshStandardMaterial",(()=>$k)),e(mS,"MeshPhysicalMaterial",(()=>eO)),e(mS,"MeshPhongMaterial",(()=>tO)),e(mS,"MeshToonMaterial",(()=>nO)),e(mS,"MeshNormalMaterial",(()=>rO)),e(mS,"MeshLambertMaterial",(()=>iO)),e(mS,"MeshMatcapMaterial",(()=>oO)),e(mS,"LineDashedMaterial",(()=>sO)),e(mS,"AnimationUtils",(()=>pO)),e(mS,"Interpolant",(()=>fO)),e(mS,"CubicInterpolant",(()=>mO)),e(mS,"LinearInterpolant",(()=>gO)),e(mS,"DiscreteInterpolant",(()=>vO)),e(mS,"KeyframeTrack",(()=>yO)),e(mS,"BooleanKeyframeTrack",(()=>bO)),e(mS,"ColorKeyframeTrack",(()=>xO)),e(mS,"NumberKeyframeTrack",(()=>SO)),e(mS,"QuaternionLinearInterpolant",(()=>wO)),e(mS,"QuaternionKeyframeTrack",(()=>_O)),e(mS,"StringKeyframeTrack",(()=>CO)),e(mS,"VectorKeyframeTrack",(()=>AO)),e(mS,"AnimationClip",(()=>EO)),e(mS,"Cache",(()=>MO)),e(mS,"LoadingManager",(()=>IO)),e(mS,"DefaultLoadingManager",(()=>RO)),e(mS,"Loader",(()=>PO)),e(mS,"FileLoader",(()=>NO)),e(mS,"AnimationLoader",(()=>LO)),e(mS,"CompressedTextureLoader",(()=>DO)),e(mS,"ImageLoader",(()=>BO)),e(mS,"CubeTextureLoader",(()=>zO)),e(mS,"DataTextureLoader",(()=>FO)),e(mS,"TextureLoader",(()=>UO)),e(mS,"Light",(()=>jO)),e(mS,"HemisphereLight",(()=>HO)),e(mS,"SpotLight",(()=>JO)),e(mS,"PointLight",(()=>$O)),e(mS,"DirectionalLight",(()=>tN)),e(mS,"AmbientLight",(()=>nN)),e(mS,"RectAreaLight",(()=>rN)),e(mS,"SphericalHarmonics3",(()=>iN)),e(mS,"LightProbe",(()=>oN)),e(mS,"MaterialLoader",(()=>sN)),e(mS,"LoaderUtils",(()=>aN)),e(mS,"InstancedBufferGeometry",(()=>lN)),e(mS,"BufferGeometryLoader",(()=>cN)),e(mS,"ObjectLoader",(()=>uN)),e(mS,"ImageBitmapLoader",(()=>fN)),e(mS,"AudioContext",(()=>gN)),e(mS,"AudioLoader",(()=>vN)),e(mS,"HemisphereLightProbe",(()=>yN)),e(mS,"AmbientLightProbe",(()=>bN)),e(mS,"StereoCamera",(()=>_N)),e(mS,"Clock",(()=>CN)),e(mS,"AudioListener",(()=>RN)),e(mS,"Audio",(()=>PN)),e(mS,"PositionalAudio",(()=>DN)),e(mS,"AudioAnalyser",(()=>BN)),e(mS,"PropertyMixer",(()=>zN)),e(mS,"PropertyBinding",(()=>WN)),e(mS,"AnimationObjectGroup",(()=>qN)),e(mS,"AnimationMixer",(()=>QN)),e(mS,"Uniform",(()=>YN)),e(mS,"UniformsGroup",(()=>XN)),e(mS,"InstancedInterleavedBuffer",(()=>$N)),e(mS,"GLBufferAttribute",(()=>eL)),e(mS,"Raycaster",(()=>tL)),e(mS,"Spherical",(()=>iL)),e(mS,"Cylindrical",(()=>oL)),e(mS,"Box2",(()=>aL)),e(mS,"Line3",(()=>uL)),e(mS,"SpotLightHelper",(()=>hL)),e(mS,"SkeletonHelper",(()=>gL)),e(mS,"PointLightHelper",(()=>yL)),e(mS,"HemisphereLightHelper",(()=>wL)),e(mS,"GridHelper",(()=>_L)),e(mS,"PolarGridHelper",(()=>CL)),e(mS,"DirectionalLightHelper",(()=>ML)),e(mS,"CameraHelper",(()=>PL)),e(mS,"BoxHelper",(()=>NL)),e(mS,"Box3Helper",(()=>LL)),e(mS,"PlaneHelper",(()=>DL)),e(mS,"ArrowHelper",(()=>UL)),e(mS,"AxesHelper",(()=>jL)),e(mS,"ShapePath",(()=>HL)),e(mS,"DataUtils",(()=>WL)),e(mS,"ImmediateRenderObject",(()=>qL)),e(mS,"WebGLMultisampleRenderTarget",(()=>KL)),e(mS,"DataTexture2DArray",(()=>JL)),e(mS,"DataTexture3D",(()=>QL)),e(mS,"BoxBufferGeometry",(()=>YL)),e(mS,"CapsuleBufferGeometry",(()=>ZL)),e(mS,"CircleBufferGeometry",(()=>XL)),e(mS,"ConeBufferGeometry",(()=>$L)),e(mS,"CylinderBufferGeometry",(()=>eD)),e(mS,"DodecahedronBufferGeometry",(()=>tD)),e(mS,"ExtrudeBufferGeometry",(()=>nD)),e(mS,"IcosahedronBufferGeometry",(()=>rD)),e(mS,"LatheBufferGeometry",(()=>iD)),e(mS,"OctahedronBufferGeometry",(()=>oD)),e(mS,"PlaneBufferGeometry",(()=>sD)),e(mS,"PolyhedronBufferGeometry",(()=>aD)),e(mS,"RingBufferGeometry",(()=>lD)),e(mS,"ShapeBufferGeometry",(()=>cD)),e(mS,"SphereBufferGeometry",(()=>uD)),e(mS,"TetrahedronBufferGeometry",(()=>dD)),e(mS,"TorusBufferGeometry",(()=>hD)),e(mS,"TorusKnotBufferGeometry",(()=>pD)),e(mS,"TubeBufferGeometry",(()=>fD));
239
+ /*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */Uv=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:o,seal:s,create:a}=Object,{apply:l,construct:c}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),s||(s=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const u=S(Array.prototype.forEach),d=S(Array.prototype.pop),h=S(Array.prototype.push),p=S(String.prototype.toLowerCase),f=S(String.prototype.toString),m=S(String.prototype.match),g=S(String.prototype.replace),v=S(String.prototype.indexOf),y=S(String.prototype.trim),b=S(RegExp.prototype.test),x=w(TypeError);function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return l(e,t,r)}}function w(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return c(e,n)}}function _(e,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let o=r.length;for(;o--;){let t=r[o];if("string"==typeof t){const e=i(t);e!==t&&(n(r)||(r[o]=e),t=e)}e[t]=!0}return e}function C(t){const n=a(null);for(const[r,o]of e(t))void 0!==i(t,r)&&(n[r]=o);return n}function A(e,t){for(;null!==e;){const n=i(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}function n(e){return console.warn("fallback value for",e),null}return n}const E=o(["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"]),T=o(["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"]),M=o(["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"]),I=o(["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"]),R=o(["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"]),P=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=o(["#text"]),O=o(["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","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","xmlns","slot"]),N=o(["accent-height","accumulate","additive","alignment-baseline","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","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","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","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","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"]),L=o(["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"]),D=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=s(/<%[\w\W]*|[\w\W]*%>/gm),F=s(/\${[\w\W]*}/gm),U=s(/^data-[\-\w.\u00B7-\uFFFF]/),j=s(/^aria-[\-\w]+$/),H=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=s(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:B,ERB_EXPR:z,TMPLIT_EXPR:F,DATA_ATTR:U,ARIA_ATTR:j,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:G,DOCTYPE_NAME:W});const K=function(){return"undefined"==typeof window?null:window},J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Q(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K();const n=e=>Q(e);if(n.version="3.0.6",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;let{document:r}=t;const i=r,s=i.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:S,Element:w,NodeFilter:B,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:F,DOMParser:U,trustedTypes:j}=t,V=w.prototype,G=A(V,"cloneNode"),Y=A(V,"nextSibling"),Z=A(V,"childNodes"),X=A(V,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let $,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:ie}=r,{importNode:oe}=i;let se={};n.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:ue,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:he,ATTR_WHITESPACE:pe}=q;let{IS_ALLOWED_URI:fe}=q,me=null;const ge=_({},[...E,...T,...M,...R,...k]);let ve=null;const ye=_({},[...O,...N,...L,...D]);let be=Object.seal(a(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}})),xe=null,Se=null,we=!0,_e=!0,Ce=!1,Ae=!0,Ee=!1,Te=!1,Me=!1,Ie=!1,Re=!1,Pe=!1,ke=!1,Oe=!0,Ne=!1;const Le="user-content-";let De=!0,Be=!1,ze={},Fe=null;const Ue=_({},["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"]);let je=null;const He=_({},["audio","video","img","source","image","track"]);let Ve=null;const Ge=_({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),We="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let Je=Ke,Qe=!1,Ye=null;const Ze=_({},[We,qe,Ke],f);let Xe=null;const $e=["application/xhtml+xml","text/html"],et="text/html";let tt=null,nt=null;const rt=r.createElement("form"),it=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!nt||nt!==e){if(e&&"object"==typeof e||(e={}),e=C(e),Xe=Xe=-1===$e.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Xe?f:p,me="ALLOWED_TAGS"in e?_({},e.ALLOWED_TAGS,tt):ge,ve="ALLOWED_ATTR"in e?_({},e.ALLOWED_ATTR,tt):ye,Ye="ALLOWED_NAMESPACES"in e?_({},e.ALLOWED_NAMESPACES,f):Ze,Ve="ADD_URI_SAFE_ATTR"in e?_(C(Ge),e.ADD_URI_SAFE_ATTR,tt):Ge,je="ADD_DATA_URI_TAGS"in e?_(C(He),e.ADD_DATA_URI_TAGS,tt):He,Fe="FORBID_CONTENTS"in e?_({},e.FORBID_CONTENTS,tt):Ue,xe="FORBID_TAGS"in e?_({},e.FORBID_TAGS,tt):{},Se="FORBID_ATTR"in e?_({},e.FORBID_ATTR,tt):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,we=!1!==e.ALLOW_ARIA_ATTR,_e=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ee=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,ke=e.RETURN_TRUSTED_TYPE||!1,Ie=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ne=e.SANITIZE_NAMED_PROPS||!1,De=!1!==e.KEEP_CONTENT,Be=e.IN_PLACE||!1,fe=e.ALLOWED_URI_REGEXP||H,Je=e.NAMESPACE||Ke,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&it(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ee&&(_e=!1),Pe&&(Re=!0),ze&&(me=_({},[...k]),ve=[],!0===ze.html&&(_(me,E),_(ve,O)),!0===ze.svg&&(_(me,T),_(ve,N),_(ve,D)),!0===ze.svgFilters&&(_(me,M),_(ve,N),_(ve,D)),!0===ze.mathMl&&(_(me,R),_(ve,L),_(ve,D))),e.ADD_TAGS&&(me===ge&&(me=C(me)),_(me,e.ADD_TAGS,tt)),e.ADD_ATTR&&(ve===ye&&(ve=C(ve)),_(ve,e.ADD_ATTR,tt)),e.ADD_URI_SAFE_ATTR&&_(Ve,e.ADD_URI_SAFE_ATTR,tt),e.FORBID_CONTENTS&&(Fe===Ue&&(Fe=C(Fe)),_(Fe,e.FORBID_CONTENTS,tt)),De&&(me["#text"]=!0),Te&&_(me,["html","head","body"]),me.table&&(_(me,["tbody"]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw x('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');$=e.TRUSTED_TYPES_POLICY,ee=$.createHTML("")}else void 0===$&&($=J(j,s)),null!==$&&"string"==typeof ee&&(ee=$.createHTML(""));o&&o(e),nt=e}},st=_({},["mi","mo","mn","ms","mtext"]),at=_({},["foreignobject","desc","title","annotation-xml"]),lt=_({},["title","style","font","a","script"]),ct=_({},T);_(ct,M),_(ct,I);const ut=_({},R);_(ut,P);const dt=function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=p(e.tagName),r=p(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Ke?"svg"===n:t.namespaceURI===We?"svg"===n&&("annotation-xml"===r||st[r]):Boolean(ct[n]):e.namespaceURI===We?t.namespaceURI===Ke?"math"===n:t.namespaceURI===qe?"math"===n&&at[r]:Boolean(ut[n]):e.namespaceURI===Ke?!(t.namespaceURI===qe&&!at[r])&&!(t.namespaceURI===We&&!st[r])&&!ut[n]&&(lt[n]||!ct[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))},ht=function(e){h(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},pt=function(e,t){try{h(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ve[e])if(Re||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function(e){let t=null,n=null;if(Ie)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Je===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=$?$.createHTML(e):e;if(Je===Ke)try{t=(new U).parseFromString(i,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Qe?ee:i}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(r.createTextNode(n),o.childNodes[0]||null),Je===Ke?ie.call(t,Te?"html":"body")[0]:Te?t.documentElement:o},mt=function(e){return ne.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT,null)},gt=function(e){return e instanceof F&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},vt=function(e){return"function"==typeof S&&e instanceof S},yt=function(e,t,r){se[e]&&u(se[e],(e=>{e.call(n,t,r,nt)}))},bt=function(e){let t=null;if(yt("beforeSanitizeElements",e,null),gt(e))return ht(e),!0;const r=tt(e.nodeName);if(yt("uponSanitizeElement",e,{tagName:r,allowedTags:me}),e.hasChildNodes()&&!vt(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return ht(e),!0;if(!me[r]||xe[r]){if(!xe[r]&&St(r)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,r))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(r))return!1}if(De&&!Fe[r]){const t=X(e)||e.parentNode,n=Z(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),Y(e))}return ht(e),!0}return e instanceof w&&!dt(e)?(ht(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ee&&3===e.nodeType&&(t=e.textContent,u([ae,le,ce],(e=>{t=g(t,e," ")})),e.textContent!==t&&(h(n.removed,{element:e.cloneNode()}),e.textContent=t)),yt("afterSanitizeElements",e,null),!1):(ht(e),!0)},xt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(_e&&!Se[t]&&b(ue,t));else if(we&&b(de,t));else if(!ve[t]||Se[t]){if(!(St(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(Ve[t]);else if(b(fe,g(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!je[e])if(Ce&&!b(he,g(n,pe,"")));else if(n)return!1;return!0},St=function(e){return e.indexOf("-")>0},wt=function(e){yt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve};let i=t.length;for(;i--;){const o=t[i],{name:s,namespaceURI:a,value:l}=o,c=tt(s);let h="value"===s?l:y(l);if(r.attrName=c,r.attrValue=h,r.keepAttr=!0,r.forceKeepAttr=void 0,yt("uponSanitizeAttribute",e,r),h=r.attrValue,r.forceKeepAttr)continue;if(pt(s,e),!r.keepAttr)continue;if(!Ae&&b(/\/>/i,h)){pt(s,e);continue}Ee&&u([ae,le,ce],(e=>{h=g(h,e," ")}));const p=tt(e.nodeName);if(xt(p,c,h)){if(!Ne||"id"!==c&&"name"!==c||(pt(s,e),h=Le+h),$&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(a);else switch(j.getAttributeType(p,c)){case"TrustedHTML":h=$.createHTML(h);break;case"TrustedScriptURL":h=$.createScriptURL(h)}try{a?e.setAttributeNS(a,s,h):e.setAttribute(s,h),d(n.removed)}catch(e){}}}yt("afterSanitizeAttributes",e,null)},_t=function e(t){let n=null;const r=mt(t);for(yt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)yt("uponSanitizeShadowNode",n,null),bt(n)||(n.content instanceof l&&e(n.content),wt(n));yt("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,a=null;if(Qe=!e,Qe&&(e="\x3c!--\x3e"),"string"!=typeof e&&!vt(e)){if("function"!=typeof e.toString)throw x("toString is not a function");if("string"!=typeof(e=e.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||ot(t),n.removed=[],"string"==typeof e&&(Be=!1),Be){if(e.nodeName){const t=tt(e.nodeName);if(!me[t]||xe[t])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)r=ft("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!Re&&!Ee&&!Te&&-1===e.indexOf("<"))return $&&ke?$.createHTML(e):e;if(r=ft(e),!r)return Re?null:ke?ee:""}r&&Ie&&ht(r.firstChild);const c=mt(Be?e:r);for(;s=c.nextNode();)bt(s)||(s.content instanceof l&&_t(s.content),wt(s));if(Be)return e;if(Re){if(Pe)for(a=re.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(ve.shadowroot||ve.shadowrootmode)&&(a=oe.call(i,a,!0)),a}let d=Te?r.outerHTML:r.innerHTML;return Te&&me["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&b(W,r.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+d),Ee&&u([ae,le,ce],(e=>{d=g(d,e," ")})),$&&ke?$.createHTML(d):d},n.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},n.clearConfig=function(){nt=null,Me=!1},n.isValidAttribute=function(e,t,n){nt||ot({});const r=tt(e),i=tt(t);return xt(r,i,n)},n.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],h(se[e],t))},n.removeHook=function(e){if(se[e])return d(se[e])},n.removeHooks=function(e){se[e]&&(se[e]=[])},n.removeAllHooks=function(){se={}},n}return Q()}();var jv=({className:e,title:t})=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",className:e,"aria-label":t,children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,s.jsx)("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"}),(0,s.jsx)("path",{d:"M12 17L12.01 17"})]});c=o("85Hg2"),c=o("85Hg2");var Hv=({rows:e,className:n,innerClassName:r,btnClassName:i,lineHeightMultiplier:o=1.2,defaultExpanded:a=!1,expandSymbol:l=(()=>"..."),collapseSymbol:u=(e=>"it"===e?"Mostra meno":"Show less"),children:d})=>{const{i18n:h}=Se(),p=h.language,f=u(p),m=l(p),[g,v]=(0,c.useState)(a),[y,b]=(0,c.useState)(!1),[x,S]=(0,c.useState)(16),w=(0,c.useRef)(null);return(0,c.useEffect)((()=>{if(w.current){let t=w.current.getBoundingClientRect().height,n=getComputedStyle(w.current),r=n.lineHeight,i="normal"!==r&&(null==r?void 0:r.length)?parseInt(r,10):o*parseInt(n.fontSize,10);console.table({rows:e,lineHeight:i,height:t,maxHeight:e*i,needsExpanding:t>e*i}),S(i),t&&t>e*i&&b(!0)}}),[e,w.current]),(0,s.jsxs)("div",{className:t(ws)("memori-expandable",n),children:[(0,s.jsx)("div",{ref:w,className:t(ws)("memori-expandable--inner",r),style:{maxHeight:g||!y?"9999px":x*e+"px"},children:d}),y&&!g&&(0,s.jsx)(Sf,{ghost:!0,padded:!1,className:i,onClick:()=>v(!0),children:m}),y&&g&&(0,s.jsx)(Sf,{ghost:!0,padded:!1,className:i,onClick:()=>v(!1),children:f})]})};const Vv=new Map(Object.entries({TENANT_NOT_FOUND:-1,TENANT_REGISTRATION_DISABLED:-2,TENANT_MISSING_NAME:-3,TENANT_MAX_USERS_REACHED:-4,TENANT_MAX_ADMINS_REACHED:-5,TENANT_ALREADY_EXISTS:-6,TENANT_MISSING_DESCRIPTION:-7,TENANT_CANT_SET_COMPLETION_PROVIDER:-8,USER_NOT_CONFIRMED:-11,USER_NOT_FOUND:-12,USER_OR_PASSWORD_INVALID:-13,USER_MUST_CHANGE_PASSWORD:-14,USER_MUST_ENTER_VERIFICATION_CODE:-15,USER_MISSING_TENANT:-21,USER_MISSING_NAME:-22,USER_MISSING_PASSWORD:-23,USER_MISSING_EMAIL:-24,USER_MISSING_VERIFICATION_CODE:-25,USER_NAME_ALREADY_USED:-26,USER_PASSWORD_NOT_CONFORMING_TO_POLICY:-27,USER_EMAIL_ALREADY_USED:-28,USER_EMAIL_INVALID:-29,USER_VERIFICATION_CODE_INVALID:-30,USER_MISSING_NAME_OR_EMAIL:-31,USER_NAME_INVALID:-32,USER_HAS_ONE_OR_MORE_MEMORI:-33,USER_MISSING_NEW_PASSWORD:-34,USER_CANT_CREATE_MEMORI:-35,USER_MAX_MEMORI_REACHED:-36,USER_TOO_MANY_ATTEMPTS:-38,USER_MUST_ACCEPT_TNC_AND_PP:-39,USER_BIRTH_DATE_CANT_BE_CHANGED:-40,USER_CANT_SET_COMPLETION_PROVIDER:-41,USER_CANT_ENABLE_DEEP_THOUGHT:-42,USER_CANT_ENABLE_DCM_INTEGRATION:-43,USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS:-44,USER_CREATION_BILLING_DENIED_PERMISSION:-46,MEMORI_NOT_FOUND:-51,MEMORI_NOT_ACCESSIBLE:-52,MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN:-53,SESSION_NOT_FOUND:-101,SESSION_IS_NOT_ADMINISTRATIVE:-102,SESSION_EXPIRED:-103,MEMORI_MISSING_CONFIGURATION:-201,MEMORI_CONFIGURATION_NOT_FOUND:-202,MEMORI_INVALID_PRIVACY_TYPE:-203,MEMORI_MISSING_PASSWORD:-204,MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS:-205,MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS:-206,MEMORI_INVALID_VOICE_TYPE:-207,MEMORI_MISSING_NAME:-208,MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS:-209,MEMORI_INVALID_ID:-210,MEMORI_NAME_ALREADY_USED:-211,MEMORI_INVALID_PIN:-212,MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION:-213,MEMORI_NO_PASSWORD_WHEN_PUBLIC:-214,MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS:-215,MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS:-216,MEMORI_TRANSFER_MISSING_DESTINATION_USER:-231,MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID:-232,MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT:-233,MEMORI_TRANSFER_NOTHING_TO_DO:-234,MEMORI_CONFIGURATION_CANT_BE_CHANGED:-251,MEMORI_MISSING_NEW_PASSWORD:-252,MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT:-261,MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT:-262,MEMORI_FEATURE_REQUIRES_SUBSCRIPTION:-271,INTEGRATION_NOT_FOUND:-301,INTEGRATION_INVALID_TYPE:-401,INTEGRATION_ALREADY_EXISTS:-402,INTEGRATION_MEMORI_IS_NOT_PUBLIC:-403,INTEGRATION_MISSING_INVOCATION_TEXT:-404,INTEGRATION_MISSING_DEVICE_EMAILS:-405,INTEGRATION_MEMORI_IS_EMPTY:-406,INTEGRATION_MISSING_PRIVACY_POLICY:-407,INTEGRATION_MISSING_CATEGORY:-408,INTEGRATION_MISSING_DESCRIPTION:-409,INTEGRATION_INVALID_INVOCATION_TEXT:-410,INTEGRATION_GOOGLE_NO_MORE_AVAILABLE:-411,UPLOAD_REQUIRES_MULTIPART_ENCODING:-501,UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY:-502,UPLOAD_MAX_LENGTH_EXCEEDED:-503,UPLOAD_FILE_IS_EMPTY:-504,UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE:-505,UPLOAD_MISSING_FILE_NAME:-506,UPLOAD_INVALID_MEMORY_ID:-507,UPLOAD_MISSING_FILE_CONTENT:-508,ASSET_NOT_FOUND:-601,ASSET_NOT_ACCESSIBLE:-602,ASSET_MISSING_SESSION_ID:-603,ASSET_INVALID_FILE_NAME:-604,INVITATION_NOT_FOUND:-701,INVITATION_NOT_ACCESSIBLE:-702,INVITATION_ALREADY_ACCEPTED:-703,INVITATION_ALREADY_REJECTED:-704,INVITATION_MISSING_DESTINATION_EMAIL:-705,INVITATION_DESTINATION_EMAIL_INVALID:-706,INVITATION_MISSING_TAG:-707,INVITATION_MISSING_PIN:-708,INVITATION_INVALID_PIN:-709,INVITATION_INVALID_TYPE:-710,INVITATION_MISSING_DESTINATION_NAME:-711,INVITATION_TAG_PIN_CANT_BE_CHANGED:-712,INVITATION_CANT_BE_CHANGED:-713,ACTIONLOG_INVALID_USER_ID:-801,ACTIONLOG_INVALID_DATE_FROM_FORMAT:-802,ACTIONLOG_INVALID_DATE_TO_FORMAT:-803,ACTIONLOG_INVALID_MEMORI_ID:-804,CONSUMPTIONLOG_INVALID_TYPE:-901,CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT:-902,CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT:-903,CONSUMPTIONLOG_INVALID_USER_ID:-904,CONSUMPTIONLOG_INVALID_MEMORI_ID:-905,NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD:-1001,PROCESS_INVALID_TYPE:-1401,PROCESS_ALREADY_RUNNING:-1401,PROCESS_NOT_FOUND:-1402,IMPORTCSV_MISSING_ROWS:-1501,IMPORTCSV_MISSING_CSV:-1502,IMPORTCSV_MISSING_SEPARATOR:-1503,IMPORTCSV_INVALID_SEPARATOR:-1504,IMPORTCSV_MISSING_HEADERS:-1505,IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR:-1506,IMPORTCSV_INVALID_RECEIVER_ID:-1507,IMPORTCSV_INVALID_MEDIA_LINK:-1508,IMPORTCSV_UNDETECTABLE_CHAR_ENCODING:-1521,IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI:-1531,IMPORTTXT_MISSING_ROWS:-1601,IMPORTTXT_INVALID_GRANULARITY:-1602,IMPORTTXT_INVALID_RECEIVER_ID:-1603,IMPORTTXT_INVALID_MEDIA_LINK:-1604,IMPORTTXT_UNDETECTABLE_CHAR_ENCODING:-1621,IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI:-1631,IMPORTTXT_IMPORT_LIMIT_EXCEEDED:-1632,IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY:-1633,IMPORTTXT_IMPORT_REQUIRES_PAYING:-1634,IMPORTTXT_BILLING_DENIED_PERMISSION:-1635,EXPORTCSV_MISSING_CSV_SPECS:-1801,EXPORTCSV_MISSING_SEPARATOR:-1802,EXPORTCSV_INVALID_SEPARATOR:-1803,EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR:-1804,EXPORTCSV_MISSING_NEW_LINE_CHAR:-1805,EXPORTCSV_INVALID_NEW_LINE_CHAR:-1806,EXPORTCSV_MISSING_PASSWORD:-1811,EXPORTJSONL_MISSING_JSONL_SPECS:-1821,EXPORTJSONL_MISSING_PLATFORM:-1822,EXPORTJSONL_INVALID_PLATFORM:-1823,EXPORTJSONL_MISSING_PASSWORD:-1831,EXPORTJSONL_EXPORT_REQUIRES_PAYING:-1832,ANALYSIS_MISSING_QUERY:-1901,ANALYSIS_CANT_ANALYZE_SECRET_MEMORI:-1902,ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT:-1903,BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS:-2001,BADGE_ASSIGNMENT_MISSING_REF_ID:-2002,BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND:-2003,BADGE_ASSIGNMENT_MISSING_ASSERTION_URL:-2004,BADGE_ASSIGNMENT_MISSING_BADGE_URL:-2005,BADGE_ASSIGNMENT_MISSING_ISSUER_URL:-2006,BADGE_ASSIGNMENT_INVALID_URL:-2007,BADGE_ASSIGNMENT_MISSING_RECIPIENT:-2021,BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE:-2022,BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY:-2023,BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE:-2024,BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE:-2025,BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY:-2026,BADGE_NOT_FOUND:-2051,OUTCOME_NO_DCM_CONFIGURED:-2071,OUTCOME_USER_BADGES_DISABLED:-2072}).map((([e,t])=>[t,e]))),Gv=e=>{if(!e)return"error.generic";if(401===e||403===e)return"error.unauthorized";if(404===e)return"error.notFound";if(422===e)return"error.unprocessableEntity";if(500===e)return"internal server error";let t=Vv.get(e);return t?`errors.${t}`:"error.generic"};var Wv=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"})});const qv=[{value:"IT",label:"Italiano"},{value:"EN",label:"English"},{value:"DE",label:"Deutsch"},{value:"ES",label:"Español"},{value:"FR",label:"Français"},{value:"PT",label:"Português"},{value:"UK",label:"Українська"},{value:"RU",label:"Русский"},{value:"PL",label:"Polski"},{value:"FI",label:"Suomi"},{value:"EL",label:"Ελληνικά"},{value:"AR",label:"العربية"},{value:"ZH",label:"中文"},{value:"JA",label:"日本語"}],Kv="👤",Jv=[{name:"text",lang:"text",mimeType:"text/plain",monacoLang:"plaintext",executable:!0},{name:"javascript/jsx",lang:"jsx",mimeType:"text/javascript",monacoLang:"javascript",executable:!0},{name:"typescript/tsx",lang:"tsx",mimeType:"text/ecmascript",monacoLang:"typescript",executable:!0},{name:"json",lang:"json",mimeType:"application/json",monacoLang:"json",executable:!0},{name:"css",lang:"scss",mimeType:"text/css",monacoLang:"css",executable:!0},{name:"html/xml",lang:"tsx",mimeType:"application/xml",monacoLang:"xml"},{name:"bash",lang:"bash",mimeType:"application/x-sh",monacoLang:"shell"},{name:"python",lang:"python",mimeType:"text/x-python",monacoLang:"python"},{name:"cpp/csharp",lang:"cpp",mimeType:"text/x-c++src",monacoLang:"cpp"},{name:"php",lang:"php",mimeType:"application/x-php",monacoLang:"php"},{name:"ruby",lang:"ruby",mimeType:"text/x-ruby",monacoLang:"ruby"},{name:"sql",lang:"sql",mimeType:"text/x-sql",monacoLang:"sql"}],Qv={it:[{text:"",delayAfter:10},{text:"Cerco l'esperto più adatto",delayAfter:5},{text:"Contatto l'esperto",delayAfter:3},{text:"Spiego all'esperto la domanda",delayAfter:2},{text:"L'esperto sta preparando una risposta",delayAfter:6},{text:"Genero una risposta adatta",delayAfter:3}],en:[{text:"",delayAfter:10},{text:"I'm looking for the most suitable expert",delayAfter:5},{text:"I'm contacting the expert",delayAfter:3},{text:"I'm explaining the question to the expert",delayAfter:2},{text:"The expert is preparing an answer",delayAfter:6},{text:"I am generating a suitable answer",delayAfter:3}]};var Yv={};function Zv(e,t,n,r,i,o,s){try{var a=e[o](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,i)}(Yv=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(e){Zv(o,r,i,s,a,"next",e)}function a(e){Zv(o,r,i,s,a,"throw",e)}s(void 0)}))}}).__esModule=!0,Yv.default=Yv;var Xv={};function $v(){return Xv=$v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xv.__esModule=!0,Xv.default=Xv,$v.apply(this,arguments)}(Xv=$v).__esModule=!0,Xv.default=Xv;ee=o("ffgrs"),te=o("22y1y");var ey={},ty={};function ny(e,t){return ty=ny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ty.__esModule=!0,ty.default=ty,ny(e,t)}(ty=ny).__esModule=!0,ty.default=ty,(ey=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ty(e,t)}).__esModule=!0,ey.default=ey;var ry={},iy=o("lEJSL").default,oy={};(oy=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}).__esModule=!0,oy.default=oy,(ry=function(e,t){if(t&&("object"===iy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return oy(e)}).__esModule=!0,ry.default=ry;var sy={};function ay(e){return sy=ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sy.__esModule=!0,sy.default=sy,ay(e)}(sy=ay).__esModule=!0,sy.default=sy;var ly,cy=o("7qcgS")();ly=cy;try{regeneratorRuntime=cy}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=cy:Function("r","regeneratorRuntime = r")(cy)}c=o("85Hg2");var uy={},dy={};(dy=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}).__esModule=!0,dy.default=dy,(uy=function(e,t){if(null==e)return{};var n,r,i=dy(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}).__esModule=!0,uy.default=uy;var hy={},py={},fy=o("e3mvX");(py=function(e){if(Array.isArray(e))return fy(e)}).__esModule=!0,py.default=py;var my={};(my=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}).__esModule=!0,my.default=my;var gy=o("8xD61"),vy={};(vy=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}).__esModule=!0,vy.default=vy,(hy=function(e){return py(e)||my(e)||gy(e)||vy()}).__esModule=!0,hy.default=hy;c=o("85Hg2"),c=o("85Hg2");function yy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function by(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?yy(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xy={};function Sy(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return xy[r]||(xy[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),xy[r]}function wy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter((function(e){return"token"!==e})),i=Sy(r);return i.reduce((function(e,t){return by(by({},e),n[t])}),t)}function _y(e){return e.join(" ")}function Cy(e){var n=e.node,r=e.stylesheet,i=e.style,o=void 0===i?{}:i,s=e.useInlineStyles,a=e.key,l=n.properties,u=n.type,d=n.tagName,h=n.value;if("text"===u)return h;if(d){var p,f=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,i){return Cy({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})}))}}(r,s);if(s){var m=Object.keys(r).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=l.className&&l.className.includes("token")?["token"]:[],v=l.className&&g.concat(l.className.filter((function(e){return!m.includes(e)})));p=by(by({},l),{},{className:_y(v)||void 0,style:wy(l.className,Object.assign({},l.style,o),r)})}else p=by(by({},l),{},{className:_y(l.className)});var y=f(n.children);return t(c).createElement(d,t(Xv)({key:a},p),y)}}var Ay=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Ey(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ty(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Ey(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ey(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var My=/\n/g;function Iy(e){var n=e.codeString,r=e.codeStyle,i=e.containerStyle,o=void 0===i?{float:"left",paddingRight:"10px"}:i,s=e.numberStyle,a=void 0===s?{}:s,l=e.startingLineNumber;return t(c).createElement("code",{style:Object.assign({},r,o)},function(e){var n=e.lines,r=e.startingLineNumber,i=e.style;return n.map((function(e,n){var o=n+r;return t(c).createElement("span",{key:"line-".concat(n),className:"react-syntax-highlighter-line-number",style:"function"==typeof i?i(o):i},"".concat(o,"\n"))}))}({lines:n.replace(/\n$/,"").split("\n"),style:a,startingLineNumber:l}))}function Ry(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function Py(e,t,n){var r,i={display:"inline-block",minWidth:(r=n,"".concat(r.toString().length,".25em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},o="function"==typeof e?e(t):e;return Ty(Ty({},i),o)}function ky(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,o=e.showInlineLineNumbers,s=e.lineProps,a=void 0===s?{}:s,l=e.className,c=void 0===l?[]:l,u=e.showLineNumbers,d=e.wrapLongLines,h="function"==typeof a?a(n):a;if(h.className=c,n&&o){var p=Py(r,n,i);t.unshift(Ry(n,p))}return d&u&&(h.style=Ty(Ty({},h.style),{},{display:"flex"})),{type:"element",tagName:"span",properties:h,children:t}}function Oy(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0;i<e.length;i++){var o=e[i];if("text"===o.type)r.push(ky({children:[o],className:t(hy)(new Set(n))}));else if(o.children){var s=n.concat(o.properties.className);Oy(o.children,s).forEach((function(e){return r.push(e)}))}}return r}function Ny(e,t,n,r,i,o,s,a,l){var c,u=Oy(e.value),d=[],h=-1,p=0;function f(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return ky({children:e,lineNumber:t,lineNumberStyle:a,largestLineNumber:s,showInlineLineNumbers:i,lineProps:n,className:o,showLineNumbers:r,wrapLongLines:l})}function m(e,t){if(r&&t&&i){var n=Py(a,t,s);e.unshift(Ry(t,n))}return e}function g(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return t||r.length>0?f(e,n,r):m(e,n)}for(var v=function(){var e=u[p],t=e.children[0].value;if(t.match(My)){var n=t.split("\n");n.forEach((function(t,i){var s=r&&d.length+o,a={type:"text",value:"".concat(t,"\n")};if(0===i){var l=g(u.slice(h+1,p).concat(ky({children:[a],className:e.properties.className})),s);d.push(l)}else if(i===n.length-1){var c=u[p+1]&&u[p+1].children&&u[p+1].children[0],f={type:"text",value:"".concat(t)};if(c){var m=ky({children:[f],className:e.properties.className});u.splice(p+1,0,m)}else{var v=g([f],s,e.properties.className);d.push(v)}}else{var y=g([a],s,e.properties.className);d.push(y)}})),h=p}p++};p<u.length;)v();if(h!==u.length-1){var y=u.slice(h+1,u.length);if(y&&y.length){var b=g(y,r&&d.length+o);d.push(b)}}return t?d:(c=[]).concat.apply(c,d)}function Ly(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map((function(e,t){return Cy({node:e,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(t)})}))}function Dy(e){return e&&void 0!==e.highlightAuto}function By(e,n){return function(r){var i=r.language,o=r.children,s=r.style,a=void 0===s?n:s,l=r.customStyle,u=void 0===l?{}:l,d=r.codeTagProps,h=void 0===d?{className:i?"language-".concat(i):void 0,style:Ty(Ty({},a['code[class*="language-"]']),a['code[class*="language-'.concat(i,'"]')])}:d,p=r.useInlineStyles,f=void 0===p||p,m=r.showLineNumbers,g=void 0!==m&&m,v=r.showInlineLineNumbers,y=void 0===v||v,b=r.startingLineNumber,x=void 0===b?1:b,S=r.lineNumberContainerStyle,w=r.lineNumberStyle,_=void 0===w?{}:w,C=r.wrapLines,A=r.wrapLongLines,E=void 0!==A&&A,T=r.lineProps,M=void 0===T?{}:T,I=r.renderer,R=r.PreTag,P=void 0===R?"pre":R,k=r.CodeTag,O=void 0===k?"code":k,N=r.code,L=void 0===N?(Array.isArray(o)?o[0]:o)||"":N,D=r.astGenerator,B=t(uy)(r,Ay);D=D||e;var z=g?t(c).createElement(Iy,{containerStyle:S,codeStyle:h.style||{},numberStyle:_,startingLineNumber:x,codeString:L}):null,F=a.hljs||a['pre[class*="language-"]']||{backgroundColor:"#fff"},U=Dy(D)?"hljs":"prismjs",j=f?Object.assign({},B,{style:Object.assign({},F,u)}):Object.assign({},B,{className:B.className?"".concat(U," ").concat(B.className):U,style:Object.assign({},u)});if(h.style=Ty(Ty({},h.style),{},E?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!D)return t(c).createElement(P,j,z,t(c).createElement(O,h,L));(void 0===C&&I||E)&&(C=!0),I=I||Ly;var H=[{type:"text",value:L}],V=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(Dy(t)){var o=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:o?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:D,language:i,code:L,defaultCodeValue:H});null===V.language&&(V.value=H);var G=Ny(V,C,M,g,y,x,V.value.length+x,_,E);return t(c).createElement(P,j,t(c).createElement(O,h,!y&&z,I({rows:G,stylesheet:a,useInlineStyles:f})))}}function zy(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,i=t(sy)(e);if(n){var o=t(sy)(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return t(ry)(this,r)}}var Fy,Uy,jy,Hy,Vy,Gy,Wy,qy=function(e,n){return function(){var r=t(Yv)(t(ly).mark((function r(i){var o;return t(ly).wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n();case 2:o=t.sent,i(e,o.default||o);case 4:case"end":return t.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()},Ky={abap:qy("abap",(function(){return o("bwHpE")})),abnf:qy("abnf",(function(){return o("daD87")})),actionscript:qy("actionscript",(function(){return o("lpEgO")})),ada:qy("ada",(function(){return o("1sGW9")})),agda:qy("agda",(function(){return o("e9VyR")})),al:qy("al",(function(){return o("kMFSe")})),antlr4:qy("antlr4",(function(){return o("8HlsP")})),apacheconf:qy("apacheconf",(function(){return o("isFCh")})),apex:qy("apex",(function(){return o("gUXVM")})),apl:qy("apl",(function(){return o("2L15v")})),applescript:qy("applescript",(function(){return o("8XyFT")})),aql:qy("aql",(function(){return o("gFWTI")})),arduino:qy("arduino",(function(){return o("jI3VB")})),arff:qy("arff",(function(){return o("6uYTH")})),asciidoc:qy("asciidoc",(function(){return o("gdYKH")})),asm6502:qy("asm6502",(function(){return o("ahFLg")})),asmatmel:qy("asmatmel",(function(){return o("4irIu")})),aspnet:qy("aspnet",(function(){return o("yDC6n")})),autohotkey:qy("autohotkey",(function(){return o("a4xpy")})),autoit:qy("autoit",(function(){return o("iNSix")})),avisynth:qy("avisynth",(function(){return o("kEBnk")})),avroIdl:qy("avroIdl",(function(){return o("lzthi")})),bash:qy("bash",(function(){return Promise.resolve(o("3aDLI"))})),basic:qy("basic",(function(){return o("cxDu6")})),batch:qy("batch",(function(){return o("6zDll")})),bbcode:qy("bbcode",(function(){return o("bPS87")})),bicep:qy("bicep",(function(){return o("8dy5f")})),birb:qy("birb",(function(){return o("3vHrY")})),bison:qy("bison",(function(){return o("bCjBS")})),bnf:qy("bnf",(function(){return o("4NqDW")})),brainfuck:qy("brainfuck",(function(){return o("4s0KX")})),brightscript:qy("brightscript",(function(){return o("jTsQ4")})),bro:qy("bro",(function(){return o("5lMc2")})),bsl:qy("bsl",(function(){return o("jBYxC")})),c:qy("c",(function(){return Promise.resolve(o("lyZgY"))})),cfscript:qy("cfscript",(function(){return o("coZDy")})),chaiscript:qy("chaiscript",(function(){return o("e1zEN")})),cil:qy("cil",(function(){return o("crKoM")})),clike:qy("clike",(function(){return o("4kO9t")})),clojure:qy("clojure",(function(){return o("01SpB")})),cmake:qy("cmake",(function(){return o("9yG4p")})),cobol:qy("cobol",(function(){return o("967Hn")})),coffeescript:qy("coffeescript",(function(){return o("7Yi6H")})),concurnas:qy("concurnas",(function(){return o("5tXmX")})),coq:qy("coq",(function(){return o("ektdr")})),cpp:qy("cpp",(function(){return Promise.resolve(o("lR39A"))})),crystal:qy("crystal",(function(){return o("8gt4L")})),csharp:qy("csharp",(function(){return o("7K6eJ")})),cshtml:qy("cshtml",(function(){return o("cVu4i")})),csp:qy("csp",(function(){return o("ecKo1")})),cssExtras:qy("cssExtras",(function(){return o("gnpv8")})),css:qy("css",(function(){return o("jx0H8")})),csv:qy("csv",(function(){return o("f9kmW")})),cypher:qy("cypher",(function(){return o("lojor")})),d:qy("d",(function(){return o("6Qa0U")})),dart:qy("dart",(function(){return o("74K1B")})),dataweave:qy("dataweave",(function(){return o("93H6c")})),dax:qy("dax",(function(){return o("cf9Y9")})),dhall:qy("dhall",(function(){return o("f6UWv")})),diff:qy("diff",(function(){return o("klPVo")})),django:qy("django",(function(){return o("jfxe9")})),dnsZoneFile:qy("dnsZoneFile",(function(){return o("5aMz5")})),docker:qy("docker",(function(){return o("kOauC")})),dot:qy("dot",(function(){return o("btE6k")})),ebnf:qy("ebnf",(function(){return o("aT88c")})),editorconfig:qy("editorconfig",(function(){return o("jWOl8")})),eiffel:qy("eiffel",(function(){return o("kHJaX")})),ejs:qy("ejs",(function(){return o("frfnA")})),elixir:qy("elixir",(function(){return o("hcrJ2")})),elm:qy("elm",(function(){return o("jd271")})),erb:qy("erb",(function(){return o("gczXL")})),erlang:qy("erlang",(function(){return o("FsabW")})),etlua:qy("etlua",(function(){return o("9DI9l")})),excelFormula:qy("excelFormula",(function(){return o("3QVue")})),factor:qy("factor",(function(){return o("ltNCT")})),falselang:qy("falselang",(function(){return o("g0Q6p")})),firestoreSecurityRules:qy("firestoreSecurityRules",(function(){return o("ukA2V")})),flow:qy("flow",(function(){return o("e5prn")})),fortran:qy("fortran",(function(){return o("gIEL6")})),fsharp:qy("fsharp",(function(){return o("3wQkt")})),ftl:qy("ftl",(function(){return o("7ZVWs")})),gap:qy("gap",(function(){return o("hOFj6")})),gcode:qy("gcode",(function(){return o("95BzQ")})),gdscript:qy("gdscript",(function(){return o("iul6t")})),gedcom:qy("gedcom",(function(){return o("e0qJM")})),gherkin:qy("gherkin",(function(){return o("2SHak")})),git:qy("git",(function(){return o("l6VFH")})),glsl:qy("glsl",(function(){return o("cEMfJ")})),gml:qy("gml",(function(){return o("8UVTr")})),gn:qy("gn",(function(){return o("kvibD")})),goModule:qy("goModule",(function(){return o("icqjF")})),go:qy("go",(function(){return o("jLkg8")})),graphql:qy("graphql",(function(){return o("aYGNi")})),groovy:qy("groovy",(function(){return o("4bTmH")})),haml:qy("haml",(function(){return o("h2A6V")})),handlebars:qy("handlebars",(function(){return o("79YVJ")})),haskell:qy("haskell",(function(){return o("bsiLW")})),haxe:qy("haxe",(function(){return o("94Kdj")})),hcl:qy("hcl",(function(){return o("9CheR")})),hlsl:qy("hlsl",(function(){return o("h3dqW")})),hoon:qy("hoon",(function(){return o("9WbsW")})),hpkp:qy("hpkp",(function(){return o("GiPN3")})),hsts:qy("hsts",(function(){return o("eaSn9")})),http:qy("http",(function(){return o("1uj7b")})),ichigojam:qy("ichigojam",(function(){return o("ge562")})),icon:qy("icon",(function(){return o("lVHUf")})),icuMessageFormat:qy("icuMessageFormat",(function(){return o("aYoUL")})),idris:qy("idris",(function(){return o("1RVAE")})),iecst:qy("iecst",(function(){return o("bi7Dr")})),ignore:qy("ignore",(function(){return o("cq0Pi")})),inform7:qy("inform7",(function(){return o("31K4E")})),ini:qy("ini",(function(){return o("l05OZ")})),io:qy("io",(function(){return o("6bY1b")})),j:qy("j",(function(){return o("1ebDS")})),java:qy("java",(function(){return o("iEZZI")})),javadoc:qy("javadoc",(function(){return o("aHy5a")})),javadoclike:qy("javadoclike",(function(){return o("5f3rE")})),javascript:qy("javascript",(function(){return o("7JDFI")})),javastacktrace:qy("javastacktrace",(function(){return o("gdCGE")})),jexl:qy("jexl",(function(){return o("cqMb9")})),jolie:qy("jolie",(function(){return o("cEDX4")})),jq:qy("jq",(function(){return o("kEWsh")})),jsExtras:qy("jsExtras",(function(){return o("74PI8")})),jsTemplates:qy("jsTemplates",(function(){return o("30TPr")})),jsdoc:qy("jsdoc",(function(){return o("9DH5c")})),json:qy("json",(function(){return Promise.resolve(o("l1Rj1"))})),json5:qy("json5",(function(){return o("920rv")})),jsonp:qy("jsonp",(function(){return o("9AwS1")})),jsstacktrace:qy("jsstacktrace",(function(){return o("bYXMr")})),jsx:qy("jsx",(function(){return Promise.resolve(o("6ho3O"))})),julia:qy("julia",(function(){return o("g0ibH")})),keepalived:qy("keepalived",(function(){return o("2hdnH")})),keyman:qy("keyman",(function(){return o("cIufI")})),kotlin:qy("kotlin",(function(){return o("c26dU")})),kumir:qy("kumir",(function(){return o("iYAha")})),kusto:qy("kusto",(function(){return o("9z1oX")})),latex:qy("latex",(function(){return o("lCPLU")})),latte:qy("latte",(function(){return o("c9oN0")})),less:qy("less",(function(){return o("hA3V9")})),lilypond:qy("lilypond",(function(){return o("hpHTA")})),liquid:qy("liquid",(function(){return o("kpZTm")})),lisp:qy("lisp",(function(){return o("chgK5")})),livescript:qy("livescript",(function(){return o("2gdiv")})),llvm:qy("llvm",(function(){return o("jUeFO")})),log:qy("log",(function(){return o("3BFSQ")})),lolcode:qy("lolcode",(function(){return o("lG9br")})),lua:qy("lua",(function(){return o("cVGpd")})),magma:qy("magma",(function(){return o("4LVzY")})),makefile:qy("makefile",(function(){return o("2NviD")})),markdown:qy("markdown",(function(){return o("jUFCF")})),markupTemplating:qy("markupTemplating",(function(){return Promise.resolve(o("t3W0d"))})),markup:qy("markup",(function(){return o("5hIXu")})),matlab:qy("matlab",(function(){return o("kPAC0")})),maxscript:qy("maxscript",(function(){return o("gHOJy")})),mel:qy("mel",(function(){return o("9mj6e")})),mermaid:qy("mermaid",(function(){return o("kozw5")})),mizar:qy("mizar",(function(){return o("2bN6W")})),mongodb:qy("mongodb",(function(){return o("eHKWX")})),monkey:qy("monkey",(function(){return o("7Fh0C")})),moonscript:qy("moonscript",(function(){return o("hDXwC")})),n1ql:qy("n1ql",(function(){return o("j9bkC")})),n4js:qy("n4js",(function(){return o("eTmBF")})),nand2tetrisHdl:qy("nand2tetrisHdl",(function(){return o("ezjCf")})),naniscript:qy("naniscript",(function(){return o("VxHk1")})),nasm:qy("nasm",(function(){return o("ly95T")})),neon:qy("neon",(function(){return o("7Fk34")})),nevod:qy("nevod",(function(){return o("3U8Qv")})),nginx:qy("nginx",(function(){return o("c6qVk")})),nim:qy("nim",(function(){return o("1JdCk")})),nix:qy("nix",(function(){return o("jcstS")})),nsis:qy("nsis",(function(){return o("kEJqW")})),objectivec:qy("objectivec",(function(){return o("lUP8A")})),ocaml:qy("ocaml",(function(){return o("lhTAD")})),opencl:qy("opencl",(function(){return o("8rxKO")})),openqasm:qy("openqasm",(function(){return o("ib0uL")})),oz:qy("oz",(function(){return o("csCUS")})),parigp:qy("parigp",(function(){return o("2DkHE")})),parser:qy("parser",(function(){return o("2cp75")})),pascal:qy("pascal",(function(){return o("fViVl")})),pascaligo:qy("pascaligo",(function(){return o("9Uuxa")})),pcaxis:qy("pcaxis",(function(){return o("jUdnN")})),peoplecode:qy("peoplecode",(function(){return o("l8w4e")})),perl:qy("perl",(function(){return o("aX7dM")})),phpExtras:qy("phpExtras",(function(){return o("3cMZl")})),php:qy("php",(function(){return Promise.resolve(o("5li5P"))})),phpdoc:qy("phpdoc",(function(){return o("bDyJN")})),plsql:qy("plsql",(function(){return o("cPuMN")})),powerquery:qy("powerquery",(function(){return o("jE1gU")})),powershell:qy("powershell",(function(){return o("k7t0j")})),processing:qy("processing",(function(){return o("jr8hV")})),prolog:qy("prolog",(function(){return o("hpuat")})),promql:qy("promql",(function(){return o("ckXC5")})),properties:qy("properties",(function(){return o("fAh6P")})),protobuf:qy("protobuf",(function(){return o("R6WqB")})),psl:qy("psl",(function(){return o("Al65w")})),pug:qy("pug",(function(){return o("dxbNS")})),puppet:qy("puppet",(function(){return o("lrSuh")})),pure:qy("pure",(function(){return o("6DKQK")})),purebasic:qy("purebasic",(function(){return o("7ZkSb")})),purescript:qy("purescript",(function(){return o("dBTYx")})),python:qy("python",(function(){return Promise.resolve(o("kiy5M"))})),q:qy("q",(function(){return o("4FXyy")})),qml:qy("qml",(function(){return o("2zZFj")})),qore:qy("qore",(function(){return o("iCK1Y")})),qsharp:qy("qsharp",(function(){return o("dvH9H")})),r:qy("r",(function(){return o("lQqRt")})),racket:qy("racket",(function(){return o("eHKmq")})),reason:qy("reason",(function(){return o("kkeLT")})),regex:qy("regex",(function(){return o("llX50")})),rego:qy("rego",(function(){return o("9hKdZ")})),renpy:qy("renpy",(function(){return o("cJgw5")})),rest:qy("rest",(function(){return o("867DK")})),rip:qy("rip",(function(){return o("3Odjx")})),roboconf:qy("roboconf",(function(){return o("gQ0Us")})),robotframework:qy("robotframework",(function(){return o("bLCgx")})),ruby:qy("ruby",(function(){return Promise.resolve(o("ch1PX"))})),rust:qy("rust",(function(){return o("cInT8")})),sas:qy("sas",(function(){return o("iz7eP")})),sass:qy("sass",(function(){return o("hrDC3")})),scala:qy("scala",(function(){return o("ub8Bf")})),scheme:qy("scheme",(function(){return o("7NAAt")})),scss:qy("scss",(function(){return Promise.resolve(o("fU6a0"))})),shellSession:qy("shellSession",(function(){return o("7kKCv")})),smali:qy("smali",(function(){return o("2lkCb")})),smalltalk:qy("smalltalk",(function(){return o("4280y")})),smarty:qy("smarty",(function(){return o("4hXYK")})),sml:qy("sml",(function(){return o("jh2E8")})),solidity:qy("solidity",(function(){return o("dTdF2")})),solutionFile:qy("solutionFile",(function(){return o("iI5tm")})),soy:qy("soy",(function(){return o("aoU5C")})),sparql:qy("sparql",(function(){return o("ggrvb")})),splunkSpl:qy("splunkSpl",(function(){return o("8LhCX")})),sqf:qy("sqf",(function(){return o("3tDsu")})),sql:qy("sql",(function(){return Promise.resolve(o("bnDV9"))})),squirrel:qy("squirrel",(function(){return o("bxaUV")})),stan:qy("stan",(function(){return o("dBqrq")})),stylus:qy("stylus",(function(){return o("JlHVK")})),swift:qy("swift",(function(){return o("c7NBs")})),systemd:qy("systemd",(function(){return o("jprZl")})),t4Cs:qy("t4Cs",(function(){return o("edsMI")})),t4Templating:qy("t4Templating",(function(){return o("bS9Wa")})),t4Vb:qy("t4Vb",(function(){return o("gYk20")})),tap:qy("tap",(function(){return o("byv7d")})),tcl:qy("tcl",(function(){return o("lUAIZ")})),textile:qy("textile",(function(){return o("7J2LO")})),toml:qy("toml",(function(){return o("eXtdM")})),tremor:qy("tremor",(function(){return o("vyajH")})),tsx:qy("tsx",(function(){return Promise.resolve(o("7cTnl"))})),tt2:qy("tt2",(function(){return o("8XOOm")})),turtle:qy("turtle",(function(){return o("1XvLQ")})),twig:qy("twig",(function(){return o("i9Fpp")})),typescript:qy("typescript",(function(){return Promise.resolve(o("fzL8k"))})),typoscript:qy("typoscript",(function(){return o("kKk69")})),unrealscript:qy("unrealscript",(function(){return o("jgq8Y")})),uorazor:qy("uorazor",(function(){return o("dsZ00")})),uri:qy("uri",(function(){return o("fqJRp")})),v:qy("v",(function(){return o("bgfyB")})),vala:qy("vala",(function(){return o("68x4q")})),vbnet:qy("vbnet",(function(){return o("eUhQs")})),velocity:qy("velocity",(function(){return o("fPNdV")})),verilog:qy("verilog",(function(){return o("2fM1V")})),vhdl:qy("vhdl",(function(){return o("hNF6q")})),vim:qy("vim",(function(){return o("75TCr")})),visualBasic:qy("visualBasic",(function(){return o("fc93z")})),warpscript:qy("warpscript",(function(){return o("jgHlG")})),wasm:qy("wasm",(function(){return o("dVZkI")})),webIdl:qy("webIdl",(function(){return o("9Jnxv")})),wiki:qy("wiki",(function(){return o("1Gimo")})),wolfram:qy("wolfram",(function(){return o("4SyRT")})),wren:qy("wren",(function(){return o("gaIVs")})),xeora:qy("xeora",(function(){return o("lagad")})),xmlDoc:qy("xmlDoc",(function(){return o("9DNYE")})),xojo:qy("xojo",(function(){return o("ksF4f")})),xquery:qy("xquery",(function(){return o("gXxHJ")})),yaml:qy("yaml",(function(){return o("6rk3j")})),yang:qy("yang",(function(){return o("kTyrQ")})),zig:qy("zig",(function(){return o("d3mFC")}))},Jy=(Uy=(Fy={loader:function(){return o("bB2YF").then((function(e){return e.default||e}))},isLanguageRegistered:function(e,t){return e.registered(t)},languageLoaders:Ky,registerLanguage:function(e,t,n){return e.register(n)}}).loader,jy=Fy.isLanguageRegistered,Hy=Fy.registerLanguage,Vy=Fy.languageLoaders,Gy=Fy.noAsyncLoadingLanguages,Wy=function(e){t(ey)(i,e);var n,r=zy(i);function i(){return t(ee)(this,i),r.apply(this,arguments)}return t(te)(i,[{key:"componentDidUpdate",value:function(){!i.isRegistered(this.props.language)&&Vy&&this.loadLanguage()}},{key:"componentDidMount",value:function(){var e=this;i.astGeneratorPromise||i.loadAstGenerator(),i.astGenerator||i.astGeneratorPromise.then((function(){e.forceUpdate()})),!i.isRegistered(this.props.language)&&Vy&&this.loadLanguage()}},{key:"loadLanguage",value:function(){var e=this,t=this.props.language;"text"!==t&&i.loadLanguage(t).then((function(){return e.forceUpdate()})).catch((function(){}))}},{key:"normalizeLanguage",value:function(e){return i.isSupportedLanguage(e)?e:"text"}},{key:"render",value:function(){return t(c).createElement(i.highlightInstance,t(Xv)({},this.props,{language:this.normalizeLanguage(this.props.language),astGenerator:i.astGenerator}))}}],[{key:"preload",value:function(){return i.loadAstGenerator()}},{key:"loadLanguage",value:(n=t(Yv)(t(ly).mark((function e(n){var r;return t(ly).wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof(r=Vy[n])){e.next=5;break}return e.abrupt("return",r(i.registerLanguage));case 5:throw new Error("Language ".concat(n," not supported"));case 6:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"isSupportedLanguage",value:function(e){return i.isRegistered(e)||"function"==typeof Vy[e]}},{key:"loadAstGenerator",value:function(){return i.astGeneratorPromise=Uy().then((function(e){i.astGenerator=e,Hy&&i.languages.forEach((function(t,n){return Hy(e,n,t)}))})),i.astGeneratorPromise}}]),i}(t(c).PureComponent),t(X)(Wy,"astGenerator",null),t(X)(Wy,"highlightInstance",By(null,{})),t(X)(Wy,"astGeneratorPromise",null),t(X)(Wy,"languages",new Map),t(X)(Wy,"supportedLanguages",Fy.supportedLanguages||Object.keys(Vy||{})),t(X)(Wy,"isRegistered",(function(e){if(Gy)return!0;if(!Hy)throw new Error("Current syntax highlighter doesn't support registration of languages");return Wy.astGenerator?jy(Wy.astGenerator,e):Wy.languages.has(e)})),t(X)(Wy,"registerLanguage",(function(e,t){if(!Hy)throw new Error("Current syntax highlighter doesn't support registration of languages");if(Wy.astGenerator)return Hy(Wy.astGenerator,e,t);Wy.languages.set(e,t)})),Wy),Qy={},Yy={};(Yy=function(e){return e&&e.__esModule?e:{default:e}}).__esModule=!0,Yy.default=Yy,Object.defineProperty(Qy,"__esModule",{value:!0}),Object.defineProperty(Qy,"a11yDark",{enumerable:!0,get:function(){return ob.default}}),Object.defineProperty(Qy,"atomDark",{enumerable:!0,get:function(){return sb.default}}),Object.defineProperty(Qy,"base16AteliersulphurpoolLight",{enumerable:!0,get:function(){return ab.default}}),Object.defineProperty(Qy,"cb",{enumerable:!0,get:function(){return lb.default}}),Object.defineProperty(Qy,"coldarkCold",{enumerable:!0,get:function(){return cb.default}}),Object.defineProperty(Qy,"coldarkDark",{enumerable:!0,get:function(){return ub.default}}),Object.defineProperty(Qy,"coy",{enumerable:!0,get:function(){return Zy.default}}),Object.defineProperty(Qy,"coyWithoutShadows",{enumerable:!0,get:function(){return db.default}}),Object.defineProperty(Qy,"darcula",{enumerable:!0,get:function(){return hb.default}}),Object.defineProperty(Qy,"dark",{enumerable:!0,get:function(){return Xy.default}}),Object.defineProperty(Qy,"dracula",{enumerable:!0,get:function(){return pb.default}}),Object.defineProperty(Qy,"duotoneDark",{enumerable:!0,get:function(){return fb.default}}),Object.defineProperty(Qy,"duotoneEarth",{enumerable:!0,get:function(){return mb.default}}),Object.defineProperty(Qy,"duotoneForest",{enumerable:!0,get:function(){return gb.default}}),Object.defineProperty(Qy,"duotoneLight",{enumerable:!0,get:function(){return vb.default}}),Object.defineProperty(Qy,"duotoneSea",{enumerable:!0,get:function(){return yb.default}}),Object.defineProperty(Qy,"duotoneSpace",{enumerable:!0,get:function(){return bb.default}}),Object.defineProperty(Qy,"funky",{enumerable:!0,get:function(){return $y.default}}),Object.defineProperty(Qy,"ghcolors",{enumerable:!0,get:function(){return xb.default}}),Object.defineProperty(Qy,"gruvboxDark",{enumerable:!0,get:function(){return Sb.default}}),Object.defineProperty(Qy,"gruvboxLight",{enumerable:!0,get:function(){return wb.default}}),Object.defineProperty(Qy,"holiTheme",{enumerable:!0,get:function(){return _b.default}}),Object.defineProperty(Qy,"hopscotch",{enumerable:!0,get:function(){return Cb.default}}),Object.defineProperty(Qy,"lucario",{enumerable:!0,get:function(){return Ab.default}}),Object.defineProperty(Qy,"materialDark",{enumerable:!0,get:function(){return Eb.default}}),Object.defineProperty(Qy,"materialLight",{enumerable:!0,get:function(){return Tb.default}}),Object.defineProperty(Qy,"materialOceanic",{enumerable:!0,get:function(){return Mb.default}}),Object.defineProperty(Qy,"nightOwl",{enumerable:!0,get:function(){return Ib.default}}),Object.defineProperty(Qy,"nord",{enumerable:!0,get:function(){return Rb.default}}),Object.defineProperty(Qy,"okaidia",{enumerable:!0,get:function(){return eb.default}}),Object.defineProperty(Qy,"oneDark",{enumerable:!0,get:function(){return Pb.default}}),Object.defineProperty(Qy,"oneLight",{enumerable:!0,get:function(){return kb.default}}),Object.defineProperty(Qy,"pojoaque",{enumerable:!0,get:function(){return Ob.default}}),Object.defineProperty(Qy,"prism",{enumerable:!0,get:function(){return ib.default}}),Object.defineProperty(Qy,"shadesOfPurple",{enumerable:!0,get:function(){return Nb.default}}),Object.defineProperty(Qy,"solarizedDarkAtom",{enumerable:!0,get:function(){return Lb.default}}),Object.defineProperty(Qy,"solarizedlight",{enumerable:!0,get:function(){return tb.default}}),Object.defineProperty(Qy,"synthwave84",{enumerable:!0,get:function(){return Db.default}}),Object.defineProperty(Qy,"tomorrow",{enumerable:!0,get:function(){return nb.default}}),Object.defineProperty(Qy,"twilight",{enumerable:!0,get:function(){return rb.default}}),Object.defineProperty(Qy,"vs",{enumerable:!0,get:function(){return Bb.default}}),Object.defineProperty(Qy,"vscDarkPlus",{enumerable:!0,get:function(){return zb.default}}),Object.defineProperty(Qy,"xonokai",{enumerable:!0,get:function(){return Fb.default}}),Object.defineProperty(Qy,"zTouch",{enumerable:!0,get:function(){return Ub.default}});var Zy=Yy(o("jcF8U")),Xy=Yy(o("3Tppx")),$y=Yy(o("dBuK7")),eb=Yy(o("eEjWK")),tb=Yy(o("awG2g")),nb=Yy(o("2oFzQ")),rb=Yy(o("4Au6Q")),ib=Yy(o("dAPqs")),ob=Yy(o("8eAql")),sb=Yy(o("cv2QE")),ab=Yy(o("h5I9g")),lb=Yy(o("i4C5w")),cb=Yy(o("3kFKo")),ub=Yy(o("17zK0")),db=Yy(o("5Avqr")),hb=Yy(o("1jHMv")),pb=Yy(o("7Q8CE")),fb=Yy(o("jKUos")),mb=Yy(o("Uzm4J")),gb=Yy(o("7yfkN")),vb=Yy(o("lT2l1")),yb=Yy(o("fZ9um")),bb=Yy(o("1MoQL")),xb=Yy(o("4uys7")),Sb=Yy(o("kaYsk")),wb=Yy(o("kN6Vu")),_b=Yy(o("2Z6pG")),Cb=Yy(o("4jQJK")),Ab=Yy(o("bpXw0")),Eb=Yy(o("i4S8s")),Tb=Yy(o("5bNr4")),Mb=Yy(o("5ZYWT")),Ib=Yy(o("ihJCU")),Rb=Yy(o("8iIbg")),Pb=Yy(o("424u7")),kb=Yy(o("jPiNI")),Ob=Yy(o("OHVOA")),Nb=Yy(o("2OKTL")),Lb=Yy(o("2Mg8H")),Db=Yy(o("9Kud0")),Bb=Yy(o("eCrmR")),zb=Yy(o("8UhcQ")),Fb=Yy(o("dtU9z")),Ub=Yy(o("4xtLO")),jb={};Object.defineProperty(jb,"__esModule",{value:!0}),jb.default=void 0;var Hb=Yy(o("7cTnl")).default;jb.default=Hb;var Vb={};Object.defineProperty(Vb,"__esModule",{value:!0}),Vb.default=void 0;var Gb=Yy(o("l1Rj1")).default;Vb.default=Gb;var Wb={};Object.defineProperty(Wb,"__esModule",{value:!0}),Wb.default=void 0;var qb=Yy(o("fU6a0")).default;Wb.default=qb;var Kb={};Object.defineProperty(Kb,"__esModule",{value:!0}),Kb.default=void 0;var Jb=Yy(o("3aDLI")).default;Kb.default=Jb;var Qb={};Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.default=void 0;var Yb=Yy(o("kiy5M")).default;Qb.default=Yb;var Zb={};Object.defineProperty(Zb,"__esModule",{value:!0}),Zb.default=void 0;var Xb=Yy(o("lR39A")).default;Zb.default=Xb;var $b={};Object.defineProperty($b,"__esModule",{value:!0}),$b.default=void 0;var ex=Yy(o("5li5P")).default;$b.default=ex;var tx={};Object.defineProperty(tx,"__esModule",{value:!0}),tx.default=void 0;var nx=Yy(o("ch1PX")).default;tx.default=nx;var rx={};Object.defineProperty(rx,"__esModule",{value:!0}),rx.default=void 0;var ix=Yy(o("bnDV9")).default;rx.default=ix,Jy.registerLanguage("tsx",t(jb)),Jy.registerLanguage("json",t(Vb)),Jy.registerLanguage("scss",t(Wb)),Jy.registerLanguage("bash",t(Kb)),Jy.registerLanguage("python",t(Qb)),Jy.registerLanguage("cpp",t(Zb)),Jy.registerLanguage("php",t($b)),Jy.registerLanguage("ruby",t(tx)),Jy.registerLanguage("sql",t(rx));var ox=({medium:e,className:t,preview:n=!1,showLineNumbers:r=!0,showCopyButton:i=!0})=>{var o,a,l,c;const{t:u}=Se();return(0,s.jsxs)("div",{className:"memori-snippet",children:[(0,s.jsxs)("div",{className:"memori-snippet--content",children:[(0,s.jsx)(Jy,{"aria-labelledby":`#snippet-${e.mediumID}`,className:t,style:Qy.atomDark,showLineNumbers:r,language:null!==(a=null===(o=Jv.find((t=>e.mimeType===t.mimeType)))||void 0===o?void 0:o.lang)&&void 0!==a?a:"text",children:(null===(l=e.content)||void 0===l?void 0:l.length)&&e.content.length>200&&n?`${e.content.slice(0,200)}\n...`:`${e.content}`}),i&&(0,s.jsx)(Sf,{padded:!1,ghost:!0,className:"memori-snippet--copy-button",title:u("copy")||"Copy",icon:(0,s.jsx)(Wv,{}),onClick:()=>{var t;return navigator.clipboard.writeText(null!==(t=e.content)&&void 0!==t?t:"")}})]}),!!(null===(c=e.title)||void 0===c?void 0:c.length)&&(0,s.jsx)("p",{id:`snippet-${e.mediumID}`,className:"memori-snippet--caption",children:e.title})]})};c=o("85Hg2"),c=o("85Hg2");var sx,ax=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M574 665.4a8.03 8.03 0 0 0-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 0 0-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 0 0 0 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 0 0 0 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 0 0-11.3 0L372.3 598.7a8.03 8.03 0 0 0 0 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"})}),lx={};sx=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=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};function n(e,n){var r=e.el,i=e.elStyle,o=e.elHeight,s=e.rowsLimit,a=e.rowsWrapped,l=e.options,c=e.buffer,u=c;if(a===s+1)return t({},e);var d=c,h=a,p=o;return r.innerHTML=u=c.length?""+c+l.delimiter+n+l.replaceStr:""+n+l.replaceStr,parseFloat(i.height)>parseFloat(o)&&(h++,p=i.height,h===s+1)?(r.innerHTML=u="."===d[d.length-1]&&"..."===l.replaceStr?d+"..":""+d+l.replaceStr,t({},e,{elHeight:p,rowsWrapped:h})):(r.innerHTML=u=d.length?""+d+l.delimiter+n:""+n,t({},e,{buffer:u,elHeight:p,rowsWrapped:h}))}e.disableResponsive=function(e){window.removeEventListener("resize",e)},e.ellipsis=function e(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={replaceStr:"...",responsive:!1,debounceDelay:250,delimiter:" "},a=t({},s,o),l=r&&(r instanceof NodeList?r:1===r.nodeType?[r]:document.querySelectorAll(r)),c=[],u=0;u<l.length;u++){var d=l[u];c[u]=d.innerHTML;var h=d.innerHTML.split(a.delimiter);d.innerHTML="";var p=window.getComputedStyle(d);h.reduce(n,{el:d,buffer:d.innerHTML,elStyle:p,elHeight:0,rowsLimit:i,rowsWrapped:0,options:a})}if(a.responsive){var f=!1,m=window.innerWidth,g=function(){if(window.innerWidth!==m){m=window.innerWidth;for(var n=0;n<l.length;n++)l[n].innerHTML=c[n];e(r,i,t({},o,{responsive:!1}))}},v=function(){clearTimeout(f),f=setTimeout(g,a.debounceDelay)};return window.addEventListener("resize",v),v}}},"function"==typeof define&&define.amd?define(["exports"],sx):sx(lx);var cx=({loading:e=!1,className:n,title:r,description:i,cover:o,hoverable:a=!1,children:l})=>(0,s.jsx)("div",{className:t(ws)("memori-card",n,{"memori-card--loading":e,"memori-card--with-cover":o,"memori-card--hoverable":a}),children:(0,s.jsxs)(xf,{spinning:e,children:[o&&(0,s.jsx)("div",{className:"memori-card--cover",children:o}),(0,s.jsxs)("div",{className:"memori-card--content",children:[r&&(0,s.jsx)("h3",{className:"memori-card--title",children:r}),i&&(0,s.jsx)("p",{className:"memori-card--description",children:i}),(0,s.jsx)("div",{className:"memori-card--children",children:l})]})]})});const ux=({isChild:e=!1,item:n,baseUrl:r,onLinkPreviewInfo:i,descriptionOneLine:o=!1})=>{var a,l,u,d;const[h,p]=(0,c.useState)(null),f=(null===(a=n.url)||void 0===a?void 0:a.startsWith("http"))||!n.url||0===(null===(l=n.url)||void 0===l?void 0:l.length)?n.url:`https://${n.url}`;(0,c.useEffect)((()=>{var e,t;let o=(null===(e=n.url)||void 0===e?void 0:e.startsWith("http"))||!n.url||0===(null===(t=n.url)||void 0===t?void 0:t.length)?n.url:`https://${n.url}`;o&&o!==(null==h?void 0:h.urlKey)&&(async(e,t)=>{try{const n=await fetch(`${t||"https://aisuru.com"}/api/linkpreview/${encodeURIComponent(e)}`);return await n.json()}catch(e){return console.error("getSiteInfo",e),null}})(o,r).then((e=>{p(e?{...e,urlKey:o}:null),i&&e&&i(e)}))}),[null==n?void 0:n.url,r,i]);const m=n.title&&n.title.length>0?n.title:null==h?void 0:h.title,g=null==h?void 0:h.description,v=null==h?void 0:h.video,y=null!==(u=null==h?void 0:h.image)&&void 0!==u?u:null===(d=null==h?void 0:h.images)||void 0===d?void 0:d[0];return(0,c.useEffect)((()=>{setTimeout((()=>{(0,lx.ellipsis)(".memori-link-item--card .memori-card--description",3,{responsive:!0})}),300)}),[g,n.mediumID]),(0,s.jsx)("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:t(ws)("memori-link-item--link",{"memori-link-item--link--child":e}),onClick:t=>{e||(t.preventDefault(),t.stopPropagation(),window.open(f,"_blank",`toolbar=yes,top=${.1*window.innerHeight},left=${.1*window.innerWidth},width=${.8*window.innerWidth},height=${.8*window.innerHeight}`))},children:(0,s.jsx)(cx,{hoverable:!0,className:t(ws)("memori-link-item--card",{"memori-link-item--card-description-oneline":o,"memori-link-item--card-has-image":y,"memori-link-item--card-has-video":v}),cover:v?(0,s.jsx)("iframe",{width:"100%",height:"100%",src:v,title:"Video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):y?(0,s.jsx)("img",{className:"memori-link-item--card-cover-img",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",srcSet:y.includes("data:image")?void 0:y.startsWith("https")?y:`https://${y.replace("http://","")}`,alt:n.title}):(0,s.jsx)("div",{className:"memori-link-item--card-cover-icon",children:(0,s.jsx)(ax,{className:"memori-link-item--icon"})}),title:m,description:g})})};var dx=({items:e,baseUrl:t,descriptionOneLine:n=!1,onLinkPreviewInfo:r})=>(0,s.jsx)(np,{appear:!0,show:!0,as:"div",className:"memori-link-items",children:(0,s.jsx)("div",{className:"memori-link-items--grid",children:e.map(((e,i)=>(0,s.jsx)(np.Child,{as:"div",className:"memori-link-item",enter:"ease-out duration-500 delay-"+100*i,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(ux,{item:e,baseUrl:t,descriptionOneLine:n,onLinkPreviewInfo:r})},e.mediumID)))})});c=o("85Hg2");const hx=["va bene","no grazie","si","no","sì","arrivederci","non c'entrava","non mi è piaciuto"],px=async(e,t,n,r)=>{var i;const o=hx.indexOf(e.toLowerCase())>-1?"IT":null==n?void 0:n.toUpperCase(),s=await fetch(`${r||"https://aisuru.com"}/api/translate?text=${encodeURIComponent(e)}&target_lang=${t.toUpperCase()}${o?`&source_lang=${o}`:""}`,{method:"GET",headers:{Accept:"*/*"}}),a=await s.json();return null===(i=null==a?void 0:a.translations)||void 0===i?void 0:i[0]};c=o("85Hg2");var fx=({src:e,poster:t,alt:n=""})=>((0,c.useEffect)((()=>{const e=document.createElement("script");return e.src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js",e.type="module",document.head.appendChild(e),()=>{document.head.removeChild(e)}}),[]),(0,s.jsx)("div",{className:"model-viewer",children:(0,s.jsx)("model-viewer",{src:e,"ios-src":"",poster:t,alt:n,"shadow-intensity":"1","disable-zoom":!0,"camera-controls":!0,autoplay:!0})}));var mx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var gx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M531.3 574.4l.3-1.4c5.8-23.9 13.1-53.7 7.4-80.7-3.8-21.3-19.5-29.6-32.9-30.2-15.8-.7-29.9 8.3-33.4 21.4-6.6 24-.7 56.8 10.1 98.6-13.6 32.4-35.3 79.5-51.2 107.5-29.6 15.3-69.3 38.9-75.2 68.7-1.2 5.5.2 12.5 3.5 18.8 3.7 7 9.6 12.4 16.5 15 3 1.1 6.6 2 10.8 2 17.6 0 46.1-14.2 84.1-79.4 5.8-1.9 11.8-3.9 17.6-5.9 27.2-9.2 55.4-18.8 80.9-23.1 28.2 15.1 60.3 24.8 82.1 24.8 21.6 0 30.1-12.8 33.3-20.5 5.6-13.5 2.9-30.5-6.2-39.6-13.2-13-45.3-16.4-95.3-10.2-24.6-15-40.7-35.4-52.4-65.8zM421.6 726.3c-13.9 20.2-24.4 30.3-30.1 34.7 6.7-12.3 19.8-25.3 30.1-34.7zm87.6-235.5c5.2 8.9 4.5 35.8.5 49.4-4.9-19.9-5.6-48.1-2.7-51.4.8.1 1.5.7 2.2 2zm-1.6 120.5c10.7 18.5 24.2 34.4 39.1 46.2-21.6 4.9-41.3 13-58.9 20.2-4.2 1.7-8.3 3.4-12.3 5 13.3-24.1 24.4-51.4 32.1-71.4zm155.6 65.5c.1.2.2.5-.4.9h-.2l-.2.3c-.8.5-9 5.3-44.3-8.6 40.6-1.9 45 7.3 45.1 7.4zm191.4-388.2L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494z"})});var vx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM514.1 580.1l-61.8-102.4c-2.2-3.6-6.1-5.8-10.3-5.8h-38.4c-2.3 0-4.5.6-6.4 1.9-5.6 3.5-7.3 10.9-3.7 16.6l82.3 130.4-83.4 132.8a12.04 12.04 0 0 0 10.2 18.4h34.5c4.2 0 8-2.2 10.2-5.7L510 664.8l62.3 101.4c2.2 3.6 6.1 5.7 10.2 5.7H620c2.3 0 4.5-.7 6.5-1.9 5.6-3.6 7.2-11 3.6-16.6l-84-130.4 85.3-132.5a12.04 12.04 0 0 0-10.1-18.5h-35.7c-4.2 0-8.1 2.2-10.3 5.8l-61.2 102.3z"})});var yx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0 0 42 42h216v494zM528.1 472h-32.2c-5.5 0-10.3 3.7-11.6 9.1L434.6 680l-46.1-198.7c-1.3-5.4-6.1-9.3-11.7-9.3h-35.4a12.02 12.02 0 0 0-11.6 15.1l74.2 276c1.4 5.2 6.2 8.9 11.6 8.9h32c5.4 0 10.2-3.6 11.6-8.9l52.8-197 52.8 197c1.4 5.2 6.2 8.9 11.6 8.9h31.8c5.4 0 10.2-3.6 11.6-8.9l74.4-276a12.04 12.04 0 0 0-11.6-15.1H647c-5.6 0-10.4 3.9-11.7 9.3l-45.8 199.1-49.8-199.3c-1.3-5.4-6.1-9.1-11.6-9.1z"})});const bx=({isChild:e=!1,item:t,sessionID:n,tenantID:r,preview:i=!1,baseURL:o,apiURL:a,onClick:l,customMediaRenderer:c})=>{var u,d;const h=fv({resourceURI:t.url,sessionID:n,tenantID:r,baseURL:o,apiURL:a}),p=null==c?void 0:c(t.mimeType);if(p)return p;const f=(null===(u=t.url)||void 0===u?void 0:u.startsWith("rgb("))||(null===(d=t.url)||void 0===d?void 0:d.startsWith("rgba("));switch(t.mimeType){case"image/jpeg":case"image/png":case"image/jpg":case"image/gif":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,className:"memori-media-item--card memori-media-item--image",cover:(0,s.jsxs)("picture",{className:"memori-media-item--figure",children:[!i&&!f&&(0,s.jsx)("source",{srcSet:[h,t.url,t.content].join(", "),type:t.mimeType}),f?(0,s.jsx)("div",{style:{minHeight:"150px",width:"100%",backgroundColor:t.url}}):(0,s.jsx)("img",{alt:t.title,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="}),t.title&&(0,s.jsx)("figcaption",{className:"memori-media-item--figure-caption",children:t.title})]})})});case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(yx,{className:"memori-media-item--icon"}),title:t.title})});case"application/vnd.ms-excel":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(vx,{className:"memori-media-item--icon"}),title:t.title})});case"application/pdf":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(gx,{className:"memori-media-item--icon"}),title:t.title})});case"video/mp4":case"video/quicktime":case"video/avi":case"video/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,onClick:n=>{e&&n.preventDefault(),l&&(n.preventDefault(),l(t.mediumID))},target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsxs)("video",{style:{width:"100%",height:"100%"},controls:!0,src:h,title:t.title,children:["video/quicktime"===t.mimeType&&(0,s.jsx)("source",{src:t.url,type:"video/mp4"}),(0,s.jsx)("source",{src:t.url,type:t.mimeType}),"Your browser does not support this video format.",(0,s.jsx)("br",{}),(0,s.jsx)("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:"Download the video"})]}),title:t.title})});case"audio/mpeg3":case"audio/wav":case"audio/mpeg":return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)("audio",{style:{width:"100%",height:"100%"},controls:!0,src:h}),title:t.title})});case"model/gltf-binary":return(0,s.jsx)(fx,{src:h,alt:"",poster:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghgg0Aj8i0JO4OzsrPv69Wv+hi2qPHr0qNvf39+iI97soRIh4f3z58/u7du3SXX7Xt7Z2enevHmzfQe+oSN2apSAPj09TSrb+XKI/f379+08+A0cNRE2ANkupk+ACNPvkSPcAAEibACyXUyfABGm3yNHuAECRNgAZLuYPgEirKlHu7u7XdyytGwHAd8jjNyng4OD7vnz51dbPT8/7z58+NB9+/bt6jU/TI+AGWHEnrx48eJ/EsSmHzx40L18+fLyzxF3ZVMjEyDCiEDjMYZZS5wiPXnyZFbJaxMhQIQRGzHvWR7XCyOCXsOmiDAi1HmPMMQjDpbpEiDCiL358eNHurW/5SnWdIBbXiDCiA38/Pnzrce2YyZ4//59F3ePLNMl4PbpiL2J0L979+7yDtHDhw8vtzzvdGnEXdvUigSIsCLAWavHp/+qM0BcXMd/q25n1vF57TYBp0a3mUzilePj4+7k5KSLb6gt6ydAhPUzXnoPR0dHl79WGTNCfBnn1uvSCJdegQhLI1vvCk+fPu2ePXt2tZOYEV6/fn31dz+shwAR1sP1cqvLntbEN9MxA9xcYjsxS1jWR4AIa2Ibzx0tc44fYX/16lV6NDFLXH+YL32jwiACRBiEbf5KcXoTIsQSpzXx4N28Ja4BQoK7rgXiydbHjx/P25TaQAJEGAguWy0+2Q8PD6/Ki4R8EVl+bzBOnZY95fq9rj9zAkTI2SxdidBHqG9+skdw43borCXO/ZcJdraPWdv22uIEiLA4q7nvvCug8WTqzQveOH26fodo7g6uFe/a17W3+nFBAkRYENRdb1vkkz1CH9cPsVy/jrhr27PqMYvENYNlHAIesRiBYwRy0V+8iXP8+/fvX11Mr7L7ECueb/r48eMqm7FuI2BGWDEG8cm+7G3NEOfmdcTQw4h9/55lhm7DekRYKQPZF2ArbXTAyu4kDYB2YxUzwg0gi/41ztHnfQG26HbGel/crVrm7tNY+/1btkOEAZ2M05r4FB7r9GbAIdxaZYrHdOsgJ/wCEQY0J74TmOKnbxxT9n3FgGGWWsVdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg=="});default:return(0,s.jsx)("a",{className:"memori-media-item--link",href:h,target:"_blank",rel:"noopener noreferrer",title:t.title,children:(0,s.jsx)(cx,{hoverable:!0,cover:(0,s.jsx)(mx,{className:"memori-media-item--icon"}),title:t.title})})}};var xx=(0,c.memo)((({items:e,sessionID:t,tenantID:n,translateTo:r,baseURL:i,apiURL:o,customMediaRenderer:a})=>{const[l,u]=(0,c.useState)(e),[d,h]=(0,c.useState)(),p=(0,c.useCallback)((async()=>{if(!r)return;const t=await Promise.all((null!=e?e:[]).map((async e=>{var t;if(!e.title)return e;try{const n=await px(e.title,r);return{...e,title:null!==(t=n.text)&&void 0!==t?t:e.title}}catch(t){return console.error(t),e}})));u(t)}),[r,e]);return(0,c.useEffect)((()=>{r&&p()}),[r,p]),(0,s.jsxs)(np,{appear:!0,show:!0,as:"div",className:"memori-media-items",children:[(0,s.jsx)("div",{className:"memori-media-items--grid",children:l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&!Jv.map((e=>e.mimeType)).includes(e.mimeType)})).sort(((e,t)=>e.creationTimestamp>t.creationTimestamp?1:e.creationTimestamp<t.creationTimestamp?-1:0)).map(((e,r)=>(0,s.jsx)(np.Child,{as:"div",className:"memori-media-item",enter:"ease-out duration-500 delay-"+100*r,enterFrom:"opacity-0 scale-95",enterTo:"opacity-1 scale-100",leave:"ease-in duration-300",leaveFrom:"opacity-1 scale-100",leaveTo:"opacity-0 scale-95",children:(0,s.jsx)(bx,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,onClick:e=>{h(l.find((t=>t.mediumID===e)))},item:{...e,title:e.title,url:e.url,content:e.content},customMediaRenderer:a})},e.url+"&index="+r)))}),l.filter((e=>{var t;return!(null===(t=e.properties)||void 0===t?void 0:t.executable)&&Jv.map((e=>e.mimeType)).includes(e.mimeType)})).map((e=>(0,s.jsx)(np.Child,{as:"div",className:"memori-media-item--snippet",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(ox,{medium:e},e.mediumID)},e.mediumID))),l.filter((e=>{var t;return"text/css"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)})).map((e=>(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:e.content||""}},e.mediumID))),(null==d?void 0:d.mediumID)&&(0,s.jsx)(Wm,{width:"100%",widthMd:"100%",className:"memori-media-item--modal",open:!!d,onClose:()=>h(void 0),footer:null,children:(0,s.jsx)(bx,{isChild:!0,sessionID:t,tenantID:n,baseURL:i,apiURL:o,item:{...d,title:d.title,url:d.url,content:d.content},customMediaRenderer:a})})]})}));var Sx=(0,c.memo)((({hints:e=[],links:n=[],media:r=[],simulateUserPrompt:i=(()=>{}),sessionID:o,baseUrl:a,apiUrl:l,translateTo:u,customMediaRenderer:d})=>{const{t:h}=Se(),[p,f]=(0,c.useState)(!0),[m,g]=(0,c.useState)(6);return(0,c.useEffect)((()=>{f(!0)}),[e]),(0,s.jsxs)("div",{className:"memori-media-widget",children:[(null==r?void 0:r.length)>0&&(0,s.jsx)(xx,{items:r,sessionID:o,translateTo:u,baseURL:a,apiURL:l,customMediaRenderer:d}),(null==n?void 0:n.length)>0&&(0,s.jsx)(dx,{items:n,baseUrl:a}),(null==e?void 0:e.length)>0&&p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(np,{appear:!0,show:!0,as:"ul",className:"memori-media--hints",children:e.slice(0,m).map(((e,n)=>(0,s.jsx)(np.Child,{as:"li",enter:"ease-out duration-500",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-1 translate-y-0",leave:"ease-in duration-300",leaveFrom:"opacity-1",leaveTo:"opacity-0",children:(0,s.jsx)(Sf,{className:t(ws)("memori-media--hint"),primary:!0,onClick:()=>{i(e.originalText,e.text),f(!1)},onTouchEnd:()=>{i(e.originalText,e.text),f(!1)},children:e.text},e.text+n)},e.text+n)))}),e.length>m&&(0,s.jsx)("div",{className:"memori-hints--show-more",children:(0,s.jsx)(Sf,{className:"memori-hints--show-more-button",id:"showMoreHints",onClick:()=>g(m+6),children:h("expand")||"Expand"})})]})]})}));const wx=e=>e.endsWith("?")?e:`${e}?`;var _x=({message:e,apiURL:n,sessionID:r,visible:i=!0,initialMatches:o=[],closeDrawer:a,_TEST_loading:l=!1})=>{const{t:u}=Se(),d=Y(n).search.searchMemory,[h,p]=(0,c.useState)(o),[f,m]=(0,c.useState)(l),g=(0,c.useCallback)((async()=>{if(m(!0),!l){try{const{matches:n,...i}=await d(r,{searchType:"Semantic",numberOfResults:3,text:e.questionAnswered,date:e.date,placeName:e.placeName,placeLatitude:e.placeLatitude,placeLongitude:e.placeLongitude,placeUncertaintyKm:e.placeUncertaintyKm,contextVars:e.contextVars,tag:e.tag,memoryTags:e.memoryTags});0!==i.resultCode?(console.error(i),t(Ju).error(u(Gv(i.resultCode)))):p(null!=n?n:[])}catch(e){console.error("WHYTHISANSWER/FETCH",e),p(null!=o?o:[])}m(!1)}}),[e,r]);return(0,c.useEffect)((()=>{g()}),[g,e,r]),(0,s.jsxs)(_f,{open:i,width:"80%",animated:!1,className:"memori-whythisanswer-drawer",onClose:()=>a(),title:u("whyThisAnswer"),children:[(0,s.jsx)("p",{children:u("whyThisAnswerHelper")}),e.questionAnswered&&(0,s.jsxs)("p",{className:"memori--whythisanswer-question-answered",children:[(0,s.jsxs)("strong",{children:[u("question")||"Question",":"]})," ",e.questionAnswered]}),(0,s.jsxs)(xf,{primary:!0,spinning:f,children:[!f&&0===h.length&&(0,s.jsx)("p",{role:"info",className:"memori--whythisanswer-no-results",children:u("nothingFound")}),f&&0===h.length&&(0,s.jsxs)("ul",{className:"memori--whythisanswer-list memori--whythisanswer-skeleton",children:[(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:(0,s.jsx)("span",{className:"memori--whythisanswer-skeleton-text"})}),(0,s.jsx)("div",{className:"memori--whythisanswer-title-text",children:(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"})})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"})]}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-block"})]}),(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:(0,s.jsx)("span",{className:"memori--whythisanswer-skeleton-text"})}),(0,s.jsxs)("div",{className:"memori--whythisanswer-title-text",children:[(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("p",{className:"memori--whythisanswer-skeleton-text"})]})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-text"})]}),(0,s.jsx)("div",{className:"memori--whythisanswer-skeleton-block"})]})]}),h.length>0&&(0,s.jsx)("ul",{className:"memori--whythisanswer-list",children:h.map((e=>{var t,n,r,i,o,a,l;return(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"memori--whythisanswer-title",children:[(0,s.jsx)("span",{className:"memori--whythisanswer-confidence",children:e.confidenceLevel}),(0,s.jsxs)("div",{className:"memori--whythisanswer-title-text",children:[(0,s.jsx)("p",{children:(0,s.jsx)("strong",{children:wx(null!==(t=e.memory.title)&&void 0!==t?t:"")})}),(0,s.jsx)("p",{children:null===(r=null===(n=e.memory.titleVariants)||void 0===n?void 0:n.map((e=>wx(e))))||void 0===r?void 0:r.join(" | ")})]})]}),null===(i=e.memory.answers)||void 0===i?void 0:i.map(((e,t)=>(0,s.jsx)("p",{className:"memori--whythisanswer-answer",children:(0,s.jsx)(Hv,{rows:3,children:e.text})},t))),(0,s.jsx)(Sx,{links:null===(o=e.memory.media)||void 0===o?void 0:o.filter((e=>"text/html"===e.mimeType))}),null===(l=null===(a=e.memory.media)||void 0===a?void 0:a.filter((e=>"text/plain"===e.mimeType)))||void 0===l?void 0:l.map((e=>(0,s.jsx)(Hv,{rows:2,lineHeightMultiplier:2,innerClassName:"memori--whythisanswer-snippet-expandable",children:(0,s.jsx)(ox,{medium:e,showCopyButton:!1,showLineNumbers:!1},e.mediumID)},e.mediumID)))]},e.memory.memoryID)}))})]})]})},Cx={};Cx=function(){"use strict";var e=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t=/[\0-\x1F\x7F-\x9F]/,n=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,r=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;function i(i){const o={};i=i||{},o.src_Any=e.source,o.src_Cc=t.source,o.src_Z=r.source,o.src_P=n.source,o.src_ZPCc=[o.src_Z,o.src_P,o.src_Cc].join("|"),o.src_ZCc=[o.src_Z,o.src_Cc].join("|");const s="[><|]";return o.src_pseudo_letter="(?:(?!"+s+"|"+o.src_ZPCc+")"+o.src_Any+")",o.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",o.src_auth="(?:(?:(?!"+o.src_ZCc+"|[@/\\[\\]()]).)+@)?",o.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",o.src_host_terminator="(?=$|"+s+"|"+o.src_ZPCc+")(?!"+(i["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+o.src_ZPCc+"))",o.src_path="(?:[/?#](?:(?!"+o.src_ZCc+"|"+s+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+o.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+o.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+o.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+o.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+o.src_ZCc+"|[']).)+\\'|\\'(?="+o.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+o.src_ZCc+"|[.]|$)|"+(i["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+o.src_ZCc+"|$)|;(?!"+o.src_ZCc+"|$)|\\!+(?!"+o.src_ZCc+"|[!]|$)|\\?(?!"+o.src_ZCc+"|[?]|$))+|\\/)?",o.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',o.src_xn="xn--[a-z0-9\\-]{1,59}",o.src_domain_root="(?:"+o.src_xn+"|"+o.src_pseudo_letter+"{1,63})",o.src_domain="(?:"+o.src_xn+"|(?:"+o.src_pseudo_letter+")|(?:"+o.src_pseudo_letter+"(?:-|"+o.src_pseudo_letter+"){0,61}"+o.src_pseudo_letter+"))",o.src_host="(?:(?:(?:(?:"+o.src_domain+")\\.)*"+o.src_domain+"))",o.tpl_host_fuzzy="(?:"+o.src_ip4+"|(?:(?:(?:"+o.src_domain+")\\.)+(?:%TLDS%)))",o.tpl_host_no_ip_fuzzy="(?:(?:(?:"+o.src_domain+")\\.)+(?:%TLDS%))",o.src_host_strict=o.src_host+o.src_host_terminator,o.tpl_host_fuzzy_strict=o.tpl_host_fuzzy+o.src_host_terminator,o.src_host_port_strict=o.src_host+o.src_port+o.src_host_terminator,o.tpl_host_port_fuzzy_strict=o.tpl_host_fuzzy+o.src_port+o.src_host_terminator,o.tpl_host_port_no_ip_fuzzy_strict=o.tpl_host_no_ip_fuzzy+o.src_port+o.src_host_terminator,o.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+o.src_ZPCc+"|>|$))",o.tpl_email_fuzzy="(^|"+s+'|"|\\(|'+o.src_ZCc+")("+o.src_email_name+"@"+o.tpl_host_fuzzy_strict+")",o.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+o.src_ZPCc+"))((?![$+<=>^`||])"+o.tpl_host_port_fuzzy_strict+o.src_path+")",o.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+o.src_ZPCc+"))((?![$+<=>^`||])"+o.tpl_host_port_no_ip_fuzzy_strict+o.src_path+")",o}function o(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function s(e){return Object.prototype.toString.call(e)}function a(e){return"[object String]"===s(e)}function l(e){return"[object Object]"===s(e)}function c(e){return"[object RegExp]"===s(e)}function u(e){return"[object Function]"===s(e)}function d(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const h={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function p(e){return Object.keys(e||{}).reduce((function(e,t){return e||h.hasOwnProperty(t)}),!1)}const f={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},m="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",g="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function v(e){e.__index__=-1,e.__text_cache__=""}function y(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function b(){return function(e,t){t.normalize(e)}}function x(e){const t=e.re=i(e.__opts__),n=e.__tlds__.slice();function r(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push(m),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const o=[];function s(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){const n=e.__schemas__[t];if(null===n)return;const r={validate:null,link:null};if(e.__compiled__[t]=r,l(n))return c(n.validate)?r.validate=y(n.validate):u(n.validate)?r.validate=n.validate:s(t,n),void(u(n.normalize)?r.normalize=n.normalize:n.normalize?s(t,n):r.normalize=b());a(n)?o.push(t):s(t,n)})),o.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:b()};const h=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(d).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+h+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),v(e)}function S(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function w(e,t){const n=new S(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function _(e,t){if(!(this instanceof _))return new _(e,t);t||p(e)&&(t=e,e={}),this.__opts__=o({},h,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},f,e),this.__compiled__={},this.__tlds__=g,this.__tlds_replaced__=!1,this.re={},x(this)}function C(e={},t={}){const n=new _(e,t);return E(n,t),{extensions:[{name:"autolink",level:"inline",start:e=>{const t=A(n,e);if(t)return t.index},tokenizer(e){if(this.lexer.state.inLink)return;const t=A(n,e);if(!t)return;let r;return 0===t.index?r=t.raw:1===t.index&&"<"===e.charAt(0)&&">"===e.charAt(t.lastIndex)&&(r=`<${t.raw}>`),r?{type:"link",raw:r,text:t.text,href:t.url,tokens:[{type:"text",raw:t.text,text:t.text}]}:void 0}}]}}function A(e,t){const n=e.match(t);if(n&&n.length)return n[0]}function E(e,t){const n=t.tlds;delete t.tlds;const r=t.tldsKeepOld;delete t.tldsKeepOld,n&&e.tlds(n,r)}return _.prototype.add=function(e,t){return this.__schemas__[e]=t,x(this),this},_.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},_.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,i,o,s,a,l,c;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(t=a.exec(e));)if(i=this.testSchemaAt(e,t[2],a.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=n.index+n[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(o=r.index+r[1].length,s=r.index+r[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&s>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=s))),this.__index__>=0},_.prototype.pretest=function(e){return this.re.pretest.test(e)},_.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},_.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(w(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(w(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},_.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,w(this,0)):null},_.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),x(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,x(this),this)},_.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},_.prototype.onCompile=function(){},C}();var Ax={};Ax=function(e){"use strict";const t=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,n=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function r(e={}){return{extensions:[o(e,i(e,!1)),s(e,i(e,!0))]}}function i(t,n){return r=>e.renderToString(r.text,{...t,displayMode:r.displayMode})+(n?"\n":"")}function o(e,n){return{name:"inlineKatex",level:"inline",start(e){let n,r=e;for(;r;){if(n=r.indexOf("$"),-1===n)return;if((0===n||" "===r.charAt(n-1))&&r.substring(n).match(t))return n;r=r.substring(n+1).replace(/^\$+/,"")}},tokenizer(e,n){const r=e.match(t);if(r)return{type:"inlineKatex",raw:r[0],text:r[2].trim(),displayMode:2===r[1].length}},renderer:n}}function s(e,t){return{name:"blockKatex",level:"block",tokenizer(e,t){const r=e.match(n);if(r)return{type:"blockKatex",raw:r[0],text:r[2].trim(),displayMode:2===r[1].length}},renderer:t}}return r}(o("kqAxc"));const Ex=(e,t,n,r)=>{if(!t.rowspan)return"";return`${`<${n}`+(t.colspan>1?` colspan=${t.colspan}`:"")+(t.rowspan>1?` rowspan=${t.rowspan}`:"")+(r?` align=${r}`:"")+">"+e}</${n}>\n`},Tx=(e,t,n=[])=>{var r,i,o;const s=[...e.matchAll(/(?:[^|\\]|\\.?)+(?:\|+|$)/g)].map((e=>e[0]));(null===(r=s[0])||void 0===r?void 0:r.trim())||s.shift(),(null===(i=s[s.length-1])||void 0===i?void 0:i.trim())||s.pop();let a,l,c,u,d,h=0;for(a=0;a<s.length;a++){if(c=s[a].split(/\|+$/)[0],s[a]={rowspan:1,colspan:Math.max(s[a].length-c.length,1),text:c.trim().replace(/\\\|/g,"|")},"^"===c.slice(-1)&&n.length)for(d=0,l=0;l<n.length;l++){if(u=n[l],d===h&&u.colspan===s[a].colspan){s[a].rowSpanTarget=null!==(o=u.rowSpanTarget)&&void 0!==o?o:u,s[a].rowSpanTarget.text+=` ${s[a].text.slice(0,-1)}`,s[a].rowSpanTarget.rowspan+=1,s[a].rowspan=0;break}if(d+=u.colspan,d>h)break}h+=s[a].colspan}if(h>t)s.splice(t);else for(;h<t;)s.push({colspan:1,text:""}),h+=1;return s};Fv.marked.use({async:!1,gfm:!0,pedantic:!0,renderer:{link(e,t,n){const r=am(e);if(null===r)return n;let i='<a href="'+(e=r)+'"';return t&&(i+=' title="'+t+'"'),i+=' target="_blank" rel="noopener noreferrer">'+n+"</a>",i}}}),Fv.marked.use(t(Cx)()),Fv.marked.use(t(Ax)({throwOnError:!0,output:"htmlAndMathml"})),Fv.marked.use({extensions:[{name:"spanTable",level:"block",start(e){var t;return null===(t=e.match(/^\n *([^\n ].*\|.*)\n/))||void 0===t?void 0:t.index},tokenizer(e,t){const n=new RegExp("^ *([^\\n ].*\\|.*\\n(?: *[^\\s].*\\n)*?) {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n| {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)| {0,3}#{1,6} | {0,3}>| {4}[^\\n]| {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n| {0,3}(?:[*+-]|1[.)]) |<\\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?: +|\\n|\\/?>)|<(?:script|pre|style|textarea|!--)).*(?:\\n|$))*)\\n*|$)").exec(e);if(n){const e={type:"spanTable",header:n[1].replace(/\n$/,"").split("\n"),align:n[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:n[3]?n[3].replace(/\n$/,"").split("\n"):[]};e.header[0]=Tx(e.header[0]);const t=e.header[0].reduce(((e,t)=>e+t.colspan),0);if(t===e.align.length){let r,i,o,s;e.raw=n[0];let a=e.align.length;for(r=0;r<a;r++)/^ *-+: *$/.test(e.align[r])?e.align[r]="right":/^ *:-+: *$/.test(e.align[r])?e.align[r]="center":/^ *:-+ *$/.test(e.align[r])?e.align[r]="left":e.align[r]=null;for(a=e.header.length,r=1;r<a;r++)e.header[r]=Tx(e.header[r],t,e.header[r-1]);for(a=e.rows.length,r=0;r<a;r++)e.rows[r]=Tx(e.rows[r],t,e.rows[r-1]);for(a=e.header.length,i=0;i<a;i++)for(s=e.header[i],o=0;o<s.length;o++)s[o].tokens=[],this.lexer.inline(s[o].text,s[o].tokens);for(a=e.rows.length,i=0;i<a;i++)for(s=e.rows[i],o=0;o<s.length;o++)s[o].tokens=[],this.lexer.inline(s[o].text,s[o].tokens);return e}}},renderer(e){let t,n,r,i,o,s,a='<div class="memori--responsive-table-wrapper"><table class="memori--table">';for(a+="<thead>",t=0;t<e.header.length;t++){r=e.header[t];let o=0;for(a+="<tr>",n=0;n<r.length;n++)i=r[n],s=this.parser.parseInline(i.tokens),a+=Ex(s,i,"th",e.align[o]),o+=i.colspan;a+="</tr>"}if(a+="</thead>",e.rows.length){for(a+="<tbody>",t=0;t<e.rows.length;t++){for(r=e.rows[t],o=0,a+="<tr>",n=0;n<r.length;n++)i=r[n],s=this.parser.parseInline(i.tokens),a+=Ex(s,i,"td",e.align[o]),o+=i.colspan;a+="</tr>"}a+="</tbody>"}return a+="</table></div>",a}}]});var Mx=({message:e,memori:n,tenant:r,baseUrl:i,apiUrl:o,sessionID:a,showFeedback:l,showWhyThisAnswer:u=!0,simulateUserPrompt:d,showAIicon:h=!0,isFirst:p=!1,user:f,userAvatar:m,experts:g})=>{var v,y,b,x,S,w;const{t:_}=Se(),[C,A]=(0,c.useState)(!1),E=e.fromUser?e.translatedText||e.text:(0,Uv.sanitize)(Fv.marked.parse((e.translatedText||e.text).replaceAll(/\[([^\]]+)\]\(([^\)]+)\)/g,'<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replaceAll("(","\\(").replaceAll(")","\\)").replaceAll(/(?<!\\)\(/g,"\\(").replaceAll(/(?<!\\)\)/g,"\\)")).trim().replace(/\n/g,"<br>").replace(/(<br>)+/g,"<br><br>"),{ADD_ATTR:["target"]}).replaceAll(/(?<!\\)\[/g,"\\[").replaceAll(/(?<!\\)\]/g,"\\]").replace(/(<br>)+/g,"<br>");return(0,c.useLayoutEffect)((()=>{"undefined"==typeof window||e.fromUser||"MathJax"in window&&window.MathJax.typesetPromise&&window.MathJax.typesetPromise([".memori-chat--bubble-content"])}),[e.text,e.fromUser]),(0,s.jsxs)(s.Fragment,{children:[(e.initial||p)&&(0,s.jsx)("div",{className:"memori-chat--bubble-initial"}),(0,s.jsxs)(np,{show:!0,appear:!0,as:"div",className:t(ws)("memori-chat--bubble-container",{"memori-chat--bubble-from-user":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&h||l&&d}),children:[!e.fromUser&&(0,s.jsx)(np.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),title:(null===(v=e.emitter)||void 0===v?void 0:v.length)&&n.enableBoardOfExperts?e.emitter:n.name,children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:(null===(y=e.emitter)||void 0===y?void 0:y.length)&&n.enableBoardOfExperts?e.emitter:n.name,src:(null===(b=e.emitter)||void 0===b?void 0:b.length)&&n.enableBoardOfExperts&&(null==g?void 0:g.find((t=>t.name===e.emitter)))?`${o}/api/v1/memoriai/memori/avatar/${null===(x=g.find((t=>t.name===e.emitter)))||void 0===x?void 0:x.expertMemoriID}`:n.avatarURL&&n.avatarURL.length>0?fv({type:"avatar",tenantID:null==r?void 0:r.id,resourceURI:n.avatarURL,baseURL:i,apiURL:o}):fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:i||"https://www.aisuru.com",apiURL:o}),onError:e=>{e.currentTarget.src=n.avatarURL&&n.avatarURL.length>0?fv({type:"avatar",tenantID:null==r?void 0:r.id,resourceURI:n.avatarURL,baseURL:i}):fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:i}),e.currentTarget.onerror=null}})}),(0,s.jsxs)(np.Child,{as:"div",className:t(ws)("memori-chat--bubble",{"memori-chat--user-bubble":!!e.fromUser,"memori-chat--with-addon":e.generatedByAI&&h||l&&d,"memori-chat--ai-generated":e.generatedByAI&&h,"memori-chat--with-feedback":l}),enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-09 translate-x-"+(e.fromUser?"30":"-30"),children:[(0,s.jsx)("div",{dir:"auto",className:"memori-chat--bubble-content",dangerouslySetInnerHTML:{__html:E}}),(e.generatedByAI&&h||l&&d)&&(0,s.jsxs)("div",{className:"memori-chat--bubble-addon",children:[l&&!!d&&(0,s.jsx)(zv,{memori:n,className:"memori-chat--bubble-feedback",dropdown:!0,onNegativeClick:e=>{e&&d(e)}}),e.generatedByAI&&h&&(0,s.jsx)(vv,{align:"left",content:_("generatedByAI"),className:"memori-chat--bubble-action-icon memori-chat--bubble-action-icon--ai",children:(0,s.jsx)("span",{children:(0,s.jsx)(gv,{title:_("generatedByAI")||void 0})})}),!e.fromUser&&e.questionAnswered&&o&&u&&(0,s.jsx)(Sf,{ghost:!0,shape:"circle",title:_("whyThisAnswer")||void 0,className:"memori-chat--bubble-action-icon",onClick:()=>A(!0),disabled:C,icon:(0,s.jsx)(jv,{title:_("whyThisAnswer")||void 0})})]})]}),e.fromUser&&(0,s.jsx)(s.Fragment,{children:m&&"string"==typeof m||!m&&(null===(S=null==f?void 0:f.avatarURL)||void 0===S?void 0:S.length)?(0,s.jsx)(np.Child,{as:"picture",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)("img",{className:"memori-chat--bubble-avatar-img",alt:null!==(w=null==f?void 0:f.userName)&&void 0!==w?w:"User",src:null!=m?m:null==f?void 0:f.avatarURL})}):m?(0,s.jsx)(np.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:m}):(0,s.jsx)(np.Child,{as:"div",className:"memori-chat--bubble-avatar",enter:"transition ease-in-out duration-300",enterFrom:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),enterTo:"opacity-1 scale-1 translate-x-0",leave:"transition ease-in-out duration-300",leaveFrom:"opacity-1 scale-1 translate-x-0",leaveTo:"opacity-0 scale-075 "+(e.fromUser?"translate-x-15":"translate-x--15"),children:(0,s.jsx)(mv,{})})})]}),C&&o&&(0,s.jsx)(_x,{visible:C,message:e,closeDrawer:()=>A(!1),apiURL:o,sessionID:a})]})};c=o("85Hg2"),c=o("85Hg2");function Ix(e=0){let[t,n]=(0,c.useState)(e),r=(0,c.useCallback)((e=>n((t=>t|e))),[t]),i=(0,c.useCallback)((e=>Boolean(t&e)),[t]),o=(0,c.useCallback)((e=>n((t=>t&~e))),[n]),s=(0,c.useCallback)((e=>n((t=>t^e))),[n]);return{addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:s}}let Rx=(0,(c=o("85Hg2")).createContext)(null);function Px(){let e=(0,c.useContext)(Rx);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Px),e}return e}function kx(){let[e,n]=(0,c.useState)([]);return[e.length>0?e.join(" "):void 0,(0,c.useMemo)((()=>function(e){let r=Mh((e=>(n((t=>[...t,e])),()=>n((t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))))),i=(0,c.useMemo)((()=>({register:r,slot:e.slot,name:e.name,props:e.props})),[r,e.slot,e.name,e.props]);return t(c).createElement(Rx.Provider,{value:i},e.children)}),[n])]}let Ox=mh((function(e,t){let{passive:n=!1,...r}=e,i=Px(),o=`headlessui-label-${cp()}`,s=Ph(t);_h((()=>i.register(o)),[o,i.register]);let a={ref:s,...i.props,id:o};return n&&("onClick"in a&&delete a.onClick,"onClick"in r&&delete r.onClick),hh({ourProps:a,theirProps:r,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})}));var Nx,Lx=((Nx=Lx||{})[Nx.RegisterOption=0]="RegisterOption",Nx[Nx.UnregisterOption=1]="UnregisterOption",Nx);let Dx={0(e,t){let n=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:Cp(n,(e=>e.element.current))}},1(e,t){let n=e.options.slice(),r=e.options.findIndex((e=>e.id===t.id));return-1===r?e:(n.splice(r,1),{...e,options:n})}},Bx=(0,c.createContext)(null);function zx(e){let t=(0,c.useContext)(Bx);if(null===t){let t=new Error(`<${e} /> is missing a parent <RadioGroup /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zx),t}return t}function Fx(e,t){return lh(t.type,Dx,e,t)}Bx.displayName="RadioGroupContext";let Ux=mh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,...u}=e,d=Mh("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a),[h,p]=(0,c.useReducer)(Fx,{options:[]}),f=h.options,[m,g]=kx(),[v,y]=Zp(),b=`headlessui-radiogroup-${cp()}`,x=(0,c.useRef)(null),S=Ph(x,n),[w,_]=ym(r,s,i),C=(0,c.useMemo)((()=>f.find((e=>!e.propsRef.current.disabled))),[f]),A=(0,c.useMemo)((()=>f.some((e=>d(e.propsRef.current.value,w)))),[f,w]),E=Mh((e=>{var t;if(l||d(e,w))return!1;let n=null==(t=f.find((t=>d(t.propsRef.current.value,e))))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==_||_(e),!0)}));dm({container:x.current,accept:e=>"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let T=Mh((e=>{let t=x.current;if(!t)return;let n=hp(t),r=f.filter((e=>!1===e.propsRef.current.disabled)).map((e=>e.element.current));switch(e.key){case ip.Enter:vm(e.currentTarget);break;case ip.ArrowLeft:case ip.ArrowUp:if(e.preventDefault(),e.stopPropagation(),Ep(r,mp.Previous|mp.WrapAround)===gp.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case ip.ArrowRight:case ip.ArrowDown:if(e.preventDefault(),e.stopPropagation(),Ep(r,mp.Next|mp.WrapAround)===gp.Success){let e=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));e&&E(e.propsRef.current.value)}break;case ip.Space:{e.preventDefault(),e.stopPropagation();let t=f.find((e=>e.element.current===(null==n?void 0:n.activeElement)));t&&E(t.propsRef.current.value)}}})),M=Mh((e=>(p({type:0,...e}),()=>p({type:1,id:e.id})))),I=(0,c.useMemo)((()=>({registerOption:M,firstOption:C,containsCheckedOption:A,change:E,disabled:l,value:w,compare:d})),[M,C,A,E,l,w,d]),R={ref:S,id:b,role:"radiogroup","aria-labelledby":m,"aria-describedby":v,onKeyDown:T},P=(0,c.useMemo)((()=>({value:w})),[w]);return t(c).createElement(y,{name:"RadioGroup.Description"},t(c).createElement(g,{name:"RadioGroup.Label"},t(c).createElement(Bx.Provider,{value:I},null!=o&&null!=w&&fm({[o]:w}).map((([e,n])=>t(c).createElement(dp,{features:up.Hidden,...gh({key:e,as:"input",type:"radio",checked:null!=n,hidden:!0,readOnly:!0,name:e,value:n})}))),hh({ourProps:R,theirProps:u,slot:P,defaultTag:"div",name:"RadioGroup"}))))}));var jx=(e=>(e[e.Empty=1]="Empty",e[e.Active=2]="Active",e))(jx||{});let Hx=mh((function(e,n){let r=(0,c.useRef)(null),i=Ph(r,n),o=`headlessui-radiogroup-option-${cp()}`,[s,a]=kx(),[l,u]=Zp(),{addFlag:d,removeFlag:h,hasFlag:p}=Ix(1),{value:f,disabled:m=!1,...g}=e,v=(0,c.useRef)({value:f,disabled:m});_h((()=>{v.current.value=f}),[f,v]),_h((()=>{v.current.disabled=m}),[m,v]);let{registerOption:y,disabled:b,change:x,firstOption:S,containsCheckedOption:w,value:_,compare:C}=zx("RadioGroup.Option");_h((()=>y({id:o,element:r,propsRef:v})),[o,y,r,e]);let A=Mh((e=>{var t;if(op(e.currentTarget))return e.preventDefault();!x(f)||(d(2),null==(t=r.current)||t.focus())})),E=Mh((e=>{if(op(e.currentTarget))return e.preventDefault();d(2)})),T=Mh((()=>h(2))),M=(null==S?void 0:S.id)===o,I=b||m,R=C(_,f),P={ref:i,id:o,role:"radio","aria-checked":R?"true":"false","aria-labelledby":s,"aria-describedby":l,"aria-disabled":!!I||void 0,tabIndex:I?-1:R||!w&&M?0:-1,onClick:I?void 0:A,onFocus:I?void 0:E,onBlur:I?void 0:T},k=(0,c.useMemo)((()=>({checked:R,disabled:I,active:p(2)})),[R,I,p]);return t(c).createElement(u,{name:"RadioGroup.Description"},t(c).createElement(a,{name:"RadioGroup.Label"},hh({ourProps:P,theirProps:g,slot:k,defaultTag:"div",name:"RadioGroup.Option"})))})),Vx=Object.assign(Ux,{Option:Hx,Label:Ox,Description:Xp});var Gx=({sendOnEnter:e,setSendOnEnter:n})=>{const{t:r}=Se();return(0,s.jsxs)(Ov,{as:"div",className:"memori-send-on-enter-menu",children:[(0,s.jsx)(Ov.Button,{className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button","memori--conversation-button"),children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)("span",{style:{display:"block",width:"1rem",height:"1rem"},children:"…"})})}),(0,s.jsx)(Ov.Items,{className:"memori-menu--overlay",children:(0,s.jsxs)(Vx,{value:e,onChange:n,children:[(0,s.jsx)(Vx.Option,{value:"keypress",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(Ov.Item,{children:(0,s.jsx)(Sf,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:r("widget.sendOnKeypress")})})}),(0,s.jsx)(Vx.Option,{value:"click",className:"memori-menu--option",children:({checked:e})=>(0,s.jsx)(Ov.Item,{children:(0,s.jsx)(Sf,{className:"memori-menu--button",ghost:!0,outlined:e,icon:(0,s.jsx)("span",{className:"memori-menu--icon",children:e?"✓":""}),children:r("widget.sendOnClick")})})})]})})]})};c=o("85Hg2");var Wx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M855 160.1l-189.2 23.5c-6.6.8-9.3 8.8-4.7 13.5l54.7 54.7-153.5 153.5a8.03 8.03 0 0 0 0 11.3l45.1 45.1c3.1 3.1 8.2 3.1 11.3 0l153.6-153.6 54.7 54.7a7.94 7.94 0 0 0 13.5-4.7L863.9 169a7.9 7.9 0 0 0-8.9-8.9zM416.6 562.3a8.03 8.03 0 0 0-11.3 0L251.8 715.9l-54.7-54.7a7.94 7.94 0 0 0-13.5 4.7L160.1 855c-.6 5.2 3.7 9.5 8.9 8.9l189.2-23.5c6.6-.8 9.3-8.8 4.7-13.5l-54.7-54.7 153.6-153.6c3.1-3.1 3.1-8.2 0-11.3l-45.2-45z"})});var qx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 0 0 0 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 0 0 391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 0 0-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z"})});var Kx=({disabled:e=!1,value:n,onChange:r,onPressEnter:i,onFocus:o,onBlur:a})=>{const{t:l}=Se(),[u,d]=(0,c.useState)(!1);return(0,s.jsx)("div",{"data-testid":"chat-textarea",className:t(ws)("memori-chat-textarea",{"memori-chat-textarea--expanded":u,"memori-chat-textarea--disabled":e}),children:(0,s.jsxs)("div",{className:"memori-chat-textarea--inner",children:[(0,s.jsx)("textarea",{className:"memori-chat-textarea--input",disabled:e,value:n,onChange:e=>{r(e.target.value)},onKeyDownCapture:e=>{"Enter"===e.key&&!e.shiftKey&&i&&i(e)},onFocus:o,onBlur:a}),(0,s.jsx)("div",{className:"memori-chat-textarea--expand",children:(0,s.jsx)(Sf,{className:t(ws)("memori-chat-textarea--expand-button"),onClick:()=>d(!u),padded:!1,ghost:!0,title:u?l("collapse")||"Collapse":l("expand")||"Expand",icon:u?(0,s.jsx)(qx,{}):(0,s.jsx)(Wx,{})})})]})})};var Jx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2-8.5 2.1-13.8 10.7-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})});c=o("85Hg2");var Qx=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M842 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1zM512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm-94-392c0-50.6 41.9-92 94-92s94 41.4 94 92v224c0 50.6-41.9 92-94 92s-94-41.4-94-92V232z"})});var Yx=({listening:e,stopAudio:n,startListening:r,stopListening:i})=>{const{t:o}=Se(),[a,l]=(0,c.useState)(),u=(0,c.useRef)(null),d=e=>{e.preventDefault(),l(o("write_and_speak.holdToSpeak")||"Hold to record"),u.current||(u.current=setTimeout((()=>{n(),l(o("write_and_speak.releaseToEndListening")||"Release to end listening"),r()}),300))},h=()=>{u.current&&(clearTimeout(u.current),u.current=null),i(),l(void 0)};return(0,c.useEffect)((()=>()=>h()),[]),(0,s.jsx)(vv,{visible:!!a,content:(0,s.jsx)("span",{children:a||o("write_and_speak.pressAndHoldToSpeak")||"Press and hold to speak"}),align:"topLeft",className:"memori-mic-btn-tooltip",children:(0,s.jsx)(Sf,{primary:!0,className:t(ws)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":e}),title:e?o("write_and_speak.micButtonPopoverListening")||"Listening":o("write_and_speak.micButtonPopover")||"Start listening",onMouseDown:d,onTouchStart:d,onMouseUp:h,onMouseLeave:h,onTouchEnd:h,shape:"circle",icon:(0,s.jsx)(Qx,{})})})};var Zx=({dialogState:e,sendOnEnter:n="click",setSendOnEnter:r,userMessage:i="",onChangeUserMessage:o,sendMessage:a,onTextareaFocus:l,onTextareaBlur:c,onTextareaPressEnter:u,showMicrophone:d=!1,microphoneMode:h="HOLD_TO_TALK",listening:p=!1,stopAudio:f,startListening:m,stopListening:g})=>{const{t:v}=Se();return(0,s.jsxs)("fieldset",{id:"chat-fieldset",className:"memori-chat-inputs",disabled:"X2a"===(null==e?void 0:e.state)||"X3"===(null==e?void 0:e.state),children:[(0,s.jsx)(Gx,{sendOnEnter:n,setSendOnEnter:r}),(0,s.jsx)(Kx,{value:i,onChange:o,onPressEnter:u,onFocus:l,onBlur:c,disabled:["R2","R3","R4","R5","G3","X3"].includes((null==e?void 0:e.state)||"")}),(0,s.jsx)(Sf,{shape:"circle",primary:!!(null==i?void 0:i.length),disabled:!i||0===i.length,className:"memori-chat-inputs--send",onClick:()=>{a(i),f(),speechSynthesis.speak(new SpeechSynthesisUtterance(""))},title:v("send")||"Send",icon:(0,s.jsx)(Jx,{})}),d&&"HOLD_TO_TALK"===h&&(0,s.jsx)(Yx,{listening:p,startListening:m,stopListening:()=>{g(),(null==i?void 0:i.length)&&a(i)},stopAudio:f}),d&&"CONTINUOUS"===h&&(0,s.jsx)(Sf,{primary:!0,className:t(ws)("memori-chat-inputs--mic",{"memori-chat-inputs--mic--listening":p}),title:p?v("write_and_speak.micButtonPopoverListening")||"Listening":v("write_and_speak.micButtonPopover")||"Start listening",onClick:()=>{p?g():(f(),m())},shape:"circle",icon:(0,s.jsx)(Qx,{})})]})};c=o("85Hg2");const Xx={en:[{delayAfter:3,text:"Generating an accurate and fancy response..."},{delayAfter:3,text:"Generating a response that will blow your mind..."},{delayAfter:3,text:"Generating a response that will make you smile..."},{delayAfter:3,text:"Thinking of a response..."},{delayAfter:3,text:"Thinking of a response that will make you smile..."},{delayAfter:3,text:"Gathering my thoughts..."},{delayAfter:3,text:"Gathering my thoughts to give you a response..."}],it:[{delayAfter:3,text:"Sto generando una risposta accurata e fantasiosa..."},{delayAfter:3,text:"Sto generando una risposta che ti farà impazzire..."},{delayAfter:3,text:"Sto generando una risposta che ti farà sorridere..."},{delayAfter:3,text:"Sto pensando ad una risposta..."},{delayAfter:3,text:"Sto pensando ad una risposta che ti farà sorridere..."},{delayAfter:3,text:"Sto raccogliendo i miei pensieri..."},{delayAfter:3,text:"Sto raccogliendo i miei pensieri per darti una risposta..."}]},$x=(e=3)=>new Array(20*e).fill(" ").join("");var eS=({useDefaultSentences:e=!1,lang:t="en",sentence:n,sentences:r})=>{var i;const[o,a]=(0,c.useState)(0),[l,u]=(0,c.useState)((null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.length)?`${r[t][0].text.endsWith("...")||!r[t][0].text.length?r[t][0].text:`${r[t][0].text}...`}${$x(r[t][0].delayAfter)}`:n?`${n.endsWith("...")||!n.length?n:`${n}...`}${$x()}`:""),[d,h]=(0,c.useState)("");return(0,c.useEffect)((()=>{const i=setInterval((()=>{var i;const s=l[d.length];if(void 0!==s&&l.length>0)h((e=>e+s));else if((null===(i=null==r?void 0:r[t])||void 0===i?void 0:i.length)&&o<r[t].length-1){const e=o+1,n=r[t][e];u(`${n.text.endsWith("...")||!n.text.length?n.text:`${n.text}...`}${$x(n.delayAfter)}`),h(""),a(e)}else if(!r&&!n&&e){const e=Xx[t][Math.floor(Math.random()*Xx[t].length)];u(`${e.text}${$x(e.delayAfter)}`),h("")}}),50);return()=>clearInterval(i)})),(0,s.jsx)("div",{className:"memori-chat--bubble",children:(0,s.jsxs)("div",{className:"memori-chat--bubble-typing",children:[(0,s.jsxs)("div",{id:"wave",children:[(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"}),(0,s.jsx)("span",{className:"dot"})]}),l.length>0&&(0,s.jsx)("p",{children:d})]})})};var tS=(0,c.memo)((({memori:e,tenant:n,sessionID:r,baseUrl:i,apiUrl:o,translateTo:a,memoriTyping:l,typingText:u,showTypingText:d=!1,history:h=[],authToken:p,dialogState:f,simulateUserPrompt:m,showDates:g=!1,showContextPerLine:v=!1,showAIicon:y=!0,showWhyThisAnswer:b=!0,selectReceiverTag:x,preview:S=!1,instruct:w=!1,showInputs:_=!0,showMicrophone:C=!1,microphoneMode:A="HOLD_TO_TALK",sendOnEnter:E,setSendOnEnter:T,attachmentsMenuOpen:M,setAttachmentsMenuOpen:I,userMessage:R="",onChangeUserMessage:P,sendMessage:k,listening:O,isPlayingAudio:N,stopAudio:L,startListening:D,stopListening:B,resetTranscript:z,customMediaRenderer:F,user:U,userAvatar:j,experts:H})=>{var V,G,W,q,K,J,Q,Y;const Z=()=>{setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),200)};(0,c.useEffect)((()=>{!S&&Z()}),[h,S]);return(0,s.jsxs)("div",{className:t(ws)("memori-chat--wrapper",{"memori-chat-wrapper--translate":a}),id:"chat-wrapper",lang:null==a?void 0:a.toUpperCase(),"data-memori-lang":null!==(q=null===(W=null===(G=null===(V=e.culture)||void 0===V?void 0:V.split("-"))||void 0===G?void 0:G[0])||void 0===W?void 0:W.toUpperCase())&&void 0!==q?q:"EN",children:[(0,s.jsx)("div",{className:t(ws)("memori-chat--history",{"memori-chat--history-touch":Zf()}),children:(0,s.jsxs)("div",{className:t(ws)("memori-chat--content",{"memori-chat--content-touch":Zf()}),children:[(0,s.jsx)("div",{className:t(ws)("memori-chat--cover"),style:{backgroundImage:`url("${fv({type:"cover",tenantID:null==n?void 0:n.id,resourceURI:e.coverURL,baseURL:i,apiURL:o})}"), url("${fv({type:"cover",tenantID:null==n?void 0:n.id,baseURL:i||"https://www.aisuru.com",apiURL:o})}")`}}),h.map(((l,u)=>{var d,p,x,S;return(0,s.jsxs)(t(c).Fragment,{children:[(0,s.jsx)(Mx,{isFirst:0===u,message:l,memori:e,tenant:n,baseUrl:i,apiUrl:o,sessionID:r,simulateUserPrompt:m,showAIicon:y,showWhyThisAnswer:b,showFeedback:u===h.length-1&&!l.fromUser&&(null==f?void 0:f.acceptsFeedback),user:U,userAvatar:j,experts:H}),g&&!!l.timestamp&&(0,s.jsx)("small",{className:"memori-chat--timestamp "+(l.fromUser?"text-right":"text-left"),children:new Intl.DateTimeFormat("it",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l.timestamp.endsWith("Z")?l.timestamp:`${l.timestamp}Z`))}),v&&!!Object.keys(null!==(d=l.contextVars)&&void 0!==d?d:{}).length&&(0,s.jsx)("div",{className:"memori-chat--context-vars",children:Object.keys(null!==(p=l.contextVars)&&void 0!==p?p:{}).map((e=>{var t,n,r;return"-"===(null===(t=l.contextVars)||void 0===t?void 0:t[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag memori-chat--context-tag-canceled",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):"✔️"===(null===(n=l.contextVars)||void 0===n?void 0:n[e])?(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsx)("span",{className:"memori-chat--context-tag-text",children:e})},e):(0,s.jsx)("div",{className:"memori-chat--context-tag",children:(0,s.jsxs)("span",{className:"memori-chat--context-tag-text",children:[e,": ",null===(r=l.contextVars)||void 0===r?void 0:r[e]]})},e)}))}),(0,s.jsx)(Sx,{simulateUserPrompt:m,media:null===(x=null==l?void 0:l.media)||void 0===x?void 0:x.filter((e=>"text/html"!==e.mimeType&&"text/plain"!==e.mimeType)),links:null===(S=null==l?void 0:l.media)||void 0===S?void 0:S.filter((e=>"text/html"===e.mimeType)),sessionID:r,baseUrl:i,apiUrl:o,translateTo:a,customMediaRenderer:F})]},u)})),(null==f?void 0:f.hints)&&f.hints.length>0&&!l&&(0,s.jsx)(Sx,{simulateUserPrompt:m,hints:f.translatedHints?f.translatedHints:f.hints.map((e=>({text:e,originalText:e})))}),!!l&&(0,s.jsx)(eS,{useDefaultSentences:d,lang:a?"it"===a.toLowerCase()?"it":"en":"it"===(null===(Q=null===(J=null===(K=e.culture)||void 0===K?void 0:K.split("-"))||void 0===J?void 0:J[0])||void 0===Q?void 0:Q.toLowerCase())?"it":"en",sentence:u,sentences:e.enableBoardOfExperts?Qv:void 0},u),(0,s.jsx)("div",{id:"end-messages-ref"})]})}),"X3"===(null==f?void 0:f.state)&&r&&(0,s.jsx)("div",{className:"memori-chat--known-tags",children:Object.keys(null!==(Y=f.knownTags)&&void 0!==Y?Y:{}).filter((t=>t!==e.giverTag)).map((e=>{var t;return(0,s.jsx)(Sf,{icon:(0,s.jsx)("span",{className:"memori-chat--known-tag-icon",children:e}),className:"memori-chat--known-tag",onClick:()=>x(e),children:null===(t=f.knownTags)||void 0===t?void 0:t[e]},e)}))}),_&&(0,s.jsx)(Zx,{userMessage:R,onChangeUserMessage:P,dialogState:f,instruct:w,authToken:p,sendMessage:k,microphoneMode:A,sendOnEnter:E,setSendOnEnter:T,attachmentsMenuOpen:M,setAttachmentsMenuOpen:I,onTextareaPressEnter:()=>{"keypress"===E&&(null==R?void 0:R.length)>0&&(B(),k(R),P(""),z())},onTextareaFocus:()=>{var e,t,n,r;B(),Zf()&&window.innerWidth<=768&&(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t||t.add("chat-focused"),null===(r=null===(n=document.querySelector(".memori.memori-widget"))||void 0===n?void 0:n.classList)||void 0===r||r.add("chat-focused"),setTimeout((()=>{Z()}),300))},onTextareaBlur:()=>{var e,t,n,r,i;(null===(t=null===(e=document.getElementById("chat-wrapper"))||void 0===e?void 0:e.classList)||void 0===t?void 0:t.contains("chat-focused"))&&(null===(n=document.getElementById("chat-wrapper"))||void 0===n||n.classList.remove("chat-focused"),null===(i=null===(r=document.querySelector(".memori.memori-widget"))||void 0===r?void 0:r.classList)||void 0===i||i.remove("chat-focused"),Z())},startListening:D,stopListening:B,stopAudio:L,listening:O,isPlayingAudio:N,showMicrophone:C})]})}));c=o("85Hg2");var nS=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M140 188h584v164h76V144c0-17.7-14.3-32-32-32H96c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h544v-76H140V188z"}),(0,s.jsx)("path",{d:"M414.3 256h-60.6c-3.4 0-6.4 2.2-7.6 5.4L219 629.4c-.3.8-.4 1.7-.4 2.6 0 4.4 3.6 8 8 8h55.1c3.4 0 6.4-2.2 7.6-5.4L322 540h196.2L422 261.4c-1.3-3.2-4.3-5.4-7.7-5.4zm12.4 228h-85.5L384 360.2 426.7 484zM936 528H800v-93c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v93H592c-13.3 0-24 10.7-24 24v176c0 13.3 10.7 24 24 24h136v152c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V752h136c13.3 0 24-10.7 24-24V552c0-13.3-10.7-24-24-24zM728 680h-88v-80h88v80zm160 0h-88v-80h88v80z"})]});var rS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"})});var iS=({memoriName:e,blockedUntil:t,notEnoughCredits:n=!1,showGiverInfo:r=!1,showTitle:i=!1,marginLeft:o=!1})=>{const{t:a}=Se(),l=new Date(t||Date.now());return n||l>new Date(Date.now())?(0,s.jsx)(vv,{className:"blocked-memori-badge--tooltip",content:n?(0,s.jsx)(s.Fragment,{children:a("notEnoughCredits")}):(0,s.jsxs)(s.Fragment,{children:[!r&&a("memoriBlockedAnon",{name:e,date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(l)}),r&&a("memoriBlockedUntil",{date:new Intl.DateTimeFormat("it",{day:"numeric",month:"long",year:"numeric"}).format(l)}),r&&` ${a("memoriBlockedReasonExceedChats")}`,r&&(0,s.jsx)("br",{}),r&&`\n${a("memoriBlockedGiverHelper")}`]}),children:(0,s.jsxs)("div",{className:"blocked-memori-badge--wrapper",children:[(0,s.jsx)("div",{className:"blocked-memori-badge "+(o?" margin-left":""),children:(0,s.jsx)(rS,{className:"blocked-memori-badge--icon"})}),i&&(0,s.jsx)("span",{className:"blocked-memori-badge--title",children:a("memoriBlockedTitle")})]})}):null};var oS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",width:"20",height:"16",viewBox:"0 0 640 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M211.2 96a64 64 0 10-128 0 64 64 0 10128 0zM32 256c0 17.7 14.3 32 32 32h85.6c10.1-39.4 38.6-71.5 75.8-86.6-9.7-6-21.2-9.4-33.4-9.4H96c-35.3 0-64 28.7-64 64zm461.6 32H576c17.7 0 32-14.3 32-32 0-35.3-28.7-64-64-64h-96c-11.7 0-22.7 3.1-32.1 8.6 38.1 14.8 67.4 47.3 77.7 87.4zm-102.4-61.6c-6.9-1.6-14.2-2.4-21.6-2.4h-96c-8.5 0-16.7 1.1-24.5 3.1-30.8 8.1-55.6 31.1-66.1 60.9-3.5 10-5.5 20.8-5.5 32 0 17.7 14.3 32 32 32h224c17.7 0 32-14.3 32-32 0-11.2-1.9-22-5.5-32-10.8-30.7-36.8-54.2-68.9-61.6zM563.2 96a64 64 0 10-128 0 64 64 0 10128 0zm-241.6 96a80 80 0 100-160 80 80 0 100 160zM32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32h576c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"})});var sS=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",width:"20",height:"20",viewBox:"0 0 48 48",className:e,"aria-label":t,children:[(0,s.jsx)("path",{d:"M30.106 48v-2.745a2.213 2.213 0 012.213-2.212h6.11a2.392 2.392 0 002.326-2.466v-3.223a1.834 1.834 0 01.459-1.145 2.912 2.912 0 00.712-1.926l-.007-.667a1.016 1.016 0 01.651-.952h1.067a1.363 1.363 0 001.051-.456 1.304 1.304 0 00.19-1.395 67.032 67.032 0 01-3.037-7.51 4.767 4.767 0 01-.217-1.507l-.002-4.994a14.513 14.513 0 00-.552-3.963l-.006-.022a13.959 13.959 0 00-3.137-5.702q-.479-.516-1.006-1.003a17.67 17.67 0 00-.677-.623A18.303 18.303 0 0024.194 1a19.617 19.617 0 00-12.539 4.489 17.555 17.555 0 00-3.945 21.69C9.945 31.507 11.694 38.622 12.14 46v2",strokeMiterlimit:10}),(0,s.jsx)("path",{d:"M27.917 12L31.417 12"}),(0,s.jsx)("path",{d:"M27.917 26L31.417 26"}),(0,s.jsx)("path",{d:"M29.667 12L29.667 26"}),(0,s.jsx)("path",{d:"M23.992 26L19.904 12 19.226 12 15.159 26"}),(0,s.jsx)("path",{d:"M16.854 21.133L22.276 21.133"})]});c=o("85Hg2");var aS=({forceStatus:e,provider:t})=>{var n;const{t:r}=Se(),[i,o]=(0,c.useState)(null!=e?e:"operational"),a=(e=>{switch(e){case"DEFAULT":case"OpenAI":return{getStatus:async()=>{var e;const t=await fetch("https://status.openai.com/api/v2/summary.json"),n=null===(e=(await t.json()).components.find((e=>"API"===e.name)))||void 0===e?void 0:e.status;return null!=n?n:"operational"},statusPage:"https://status.openai.com/"};default:return{getStatus:async()=>"operational",statusPage:""}}})(t);return(0,c.useEffect)((()=>{e||a.getStatus().then((e=>o(e))).catch(console.log)}),[e,t]),"operational"!==i?(0,s.jsx)(vv,{className:"memori--completion-provider-status--tooltip",align:"topLeft",content:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:r("completionProviderDown",{provider:null!=t?t:r("completionProviderFallbackName")})}),!!(null===(n=a.statusPage)||void 0===n?void 0:n.length)&&(0,s.jsx)("p",{children:(0,s.jsx)("a",{href:a.statusPage,rel:"noopener noreferrer",target:"_blank",children:r("completionProviderCheckStatusPage")})})]}),children:(0,s.jsx)(rS,{className:"memori--completion-provider-status--icon"})}):null};var lS=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",className:e,"aria-label":t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0zM192 272c44.183 0 80-35.817 80-80s-35.817-80-80-80-80 35.817-80 80 35.817 80 80 80z"})});var cS=({memori:e,tenant:t,gamificationLevel:n,language:r,userLang:i,setUserLang:o,baseUrl:a,apiUrl:l,position:u,openPositionDrawer:d,integrationConfig:h,instruct:p=!1,clickedStart:f,onClickStart:m,initializeTTS:g,_TEST_forceProviderStatus:v,isUserLoggedIn:y=!1,user:b,showLogin:x=!1,setShowLoginDrawer:S,notEnoughCredits:w=!1})=>{var _,C;const{t:A,i18n:E}=Se(),[T,M]=(0,c.useState)(e.description),[I,R]=(0,c.useState)(!0);return(0,c.useEffect)((()=>{var t,n,i,o,s,l;(null!==(n=null===(t=E.language)||void 0===t?void 0:t.toUpperCase())&&void 0!==n?n:"IT")!==(null!==(i=null==r?void 0:r.toUpperCase())&&void 0!==i?i:"IT")&&(null===(o=e.description)||void 0===o?void 0:o.length)&&px(e.description,null!==(l=null===(s=E.language)||void 0===s?void 0:s.toUpperCase())&&void 0!==l?l:"IT",r,a).then((e=>{M(e.text)})).catch(console.error)}),[E.language,r,e.description,a]),(0,s.jsxs)("div",{className:"memori--start-panel",children:[(0,s.jsxs)("div",{className:"memori--cover",style:{backgroundImage:`url("${fv({type:"cover",tenantID:null==t?void 0:t.id,resourceURI:e.coverURL,baseURL:a,apiURL:l})}"), url("${fv({type:"cover",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})}")`},children:[!!(null===(_=null==n?void 0:n.badge)||void 0===_?void 0:_.length)&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--gamification-badge",children:(0,s.jsx)(vv,{align:"left",content:`${A("gamification.level")} ${n.badge}, ${n.points} ${A("gamification.points")}`,children:(0,s.jsx)("span",{"aria-label":`${A("gamification.level")} ${n.badge}, ${n.points} ${A("gamification.points")}`,children:n.badge})})}),!!e.enableCompletions&&!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--completions-enabled",children:(0,s.jsx)(vv,{align:"left",content:A("completionsEnabled"),children:(0,s.jsx)("span",{"aria-label":A("completionsEnabled")||"Completions",children:(0,s.jsx)(gv,{})})})}),!!e.enableBoardOfExperts&&(0,s.jsx)("div",{className:"memori--board-of-experts",children:(0,s.jsx)(vv,{align:"left",content:A("boardOfExperts"),children:(0,s.jsx)("span",{"aria-label":A("boardOfExperts")||"Board of Experts",children:(0,s.jsx)(oS,{})})})}),!!e.nsfw&&(0,s.jsx)("div",{className:"memori--nsfw",children:(0,s.jsx)(vv,{align:"left",content:A("nsfw"),children:(0,s.jsx)("span",{title:A("nsfw")||"NSFW",children:"🔞"})})})]}),(0,s.jsxs)("picture",{className:"memori--avatar",children:[(0,s.jsx)("source",{src:null!==(C=e.avatarURL)&&void 0!==C?C:fv({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l})}),(0,s.jsx)("img",{alt:e.name,src:e.avatarURL&&e.avatarURL.length>0?fv({type:"avatar",tenantID:null==t?void 0:t.id,resourceURI:e.avatarURL,baseURL:a,apiURL:l}):fv({type:"avatar",tenantID:null==t?void 0:t.id,baseURL:a,apiURL:l})})]}),(0,s.jsx)("h2",{className:"memori--title",children:e.name}),e.needsPosition&&!u&&(0,s.jsxs)("div",{className:"memori--needsPosition",children:[(0,s.jsx)("p",{children:A("write_and_speak.requirePositionHelp",{name:e.name})}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>d(),className:"memori--start-button",icon:(0,s.jsx)(lS,{}),children:A("widget.position")})]}),(e.needsPosition&&u||!e.needsPosition)&&(0,s.jsxs)("div",{className:"memori--description",children:[(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"memori--description-text",children:T&&I?T:e.description}),T!==e.description&&(0,s.jsx)(Sf,{ghost:!0,className:"memori--translation-toggle",icon:(0,s.jsx)(nS,{}),onClick:()=>{R((e=>!e))},children:A(I?"showOriginalText":"showTranslatedText")})]}),(null==h?void 0:h.multilanguage)&&!p&&(0,s.jsxs)("div",{className:"memori--language-chooser",children:[(0,s.jsx)("label",{id:"user-lang-pref-label",htmlFor:"user-lang-pref",children:A("write_and_speak.iWantToTalkToIn",{name:e.name})}),(0,s.jsx)("select",{id:"user-lang-pref",className:"memori-select--button",value:(null!=i?i:E.language).toUpperCase(),"aria-labelledby":"user-lang-pref-label",onChange:e=>{o(e.target.value)},children:qv.map((e=>(0,s.jsx)("option",{value:e.value,"aria-label":e.label,children:e.label},e.value)))})]}),(0,s.jsx)(Sf,{primary:!0,disabled:!!e.blockedUntil&&!e.isGiver||w,loading:f,onClick:e=>{try{window.speechSynthesis.speak(new SpeechSynthesisUtterance(""))}catch(e){console.error(e)}g&&g(),m&&m()},className:"memori--start-button",children:A("write_and_speak."+(p?"instructButton":"tryMeButton"))}),(0,s.jsx)(aS,{provider:e.completionProvider,forceStatus:v}),(0,s.jsx)("p",{className:"memori--start-description",children:A(p?"write_and_speak.pageInstructExplanation":"write_and_speak.pageTryMeExplanation")}),(e.blockedUntil||w)&&(0,s.jsx)(iS,{memoriName:e.name,blockedUntil:e.blockedUntil,notEnoughCredits:w,showGiverInfo:e.isGiver,showTitle:!0,marginLeft:!0}),!!e.enableDeepThought&&!p&&(0,s.jsxs)("div",{className:"memori--deep-thought-disclaimer",children:[(0,s.jsx)(vv,{align:"left",content:A("deepThoughtHelper"),children:(0,s.jsx)(sS,{})}),(0,s.jsx)("h2",{children:y&&(null==b?void 0:b.pAndCUAccepted)?A("deepThoughtDisclaimerTitle"):A("deepThought")}),y&&!(null==b?void 0:b.pAndCUAccepted)&&(0,s.jsx)("p",{children:A("deepThoughtPreDisclaimerNotAllowed")}),!y&&(0,s.jsx)("p",{children:A("deepThoughtPreDisclaimerUnlogged")}),!y&&x&&(0,s.jsx)("p",{children:(0,s.jsx)(Sf,{outlined:!0,padded:!1,onClick:()=>S(!0),children:"Login"})}),(0,s.jsx)("p",{className:"memori--deep-thought-disclaimer-text",children:A("deepThoughtDisclaimer")})]})]})]})},uS=(c=o("85Hg2"),c=o("85Hg2"),Z=o("hcaHr"),c=o("85Hg2"),["forwardedRef"]);function dS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hS(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?dS(Object(r),!0).forEach((function(n){t(X)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dS(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}class pS extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error("Uncaught error:",e,t)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,s.jsxs)("div",{style:{background:"rgba(255, 255, 255, 0.4)",color:"#000",padding:"2rem",borderRadius:"10px"},children:[(0,s.jsx)("h2",{children:this.props.t("error.generic")}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>this.setState({hasError:!1}),children:this.props.t("error.tryAgain")||"Try again"})]}):this.props.children}}var fS=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){function i(i){var o=i.forwardedRef,s=t(uy)(i,uS),a=Se(e,hS(hS({},s),{},{keyPrefix:n.keyPrefix})),l=t(Z)(a,3),u=l[0],d=l[1],h=l[2],p=hS(hS({},s),{},{t:u,i18n:d,tReady:h});return n.withRef&&o?p.ref=o:!n.withRef&&o&&(p.forwardedRef=o),(0,c.createElement)(r,p)}i.displayName="withI18nextTranslation(".concat(ve(r),")"),i.WrappedComponent=r;return n.withRef?(0,c.forwardRef)((function(e,t){return(0,c.createElement)(i,Object.assign({},e,{forwardedRef:t}))})):i}}(["common"])(pS),mS=(c=o("85Hg2"),c=o("85Hg2"),{});e(mS,"REVISION",(()=>gS)),e(mS,"MOUSE",(()=>vS)),e(mS,"TOUCH",(()=>yS)),e(mS,"CullFaceNone",(()=>bS)),e(mS,"CullFaceBack",(()=>xS)),e(mS,"CullFaceFront",(()=>SS)),e(mS,"CullFaceFrontBack",(()=>wS)),e(mS,"BasicShadowMap",(()=>_S)),e(mS,"PCFShadowMap",(()=>CS)),e(mS,"PCFSoftShadowMap",(()=>AS)),e(mS,"VSMShadowMap",(()=>ES)),e(mS,"FrontSide",(()=>TS)),e(mS,"BackSide",(()=>MS)),e(mS,"DoubleSide",(()=>IS)),e(mS,"NoBlending",(()=>RS)),e(mS,"NormalBlending",(()=>PS)),e(mS,"AdditiveBlending",(()=>kS)),e(mS,"SubtractiveBlending",(()=>OS)),e(mS,"MultiplyBlending",(()=>NS)),e(mS,"CustomBlending",(()=>LS)),e(mS,"AddEquation",(()=>DS)),e(mS,"SubtractEquation",(()=>BS)),e(mS,"ReverseSubtractEquation",(()=>zS)),e(mS,"MinEquation",(()=>FS)),e(mS,"MaxEquation",(()=>US)),e(mS,"ZeroFactor",(()=>jS)),e(mS,"OneFactor",(()=>HS)),e(mS,"SrcColorFactor",(()=>VS)),e(mS,"OneMinusSrcColorFactor",(()=>GS)),e(mS,"SrcAlphaFactor",(()=>WS)),e(mS,"OneMinusSrcAlphaFactor",(()=>qS)),e(mS,"DstAlphaFactor",(()=>KS)),e(mS,"OneMinusDstAlphaFactor",(()=>JS)),e(mS,"DstColorFactor",(()=>QS)),e(mS,"OneMinusDstColorFactor",(()=>YS)),e(mS,"SrcAlphaSaturateFactor",(()=>ZS)),e(mS,"NeverDepth",(()=>XS)),e(mS,"AlwaysDepth",(()=>$S)),e(mS,"LessDepth",(()=>ew)),e(mS,"LessEqualDepth",(()=>tw)),e(mS,"EqualDepth",(()=>nw)),e(mS,"GreaterEqualDepth",(()=>rw)),e(mS,"GreaterDepth",(()=>iw)),e(mS,"NotEqualDepth",(()=>ow)),e(mS,"MultiplyOperation",(()=>sw)),e(mS,"MixOperation",(()=>aw)),e(mS,"AddOperation",(()=>lw)),e(mS,"NoToneMapping",(()=>cw)),e(mS,"LinearToneMapping",(()=>uw)),e(mS,"ReinhardToneMapping",(()=>dw)),e(mS,"CineonToneMapping",(()=>hw)),e(mS,"ACESFilmicToneMapping",(()=>pw)),e(mS,"CustomToneMapping",(()=>fw)),e(mS,"UVMapping",(()=>mw)),e(mS,"CubeReflectionMapping",(()=>gw)),e(mS,"CubeRefractionMapping",(()=>vw)),e(mS,"EquirectangularReflectionMapping",(()=>yw)),e(mS,"EquirectangularRefractionMapping",(()=>bw)),e(mS,"CubeUVReflectionMapping",(()=>xw)),e(mS,"RepeatWrapping",(()=>Sw)),e(mS,"ClampToEdgeWrapping",(()=>ww)),e(mS,"MirroredRepeatWrapping",(()=>_w)),e(mS,"NearestFilter",(()=>Cw)),e(mS,"NearestMipmapNearestFilter",(()=>Aw)),e(mS,"NearestMipMapNearestFilter",(()=>Ew)),e(mS,"NearestMipmapLinearFilter",(()=>Tw)),e(mS,"NearestMipMapLinearFilter",(()=>Mw)),e(mS,"LinearFilter",(()=>Iw)),e(mS,"LinearMipmapNearestFilter",(()=>Rw)),e(mS,"LinearMipMapNearestFilter",(()=>Pw)),e(mS,"LinearMipmapLinearFilter",(()=>kw)),e(mS,"LinearMipMapLinearFilter",(()=>Ow)),e(mS,"UnsignedByteType",(()=>Nw)),e(mS,"ByteType",(()=>Lw)),e(mS,"ShortType",(()=>Dw)),e(mS,"UnsignedShortType",(()=>Bw)),e(mS,"IntType",(()=>zw)),e(mS,"UnsignedIntType",(()=>Fw)),e(mS,"FloatType",(()=>Uw)),e(mS,"HalfFloatType",(()=>jw)),e(mS,"UnsignedShort4444Type",(()=>Hw)),e(mS,"UnsignedShort5551Type",(()=>Vw)),e(mS,"UnsignedInt248Type",(()=>Gw)),e(mS,"AlphaFormat",(()=>Ww)),e(mS,"RGBFormat",(()=>qw)),e(mS,"RGBAFormat",(()=>Kw)),e(mS,"LuminanceFormat",(()=>Jw)),e(mS,"LuminanceAlphaFormat",(()=>Qw)),e(mS,"DepthFormat",(()=>Yw)),e(mS,"DepthStencilFormat",(()=>Zw)),e(mS,"RedFormat",(()=>Xw)),e(mS,"RedIntegerFormat",(()=>$w)),e(mS,"RGFormat",(()=>e_)),e(mS,"RGIntegerFormat",(()=>t_)),e(mS,"RGBAIntegerFormat",(()=>n_)),e(mS,"RGB_S3TC_DXT1_Format",(()=>r_)),e(mS,"RGBA_S3TC_DXT1_Format",(()=>i_)),e(mS,"RGBA_S3TC_DXT3_Format",(()=>o_)),e(mS,"RGBA_S3TC_DXT5_Format",(()=>s_)),e(mS,"RGB_PVRTC_4BPPV1_Format",(()=>a_)),e(mS,"RGB_PVRTC_2BPPV1_Format",(()=>l_)),e(mS,"RGBA_PVRTC_4BPPV1_Format",(()=>c_)),e(mS,"RGBA_PVRTC_2BPPV1_Format",(()=>u_)),e(mS,"RGB_ETC1_Format",(()=>d_)),e(mS,"RGB_ETC2_Format",(()=>h_)),e(mS,"RGBA_ETC2_EAC_Format",(()=>p_)),e(mS,"RGBA_ASTC_4x4_Format",(()=>f_)),e(mS,"RGBA_ASTC_5x4_Format",(()=>m_)),e(mS,"RGBA_ASTC_5x5_Format",(()=>g_)),e(mS,"RGBA_ASTC_6x5_Format",(()=>v_)),e(mS,"RGBA_ASTC_6x6_Format",(()=>y_)),e(mS,"RGBA_ASTC_8x5_Format",(()=>b_)),e(mS,"RGBA_ASTC_8x6_Format",(()=>x_)),e(mS,"RGBA_ASTC_8x8_Format",(()=>S_)),e(mS,"RGBA_ASTC_10x5_Format",(()=>w_)),e(mS,"RGBA_ASTC_10x6_Format",(()=>__)),e(mS,"RGBA_ASTC_10x8_Format",(()=>C_)),e(mS,"RGBA_ASTC_10x10_Format",(()=>A_)),e(mS,"RGBA_ASTC_12x10_Format",(()=>E_)),e(mS,"RGBA_ASTC_12x12_Format",(()=>T_)),e(mS,"RGBA_BPTC_Format",(()=>M_)),e(mS,"LoopOnce",(()=>I_)),e(mS,"LoopRepeat",(()=>R_)),e(mS,"LoopPingPong",(()=>P_)),e(mS,"InterpolateDiscrete",(()=>k_)),e(mS,"InterpolateLinear",(()=>O_)),e(mS,"InterpolateSmooth",(()=>N_)),e(mS,"ZeroCurvatureEnding",(()=>L_)),e(mS,"ZeroSlopeEnding",(()=>D_)),e(mS,"WrapAroundEnding",(()=>B_)),e(mS,"NormalAnimationBlendMode",(()=>z_)),e(mS,"AdditiveAnimationBlendMode",(()=>F_)),e(mS,"TrianglesDrawMode",(()=>U_)),e(mS,"TriangleStripDrawMode",(()=>j_)),e(mS,"TriangleFanDrawMode",(()=>H_)),e(mS,"LinearEncoding",(()=>V_)),e(mS,"sRGBEncoding",(()=>G_)),e(mS,"BasicDepthPacking",(()=>W_)),e(mS,"RGBADepthPacking",(()=>q_)),e(mS,"TangentSpaceNormalMap",(()=>K_)),e(mS,"ObjectSpaceNormalMap",(()=>J_)),e(mS,"NoColorSpace",(()=>Q_)),e(mS,"SRGBColorSpace",(()=>Y_)),e(mS,"LinearSRGBColorSpace",(()=>Z_)),e(mS,"ZeroStencilOp",(()=>X_)),e(mS,"KeepStencilOp",(()=>$_)),e(mS,"ReplaceStencilOp",(()=>eC)),e(mS,"IncrementStencilOp",(()=>tC)),e(mS,"DecrementStencilOp",(()=>nC)),e(mS,"IncrementWrapStencilOp",(()=>rC)),e(mS,"DecrementWrapStencilOp",(()=>iC)),e(mS,"InvertStencilOp",(()=>oC)),e(mS,"NeverStencilFunc",(()=>sC)),e(mS,"LessStencilFunc",(()=>aC)),e(mS,"EqualStencilFunc",(()=>lC)),e(mS,"LessEqualStencilFunc",(()=>cC)),e(mS,"GreaterStencilFunc",(()=>uC)),e(mS,"NotEqualStencilFunc",(()=>dC)),e(mS,"GreaterEqualStencilFunc",(()=>hC)),e(mS,"AlwaysStencilFunc",(()=>pC)),e(mS,"StaticDrawUsage",(()=>fC)),e(mS,"DynamicDrawUsage",(()=>mC)),e(mS,"StreamDrawUsage",(()=>gC)),e(mS,"StaticReadUsage",(()=>vC)),e(mS,"DynamicReadUsage",(()=>yC)),e(mS,"StreamReadUsage",(()=>bC)),e(mS,"StaticCopyUsage",(()=>xC)),e(mS,"DynamicCopyUsage",(()=>SC)),e(mS,"StreamCopyUsage",(()=>wC)),e(mS,"GLSL1",(()=>_C)),e(mS,"GLSL3",(()=>CC)),e(mS,"_SRGBAFormat",(()=>AC)),e(mS,"EventDispatcher",(()=>EC)),e(mS,"MathUtils",(()=>UC)),e(mS,"Vector2",(()=>jC)),e(mS,"Matrix3",(()=>HC)),e(mS,"ColorManagement",(()=>YC)),e(mS,"Color",(()=>rA)),e(mS,"ImageUtils",(()=>oA)),e(mS,"Source",(()=>sA)),e(mS,"Texture",(()=>cA)),e(mS,"Vector4",(()=>uA)),e(mS,"WebGLRenderTarget",(()=>dA)),e(mS,"DataArrayTexture",(()=>hA)),e(mS,"WebGLArrayRenderTarget",(()=>pA)),e(mS,"Data3DTexture",(()=>fA)),e(mS,"WebGL3DRenderTarget",(()=>mA)),e(mS,"WebGLMultipleRenderTargets",(()=>gA)),e(mS,"Quaternion",(()=>vA)),e(mS,"Vector3",(()=>yA)),e(mS,"Box3",(()=>SA)),e(mS,"Sphere",(()=>UA)),e(mS,"Ray",(()=>JA)),e(mS,"Matrix4",(()=>QA)),e(mS,"Euler",(()=>oE)),e(mS,"Layers",(()=>sE)),e(mS,"Object3D",(()=>xE)),e(mS,"Triangle",(()=>PE)),e(mS,"Material",(()=>OE)),e(mS,"MeshBasicMaterial",(()=>NE)),e(mS,"BufferAttribute",(()=>BE)),e(mS,"Int8BufferAttribute",(()=>zE)),e(mS,"Uint8BufferAttribute",(()=>FE)),e(mS,"Uint8ClampedBufferAttribute",(()=>UE)),e(mS,"Int16BufferAttribute",(()=>jE)),e(mS,"Uint16BufferAttribute",(()=>HE)),e(mS,"Int32BufferAttribute",(()=>VE)),e(mS,"Uint32BufferAttribute",(()=>GE)),e(mS,"Float16BufferAttribute",(()=>WE)),e(mS,"Float32BufferAttribute",(()=>qE)),e(mS,"Float64BufferAttribute",(()=>KE)),e(mS,"BufferGeometry",(()=>tT)),e(mS,"Mesh",(()=>bT)),e(mS,"BoxGeometry",(()=>ST)),e(mS,"UniformsUtils",(()=>CT)),e(mS,"ShaderMaterial",(()=>AT)),e(mS,"Camera",(()=>ET)),e(mS,"PerspectiveCamera",(()=>TT)),e(mS,"CubeCamera",(()=>IT)),e(mS,"CubeTexture",(()=>RT)),e(mS,"WebGLCubeRenderTarget",(()=>PT)),e(mS,"Plane",(()=>LT)),e(mS,"Frustum",(()=>zT)),e(mS,"PlaneGeometry",(()=>jT)),e(mS,"ShaderChunk",(()=>HT)),e(mS,"UniformsLib",(()=>VT)),e(mS,"ShaderLib",(()=>GT)),e(mS,"OrthographicCamera",(()=>ZT)),e(mS,"PMREMGenerator",(()=>sM)),e(mS,"MeshDepthMaterial",(()=>nR)),e(mS,"MeshDistanceMaterial",(()=>rR)),e(mS,"WebGLUtils",(()=>aR)),e(mS,"ArrayCamera",(()=>lR)),e(mS,"Group",(()=>cR)),e(mS,"DepthTexture",(()=>hR)),e(mS,"WebGLRenderer",(()=>gR)),e(mS,"WebGL1Renderer",(()=>vR)),e(mS,"FogExp2",(()=>yR)),e(mS,"Fog",(()=>bR)),e(mS,"Scene",(()=>xR)),e(mS,"InterleavedBuffer",(()=>SR)),e(mS,"InterleavedBufferAttribute",(()=>_R)),e(mS,"SpriteMaterial",(()=>CR)),e(mS,"Sprite",(()=>zR)),e(mS,"LOD",(()=>HR)),e(mS,"SkinnedMesh",(()=>JR)),e(mS,"Bone",(()=>QR)),e(mS,"DataTexture",(()=>YR)),e(mS,"Skeleton",(()=>$R)),e(mS,"InstancedBufferAttribute",(()=>eP)),e(mS,"InstancedMesh",(()=>oP)),e(mS,"LineBasicMaterial",(()=>sP)),e(mS,"Line",(()=>hP)),e(mS,"LineSegments",(()=>mP)),e(mS,"LineLoop",(()=>gP)),e(mS,"PointsMaterial",(()=>vP)),e(mS,"Points",(()=>wP)),e(mS,"VideoTexture",(()=>CP)),e(mS,"FramebufferTexture",(()=>AP)),e(mS,"CompressedTexture",(()=>EP)),e(mS,"CanvasTexture",(()=>TP)),e(mS,"Curve",(()=>MP)),e(mS,"EllipseCurve",(()=>IP)),e(mS,"ArcCurve",(()=>RP)),e(mS,"CatmullRomCurve3",(()=>DP)),e(mS,"CubicBezierCurve",(()=>UP)),e(mS,"CubicBezierCurve3",(()=>jP)),e(mS,"LineCurve",(()=>HP)),e(mS,"LineCurve3",(()=>VP)),e(mS,"QuadraticBezierCurve",(()=>GP)),e(mS,"QuadraticBezierCurve3",(()=>WP)),e(mS,"SplineCurve",(()=>qP)),e(mS,"CurvePath",(()=>JP)),e(mS,"Path",(()=>QP)),e(mS,"LatheGeometry",(()=>YP)),e(mS,"CapsuleGeometry",(()=>ZP)),e(mS,"CircleGeometry",(()=>XP)),e(mS,"CylinderGeometry",(()=>$P)),e(mS,"ConeGeometry",(()=>ek)),e(mS,"PolyhedronGeometry",(()=>tk)),e(mS,"DodecahedronGeometry",(()=>nk)),e(mS,"EdgesGeometry",(()=>ak)),e(mS,"Shape",(()=>lk)),e(mS,"ShapeUtils",(()=>Nk)),e(mS,"ExtrudeGeometry",(()=>Bk)),e(mS,"IcosahedronGeometry",(()=>Fk)),e(mS,"OctahedronGeometry",(()=>Uk)),e(mS,"RingGeometry",(()=>jk)),e(mS,"ShapeGeometry",(()=>Hk)),e(mS,"SphereGeometry",(()=>Vk)),e(mS,"TetrahedronGeometry",(()=>Gk)),e(mS,"TorusGeometry",(()=>Wk)),e(mS,"TorusKnotGeometry",(()=>qk)),e(mS,"TubeGeometry",(()=>Kk)),e(mS,"WireframeGeometry",(()=>Jk)),e(mS,"ShadowMaterial",(()=>Zk)),e(mS,"RawShaderMaterial",(()=>Xk)),e(mS,"MeshStandardMaterial",(()=>$k)),e(mS,"MeshPhysicalMaterial",(()=>eO)),e(mS,"MeshPhongMaterial",(()=>tO)),e(mS,"MeshToonMaterial",(()=>nO)),e(mS,"MeshNormalMaterial",(()=>rO)),e(mS,"MeshLambertMaterial",(()=>iO)),e(mS,"MeshMatcapMaterial",(()=>oO)),e(mS,"LineDashedMaterial",(()=>sO)),e(mS,"AnimationUtils",(()=>pO)),e(mS,"Interpolant",(()=>fO)),e(mS,"CubicInterpolant",(()=>mO)),e(mS,"LinearInterpolant",(()=>gO)),e(mS,"DiscreteInterpolant",(()=>vO)),e(mS,"KeyframeTrack",(()=>yO)),e(mS,"BooleanKeyframeTrack",(()=>bO)),e(mS,"ColorKeyframeTrack",(()=>xO)),e(mS,"NumberKeyframeTrack",(()=>SO)),e(mS,"QuaternionLinearInterpolant",(()=>wO)),e(mS,"QuaternionKeyframeTrack",(()=>_O)),e(mS,"StringKeyframeTrack",(()=>CO)),e(mS,"VectorKeyframeTrack",(()=>AO)),e(mS,"AnimationClip",(()=>EO)),e(mS,"Cache",(()=>MO)),e(mS,"LoadingManager",(()=>IO)),e(mS,"DefaultLoadingManager",(()=>RO)),e(mS,"Loader",(()=>PO)),e(mS,"FileLoader",(()=>NO)),e(mS,"AnimationLoader",(()=>LO)),e(mS,"CompressedTextureLoader",(()=>DO)),e(mS,"ImageLoader",(()=>BO)),e(mS,"CubeTextureLoader",(()=>zO)),e(mS,"DataTextureLoader",(()=>FO)),e(mS,"TextureLoader",(()=>UO)),e(mS,"Light",(()=>jO)),e(mS,"HemisphereLight",(()=>HO)),e(mS,"SpotLight",(()=>JO)),e(mS,"PointLight",(()=>$O)),e(mS,"DirectionalLight",(()=>tN)),e(mS,"AmbientLight",(()=>nN)),e(mS,"RectAreaLight",(()=>rN)),e(mS,"SphericalHarmonics3",(()=>iN)),e(mS,"LightProbe",(()=>oN)),e(mS,"MaterialLoader",(()=>sN)),e(mS,"LoaderUtils",(()=>aN)),e(mS,"InstancedBufferGeometry",(()=>lN)),e(mS,"BufferGeometryLoader",(()=>cN)),e(mS,"ObjectLoader",(()=>uN)),e(mS,"ImageBitmapLoader",(()=>fN)),e(mS,"AudioContext",(()=>gN)),e(mS,"AudioLoader",(()=>vN)),e(mS,"HemisphereLightProbe",(()=>yN)),e(mS,"AmbientLightProbe",(()=>bN)),e(mS,"StereoCamera",(()=>_N)),e(mS,"Clock",(()=>CN)),e(mS,"AudioListener",(()=>RN)),e(mS,"Audio",(()=>PN)),e(mS,"PositionalAudio",(()=>DN)),e(mS,"AudioAnalyser",(()=>BN)),e(mS,"PropertyMixer",(()=>zN)),e(mS,"PropertyBinding",(()=>WN)),e(mS,"AnimationObjectGroup",(()=>qN)),e(mS,"AnimationMixer",(()=>QN)),e(mS,"Uniform",(()=>YN)),e(mS,"UniformsGroup",(()=>XN)),e(mS,"InstancedInterleavedBuffer",(()=>$N)),e(mS,"GLBufferAttribute",(()=>eL)),e(mS,"Raycaster",(()=>tL)),e(mS,"Spherical",(()=>iL)),e(mS,"Cylindrical",(()=>oL)),e(mS,"Box2",(()=>aL)),e(mS,"Line3",(()=>uL)),e(mS,"SpotLightHelper",(()=>hL)),e(mS,"SkeletonHelper",(()=>gL)),e(mS,"PointLightHelper",(()=>yL)),e(mS,"HemisphereLightHelper",(()=>wL)),e(mS,"GridHelper",(()=>_L)),e(mS,"PolarGridHelper",(()=>CL)),e(mS,"DirectionalLightHelper",(()=>ML)),e(mS,"CameraHelper",(()=>PL)),e(mS,"BoxHelper",(()=>NL)),e(mS,"Box3Helper",(()=>LL)),e(mS,"PlaneHelper",(()=>DL)),e(mS,"ArrowHelper",(()=>UL)),e(mS,"AxesHelper",(()=>jL)),e(mS,"ShapePath",(()=>HL)),e(mS,"DataUtils",(()=>WL)),e(mS,"ImmediateRenderObject",(()=>qL)),e(mS,"WebGLMultisampleRenderTarget",(()=>KL)),e(mS,"DataTexture2DArray",(()=>JL)),e(mS,"DataTexture3D",(()=>QL)),e(mS,"BoxBufferGeometry",(()=>YL)),e(mS,"CapsuleBufferGeometry",(()=>ZL)),e(mS,"CircleBufferGeometry",(()=>XL)),e(mS,"ConeBufferGeometry",(()=>$L)),e(mS,"CylinderBufferGeometry",(()=>eD)),e(mS,"DodecahedronBufferGeometry",(()=>tD)),e(mS,"ExtrudeBufferGeometry",(()=>nD)),e(mS,"IcosahedronBufferGeometry",(()=>rD)),e(mS,"LatheBufferGeometry",(()=>iD)),e(mS,"OctahedronBufferGeometry",(()=>oD)),e(mS,"PlaneBufferGeometry",(()=>sD)),e(mS,"PolyhedronBufferGeometry",(()=>aD)),e(mS,"RingBufferGeometry",(()=>lD)),e(mS,"ShapeBufferGeometry",(()=>cD)),e(mS,"SphereBufferGeometry",(()=>uD)),e(mS,"TetrahedronBufferGeometry",(()=>dD)),e(mS,"TorusBufferGeometry",(()=>hD)),e(mS,"TorusKnotBufferGeometry",(()=>pD)),e(mS,"TubeBufferGeometry",(()=>fD));
240
240
  /**
241
241
  * @license
242
242
  * Copyright 2010-2022 Three.js Authors
@@ -247,4 +247,4 @@ const gS="144",vS={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},yS={ROTATE:0,
247
247
  * @license qrcode.react
248
248
  * Copyright (c) Paul O'Shannessy
249
249
  * SPDX-License-Identifier: ISC
250
- */function JU(e,t=0){const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return n.push(`M${i+t} ${r+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?n.push(`M${s+t},${r+t} h1v1H${s+t}z`):n.push(`M${i+t},${r+t} h${s+1-i}v1H${i+t}z`)}}))})),n.join("")}function QU(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function YU(e,t,n,r){if(null==r)return null;const i=n?4:0,o=e.length+2*i,s=Math.floor(.1*t),a=o/t,l=(r.width||s)*a,c=(r.height||s)*a,u=null==r.x?e.length/2-l/2:r.x*a,d=null==r.y?e.length/2-c/2:r.y*a;let h=null;if(r.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(l+u-e),h:Math.ceil(c+d-t)}}return{x:u,y:d,h:c,w:l,excavation:h}}var ZU=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function XU(e){const n=e,{value:r,size:i=VU,level:o=GU,bgColor:s=WU,fgColor:a=qU,includeMargin:l=KU,style:u,imageSettings:d}=n,h=UU(n,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),p=null==d?void 0:d.src,f=(0,c.useRef)(null),m=(0,c.useRef)(null),[g,v]=(0,c.useState)(!1);(0,c.useEffect)((()=>{if(null!=f.current){const e=f.current,t=e.getContext("2d");if(!t)return;let n=jU.QrCode.encodeText(r,HU[o]).getModules();const c=l?4:0,u=n.length+2*c,h=YU(n,i,l,d),p=m.current,g=null!=h&&null!==p&&p.complete&&0!==p.naturalHeight&&0!==p.naturalWidth;g&&null!=h.excavation&&(n=QU(n,h.excavation));const v=window.devicePixelRatio||1;e.height=e.width=i*v;const y=i/u*v;t.scale(y,y),t.fillStyle=s,t.fillRect(0,0,u,u),t.fillStyle=a,ZU?t.fill(new Path2D(JU(n,c))):n.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+c,n+c,1,1)}))})),g&&t.drawImage(p,h.x+c,h.y+c,h.w,h.h)}})),(0,c.useEffect)((()=>{v(!1)}),[p]);const y=FU({height:i,width:i},u);let b=null;return null!=p&&(b=t(c).createElement("img",{src:p,key:p,style:{display:"none"},onLoad:()=>{v(!0)},ref:m})),t(c).createElement(t(c).Fragment,null,t(c).createElement("canvas",FU({style:y,height:i,width:i,ref:f},h)),b)}var $U=({tenant:e,url:n,title:r="",className:i,baseUrl:o,primary:a=!0,showQrCode:l=!0,align:u="right"})=>{const{t:d}=Se(),[h,p]=(0,c.useState)(n),f=(0,c.useMemo)((()=>(null==e?void 0:e.theme)?`${null!=o?o:"https://aisuru.com"}/images/${e.theme}/square_logo.png`:`${null!=o?o:"https://aisuru.com"}/images/memori_logo.png`),[e,o]);(0,c.useEffect)((()=>{n||p(window.location.href)}),[n]);const m=[{id:"facebook",title:"Facebook",url:`https://www.facebook.com/sharer/sharer.php?u=${h}`,icon:AU},{id:"twitter",title:"Twitter",url:`https://twitter.com/intent/tweet?url=${h}`,icon:EU},{id:"linkedin",title:"LinkedIn",url:`https://www.linkedin.com/shareArticle?mini=true&title=${r}&url=${h}`,icon:TU},{id:"whatsapp",title:"Whatsapp",url:`https://api.whatsapp.com/send?phone=&text=${h}`,icon:MU},{id:"telegram",title:"Telegram",url:`https://t.me/share/url?text=${r}&url=${h}`,icon:OU},{id:"email",title:"Email",url:`mailto:?subject=${(null==r?void 0:r.length)>0?r:n}&body=${h}`,icon:IU}];return(0,s.jsxs)(Ov,{as:"div",className:t(ws)("memori-share-button",{"memori-share-button--align-left":"left"===u}),children:[(0,s.jsx)(Ov.Button,{className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button",i,{"memori-button--primary":a}),title:d("widget.share")||void 0,children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(RU,{})})}),(0,s.jsxs)(Ov.Items,{className:"memori-share-button--overlay",as:"ul",children:[(0,s.jsx)(Ov.Item,{as:"li",className:"memori-share-button--li",children:(0,s.jsx)(Sf,{className:"memori-share-button--link",ghost:!0,icon:(0,s.jsx)(ax,{}),onClick:()=>{h&&navigator.clipboard.writeText(h)},children:d("copyToClipboard")||void 0})},"copy"),m.map((e=>{var n;return(0,s.jsx)(Ov.Item,{as:"li",className:"memori-share-button--li",children:(0,s.jsxs)("a",{className:t(ws)("memori-button","memori-button--with-icon","memori-button--ghost","memori-button--padded","memori-share-button--link"),href:null!==(n=e.url)&&void 0!==n?n:"",target:"_blank",rel:"noopener noreferrer",children:[(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(e.icon,{})}),e.title]})},e.id)})),l&&(0,s.jsxs)(Ov.Item,{as:"li",className:"memori-share-button--li-qr-code",children:[(0,s.jsx)(XU,{id:"qr-canvas",value:null!=h?h:"",size:128,bgColor:"#ffffff",fgColor:"#000000",level:"H",includeMargin:!1,imageSettings:{src:f,x:void 0,y:void 0,height:32,width:32,excavate:!0}}),(0,s.jsx)("div",{children:(0,s.jsx)(Sf,{onClick:()=>{const e=document.getElementById("qr-canvas");if(!e)return;const t=document.createElement("a");t.href=e.toDataURL(),t.download=`memori-${r}-share.png`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},icon:(0,s.jsx)(PU,{}),title:"Download QR",children:"Download"})})]},"qrcode")]})]})};var ej=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M290 236.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0 0 13.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 0 0 0 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 0 0-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"})});var tj=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",focusable:"false",role:"img",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2","aria-label":t,children:[(0,s.jsx)("path",{d:"M23 4L23 10 17 10"}),(0,s.jsx)("path",{d:"M1 20L1 14 7 14"}),(0,s.jsx)("path",{d:"M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"})]});var nj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6c-.3 1.5-.4 3-.4 4.4 0 14.4 11.6 26 26 26h723c1.5 0 3-.1 4.4-.4 14.2-2.4 23.7-15.9 21.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"})});var rj=({className:e,memori:n,tenant:r,history:i,position:o,setShowPositionDrawer:a,setShowSettingsDrawer:l,setShowKnownFactsDrawer:u,setShowExpertsDrawer:d,speakerMuted:h,setSpeakerMuted:p,hasUserActivatedSpeak:f=!1,showShare:m=!0,showSettings:g=!0,showSpeaker:v=!0,showReload:y=!1,showClear:b=!1,showLogin:x=!0,setShowLoginDrawer:S,clearHistory:w,loginToken:_,user:C,sessionID:A})=>{const{t:E}=Se(),[T,M]=(0,c.useState)(!1),[I,R]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{document.fullscreenEnabled&&M(!0)}),[]),(0,s.jsxs)("div",{className:t(ws)("memori-header",e),children:[n.needsPosition&&o&&(0,s.jsxs)("div",{className:"memori-header--position",children:[0!==o.latitude&&0!==o.longitude&&(0,s.jsx)("span",{className:"memori-header--position-placeName",children:o.placeName}),(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--position",title:E("widget.position")||"Position",icon:(0,s.jsx)(lS,{}),onClick:()=>a(!0)})]}),y&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--reload",title:E("reload")||"Reload",icon:(0,s.jsx)(tj,{}),onClick:()=>{window.location.reload()}}),b&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--clear",title:E("clearHistory")||"Clear chat",icon:(0,s.jsx)(nj,{}),onClick:w}),T&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--fullscreen",title:I?E("fullscreenExit")||"Exit fullscreen":E("fullscreenEnter")||"Enter fullscreen",icon:I?(0,s.jsx)(qx,{}):(0,s.jsx)(ej,{}),onClick:()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),R(!1)):(document.documentElement.requestFullscreen(),R(!0))}}),n.enableDeepThought&&!!_&&(null==C?void 0:C.pAndCUAccepted)&&(0,s.jsx)(Sf,{primary:!!A&&!!f,shape:"circle",icon:(0,s.jsx)(sS,{}),className:"memori-header--button memori-header--button--knownfacts",disabled:!f||!A,onClick:()=>u(!0),title:E("knownFacts.title")||"Known facts"}),n.enableBoardOfExperts&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",icon:(0,s.jsx)(oS,{}),className:"memori-header--button memori-header--button--experts",disabled:!f||!A,onClick:()=>d(!0),title:E("widget.showExpertsInTheBoard")||"Experts in this board"}),v&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--speaker",icon:h?(0,s.jsx)(eU,{}):(0,s.jsx)(nU,{}),onClick:()=>p(!h),title:E("widget.sound")||"Sound"}),(0,s.jsx)(_U,{history:i,memori:n,className:"memori-header--button memori-header--button--export",disabled:!f||0===i.length}),g&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button-settings",icon:(0,s.jsx)(CU,{}),onClick:()=>l(!0),title:E("widget.settings")||"Settings"}),m&&(0,s.jsx)($U,{className:"memori-header--button memori-header--button-share",title:n.name,tenant:r,showQrCode:!0,align:"left"}),x&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button-login",icon:(0,s.jsx)(mv,{}),onClick:()=>S(!0),title:_?E("login.user")||"User":E("login.login")||"Login"})]})};var ij=({tenant:e,userLang:t="en",integrationID:n,memoriHash:r})=>{const i="memorytwin"===(null==e?void 0:e.theme)?"memorytwin":"twincreator"===(null==e?void 0:e.theme)?"twincreator":"aisuru";return(0,s.jsxs)("div",{className:"memori--powered-by",children:[(0,s.jsx)("img",{src:`https://aisuru.com/images/${i}/logo.png`,alt:""}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"sr-only",children:"Powered by"}),(0,s.jsx)("a",{href:`https://memori.ai/${"it"===(null==t?void 0:t.toLowerCase())?"it":"en"}${n?`?integrationID=${n}`:""}${r?`${n?"&":"?"}memori=${r}`:""}`,target:"_blank",rel:"noopener noreferrer",children:"Memori.AI"})]})]})},oj=(c=o("85Hg2"),c=o("85Hg2"),(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(oj||{})),sj=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(sj||{}),aj=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(aj||{}),lj=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.SetOrientation=3]="SetOrientation",e[e.GoToOption=4]="GoToOption",e[e.Search=5]="Search",e[e.ClearSearch=6]="ClearSearch",e[e.RegisterOption=7]="RegisterOption",e[e.UnregisterOption=8]="UnregisterOption",e))(lj||{});function cj(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=Cp(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let uj={1:e=>e.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{value:n,mode:r,compare:i}=e.propsRef.current,o=e.options.findIndex((e=>{let t=e.dataRef.current.value;return lh(r,{1:()=>n.some((e=>i(e,t))),0:()=>i(n,t)})}));return-1!==o&&(t=o),{...e,listboxState:0,activeOptionIndex:t}},2:(e,t)=>e.disabled===t.disabled?e:{...e,disabled:t.disabled},3:(e,t)=>e.orientation===t.orientation?e:{...e,orientation:t.orientation},4(e,t){var n;if(e.disabled||1===e.listboxState)return e;let r=cj(e),i=pm(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},5:(e,t)=>{if(e.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},6:e=>e.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},7:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=cj(e,(e=>[...e,n]));if(null===e.activeOptionIndex){let{value:i,mode:o,compare:s}=e.propsRef.current,a=t.dataRef.current.value;lh(o,{1:()=>i.some((e=>s(e,a))),0:()=>s(i,a)})&&(r.activeOptionIndex=r.options.indexOf(n))}return{...e,...r}},8:(e,t)=>{let n=cj(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},dj=(0,c.createContext)(null);function hj(e){let t=(0,c.useContext)(dj);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,hj),t}return t}function pj(e,t){return lh(t.type,uj,e,t)}dj.displayName="ListboxContext";let fj=c.Fragment,mj=mh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,horizontal:u=!1,multiple:d=!1,...h}=e;const p=u?"horizontal":"vertical";let f=Ph(n),[m,g]=ym(r,s,i),v=(0,c.useReducer)(pj,{listboxState:1,propsRef:{current:{value:m,onChange:g,mode:d?1:0,compare:Mh("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a)}},labelRef:(0,c.createRef)(),buttonRef:(0,c.createRef)(),optionsRef:(0,c.createRef)(),disabled:l,orientation:p,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1}),[{listboxState:y,propsRef:b,optionsRef:x,buttonRef:S},w]=v;b.current.value=m,b.current.mode=d?1:0,_h((()=>{b.current.onChange=e=>lh(b.current.mode,{0:()=>g(e),1(){let t=b.current.value.slice(),{compare:n}=b.current,r=t.findIndex((t=>n(t,e)));return-1===r?t.push(e):t.splice(r,1),g(t)}})}),[g,b]),_h((()=>w({type:2,disabled:l})),[l]),_h((()=>w({type:3,orientation:p})),[p]),rf([S,x],((e,t)=>{var n;w({type:1}),xp(t,bp.Loose)||(e.preventDefault(),null==(n=S.current)||n.focus())}),0===y);let _=(0,c.useMemo)((()=>({open:0===y,disabled:l,value:m})),[y,l,m]),C={ref:f};return t(c).createElement(dj.Provider,{value:v},t(c).createElement(Sh,{value:lh(y,{0:bh.Open,1:bh.Closed})},null!=o&&null!=m&&fm({[o]:m}).map((([e,n])=>t(c).createElement(dp,{features:up.Hidden,...gh({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:n})}))),hh({ourProps:C,theirProps:h,slot:_,defaultTag:fj,name:"Listbox"})))})),gj=mh((function(e,t){var n;let[r,i]=hj("Listbox.Button"),o=Ph(r.buttonRef,t),s=`headlessui-listbox-button-${cp()}`,a=Uh(),l=Mh((e=>{switch(e.key){case ip.Space:case ip.Enter:case ip.ArrowDown:e.preventDefault(),i({type:0}),a.nextFrame((()=>{r.propsRef.current.value||i({type:4,focus:hm.First})}));break;case ip.ArrowUp:e.preventDefault(),i({type:0}),a.nextFrame((()=>{r.propsRef.current.value||i({type:4,focus:hm.Last})}))}})),u=Mh((e=>{if(e.key===ip.Space)e.preventDefault()})),d=Mh((e=>{if(op(e.currentTarget))return e.preventDefault();0===r.listboxState?(i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),i({type:0}))})),h=lm((()=>{if(r.labelRef.current)return[r.labelRef.current.id,s].join(" ")}),[r.labelRef.current,s]),p=(0,c.useMemo)((()=>({open:0===r.listboxState,disabled:r.disabled,value:r.propsRef.current.value})),[r]),f=e;return hh({ourProps:{ref:o,id:s,type:um(e,r.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=r.optionsRef.current)?void 0:n.id,"aria-expanded":r.disabled?void 0:0===r.listboxState,"aria-labelledby":h,disabled:r.disabled,onKeyDown:l,onKeyUp:u,onClick:d},theirProps:f,slot:p,defaultTag:"button",name:"Listbox.Button"})})),vj=mh((function(e,t){let[n]=hj("Listbox.Label"),r=`headlessui-listbox-label-${cp()}`;return hh({ourProps:{ref:Ph(n.labelRef,t),id:r,onClick:Mh((()=>{var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))},theirProps:e,slot:(0,c.useMemo)((()=>({open:0===n.listboxState,disabled:n.disabled})),[n]),defaultTag:"label",name:"Listbox.Label"})})),yj=uh.RenderStrategy|uh.Static,bj=mh((function(e,t){var n;let[r,i]=hj("Listbox.Options"),o=Ph(r.optionsRef,t),s=`headlessui-listbox-options-${cp()}`,a=Uh(),l=Uh(),u=xh(),d=null!==u?u===bh.Open:0===r.listboxState;(0,c.useEffect)((()=>{var e;let t=r.optionsRef.current;!t||0===r.listboxState&&t!==(null==(e=hp(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})}),[r.listboxState,r.optionsRef]);let h=Mh((e=>{switch(l.dispose(),e.key){case ip.Space:if(""!==r.searchQuery)return e.preventDefault(),e.stopPropagation(),i({type:5,value:e.key});case ip.Enter:if(e.preventDefault(),e.stopPropagation(),null!==r.activeOptionIndex){let{dataRef:e}=r.options[r.activeOptionIndex];r.propsRef.current.onChange(e.current.value)}0===r.propsRef.current.mode&&(i({type:1}),Nh().nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})})));break;case lh(r.orientation,{vertical:ip.ArrowDown,horizontal:ip.ArrowRight}):return e.preventDefault(),e.stopPropagation(),i({type:4,focus:hm.Next});case lh(r.orientation,{vertical:ip.ArrowUp,horizontal:ip.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),i({type:4,focus:hm.Previous});case ip.Home:case ip.PageUp:return e.preventDefault(),e.stopPropagation(),i({type:4,focus:hm.First});case ip.End:case ip.PageDown:return e.preventDefault(),e.stopPropagation(),i({type:4,focus:hm.Last});case ip.Escape:return e.preventDefault(),e.stopPropagation(),i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case ip.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(i({type:5,value:e.key}),l.setTimeout((()=>i({type:6})),350))}})),p=lm((()=>{var e,t,n;return null!=(n=null==(e=r.labelRef.current)?void 0:e.id)?n:null==(t=r.buttonRef.current)?void 0:t.id}),[r.labelRef.current,r.buttonRef.current]),f=(0,c.useMemo)((()=>({open:0===r.listboxState})),[r]),m=e;return hh({ourProps:{"aria-activedescendant":null===r.activeOptionIndex||null==(n=r.options[r.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===r.propsRef.current.mode||void 0,"aria-labelledby":p,"aria-orientation":r.orientation,id:s,onKeyDown:h,role:"listbox",tabIndex:0,ref:o},theirProps:m,slot:f,defaultTag:"ul",features:yj,visible:d,name:"Listbox.Options"})})),xj=mh((function(e,t){let{disabled:n=!1,value:r,...i}=e,[o,s]=hj("Listbox.Option"),a=`headlessui-listbox-option-${cp()}`,l=null!==o.activeOptionIndex&&o.options[o.activeOptionIndex].id===a,{value:u,compare:d}=o.propsRef.current,h=lh(o.propsRef.current.mode,{1:()=>u.some((e=>d(e,r))),0:()=>d(u,r)}),p=(0,c.useRef)(null),f=Ph(t,p);_h((()=>{if(0!==o.listboxState||!l||0===o.activationTrigger)return;let e=Nh();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[p,l,o.listboxState,o.activationTrigger,o.activeOptionIndex]);let m=(0,c.useRef)({disabled:n,value:r,domRef:p});_h((()=>{m.current.disabled=n}),[m,n]),_h((()=>{m.current.value=r}),[m,r]),_h((()=>{var e,t;m.current.textValue=null==(t=null==(e=p.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[m,p]);let g=Mh((()=>o.propsRef.current.onChange(r)));_h((()=>(s({type:7,id:a,dataRef:m}),()=>s({type:8,id:a}))),[m,a]);let v=Mh((e=>{if(n)return e.preventDefault();g(),0===o.propsRef.current.mode&&(s({type:1}),Nh().nextFrame((()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})))})),y=Mh((()=>{if(n)return s({type:4,focus:hm.Nothing});s({type:4,focus:hm.Specific,id:a})})),b=Mh((()=>{n||l||s({type:4,focus:hm.Specific,id:a,trigger:0})})),x=Mh((()=>{n||!l||s({type:4,focus:hm.Nothing})})),S=(0,c.useMemo)((()=>({active:l,selected:h,disabled:n})),[l,h,n]);return hh({ourProps:{id:a,ref:f,role:"option",tabIndex:!0===n?void 0:-1,"aria-disabled":!0===n||void 0,"aria-selected":h,disabled:void 0,onClick:v,onFocus:y,onPointerMove:b,onMouseMove:b,onPointerLeave:x,onMouseLeave:x},theirProps:i,slot:S,defaultTag:"li",name:"Listbox.Option"})})),Sj=Object.assign(mj,{Button:gj,Label:vj,Options:bj,Option:xj});var wj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",focusable:"false",role:"img",className:e,fill:"currentColor","aria-label":t,children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z",clipRule:"evenodd"})});const _j={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},Cj=(0,c.memo)((({defaultDate:e,onChange:t,disabled:n=!1})=>{const{t:r,i18n:i}=Se(),[o,a]=(0,c.useState)(e?"string"==typeof e?_s.DateTime.fromISO(e):_s.DateTime.fromJSDate(e):_s.DateTime.now());return(0,c.useEffect)((()=>{t(o)}),[o,t]),(0,s.jsxs)("div",{className:"memori--date-selector",children:[(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Sj,{value:o,onChange:e=>{a(e)},disabled:n,name:"day",children:[(0,s.jsxs)(Sj.Label,{className:"memori--date-selector__select-label",children:[r("day"),":"]}),(0,s.jsxs)(Sj.Button,{"aria-label":r("day"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:o.day}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(wj,{})})]}),(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Sj.Options,{className:"memori--date-selector__select-options",children:[...Array(31).keys()].map((e=>(0,s.jsx)(Sj.Option,{value:o.set({day:e+1}),className:"memori--date-selector__select-option",children:e+1},e)))})})]})}),(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Sj,{value:o,onChange:e=>{a(e)},disabled:n,name:"month",children:[(0,s.jsxs)(Sj.Label,{className:"memori--date-selector__select-label",children:[r("month"),":"]}),(0,s.jsxs)(Sj.Button,{"aria-label":r("month"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:_j["it"===i.language?"it":"en"][o.month-1]}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(wj,{})})]}),(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Sj.Options,{className:"memori--date-selector__select-options",children:_j["it"===i.language?"it":"en"].map((e=>(0,s.jsx)(Sj.Option,{className:"memori--date-selector__select-option",value:o.set({month:_j["it"===i.language?"it":"en"].findIndex((t=>t===e))+1}),children:e},e)))})})]})}),(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Sj,{value:o,onChange:e=>{a(e)},disabled:n,name:"year",children:[(0,s.jsxs)(Sj.Label,{className:"memori--date-selector__select-label",children:[r("year"),":"]}),(0,s.jsxs)(Sj.Button,{"aria-label":r("year"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:o.year}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(wj,{})})]}),(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Sj.Options,{className:"memori--date-selector__select-options",children:[...Array(_s.DateTime.now().year-1899).keys()].sort(((e,t)=>t-e)).map((e=>(0,s.jsx)(Sj.Option,{value:o.set({year:e+1900}),className:"memori--date-selector__select-option",children:e+1900},e)))})})]})})]})}));Cj.displayName="DateSelector";var Aj=Cj;c=o("85Hg2");var Ej=({visible:e=!1,onClose:n,minAge:r})=>{const{t:i}=Se(),[o,a]=(0,c.useState)(),[l,u]=(0,c.useState)(),[d,h]=(0,c.useState)(!1),p=(0,c.useCallback)((()=>{if(h(!0),!o)return t(Ju).error(i("requiredField")),u(i("requiredField")||"Required field"),void h(!1);if(_s.DateTime.now().diff(o,"years").years<r)return t(Ju).error(i("underageTwinSession",{age:r})),u(i("underageTwinSession",{age:r})||`You must be at least ${r} years old to interact with this Twin`),void h(!1);n(o.toJSDate().toISOString())}),[o,r,n,i]);return(0,s.jsxs)(Wm,{open:e,title:i("ageVerification"),className:"age-verification-modal",closable:!0,onClose:()=>n(),children:[(0,s.jsx)("p",{children:i("ageVerificationText",{minAge:r})}),(0,s.jsxs)("form",{className:"age-verification-form",onSubmit:e=>{e.preventDefault(),p()},children:[(0,s.jsx)("div",{className:"form-item",children:(0,s.jsxs)("fieldset",{name:"birthDate",children:[(0,s.jsx)("legend",{className:"sr-only",children:i("birthDate")}),(0,s.jsx)(Aj,{defaultDate:new Date(Date.now()),onChange:e=>{a(e)}}),(0,s.jsx)("p",{className:"form-item-help",children:i("birthDateHelper")}),l&&(0,s.jsx)("p",{className:"form-item-error",children:l})]})}),(0,s.jsx)("div",{className:"form-item form-submit",children:(0,s.jsx)(Sf,{primary:!0,htmlType:"submit",className:"age-verification-submit",loading:d,disabled:!o,children:i("confirm")})})]})]})};c=o("85Hg2");var Tj=({label:e,className:n,disabled:r=!1,indeterminate:i=!1,checked:o,children:a,onChange:l,name:u,...d})=>{const h=(0,c.useRef)(null);return(0,c.useEffect)((()=>{h.current&&(h.current.indeterminate=i)}),[h,i]),(0,s.jsxs)("label",{className:t(ws)("memori-checkbox",n,{"memori-checkbox--disabled":r,"memori-checkbox--indeterminate":i}),children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{ref:h,type:"checkbox",...d,name:u,disabled:r,checked:o||i,className:"memori-checkbox--input",onChange:l}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),!!(null==e?void 0:e.length)&&(0,s.jsx)("span",{className:"memori-checkbox--text",children:e})]})};c=o("85Hg2");var Mj=({className:e,value:n,name:r,displayValue:i,options:o,onChange:a,disabled:l=!1,label:u,placeholder:d})=>(0,s.jsx)("div",{className:t(ws)("memori-select",e),children:(0,s.jsxs)(Sj,{value:n,onChange:e=>{a(e)},disabled:l,name:r,children:[u&&(0,s.jsxs)(Sj.Label,{className:"memori-select--label",children:[u,":"]}),(0,s.jsxs)(Sj.Button,{"aria-label":u,className:"memori-select--button",children:[(0,s.jsx)("span",{className:t(ws)("memori-select--value",{"memori-select--value-placeholder":!n}),children:n?i||n:d}),(0,s.jsx)("span",{className:"memori-select--icon",children:(0,s.jsx)(wj,{})})]}),(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Sj.Options,{className:"memori-select--options",children:o.map((e=>(0,s.jsx)(Sj.Option,{value:e.value,className:"memori-select--option",children:e.label},e.value)))})})]})});const Ij={muteSpeaker:"@memori:muteSpeaker",microphoneMode:"@memori:microphoneMode",continuousSpeechTimeout:"@memori:continuousSpeechTimeout",sendOnEnter:"@memori:sendOnEnter",birthDate:"@memori:birthDate",controlsPosition:"@memori:controlsPosition",hideEmissions:"@memori:hideEmissions",loginToken:"@memori:loginToken",location:"@memori:location"},Rj=(e,t)=>{var n;try{const r=window.localStorage.getItem(null!==(n=Ij[e])&&void 0!==n?n:e);if(!r)return t;try{return JSON.parse(r)}catch(e){return r}}catch(e){return console.error("error",e),t}},Pj=(e,t)=>{var n;try{window.localStorage.setItem(null!==(n=Ij[e])&&void 0!==n?n:e,t.toString())}catch(e){console.error("error",e)}},kj=e=>{var t;try{window.localStorage.removeItem(null!==(t=Ij[e])&&void 0!==t?t:e)}catch(e){console.error("error",e)}},Oj=[2,3,5,10,15,20,30,60];var Nj=({open:e,layout:t="DEFAULT",onClose:n,microphoneMode:r="HOLD_TO_TALK",continuousSpeechTimeout:i,setMicrophoneMode:o,setContinuousSpeechTimeout:a,controlsPosition:l,setControlsPosition:c,hideEmissions:u,setHideEmissions:d,additionalSettings:h})=>{const{t:p}=Se();return(0,s.jsxs)(_f,{className:"memori-settings-drawer",open:e,onClose:n,title:p("widget.settings")||"Settings",description:p("write_and_speak.settingsHeaderLabel"),children:[(0,s.jsxs)("div",{className:"memori-settings-drawer--field controls",children:[(0,s.jsxs)("label",{htmlFor:"#microphoneMode",children:[p("write_and_speak.microphoneMode")||"Microphone mode",":"]}),(0,s.jsxs)(Vx,{id:"microphoneMode",name:"microphoneMode",value:r,defaultValue:r,className:"memori-settings-drawer--microphoneMode-radio",onChange:e=>{let t="CONTINUOUS"===e?"CONTINUOUS":"HOLD_TO_TALK";o(t),Pj("microphoneMode",t)},children:[(0,s.jsx)(Vx.Option,{value:"HOLD_TO_TALK",className:"memori-settings-drawer--microphoneMode-radio-button",children:({checked:e})=>(0,s.jsx)(Sf,{primary:e,outlined:!e,children:p("write_and_speak.holdToSpeak")||"Hold to speak"})}),(0,s.jsx)(Vx.Option,{value:"CONTINUOUS",className:"memori-settings-drawer--microphoneMode-radio-button",children:({checked:e})=>(0,s.jsx)(Sf,{primary:e,outlined:!e,children:p("write_and_speak.continuousSpeechLabel")||"Continuous speech"})})]})]}),"CONTINUOUS"===r&&(0,s.jsx)("div",{className:"memori-settings-drawer--field",children:(0,s.jsx)(Mj,{label:p("write_and_speak.secondsLabel")||"Seconds",placeholder:p("write_and_speak.secondsLabel")||"Seconds",options:Oj.map((e=>({value:e,label:e}))),value:i,onChange:e=>{a(e),Pj("continuousSpeechTimeout",e)}})}),"TOTEM"===t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"memori-settings-drawer--field controls",children:[(0,s.jsxs)("label",{htmlFor:"#controlsPosition",children:[p("write_and_speak.controlsPosition")||"Controls",":"]}),(0,s.jsxs)(Vx,{id:"controlsPosition",name:"controlsPosition",value:l,defaultValue:l,className:"memori-settings-drawer--controlsposition-radio",onChange:e=>{c(e),Pj("controlsPosition",e)},children:[(0,s.jsx)(Vx.Option,{value:"center",className:"memori-settings-drawer--controlsposition-radio-button",children:({checked:e})=>(0,s.jsx)(Sf,{primary:e,outlined:!e,children:p("center")||"Center"})}),(0,s.jsx)(Vx.Option,{value:"bottom",className:"memori-settings-drawer--controlsposition-radio-button",children:({checked:e})=>(0,s.jsx)(Sf,{primary:e,outlined:!e,children:p("bottom")||"Bottom"})})]})]}),(0,s.jsx)("div",{className:"memori-settings-drawer--field",children:(0,s.jsx)(Tj,{label:p("write_and_speak.hideEmissionsLabel")||"Hide emissions",name:"hideControls",checked:u,onChange:e=>{d(e.target.checked),Pj("hideEmissions",e.target.checked)}})})]}),h&&(0,s.jsx)("div",{className:"memori-settings-drawer--field controls",children:h})]})};c=o("85Hg2");var Lj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"})});var Dj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M15 18L9 12 15 6"})});var Bj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M9 18L15 12 9 6"})});var zj=({apiURL:e,sessionID:n,memori:r,visible:i=!0,initialKnownFacts:o=[],closeDrawer:a})=>{var l;const{t:u}=Se(),d=Y(e),{getKnownFactsPaginated:h,deleteKnownFact:p}=d.knownFacts,[f,m]=(0,c.useState)(o),[g,v]=(0,c.useState)(25),[y,b]=(0,c.useState)(0),[x,S]=(0,c.useState)(null!==(l=null==o?void 0:o.length)&&void 0!==l?l:0),[w,_]=(0,c.useState)(!1),C=async(e,r,i)=>{if(n||e){_(!0);try{const{knownFacts:o,count:s,...a}=await h(null!=e?e:n,null!=r?r:y,null!=i?i:g);m(null!=o?o:[]),S(null!=s?s:0),0!==a.resultCode&&(console.error(a),t(Ju).error(u(Gv(a.resultCode))))}catch(e){console.error("KNOWN_FACTS/FETCH",e),m(null!=o?o:[])}_(!1)}};(0,c.useEffect)((()=>{C()}),[]);const[A,E]=(0,c.useState)(!1),[T,M]=(0,c.useState)(),[I,R]=(0,c.useState)([]);return(0,s.jsxs)(_f,{open:i,width:"80%",className:"memori-known-facts-drawer",onClose:()=>a(),title:u("knownFacts.title"),children:[(0,s.jsx)("p",{children:u("knownFacts.description",{memoriName:r.name})}),(0,s.jsxs)(xf,{spinning:w,children:[(0,s.jsxs)("div",{className:"memori-known-facts-actions",children:[(0,s.jsxs)(Sf,{primary:!0,danger:!0,onClick:()=>{E(!0)},className:"memori-known-facts-delete-selected",disabled:0===(null==I?void 0:I.length),icon:(0,s.jsx)(Lj,{}),loading:w,children:[u("selected")," (",null==I?void 0:I.length,")"]}),(0,s.jsx)(Wm,{className:"memori-known-facts-modal",open:A,closable:!0,title:I.length>1?u("knownFacts.deleteSelectedConfirmTitle"):u("knownFacts.deleteConfirmTitle"),description:I.length>1?u("knownFacts.deleteSelectedConfirmMessage",{number:I.length}):u("knownFacts.deleteConfirmMessage"),onClose:()=>{E(!1)},footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Sf,{ghost:!0,onClick:()=>{E(!1)},children:u("cancel")}),(0,s.jsx)(Sf,{primary:!0,danger:!0,onClick:async()=>{try{const e=I.map((e=>p(n,e)));Promise.all(e).then((e=>{if(e.every((e=>0===e.resultCode)))t(Ju).success(u("knownFacts.deleteSuccess")),R([]),C(),E(!1);else{let n=e.find((e=>0!==e.resultCode));console.error(n),void 0!==(null==n?void 0:n.resultCode)&&t(Ju).error(u(Gv(null==n?void 0:n.resultCode)))}}))}catch(e){let n=e;t(Ju).error(u("Error")+n.message)}},children:u("confirm")})]})})]}),x>25&&(0,s.jsxs)("nav",{className:"memori--table--pagination",children:[x>g&&(0,s.jsxs)("div",{className:"memori--table--pagination--pages",children:[(0,s.jsx)(Sf,{shape:"circle",disabled:0===y||y<g,padded:!1,title:u("previous")||"Previous",icon:(0,s.jsx)(Dj,{}),onClick:()=>{let e=(y/g-1)*g;b(e),C(void 0,e,g)}}),(0,s.jsxs)("span",{className:"memori--table--pagination--pages--current",children:[Math.ceil(y/g)+1," /"," ",Math.ceil(x/g)]}),(0,s.jsx)(Sf,{shape:"circle",padded:!1,title:u("next")||"Next",icon:(0,s.jsx)(Bj,{}),disabled:(y/g+1)*g>=x,onClick:()=>{let e=(y/g+1)*g;b(e),C(void 0,e,g)}})]}),(0,s.jsx)(Mj,{options:[{label:`25 / ${u("page")||"page"}`,value:25},{label:`50 / ${u("page")||"page"}`,value:50},{label:`100 / ${u("page")||"page"}`,value:100}],value:g,displayValue:`${g} / ${u("page")||"page"}`,onChange:e=>{v(e),b(0),C(void 0,0,e)}})]}),(0,s.jsxs)("table",{className:"memori--table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"memori--table--column-centered",children:(0,s.jsx)(Tj,{checked:!!(null==f?void 0:f.length)&&(null==I?void 0:I.length)===f.length,indeterminate:!!(null==f?void 0:f.length)&&!!(null==I?void 0:I.length)&&(null==I?void 0:I.length)!==(null==f?void 0:f.length),onChange:e=>{e.target.checked?R(f.map((e=>e.knownFactID))):R([])}})}),(0,s.jsx)("th",{children:u("knownFacts.text")}),(0,s.jsx)("th",{className:"mobile-hidden",children:u("createdAt")}),(0,s.jsx)("th",{className:"memori--table--column-right",children:u("actions")})]})}),(0,s.jsx)("tbody",{children:f.map((e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"memori--table--column-centered",children:(0,s.jsx)(Tj,{checked:null==I?void 0:I.includes(e.knownFactID),onChange:t=>{t.target.checked?R((t=>[...new Set([...t,e.knownFactID])])):R((t=>t.filter((t=>t!==e.knownFactID))))}})}),(0,s.jsx)("td",{children:e.text}),(0,s.jsx)("td",{className:"mobile-hidden",children:(0,s.jsx)("span",{className:"memori--table--date",children:e.creationTimestamp?new Intl.DateTimeFormat("it",{dateStyle:"short",timeStyle:"short"}).format(new Date(e.creationTimestamp)):"-"})}),(0,s.jsx)("td",{className:"memori--table--column-right",children:(0,s.jsxs)("div",{className:"memori--table--action-column",children:[(0,s.jsx)(Sf,{danger:!0,ghost:!0,shape:"circle",icon:(0,s.jsx)(Lj,{}),disabled:(null==I?void 0:I.length)>0,title:u("delete")||"Delete",onClick:()=>M(e.knownFactID)}),(0,s.jsx)(Wm,{className:"memori-known-facts-modal",open:T===e.knownFactID,closable:!0,title:u("knownFacts.deleteConfirmTitle"),description:u("knownFacts.deleteConfirmMessage"),onClose:()=>{M(void 0)},footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Sf,{ghost:!0,onClick:()=>{M(void 0)},children:u("cancel")}),(0,s.jsx)(Sf,{primary:!0,danger:!0,onClick:async()=>{try{const r=await p(n,e.knownFactID);0===r.resultCode?(t(Ju).success(u("knownFacts.deleteSuccess")),R([]),C(),M(void 0)):(console.error(r),t(Ju).error(u(Gv(r.resultCode),{ns:"common"})))}catch(e){let n=e;t(Ju).error(u("Error")+n.message)}},children:u("confirm")})]})})]})})]},e.knownFactID)))})]})]})]})};var Fj=({open:e=!1,baseUrl:t,apiUrl:n,tenant:r,experts:i,onClose:o})=>{const{t:a}=Se();return(0,s.jsx)(_f,{open:e,onClose:o,className:"memori--experts-drawer",title:(0,s.jsx)("h2",{className:"memori--experts-drawer--title",children:a("widget.expertsInTheBoard")}),children:(0,s.jsx)("ul",{className:"memori--experts-drawer--list",children:i.map((e=>(0,s.jsxs)("li",{className:"memori--experts-drawer--item",children:[(0,s.jsx)("figure",{className:"memori--experts-drawer--avatar",children:(0,s.jsx)("img",{src:`${n}/api/v1/memoriai/memori/avatar/${e.expertMemoriID}`,alt:e.name,onError:e=>{e.currentTarget.src=fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:t}),e.currentTarget.onerror=null}})}),(0,s.jsxs)("div",{className:"memori--experts-drawer--content",children:[(0,s.jsx)("h3",{className:"memori--experts-drawer--name",children:e.name}),(0,s.jsx)("p",{className:"memori--experts-drawer--description",children:e.description})]})]},e.expertID)))})})};c=o("85Hg2"),c=o("85Hg2");const Uj=["memori","private","public","api","404","500","it","en","account","auth","logout","privacy_and_cookie","unauthorized","users","virtual_spaces"];var jj=({tenant:e,apiUrl:n,onLogin:r,goToLogin:i,__TEST__waitingForOtp:o=!1})=>{const{t:a,i18n:l}=Se(),u="it"===l.language?"it":"en",d=Y(n),{userSignUp:h,userConfirmSignUp:p,resendVerificationCode:f}=d.backend,[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(),[b,x]=(0,c.useState)(),[S,w]=(0,c.useState)(),_=!b||b&&$f.test(b),C=_&&b&&b.length>=24,A=!b||0===b.length,E=!_||A?0:b.length<8?15:b.length>=32?100:(b.length-8)*(50/24)+50,[T,M]=(0,c.useState)(!1),[I,R]=(0,c.useState)(!1),[P,k]=(0,c.useState)(o),[O,N]=(0,c.useState)(null),[L,D]=(0,c.useState)();(0,c.useEffect)((()=>{D(window.location.href)}),[]);return P?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async n=>{var i,o,s;n.preventDefault();const l=n.currentTarget,c=null!==(i=l.tenant.value)&&void 0!==i?i:e.id,u=null!==(o=l.userName.value)&&void 0!==o?o:v,d=null!==(s=l.password.value)&&void 0!==s?s:b,h=l.verificationCode.value;M(!0),N(null);try{const{user:e,token:n,...i}=await p({tenant:c,userName:u,password:d,verificationCode:h});0!==i.resultCode?(console.error(i),t(Ju).error(a(Gv(i.resultCode)))):e&&n&&(t(Ju).success(a("success")),r(e,n))}catch(e){let n=e;console.error("[validate otp]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}finally{M(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"userName",value:v}),(0,s.jsx)("input",{type:"hidden",name:"password",value:b}),(0,s.jsx)("input",{type:"hidden",name:"tenant",value:e.id}),(0,s.jsxs)("label",{htmlFor:"#verificationCode",children:[a("login.otpCode"),(0,s.jsx)("input",{id:"verificationCode",name:"verificationCode",type:"text",required:!0,autoComplete:"one-time-code",placeholder:a("login.otpCode")||"OTP"})]}),(0,s.jsx)("p",{children:(0,s.jsx)(Sf,{outlined:!0,onClick:async n=>{if(n.preventDefault(),v){R(!0);try{const n=await f({tenant:null==e?void 0:e.id,userName:v});0===n.resultCode?t(Ju).success(a("resentVerificationCode")):(console.error(n),t(Ju).error(a(Gv(n.resultCode))))}catch(e){let n=e;console.error("[resend otp]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}finally{R(!1)}}},loading:I,children:a("login.resendVerificationCode")})}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:T,children:a("confirm")})]}),O&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:O})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async n=>{var r,i,o,s,l,c,u;n.preventDefault();const d=n.currentTarget,p=null!==(r=d.tenant.value)&&void 0!==r?r:e.id,f=(null!==(i=d.eMail.value)&&void 0!==i?i:m).toLowerCase(),g=null!==(o=d.userName.value)&&void 0!==o?o:v,y=d.password.value,b=new Date(null===(s=d.birthDate)||void 0===s?void 0:s.value).toISOString(),x=null===(l=d.tnCAndPPAccepted)||void 0===l?void 0:l.checked,S=null===(c=d.pAndCUAccepted)||void 0===c?void 0:c.checked,w=null===(u=d.referral)||void 0===u?void 0:u.value;if(!(f&&g&&y&&b&&x))return void N(a("missingData"));M(!0),N(null);if(((new Date).getTime()-new Date(b).getTime())/1e3/60/60/24/365<14)return t(Ju).error(a("login.underage",{age:14})),void N(a("login.underage",{age:14}));try{const{user:e,...n}=await h({tenant:p,eMail:f,userName:g,password:y,birthDate:b,tnCAndPPAccepted:x,tnCAndPPAcceptanceDate:(new Date).toISOString(),pAndCUAccepted:S,pAndCUAcceptanceDate:(new Date).toISOString(),referral:w});0!==n.resultCode?(console.error(n),t(Ju).error(a(Gv(n.resultCode)))):e&&(t(Ju).success(a("success")),k(!0))}catch(e){let n=e;console.error("[signup]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}finally{M(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"tenant",value:e.id}),(0,s.jsx)("input",{type:"hidden",name:"referral",value:L}),(0,s.jsxs)("label",{htmlFor:"#eMail",children:[a("login.email"),(0,s.jsx)("input",{type:"email",name:"eMail",id:"eMail",required:!0,autoComplete:"email",placeholder:a("login.email")||"Email",onChange:e=>g(e.target.value),"aria-invalid":!!(null==m?void 0:m.length)&&!em.test(m)})]}),!!(null==m?void 0:m.length)&&!em.test(m)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.emailFormatError")}),(0,s.jsxs)("label",{htmlFor:"userName",children:[a("login.username"),(0,s.jsx)("input",{type:"text",name:"userName",id:"userName",required:!0,autoComplete:"username",placeholder:a("login.username")||"Username",onFocus:()=>{if(!(null==v?void 0:v.length)&&(null==m?void 0:m.length)){let e=(e=>e.split("@")[0].replace(/[^a-zA-Z0-9]/g,""))(m);const t=document.getElementById("userName");t&&(t.value=e,y(e))}},onChange:e=>y(e.target.value),"aria-invalid":!!(null==v?void 0:v.length)&&(Uj.includes(v.toLowerCase())||!tm.test(v))})]}),!!(null==v?void 0:v.length)&&Uj.includes(v.toLowerCase())&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.usernameContainsReservedWord")}),!!(null==v?void 0:v.length)&&!tm.test(v)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.usernameFormatError")}),(0,s.jsxs)("label",{htmlFor:"#birthDate",children:[a("login.birthDate"),(0,s.jsx)("input",{id:"birthDate",name:"birthDate",type:"date",required:!0,autoComplete:"bday"})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:a("login.birthDateHelper")})}),(0,s.jsxs)("label",{htmlFor:"#password",children:[a("login.password"),(0,s.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"new-password",placeholder:a("login.password")||"Password",onChange:e=>x(e.target.value),"aria-invalid":!_})]}),!_&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[a("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:a("login.confirmPassword")||"Password",onChange:e=>w(e.target.value),"aria-invalid":!!(null==b?void 0:b.length)&&!!(null==S?void 0:S.length)&&b!==S})]}),!!(null==b?void 0:b.length)&&!!(null==S?void 0:S.length)&&b!==S&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:E,id:"password-strength-meter"}),(0,s.jsx)("small",{children:a("login.pwd"+(C?"Strong":_?"Acceptable":"Weak"))}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",required:!0,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[a("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${u}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:a("login.privacyAndCookiePolicy")})," ",a("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${u}/tos`,target:"_blank",rel:"noopener noreferrer",children:a("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[a("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",a("login.optional"),")"]})})]})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:a("login.deepThoughtExplaination")})}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:T,children:a("login.signUp")}),(0,s.jsxs)("p",{className:"memori--login-drawer--signup",children:[a("login.alreadyHaveAnAccount")," ",(0,s.jsx)(Sf,{outlined:!0,onClick:i,children:a("login.backToLogin")})]})]}),O&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:O})]})};c=o("85Hg2");const Hj=["image/jpeg","image/png","image/jpg","image/gif"];var Vj=({user:e,loginToken:n,apiUrl:r,onUserUpdate:i})=>{const{t:o,i18n:a}=Se(),l="it"===a.language?"it":"en",u=Y(r),{updateUser:d,uploadAsset:h}=u.backend,[p,f]=(0,c.useState)(),[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(),b=!m||m&&$f.test(m),x=b&&m&&m.length>=24,S=!m||0===m.length,w=!b||S?0:m.length<8?15:m.length>=32?100:(m.length-8)*(50/24)+50,[_,C]=(0,c.useState)(!1),[A,E]=(0,c.useState)(null),T=async(e,r)=>{try{const{user:s,...a}=await d(n,e,r);0!==a.resultCode?(console.error(a),t(Ju).error(o(Gv(a.resultCode)))):s&&(t(Ju).success(o("success")),i(s))}catch(e){let n=e;console.error("[signup]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}finally{C(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"memori--login-drawer--edit-account-title",children:o("login.editAccount")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form memori--login-drawer--account-form",onSubmit:async r=>{var i,s,a,l,c;if(r.preventDefault(),!e.userID)return;const u=e.userID,d=r.currentTarget,f=null!==(i=d.eMail.value)&&void 0!==i?i:p,g=null!==(s=d.newPassword.value)&&void 0!==s?s:m,v=d.password.value,y=d.confirmPassword.value,b=null===(a=d.pAndCUAccepted)||void 0===a?void 0:a.checked,x=null===(c=null===(l=d.avatar)||void 0===l?void 0:l.files)||void 0===c?void 0:c[0];if(C(!0),E(null),(null==g?void 0:g.length)&&g!==y)return E(o("login.passwordMatchingError")),void C(!1);let S={...(null==f?void 0:f.length)&&f!==e.eMail?{eMail:f}:{},...g?{password:v,newPassword:g}:{},...void 0!==b&&b!==e.pAndCUAccepted?{pAndCUAccepted:b,pAndCUAcceptanceDate:(new Date).toISOString()}:{}};if(0===Object.values(S).length&&!x)return console.debug("No changes to submit"),void C(!1);if(x){const e=new FileReader;e.onload=async e=>{var r,i;try{const{asset:s,...a}=await h(null!==(r=x.name)&&void 0!==r?r:"avatar",null===(i=e.target)||void 0===i?void 0:i.result,n);0!==a.resultCode?(console.error(a),t(Ju).error(o(Gv(a.resultCode)))):s&&(S.avatarURL=s.assetURL,await T(u,S))}catch(e){let n=e;console.error("[avatar upload]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}},e.readAsDataURL(x)}else await T(u,S)},children:[(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.emailChange")}),(0,s.jsxs)("label",{htmlFor:"#eMail",children:[o("login.email"),(0,s.jsx)("input",{type:"email",name:"eMail",id:"eMail",autoComplete:"email",placeholder:e.eMail,onChange:e=>f(e.target.value),"aria-invalid":!!(null==p?void 0:p.length)&&!em.test(p)})]}),!!(null==p?void 0:p.length)&&!em.test(p)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.emailFormatError")})]}),(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.passwordChange")}),(0,s.jsxs)("label",{htmlFor:"#password",children:[o("login.currentPassword"),(0,s.jsx)("input",{id:"password",name:"password",type:"password",autoComplete:"password",placeholder:o("login.currentPassword")||"Password"})]}),(0,s.jsxs)("label",{htmlFor:"#newPassword",children:[o("login.newPassword"),(0,s.jsx)("input",{id:"newPassword",name:"newPassword",type:"password",autoComplete:"new-password",placeholder:o("login.password")||"Password",onChange:e=>g(e.target.value),"aria-invalid":!b})]}),!b&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[o("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",autoComplete:"new-password",placeholder:o("login.confirmPassword")||"Password",onChange:e=>y(e.target.value),"aria-invalid":!!(null==m?void 0:m.length)&&!!(null==v?void 0:v.length)&&m!==v})]}),!!(null==m?void 0:m.length)&&!!(null==v?void 0:v.length)&&m!==v&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:w,id:"password-strength-meter"}),(0,s.jsx)("small",{children:o("login.pwd"+(x?"Strong":b?"Acceptable":"Weak"))})]}),(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.avatarChange")}),(0,s.jsxs)("label",{htmlFor:"#avatar",children:["Avatar",(0,s.jsx)("input",{type:"file",name:"avatar",id:"avatar",accept:Hj.join(", "),placeholder:e.avatarURL})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox memori-checkbox--disabled",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",disabled:!0,defaultChecked:e.tnCAndPPAccepted,checked:e.tnCAndPPAccepted,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[o("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${l}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:o("login.privacyAndCookiePolicy")})," ",o("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${l}/tos`,target:"_blank",rel:"noopener noreferrer",children:o("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",className:"memori-checkbox--input",defaultChecked:e.pAndCUAccepted}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsx)(vv,{align:"left",content:o("login.deepThoughtExplaination"),children:(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[o("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",o("login.optional"),")"]})})]})})]}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:_,children:o("login.save")})]}),A&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:A})]})};var Gj=({open:e=!1,onClose:n,onLogin:r,onLogout:i,user:o,loginToken:a,tenant:l,apiUrl:u,__TEST__signup:d=!1,__TEST__needMissingData:h=!1,__TEST__waitingForOtp:p=!1,__TEST__changePwd:f=!1})=>{var m,g;const{t:v,i18n:y}=Se(),b="it"===y.language?"it":"en",x=Y(u),{userLogin:S,updateUser:w}=x.backend,_=(null==o?void 0:o.userID)&&a,[C,A]=(0,c.useState)(!1),[E,T]=(0,c.useState)(null),[M,I]=(0,c.useState)(d),[R,P]=(0,c.useState)(f?{flowID:"flowID",tenant:l.id,eMail:"email",userName:"username",password:"password"}:void 0),[k,O]=(0,c.useState)(h?{token:"token",birthDate:!0,tnCAndPPAccepted:!0}:{}),[N,L]=(0,c.useState)(),[D,B]=(0,c.useState)(),z=!N||N&&$f.test(N),F=z&&N&&N.length>=24,U=!N||0===N.length,j=!z||U?0:N.length<8?15:N.length>=32?100:(N.length-8)*(50/24)+50;return(0,s.jsx)(_f,{open:e,onClose:n,className:t(ws)("memori--login-drawer",{"memori--login-drawer--logged":_,"memori--login-drawer--signup":M}),title:(0,s.jsx)("span",{className:"memori--login-drawer--title",children:_?v("login.loggedDrawerTitle",{name:o.userName}):v(M?"login.signupDrawerTitle":"login.loginDrawerTitle")}),children:_?(0,s.jsxs)("div",{className:"memori--login-drawer--logged",children:[o.avatarURL&&(0,s.jsx)("figure",{className:"memori--login-drawer--avatar",children:(0,s.jsx)("img",{src:o.avatarURL,alt:o.userName})}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>{i()},children:v("login.logout")}),(0,s.jsx)(Vj,{user:o,loginToken:a,apiUrl:u,onUserUpdate:e=>r(e,a)})]}):(null===(m=null==k?void 0:k.token)||void 0===m?void 0:m.length)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{children:v("login.missingData")}),(0,s.jsx)("p",{children:v("login.missingDataHelper")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async e=>{var n,i,s;e.preventDefault();const a=e.currentTarget,l=null===(n=a.birthDate)||void 0===n?void 0:n.value,c=null===(i=a.tnCAndPPAccepted)||void 0===i?void 0:i.checked,u=null===(s=a.pAndCUAccepted)||void 0===s?void 0:s.checked;if(!(null==o?void 0:o.userID)||!(null==k?void 0:k.token))return;if(!l||!c)return void T(v("missingData"));let d={userID:o.userID,birthDate:(null==o?void 0:o.birthDate)||!k.birthDate?void 0:l,tnCAndPPAccepted:c||(null==o?void 0:o.tnCAndPPAccepted),tnCAndPPAcceptanceDate:c?(new Date).toISOString():void 0,pAndCUAccepted:u||(null==o?void 0:o.pAndCUAccepted),pAndCUAcceptanceDate:u?(new Date).toISOString():void 0};const{user:h,...p}=await w(k.token,o.userID,d);0!==p.resultCode?(console.error(p),t(Ju).error(v(Gv(p.resultCode))),T(p.resultMessage)):(t(Ju).success(v("success")),r(h||d,k.token))},children:[k.birthDate&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{htmlFor:"#birthDate",children:[v("login.birthDate"),(0,s.jsx)("input",{id:"birthDate",name:"birthDate",type:"date",required:!0,autoComplete:"bday"})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.birthDateHelper")})})]}),(null==k?void 0:k.tnCAndPPAccepted)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[v("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${b}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:v("login.privacyAndCookiePolicy")})," ",v("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${b}/tos`,target:"_blank",rel:"noopener noreferrer",children:v("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",defaultChecked:null==o?void 0:o.pAndCUAccepted,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[v("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",v("login.optional"),")"]})})]})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.goToAccountToChangeYourPreferences")})}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.deepThoughtExplaination")})})]}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:C,children:v("login.save")})]})]}):(null==R?void 0:R.flowID)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:v("login.mustChangePassword")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async e=>{var n,i,o,s,a;e.preventDefault();const c=e.currentTarget,u=null!==(n=c.tenant.value)&&void 0!==n?n:l.id,d=null!==(i=c.flowID.value)&&void 0!==i?i:null==R?void 0:R.flowID,h=null!==(o=c.eMail.value)&&void 0!==o?o:null==R?void 0:R.eMail,p=null!==(s=c.userName.value)&&void 0!==s?s:null==R?void 0:R.userName,f=null!==(a=c.password.value)&&void 0!==a?a:null==R?void 0:R.password,m=c.newPassword.value;if(!(null==m?void 0:m.length)||!z)return void T(v("login.passwordFormatError"));A(!0);const g={tenant:u,flowID:d,eMail:h,userName:p,password:f,newPassword:m};try{const{user:e,token:n,...i}=await S(g);0!==i.resultCode?(console.error(i),t(Ju).error(v(Gv(i.resultCode))),T(i.resultMessage)):e&&n&&(t(Ju).success(v("success")),r(e||g,n))}catch(e){let n=e;console.error("[LOGIN/CHANGE PWD]",n),n.message&&(t(Ju).error(n.message),T(n.message))}finally{A(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"tenant",value:null!==(g=R.tenant)&&void 0!==g?g:null==l?void 0:l.id}),(0,s.jsx)("input",{type:"hidden",name:"flowID",value:R.flowID}),(0,s.jsx)("input",{type:"hidden",name:"eMail",value:R.eMail}),(0,s.jsx)("input",{type:"hidden",name:"userName",value:R.userName}),(0,s.jsx)("input",{type:"hidden",name:"password",value:R.password}),(0,s.jsxs)("label",{htmlFor:"#newPassword",children:[v("login.password"),(0,s.jsx)("input",{id:"newPassword",name:"newPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:v("login.password")||"Password",onChange:e=>L(e.target.value),"aria-invalid":!z})]}),!z&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:v("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[v("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:v("login.confirmPassword")||"Password",onChange:e=>B(e.target.value),"aria-invalid":!!(null==N?void 0:N.length)&&!!(null==D?void 0:D.length)&&N!==D})]}),!!(null==N?void 0:N.length)&&!!(null==D?void 0:D.length)&&N!==D&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:v("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:j,id:"password-strength-meter"}),(0,s.jsx)("small",{children:v("login.pwd"+(F?"Strong":z?"Acceptable":"Weak"))}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:C,children:v("confirm")})]})]}):M?(0,s.jsx)(jj,{tenant:l,apiUrl:u,onLogin:r,goToLogin:()=>I(!1),__TEST__waitingForOtp:p}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:e=>{e.preventDefault();const n=e.currentTarget,i=n.userNameOrEmail.value,o=n.password.value,s=em.test(i),a=s?{tenant:null==l?void 0:l.id,eMail:i,password:o}:{tenant:null==l?void 0:l.id,userName:i,password:o};A(!0),T(null),S(a).then((e=>{var n,a,c,u,d;-14===e.resultCode?P({tenant:l.id,eMail:s?i:void 0,userName:s?void 0:i,password:o,flowID:e.flowID||(null===(n=e.user)||void 0===n?void 0:n.flowID)}):0!==e.resultCode?(console.error(e),t(Ju).error(v(Gv(e.resultCode))),T(e.resultMessage)):e.user&&e.token&&((null===(a=e.user)||void 0===a?void 0:a.tnCAndPPAccepted)&&(null===(c=e.user)||void 0===c?void 0:c.birthDate)?r(e.user,e.token):O({token:e.token,birthDate:!(null===(u=e.user)||void 0===u?void 0:u.birthDate),tnCAndPPAccepted:!(null===(d=e.user)||void 0===d?void 0:d.tnCAndPPAccepted)}))})).catch((e=>{console.error("[LOGIN]",e),e.message&&(t(Ju).error(e.message),T(e.message))})).finally((()=>{A(!1)}))},children:[(0,s.jsxs)("label",{htmlFor:"#userNameOrEmail",children:[v("login.userNameOrEmail"),(0,s.jsx)("input",{id:"userNameOrEmail",name:"userNameOrEmail",required:!0,autoComplete:"email",placeholder:"Username/email"})]}),(0,s.jsxs)("label",{htmlFor:"#password",children:["Password",(0,s.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"password",placeholder:"Password"})]}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:C,children:v("login.login")}),(null==l?void 0:l.disableRegistration)?l.adminEmail?(0,s.jsxs)("div",{className:"memori--login-drawer--signup",children:[(0,s.jsx)("p",{children:v("login.registrationDisabled")}),(0,s.jsxs)("p",{children:[v("login.contactAdmin"),":"," ",(0,s.jsx)("a",{href:`mailto:${l.adminEmail}`,children:l.adminEmail})]})]}):null:(0,s.jsxs)("p",{className:"memori--login-drawer--signup",children:[v("login.newUserSignUp")," ",(0,s.jsx)(Sf,{outlined:!0,onClick:()=>I(!0),children:v("login.signUp")})]})]}),E&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:E})]})})};var Wj=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:c,integrationBackground:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>(0,s.jsxs)(s.Fragment,{children:[c,u,(0,s.jsxs)(xf,{spinning:g,children:[m&&d&&h&&(0,s.jsx)(d,{...h}),e&&t&&(0,s.jsx)(e,{...t}),(0,s.jsxs)("div",{className:"memori--grid",children:[(0,s.jsxs)("div",{className:"memori--grid-column memori--grid-column-left",children:[n&&r&&(0,s.jsx)(n,{...r}),(0,s.jsx)("div",{id:"extension"})]}),(0,s.jsx)("div",{className:"memori--grid-column memori--grid-column-right",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null}),v]})]})]});var qj=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:c,integrationBackground:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>(0,s.jsxs)(s.Fragment,{children:[c,u,(0,s.jsxs)(xf,{spinning:g,className:"memori-totem-layout",children:[v,m&&d&&h&&(0,s.jsx)(d,{...h}),(0,s.jsx)("div",{className:"memori-totem-layout--header",children:e&&t&&(0,s.jsx)(e,{...t})}),(0,s.jsx)("div",{className:"memori-totem-layout--avatar",children:n&&r&&(0,s.jsx)(n,{...r})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-totem-layout--controls",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null})]})]});var Kj=({Header:e,headerProps:t,Chat:n,chatProps:r,StartPanel:i,startPanelProps:o,integrationStyle:a,integrationBackground:l,ChangeMode:c,changeModeProps:u,sessionId:d,hasUserActivatedSpeak:h,showInstruct:p=!1,loading:f=!1,poweredBy:m})=>(0,s.jsxs)(s.Fragment,{children:[a,l,(0,s.jsxs)(xf,{spinning:f,className:"memori-chat-layout",children:[m,p&&c&&u&&(0,s.jsx)(c,{...u}),(0,s.jsx)("div",{className:"memori-chat-layout--header",children:e&&t&&(0,s.jsx)(e,{...t})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-chat-layout--controls",children:d&&h&&n&&r?(0,s.jsx)(n,{...r}):o?(0,s.jsx)(i,{...o}):null})]})]});c=o("85Hg2"),c=o("85Hg2");var Jj=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>{var y,b;const{t:x}=Se(),[S,w]=(0,c.useState)(!0),[_,C]=(0,c.useState)(),A=(0,c.useMemo)((()=>null==o?void 0:o.stopAudio),[null==o?void 0:o.stopAudio]),E=e=>{w(e),C(e?void 0:(new Date).toISOString());try{null==A||A()}catch(e){console.log(e)}};return(0,s.jsx)("div",{className:"memori-website_assistant--"+(S?"collapsed":"expanded"),children:S?(0,s.jsx)("div",{className:"memori-website_assistant--trigger",children:(0,s.jsx)(Sf,{className:"memori-website_assistant--trigger-button",ghost:!0,shape:"circle",onClick:()=>E(!1),title:x("expand")||"Expand",children:(0,s.jsx)(JF,{avatar:null==r?void 0:r.memori.avatarURL})})}):(0,s.jsxs)(s.Fragment,{children:[u,(0,s.jsxs)(xf,{spinning:g,className:"memori-website_assistant-layout",children:[v,(0,s.jsx)("div",{className:"memori-website_assistant--close-button-wrapper",children:(0,s.jsx)(Sf,{className:"memori-website_assistant--close-button",primary:!0,shape:"circle",onClick:()=>E(!0),icon:(0,s.jsx)(wf,{}),title:x("close")||"Close"})}),m&&d&&h&&(0,s.jsx)(d,{...h}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--header",children:e&&t&&(0,s.jsx)(e,{...t,showSettings:!1,showReload:!1})}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--avatar",children:n&&r&&(0,c.createElement)(n,{...r,integrationConfig:r.integrationConfig?{...r.integrationConfig,avatarURL:(null===(y=r.integrationConfig)||void 0===y?void 0:y.avatarURL)?`${null===(b=r.integrationConfig)||void 0===b?void 0:b.avatarURL.split("#")[0]}#${_}`:void 0}:{},key:_})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--controls",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null})]})]})})};const{deleteSession:Qj,getStatistics:Yj,initSession:Zj}=Y(),Xj=new Map([[0,"🆕"],[10,"🐹"],[20,"🐇"],[30,"🐰"],[40,"💡"],[50,"🏆"],[60,"🏅"],[70,"🥉"],[80,"🥈"],[90,"🥇"],[100,"🔥"],[110,"🎓"],[120,"🤖"],[130,"👾"],[150,"🌍"],[180,"💜"],[200,"💙"],[250,"🧡"],[300,"💚"],[350,"💛"],[400,"💖"],[450,"💝"],[500,"🖤"],[550,"❤️"],[600,"🧠"]]),$j=e=>{const t=Array.from(Xj.keys()).filter((t=>t<=e));if(t.length>0){const e=t[t.length-1];return Xj.get(e)}return""},eH=e=>{if("🆕"===e)return{points:10,badge:"🐹"};let t,n,r=!1;for(const[i,o]of Xj){if(r){t=i,n=o;break}o===e&&(r=!0)}return n&&t?{points:t,badge:n}:void 0},tH=e=>{let t=0;for(const[n,r]of Xj)if(r===e){t=n;break}return t},nH=e=>{const t=Math.round(e),n=$j(t);return{points:t,badge:n,pointsForCurrentBadge:tH(n),nextBadge:eH(n)}},rH=async({operation:e="session_creation",baseUrl:t,userID:n,userName:r,tenant:i})=>{if(!n&&!r)throw new Error("Either userID or userName must be provided");const o=await fetch(`${t}/api/verify-tokens`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:e,userID:n,userName:r,tenant:i})});if(!o.ok)throw new Error("Failed to fetch credits");return o.json()},iH=(e,t=!0,n=!1,r,i=!1,o=!1)=>{const s=new CustomEvent("MemoriTextEntered",{detail:{text:e,waitForPrevious:t,hidden:n,typingText:r,useLoaderTextAsMsg:i,hasBatchQueued:o}});document.dispatchEvent(s);window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&setTimeout((()=>{document.dispatchEvent(new CustomEvent("MemoriEndSpeak"))}),300)};let oH,sH,aH,lH,cH,uH;window.getMemoriState=e=>{var t,n,r,i,o;let s=e?document.querySelector(`.memori-widget[data-memori-integration="${e}"]`)||(null===(n=null===(t=document.querySelector("memori-client"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector(".memori-widget[data-memori-integration]")):document.querySelector(".memori-widget")||(null===(i=null===(r=document.querySelector("memori-client"))||void 0===r?void 0:r.shadowRoot)||void 0===i?void 0:i.querySelector(".memori-widget"));if(!s)return null;let a=null===(o=s.dataset)||void 0===o?void 0:o.memoriEngineState;return a?JSON.parse(a):null},window.typeMessage=iH,window.typeMessageHidden=(e,t=!0,n,r=!1,i=!1)=>iH(e,t,!0,n,r,i),window.typeBatchMessages=e=>{function t(){var e,t,n,r;null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e||e.setAttribute("disabled","");const i="opacity: 0.5; touch-action: none; pointer-events: none;";null===(t=document.querySelector("textarea.memori-chat-textarea--input"))||void 0===t||t.setAttribute("style",i),null===(n=document.querySelector("button.memori-chat-inputs--send"))||void 0===n||n.setAttribute("style",i),null===(r=document.querySelector("button.memori-chat-inputs--mic"))||void 0===r||r.setAttribute("style",i)}function n(){var e,t,n,r;null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e||e.removeAttribute("disabled"),null===(t=document.querySelector("textarea.memori-chat-textarea--input"))||void 0===t||t.removeAttribute("style"),null===(n=document.querySelector("button.memori-chat-inputs--send"))||void 0===n||n.removeAttribute("style"),null===(r=document.querySelector("button.memori-chat-inputs--mic"))||void 0===r||r.removeAttribute("style")}function r(){var e;return!!(null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e?void 0:e.hasAttribute("disabled"))}const i=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&/iPad|iPhone|iPod/.test(navigator.userAgent),o=function*(){yield*e}();t();const s=()=>{const e=o.next(),a=e.value;if(a){r()||t();let o=a.waitForPrevious;i&&(o=!1),iH(a.message,o,a.hidden,a.typingText,a.useLoaderTextAsMsg,!e.done),i&&setTimeout((()=>{document.dispatchEvent(new CustomEvent("MemoriEndSpeak")),n()}),3e3)}else r()&&n();if(e.done)return document.removeEventListener("MemoriEndSpeak",s),void(r()&&n())};document.addEventListener("MemoriEndSpeak",s),s()};let dH,hH=!1,pH=!1;var fH=({memori:e,memoriConfigs:n,ownerUserID:r,ownerUserName:i,tenantID:o,memoriLang:a,multilingual:l,integration:u,layout:d="DEFAULT",customLayout:h,showInstruct:p=!1,showShare:f,preview:m=!1,embed:g=!1,showInputs:v=!0,showDates:y=!1,showContextPerLine:b=!1,showSettings:x=!0,showTypingText:S=!1,showClear:w=!1,showLogin:_=!1,showOnlyLastMessages:C,height:A="100vh",secret:E,baseUrl:T="https://aisuru.com",apiUrl:M="https://backend.memori.ai",initialContextVars:I,initialQuestion:R,ogImage:P,sessionID:k,tenant:O,personification:N,authToken:L,AZURE_COGNITIVE_SERVICES_TTS_KEY:D,defaultSpeakerActive:B=!0,onStateChange:z,additionalInfo:F,additionalSettings:U,customMediaRenderer:j,userAvatar:H})=>{var V,G,W,q,K,J,Q,Z,X,$,ee,te,ne,re,ie,oe,se,ae,le,ce,ue,de,he,pe;const{t:fe,i18n:me}=Se(),[ge,ve]=(0,c.useState)(!1);(0,c.useEffect)((()=>{ve(!0)}),[]);const ye=Y(M),{initSession:be,postTextEnteredEvent:xe,postPlaceChangedEvent:we,postDateChangedEvent:_e,postTimeoutEvent:Ce,postTagChangedEvent:Ae,getSession:Ee,getContentQualityIndexes:Te,getExpertReferences:Me}=ye,[Ie,Re]=(0,c.useState)(!1),[Pe,ke]=(0,c.useState)(null!==(V=null==F?void 0:F.loginToken)&&void 0!==V?V:L),[Oe,Ne]=(0,c.useState)({avatarURL:"string"==typeof H?H:void 0});(0,c.useEffect)((()=>{Pe&&!(null==Oe?void 0:Oe.userID)&&_&&ye.backend.getCurrentUser(Pe).then((({user:e,resultCode:t})=>{e&&0===t?(Ne(e),Pj("loginToken",Pe)):kj("loginToken")}))}),[Pe,null==Oe?void 0:Oe.userID]);const[Le,De]=(0,c.useState)(!1),[Be,ze]=(0,c.useState)(!1),[Fe,Ue]=(0,c.useState)(!1),je=(null===(q=null===(W=null===(G=e.culture)||void 0===G?void 0:G.split("-"))||void 0===W?void 0:W[0])||void 0===q?void 0:q.toUpperCase())||(null===(Z=null===(Q=null===(J=null===(K=null==n?void 0:n.find((t=>t.memoriConfigID===e.memoriConfigurationID)))||void 0===K?void 0:K.culture)||void 0===J?void 0:J.split("-"))||void 0===Q?void 0:Q[0])||void 0===Z?void 0:Z.toUpperCase()),He=(null==u?void 0:u.customData)?JSON.parse(u.customData):null,Ve=void 0!==l?l:!!(null==He?void 0:He.multilanguage),Ge=null==He?void 0:He.forcedTimeout,[We,qe]=(0,c.useState)(null!==(te=null!==(ee=null!==($=null!==(X=null!=a?a:null==He?void 0:He.lang)&&void 0!==X?X:je)&&void 0!==$?$:null==He?void 0:He.uiLang)&&void 0!==ee?ee:me.language)&&void 0!==te?te:"IT"),[Ke,Je]=(0,c.useState)(!1),[Qe,Ye]=(0,c.useState)(!1),[Ze,Xe]=(0,c.useState)(),$e=d||(null==He?void 0:He.layout)||"DEFAULT",[et,tt]=(0,c.useState)(!1),[nt,rt]=(0,c.useState)(!1),[it,ot]=(0,c.useState)(!1),[st,at]=(0,c.useState)(!1),[lt,ct]=(0,c.useState)(!1),[ut,dt]=(0,c.useState)(!1),[ht,pt]=(0,c.useState)(!B),[ft,mt]=(0,c.useState)(!1),[gt,vt]=(0,c.useState)(2),[yt,bt]=(0,c.useState)(!1),[xt,St]=(0,c.useState)("center"),[wt,_t]=(0,c.useState)(!1);(0,c.useEffect)((()=>{bt(!!aH),pH=!!aH}),[aH]),(0,c.useEffect)((()=>{let e="bottom",t=Rj("microphoneMode","HOLD_TO_TALK");window.innerWidth<=768?(e="bottom",t="HOLD_TO_TALK"):e=window.matchMedia("(orientation: portrait)").matches||window.innerHeight>window.innerWidth?"center":"bottom",pt(Rj("muteSpeaker",!B)),hH=Rj("muteSpeaker",!B),mt("CONTINUOUS"===t),vt(Rj("continuousSpeechTimeout",2)),St(Rj("controlsPosition",e)),_t(Rj("hideEmissions",!1)),(null==F?void 0:F.loginToken)||L||(ke(Rj("loginToken",void 0)),dH=Rj("loginToken",void 0))}),[]);const[Ct,At]=(0,c.useState)(E),[Et,Tt]=(0,c.useState)(),[Mt,It]=(0,c.useState)(null),[Rt,Pt]=(0,c.useState)(),kt=async(e,t)=>{var n;const r=null!=t?t:Kt;if(e&&r){const{currentState:t,...i}=await we({sessionId:r,placeName:e.placeName,latitude:e.latitude,longitude:e.longitude,uncertaintyKm:null!==(n=e.uncertainty)&&void 0!==n?n:0});t&&0===i.resultCode&&Yt((e=>{var n;return{...e,...t,hints:(null===(n=t.hints)||void 0===n?void 0:n.length)?t.hints:null==e?void 0:e.hints}}))}};(0,c.useEffect)((()=>{const e=Rj("position",void 0);e&&Pt(e)}),[]);const[Ot,Nt]=(0,c.useState)(""),[Lt,Dt]=(0,c.useState)(!1),[Bt,zt]=(0,c.useState)([]),Ft=e=>{zt((t=>{var n,r;return[...t,{...e,media:null!==(r=null===(n=e.media)||void 0===n?void 0:n.filter((e=>{var t;return!("text/javascript"===e.mimeType&&(null===(t=e.properties)||void 0===t?void 0:t.executable))})))&&void 0!==r?r:[]}]}))},Ut=async(n,r,i,o=!0,s,a=!1,l,c=!1,u=!1)=>{var d,h,p,f;const m=i||Kt||(null===(d=window.getMemoriState())||void 0===d?void 0:d.sessionID);if(!m||!(null==n?void 0:n.length))return;a||Ft({text:n,translatedText:s,fromUser:!0,media:null!=r?r:[],initial:Kt?!!i&&i!==Kt:!!i}),Ye(!0),Xe(l);let g=n,v=!1;if(o&&!Ie&&Ve&&We.toUpperCase()!==je.toUpperCase()){g=(await px(n,je,We,T)).text}const{currentState:y,...b}=await xe({sessionId:m,text:g});if(0===b.resultCode&&y){const n=c&&l?l:null!==(h=y.emission)&&void 0!==h?h:null==Qt?void 0:Qt.emission;if("X4"===y.state&&e.giverTag){const{currentState:r,...i}=await Ae(m,e.giverTag);0===i.resultCode?(Zt(r),n&&(Ft({text:n,emitter:r.emitter,media:r.media,fromUser:!1,questionAnswered:g,contextVars:r.contextVars,date:r.currentDate,placeName:r.currentPlaceName,placeLatitude:r.currentLatitude,placeLongitude:r.currentLongitude,placeUncertaintyKm:r.currentUncertaintyKm,tag:r.currentTag,memoryTags:r.memoryTags}),mn(n))):(console.error(b,i),t(Ju).error(fe(Gv(i.resultCode))),v=!0)}else if("X2d"===y.state&&e.giverTag){const{currentState:r,...i}=await xe({sessionId:m,text:Math.random().toString().substring(2,8)});if(0===i.resultCode){const{currentState:r,...i}=await Ae(m,e.giverTag);0===i.resultCode?(Zt(r),n&&(Ft({text:n,emitter:r.emitter,media:r.media,fromUser:!1,questionAnswered:g,contextVars:r.contextVars,date:r.currentDate,placeName:r.currentPlaceName,placeLatitude:r.currentLatitude,placeLongitude:r.currentLongitude,placeUncertaintyKm:r.currentUncertaintyKm,tag:r.currentTag,memoryTags:r.memoryTags}),mn(n))):(console.error(b,i),t(Ju).error(fe(Gv(i.resultCode))),v=!0)}else console.error(b,i),t(Ju).error(fe(Gv(i.resultCode))),v=!0}else We.toLowerCase()!==je.toLowerCase()&&n&&!Ie&&Ve?jt(y,We,g).then((e=>{e.emission&&mn(e.emission)})):(Zt({...y,emission:n}),n&&(Ft({text:n,emitter:y.emitter,media:y.media,fromUser:!1,questionAnswered:g,generatedByAI:!!y.completion,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}),mn(n)))}else 404===b.resultCode&&(zt((e=>[...e.slice(0,e.length-1)])),$t(!1,Ct||e.secretToken,Et,Ie&&e.giverTag?e.giverTag:void 0,Ie&&e.giverPIN?e.giverPIN:void 0,{PATHNAME:window.location.pathname,ROUTE:(null===(f=null===(p=window.location.pathname)||void 0===p?void 0:p.split("/"))||void 0===f?void 0:f.pop())||"",...I||{}},R).then((e=>{console.info("session timeout"),(null==e?void 0:e.sessionID)&&setTimeout((()=>{Ut(n,r,null==e?void 0:e.sessionID)}),500)})));u||(Xe(void 0),Ye(!1))},jt=async(e,t,n)=>{var r,i,o;const s=null!==(r=e.emission)&&void 0!==r?r:null==Qt?void 0:Qt.emission;let a={...e},l=null;if(s&&!Ie&&je.toUpperCase()!==t.toUpperCase()&&Ve){const r=await px(s,t,je,T);if(e.hints&&e.hints.length>0){const n=await Promise.all((null!==(i=e.hints)&&void 0!==i?i:[]).map((async e=>{var n;const r=await px(e,t,je,T);return{text:null!==(n=null==r?void 0:r.text)&&void 0!==n?n:e,originalText:e}})));a={...e,emission:r.text,translatedHints:n}}else a={...e,emission:r.text,hints:null!==(o=e.hints)&&void 0!==o?o:"G1"===e.state?null==Qt?void 0:Qt.hints:[]};r.text.length>0&&(l={text:r.text,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,generatedByAI:!!e.completion,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags})}else a={...e,emission:s},s&&(l={text:s,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags});return Zt(a),l&&Ft(l),a},Ht=void 0!==e.ageRestriction?e.ageRestriction:e.nsfw?18:e.enableCompletions?14:0,[Vt,Gt]=(0,c.useState)(),[Wt,qt]=(0,c.useState)(!1),[Kt,Jt]=(0,c.useState)(k),[Qt,Yt]=(0,c.useState)(),Zt=e=>{var t;Yt(e),z&&z(e);const n=null===(t=null==e?void 0:e.media)||void 0===t?void 0:t.filter((e=>{var t;return"text/javascript"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)}));null==n||n.forEach((e=>{try{setTimeout((()=>{var t;console.log("snippet",e),new Function(null!==(t=e.content)&&void 0!==t?t:"")(),setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),400)}),1e3)}catch(e){console.error(e)}}))},Xt=async n=>{var r,i,o,s,a;let l=Rj("birthDate",void 0);if(Vt||l||!Ht)if("PUBLIC"===e.privacyType||e.secretToken||Ct||Et){Je(!0);try{if(!e.giverTag&&(null===(r=e.receivedInvitations)||void 0===r?void 0:r.length)){let t=e.receivedInvitations.find((e=>"GIVER"===e.type&&"ACCEPTED"===e.state));t&&(e.giverTag=t.tag,e.giverPIN=t.pin)}let l;try{l=window.location.href}catch(e){console.error(e)}const c=await be({...n,tag:null!==(i=n.tag)&&void 0!==i?i:null==N?void 0:N.tag,pin:null!==(o=n.pin)&&void 0!==o?o:null==N?void 0:N.pin,additionalInfo:{...F||{},loginToken:null!==(a=null!==(s=null!=dH?dH:Pe)&&void 0!==s?s:null==F?void 0:F.loginToken)&&void 0!==a?a:L,language:dn(We),referral:l}});if((null==c?void 0:c.sessionID)&&(null==c?void 0:c.currentState)&&0===c.resultCode)return Jt(c.sessionID),Rt&&kt(Rt,c.sessionID),Je(!1),{dialogState:c.currentState,sessionID:c.sessionID};(null==c?void 0:c.resultMessage.startsWith("This Memori is aged restricted"))?(console.error(c),t(Ju).error(fe("underageTwinSession",{age:Ht})),Ue(!0)):403===(null==c?void 0:c.resultCode)?(At(void 0),It("password")):(console.error(c),t(Ju).error(fe(Gv(null==c?void 0:c.resultCode))),Ue(!0))}catch(e){console.error(e),new Error("Error fetching session")}}else It("password");else qt(!0)},$t=async(n=!1,r,i,o,s,a,l,c)=>{var u,d,h,p,f;Je(!0);try{let m,g=Rj("birthDate",void 0);if(!c&&!g&&Ht)return void qt(!0);if(!("PUBLIC"===e.privacyType||r||e.secretToken||Ct||i||Et))return void It("password");try{m=window.location.href}catch(e){console.error(e)}const{sessionID:v,currentState:y,...b}=await be({memoriID:null!==(u=e.engineMemoriID)&&void 0!==u?u:"",password:r||Ct||e.secretToken,recoveryTokens:i||Et,tag:o,pin:s,initialContextVars:{PATHNAME:window.location.pathname,ROUTE:(null===(h=null===(d=window.location.pathname)||void 0===d?void 0:d.split("/"))||void 0===h?void 0:h.pop())||"",...a||{}},initialQuestion:l,birthDate:c||g||void 0,additionalInfo:{...F||{},loginToken:null!==(f=null!==(p=null!=dH?dH:Pe)&&void 0!==p?p:null==F?void 0:F.loginToken)&&void 0!==f?f:L,language:dn(We),referral:m}});if(v&&y&&0===b.resultCode)return Jt(v),n&&(Zt(y),y.emission&&(Bt.length<=1?zt([{text:y.emission,emitter:y.emitter,media:y.media,fromUser:!1,initial:!0,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}]):Ft({text:y.emission,emitter:y.emitter,media:y.media,fromUser:!1,initial:!0,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}))),Rt&&kt(Rt,v),e.needsDateTime&&tn({sessionID:v,state:y}),Je(!1),{dialogState:y,sessionID:v};(null==b?void 0:b.resultMessage.startsWith("This Memori is aged restricted"))?(console.error(b),t(Ju).error(fe("underageTwinSession",{age:Ht})),Ue(!0)):403===(null==b?void 0:b.resultCode)?(At(void 0),It("password")):(console.error(b),t(Ju).error(fe(Gv(b.resultCode))),Ue(!0))}catch(e){console.error(e)}return Je(!1),null},en=async(t,n,r,i)=>{var o,s,a,l,c;if(!t||!n)return console.error("CHANGETAG/Session not found"),Promise.reject("Session not found");try{const{currentState:t,resultCode:u}=await Ae(n,null!=r?r:Kv);if(0===u){let d=0;if(r!==Kv&&i&&("X1a"===t.state||"X1b"===t.state)){const{resultCode:e}=await xe({sessionId:n,text:null!=i?i:""});d=e}if(0===d){const{currentState:e,...t}=await Ee(n);if(0===t.resultCode&&e)return{currentState:e,sessionId:n,...t}}else if([400,401,403,404,500].includes(u)){console.warn("[APPCONTEXT/CHANGETAG]",u);let t,n=Rj("birthDate",void 0);try{t=window.location.href}catch(e){console.error(e)}Xt({memoriID:null!==(o=e.engineMemoriID)&&void 0!==o?o:"",password:E||Ct||e.secretToken,tag:e.giverTag,pin:e.giverPIN,initialContextVars:{PATHNAME:window.location.pathname,ROUTE:(null===(a=null===(s=window.location.pathname)||void 0===s?void 0:s.split("/"))||void 0===a?void 0:a.pop())||"",...I||{}},initialQuestion:R,birthDate:Vt||n||void 0,additionalInfo:{...F||{},loginToken:null!==(c=null!==(l=null!=dH?dH:Pe)&&void 0!==l?l:null==F?void 0:F.loginToken)&&void 0!==c?c:L,language:dn(We),referral:t}})}else if(t)return{currentState:t,sessionId:n,resultCode:u}}}catch(e){let t=e;return console.error("[APPCONTEXT/CHANGETAG]",t),Promise.reject(t)}return null};(0,c.useEffect)((()=>()=>{Qt&&(null==Qt?void 0:Qt.currentTag)===e.giverTag||(async()=>{Kt&&e.giverTag&&e.giverPIN&&(zt([]),await en(e.engineMemoriID,Kt,e.giverTag,e.giverPIN))})()}),[]);const tn=(0,c.useCallback)((async({sessionID:t,date:n,state:r})=>{var i;const o=null!=t?t:Kt,s=null!=r?r:Qt;if(!o||!e.needsDateTime||(null===(i=null==s?void 0:s.hints)||void 0===i?void 0:i.length))return;const a=(n?_s.DateTime.fromISO(n):_s.DateTime.now()).toUTC().toFormat("yyyy/MM/dd HH:mm:ss ZZ").split(":").slice(0,-1).join(":"),{currentState:l,...c}=await _e(o,a);0===c.resultCode&&l&&Yt((e=>{var t;return{...e,...l,hints:(null===(t=l.hints)||void 0===t?void 0:t.length)?l.hints:null==e?void 0:e.hints}}))}),[Qt,e.needsDateTime,Kt]);(0,c.useEffect)((()=>{if(Kt&&e.needsDateTime){tn({sessionID:Kt,state:Qt});let e=setInterval((()=>{tn({sessionID:Kt})}),6e4);return()=>{clearInterval(e)}}}),[e.needsDateTime,Kt]);const[nn,rn]=(0,c.useState)(),on=(0,c.useRef)(),sn=()=>{nn&&(clearTimeout(nn),rn(void 0)),(null==on?void 0:on.current)&&(clearTimeout(on.current),on.current=void 0)},an=()=>{sn(),yt||Ot.length||Qe||Lt||cn()},ln=async()=>{var e;if(!et||yt||Ot.length||Qe||Lt)an();else if(Kt&&et&&(null==Qt?void 0:Qt.acceptsTimeout)){const{currentState:t,...n}=await Ce(Kt);if(0===n.resultCode&&t){const n=t.emission;if(!Ie&&Ve&&We!==(null==me?void 0:me.language)&&n&&n.length>0)jt({...t,emission:n},We).then((e=>{e.emission&&mn(e.emission)}));else{if(!(n&&n.length>0))return void an();Ft({text:n,emitter:t.emitter,media:t.media,fromUser:!1,generatedByAI:!!t.completion,contextVars:t.contextVars,date:t.currentDate,placeName:t.currentPlaceName,placeLatitude:t.currentLatitude,placeLongitude:t.currentLongitude,placeUncertaintyKm:t.currentUncertaintyKm,tag:t.currentTag,memoryTags:t.memoryTags}),mn(n),Zt({...t,hints:null!==(e=t.hints)&&void 0!==e?e:"G1"===t.state?null==Qt?void 0:Qt.hints:[]})}}}},cn=()=>{let e=null==Qt?void 0:Qt.timeout;if(!e){let t=40,n=25;if(e=Math.floor(Math.random()*(t-n))+n,null==Qt?void 0:Qt.emission){e+=Qt.emission.length/26.5}}if(Ge&&(e=Ge,null==Qt?void 0:Qt.emission)){e+=Qt.emission.length/26.5}let t=setTimeout(ln,1e3*e);rn(t),on.current=t};(0,c.useEffect)((()=>{(Ot.length||yt||Qe)&&sn(),Kt&&!Ot.length&&an()}),[null==Qt?void 0:Qt.acceptsTimeout,null==Qt?void 0:Qt.timeout,null==Qt?void 0:Qt.state,yt,Kt,Bt,Ot,Qe,et]),(0,c.useEffect)((()=>()=>{tt(!1),ze(!1),sn(),on.current=void 0}),[]);const un=(0,c.useCallback)((t=>{var n,r,i,o;let s="",a=(null!==(o=null!==(i=null!=t?t:null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])&&void 0!==i?i:me.language)&&void 0!==o?o:"IT").toUpperCase(),l=e.voiceType;if(e.enableBoardOfExperts&&(null==Qt?void 0:Qt.emitter)){null==Kn||Kn.find((e=>e.name===(null==Qt?void 0:Qt.emitter)))}switch(a){case"IT":s=""+("MALE"===l?"it-IT-DiegoNeural":"it-IT-ElsaNeural");break;case"DE":s=""+("MALE"===l?"de-DE-ConradNeural":"de-DE-KatjaNeural");break;case"EN":s=""+("MALE"===l?"en-GB-RyanNeural":"en-GB-SoniaNeural");break;case"ES":s=""+("MALE"===l?"es-ES-AlvaroNeural":"es-ES-ElviraNeural");break;case"FR":s=""+("MALE"===l?"fr-FR-HenriNeural":"fr-FR-DeniseNeural");break;case"PT":s=""+("MALE"===l?"pt-PT-DuarteNeural":"pt-PT-RaquelNeural");break;case"UK":s=""+("MALE"===l?"uk-UA-OstapNeural":"uk-UA-PolinaNeural");break;case"RU":s=""+("MALE"===l?"ru-RU-DmitryNeural":"ru-RU-SvetlanaNeural");break;case"PL":s=""+("MALE"===l?"pl-PL-MarekNeural":"pl-PL-AgnieszkaNeural");break;case"FI":s=""+("MALE"===l?"fi-FI-HarriNeural":"fi-FI-SelmaNeural");break;case"EL":s=""+("MALE"===l?"el-GR-NestorasNeural":"el-GR-AthinaNeural");break;case"AR":s=""+("MALE"===l?"ar-SA-HamedNeural":"ar-SA-ZariyahNeural");break;case"ZH":s=""+("MALE"===l?"zh-CN-YunxiNeural":"zh-CN-XiaoxiaoNeural");break;case"JA":s=""+("MALE"===l?"ja-JP-KeitaNeural":"ja-JP-NanamiNeural");break;default:s=""+("MALE"===l?"it-IT-DiegoNeural":"it-IT-IsabellaNeural")}return s}),[e.voiceType,e.enableBoardOfExperts,null==Qt?void 0:Qt.emitter,me.language,e.culture]),dn=t=>{var n,r;let i="";switch((t||(null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])||me.language||"IT").toUpperCase()){case"IT":default:i="it-IT";break;case"DE":i="de-DE";break;case"EN":i="en-GB";break;case"ES":i="es-ES";break;case"FR":i="fr-FR";break;case"PT":i="pt-PT";break;case"UK":i="uk-UK";break;case"RU":i="ru-RU";break;case"PL":i="pl-PL";break;case"FI":i="fi-FI";break;case"EL":i="el-GR";break;case"AR":i="ar-SA";break;case"ZH":i="zh-CN";break;case"JA":i="ja-JP"}return i},[hn,pn]=(0,c.useState)();(0,c.useEffect)((()=>{(async()=>{try{const e=await fetch(`${T||"https://aisuru.com"}/api/lexiconmap`);return await e.json()}catch(e){console.error(e)}})().then((e=>{pn(e)}))}),[]);const fn=()=>{const e=new CustomEvent("MemoriEndSpeak");document.dispatchEvent(e)},mn=e=>{if(!D||m)return void fn();if(An(),m)return;if(ht||hH)return pH=!1,Ye(!1),fn(),void(ft&&wn());lH&&lH.pause();let t=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"),n=/iPad|iPhone|iPod/.test(navigator.userAgent);if("interrupted"===cH.state)return void cH.resume().then((()=>mn(e)));if("closed"===cH.state){cH=new Qo;let e=cH.createBuffer(1,1e4,22050),t=cH.createBufferSource();t.buffer=e,t.connect(cH.destination)}else if("suspended"===cH.state){gn(),cH=new Qo;let e=cH.createBuffer(1,1e4,22050),t=cH.createBufferSource();t.buffer=e,t.connect(cH.destination)}if(!aH){n||(lH=new bs.SpeakerAudioDestination);let e=bs.AudioConfig.fromSpeakerOutput(lH);aH=new bs.SpeechSynthesizer(sH,e)}const r=cH.createBufferSource();r.addEventListener("ended",(()=>{bt(!1),pH=!1})),lH.onAudioEnd=()=>{bt(!1),pH=!1,r.disconnect(),fn(),Rn()},aH.speakSsmlAsync(`<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" xml:lang="${dn(We)}"><voice name="${un(We)}"><s>${((e,t)=>{var n;if(!hn)return e;const r={...null!==(n=hn.common)&&void 0!==n?n:{},...(null==O?void 0:O.id)&&hn[O.id]?hn[O.id]:{}},i=Object.keys(r).map((e=>{var n;return{word:e,phoneme:null!==(n=r[e][t.toLowerCase()])&&void 0!==n?n:r[e].default,caseSensitive:r[e].caseSensitive}}));return i.reduce(((e,{word:t,phoneme:n,caseSensitive:r})=>e.replace(new RegExp(`\\b${t}\\b`,r?"g":"gi"),`<phoneme alphabet="ipa" ph="${n}">${t}</phoneme>`)),e)})(sm(om(im(e))),We.toLowerCase())}</s></voice></speak>`,(i=>{if(i){bt(!0),pH=!0;try{cH.decodeAudioData(i.audioData,(function(e){r.buffer=e,r.connect(cH.destination),(Bt.length<1||t&&n)&&r.start(0)})),cH.onstatechange=()=>{"suspended"===cH.state||"closed"===cH.state?(r.disconnect(),bt(!1),pH=!1):"interrupted"===cH.state&&cH.resume()},cH.resume(),aH&&(aH.close(),aH=null)}catch(t){console.error("speak error: ",t),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),bt(!1),pH=!1,aH&&(aH.close(),aH=null),fn()}}else cH.resume(),bt(!1),pH=!1,fn()}),(t=>{console.error("speak:",t),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),bt(!1),pH=!1,fn()})),Ye(!1)},gn=()=>{bt(!1),pH=!1;try{aH&&(aH.close(),aH=null),"closed"!==cH.state&&cH.close(),lH&&(lH.pause(),lH.close())}catch(e){console.error("stopAudio error: ",e)}};(0,c.useEffect)((()=>{let e=document.querySelector("#chat-fieldset textarea");e&&e.focus()}),[null==Qt?void 0:Qt.emission]);const[vn,yn]=(0,c.useState)(""),bn=()=>yn(""),[xn,Sn]=(0,c.useState)(null),wn=()=>{let e=setTimeout((async()=>{En();const e=rm(vn);e.length>0&&Lt?(Ut(e),bn(),Nt("")):Lt&&an()}),1e3*gt);Sn(e)},_n=()=>{xn&&(clearTimeout(xn),Sn(null))};(0,c.useEffect)((()=>{_n(),ft&&wn(),an()}),[vn]);const Cn=()=>{if(D){En(),yn(""),bn();try{navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){rt(!0),sH||(sH=bs.SpeechConfig.fromSubscription(D,"eastus"),sH.speechRecognitionLanguage=dn(We),sH.speechSynthesisLanguage=dn(We),sH.speechSynthesisVoiceName=un(We));const t=bs.AudioConfig.fromDefaultMicrophoneInput();oH=new bs.SpeechRecognizer(sH,t),Dt(!0),oH.recognized=(e,t)=>{if(t.result.text)if(t.result.reason===bs.ResultReason.RecognizedSpeech){let e=t.result.text;if(yn(e||""),(null==e?void 0:e.length)>0){const t=rm(e);t.length>0&&Nt((e=>`${e} ${t}`))}}else t.result.reason===bs.ResultReason.NoMatch&&console.debug("NOMATCH: Speech could not be recognized.")},oH.canceled=(e,t)=>{t.reason===bs.CancellationReason.Error&&(console.debug(`"CANCELED: ErrorCode=${t.errorCode}`),console.debug(`"CANCELED: ErrorDetails=${t.errorDetails}`),console.debug("CANCELED: Did you set the speech resource key and region values?")),An()},oH.sessionStopped=(e,t)=>{An()},bn(),oH.startContinuousRecognitionAsync()})).catch(console.error)}catch(e){console.error(e)}}},An=()=>{oH&&(oH.stopContinuousRecognitionAsync(),oH.close(),oH=null),Dt(!1)},En=()=>{rt(!1),An(),_n()},Tn=()=>{try{En(),sn(),ze(!1),on.current=void 0,gn()}catch(e){console.log("Error: resetUIEffects",e)}};(0,c.useEffect)((()=>()=>{Tn()}),[]),(0,c.useEffect)((()=>(document.addEventListener("MemoriResetUIEffects",Tn),()=>{document.removeEventListener("MemoriResetUIEffects",Tn)})),[]),(0,c.useEffect)((()=>{"Z0"===(null==Qt?void 0:Qt.state)&&En()}),[null==Qt?void 0:Qt.state]);const[Mn,In]=(0,c.useState)(!1),Rn=(0,c.useCallback)((e=>{yt&&aH&&(aH.close(),aH=null),!ft||!nt&&Mn||(In(!0),Cn())}),[ft,nt]);(0,c.useEffect)((()=>{Bt.length>1&&!yt&&ft&&(nt||!Mn)?Cn():yt&&Lt&&An()}),[yt]),(0,c.useEffect)((()=>{Lt&&(En(),bn(),Nt(""),Cn())}),[je]);const[Pn,kn]=(0,c.useState)("keypress");(0,c.useEffect)((()=>{const e=Rj("sendOnEnter","keypress");window.innerWidth<=768?kn("click"):kn(e)}),[]),(0,c.useEffect)((()=>{Pj("sendOnEnter",Pn)}),[Pn]);const[On,Nn]=(0,c.useState)(),Ln=null==He?void 0:He.globalBackground,Dn=Ln?`url(${Ln})`:null,Bn=u?{"--memori-chat-bubble-bg":"#fff",...He&&!p?{"--memori-text-color":null!==(ne=He.textColor)&&void 0!==ne?ne:"#000"}:{},...(null==He?void 0:He.buttonBgColor)?{"--memori-button-bg":He.buttonBgColor,"--memori-primary":He.buttonBgColor}:{},...(null==He?void 0:He.buttonTextColor)?{"--memori-button-text":He.buttonTextColor}:{},...(null==He?void 0:He.blurBackground)?{"--memori-blur-background":"5px"}:{"--memori-blur-background":"0px"},...(null==He?void 0:He.innerBgColor)?{"--memori-inner-bg":`rgba(${"dark"===He.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(re=He.innerBgAlpha)&&void 0!==re?re:.4})`,"--memori-inner-content-pad":"1.5rem","--memori-nav-bg-image":"none","--memori-nav-bg":`rgba(${"dark"===He.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(ie=null==He?void 0:He.innerBgAlpha)&&void 0!==ie?ie:.4})`}:{"--memori-inner-content-pad":"0px"}}:{},zn=`\n ${m?"#preview,":"WEBSITE_ASSISTANT"===$e?"":":root,"} .memori-widget, .memori-drawer, .memori-modal {\n ${Object.entries(Bn).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `,Fn=void 0===(null==He?void 0:He.showAIicon)||(null==He?void 0:He.showAIicon),Un=void 0===(null==He?void 0:He.showWhyThisAnswer)||(null==He?void 0:He.showWhyThisAnswer),[jn,Hn]=(0,c.useState)(!1);(0,c.useEffect)((()=>{(window.innerWidth>=768&&"FULLPAGE"===$e||"FULLPAGE"!==$e)&&Hn(!0)}),[]);const[Vn,Gn]=(0,c.useState)();(0,c.useEffect)((()=>{e.engineMemoriID&&(async e=>{let t,n;try{const{contentQualityIndex:r,answerQualityIndex:i,unansweredQuestions:o,...s}=await Te(e);0===s.resultCode&&(t=r,n=o)}catch(e){let t=e;console.error("[APPCONTEXT/QUERYGAMIFICATIONPOINTS]",t)}return{points:null!=t?t:0,unansweredQuestions:null!=n?n:0}})(e.engineMemoriID).then((e=>{Gn(nH(e.points))})).catch(console.error)}),[e.engineMemoriID]),(0,c.useEffect)((()=>{if(null==He?void 0:He.seoTitle){let e=document.createElement("meta");e.setAttribute("property","og:title"),e.setAttribute("content",He.seoTitle),document.head.append(e)}if(null==He?void 0:He.seoDescription){let e=document.createElement("meta");e.setAttribute("property","og:description"),e.setAttribute("content",He.seoDescription),document.head.append(e)}if(null==He?void 0:He.seoUrl){let e=document.createElement("meta");e.setAttribute("property","og:url"),e.setAttribute("content",He.seoUrl),document.head.append(e)}let t=P||e.avatarURL;if((null==He?void 0:He.seoImageShowAvatar)&&t){let e=document.createElement("meta");e.setAttribute("property","og:image"),e.setAttribute("content",t),document.head.append(e)}}),[He,e.avatarURL,P]);const Wn=(0,c.useCallback)((e=>{const{text:t,waitForPrevious:n,hidden:r,typingText:i,useLoaderTextAsMsg:o,hasBatchQueued:s}=e.detail;t&&(n&&!hH&&(pH||Qe)?setTimeout((()=>{Wn(e)}),1e3):(An(),gn(),Ut(t,void 0,void 0,void 0,void 0,r,i,o,s)))}),[Kt,yt,Qe,We]);(0,c.useEffect)((()=>(document.addEventListener("MemoriTextEntered",Wn),()=>{document.removeEventListener("MemoriTextEntered",Wn)})),[Kt,We]);const qn=(0,c.useCallback)((async t=>{var n,r,i,o,s,a,l,c,u,d,h,p,f,m,g,v,y,b;const x=(null==t?void 0:t.sessionID)||Kt,S=(null==t?void 0:t.dialogState)||Qt;ze(!0);let w=document.getElementById("memori-audio"),_=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome");w&&_&&(w.muted=!1,w.play().catch((e=>{console.error("error playing intro audio",e)})));let C=Rj("birthDate",void 0),A=Vt||C||void 0;if(x||!Ht||A){if(!x&&"PUBLIC"!==e.privacyType&&!e.secretToken&&!Ct&&!Et||!x&&Fe)return It("password"),void ze(!1);if(!x){ze(!1),Ue(!1);const t=await Xt({memoriID:e.engineMemoriID,password:E||Ct||e.secretToken,tag:null==N?void 0:N.tag,pin:null==N?void 0:N.pin,initialContextVars:{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...I||{}},initialQuestion:R,birthDate:A,additionalInfo:{...F||{},loginToken:null!==(a=null!==(s=null!=dH?dH:Pe)&&void 0!==s?s:null==F?void 0:F.loginToken)&&void 0!==a?a:L,language:dn(We)}});return void((null==t?void 0:t.dialogState)?(zt([]),jt(t.dialogState,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))):await qn(t||void 0))}if(k){const{currentState:t,...n}=await Ee(x);if(0!==n.resultCode||!t)return console.debug("session expired, opening new session"),Ue(!0),Jt(void 0),ze(!1),void await qn();if(zt([]),Rt&&kt(Rt,x),e.needsDateTime&&tn({sessionID:x,state:t}),Ie&&e.giverTag&&(null==Qt?void 0:Qt.currentTag)!==e.giverTag)try{console.debug("change tag #0"),await en(e.engineMemoriID,x,"-");const t=await en(e.engineMemoriID,x,e.giverTag,e.giverPIN);if(!t||0!==t.resultCode)throw console.error("session #1",t),new Error("No session");jt(t.currentState,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))}catch(t){console.error("session #2",t),$t(!0,null==e?void 0:e.secretToken,void 0,null==e?void 0:e.giverTag,null==e?void 0:e.giverPIN,{PATHNAME:null===(l=window.location.pathname)||void 0===l?void 0:l.toUpperCase(),ROUTE:(null===(d=null===(u=null===(c=window.location.pathname)||void 0===c?void 0:c.split("/"))||void 0===u?void 0:u.pop())||void 0===d?void 0:d.toUpperCase())||"",...I||{}},R,A).then((()=>{tt(!0)}))}else if(!Ie&&N&&(null==Qt?void 0:Qt.currentTag)!==N.tag)try{console.debug("change tag #3"),await en(e.engineMemoriID,x,"-");const t=await en(e.engineMemoriID,x,N.tag,N.pin);if(!t||0!==t.resultCode)throw console.error("session #4",t),new Error("No session");jt(t.currentState,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))}catch(t){console.error("session #5",t),$t(!0,null==e?void 0:e.secretToken,void 0,N.tag,N.pin,{PATHNAME:null===(h=window.location.pathname)||void 0===h?void 0:h.toUpperCase(),ROUTE:(null===(m=null===(f=null===(p=window.location.pathname)||void 0===p?void 0:p.split("/"))||void 0===f?void 0:f.pop())||void 0===m?void 0:m.toUpperCase())||"",...I||{}},R,A).then((()=>{tt(!0)}))}else if(Ie||N||(null==Qt?void 0:Qt.currentTag)===Kv)jt(t,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}));else try{console.debug("change tag #6"),await en(e.engineMemoriID,x,"-");const t=await en(e.engineMemoriID,x,Kv);if(!t||0!==t.resultCode)throw console.error("session #7",t),new Error("No session");jt(t.currentState,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))}catch(t){console.error("session #8",t),$t(!0,null==e?void 0:e.secretToken,void 0,void 0,void 0,{PATHNAME:null===(g=window.location.pathname)||void 0===g?void 0:g.toUpperCase(),ROUTE:(null===(b=null===(y=null===(v=window.location.pathname)||void 0===v?void 0:v.split("/"))||void 0===y?void 0:y.pop())||void 0===b?void 0:b.toUpperCase())||"",...I||{}},R,A).then((()=>{tt(!0)}))}Rt&&kt(Rt,x),e.needsDateTime&&tn({sessionID:x,state:t})}else zt([]),jt(S,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))}else qt(!0),ze(!1)}),[Ct,e,Et,Vt,Kt,We,Rt]);(0,c.useEffect)((()=>{const t=document.querySelector(`memori-client[memoriname="${e.name}"]`)||document.querySelector(`memori-client[memoriid="${e.memoriID}"]`)||document.querySelector("memori-client");if(!t)return;const n=new MutationObserver(((e,t)=>{var n,r,i;for(const t of e)"attributes"===t.type&&"authtoken"===(null===(n=t.attributeName)||void 0===n?void 0:n.toLowerCase())&&("MEMORI-CLIENT"===t.target.nodeName?(ke(t.target.getAttribute("authtoken")||void 0),dH=t.target.getAttribute("authtoken")||void 0):(ke((null===(i=null===(r=t.target)||void 0===r?void 0:r.parentElement)||void 0===i?void 0:i.getAttribute("authtoken"))||void 0),dH=t.target.getAttribute("authtoken")||void 0))}));return n.observe(t,{attributes:!0,childList:!1,subtree:!1}),()=>{n.disconnect()}}),[]);const[Kn,Jn]=(0,c.useState)(),Qn=(0,c.useCallback)((async()=>{if(Kt&&(null==e?void 0:e.enableBoardOfExperts))try{const{experts:e,count:t,...n}=await Me(Kt);0===n.resultCode?Jn(e):console.warn("Error fetching experts",n)}catch(e){console.warn(e)}}),[Kt,null==e?void 0:e.enableBoardOfExperts]);(0,c.useEffect)((()=>{Qn()}),[Kt,Qn]);const Yn=e.enableDeepThought&&!!Pe&&!!(null==Oe?void 0:Oe.userID)&&(null==Oe?void 0:Oe.pAndCUAccepted),Zn=null==O?void 0:O.billingDelegation,[Xn,$n]=(0,c.useState)(!0),er=(0,c.useCallback)((async()=>{if(null==O?void 0:O.billingDelegation)try{const e=await rH({operation:Yn?"dt_session_creation":"session_creation",baseUrl:T,userID:r,userName:i,tenant:o});e.enough?$n(!0):($n(!1),console.warn("Not enough credits. Required:",e.required))}catch(e){let t=e;console.error(t)}}),[null==O?void 0:O.billingDelegation,Yn]);(0,c.useEffect)((()=>{(null==O?void 0:O.billingDelegation)&&er()}),[null==O?void 0:O.billingDelegation,Yn]);const tr=void 0===C?"TOTEM"!==d&&"WEBSITE_ASSISTANT"!==d:!C,nr={memori:e,tenant:O,history:Bt,showShare:null===(oe=null!=f?f:null==He?void 0:He.showShare)||void 0===oe||oe,position:Rt,setShowPositionDrawer:ot,setShowSettingsDrawer:at,setShowKnownFactsDrawer:ct,setShowExpertsDrawer:dt,showSpeaker:!!D,speakerMuted:ht||hH,setSpeakerMuted:e=>{if(hH=!!e,pt(e),Pj("muteSpeaker",!!e),e)gn();else{cH=new Qo;let e=cH.createBuffer(1,1e4,22050),t=cH.createBufferSource();t.buffer=e,t.connect(cH.destination)}},showSettings:x,hasUserActivatedSpeak:et,showReload:"TOTEM"===$e,showClear:w,clearHistory:()=>zt((e=>e.slice(-1))),showLogin:_,setShowLoginDrawer:De,loginToken:Pe,user:Oe,sessionID:Kt},rr={memori:e,integration:u,integrationConfig:He,tenant:O,instruct:Ie,avatar3dVisible:jn,setAvatar3dVisible:Hn,hasUserActivatedSpeak:et,isPlayingAudio:yt&&!ht,loading:!!Qe,baseUrl:T,apiUrl:M},ir={memori:e,tenant:O,gamificationLevel:Vn,language:je,userLang:We,setUserLang:qe,baseUrl:T,apiUrl:M,position:Rt,openPositionDrawer:()=>ot(!0),integrationConfig:He,instruct:Ie,sessionId:Kt,clickedStart:Be,onClickStart:qn,initializeTTS:()=>{if(!D)return;sH=bs.SpeechConfig.fromSubscription(D,"eastus"),sH.speechSynthesisLanguage=dn(We),sH.speechSynthesisVoiceName=un(We),sH.speechRecognitionLanguage=dn(We),Zf()&&(sH.speechSynthesisOutputFormat=bs.SpeechSynthesisOutputFormat.Audio16Khz32KBitRateMonoMp3),cH=new Qo;let e=cH.createBuffer(1,1e4,22050),t=cH.createBufferSource();t.buffer=e,t.connect(cH.destination),lH=new bs.SpeakerAudioDestination;let n=bs.AudioConfig.fromSpeakerOutput(lH);aH=new bs.SpeechSynthesizer(sH,n)},isUserLoggedIn:!!Pe&&!!(null==Oe?void 0:Oe.userID),notEnoughCredits:Zn&&!Xn,showLogin:_,setShowLoginDrawer:De,user:Oe},or={memori:e,sessionID:Kt||"",tenant:O,translateTo:Ve&&We.toUpperCase()!==(null===(ue=null!==(ce=null!==(le=null===(ae=null===(se=e.culture)||void 0===se?void 0:se.split("-"))||void 0===ae?void 0:ae[0])&&void 0!==le?le:me.language)&&void 0!==ce?ce:"IT")||void 0===ue?void 0:ue.toUpperCase())?We:void 0,baseUrl:T,apiUrl:M,layout:d,memoriTyping:Qe,typingText:Ze,showTypingText:S,history:tr?Bt:Bt.slice(-2),authToken:null!==(he=null!==(de=null!=Pe?Pe:dH)&&void 0!==de?de:null==F?void 0:F.loginToken)&&void 0!==he?he:L,dialogState:Qt,setDialogState:Zt,pushMessage:Ft,simulateUserPrompt:(e,t)=>{An(),gn(),Ut(e,void 0,void 0,!1,t)},showDates:y,showContextPerLine:b,showAIicon:Fn,showWhyThisAnswer:Un,client:ye,selectReceiverTag:async n=>{var r;if(Kt)try{const{currentState:i,...o}=await Ae(Kt,n);if(0===o.resultCode)if(Ft({text:n,fromUser:!0}),"X4"===i.state&&e.giverTag){const{currentState:n,...r}=await ye.postTagChangedEvent(Kt,e.giverTag);0===r.resultCode?(Zt(n),n.emission&&Ft({text:n.emission,emitter:n.emitter,media:n.media,fromUser:!1,contextVars:n.contextVars,date:n.currentDate,placeName:n.currentPlaceName,placeLatitude:n.currentLatitude,placeLongitude:n.currentLongitude,placeUncertaintyKm:n.currentUncertaintyKm,tag:n.currentTag,memoryTags:n.memoryTags})):(console.error(r),t(Ju).error(fe(Gv(r.resultCode))))}else Zt(i),i.emission&&Ft({text:i.emission,emitter:i.emitter,media:i.media,fromUser:!1,contextVars:i.contextVars,date:i.currentDate,placeName:i.currentPlaceName,placeLatitude:i.currentLatitude,placeLongitude:i.currentLongitude,placeUncertaintyKm:i.currentUncertaintyKm,tag:i.currentTag,memoryTags:i.memoryTags});else console.error(o,n,null===(r=null==Qt?void 0:Qt.knownTags)||void 0===r?void 0:r[n]),t(Ju).error(fe(Gv(o.resultCode)))}catch(e){let n=e;console.error(n),t(Ju).error(n.message)}},preview:m,sendOnEnter:Pn,setSendOnEnter:kn,microphoneMode:ft?"CONTINUOUS":"HOLD_TO_TALK",attachmentsMenuOpen:On,setAttachmentsMenuOpen:Nn,instruct:Ie,showInputs:v,showMicrophone:!!D,userMessage:Ot,onChangeUserMessage:e=>{if(!e||"\n"===e||""===e.trim())return Nt(""),void an();Nt(e),sn()},sendMessage:e=>{gn(),An(),Ut(e),Nt(""),bn()},stopListening:En,startListening:Cn,stopAudio:gn,resetTranscript:bn,listening:Lt,isPlayingAudio:yt,customMediaRenderer:j,user:Oe,userAvatar:H,experts:Kn},sr=u&&Dn?(0,s.jsx)("div",{className:"memori--global-background",children:(0,s.jsx)("div",{className:"memori--global-background-image",style:{backgroundImage:Dn}})}):(0,s.jsx)("div",{className:"memori--global-background no-background-image"}),ar=u?(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:zn}}):null,lr={canInstruct:!!e.giverTag,instruct:!!Ie,onChangeMode:e=>{Re("instruct"===e),tt(!1),ze(!1)}},cr=(0,s.jsx)(ij,{tenant:O,userLang:We,integrationID:null==u?void 0:u.integrationID,memoriHash:`${e.ownerTenantName}-${e.ownerUserName}-${e.name}`}),ur=h||("TOTEM"===$e?qj:"CHAT"===$e?Kj:"FULLPAGE"===$e?Wj:"WEBSITE_ASSISTANT"===$e?Jj:Wj);return(0,s.jsxs)("div",{className:t(ws)("memori","memori-widget",`memori-layout-${d.toLowerCase()}`,`memori-controls-${xt.toLowerCase()}`,`memori--avatar-${(null==He?void 0:He.avatar)||"default"}`,{"memori--preview":m,"memori--embed":g,"memori--with-integration":u,"memori--with-speechkey":!!D,"memori--active":et,"memori--hide-emissions":wt,"memori--has-active-session":!!Kt}),"data-memori-name":null==e?void 0:e.name,"data-memori-id":null==e?void 0:e.engineMemoriID,"data-memori-secondary-id":null==e?void 0:e.memoriID,"data-memori-session-id":Kt,"data-memori-integration":null==u?void 0:u.integrationID,"data-memori-engine-state":JSON.stringify({...Qt,sessionID:Kt}),style:{height:A},children:[(0,s.jsx)(ur,{Header:rj,headerProps:nr,Avatar:XF,avatarProps:rr,Chat:tS,chatProps:or,StartPanel:cS,startPanelProps:ir,integrationStyle:ar,integrationBackground:sr,ChangeMode:$F,changeModeProps:lr,poweredBy:cr,sessionId:Kt,hasUserActivatedSpeak:et,showInstruct:p,loading:Ke}),(0,s.jsx)("audio",{id:"memori-audio",style:{display:"none"},src:"https://aisuru.com/intro.mp3"}),ge&&(0,s.jsx)(pv,{withModal:!0,pwdOrTokens:Mt,openModal:!!Mt,setPwdOrTokens:It,showTokens:"SECRET"===e.privacyType,onFinish:async t=>{var n,r,i,o;t.password&&At(t.password),t.password&&(uH=t.password),t.tokens&&Tt(t.tokens),$t(!Kt,t.password,t.tokens,Ie?e.giverTag:null==N?void 0:N.tag,Ie?e.giverPIN:null==N?void 0:N.pin,{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...I||{}},R,Vt).then((e=>{It(null),qn(e||void 0)})).catch((()=>{It(null),Ue(!0)}))},minimumNumberOfRecoveryTokens:null!==(pe=null==e?void 0:e.minimumNumberOfRecoveryTokens)&&void 0!==pe?pe:1}),ge&&(0,s.jsx)(Ej,{visible:Wt,minAge:Ht,onClose:t=>{var n,r,i,o;t?(Gt(t),Pj("birthDate",t),$t(!Kt,uH||Ct||(null==e?void 0:e.secretToken),Et,Ie?e.giverTag:null==N?void 0:N.tag,Ie?e.giverPIN:null==N?void 0:N.pin,{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...I||{}},R,t).then((e=>{qt(!1),It(null),qn(e||void 0)})).catch((()=>{qt(!1),Ue(!0)}))):(qt(!1),ze(!1))}}),st&&(0,s.jsx)(Nj,{layout:$e,open:!!st,onClose:()=>at(!1),microphoneMode:ft?"CONTINUOUS":"HOLD_TO_TALK",continuousSpeechTimeout:gt,setMicrophoneMode:e=>mt("CONTINUOUS"===e),setContinuousSpeechTimeout:vt,controlsPosition:xt,setControlsPosition:St,hideEmissions:wt,setHideEmissions:_t,additionalSettings:U}),it&&(0,s.jsx)(Gm,{memori:e,open:!!it,venue:Rt,setVenue:e=>{Pt(e),kt(e),e?Pj("position",JSON.stringify(e)):kj("position")},onClose:e=>{e&&kt(e),ot(!1)}}),lt&&Kt&&(0,s.jsx)(zj,{apiURL:M,memori:e,sessionID:Kt,visible:lt,closeDrawer:()=>ct(!1)}),ut&&!!Kn&&(0,s.jsx)(Fj,{apiUrl:M,baseUrl:T,tenant:O,experts:Kn,open:ut,onClose:()=>dt(!1)}),Le&&(null==O?void 0:O.id)&&(0,s.jsx)(Gj,{tenant:O,apiUrl:M,open:!!Le,user:Oe,loginToken:Pe,onClose:()=>De(!1),onLogin:(e,t)=>{Ne(e),ke(t),dH=t,De(!1),Pj("loginToken",t)},onLogout:()=>{Pe&&ye.backend.userLogout(Pe).then((()=>{De(!1),Ne(void 0),ke(void 0),dH=void 0,kj("loginToken")}))}})]})};const mH={id:"aisuru.com",theme:"aisuru",config:{name:"Memori",showNewUser:!1,requirePosition:!1}},gH=async(e,t)=>{const n=t?new URL(`${t.startsWith("http")?"":t.includes("localhost")?"http://":"https://"}${t}`).origin:"https://aisuru.com";try{const t=await fetch(`${n}/api/tenant/${e}`),{tenant:r}=await t.json();return r||{...mH,tenantID:e}}catch(t){return{...mH,tenantID:e}}};function vH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BF(r.key),r)}}function bH(e,t,n){return t&&yH(e.prototype,t),n&&yH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xH(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SH(e,t){return SH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},SH(e,t)}function wH(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SH(e,t)}function _H(e,t){if(t&&("object"===LF(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xH(e)}function CH(e){return CH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CH(e)}function AH(e){if(Array.isArray(e))return e}function EH(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function TH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MH(e,t){if(e){if("string"==typeof e)return TH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TH(e,t):void 0}}function IH(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function RH(e){return AH(e)||EH(e)||MH(e)||IH()}function PH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PH(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var OH={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},NH=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vH(this,e),this.init(t,n)}return bH(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||OH,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,kH(kH({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),LH=new NH,DH=function(){function e(){vH(this,e),this.observers={}}return bH(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function BH(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function zH(e){return null==e?"":""+e}function FH(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function UH(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function jH(e,t,n){var r=UH(e,t,Object);r.obj[r.k]=n}function HH(e,t){var n=UH(e,t),r=n.obj,i=n.k;if(r)return r[i]}function VH(e,t,n){var r=HH(e,n);return void 0!==r?r:HH(t,n)}function GH(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):GH(e[r],t[r],n):e[r]=t[r]);return e}function WH(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var qH={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function KH(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return qH[e]})):e}var JH="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,QH=[" ",",","?","!",";"];function YH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YH(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XH(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CH(e);if(t){var i=CH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _H(this,n)}}function $H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];void 0===l&&r.length>o+s;)s++,l=i[a=r.slice(o,o+s).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}var c=r.slice(o+s).join(n);return c?$H(l,c,n):void 0}i=i[r[o]]}return i}}var eV=function(e){wH(n,e);var t=XH(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return vH(this,n),r=t.call(this),JH&&DH.call(xH(r)),r.data=e||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return bH(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."));var a=HH(this.data,s);return a||!o||"string"!=typeof n?a:$H(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(s=e.split("."))[1]),this.addNamespaces(t),jH(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var a=HH(this.data,s)||{};r?GH(a,n,i):a=ZH(ZH({},a),n),jH(this.data,s,a),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?ZH(ZH({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(DH),tV={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}};function nV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iV(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CH(e);if(t){var i=CH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _H(this,n)}}var oV={},sV=function(e){wH(n,e);var t=iV(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return vH(this,n),r=t.call(this),JH&&DH.call(xH(r)),FH(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,xH(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=LH.create("translator"),r}return bH(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=QH.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,n,r));if(o&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==LF(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),l=a.key,c=a.namespaces,u=c[c.length-1],d=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return o?(f.res="".concat(u).concat(p).concat(l),f):"".concat(u).concat(p).concat(l)}return o?(f.res=l,f):l}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||l,v=f&&f.exactUsedKey||l,y=Object.prototype.toString.apply(m),b=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,w="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(S&&m&&w&&b.indexOf(y)<0&&("string"!=typeof x||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,rV(rV({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(f.res=_,f):_}if(s){var C="[object Array]"===y,A=C?[]:{},E=C?v:g;for(var T in m)if(Object.prototype.hasOwnProperty.call(m,T)){var M="".concat(E).concat(s).concat(T);A[T]=this.translate(M,rV(rV({},t),{joinArrays:!1,ns:c})),A[T]===M&&(A[T]=m[T])}m=A}}else if(S&&"string"==typeof x&&"[object Array]"===y)(m=m.join(x))&&(m=this.extendTranslation(m,e,t,r));else{var I=!1,R=!1,P=void 0!==t.count&&"string"!=typeof t.count,k=n.hasDefaultValue(t),O=P?this.pluralResolver.getSuffix(d,t.count,t):"",N=t["defaultValue".concat(O)]||t.defaultValue;!this.isValidLookup(m)&&k&&(I=!0,m=N),this.isValidLookup(m)||(R=!0,m=l);var L=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,D=L&&R?void 0:m,B=k&&N!==m&&this.options.updateMissing;if(R||I||B){if(this.logger.log(B?"updateKey":"missingKey",d,u,l,B?N:m),s){var z=this.resolve(l,rV(rV({},t),{},{keySeparator:!1}));z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&U&&U[0])for(var j=0;j<U.length;j++)F.push(U[j]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var H=function(e,n,r){var o=k&&r!==m?r:D;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,n,o,B,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,n,o,B,t),i.emit("missingKey",e,u,n,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?F.forEach((function(e){i.pluralResolver.getSuffixes(e,t).forEach((function(n){H([e],l+n,t["defaultValue".concat(n)]||N)}))})):H(F,l,N))}m=this.extendTranslation(m,e,t,f,r),R&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(u,":").concat(l)),(R||I)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,I?m:void 0):this.options.parseMissingKeyHandler(m))}return o?(f.res=m,f):m}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,rV(rV({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(rV(rV({},n),{interpolation:rV(rV({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=e.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=rV(rV({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,h="string"==typeof d?[d]:d;return null!=e&&h&&h.length&&!1!==n.applyPostProcessor&&(e=tV.handle(h,e,t,this.options&&this.options.postProcessPassResolved?rV({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;n=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=d&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),p=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(e){s.isValidLookup(t)||(o=e,!oV["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(oV["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){i=n;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,n,e,a);else{var u;d&&(u=s.pluralResolver.getSuffix(n,a.count,a));var f="".concat(s.options.pluralSeparator,"zero");if(d&&(l.push(c+u),h&&l.push(c+f)),p){var m="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(m),d&&(l.push(m+u),h&&l.push(m+f))}}for(;o=l.pop();)s.isValidLookup(t)||(r=o,t=s.getResource(n,e,o,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}(DH);function aV(e){return e.charAt(0).toUpperCase()+e.slice(1)}var lV=function(){function e(t){vH(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=LH.create("languageUtils")}return bH(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=aV(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=aV(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=aV(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),cV=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],uV={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},dV=["v1","v2","v3"],hV={zero:0,one:1,two:2,few:3,many:4,other:5};function pV(){var e={};return cV.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:uV[t.fc]}}))})),e}var fV=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vH(this,e),this.languageUtils=t,this.options=n,this.logger=LH.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=pV()}return bH(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return hV[e]-hV[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!dV.includes(this.options.compatibilityJSON)}}]),e}();function mV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vV=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vH(this,e),this.logger=LH.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return bH(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:KH,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?WH(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?WH(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?WH(t.nestingPrefix):t.nestingPrefixEscaped||WH("$t("),this.nestingSuffix=t.nestingSuffix?WH(t.nestingSuffix):t.nestingSuffixEscaped||WH(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0){var i=VH(t,l,e);return a.alwaysFormat?a.format(i,void 0,n,gV(gV(gV({},r),t),{},{interpolationkey:e})):i}var o=e.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(VH(t,l,s),c,n,gV(gV(gV({},r),t),{},{interpolationkey:s}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?c(a.escape(e)):c(e)}}].forEach((function(t){for(s=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=u(n)))if("function"==typeof d){var l=d(e,i,r);o="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else{if(h){o=i[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=zH(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),h?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=gV({},o);function a(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s=gV(gV({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(a.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=zH(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return i.format(e,t,o.lng,gV(gV({},o),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function yV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xV(e){var t={};return function(n,r,i){var o=r+JSON.stringify(i),s=t[o];return s||(s=e(r,i),t[o]=s),s(n)}}var SV=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vH(this,e),this.logger=LH.create("formatter"),this.options=t,this.formats={number:xV((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:xV((function(e,t){var n=new Intl.NumberFormat(e,bV(bV({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:xV((function(e,t){var n=new Intl.DateTimeFormat(e,bV({},t));return function(e){return n.format(e)}})),relativetime:xV((function(e,t){var n=new Intl.RelativeTimeFormat(e,bV({},t));return function(e){return n.format(e,t.range||"day")}})),list:xV((function(e,t){var n=new Intl.ListFormat(e,bV({},t));return function(e){return n.format(e)}}))},this.init(t)}return bH(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=xV(t)}},{key:"format",value:function(e,t,n,r){var i=this,o=t.split(this.formatSeparator).reduce((function(e,t){var o=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((function(e){if(e){var t=RH(e.split(":")),r=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}}))}return{formatName:t,formatOptions:n}}(t),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=i.formats[s](e,u,bV(bV(bV({},a),r),c))}catch(e){i.logger.warn(e)}return l}return i.logger.warn("there was no format function for ".concat(s)),e}),e);return o}}]),e}();function wV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CV(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CH(e);if(t){var i=CH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _H(this,n)}}var AV=function(e){wH(n,e);var t=CV(n);function n(e,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return vH(this,n),o=t.call(this),JH&&DH.call(xH(o)),o.backend=e,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=LH.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return bH(n,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},s={},a={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var r,a,l,c,u,d;r=n.loaded,a=o,c=UH(r,[i],Object),u=c.obj,d=c.k,u[d]=u[d]||[],l&&(u[d]=u[d].concat(a)),l||u[d].push(a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===s[e][t]&&(s[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:s}):(this.readingCalls++,this.backend[n](e,t,(function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&l&&i<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*o,s)}),o):s(a,l)}))):s(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,s){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),t.loaded(e,r,s)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,_V(_V({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),n}(DH);function EV(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===LF(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===LF(e[2])||"object"===LF(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function TV(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function MV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function IV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function RV(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CH(e);if(t){var i=CH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _H(this,n)}}function PV(){}function kV(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var OV=function(e){wH(n,e);var t=RV(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(vH(this,n),e=t.call(this),JH&&DH.call(xH(e)),e.options=TV(r),e.services={},e.logger=LH,e.modules={external:[]},kV(xH(e)),i&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,i),_H(e,xH(e));setTimeout((function(){e.init(r,i)}),0)}return e}return bH(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=EV();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=IV(IV(IV({},r),this.options),TV(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=IV(IV({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?LH.init(i(this.modules.logger),this.options):LH.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=SV);var s=new lV(this.options);this.store=new eV(this.options.resources,this.options);var a=this.services;a.logger=LH,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new fV(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new vV(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new AV(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new sV(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=PV),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=BH(),h=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PV,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)s(i);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=BH();return e||(e=this.languages),t||(t=this.options.ns),n||(n=PV),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&tV.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=BH();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var s="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);s&&(n.language||i(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,(function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,s)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var o;if("object"!==LF(i)){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([t,i].concat(a))}else o=IV({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",u=o.keyPrefix?"".concat(o.keyPrefix).concat(c).concat(t):t;return r.t(u,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=BH();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=BH();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PV,i=IV(IV(IV({},this.options),t),{isClone:!0}),o=new n(i);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));var s=["store","services","language"];return s.forEach((function(t){o[t]=e[t]})),o.services=IV({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new sV(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(DH);zF(OV,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new OV(e,t)}));var NV=OV.createInstance();NV.createInstance=OV.createInstance;var LV,DV=NV.createInstance;NV.init,NV.loadResources,NV.reloadResources,NV.use,NV.changeLanguage,NV.getFixedT,NV.t,NV.exists,NV.setDefaultNamespace,NV.hasLoadedNamespace,NV.loadNamespaces,NV.loadLanguages;LV=JSON.parse('{"yes":"Si","no":"No","confirm":"Conferma","apply":"Applica","cancel":"Annulla","show":"Mostra","hide":"Nascondi","send":"Invia","close":"Chiudi","edit":"Modifica","delete":"Elimina","loading":"Caricamento","expand":"Espandi","collapse":"Riduci","fullscreenEnter":"Passa a schermo intero","fullscreenExit":"Esci da schermo intero","center":"Centro","bottom":"In basso","hidden":"Nascosto","day":"Giorno","month":"Mese","year":"Anno","createdAt":"Data creazione","selected":"Selezionati","page":"pagina","actions":"Azioni","next":"Successivo","previous":"Precedente","copy":"Copia","copyToClipboard":"Copia negli appunti","showOriginalText":"Mostra originale","showTranslatedText":"Mostra traduzione","exactPosition":"Posizione esatta","uncertain":"Incertezza","question":"Domanda","nothingFound":"Nessun risultato","venue":"Luogo","searchVenue":"Cerca luogo...","memoriBlockedTitle":"Bloccato","memoriBlockedUntil":"Memori bloccato fino al {{date}}","memoriBlockedAnon":"Attualmente \\"{{name}}\\" non può rispondere, torna qui il {{date}}","memoriBlockedReasonExceedChats":"perchè ha superato la soglia mensile di chat ammesse.","memoriBlockedGiverHelper":"Puoi sempre gestirlo in qualità di amministratore, ma altri utenti non potranno interrogarlo.","generatedByAI":"Risposta generata da IA, può talvolta generare informazioni non corrette","whyThisAnswer":"Perché questa risposta?","whyThisAnswerHelper":"Questa risposta è stata generata automaticamente da un\'intelligenza artificiale sulla base di questi contenuti verificati.","completionsEnabled":"IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette","completionProviderDown":"Questo Twin è integrato con una IA generativa di {{provider}}, ma al momento non è disponibile. Riprova più tardi.","completionProviderFallbackName":"un provider esterno","completionProviderCheckStatusPage":"Vedi pagina di stato","boardOfExperts":"Gruppo di esperti","birthDate":"Data di nascita","birthDateHelper":"Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all\'età","underage":"Devi avere almeno {{age}} anni per registrarti.","underageTwinSession":"Devi avere almeno {{age}} anni per interagire con questo Twin.","ageVerification":"Verifica dell\'età","ageVerificationText":"Per interagire con questo Twin, devi aver almeno {{minAge}} anni.","nsfw":"NSFW: Questo Twin contiene contenuti per adulti","deepThought":"Pensiero profondo","deepThoughtHelper":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme.","deepThoughtDisclaimerTitle":"Pensiero profondo abilitato","deepThoughtDisclaimer":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme.","deepThoughtPreDisclaimerUnlogged":"Accedi per abilitare Pensiero Profondo.","deepThoughtPreDisclaimerNotAllowed":"Pensiero Profondo è disabilitato poiché non hai acconsentito al suo utilizzo, puoi cambiare la tua scelta in qualsiasi momento nelle impostazioni del tuo account.","notEnoughCredits":"L\'autore di questo Twin non ha abbastanza crediti per rispondere alla tua domanda.","knownFacts":{"title":"Fatti noti","description":"Dettagli delle informazioni condivise tra te e {{memoriName}}","type":"Tipo","typeShortTerm":"Breve termine","typeLongTerm":"Lungo termine","typeHelper":"Tipi:\\n- Breve termine: questo fatto noto è sempre utilizzato durante le conversazioni\\n- Lungo termine: questo fatto noto è utilizzato durante le conversazioni solo se rilevante per la domanda corrente","text":"Testo","deleteSuccess":"Fatto noto eliminato","deleteConfirmTitle":"Elimina il fatto noto","deleteConfirmMessage":"Confermi di voler eliminare questo fatto noto?","deleteSelectedConfirmTitle":"Elimina i fatti noti selezionati","deleteSelectedConfirmMessage":"Confermi di voler eliminare i fatti noti selezionati?"},"auth":{"title":"Autenticazione","useRecoveryTokens":"Utilizza i token di recupero","tokens":"Token","addToken":"Aggiungi token","usePassword":"Utilizza la password","atLeast":"Almeno"},"widget":{"instruct":"Istruisci","test":"Prova","sound":"Audio","position":"Preferenze posizione","settings":"Impostazioni","share":"Condividi","sendOnKeypress":"Premi Invio per inviare","sendOnClick":"Clicca sul bottone di invio","boardOfExperts":"Gruppo di esperti","showExpertsInTheBoard":"Mostra gli esperti di questo gruppo","expertsInTheBoard":"Esperti di questo gruppo","goToIntegrationsToCustomizeAvatar":"Per personalizzare l\'avatar, vai a Condividimi e configura la pagina pubblica"},"write_and_speak":{"micButtonPopover":"Premi il pulsante per parlare","micButtonPopoverListening":"Premi il pulsante per smettere di parlare","pageInstructExplanation":"Per insegnarmi nuove cose clicca sul pulsante ISTRUISCIMI per cominciare","pageTryMeExplanation":"Per parlare con me clicca sul pulsante INIZIAMO per cominciare","instructButton":"ISTRUISCIMI","tryMeButton":"INIZIAMO","chatHistory":"Cronologia chat","exportChatHistory":"Esporta la cronologia chat","exportChatHistoryMessage":"Vuoi esportare la cronologia chat?","chatBotButtonText":"CLICCA QUI PER APRIRE LA CHAT","conversationStartedLabel":"Conversazione avvenuta il","settingsHeaderLabel":"Configura qui il memori se vuoi impostare una conversazione continua. Setta i secondi di silenzio prima dell\'invio.","continuousSpeechLabel":"Conversazione continua","holdToSpeak":"Tieni premuto per parlare","releaseToEndListening":"Rilascia per smettere di parlare","pressAndHoldToSpeak":"Premi e tieni premuto per parlare","microphoneMode":"Modalità microfono","hideEmissionsLabel":"Nascondi testo emesso dal Twin","secondsLabel":"Secondi","controlsPosition":"Posizione dei controlli","tryMeHeaderLabel":"PROVA","unknownPosition":"Posizione sconosciuta","fieldPlace":"Indica la posizione (es \'Milano\')","showMapLinkFor":"Visualizza sulla mappa la posizione","useMyPosition":"Usa la mia posizione","myPosition":"Posizione corrente","updatingPosition":"Aggiorno la posizione...","placeNotFound":"Luogo sconosciuto!","requirePositionHelp":"Per parlare con {{name}} devi decidere se fornire o meno la tua posizione. Questo perchè diverse risposte che potrà fornirti potrebbero dipendere da dove ti trovi.","dontWantToProvidePosition":"Non voglio fornire la mia posizione","attachmentsLabel":"Arricchisci il tuo messaggio","iWantToTalkToIn":"Voglio parlare con {{name}} in"},"media":{"title":"Titolo","editAttributes":"Modifica attributi media","uploadMimeTypeNotAllowed":"Il tipo di file non è permesso","uploadSizeLimitMessage":"Il file caricato è troppo grande (max {{size}}MB)","uploadWrongResolutionMessage":"La risoluzione deve essere {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"Hai già un Twin con questo nome","uploadHelperImages":"Caricare un file con estensione png, jpg, jpeg o gif e con dimensione massima di {{size}}MB","uploadHelper":"Caricare un file di dimensione massima di {{size}}MB","uploadError":"Errore nel caricamento","square":"quadrato","scaleRatio":"Proporzioni","addMediaLabel":"Aggiungi media","insertThisMediaMsg":"Inserisci questi media","mediaUploadMessage":"Clicca per caricare un nuovo media","addLinkLabel":"Aggiungi un link","linkKey":"URL","linkValue":"Titolo link","insertThisLink":"Inserisci un link a {{url}} con titolo {{title}}"},"gamification":{"level":"Livello","points":"punti","memoriReachedLevel":"è diventato più evoluto ed ha raggiunto il livello","levelGoToStatistics":"{{memori}} è al livello {{level}} con {{points}} punti. Clicca per andare alle statistiche.","congratulationsNewLevel":"Congratulazioni, hai raggiunto un nuovo livello!","congratulationsNewLevelDescription":"Il tuo Memori è diventato più evoluto con {{points}} punti, guarda le","statistics":"statistiche"},"login":{"login":"Accedi","logout":"Esci","user":"Utente","loggedDrawerTitle":"Ciao, {{name}}!","loginDrawerTitle":"Accedi","signupDrawerTitle":"Registrati","newUserSignUp":"Sei un nuovo utente?","signUp":"Registrati!","alreadyHaveAnAccount":"Hai già un account?","backToLogin":"Torna al login","registrationDisabled":"La registrazione è disabilitata.","contactAdmin":"Contatta l\'amministratore per richiedere l\'accesso","userNameOrEmail":"Nome utente o email","email":"Email","emailFormatError":"Per favore, inserisci una mail valida","username":"Nome utente","usernameContainsReservedWord":"Il nome utente contiene una parola riservata, per favore cambia il nome utente","usernameFormatError":"Il nome utente deve essere lungo almeno 3 caratteri e può contenere solo lettere, numeri e _","otpCode":"Codice di verifica","resendVerificationCode":"Invia di nuovo","resentVerificationCode":"Codice di verifica inviato! Controlla la tua mail.","password":"Password","newPassword":"Nuova password","confirmPassword":"Conferma la password","currentPassword":"Password attuale","passwordMatchingError":"Le password non coincidono.","passwordFormatError":"La password deve essere lunga almeno 8 caratteri e contenere almeno un numero, una lettera maiuscola, una minuscola e un simbolo","pwdWeak":"Debole","pwdAcceptable":"Accettabile","pwdStrong":"Forte","mustChangePassword":"Devi cambiare la password","passwordChange":"Cambio password","emailChange":"Cambio email","avatarChange":"Cambio avatar","underage":"Devi avere almeno {{age}} anni per registrarti.","optional":"opzionale","birthDate":"Data di nascita","birthDateHelper":"Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all\'età","missingData":"Informazioni mancanti","missingDataHelper":"Sappiamo che questo è un po\' fastidioso, ma abbiamo bisogno di alcune informazioni in più per completare la tua registrazione.","goToAccountToChangeYourPreferences":"Puoi cambiare la tua scelta in qualsiasi momento dalla tua pagina Account.","deepThoughtExplaination":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme. Consenti all\'autore del twin di contattarti per offerte commerciali riguardanti prodotti su cui hai espresso interesse.","tnCAndPPAcceptedHelper":"Dall\'ultimo accesso, i T&C e l\'Informativa sulla privacy sono stati modificati. Si prega di accettarle, altrimenti non sarà possibile apportare modifiche ai propri gemelli. Puoi sempre cancellare il tuo account nella pagina del tuo profilo utente.","privacyLabel":"Ho letto e accettato l\'","privacyAndCookiePolicy":"informativa sui cookie e sulla privacy","and":"e","termsOfService":"i termini del servizio","pAndCUAccepted":"Accetto le condizioni di utilizzo relative a Pensiero Profondo","editAccount":"Modifica account","save":"Salva"},"success":"Operazione andata a buon fine","Error":"Errore","internal server error":"Ops, scusa... qualcosa è andato storto nel server","error":"Errore","error.loading":"Errore durante il caricamento dei contenuti.","error.notFound":"Ops, non abbiamo trovato ciò che cercavi.","error.generic":"Ops, qualcosa è andato storto.","error.serverNotResponding":"Stiamo facendo manutenzione o rilasciando aggiornamenti. Riprova più tardi.","error.unprocessableEntity":"Errore durante il salvataggio dei dati. Ricontrolla i dati inseriti.","error.goBackTo":"Prova a tornare alla","error.reloadPage":"Ricarica la pagina","error.tryAgain":"Riprova","error.unauthorized":"Non sei autorizzato a visualizzare questo contenuto.","errors":{"TENANT_NOT_FOUND":"Tenant non trovato","TENANT_REGISTRATION_DISABLED":"La registrazione su questa piattaforma è disabilitata","TENANT_MISSING_NAME":"Tenant: nome mancante","TENANT_MAX_USERS_REACHED":"Numero massimo di utenti raggiunto","TENANT_MAX_ADMINS_REACHED":"Numero massimo di utenti amministratori raggiunto","TENANT_ALREADY_EXISTS":"Tenant già esistente","TENANT_MISSING_DESCRIPTION":"Tenant: descrizione mancante","TENANT_CANT_SET_COMPLETION_PROVIDER":"Tenant: non abilitato a gestire il provider di completamento","USER_NOT_CONFIRMED":"Utente ancora non confermato","USER_NOT_FOUND":"Utente non trovato","USER_OR_PASSWORD_INVALID":"Utente o password non validi","USER_MUST_CHANGE_PASSWORD":"Devi cambiare la password","USER_MUST_ENTER_VERIFICATION_CODE":"Devi inserire il codice di verifica","USER_MISSING_TENANT":"Utente: tenant mancante","USER_MISSING_NAME":"Utente: nome mancante","USER_MISSING_PASSWORD":"Utente: password mancante","USER_MISSING_EMAIL":"Utente: email mancante","USER_MISSING_VERIFICATION_CODE":"Utente: codice di verifica mancante","USER_NAME_ALREADY_USED":"Nome utente già in uso","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"La password non rispetta le regole di sicurezza","USER_EMAIL_ALREADY_USED":"Email già in uso","USER_EMAIL_INVALID":"Email non valida","USER_VERIFICATION_CODE_INVALID":"Codice di verifica non valido","USER_MISSING_NAME_OR_EMAIL":"Nome utente o email mancante","USER_NAME_INVALID":"Nome utente non valido","USER_HAS_ONE_OR_MORE_MEMORI":"L\'utente ha uno o più memori","USER_MISSING_NEW_PASSWORD":"Utente: nuova password mancante","USER_NOTHING_TO_DO":"Niente da fare","USER_CANT_CREATE_MEMORI":"Utente non abilitato a creare Memori","USER_MAX_MEMORI_REACHED":"Massimo numero di Memori raggiunto","USER_TOO_MANY_ATTEMPTS":"Troppi tentativi","USER_MUST_ACCEPT_TNC_AND_PP":"Devi accettare i termini e le condizioni","USER_BIRTH_DATE_CANT_BE_CHANGED":"Data di nascita non può essere cambiata","USER_CANT_SET_COMPLETION_PROVIDER":"Utente: non abilitato a gestire il provider di completamento","USER_CANT_ENABLE_DEEP_THOUGHT":"Utente: non abilitato a gestire Pensiero Profondo","USER_CANT_ENABLE_DCM_INTEGRATION":"Utente: non abilitato a gestire l\'integrazione con DCM","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Utente: non abilitato a gestire la concatenazione o il gruppo di esperti","USER_CREATION_BILLING_DENIED_PERMISSION":"Non hai crediti sufficienti per creare un Twin","MEMORI_NOT_FOUND":"Memori non trovato","MEMORI_NOT_ACCESSIBLE":"Memori non accessibile","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Solo il proprietario può cambiare il tag e il pin","SESSION_NOT_FOUND":"Sessione non trovata","SESSION_IS_NOT_ADMINISTRATIVE":"Sessione non amministrativa","SESSION_EXPIRED":"Sessione scaduta","MEMORI_MISSING_CONFIGURATION":"Memori: configurazione mancante","MEMORI_CONFIGURATION_NOT_FOUND":"Memori: configurazione non trovata","MEMORI_INVALID_PRIVACY_TYPE":"Memori: tipo di privacy non valido","MEMORI_MISSING_PASSWORD":"Memori: password mancante","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero totale di token di recupero non valido","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero minimo di token di recupero non valido","MEMORI_INVALID_VOICE_TYPE":"Memori: tipo di voce non valido","MEMORI_MISSING_NAME":"Memori: nome mancante","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memori: password o token di recupero mancanti","MEMORI_INVALID_ID":"Memori: ID non valido","MEMORI_NAME_ALREADY_USED":"Nome memori già in uso","MEMORI_INVALID_PIN":"Memori: PIN non valido","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memori: cambio TAG e PIN richiedono operazioni separate","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memori: password non richiesta su Memori pubblico","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Pensiero Profondo richiede l\'abilitazione delle completions","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"Il gruppo di esperti richiede l\'abilitazione delle completions","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Trasferimento: utente di destinazione mancante","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Trasferimento: ID utente di destinazione non valido","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Trasferimento: dati utente di destinazione non validi","MEMORI_TRANSFER_NOTHING_TO_DO":"Trasferimento: alcuna operazione da fare","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memori: la configurazione non può essere modificata","MEMORI_MISSING_NEW_PASSWORD":"Memori: nuova password mancante","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Formato non valido data a partire da","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Formato non valido data fino a","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Memori: funzionalità richiede un abbonamento","INTEGRATION_NOT_FOUND":"Integrazione non trovata","INTEGRATION_INVALID_TYPE":"Tipo integrazione non valido","INTEGRATION_ALREADY_EXISTS":"Integrazione già esistente","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Memori non pubblici non possono essere integrati","INTEGRATION_MISSING_INVOCATION_TEXT":"Integrazione: testo di invocazione mancante","INTEGRATION_MISSING_DEVICE_EMAILS":"Integrazione: email del dispositivo mancante","INTEGRATION_MEMORI_IS_EMPTY":"Memori vuoti non possono essere integrati","INTEGRATION_MISSING_PRIVACY_POLICY":"Integrazione: privacy policy mancante","INTEGRATION_MISSING_CATEGORY":"Categoria integrazione mancante","INTEGRATION_MISSING_DESCRIPTION":"Descrizione integrazione mancante","INTEGRATION_INVALID_INVOCATION_TEXT":"Testo di invocazione non valido","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home non più disponibile","UPLOAD_REQUIRES_MULTIPART_ENCODING":"L\'upload richiede l\'encoding multipart","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: manca il content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: dimensione massima superata","UPLOAD_FILE_IS_EMPTY":"Upload: file vuoto","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: tipo di file o firma non validi","UPLOAD_MISSING_FILE_NAME":"Upload: nome file mancante","UPLOAD_INVALID_MEMORY_ID":"Upload: ID contenuto non valido","UPLOAD_MISSING_FILE_CONTENT":"Upload: contenuto file mancante","ASSET_NOT_FOUND":"Asset non trovato","ASSET_NOT_ACCESSIBLE":"Asset non accessibile","ASSET_MISSING_SESSION_ID":"Asset: ID sessione mancante","ASSET_INVALID_FILE_NAME":"Asset: nome file non valido","INVITATION_NOT_FOUND":"Invito non trovato","INVITATION_NOT_ACCESSIBLE":"Invito non accessibile","INVITATION_ALREADY_ACCEPTED":"Invito già accettato","INVITATION_ALREADY_REJECTED":"Invito già rifiutato","INVITATION_MISSING_DESTINATION_EMAIL":"Invito: email di destinazione mancante","INVITATION_DESTINATION_EMAIL_INVALID":"Invito: email di destinazione non valida","INVITATION_MISSING_TAG":"Invito: tag mancante","INVITATION_MISSING_PIN":"Invito: PIN mancante","INVITATION_INVALID_PIN":"Invito: PIN non valido","INVITATION_INVALID_TYPE":"Invito: tipo non valido","INVITATION_MISSING_DESTINATION_NAME":"Invito: nome destinatario mancante","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invito: tag e pin non possono essere cambiati","INVITATION_CANT_BE_CHANGED":"Invito: non può essere modificato","ACTIONLOG_INVALID_USER_ID":"ID utente non valido","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","ACTIONLOG_INVALID_MEMORI_ID":"ID Memori non valido","CONSUMPTIONLOG_INVALID_TYPE":"Tipo di log non valido","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","CONSUMPTIONLOG_INVALID_USER_ID":"ID utente non valido","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Memori ID non valido","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifiche: Periodo di estrazione chatlog non valido","PROCESS_INVALID_TYPE":"Tipo di processo non valido","PROCESS_ALREADY_RUNNING":"Processo già in esecuzione","PROCESS_NOT_FOUND":"Processo non trovato","IMPORTCSV_MISSING_ROWS":"Importazione CSV: righe mancanti","IMPORTCSV_MISSING_CSV":"Importazione CSV: CSV mancante","IMPORTCSV_MISSING_SEPARATOR":"Importazione CSV: separatore mancante","IMPORTCSV_INVALID_SEPARATOR":"Importazione CSV: separatore non valido","IMPORTCSV_MISSING_HEADERS":"Importazione CSV: intestazioni mancanti","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Importazione CSV: separatore varianti titolo mancante","IMPORTCSV_INVALID_RECEIVER_ID":"Importazione CSV: ID receiver non valido","IMPORTCSV_INVALID_MEDIA_LINK":"Importazione CSV: link media non valido","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"Importazione CSV: encoding caratteri non rilevabile","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"Importazione CSV: impossibile importare in Memori segreti","IMPORTTXT_MISSING_ROWS":"Importazione TXT: righe mancanti","IMPORTTXT_INVALID_GRANULARITY":"Importazione TXT: granularità non valida","IMPORTTXT_INVALID_RECEIVER_ID":"Importazione TXT: ID receiver non valido","IMPORTTXT_INVALID_MEDIA_LINK":"Importazione TXT: link media non valido","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"Importazione TXT: encoding caratteri non rilevabile","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"Importazione TXT: impossibile importare in Memori segreti","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Importazione TXT: limite importazione superato","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Importazione TXT: importazione su GPT-4 richiede API key","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Importazione TXT: importazione richiede un piano a pagamento","IMPORTTXT_BILLING_DENIED_PERMISSION":"Importazione TXT: non hai crediti sufficienti per l\'operazione","EXPORTCSV_MISSING_CSV_SPECS":"Esportazione CSV: specifiche CSV mancanti","EXPORTCSV_MISSING_SEPARATOR":"Esportazione CSV: separatore mancante","EXPORTCSV_INVALID_SEPARATOR":"Esportazione CSV: separatore non valido","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Esportazione CSV: separatore varianti titolo mancante","EXPORTCSV_MISSING_NEW_LINE_CHAR":"Esportazione CSV: carattere di nuova riga mancante","EXPORTCSV_INVALID_NEW_LINE_CHAR":"Esportazione CSV: carattere di nuova riga non valido","EXPORTCSV_MISSING_PASSWORD":"Esportazione CSV: password mancante","EXPORTJSONL_MISSING_JSONL_SPECS":"Esportazione JSONL: specifiche JSONL mancanti","EXPORTJSONL_MISSING_PLATFORM":"Esportazione JSONL: piattaforma mancante","EXPORTJSONL_INVALID_PLATFORM":"Esportazione JSONL: piattaforma non valida","EXPORTJSONL_MISSING_PASSWORD":"Esportazione JSONL: password mancante","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"Esportazione JSONL: esportazione richiede un piano a pagamento","ANALYSIS_MISSING_QUERY":"Analisi: query mancante","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analisi: impossibile analizzare Memori segreti","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analisi: corrispondenza query utente richiede Pensiero Profondo","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Assegnazione badge: credenziali errate o mancanti","BADGE_ASSIGNMENT_MISSING_REF_ID":"Assegnazione badge: ID ref mancante","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Assegnazione badge: esito non trovato","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Assegnazione badge: URL di asserzione mancante","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Assegnazione badge: URL badge mancante","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Assegnazione badge: URL issuer mancante","BADGE_ASSIGNMENT_INVALID_URL":"Assegnazione badge: URL non valido","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Assegnazione badge: destinatario mancante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Assegnazione badge: tipo destinatario sconosciuto","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Assegnazione badge: identità destinatario mancante","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Assegnazione badge: tipo hash destinatario mancante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Assegnazione badge: tipo hash destinatario sconosciuto","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Assegnazione badge: identità destinatario errata","BADGE_NOT_FOUND":"Badge non trovato","OUTCOME_NO_DCM_CONFIGURED":"Esito: nessun DCM configurato","OUTCOME_USER_BADGES_DISABLED":"Esito: badge utente disabilitati"}}');const BV=DV({resources:{en:{translation:t(JSON.parse('{"yes":"Yes","no":"No","confirm":"Confirm","apply":"Apply","cancel":"Cancel","show":"Show","hide":"Hide","send":"Send","close":"Close","edit":"Edit","delete":"Delete","loading":"Loading","expand":"Expand","collapse":"Collapse","fullscreenEnter":"Enter fullscreen","fullscreenExit":"Exit fullscreen","center":"Center","bottom":"Bottom","hidden":"Hidden","day":"Day","month":"Month","year":"Year","createdAt":"Creation date","selected":"Selected","page":"page","actions":"Actions","next":"Next","previous":"Previous","copy":"Copy","copyToClipboard":"Copy to clipboard","showOriginalText":"Show original","showTranslatedText":"Show translation","exactPosition":"Exact position","uncertain":"Uncertain","question":"Question","nothingFound":"Nothing found","venue":"Venue","searchVenue":"Search venue...","memoriBlockedTitle":"Blocked","memoriBlockedUntil":"Memori blocked until {{date}}","memoriBlockedAnon":"Currently \\"{{name}}\\" can\'t answer, come back here on {{date}}","memoriBlockedReasonExceedChats":"because it has exceeded the monthly threshold of allowed chats.","memoriBlockedGiverHelper":"You can still manage it as administrator, but other users will not be able to interact with it.","generatedByAI":"Answer generated by AI, may occasionally generate incorrect informations","whyThisAnswer":"Why this answer?","whyThisAnswerHelper":"This answer was generated automatically by an artificial intelligence based on these verified contents.","completionsEnabled":"Advanced AI, can respond with automatically generated answers that may sometimes contain incorrect information","completionProviderDown":"This Twin is integrated with a generative AI from {{provider}}, but it is currently unavailable. Try again later.","completionProviderFallbackName":"an external provider","completionProviderCheckStatusPage":"Check status page","boardOfExperts":"Board of experts","birthDate":"Birth date","birthDateHelper":"We ask for your birth date only to enable or disable functionalities that have age restrictions","underage":"You must be at least {{age}} years old to sign up.","underageTwinSession":"You must be at least {{age}} years old to interact with this Twin.","ageVerification":"Age verification","ageVerificationText":"To interact with this Twin, you must be at least {{minAge}} years old.","nsfw":"NSFW: This Twin contains adult contents","deepThought":"Deep Thought","deepThoughtHelper":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together. Allow the twin\'s author to contact you for commercial offers regarding products you have shown interest in.","deepThoughtDisclaimerTitle":"Deep Thought enabled","deepThoughtDisclaimer":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together.","deepThoughtPreDisclaimerUnlogged":"Log in to enable Deep Thought.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought is disabled since you didn\'t consent its usage, you can change this any time in your account settings.","notEnoughCredits":"The author of this Twin does not have enough credits to answer your question.","knownFacts":{"title":"Known facts","description":"Details of the information shared between you and {{memoriName}}","type":"Type","typeShortTerm":"Short term","typeLongTerm":"Long term","typeHelper":"Types:\\n- Short Term: this Known Fact is always used during conversations\\n- Long Term: this Known Fact is used during conversations only if relevant to the current question","text":"Text","deleteSuccess":"Known fact deleted","deleteConfirmTitle":"Delete known fact","deleteConfirmMessage":"Are you sure you want to delete this known fact?","deleteSelectedConfirmTitle":"Delete selected known facts","deleteSelectedConfirmMessage":"Are you sure you want to delete the selected known facts?"},"auth":{"title":"Authentication","useRecoveryTokens":"Use recovery tokens","tokens":"Tokens","addToken":"Add token","usePassword":"Use password","atLeast":"At least"},"widget":{"instruct":"Instruct","test":"Test","sound":"Sound","position":"Position preferences","settings":"Settings","share":"Share","sendOnKeypress":"Hit Enter to send","sendOnClick":"Click on Submit","boardOfExperts":"Board of experts","showExpertsInTheBoard":"Show experts in this board","expertsInTheBoard":"Experts in this board","goToIntegrationsToCustomizeAvatar":"To customize the avatar, go to Share and customize the public page"},"write_and_speak":{"micButtonPopover":"Click the button to speak","micButtonPopoverListening":"Click the button to stop speak","pageInstructExplanation":"To teach me new things click on the INSTRUCT ME button to get started","pageTryMeExplanation":"To talk to me click on the START button to get started","instructButton":"INSTRUCT ME","tryMeButton":"START","chatHistory":"Chat history","exportChatHistory":"Export chat history","exportChatHistoryMessage":"Do you want to export chat history?","chatBotButtonText":"CLICK HERE TO OPEN CHATBOT","conversationStartedLabel":"Conversation started on","settingsHeaderLabel":"Setup here if you want to set the memori as continuous speech, and change the silence seconds if you want to customize them.","continuousSpeechLabel":"Continuous speech","holdToSpeak":"Hold to speak","releaseToEndListening":"Release to end listening","pressAndHoldToSpeak":"Press and hold to speak","microphoneMode":"Microphone mode","hideEmissionsLabel":"Hide text emitted by the Twin","secondsLabel":"Set seconds","controlsPosition":"Controls position","tryMeHeaderLabel":"TRY","unknownPosition":"Unknown position","fieldPlace":"Write the place (eg \'Milano\')","showMapLinkFor":"Show the position on the map","useMyPosition":"Use my position","myPosition":"Your position","updatingPosition":"Updating position...","placeNotFound":"Place not found!","requirePosition":"Insert your position before start","requirePositionHelp":"To talk to {{name}} you have to decide whether to provide your position or not. This is because different answers that it can provide you may depend on where you are.","dontWantToProvidePosition":"I don\'t want to provide my position","attachmentsLabel":"Enrich your message","iWantToTalkToIn":"I want to talk to {{name}} in"},"media":{"title":"Title","editAttributes":"Edit media attributes","uploadMimeTypeNotAllowed":"The file type is not allowed","uploadSizeLimitMessage":"The uploaded size is too big (max {{size}}MB)","uploadWrongResolutionMessage":"The resolution must be {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"You already have a Twin with this name","uploadHelperImages":"Upload a file with extension png, jpg, jpeg or gif, and having at maximum a size of {{size}}MB","uploadHelper":"Upload a file having at maximum a size of {{size}}MB","uploadError":"Upload failed","square":"square","scaleRatio":"Scale ratio","addMediaLabel":"Add a media","insertThisMediaMsg":"Insert these media","mediaUploadMessage":"Click to load a new media","addLinkLabel":"Add a link","linkKey":"URL","linkValue":"Link title","insertThisLink":"Insert a link to {{url}} with title {{title}}"},"gamification":{"level":"Level","points":"points","memoriReachedLevel":"became more evolved and reached level","levelGoToStatistics":"{{memori}} is at level {{level}} with {{points}} points. Click to go to statistics.","congratulationsNewLevel":"Congratulations, you have reached a new level!","congratulationsNewLevelDescription":"Your Memori became more evolved with {{points}} points, look at the","statistics":"statistics"},"login":{"login":"Login","logout":"Logout","user":"User","loggedDrawerTitle":"Hi, {{name}}!","loginDrawerTitle":"Login","signupDrawerTitle":"Sign up","newUserSignUp":"New user?","signUp":"Sign up!","alreadyHaveAnAccount":"Already have an account?","backToLogin":"Back to login","registrationDisabled":"Registration is disabled","contactAdmin":"Contact the administrator to request access","userNameOrEmail":"Username or email","email":"Email","emailFormatError":"Please, insert a valid email","username":"Username","usernameContainsReservedWord":"Username contains a reserved word, please choose another one","usernameFormatError":"Username must be at least 3 characters long and contain only letters, numbers and _","otpCode":"Verification code","resendVerificationCode":"Resend code","resentVerificationCode":"Confirmation code sent! Please check your email.","password":"Password","newPassword":"New password","confirmPassword":"Confirm Password","currentPassword":"Current password","passwordMatchingError":"Passwords do not match.","passwordFormatError":"Password must be at least 8 characters long and contain at least a number, an upper case letter, a lower case letter and a symbol","pwdWeak":"Weak","pwdAcceptable":"Acceptable","pwdStrong":"Strong","mustChangePassword":"You must change your password","passwordChange":"Change password","emailChange":"Change email","avatarChange":"Change avatar","underage":"You must be at least {{age}} years old to sign up.","optional":"Optional","birthDate":"Birth date","birthDateHelper":"We ask for your birth date only to enable or disable functionalities that have age restrictions","missingData":"Missing informations","missingDataHelper":"We know that this is a bit annoying, but we need some more informations to complete your registration.","goToAccountToChangeYourPreferences":"You can change your choice at any time from your Account page.","deepThoughtExplaination":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together. Allow the twin\'s author to contact you for commercial offers regarding products you have shown interest in.","tnCAndPPAcceptedHelper":"Since your last login, T&C and Privacy Policy have changed. Please accept them, otherwise you won\'t be able to make changes to your Twins. You can always delete your account in your user profile page.","privacyLabel":"I have read and accepted the","privacyAndCookiePolicy":"Privacy e Cookie Policy","and":"and","termsOfService":"Terms of Service","pAndCUAccepted":"I accept the terms of service about Deep Thought","editAccount":"Edit account","save":"Save"},"success":"Success","Error":"Error","internal server error":"Oupsie, sorry... Something went wrong on the server","error":"Error","error.loading":"Error while loading content.","error.generic":"Oupsie, sorry... something went wrong.","error.serverNotResponding":"We are doing maintenance or releasing updates. Please try again later.","error.notFound":"Oupsie, we didn\'t find the page you were looking for.","error.goBackTo":"You can try to go back to the","error.reloadPage":"Reload the page","error.tryAgain":"Try again","error.unauthorized":"You are unauthorized to view this content.","error.unprocessableEntity":"Error while processing the request. Check the data you entered.","errors":{"TENANT_NOT_FOUND":"Tenant not found","TENANT_REGISTRATION_DISABLED":"Registration on this platform is disabled","TENANT_MISSING_NAME":"Tenant: name missing","TENANT_MAX_USERS_REACHED":"Maximum number of users reached","TENANT_MAX_ADMINS_REACHED":"Maximum number of admin users reached","TENANT_ALREADY_EXISTS":"Tenant already exists","TENANT_MISSING_DESCRIPTION":"Tenant: description missing","TENANT_CANT_SET_COMPLETION_PROVIDER":"Tenant: can\'t set completion provider","USER_NOT_CONFIRMED":"User still not confirmed","USER_NOT_FOUND":"User not found","USER_OR_PASSWORD_INVALID":"Invalid user or password","USER_MUST_CHANGE_PASSWORD":"You must change your password","USER_MUST_ENTER_VERIFICATION_CODE":"You must enter the verification code","USER_MISSING_TENANT":"User: missing tenant","USER_MISSING_NAME":"User: name is missing","USER_MISSING_PASSWORD":"User: password missing","USER_MISSING_EMAIL":"User: Missing email","USER_MISSING_VERIFICATION_CODE":"User: Missing verification code","USER_NAME_ALREADY_USED":"User name already in use","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"The password does not meet the security rules","USER_EMAIL_ALREADY_USED":"Email already in use","USER_EMAIL_INVALID":"Invalid email","USER_VERIFICATION_CODE_INVALID":"Invalid verification code","USER_MISSING_NAME_OR_EMAIL":"Missing username or email","USER_NAME_INVALID":"Invalid user name","USER_HAS_ONE_OR_MORE_MEMORI":"The user has one or more memories","USER_MISSING_NEW_PASSWORD":"User: new password missing","USER_NOTHING_TO_DO":"Nothing to do","USER_CANT_CREATE_MEMORI":"User not allowed to create Memori","USER_MAX_MEMORI_REACHED":"Maximum number of Memori reached","USER_TOO_MANY_ATTEMPTS":"Too many attempts","USER_MUST_ACCEPT_TNC_AND_PP":"You must accept the terms and conditions","USER_BIRTH_DATE_CANT_BE_CHANGED":"Date of birth cannot be changed","USER_CANT_SET_COMPLETION_PROVIDER":"User: not allowed to manage completion provider","USER_CANT_ENABLE_DEEP_THOUGHT":"User: not enabled to manage Deep Thought","USER_CANT_ENABLE_DCM_INTEGRATION":"User: not enabled to manage DCM integration","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"User: not allowed to manage chaining or expert group","USER_CREATION_BILLING_DENIED_PERMISSION":"You don\'t have enough credits to create a Twin","MEMORI_NOT_FOUND":"Memori not found","MEMORI_NOT_ACCESSIBLE":"Memori not accessible","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Only owner can change tag or pin","SESSION_NOT_FOUND":"Session not found","SESSION_IS_NOT_ADMINISTRATIVE":"Non-administrative session","SESSION_EXPIRED":"Session expired","MEMORI_MISSING_CONFIGURATION":"Memori: missing configuration","MEMORI_CONFIGURATION_NOT_FOUND":"Memories: configuration not found","MEMORI_INVALID_PRIVACY_TYPE":"Memories: invalid privacy type","MEMORI_MISSING_PASSWORD":"Memori: missing password","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memories: total number of invalid recovery tokens","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memories: minimum number of invalid recovery tokens","MEMORI_INVALID_VOICE_TYPE":"Memories: invalid voice type","MEMORI_MISSING_NAME":"Memories: missing name","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memories: missing password or recovery token","MEMORI_INVALID_ID":"Memories: invalid ID","MEMORI_NAME_ALREADY_USED":"Memory name already in use","MEMORI_INVALID_PIN":"Memories: Invalid PIN","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memories: TAG and PIN change require separate operations","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memories: no password required when public","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Deep Thought requires completions to be enabled","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"The expert group requires completions to be enabled","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transfer: missing destination user","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transfer: invalid destination user ID","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transfer: invalid destination user data","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfer: nothing to do","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memories: configuration cannot be changed","MEMORI_MISSING_NEW_PASSWORD":"Memories: new password missing","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Feature requires subscription","INTEGRATION_NOT_FOUND":"Integration not found","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Invalid date from format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Invalid date to format","INTEGRATION_INVALID_TYPE":"Invalid integration type","INTEGRATION_ALREADY_EXISTS":"Integration already exists","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Non-public memories cannot be integrated","INTEGRATION_MISSING_INVOCATION_TEXT":"Integration: missing invocation text","INTEGRATION_MISSING_DEVICE_EMAILS":"Integration: missing device email","INTEGRATION_MEMORI_IS_EMPTY":"Empty memories cannot be integrated","INTEGRATION_MISSING_PRIVACY_POLICY":"Integration: privacy policy missing","INTEGRATION_MISSING_CATEGORY":"Integration category missing","INTEGRATION_MISSING_DESCRIPTION":"Missing integration description","INTEGRATION_INVALID_INVOCATION_TEXT":"Invalid invocation text","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home no more available","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Upload requires multipart encoding","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: missing content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: maximum size exceeded","UPLOAD_FILE_IS_EMPTY":"Upload: empty file","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: invalid file type or signature","UPLOAD_MISSING_FILE_NAME":"Upload: missing file name","UPLOAD_INVALID_MEMORY_ID":"Upload: Invalid content ID","UPLOAD_MISSING_FILE_CONTENT":"Upload: Missing file content","ASSET_NOT_FOUND":"Asset not found","ASSET_NOT_ACCESSIBLE":"Asset not accessible","ASSET_MISSING_SESSION_ID":"Asset: missing session ID","ASSET_INVALID_FILE_NAME":"Asset: invalid file name","INVITATION_NOT_FOUND":"Invitation not found","INVITATION_NOT_ACCESSIBLE":"Invitation not accessible","INVITATION_ALREADY_ACCEPTED":"Invitation already accepted","INVITATION_ALREADY_REJECTED":"Invitation already rejected","INVITATION_MISSING_DESTINATION_EMAIL":"Invitation: missing destination email","INVITATION_DESTINATION_EMAIL_INVALID":"Invitation: destination email invalid","INVITATION_MISSING_TAG":"Invitation: missing tag","INVITATION_MISSING_PIN":"Invitation: PIN missing","INVITATION_INVALID_PIN":"Invitation: invalid PIN","INVITATION_INVALID_TYPE":"Invitation: invalid type","INVITATION_MISSING_DESTINATION_NAME":"Invitation: destination name missing","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitation: tag and pin can\'t be changed","INVITATION_CANT_BE_CHANGED":"Intation: can\'t be changed","ACTIONLOG_INVALID_USER_ID":"Invalid user ID","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","ACTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","CONSUMPTIONLOG_INVALID_TYPE":"Invalid log type","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","CONSUMPTIONLOG_INVALID_USER_ID":"Invalid user ID","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifications: Invalid chat log extraction period","PROCESS_INVALID_TYPE":"Invalid process type","PROCESS_ALREADY_RUNNING":"Process already running","PROCESS_NOT_FOUND":"Process not found","IMPORTCSV_MISSING_ROWS":"CSV import: missing rows","IMPORTCSV_MISSING_CSV":"CSV Import: Missing CSV","IMPORTCSV_MISSING_SEPARATOR":"CSV import: missing separator","IMPORTCSV_INVALID_SEPARATOR":"CSV import: invalid separator","IMPORTCSV_MISSING_HEADERS":"CSV import: missing headers","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV import: missing title variant separator","IMPORTCSV_INVALID_RECEIVER_ID":"CSV import: invalid receiver ID","IMPORTCSV_INVALID_MEDIA_LINK":"CSV import: invalid media link","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"CSV import: undetectable character encoding","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"CSV Import: Cannot import to Secret Memories","IMPORTTXT_MISSING_ROWS":"Importing TXT: missing rows","IMPORTTXT_INVALID_GRANULARITY":"Import TXT: invalid granularity","IMPORTTXT_INVALID_RECEIVER_ID":"Import TXT: invalid receiver ID","IMPORTTXT_INVALID_MEDIA_LINK":"Import TXT: invalid media link","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"TXT import: undetectable character encoding","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"TXT Import: Cannot import to Secret Memories","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Import TXT: import limit exceeded","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Import TXT: import on GPT-4 requires API key","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Import TXT: Import requires a paying plan","IMPORTTXT_BILLING_DENIED_PERMISSION":"Import TXT: you don\'t have enough credits for the operation","EXPORTCSV_MISSING_CSV_SPECS":"CSV export: missing CSV specifications","EXPORTCSV_MISSING_SEPARATOR":"CSV export: missing separator","EXPORTCSV_INVALID_SEPARATOR":"CSV export: invalid separator","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV export: missing title variant separator","EXPORTCSV_MISSING_NEW_LINE_CHAR":"CSV export: missing newline character","EXPORTCSV_INVALID_NEW_LINE_CHAR":"CSV export: invalid newline character","EXPORTCSV_MISSING_PASSWORD":"CSV export: missing password","EXPORTJSONL_MISSING_JSONL_SPECS":"JSONL export: missing JSONL specifications","EXPORTJSONL_MISSING_PLATFORM":"JSONL export: missing platform","EXPORTJSONL_INVALID_PLATFORM":"JSONL export: invalid platform","EXPORTJSONL_MISSING_PASSWORD":"JSONL export: missing password","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"JSONL Export: Export requires a paid plan","ANALYSIS_MISSING_QUERY":"Analysis: missing query","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analysis: Unable to analyze Secret Memories","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analysis: matching user query requires Deep Thinking","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Badge assignment: incorrect or missing credentials","BADGE_ASSIGNMENT_MISSING_REF_ID":"Badge assignment: ref ID missing","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Badge assignment: result not found","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Badge assignment: Missing assertion URL","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Badge Assignment: Missing Badge URL","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Badge assignment: missing issuer URL","BADGE_ASSIGNMENT_INVALID_URL":"Badge assignment: Invalid URL","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Badge assignment: missing recipient","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Badge assignment: unknown recipient type","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Badge assignment: missing recipient identity","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Badge assignment: missing recipient hash type","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Badge assignment: recipient hash type unknown","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Badge assignment: incorrect recipient identity","BADGE_NOT_FOUND":"Badge not found","OUTCOME_NO_DCM_CONFIGURED":"Result: no DCM configured","OUTCOME_USER_BADGES_DISABLED":"Result: user badges disabled"}}'))},it:{translation:t(LV)}},lng:"en",fallbackLng:"it",supportedLngs:["en","it"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1}});BV.init();var zV=BV;c=o("85Hg2");function FV(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=(0,c.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,c.createElement)(ae.Provider,{value:i},r)}const UV=({ownerUserName:e,ownerUserID:t,memoriName:n,memoriID:r,integrationID:i,tenantID:o,secretToken:a,sessionID:l,layout:u="DEFAULT",customLayout:d,showShare:h=!0,showSettings:p=!0,showInstruct:f=!1,showTypingText:m=!1,showClear:g=!1,showOnlyLastMessages:v=!1,showInputs:y=!0,showDates:b=!1,showContextPerLine:x=!1,showLogin:S,height:w="100%",baseURL:_,apiURL:C="https://backend.memori.ai",tag:A,pin:E,context:T,initialQuestion:M,uiLang:I,spokenLang:R,multilingual:P,authToken:k,AZURE_COGNITIVE_SERVICES_TTS_KEY:O,defaultSpeakerActive:N=!0,onStateChange:L,additionalInfo:D,customMediaRenderer:B,additionalSettings:z,userAvatar:F})=>{var U,j,H;const[V,G]=(0,c.useState)(),[W,q]=(0,c.useState)(),[K,J]=(0,c.useState)(O),{t:Q}=Se();if(!(r&&t||n&&e))throw new Error("Identifier pair required: please provide either memoriID and ownerUserID or memoriName and ownerUserName");const Z=Y(C),X=(0,c.useCallback)((async()=>{const e=_||(o.startsWith("https://")?o:`https://${o}`),t=await fetch(`${e}/api/speechkey`),n=await t.json();n.AZURE_COGNITIVE_SERVICES_TTS_KEY&&J(n.AZURE_COGNITIVE_SERVICES_TTS_KEY)}),[]);(0,c.useEffect)((()=>{O||X()}),[O]);const $=(0,c.useCallback)((async()=>{if(r&&t){const{memori:e,...n}=await Z.backend.getMemoriByUserAndId(o,t,r);0===n.resultCode&&e?G(e):console.error("[MEMORI]",n,e)}else if(n&&e){const{memori:t,...r}=await Z.backend.getMemori(o,e,n);0===r.resultCode&&t?G(t):console.error("[MEMORI]",r,t)}}),[r,t,n,e,o]);(0,c.useEffect)((()=>{$()}),[$,o]);const ee=(0,c.useCallback)((async()=>{const e=await gH(o,_);e&&q(e)}),[o,C]);(0,c.useEffect)((()=>{ee()}),[ee]),(0,c.useEffect)((()=>{if(I)zV.changeLanguage(I.toLowerCase());else{const{lng:e,fallbackLng:t}=(()=>{const e=navigator.language;if(e){let t=e.split("-")[0];if(["en","it"].includes(t))return{lng:t,fallbackLng:"en"===t?"it":"en"}}return{lng:"en",fallbackLng:"it"}})();zV.changeLanguage(e).catch((()=>{zV.changeLanguage(t)}))}}),[I]),(0,c.useEffect)((()=>{window.MathJax={startup:{elements:[".memori-chat--bubble-content"]},options:{processHtmlClass:"memori-chat--bubble-content"},tex:{inlineMath:[["$","$"],["\\$","\\$"],["(","\\)"],["\\(",")"],["(",")"],["[","\\]"],["[","]"],["\\(","\\)"],["\\[","\\]"],["\\\\[","\\\\]"],["\\\\\\[","\\\\\\]"],["((","))"]],displayMath:[["$$","$$"],["\\[[","\\]]"],["\\\\[[","\\\\]]"],["\\\\\\[[","\\\\\\]]"]],processEscapes:!1},asciimath:{fixphi:!0,displaystyle:!0,decimalsign:"."},skipStartupTypeset:!0,chtml:{displayAlign:"left"},svg:{fontCache:"global"}};const e=document.createElement("script");e.src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js",e.async=!0,e.id="mathjax-script",document.head.appendChild(e)}),[]);const te=V?(0,s.jsx)(fH,{layout:u,customLayout:d,height:w,baseUrl:_||(o.startsWith("https://")?o:`https://${o}`),apiUrl:C,memori:{...V,secretToken:a},ownerUserName:null!=e?e:V.ownerUserName,ownerUserID:null!=t?t:V.ownerUserID,tenantID:o,memoriLang:null!=R?R:null===(j=null===(U=V.culture)||void 0===U?void 0:U.split("-"))||void 0===j?void 0:j[0],multilingual:P,tenant:W,secret:a,sessionID:l,showShare:h,showSettings:p,showInstruct:f,showTypingText:m,showClear:g,showOnlyLastMessages:v,showInputs:y,showDates:b,showContextPerLine:x,showLogin:null!=S?S:null==V?void 0:V.enableDeepThought,integration:null===(H=null==V?void 0:V.integrations)||void 0===H?void 0:H.find((e=>i?e.integrationID===i:!!e.publish&&"LANDING_EXPERIENCE"===e.type)),initialContextVars:T,initialQuestion:M,authToken:k,AZURE_COGNITIVE_SERVICES_TTS_KEY:K||O,defaultSpeakerActive:N,onStateChange:L,additionalInfo:D,customMediaRenderer:B,additionalSettings:z,userAvatar:F,...A&&E?{personification:{tag:A,pin:E}}:{}}):(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,s.jsxs)("p",{style:{textAlign:"center",margin:"2rem auto",textTransform:"capitalize"},children:[Q("loading")||"Loading","..."]})});return(0,s.jsxs)(FV,{i18n:zV,children:[(0,s.jsx)(Ju.Toaster,{position:"top-center",reverseOrder:!0}),te]})};UV.propTypes={memoriName:t(l).string,memoriID:t(l).string,ownerUserName:t(l).string,ownerUserID:t(l).string,integrationID:t(l).string,tenantID:t(l).string.isRequired,secretToken:t(l).string,sessionID:t(l).string,layout:t(l).oneOf(["DEFAULT","FULLPAGE","TOTEM","WEBSITE_ASSISTANT","CHAT"]),customLayout:t(l).any,showShare:t(l).bool,showInstruct:t(l).bool,showInputs:t(l).bool,showDates:t(l).bool,showContextPerLine:t(l).bool,showSettings:t(l).bool,showClear:t(l).bool,showOnlyLastMessages:t(l).bool,showTypingText:t(l).bool,showLogin:t(l).bool,height:t(l).oneOfType([t(l).string,t(l).number]),baseURL:t(l).string,apiURL:t(l).string,tag:t(l).string,pin:t(l).string,context:t(l).objectOf(t(l).any),initialQuestion:t(l).string,uiLang:t(l).oneOf(["en","it","EN","IT"]),spokenLang:t(l).string,multilingual:t(l).bool,authToken:t(l).string,AZURE_COGNITIVE_SERVICES_TTS_KEY:t(l).string,defaultSpeakerActive:t(l).bool,onStateChange:t(l).func,additionalInfo:t(l).objectOf(t(l).any),customMediaRenderer:t(l).func,additionalSettings:t(l).any,userAvatar:t(l).oneOfType([t(l).string,t(l).any])};var jV=UV;class HV extends HTMLElement{connectedCallback(){const e=document.createElement("div"),n=document.createElement("div");n.setAttribute("id","memori-root"),e.appendChild(n),this.appendChild(e);const r=Object.keys(jV.propTypes).reduce(((e,t)=>(this.hasAttribute(t)&&(e[t]=this.getAttribute(t),"true"!==e[t]&&"false"!==e[t]||(e[t]="true"===e[t])),e)),{}),i=this.getAttribute("tenantId"),o=this.getAttribute("context")?.split(",")?.reduce(((e,t)=>{const[n,r]=t.split(":").map((e=>e.trim()));return{...e,[n]:r}}),{}),l=(e=>{try{return JSON.parse(e)}catch(e){return null}})(this.getAttribute("additionalInfo")||"{}")||{};i?t(a).render((0,s.jsx)(jV,{...r,context:o,tenantID:i,additionalInfo:l}),n):console.error("No tenantId attribute found")}}customElements.define("memori-client",HV)})();
250
+ */function JU(e,t=0){const n=[];return e.forEach((function(e,r){let i=null;e.forEach((function(o,s){if(!o&&null!==i)return n.push(`M${i+t} ${r+t}h${s-i}v1H${i+t}z`),void(i=null);if(s!==e.length-1)o&&null===i&&(i=s);else{if(!o)return;null===i?n.push(`M${s+t},${r+t} h1v1H${s+t}z`):n.push(`M${i+t},${r+t} h${s+1-i}v1H${i+t}z`)}}))})),n.join("")}function QU(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function YU(e,t,n,r){if(null==r)return null;const i=n?4:0,o=e.length+2*i,s=Math.floor(.1*t),a=o/t,l=(r.width||s)*a,c=(r.height||s)*a,u=null==r.x?e.length/2-l/2:r.x*a,d=null==r.y?e.length/2-c/2:r.y*a;let h=null;if(r.excavate){let e=Math.floor(u),t=Math.floor(d);h={x:e,y:t,w:Math.ceil(l+u-e),h:Math.ceil(c+d-t)}}return{x:u,y:d,h:c,w:l,excavation:h}}var ZU=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function XU(e){const n=e,{value:r,size:i=VU,level:o=GU,bgColor:s=WU,fgColor:a=qU,includeMargin:l=KU,style:u,imageSettings:d}=n,h=UU(n,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),p=null==d?void 0:d.src,f=(0,c.useRef)(null),m=(0,c.useRef)(null),[g,v]=(0,c.useState)(!1);(0,c.useEffect)((()=>{if(null!=f.current){const e=f.current,t=e.getContext("2d");if(!t)return;let n=jU.QrCode.encodeText(r,HU[o]).getModules();const c=l?4:0,u=n.length+2*c,h=YU(n,i,l,d),p=m.current,g=null!=h&&null!==p&&p.complete&&0!==p.naturalHeight&&0!==p.naturalWidth;g&&null!=h.excavation&&(n=QU(n,h.excavation));const v=window.devicePixelRatio||1;e.height=e.width=i*v;const y=i/u*v;t.scale(y,y),t.fillStyle=s,t.fillRect(0,0,u,u),t.fillStyle=a,ZU?t.fill(new Path2D(JU(n,c))):n.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+c,n+c,1,1)}))})),g&&t.drawImage(p,h.x+c,h.y+c,h.w,h.h)}})),(0,c.useEffect)((()=>{v(!1)}),[p]);const y=FU({height:i,width:i},u);let b=null;return null!=p&&(b=t(c).createElement("img",{src:p,key:p,style:{display:"none"},onLoad:()=>{v(!0)},ref:m})),t(c).createElement(t(c).Fragment,null,t(c).createElement("canvas",FU({style:y,height:i,width:i,ref:f},h)),b)}var $U=({tenant:e,url:n,title:r="",className:i,baseUrl:o,primary:a=!0,showQrCode:l=!0,align:u="right"})=>{const{t:d}=Se(),[h,p]=(0,c.useState)(n),f=(0,c.useMemo)((()=>(null==e?void 0:e.theme)?`${null!=o?o:"https://aisuru.com"}/images/${e.theme}/square_logo.png`:`${null!=o?o:"https://aisuru.com"}/images/memori_logo.png`),[e,o]);(0,c.useEffect)((()=>{n||p(window.location.href)}),[n]);const m=[{id:"facebook",title:"Facebook",url:`https://www.facebook.com/sharer/sharer.php?u=${h}`,icon:AU},{id:"twitter",title:"Twitter",url:`https://twitter.com/intent/tweet?url=${h}`,icon:EU},{id:"linkedin",title:"LinkedIn",url:`https://www.linkedin.com/shareArticle?mini=true&title=${r}&url=${h}`,icon:TU},{id:"whatsapp",title:"Whatsapp",url:`https://api.whatsapp.com/send?phone=&text=${h}`,icon:MU},{id:"telegram",title:"Telegram",url:`https://t.me/share/url?text=${r}&url=${h}`,icon:OU},{id:"email",title:"Email",url:`mailto:?subject=${(null==r?void 0:r.length)>0?r:n}&body=${h}`,icon:IU}];return(0,s.jsxs)(Ov,{as:"div",className:t(ws)("memori-share-button",{"memori-share-button--align-left":"left"===u}),children:[(0,s.jsx)(Ov.Button,{className:t(ws)("memori-button","memori-button--circle","memori-button--icon-only","memori-share-button--button",i,{"memori-button--primary":a}),title:d("widget.share")||void 0,children:(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(RU,{})})}),(0,s.jsxs)(Ov.Items,{className:"memori-share-button--overlay",as:"ul",children:[(0,s.jsx)(Ov.Item,{as:"li",className:"memori-share-button--li",children:(0,s.jsx)(Sf,{className:"memori-share-button--link",ghost:!0,icon:(0,s.jsx)(ax,{}),onClick:()=>{h&&navigator.clipboard.writeText(h)},children:d("copyToClipboard")||void 0})},"copy"),m.map((e=>{var n;return(0,s.jsx)(Ov.Item,{as:"li",className:"memori-share-button--li",children:(0,s.jsxs)("a",{className:t(ws)("memori-button","memori-button--with-icon","memori-button--ghost","memori-button--padded","memori-share-button--link"),href:null!==(n=e.url)&&void 0!==n?n:"",target:"_blank",rel:"noopener noreferrer",children:[(0,s.jsx)("div",{className:"memori-button--icon",children:(0,s.jsx)(e.icon,{})}),e.title]})},e.id)})),l&&(0,s.jsxs)(Ov.Item,{as:"li",className:"memori-share-button--li-qr-code",children:[(0,s.jsx)(XU,{id:"qr-canvas",value:null!=h?h:"",size:128,bgColor:"#ffffff",fgColor:"#000000",level:"H",includeMargin:!1,imageSettings:{src:f,x:void 0,y:void 0,height:32,width:32,excavate:!0}}),(0,s.jsx)("div",{children:(0,s.jsx)(Sf,{onClick:()=>{const e=document.getElementById("qr-canvas");if(!e)return;const t=document.createElement("a");t.href=e.toDataURL(),t.download=`memori-${r}-share.png`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},icon:(0,s.jsx)(PU,{}),title:"Download QR",children:"Download"})})]},"qrcode")]})]})};var ej=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M290 236.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0 0 13.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 0 0 0 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 0 0-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z"})});var tj=({className:e,title:t})=>(0,s.jsxs)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",focusable:"false",role:"img",className:e,fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2","aria-label":t,children:[(0,s.jsx)("path",{d:"M23 4L23 10 17 10"}),(0,s.jsx)("path",{d:"M1 20L1 14 7 14"}),(0,s.jsx)("path",{d:"M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"})]});var nj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M899.1 869.6l-53-305.6H864c14.4 0 26-11.6 26-26V346c0-14.4-11.6-26-26-26H618V138c0-14.4-11.6-26-26-26H432c-14.4 0-26 11.6-26 26v182H160c-14.4 0-26 11.6-26 26v192c0 14.4 11.6 26 26 26h17.9l-53 305.6c-.3 1.5-.4 3-.4 4.4 0 14.4 11.6 26 26 26h723c1.5 0 3-.1 4.4-.4 14.2-2.4 23.7-15.9 21.2-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H416V674c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v156H202.8l45.1-260H776l45.1 260H672z"})});var rj=({className:e,memori:n,tenant:r,history:i,position:o,setShowPositionDrawer:a,setShowSettingsDrawer:l,setShowKnownFactsDrawer:u,setShowExpertsDrawer:d,speakerMuted:h,setSpeakerMuted:p,hasUserActivatedSpeak:f=!1,showShare:m=!0,showSettings:g=!0,showSpeaker:v=!0,showReload:y=!1,showClear:b=!1,showLogin:x=!0,setShowLoginDrawer:S,clearHistory:w,loginToken:_,user:C,sessionID:A})=>{const{t:E}=Se(),[T,M]=(0,c.useState)(!1),[I,R]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{document.fullscreenEnabled&&M(!0)}),[]),(0,s.jsxs)("div",{className:t(ws)("memori-header",e),children:[n.needsPosition&&o&&(0,s.jsxs)("div",{className:"memori-header--position",children:[0!==o.latitude&&0!==o.longitude&&(0,s.jsx)("span",{className:"memori-header--position-placeName",children:o.placeName}),(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--position",title:E("widget.position")||"Position",icon:(0,s.jsx)(lS,{}),onClick:()=>a(!0)})]}),y&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--reload",title:E("reload")||"Reload",icon:(0,s.jsx)(tj,{}),onClick:()=>{window.location.reload()}}),b&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--clear",title:E("clearHistory")||"Clear chat",icon:(0,s.jsx)(nj,{}),onClick:w}),T&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--fullscreen",title:I?E("fullscreenExit")||"Exit fullscreen":E("fullscreenEnter")||"Enter fullscreen",icon:I?(0,s.jsx)(qx,{}):(0,s.jsx)(ej,{}),onClick:()=>{document.fullscreenElement?document.exitFullscreen&&(document.exitFullscreen(),R(!1)):(document.documentElement.requestFullscreen(),R(!0))}}),n.enableDeepThought&&!!_&&(null==C?void 0:C.pAndCUAccepted)&&(0,s.jsx)(Sf,{primary:!!A&&!!f,shape:"circle",icon:(0,s.jsx)(sS,{}),className:"memori-header--button memori-header--button--knownfacts",disabled:!f||!A,onClick:()=>u(!0),title:E("knownFacts.title")||"Known facts"}),n.enableBoardOfExperts&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",icon:(0,s.jsx)(oS,{}),className:"memori-header--button memori-header--button--experts",disabled:!f||!A,onClick:()=>d(!0),title:E("widget.showExpertsInTheBoard")||"Experts in this board"}),v&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button--speaker",icon:h?(0,s.jsx)(eU,{}):(0,s.jsx)(nU,{}),onClick:()=>p(!h),title:E("widget.sound")||"Sound"}),(0,s.jsx)(_U,{history:i,memori:n,className:"memori-header--button memori-header--button--export",disabled:!f||0===i.length}),g&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button-settings",icon:(0,s.jsx)(CU,{}),onClick:()=>l(!0),title:E("widget.settings")||"Settings"}),m&&(0,s.jsx)($U,{className:"memori-header--button memori-header--button-share",title:n.name,tenant:r,showQrCode:!0,align:"left"}),x&&(0,s.jsx)(Sf,{primary:!0,shape:"circle",className:"memori-header--button memori-header--button-login",icon:(0,s.jsx)(mv,{}),onClick:()=>S(!0),title:_?E("login.user")||"User":E("login.login")||"Login"})]})};var ij=({tenant:e,userLang:t="en",integrationID:n,memoriHash:r})=>{const i="memorytwin"===(null==e?void 0:e.theme)?"memorytwin":"twincreator"===(null==e?void 0:e.theme)?"twincreator":"aisuru";return(0,s.jsxs)("div",{className:"memori--powered-by",children:[(0,s.jsx)("img",{src:`https://aisuru.com/images/${i}/logo.png`,alt:""}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"sr-only",children:"Powered by"}),(0,s.jsx)("a",{href:`https://memori.ai/${"it"===(null==t?void 0:t.toLowerCase())?"it":"en"}${n?`?integrationID=${n}`:""}${r?`${n?"&":"?"}memori=${r}`:""}`,target:"_blank",rel:"noopener noreferrer",children:"Memori.AI"})]})]})},oj=(c=o("85Hg2"),c=o("85Hg2"),(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(oj||{})),sj=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(sj||{}),aj=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(aj||{}),lj=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.SetDisabled=2]="SetDisabled",e[e.SetOrientation=3]="SetOrientation",e[e.GoToOption=4]="GoToOption",e[e.Search=5]="Search",e[e.ClearSearch=6]="ClearSearch",e[e.RegisterOption=7]="RegisterOption",e[e.UnregisterOption=8]="UnregisterOption",e))(lj||{});function cj(e,t=(e=>e)){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=Cp(t(e.options.slice()),(e=>e.dataRef.current.domRef.current)),i=n?r.indexOf(n):null;return-1===i&&(i=null),{options:r,activeOptionIndex:i}}let uj={1:e=>e.disabled||1===e.listboxState?e:{...e,activeOptionIndex:null,listboxState:1},0(e){if(e.disabled||0===e.listboxState)return e;let t=e.activeOptionIndex,{value:n,mode:r,compare:i}=e.propsRef.current,o=e.options.findIndex((e=>{let t=e.dataRef.current.value;return lh(r,{1:()=>n.some((e=>i(e,t))),0:()=>i(n,t)})}));return-1!==o&&(t=o),{...e,listboxState:0,activeOptionIndex:t}},2:(e,t)=>e.disabled===t.disabled?e:{...e,disabled:t.disabled},3:(e,t)=>e.orientation===t.orientation?e:{...e,orientation:t.orientation},4(e,t){var n;if(e.disabled||1===e.listboxState)return e;let r=cj(e),i=pm(t,{resolveItems:()=>r.options,resolveActiveIndex:()=>r.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeOptionIndex:i,activationTrigger:null!=(n=t.trigger)?n:1}},5:(e,t)=>{if(e.disabled||1===e.listboxState)return e;let n=""!==e.searchQuery?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find((e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))})),o=i?e.options.indexOf(i):-1;return-1===o||o===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:o,activationTrigger:1}},6:e=>e.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},7:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},r=cj(e,(e=>[...e,n]));if(null===e.activeOptionIndex){let{value:i,mode:o,compare:s}=e.propsRef.current,a=t.dataRef.current.value;lh(o,{1:()=>i.some((e=>s(e,a))),0:()=>s(i,a)})&&(r.activeOptionIndex=r.options.indexOf(n))}return{...e,...r}},8:(e,t)=>{let n=cj(e,(e=>{let n=e.findIndex((e=>e.id===t.id));return-1!==n&&e.splice(n,1),e}));return{...e,...n,activationTrigger:1}}},dj=(0,c.createContext)(null);function hj(e){let t=(0,c.useContext)(dj);if(null===t){let t=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,hj),t}return t}function pj(e,t){return lh(t.type,uj,e,t)}dj.displayName="ListboxContext";let fj=c.Fragment,mj=mh((function(e,n){let{value:r,defaultValue:i,name:o,onChange:s,by:a=((e,t)=>e===t),disabled:l=!1,horizontal:u=!1,multiple:d=!1,...h}=e;const p=u?"horizontal":"vertical";let f=Ph(n),[m,g]=ym(r,s,i),v=(0,c.useReducer)(pj,{listboxState:1,propsRef:{current:{value:m,onChange:g,mode:d?1:0,compare:Mh("string"==typeof a?(e,t)=>{let n=a;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:a)}},labelRef:(0,c.createRef)(),buttonRef:(0,c.createRef)(),optionsRef:(0,c.createRef)(),disabled:l,orientation:p,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1}),[{listboxState:y,propsRef:b,optionsRef:x,buttonRef:S},w]=v;b.current.value=m,b.current.mode=d?1:0,_h((()=>{b.current.onChange=e=>lh(b.current.mode,{0:()=>g(e),1(){let t=b.current.value.slice(),{compare:n}=b.current,r=t.findIndex((t=>n(t,e)));return-1===r?t.push(e):t.splice(r,1),g(t)}})}),[g,b]),_h((()=>w({type:2,disabled:l})),[l]),_h((()=>w({type:3,orientation:p})),[p]),rf([S,x],((e,t)=>{var n;w({type:1}),xp(t,bp.Loose)||(e.preventDefault(),null==(n=S.current)||n.focus())}),0===y);let _=(0,c.useMemo)((()=>({open:0===y,disabled:l,value:m})),[y,l,m]),C={ref:f};return t(c).createElement(dj.Provider,{value:v},t(c).createElement(Sh,{value:lh(y,{0:bh.Open,1:bh.Closed})},null!=o&&null!=m&&fm({[o]:m}).map((([e,n])=>t(c).createElement(dp,{features:up.Hidden,...gh({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,name:e,value:n})}))),hh({ourProps:C,theirProps:h,slot:_,defaultTag:fj,name:"Listbox"})))})),gj=mh((function(e,t){var n;let[r,i]=hj("Listbox.Button"),o=Ph(r.buttonRef,t),s=`headlessui-listbox-button-${cp()}`,a=Uh(),l=Mh((e=>{switch(e.key){case ip.Space:case ip.Enter:case ip.ArrowDown:e.preventDefault(),i({type:0}),a.nextFrame((()=>{r.propsRef.current.value||i({type:4,focus:hm.First})}));break;case ip.ArrowUp:e.preventDefault(),i({type:0}),a.nextFrame((()=>{r.propsRef.current.value||i({type:4,focus:hm.Last})}))}})),u=Mh((e=>{if(e.key===ip.Space)e.preventDefault()})),d=Mh((e=>{if(op(e.currentTarget))return e.preventDefault();0===r.listboxState?(i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(e.preventDefault(),i({type:0}))})),h=lm((()=>{if(r.labelRef.current)return[r.labelRef.current.id,s].join(" ")}),[r.labelRef.current,s]),p=(0,c.useMemo)((()=>({open:0===r.listboxState,disabled:r.disabled,value:r.propsRef.current.value})),[r]),f=e;return hh({ourProps:{ref:o,id:s,type:um(e,r.buttonRef),"aria-haspopup":!0,"aria-controls":null==(n=r.optionsRef.current)?void 0:n.id,"aria-expanded":r.disabled?void 0:0===r.listboxState,"aria-labelledby":h,disabled:r.disabled,onKeyDown:l,onKeyUp:u,onClick:d},theirProps:f,slot:p,defaultTag:"button",name:"Listbox.Button"})})),vj=mh((function(e,t){let[n]=hj("Listbox.Label"),r=`headlessui-listbox-label-${cp()}`;return hh({ourProps:{ref:Ph(n.labelRef,t),id:r,onClick:Mh((()=>{var e;return null==(e=n.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))},theirProps:e,slot:(0,c.useMemo)((()=>({open:0===n.listboxState,disabled:n.disabled})),[n]),defaultTag:"label",name:"Listbox.Label"})})),yj=uh.RenderStrategy|uh.Static,bj=mh((function(e,t){var n;let[r,i]=hj("Listbox.Options"),o=Ph(r.optionsRef,t),s=`headlessui-listbox-options-${cp()}`,a=Uh(),l=Uh(),u=xh(),d=null!==u?u===bh.Open:0===r.listboxState;(0,c.useEffect)((()=>{var e;let t=r.optionsRef.current;!t||0===r.listboxState&&t!==(null==(e=hp(t))?void 0:e.activeElement)&&t.focus({preventScroll:!0})}),[r.listboxState,r.optionsRef]);let h=Mh((e=>{switch(l.dispose(),e.key){case ip.Space:if(""!==r.searchQuery)return e.preventDefault(),e.stopPropagation(),i({type:5,value:e.key});case ip.Enter:if(e.preventDefault(),e.stopPropagation(),null!==r.activeOptionIndex){let{dataRef:e}=r.options[r.activeOptionIndex];r.propsRef.current.onChange(e.current.value)}0===r.propsRef.current.mode&&(i({type:1}),Nh().nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})})));break;case lh(r.orientation,{vertical:ip.ArrowDown,horizontal:ip.ArrowRight}):return e.preventDefault(),e.stopPropagation(),i({type:4,focus:hm.Next});case lh(r.orientation,{vertical:ip.ArrowUp,horizontal:ip.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),i({type:4,focus:hm.Previous});case ip.Home:case ip.PageUp:return e.preventDefault(),e.stopPropagation(),i({type:4,focus:hm.First});case ip.End:case ip.PageDown:return e.preventDefault(),e.stopPropagation(),i({type:4,focus:hm.Last});case ip.Escape:return e.preventDefault(),e.stopPropagation(),i({type:1}),a.nextFrame((()=>{var e;return null==(e=r.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));case ip.Tab:e.preventDefault(),e.stopPropagation();break;default:1===e.key.length&&(i({type:5,value:e.key}),l.setTimeout((()=>i({type:6})),350))}})),p=lm((()=>{var e,t,n;return null!=(n=null==(e=r.labelRef.current)?void 0:e.id)?n:null==(t=r.buttonRef.current)?void 0:t.id}),[r.labelRef.current,r.buttonRef.current]),f=(0,c.useMemo)((()=>({open:0===r.listboxState})),[r]),m=e;return hh({ourProps:{"aria-activedescendant":null===r.activeOptionIndex||null==(n=r.options[r.activeOptionIndex])?void 0:n.id,"aria-multiselectable":1===r.propsRef.current.mode||void 0,"aria-labelledby":p,"aria-orientation":r.orientation,id:s,onKeyDown:h,role:"listbox",tabIndex:0,ref:o},theirProps:m,slot:f,defaultTag:"ul",features:yj,visible:d,name:"Listbox.Options"})})),xj=mh((function(e,t){let{disabled:n=!1,value:r,...i}=e,[o,s]=hj("Listbox.Option"),a=`headlessui-listbox-option-${cp()}`,l=null!==o.activeOptionIndex&&o.options[o.activeOptionIndex].id===a,{value:u,compare:d}=o.propsRef.current,h=lh(o.propsRef.current.mode,{1:()=>u.some((e=>d(e,r))),0:()=>d(u,r)}),p=(0,c.useRef)(null),f=Ph(t,p);_h((()=>{if(0!==o.listboxState||!l||0===o.activationTrigger)return;let e=Nh();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=p.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[p,l,o.listboxState,o.activationTrigger,o.activeOptionIndex]);let m=(0,c.useRef)({disabled:n,value:r,domRef:p});_h((()=>{m.current.disabled=n}),[m,n]),_h((()=>{m.current.value=r}),[m,r]),_h((()=>{var e,t;m.current.textValue=null==(t=null==(e=p.current)?void 0:e.textContent)?void 0:t.toLowerCase()}),[m,p]);let g=Mh((()=>o.propsRef.current.onChange(r)));_h((()=>(s({type:7,id:a,dataRef:m}),()=>s({type:8,id:a}))),[m,a]);let v=Mh((e=>{if(n)return e.preventDefault();g(),0===o.propsRef.current.mode&&(s({type:1}),Nh().nextFrame((()=>{var e;return null==(e=o.buttonRef.current)?void 0:e.focus({preventScroll:!0})})))})),y=Mh((()=>{if(n)return s({type:4,focus:hm.Nothing});s({type:4,focus:hm.Specific,id:a})})),b=Mh((()=>{n||l||s({type:4,focus:hm.Specific,id:a,trigger:0})})),x=Mh((()=>{n||!l||s({type:4,focus:hm.Nothing})})),S=(0,c.useMemo)((()=>({active:l,selected:h,disabled:n})),[l,h,n]);return hh({ourProps:{id:a,ref:f,role:"option",tabIndex:!0===n?void 0:-1,"aria-disabled":!0===n||void 0,"aria-selected":h,disabled:void 0,onClick:v,onFocus:y,onPointerMove:b,onMouseMove:b,onPointerLeave:x,onMouseLeave:x},theirProps:i,slot:S,defaultTag:"li",name:"Listbox.Option"})})),Sj=Object.assign(mj,{Button:gj,Label:vj,Options:bj,Option:xj});var wj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",focusable:"false",role:"img",className:e,fill:"currentColor","aria-label":t,children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z",clipRule:"evenodd"})});const _j={en:["January","February","March","April","May","June","July","August","September","October","November","December"],it:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"]},Cj=(0,c.memo)((({defaultDate:e,onChange:t,disabled:n=!1})=>{const{t:r,i18n:i}=Se(),[o,a]=(0,c.useState)(e?"string"==typeof e?_s.DateTime.fromISO(e):_s.DateTime.fromJSDate(e):_s.DateTime.now());return(0,c.useEffect)((()=>{t(o)}),[o,t]),(0,s.jsxs)("div",{className:"memori--date-selector",children:[(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Sj,{value:o,onChange:e=>{a(e)},disabled:n,name:"day",children:[(0,s.jsxs)(Sj.Label,{className:"memori--date-selector__select-label",children:[r("day"),":"]}),(0,s.jsxs)(Sj.Button,{"aria-label":r("day"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:o.day}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(wj,{})})]}),(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Sj.Options,{className:"memori--date-selector__select-options",children:[...Array(31).keys()].map((e=>(0,s.jsx)(Sj.Option,{value:o.set({day:e+1}),className:"memori--date-selector__select-option",children:e+1},e)))})})]})}),(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Sj,{value:o,onChange:e=>{a(e)},disabled:n,name:"month",children:[(0,s.jsxs)(Sj.Label,{className:"memori--date-selector__select-label",children:[r("month"),":"]}),(0,s.jsxs)(Sj.Button,{"aria-label":r("month"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:_j["it"===i.language?"it":"en"][o.month-1]}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(wj,{})})]}),(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Sj.Options,{className:"memori--date-selector__select-options",children:_j["it"===i.language?"it":"en"].map((e=>(0,s.jsx)(Sj.Option,{className:"memori--date-selector__select-option",value:o.set({month:_j["it"===i.language?"it":"en"].findIndex((t=>t===e))+1}),children:e},e)))})})]})}),(0,s.jsx)("div",{className:"memori--date-selector__select",children:(0,s.jsxs)(Sj,{value:o,onChange:e=>{a(e)},disabled:n,name:"year",children:[(0,s.jsxs)(Sj.Label,{className:"memori--date-selector__select-label",children:[r("year"),":"]}),(0,s.jsxs)(Sj.Button,{"aria-label":r("year"),className:"memori--date-selector__select-button",children:[(0,s.jsx)("span",{className:"memori--date-selector__select--value",children:o.year}),(0,s.jsx)("span",{className:"memori--date-selector__select--icon",children:(0,s.jsx)(wj,{})})]}),(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Sj.Options,{className:"memori--date-selector__select-options",children:[...Array(_s.DateTime.now().year-1899).keys()].sort(((e,t)=>t-e)).map((e=>(0,s.jsx)(Sj.Option,{value:o.set({year:e+1900}),className:"memori--date-selector__select-option",children:e+1900},e)))})})]})})]})}));Cj.displayName="DateSelector";var Aj=Cj;c=o("85Hg2");var Ej=({visible:e=!1,onClose:n,minAge:r})=>{const{t:i}=Se(),[o,a]=(0,c.useState)(),[l,u]=(0,c.useState)(),[d,h]=(0,c.useState)(!1),p=(0,c.useCallback)((()=>{if(h(!0),!o)return t(Ju).error(i("requiredField")),u(i("requiredField")||"Required field"),void h(!1);if(_s.DateTime.now().diff(o,"years").years<r)return t(Ju).error(i("underageTwinSession",{age:r})),u(i("underageTwinSession",{age:r})||`You must be at least ${r} years old to interact with this Twin`),void h(!1);n(o.toJSDate().toISOString())}),[o,r,n,i]);return(0,s.jsxs)(Wm,{open:e,title:i("ageVerification"),className:"age-verification-modal",closable:!0,onClose:()=>n(),children:[(0,s.jsx)("p",{children:i("ageVerificationText",{minAge:r})}),(0,s.jsxs)("form",{className:"age-verification-form",onSubmit:e=>{e.preventDefault(),p()},children:[(0,s.jsx)("div",{className:"form-item",children:(0,s.jsxs)("fieldset",{name:"birthDate",children:[(0,s.jsx)("legend",{className:"sr-only",children:i("birthDate")}),(0,s.jsx)(Aj,{defaultDate:new Date(Date.now()),onChange:e=>{a(e)}}),(0,s.jsx)("p",{className:"form-item-help",children:i("birthDateHelper")}),l&&(0,s.jsx)("p",{className:"form-item-error",children:l})]})}),(0,s.jsx)("div",{className:"form-item form-submit",children:(0,s.jsx)(Sf,{primary:!0,htmlType:"submit",className:"age-verification-submit",loading:d,disabled:!o,children:i("confirm")})})]})]})};c=o("85Hg2");var Tj=({label:e,className:n,disabled:r=!1,indeterminate:i=!1,checked:o,children:a,onChange:l,name:u,...d})=>{const h=(0,c.useRef)(null);return(0,c.useEffect)((()=>{h.current&&(h.current.indeterminate=i)}),[h,i]),(0,s.jsxs)("label",{className:t(ws)("memori-checkbox",n,{"memori-checkbox--disabled":r,"memori-checkbox--indeterminate":i}),children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{ref:h,type:"checkbox",...d,name:u,disabled:r,checked:o||i,className:"memori-checkbox--input",onChange:l}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),!!(null==e?void 0:e.length)&&(0,s.jsx)("span",{className:"memori-checkbox--text",children:e})]})};c=o("85Hg2");var Mj=({className:e,value:n,name:r,displayValue:i,options:o,onChange:a,disabled:l=!1,label:u,placeholder:d})=>(0,s.jsx)("div",{className:t(ws)("memori-select",e),children:(0,s.jsxs)(Sj,{value:n,onChange:e=>{a(e)},disabled:l,name:r,children:[u&&(0,s.jsxs)(Sj.Label,{className:"memori-select--label",children:[u,":"]}),(0,s.jsxs)(Sj.Button,{"aria-label":u,className:"memori-select--button",children:[(0,s.jsx)("span",{className:t(ws)("memori-select--value",{"memori-select--value-placeholder":!n}),children:n?i||n:d}),(0,s.jsx)("span",{className:"memori-select--icon",children:(0,s.jsx)(wj,{})})]}),(0,s.jsx)(np,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,s.jsx)(Sj.Options,{className:"memori-select--options",children:o.map((e=>(0,s.jsx)(Sj.Option,{value:e.value,className:"memori-select--option",children:e.label},e.value)))})})]})});const Ij={muteSpeaker:"@memori:muteSpeaker",microphoneMode:"@memori:microphoneMode",continuousSpeechTimeout:"@memori:continuousSpeechTimeout",sendOnEnter:"@memori:sendOnEnter",birthDate:"@memori:birthDate",controlsPosition:"@memori:controlsPosition",hideEmissions:"@memori:hideEmissions",loginToken:"@memori:loginToken",location:"@memori:location"},Rj=(e,t)=>{var n;try{const r=window.localStorage.getItem(null!==(n=Ij[e])&&void 0!==n?n:e);if(!r)return t;try{return JSON.parse(r)}catch(e){return r}}catch(e){return console.error("error",e),t}},Pj=(e,t)=>{var n;try{window.localStorage.setItem(null!==(n=Ij[e])&&void 0!==n?n:e,t.toString())}catch(e){console.error("error",e)}},kj=e=>{var t;try{window.localStorage.removeItem(null!==(t=Ij[e])&&void 0!==t?t:e)}catch(e){console.error("error",e)}},Oj=[2,3,5,10,15,20,30,60];var Nj=({open:e,layout:t="DEFAULT",onClose:n,microphoneMode:r="HOLD_TO_TALK",continuousSpeechTimeout:i,setMicrophoneMode:o,setContinuousSpeechTimeout:a,controlsPosition:l,setControlsPosition:c,hideEmissions:u,setHideEmissions:d,additionalSettings:h})=>{const{t:p}=Se();return(0,s.jsxs)(_f,{className:"memori-settings-drawer",open:e,onClose:n,title:p("widget.settings")||"Settings",description:p("write_and_speak.settingsHeaderLabel"),children:[(0,s.jsxs)("div",{className:"memori-settings-drawer--field controls",children:[(0,s.jsxs)("label",{htmlFor:"#microphoneMode",children:[p("write_and_speak.microphoneMode")||"Microphone mode",":"]}),(0,s.jsxs)(Vx,{id:"microphoneMode",name:"microphoneMode",value:r,defaultValue:r,className:"memori-settings-drawer--microphoneMode-radio",onChange:e=>{let t="CONTINUOUS"===e?"CONTINUOUS":"HOLD_TO_TALK";o(t),Pj("microphoneMode",t)},children:[(0,s.jsx)(Vx.Option,{value:"HOLD_TO_TALK",className:"memori-settings-drawer--microphoneMode-radio-button",children:({checked:e})=>(0,s.jsx)(Sf,{primary:e,outlined:!e,children:p("write_and_speak.holdToSpeak")||"Hold to speak"})}),(0,s.jsx)(Vx.Option,{value:"CONTINUOUS",className:"memori-settings-drawer--microphoneMode-radio-button",children:({checked:e})=>(0,s.jsx)(Sf,{primary:e,outlined:!e,children:p("write_and_speak.continuousSpeechLabel")||"Continuous speech"})})]})]}),"CONTINUOUS"===r&&(0,s.jsx)("div",{className:"memori-settings-drawer--field",children:(0,s.jsx)(Mj,{label:p("write_and_speak.secondsLabel")||"Seconds",placeholder:p("write_and_speak.secondsLabel")||"Seconds",options:Oj.map((e=>({value:e,label:e}))),value:i,onChange:e=>{a(e),Pj("continuousSpeechTimeout",e)}})}),"TOTEM"===t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"memori-settings-drawer--field controls",children:[(0,s.jsxs)("label",{htmlFor:"#controlsPosition",children:[p("write_and_speak.controlsPosition")||"Controls",":"]}),(0,s.jsxs)(Vx,{id:"controlsPosition",name:"controlsPosition",value:l,defaultValue:l,className:"memori-settings-drawer--controlsposition-radio",onChange:e=>{c(e),Pj("controlsPosition",e)},children:[(0,s.jsx)(Vx.Option,{value:"center",className:"memori-settings-drawer--controlsposition-radio-button",children:({checked:e})=>(0,s.jsx)(Sf,{primary:e,outlined:!e,children:p("center")||"Center"})}),(0,s.jsx)(Vx.Option,{value:"bottom",className:"memori-settings-drawer--controlsposition-radio-button",children:({checked:e})=>(0,s.jsx)(Sf,{primary:e,outlined:!e,children:p("bottom")||"Bottom"})})]})]}),(0,s.jsx)("div",{className:"memori-settings-drawer--field",children:(0,s.jsx)(Tj,{label:p("write_and_speak.hideEmissionsLabel")||"Hide emissions",name:"hideControls",checked:u,onChange:e=>{d(e.target.checked),Pj("hideEmissions",e.target.checked)}})})]}),h&&(0,s.jsx)("div",{className:"memori-settings-drawer--field controls",children:h})]})};c=o("85Hg2");var Lj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"})});var Dj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M15 18L9 12 15 6"})});var Bj=({className:e,title:t})=>(0,s.jsx)("svg",{...t?{}:{"aria-hidden":"true"},focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",className:e,"aria-label":t,children:(0,s.jsx)("path",{d:"M9 18L15 12 9 6"})});var zj=({apiURL:e,sessionID:n,memori:r,visible:i=!0,initialKnownFacts:o=[],closeDrawer:a})=>{var l;const{t:u}=Se(),d=Y(e),{getKnownFactsPaginated:h,deleteKnownFact:p}=d.knownFacts,[f,m]=(0,c.useState)(o),[g,v]=(0,c.useState)(25),[y,b]=(0,c.useState)(0),[x,S]=(0,c.useState)(null!==(l=null==o?void 0:o.length)&&void 0!==l?l:0),[w,_]=(0,c.useState)(!1),C=async(e,r,i)=>{if(n||e){_(!0);try{const{knownFacts:o,count:s,...a}=await h(null!=e?e:n,null!=r?r:y,null!=i?i:g);m(null!=o?o:[]),S(null!=s?s:0),0!==a.resultCode&&(console.error(a),t(Ju).error(u(Gv(a.resultCode))))}catch(e){console.error("KNOWN_FACTS/FETCH",e),m(null!=o?o:[])}_(!1)}};(0,c.useEffect)((()=>{C()}),[]);const[A,E]=(0,c.useState)(!1),[T,M]=(0,c.useState)(),[I,R]=(0,c.useState)([]);return(0,s.jsxs)(_f,{open:i,width:"80%",className:"memori-known-facts-drawer",onClose:()=>a(),title:u("knownFacts.title"),children:[(0,s.jsx)("p",{children:u("knownFacts.description",{memoriName:r.name})}),(0,s.jsxs)(xf,{spinning:w,children:[(0,s.jsxs)("div",{className:"memori-known-facts-actions",children:[(0,s.jsxs)(Sf,{primary:!0,danger:!0,onClick:()=>{E(!0)},className:"memori-known-facts-delete-selected",disabled:0===(null==I?void 0:I.length),icon:(0,s.jsx)(Lj,{}),loading:w,children:[u("selected")," (",null==I?void 0:I.length,")"]}),(0,s.jsx)(Wm,{className:"memori-known-facts-modal",open:A,closable:!0,title:I.length>1?u("knownFacts.deleteSelectedConfirmTitle"):u("knownFacts.deleteConfirmTitle"),description:I.length>1?u("knownFacts.deleteSelectedConfirmMessage",{number:I.length}):u("knownFacts.deleteConfirmMessage"),onClose:()=>{E(!1)},footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Sf,{ghost:!0,onClick:()=>{E(!1)},children:u("cancel")}),(0,s.jsx)(Sf,{primary:!0,danger:!0,onClick:async()=>{try{const e=I.map((e=>p(n,e)));Promise.all(e).then((e=>{if(e.every((e=>0===e.resultCode)))t(Ju).success(u("knownFacts.deleteSuccess")),R([]),C(),E(!1);else{let n=e.find((e=>0!==e.resultCode));console.error(n),void 0!==(null==n?void 0:n.resultCode)&&t(Ju).error(u(Gv(null==n?void 0:n.resultCode)))}}))}catch(e){let n=e;t(Ju).error(u("Error")+n.message)}},children:u("confirm")})]})})]}),x>25&&(0,s.jsxs)("nav",{className:"memori--table--pagination",children:[x>g&&(0,s.jsxs)("div",{className:"memori--table--pagination--pages",children:[(0,s.jsx)(Sf,{shape:"circle",disabled:0===y||y<g,padded:!1,title:u("previous")||"Previous",icon:(0,s.jsx)(Dj,{}),onClick:()=>{let e=(y/g-1)*g;b(e),C(void 0,e,g)}}),(0,s.jsxs)("span",{className:"memori--table--pagination--pages--current",children:[Math.ceil(y/g)+1," /"," ",Math.ceil(x/g)]}),(0,s.jsx)(Sf,{shape:"circle",padded:!1,title:u("next")||"Next",icon:(0,s.jsx)(Bj,{}),disabled:(y/g+1)*g>=x,onClick:()=>{let e=(y/g+1)*g;b(e),C(void 0,e,g)}})]}),(0,s.jsx)(Mj,{options:[{label:`25 / ${u("page")||"page"}`,value:25},{label:`50 / ${u("page")||"page"}`,value:50},{label:`100 / ${u("page")||"page"}`,value:100}],value:g,displayValue:`${g} / ${u("page")||"page"}`,onChange:e=>{v(e),b(0),C(void 0,0,e)}})]}),(0,s.jsxs)("table",{className:"memori--table",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"memori--table--column-centered",children:(0,s.jsx)(Tj,{checked:!!(null==f?void 0:f.length)&&(null==I?void 0:I.length)===f.length,indeterminate:!!(null==f?void 0:f.length)&&!!(null==I?void 0:I.length)&&(null==I?void 0:I.length)!==(null==f?void 0:f.length),onChange:e=>{e.target.checked?R(f.map((e=>e.knownFactID))):R([])}})}),(0,s.jsx)("th",{children:u("knownFacts.text")}),(0,s.jsx)("th",{className:"mobile-hidden",children:u("createdAt")}),(0,s.jsx)("th",{className:"memori--table--column-right",children:u("actions")})]})}),(0,s.jsx)("tbody",{children:f.map((e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"memori--table--column-centered",children:(0,s.jsx)(Tj,{checked:null==I?void 0:I.includes(e.knownFactID),onChange:t=>{t.target.checked?R((t=>[...new Set([...t,e.knownFactID])])):R((t=>t.filter((t=>t!==e.knownFactID))))}})}),(0,s.jsx)("td",{children:e.text}),(0,s.jsx)("td",{className:"mobile-hidden",children:(0,s.jsx)("span",{className:"memori--table--date",children:e.creationTimestamp?new Intl.DateTimeFormat("it",{dateStyle:"short",timeStyle:"short"}).format(new Date(e.creationTimestamp)):"-"})}),(0,s.jsx)("td",{className:"memori--table--column-right",children:(0,s.jsxs)("div",{className:"memori--table--action-column",children:[(0,s.jsx)(Sf,{danger:!0,ghost:!0,shape:"circle",icon:(0,s.jsx)(Lj,{}),disabled:(null==I?void 0:I.length)>0,title:u("delete")||"Delete",onClick:()=>M(e.knownFactID)}),(0,s.jsx)(Wm,{className:"memori-known-facts-modal",open:T===e.knownFactID,closable:!0,title:u("knownFacts.deleteConfirmTitle"),description:u("knownFacts.deleteConfirmMessage"),onClose:()=>{M(void 0)},footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Sf,{ghost:!0,onClick:()=>{M(void 0)},children:u("cancel")}),(0,s.jsx)(Sf,{primary:!0,danger:!0,onClick:async()=>{try{const r=await p(n,e.knownFactID);0===r.resultCode?(t(Ju).success(u("knownFacts.deleteSuccess")),R([]),C(),M(void 0)):(console.error(r),t(Ju).error(u(Gv(r.resultCode),{ns:"common"})))}catch(e){let n=e;t(Ju).error(u("Error")+n.message)}},children:u("confirm")})]})})]})})]},e.knownFactID)))})]})]})]})};var Fj=({open:e=!1,baseUrl:t,apiUrl:n,tenant:r,experts:i,onClose:o})=>{const{t:a}=Se();return(0,s.jsx)(_f,{open:e,onClose:o,className:"memori--experts-drawer",title:(0,s.jsx)("h2",{className:"memori--experts-drawer--title",children:a("widget.expertsInTheBoard")}),children:(0,s.jsx)("ul",{className:"memori--experts-drawer--list",children:i.map((e=>(0,s.jsxs)("li",{className:"memori--experts-drawer--item",children:[(0,s.jsx)("figure",{className:"memori--experts-drawer--avatar",children:(0,s.jsx)("img",{src:`${n}/api/v1/memoriai/memori/avatar/${e.expertMemoriID}`,alt:e.name,onError:e=>{e.currentTarget.src=fv({tenantID:null==r?void 0:r.id,type:"avatar",baseURL:t}),e.currentTarget.onerror=null}})}),(0,s.jsxs)("div",{className:"memori--experts-drawer--content",children:[(0,s.jsx)("h3",{className:"memori--experts-drawer--name",children:e.name}),(0,s.jsx)("p",{className:"memori--experts-drawer--description",children:e.description})]})]},e.expertID)))})})};c=o("85Hg2"),c=o("85Hg2");const Uj=["memori","private","public","api","404","500","it","en","account","auth","logout","privacy_and_cookie","unauthorized","users","virtual_spaces"];var jj=({tenant:e,apiUrl:n,onLogin:r,goToLogin:i,__TEST__waitingForOtp:o=!1})=>{const{t:a,i18n:l}=Se(),u="it"===l.language?"it":"en",d=Y(n),{userSignUp:h,userConfirmSignUp:p,resendVerificationCode:f}=d.backend,[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(),[b,x]=(0,c.useState)(),[S,w]=(0,c.useState)(),_=!b||b&&$f.test(b),C=_&&b&&b.length>=24,A=!b||0===b.length,E=!_||A?0:b.length<8?15:b.length>=32?100:(b.length-8)*(50/24)+50,[T,M]=(0,c.useState)(!1),[I,R]=(0,c.useState)(!1),[P,k]=(0,c.useState)(o),[O,N]=(0,c.useState)(null),[L,D]=(0,c.useState)();(0,c.useEffect)((()=>{D(window.location.href)}),[]);return P?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async n=>{var i,o,s;n.preventDefault();const l=n.currentTarget,c=null!==(i=l.tenant.value)&&void 0!==i?i:e.id,u=null!==(o=l.userName.value)&&void 0!==o?o:v,d=null!==(s=l.password.value)&&void 0!==s?s:b,h=l.verificationCode.value;M(!0),N(null);try{const{user:e,token:n,...i}=await p({tenant:c,userName:u,password:d,verificationCode:h});0!==i.resultCode?(console.error(i),t(Ju).error(a(Gv(i.resultCode)))):e&&n&&(t(Ju).success(a("success")),r(e,n))}catch(e){let n=e;console.error("[validate otp]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}finally{M(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"userName",value:v}),(0,s.jsx)("input",{type:"hidden",name:"password",value:b}),(0,s.jsx)("input",{type:"hidden",name:"tenant",value:e.id}),(0,s.jsxs)("label",{htmlFor:"#verificationCode",children:[a("login.otpCode"),(0,s.jsx)("input",{id:"verificationCode",name:"verificationCode",type:"text",required:!0,autoComplete:"one-time-code",placeholder:a("login.otpCode")||"OTP"})]}),(0,s.jsx)("p",{children:(0,s.jsx)(Sf,{outlined:!0,onClick:async n=>{if(n.preventDefault(),v){R(!0);try{const n=await f({tenant:null==e?void 0:e.id,userName:v});0===n.resultCode?t(Ju).success(a("resentVerificationCode")):(console.error(n),t(Ju).error(a(Gv(n.resultCode))))}catch(e){let n=e;console.error("[resend otp]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}finally{R(!1)}}},loading:I,children:a("login.resendVerificationCode")})}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:T,children:a("confirm")})]}),O&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:O})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async n=>{var r,i,o,s,l,c,u;n.preventDefault();const d=n.currentTarget,p=null!==(r=d.tenant.value)&&void 0!==r?r:e.id,f=(null!==(i=d.eMail.value)&&void 0!==i?i:m).toLowerCase(),g=null!==(o=d.userName.value)&&void 0!==o?o:v,y=d.password.value,b=new Date(null===(s=d.birthDate)||void 0===s?void 0:s.value).toISOString(),x=null===(l=d.tnCAndPPAccepted)||void 0===l?void 0:l.checked,S=null===(c=d.pAndCUAccepted)||void 0===c?void 0:c.checked,w=null===(u=d.referral)||void 0===u?void 0:u.value;if(!(f&&g&&y&&b&&x))return void N(a("missingData"));M(!0),N(null);if(((new Date).getTime()-new Date(b).getTime())/1e3/60/60/24/365<14)return t(Ju).error(a("login.underage",{age:14})),void N(a("login.underage",{age:14}));try{const{user:e,...n}=await h({tenant:p,eMail:f,userName:g,password:y,birthDate:b,tnCAndPPAccepted:x,tnCAndPPAcceptanceDate:(new Date).toISOString(),pAndCUAccepted:S,pAndCUAcceptanceDate:(new Date).toISOString(),referral:w});0!==n.resultCode?(console.error(n),t(Ju).error(a(Gv(n.resultCode)))):e&&(t(Ju).success(a("success")),k(!0))}catch(e){let n=e;console.error("[signup]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}finally{M(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"tenant",value:e.id}),(0,s.jsx)("input",{type:"hidden",name:"referral",value:L}),(0,s.jsxs)("label",{htmlFor:"#eMail",children:[a("login.email"),(0,s.jsx)("input",{type:"email",name:"eMail",id:"eMail",required:!0,autoComplete:"email",placeholder:a("login.email")||"Email",onChange:e=>g(e.target.value),"aria-invalid":!!(null==m?void 0:m.length)&&!em.test(m)})]}),!!(null==m?void 0:m.length)&&!em.test(m)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.emailFormatError")}),(0,s.jsxs)("label",{htmlFor:"userName",children:[a("login.username"),(0,s.jsx)("input",{type:"text",name:"userName",id:"userName",required:!0,autoComplete:"username",placeholder:a("login.username")||"Username",onFocus:()=>{if(!(null==v?void 0:v.length)&&(null==m?void 0:m.length)){let e=(e=>e.split("@")[0].replace(/[^a-zA-Z0-9]/g,""))(m);const t=document.getElementById("userName");t&&(t.value=e,y(e))}},onChange:e=>y(e.target.value),"aria-invalid":!!(null==v?void 0:v.length)&&(Uj.includes(v.toLowerCase())||!tm.test(v))})]}),!!(null==v?void 0:v.length)&&Uj.includes(v.toLowerCase())&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.usernameContainsReservedWord")}),!!(null==v?void 0:v.length)&&!tm.test(v)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.usernameFormatError")}),(0,s.jsxs)("label",{htmlFor:"#birthDate",children:[a("login.birthDate"),(0,s.jsx)("input",{id:"birthDate",name:"birthDate",type:"date",required:!0,autoComplete:"bday"})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:a("login.birthDateHelper")})}),(0,s.jsxs)("label",{htmlFor:"#password",children:[a("login.password"),(0,s.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"new-password",placeholder:a("login.password")||"Password",onChange:e=>x(e.target.value),"aria-invalid":!_})]}),!_&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[a("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:a("login.confirmPassword")||"Password",onChange:e=>w(e.target.value),"aria-invalid":!!(null==b?void 0:b.length)&&!!(null==S?void 0:S.length)&&b!==S})]}),!!(null==b?void 0:b.length)&&!!(null==S?void 0:S.length)&&b!==S&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:a("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:E,id:"password-strength-meter"}),(0,s.jsx)("small",{children:a("login.pwd"+(C?"Strong":_?"Acceptable":"Weak"))}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",required:!0,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[a("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${u}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:a("login.privacyAndCookiePolicy")})," ",a("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${u}/tos`,target:"_blank",rel:"noopener noreferrer",children:a("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[a("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",a("login.optional"),")"]})})]})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:a("login.deepThoughtExplaination")})}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:T,children:a("login.signUp")}),(0,s.jsxs)("p",{className:"memori--login-drawer--signup",children:[a("login.alreadyHaveAnAccount")," ",(0,s.jsx)(Sf,{outlined:!0,onClick:i,children:a("login.backToLogin")})]})]}),O&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:O})]})};c=o("85Hg2");const Hj=["image/jpeg","image/png","image/jpg","image/gif"];var Vj=({user:e,loginToken:n,apiUrl:r,onUserUpdate:i})=>{const{t:o,i18n:a}=Se(),l="it"===a.language?"it":"en",u=Y(r),{updateUser:d,uploadAsset:h}=u.backend,[p,f]=(0,c.useState)(),[m,g]=(0,c.useState)(),[v,y]=(0,c.useState)(),b=!m||m&&$f.test(m),x=b&&m&&m.length>=24,S=!m||0===m.length,w=!b||S?0:m.length<8?15:m.length>=32?100:(m.length-8)*(50/24)+50,[_,C]=(0,c.useState)(!1),[A,E]=(0,c.useState)(null),T=async(e,r)=>{try{const{user:s,...a}=await d(n,e,r);0!==a.resultCode?(console.error(a),t(Ju).error(o(Gv(a.resultCode)))):s&&(t(Ju).success(o("success")),i(s))}catch(e){let n=e;console.error("[signup]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}finally{C(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"memori--login-drawer--edit-account-title",children:o("login.editAccount")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form memori--login-drawer--account-form",onSubmit:async r=>{var i,s,a,l,c;if(r.preventDefault(),!e.userID)return;const u=e.userID,d=r.currentTarget,f=null!==(i=d.eMail.value)&&void 0!==i?i:p,g=null!==(s=d.newPassword.value)&&void 0!==s?s:m,v=d.password.value,y=d.confirmPassword.value,b=null===(a=d.pAndCUAccepted)||void 0===a?void 0:a.checked,x=null===(c=null===(l=d.avatar)||void 0===l?void 0:l.files)||void 0===c?void 0:c[0];if(C(!0),E(null),(null==g?void 0:g.length)&&g!==y)return E(o("login.passwordMatchingError")),void C(!1);let S={...(null==f?void 0:f.length)&&f!==e.eMail?{eMail:f}:{},...g?{password:v,newPassword:g}:{},...void 0!==b&&b!==e.pAndCUAccepted?{pAndCUAccepted:b,pAndCUAcceptanceDate:(new Date).toISOString()}:{}};if(0===Object.values(S).length&&!x)return console.debug("No changes to submit"),void C(!1);if(x){const e=new FileReader;e.onload=async e=>{var r,i;try{const{asset:s,...a}=await h(null!==(r=x.name)&&void 0!==r?r:"avatar",null===(i=e.target)||void 0===i?void 0:i.result,n);0!==a.resultCode?(console.error(a),t(Ju).error(o(Gv(a.resultCode)))):s&&(S.avatarURL=s.assetURL,await T(u,S))}catch(e){let n=e;console.error("[avatar upload]",n),(null==n?void 0:n.message)&&t(Ju).error(n.message)}},e.readAsDataURL(x)}else await T(u,S)},children:[(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.emailChange")}),(0,s.jsxs)("label",{htmlFor:"#eMail",children:[o("login.email"),(0,s.jsx)("input",{type:"email",name:"eMail",id:"eMail",autoComplete:"email",placeholder:e.eMail,onChange:e=>f(e.target.value),"aria-invalid":!!(null==p?void 0:p.length)&&!em.test(p)})]}),!!(null==p?void 0:p.length)&&!em.test(p)&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.emailFormatError")})]}),(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.passwordChange")}),(0,s.jsxs)("label",{htmlFor:"#password",children:[o("login.currentPassword"),(0,s.jsx)("input",{id:"password",name:"password",type:"password",autoComplete:"password",placeholder:o("login.currentPassword")||"Password"})]}),(0,s.jsxs)("label",{htmlFor:"#newPassword",children:[o("login.newPassword"),(0,s.jsx)("input",{id:"newPassword",name:"newPassword",type:"password",autoComplete:"new-password",placeholder:o("login.password")||"Password",onChange:e=>g(e.target.value),"aria-invalid":!b})]}),!b&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[o("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",autoComplete:"new-password",placeholder:o("login.confirmPassword")||"Password",onChange:e=>y(e.target.value),"aria-invalid":!!(null==m?void 0:m.length)&&!!(null==v?void 0:v.length)&&m!==v})]}),!!(null==m?void 0:m.length)&&!!(null==v?void 0:v.length)&&m!==v&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:o("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:w,id:"password-strength-meter"}),(0,s.jsx)("small",{children:o("login.pwd"+(x?"Strong":b?"Acceptable":"Weak"))})]}),(0,s.jsxs)("details",{className:"memori--details",children:[(0,s.jsx)("summary",{children:o("login.avatarChange")}),(0,s.jsxs)("label",{htmlFor:"#avatar",children:["Avatar",(0,s.jsx)("input",{type:"file",name:"avatar",id:"avatar",accept:Hj.join(", "),placeholder:e.avatarURL})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox memori-checkbox--disabled",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",disabled:!0,defaultChecked:e.tnCAndPPAccepted,checked:e.tnCAndPPAccepted,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[o("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${l}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:o("login.privacyAndCookiePolicy")})," ",o("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${l}/tos`,target:"_blank",rel:"noopener noreferrer",children:o("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",className:"memori-checkbox--input",defaultChecked:e.pAndCUAccepted}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsx)(vv,{align:"left",content:o("login.deepThoughtExplaination"),children:(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[o("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",o("login.optional"),")"]})})]})})]}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:_,children:o("login.save")})]}),A&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:A})]})};var Gj=({open:e=!1,onClose:n,onLogin:r,onLogout:i,user:o,loginToken:a,tenant:l,apiUrl:u,__TEST__signup:d=!1,__TEST__needMissingData:h=!1,__TEST__waitingForOtp:p=!1,__TEST__changePwd:f=!1})=>{var m,g;const{t:v,i18n:y}=Se(),b="it"===y.language?"it":"en",x=Y(u),{userLogin:S,updateUser:w}=x.backend,_=(null==o?void 0:o.userID)&&a,[C,A]=(0,c.useState)(!1),[E,T]=(0,c.useState)(null),[M,I]=(0,c.useState)(d),[R,P]=(0,c.useState)(f?{flowID:"flowID",tenant:l.id,eMail:"email",userName:"username",password:"password"}:void 0),[k,O]=(0,c.useState)(h?{token:"token",birthDate:!0,tnCAndPPAccepted:!0}:{}),[N,L]=(0,c.useState)(),[D,B]=(0,c.useState)(),z=!N||N&&$f.test(N),F=z&&N&&N.length>=24,U=!N||0===N.length,j=!z||U?0:N.length<8?15:N.length>=32?100:(N.length-8)*(50/24)+50;return(0,s.jsx)(_f,{open:e,onClose:n,className:t(ws)("memori--login-drawer",{"memori--login-drawer--logged":_,"memori--login-drawer--signup":M}),title:(0,s.jsx)("span",{className:"memori--login-drawer--title",children:_?v("login.loggedDrawerTitle",{name:o.userName}):v(M?"login.signupDrawerTitle":"login.loginDrawerTitle")}),children:_?(0,s.jsxs)("div",{className:"memori--login-drawer--logged",children:[o.avatarURL&&(0,s.jsx)("figure",{className:"memori--login-drawer--avatar",children:(0,s.jsx)("img",{src:o.avatarURL,alt:o.userName})}),(0,s.jsx)(Sf,{primary:!0,onClick:()=>{i()},children:v("login.logout")}),(0,s.jsx)(Vj,{user:o,loginToken:a,apiUrl:u,onUserUpdate:e=>r(e,a)})]}):(null===(m=null==k?void 0:k.token)||void 0===m?void 0:m.length)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{children:v("login.missingData")}),(0,s.jsx)("p",{children:v("login.missingDataHelper")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async e=>{var n,i,s;e.preventDefault();const a=e.currentTarget,l=null===(n=a.birthDate)||void 0===n?void 0:n.value,c=null===(i=a.tnCAndPPAccepted)||void 0===i?void 0:i.checked,u=null===(s=a.pAndCUAccepted)||void 0===s?void 0:s.checked;if(!(null==o?void 0:o.userID)||!(null==k?void 0:k.token))return;if(!l||!c)return void T(v("missingData"));let d={userID:o.userID,birthDate:(null==o?void 0:o.birthDate)||!k.birthDate?void 0:l,tnCAndPPAccepted:c||(null==o?void 0:o.tnCAndPPAccepted),tnCAndPPAcceptanceDate:c?(new Date).toISOString():void 0,pAndCUAccepted:u||(null==o?void 0:o.pAndCUAccepted),pAndCUAcceptanceDate:u?(new Date).toISOString():void 0};const{user:h,...p}=await w(k.token,o.userID,d);0!==p.resultCode?(console.error(p),t(Ju).error(v(Gv(p.resultCode))),T(p.resultMessage)):(t(Ju).success(v("success")),r(h||d,k.token))},children:[k.birthDate&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{htmlFor:"#birthDate",children:[v("login.birthDate"),(0,s.jsx)("input",{id:"birthDate",name:"birthDate",type:"date",required:!0,autoComplete:"bday"})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.birthDateHelper")})})]}),(null==k?void 0:k.tnCAndPPAccepted)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"tnCAndPPAccepted",className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[v("login.privacyLabel")," ",(0,s.jsx)("a",{href:`https://memori.ai/${b}/privacy_and_cookie`,target:"_blank",rel:"noopener noreferrer",children:v("login.privacyAndCookiePolicy")})," ",v("login.and")," ",(0,s.jsx)("a",{href:`https://memori.ai/${b}/tos`,target:"_blank",rel:"noopener noreferrer",children:v("login.termsOfService")})]})]}),(0,s.jsxs)("label",{className:"memori-checkbox",children:[(0,s.jsxs)("span",{className:"memori-checkbox--input-wrapper",children:[(0,s.jsx)("input",{type:"checkbox",name:"pAndCUAccepted",defaultChecked:null==o?void 0:o.pAndCUAccepted,className:"memori-checkbox--input"}),(0,s.jsx)("span",{className:"memori-checkbox--inner"})]}),(0,s.jsxs)("span",{className:"memori-checkbox--text",children:[v("login.pAndCUAccepted")," ",(0,s.jsx)("small",{children:(0,s.jsxs)("em",{children:["(",v("login.optional"),")"]})})]})]}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.goToAccountToChangeYourPreferences")})}),(0,s.jsx)("p",{children:(0,s.jsx)("small",{children:v("login.deepThoughtExplaination")})})]}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:C,children:v("login.save")})]})]}):(null==R?void 0:R.flowID)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:v("login.mustChangePassword")}),(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:async e=>{var n,i,o,s,a;e.preventDefault();const c=e.currentTarget,u=null!==(n=c.tenant.value)&&void 0!==n?n:l.id,d=null!==(i=c.flowID.value)&&void 0!==i?i:null==R?void 0:R.flowID,h=null!==(o=c.eMail.value)&&void 0!==o?o:null==R?void 0:R.eMail,p=null!==(s=c.userName.value)&&void 0!==s?s:null==R?void 0:R.userName,f=null!==(a=c.password.value)&&void 0!==a?a:null==R?void 0:R.password,m=c.newPassword.value;if(!(null==m?void 0:m.length)||!z)return void T(v("login.passwordFormatError"));A(!0);const g={tenant:u,flowID:d,eMail:h,userName:p,password:f,newPassword:m};try{const{user:e,token:n,...i}=await S(g);0!==i.resultCode?(console.error(i),t(Ju).error(v(Gv(i.resultCode))),T(i.resultMessage)):e&&n&&(t(Ju).success(v("success")),r(e||g,n))}catch(e){let n=e;console.error("[LOGIN/CHANGE PWD]",n),n.message&&(t(Ju).error(n.message),T(n.message))}finally{A(!1)}},children:[(0,s.jsx)("input",{type:"hidden",name:"tenant",value:null!==(g=R.tenant)&&void 0!==g?g:null==l?void 0:l.id}),(0,s.jsx)("input",{type:"hidden",name:"flowID",value:R.flowID}),(0,s.jsx)("input",{type:"hidden",name:"eMail",value:R.eMail}),(0,s.jsx)("input",{type:"hidden",name:"userName",value:R.userName}),(0,s.jsx)("input",{type:"hidden",name:"password",value:R.password}),(0,s.jsxs)("label",{htmlFor:"#newPassword",children:[v("login.password"),(0,s.jsx)("input",{id:"newPassword",name:"newPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:v("login.password")||"Password",onChange:e=>L(e.target.value),"aria-invalid":!z})]}),!z&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:v("login.passwordFormatError")}),(0,s.jsxs)("label",{htmlFor:"#confirm-password",children:[v("login.confirmPassword"),(0,s.jsx)("input",{id:"confirm-password",name:"confirmPassword",type:"password",required:!0,autoComplete:"new-password",placeholder:v("login.confirmPassword")||"Password",onChange:e=>B(e.target.value),"aria-invalid":!!(null==N?void 0:N.length)&&!!(null==D?void 0:D.length)&&N!==D})]}),!!(null==N?void 0:N.length)&&!!(null==D?void 0:D.length)&&N!==D&&(0,s.jsx)("p",{className:"memori--login-drawer--inline-error",children:v("login.passwordMatchingError")}),(0,s.jsx)("meter",{className:"memori--login-drawer--password-meter",min:0,low:33,high:66,optimum:80,max:100,value:j,id:"password-strength-meter"}),(0,s.jsx)("small",{children:v("login.pwd"+(F?"Strong":z?"Acceptable":"Weak"))}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:C,children:v("confirm")})]})]}):M?(0,s.jsx)(jj,{tenant:l,apiUrl:u,onLogin:r,goToLogin:()=>I(!1),__TEST__waitingForOtp:p}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("form",{className:"memori--login-drawer--form",onSubmit:e=>{e.preventDefault();const n=e.currentTarget,i=n.userNameOrEmail.value,o=n.password.value,s=em.test(i),a=s?{tenant:null==l?void 0:l.id,eMail:i,password:o}:{tenant:null==l?void 0:l.id,userName:i,password:o};A(!0),T(null),S(a).then((e=>{var n,a,c,u,d;-14===e.resultCode?P({tenant:l.id,eMail:s?i:void 0,userName:s?void 0:i,password:o,flowID:e.flowID||(null===(n=e.user)||void 0===n?void 0:n.flowID)}):0!==e.resultCode?(console.error(e),t(Ju).error(v(Gv(e.resultCode))),T(e.resultMessage)):e.user&&e.token&&((null===(a=e.user)||void 0===a?void 0:a.tnCAndPPAccepted)&&(null===(c=e.user)||void 0===c?void 0:c.birthDate)?r(e.user,e.token):O({token:e.token,birthDate:!(null===(u=e.user)||void 0===u?void 0:u.birthDate),tnCAndPPAccepted:!(null===(d=e.user)||void 0===d?void 0:d.tnCAndPPAccepted)}))})).catch((e=>{console.error("[LOGIN]",e),e.message&&(t(Ju).error(e.message),T(e.message))})).finally((()=>{A(!1)}))},children:[(0,s.jsxs)("label",{htmlFor:"#userNameOrEmail",children:[v("login.userNameOrEmail"),(0,s.jsx)("input",{id:"userNameOrEmail",name:"userNameOrEmail",required:!0,autoComplete:"email",placeholder:"Username/email"})]}),(0,s.jsxs)("label",{htmlFor:"#password",children:["Password",(0,s.jsx)("input",{id:"password",name:"password",type:"password",required:!0,autoComplete:"password",placeholder:"Password"})]}),(0,s.jsx)(Sf,{htmlType:"submit",primary:!0,loading:C,children:v("login.login")}),(null==l?void 0:l.disableRegistration)?l.adminEmail?(0,s.jsxs)("div",{className:"memori--login-drawer--signup",children:[(0,s.jsx)("p",{children:v("login.registrationDisabled")}),(0,s.jsxs)("p",{children:[v("login.contactAdmin"),":"," ",(0,s.jsx)("a",{href:`mailto:${l.adminEmail}`,children:l.adminEmail})]})]}):null:(0,s.jsxs)("p",{className:"memori--login-drawer--signup",children:[v("login.newUserSignUp")," ",(0,s.jsx)(Sf,{outlined:!0,onClick:()=>I(!0),children:v("login.signUp")})]})]}),E&&(0,s.jsx)("p",{role:"alert",className:"memori--login-drawer--error",children:E})]})})};var Wj=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:c,integrationBackground:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>(0,s.jsxs)(s.Fragment,{children:[c,u,(0,s.jsxs)(xf,{spinning:g,children:[m&&d&&h&&(0,s.jsx)(d,{...h}),e&&t&&(0,s.jsx)(e,{...t}),(0,s.jsxs)("div",{className:"memori--grid",children:[(0,s.jsxs)("div",{className:"memori--grid-column memori--grid-column-left",children:[n&&r&&(0,s.jsx)(n,{...r}),(0,s.jsx)("div",{id:"extension"})]}),(0,s.jsx)("div",{className:"memori--grid-column memori--grid-column-right",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null}),v]})]})]});var qj=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:c,integrationBackground:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>(0,s.jsxs)(s.Fragment,{children:[c,u,(0,s.jsxs)(xf,{spinning:g,className:"memori-totem-layout",children:[v,m&&d&&h&&(0,s.jsx)(d,{...h}),(0,s.jsx)("div",{className:"memori-totem-layout--header",children:e&&t&&(0,s.jsx)(e,{...t})}),(0,s.jsx)("div",{className:"memori-totem-layout--avatar",children:n&&r&&(0,s.jsx)(n,{...r})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-totem-layout--controls",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null})]})]});var Kj=({Header:e,headerProps:t,Chat:n,chatProps:r,StartPanel:i,startPanelProps:o,integrationStyle:a,integrationBackground:l,ChangeMode:c,changeModeProps:u,sessionId:d,hasUserActivatedSpeak:h,showInstruct:p=!1,loading:f=!1,poweredBy:m})=>(0,s.jsxs)(s.Fragment,{children:[a,l,(0,s.jsxs)(xf,{spinning:f,className:"memori-chat-layout",children:[m,p&&c&&u&&(0,s.jsx)(c,{...u}),(0,s.jsx)("div",{className:"memori-chat-layout--header",children:e&&t&&(0,s.jsx)(e,{...t})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-chat-layout--controls",children:d&&h&&n&&r?(0,s.jsx)(n,{...r}):o?(0,s.jsx)(i,{...o}):null})]})]});c=o("85Hg2"),c=o("85Hg2");var Jj=({Header:e,headerProps:t,Avatar:n,avatarProps:r,Chat:i,chatProps:o,StartPanel:a,startPanelProps:l,integrationStyle:u,ChangeMode:d,changeModeProps:h,sessionId:p,hasUserActivatedSpeak:f,showInstruct:m=!1,loading:g=!1,poweredBy:v})=>{var y,b;const{t:x}=Se(),[S,w]=(0,c.useState)(!0),[_,C]=(0,c.useState)(),A=(0,c.useMemo)((()=>null==o?void 0:o.stopAudio),[null==o?void 0:o.stopAudio]),E=e=>{w(e),C(e?void 0:(new Date).toISOString());try{null==A||A()}catch(e){console.log(e)}};return(0,s.jsx)("div",{className:"memori-website_assistant--"+(S?"collapsed":"expanded"),children:S?(0,s.jsx)("div",{className:"memori-website_assistant--trigger",children:(0,s.jsx)(Sf,{className:"memori-website_assistant--trigger-button",ghost:!0,shape:"circle",onClick:()=>E(!1),title:x("expand")||"Expand",children:(0,s.jsx)(JF,{avatar:null==r?void 0:r.memori.avatarURL})})}):(0,s.jsxs)(s.Fragment,{children:[u,(0,s.jsxs)(xf,{spinning:g,className:"memori-website_assistant-layout",children:[v,(0,s.jsx)("div",{className:"memori-website_assistant--close-button-wrapper",children:(0,s.jsx)(Sf,{className:"memori-website_assistant--close-button",primary:!0,shape:"circle",onClick:()=>E(!0),icon:(0,s.jsx)(wf,{}),title:x("close")||"Close"})}),m&&d&&h&&(0,s.jsx)(d,{...h}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--header",children:e&&t&&(0,s.jsx)(e,{...t,showSettings:!1,showReload:!1})}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--avatar",children:n&&r&&(0,c.createElement)(n,{...r,integrationConfig:r.integrationConfig?{...r.integrationConfig,avatarURL:(null===(y=r.integrationConfig)||void 0===y?void 0:y.avatarURL)?`${null===(b=r.integrationConfig)||void 0===b?void 0:b.avatarURL.split("#")[0]}#${_}`:void 0}:{},key:_})}),(0,s.jsx)("div",{id:"extension"}),(0,s.jsx)("div",{className:"memori-website_assistant-layout--controls",children:p&&f&&i&&o?(0,s.jsx)(i,{...o}):l?(0,s.jsx)(a,{...l}):null})]})]})})};const{deleteSession:Qj,getStatistics:Yj,initSession:Zj}=Y(),Xj=new Map([[0,"🆕"],[10,"🐹"],[20,"🐇"],[30,"🐰"],[40,"💡"],[50,"🏆"],[60,"🏅"],[70,"🥉"],[80,"🥈"],[90,"🥇"],[100,"🔥"],[110,"🎓"],[120,"🤖"],[130,"👾"],[150,"🌍"],[180,"💜"],[200,"💙"],[250,"🧡"],[300,"💚"],[350,"💛"],[400,"💖"],[450,"💝"],[500,"🖤"],[550,"❤️"],[600,"🧠"]]),$j=e=>{const t=Array.from(Xj.keys()).filter((t=>t<=e));if(t.length>0){const e=t[t.length-1];return Xj.get(e)}return""},eH=e=>{if("🆕"===e)return{points:10,badge:"🐹"};let t,n,r=!1;for(const[i,o]of Xj){if(r){t=i,n=o;break}o===e&&(r=!0)}return n&&t?{points:t,badge:n}:void 0},tH=e=>{let t=0;for(const[n,r]of Xj)if(r===e){t=n;break}return t},nH=e=>{const t=Math.round(e),n=$j(t);return{points:t,badge:n,pointsForCurrentBadge:tH(n),nextBadge:eH(n)}},rH=async({operation:e="session_creation",baseUrl:t,userID:n,userName:r,tenant:i})=>{if(!n&&!r)throw new Error("Either userID or userName must be provided");const o=await fetch(`${t}/api/verify-tokens`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:e,userID:n,userName:r,tenant:i})});if(!o.ok)throw new Error("Failed to fetch credits");return o.json()},iH=(e,t=!0,n=!1,r,i=!1,o=!1)=>{const s=new CustomEvent("MemoriTextEntered",{detail:{text:e,waitForPrevious:t,hidden:n,typingText:r,useLoaderTextAsMsg:i,hasBatchQueued:o}});document.dispatchEvent(s);window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&setTimeout((()=>{document.dispatchEvent(new CustomEvent("MemoriEndSpeak"))}),300)};let oH,sH,aH,lH,cH,uH;window.getMemoriState=e=>{var t,n,r,i,o;let s=e?document.querySelector(`.memori-widget[data-memori-integration="${e}"]`)||(null===(n=null===(t=document.querySelector("memori-client"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector(".memori-widget[data-memori-integration]")):document.querySelector(".memori-widget")||(null===(i=null===(r=document.querySelector("memori-client"))||void 0===r?void 0:r.shadowRoot)||void 0===i?void 0:i.querySelector(".memori-widget"));if(!s)return null;let a=null===(o=s.dataset)||void 0===o?void 0:o.memoriEngineState;return a?JSON.parse(a):null},window.typeMessage=iH,window.typeMessageHidden=(e,t=!0,n,r=!1,i=!1)=>iH(e,t,!0,n,r,i),window.typeBatchMessages=e=>{function t(){var e,t,n,r;null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e||e.setAttribute("disabled","");const i="opacity: 0.5; touch-action: none; pointer-events: none;";null===(t=document.querySelector("textarea.memori-chat-textarea--input"))||void 0===t||t.setAttribute("style",i),null===(n=document.querySelector("button.memori-chat-inputs--send"))||void 0===n||n.setAttribute("style",i),null===(r=document.querySelector("button.memori-chat-inputs--mic"))||void 0===r||r.setAttribute("style",i)}function n(){var e,t,n,r;null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e||e.removeAttribute("disabled"),null===(t=document.querySelector("textarea.memori-chat-textarea--input"))||void 0===t||t.removeAttribute("style"),null===(n=document.querySelector("button.memori-chat-inputs--send"))||void 0===n||n.removeAttribute("style"),null===(r=document.querySelector("button.memori-chat-inputs--mic"))||void 0===r||r.removeAttribute("style")}function r(){var e;return!!(null===(e=document.querySelector("fieldset#chat-fieldset"))||void 0===e?void 0:e.hasAttribute("disabled"))}const i=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome")&&/iPad|iPhone|iPod/.test(navigator.userAgent),o=function*(){yield*e}();t();const s=()=>{const e=o.next(),a=e.value;if(a){r()||t();let o=a.waitForPrevious;i&&(o=!1),iH(a.message,o,a.hidden,a.typingText,a.useLoaderTextAsMsg,!e.done),i&&setTimeout((()=>{document.dispatchEvent(new CustomEvent("MemoriEndSpeak")),n()}),3e3)}else r()&&n();if(e.done)return document.removeEventListener("MemoriEndSpeak",s),void(r()&&n())};document.addEventListener("MemoriEndSpeak",s),s()};let dH,hH=!1,pH=!1;var fH=({memori:e,memoriConfigs:n,ownerUserID:r,ownerUserName:i,tenantID:o,memoriLang:a,multilingual:l,integration:u,layout:d="DEFAULT",customLayout:h,showInstruct:p=!1,showShare:f,preview:m=!1,embed:g=!1,showInputs:v=!0,showDates:y=!1,showContextPerLine:b=!1,showSettings:x=!0,showTypingText:S=!1,showClear:w=!1,showLogin:_=!1,showOnlyLastMessages:C,height:A="100vh",secret:E,baseUrl:T="https://aisuru.com",apiUrl:M="https://backend.memori.ai",initialContextVars:I,initialQuestion:R,ogImage:P,sessionID:k,tenant:O,personification:N,authToken:L,AZURE_COGNITIVE_SERVICES_TTS_KEY:D,defaultSpeakerActive:B=!0,onStateChange:z,additionalInfo:F,additionalSettings:U,customMediaRenderer:j,userAvatar:H})=>{var V,G,W,q,K,J,Q,Z,X,$,ee,te,ne,re,ie,oe,se,ae,le,ce,ue,de,he,pe;const{t:fe,i18n:me}=Se(),[ge,ve]=(0,c.useState)(!1);(0,c.useEffect)((()=>{ve(!0)}),[]);const ye=Y(M),{initSession:be,postTextEnteredEvent:xe,postPlaceChangedEvent:we,postDateChangedEvent:_e,postTimeoutEvent:Ce,postTagChangedEvent:Ae,getSession:Ee,getContentQualityIndexes:Te,getExpertReferences:Me}=ye,[Ie,Re]=(0,c.useState)(!1),[Pe,ke]=(0,c.useState)(null!==(V=null==F?void 0:F.loginToken)&&void 0!==V?V:L),[Oe,Ne]=(0,c.useState)({avatarURL:"string"==typeof H?H:void 0});(0,c.useEffect)((()=>{Pe&&!(null==Oe?void 0:Oe.userID)&&_&&ye.backend.getCurrentUser(Pe).then((({user:e,resultCode:t})=>{e&&0===t?(Ne(e),Pj("loginToken",Pe)):kj("loginToken")}))}),[Pe,null==Oe?void 0:Oe.userID]);const[Le,De]=(0,c.useState)(!1),[Be,ze]=(0,c.useState)(!1),[Fe,Ue]=(0,c.useState)(!1),je=(null===(q=null===(W=null===(G=e.culture)||void 0===G?void 0:G.split("-"))||void 0===W?void 0:W[0])||void 0===q?void 0:q.toUpperCase())||(null===(Z=null===(Q=null===(J=null===(K=null==n?void 0:n.find((t=>t.memoriConfigID===e.memoriConfigurationID)))||void 0===K?void 0:K.culture)||void 0===J?void 0:J.split("-"))||void 0===Q?void 0:Q[0])||void 0===Z?void 0:Z.toUpperCase()),He=(null==u?void 0:u.customData)?JSON.parse(u.customData):null,Ve=void 0!==l?l:!!(null==He?void 0:He.multilanguage),Ge=null==He?void 0:He.forcedTimeout,[We,qe]=(0,c.useState)(null!==(te=null!==(ee=null!==($=null!==(X=null!=a?a:null==He?void 0:He.lang)&&void 0!==X?X:je)&&void 0!==$?$:null==He?void 0:He.uiLang)&&void 0!==ee?ee:me.language)&&void 0!==te?te:"IT"),[Ke,Je]=(0,c.useState)(!1),[Qe,Ye]=(0,c.useState)(!1),[Ze,Xe]=(0,c.useState)(),$e=d||(null==He?void 0:He.layout)||"DEFAULT",[et,tt]=(0,c.useState)(!1),[nt,rt]=(0,c.useState)(!1),[it,ot]=(0,c.useState)(!1),[st,at]=(0,c.useState)(!1),[lt,ct]=(0,c.useState)(!1),[ut,dt]=(0,c.useState)(!1),[ht,pt]=(0,c.useState)(!B),[ft,mt]=(0,c.useState)(!1),[gt,vt]=(0,c.useState)(2),[yt,bt]=(0,c.useState)(!1),[xt,St]=(0,c.useState)("center"),[wt,_t]=(0,c.useState)(!1);(0,c.useEffect)((()=>{bt(!!aH),pH=!!aH}),[aH]),(0,c.useEffect)((()=>{let e="bottom",t=Rj("microphoneMode","HOLD_TO_TALK");window.innerWidth<=768?(e="bottom",t="HOLD_TO_TALK"):e=window.matchMedia("(orientation: portrait)").matches||window.innerHeight>window.innerWidth?"center":"bottom",pt(Rj("muteSpeaker",!B)),hH=Rj("muteSpeaker",!B),mt("CONTINUOUS"===t),vt(Rj("continuousSpeechTimeout",2)),St(Rj("controlsPosition",e)),_t(Rj("hideEmissions",!1)),(null==F?void 0:F.loginToken)||L||(ke(Rj("loginToken",void 0)),dH=Rj("loginToken",void 0))}),[]);const[Ct,At]=(0,c.useState)(E),[Et,Tt]=(0,c.useState)(),[Mt,It]=(0,c.useState)(null),[Rt,Pt]=(0,c.useState)(),kt=async(e,t)=>{var n;const r=null!=t?t:Kt;if(e&&r){const{currentState:t,...i}=await we({sessionId:r,placeName:e.placeName,latitude:e.latitude,longitude:e.longitude,uncertaintyKm:null!==(n=e.uncertainty)&&void 0!==n?n:0});t&&0===i.resultCode&&Yt((e=>{var n;return{...e,...t,hints:(null===(n=t.hints)||void 0===n?void 0:n.length)?t.hints:null==e?void 0:e.hints}}))}};(0,c.useEffect)((()=>{const e=Rj("position",void 0);e&&Pt(e)}),[]);const[Ot,Nt]=(0,c.useState)(""),[Lt,Dt]=(0,c.useState)(!1),[Bt,zt]=(0,c.useState)([]),Ft=e=>{zt((t=>{var n,r;return[...t,{...e,media:null!==(r=null===(n=e.media)||void 0===n?void 0:n.filter((e=>{var t;return!("text/javascript"===e.mimeType&&(null===(t=e.properties)||void 0===t?void 0:t.executable))})))&&void 0!==r?r:[]}]}))},Ut=async(n,r,i,o=!0,s,a=!1,l,c=!1,u=!1)=>{var d,h,p,f;const m=i||Kt||(null===(d=window.getMemoriState())||void 0===d?void 0:d.sessionID);if(!m||!(null==n?void 0:n.length))return;a||Ft({text:n,translatedText:s,fromUser:!0,media:null!=r?r:[],initial:Kt?!!i&&i!==Kt:!!i}),Ye(!0),Xe(l);let g=n,v=!1;if(o&&!Ie&&Ve&&We.toUpperCase()!==je.toUpperCase()){g=(await px(n,je,We,T)).text}const{currentState:y,...b}=await xe({sessionId:m,text:g});if(0===b.resultCode&&y){const n=c&&l?l:null!==(h=y.emission)&&void 0!==h?h:null==Qt?void 0:Qt.emission;if("X4"===y.state&&e.giverTag){const{currentState:r,...i}=await Ae(m,e.giverTag);0===i.resultCode?(Zt(r),n&&(Ft({text:n,emitter:r.emitter,media:r.media,fromUser:!1,questionAnswered:g,contextVars:r.contextVars,date:r.currentDate,placeName:r.currentPlaceName,placeLatitude:r.currentLatitude,placeLongitude:r.currentLongitude,placeUncertaintyKm:r.currentUncertaintyKm,tag:r.currentTag,memoryTags:r.memoryTags}),mn(n))):(console.error(b,i),t(Ju).error(fe(Gv(i.resultCode))),v=!0)}else if("X2d"===y.state&&e.giverTag){const{currentState:r,...i}=await xe({sessionId:m,text:Math.random().toString().substring(2,8)});if(0===i.resultCode){const{currentState:r,...i}=await Ae(m,e.giverTag);0===i.resultCode?(Zt(r),n&&(Ft({text:n,emitter:r.emitter,media:r.media,fromUser:!1,questionAnswered:g,contextVars:r.contextVars,date:r.currentDate,placeName:r.currentPlaceName,placeLatitude:r.currentLatitude,placeLongitude:r.currentLongitude,placeUncertaintyKm:r.currentUncertaintyKm,tag:r.currentTag,memoryTags:r.memoryTags}),mn(n))):(console.error(b,i),t(Ju).error(fe(Gv(i.resultCode))),v=!0)}else console.error(b,i),t(Ju).error(fe(Gv(i.resultCode))),v=!0}else We.toLowerCase()!==je.toLowerCase()&&n&&!Ie&&Ve?jt(y,We,g).then((e=>{e.emission&&mn(e.emission)})):(Zt({...y,emission:n}),n&&(Ft({text:n,emitter:y.emitter,media:y.media,fromUser:!1,questionAnswered:g,generatedByAI:!!y.completion,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}),mn(n)))}else 404===b.resultCode&&(zt((e=>[...e.slice(0,e.length-1)])),$t(!1,Ct||e.secretToken,Et,Ie&&e.giverTag?e.giverTag:void 0,Ie&&e.giverPIN?e.giverPIN:void 0,{PATHNAME:window.location.pathname,ROUTE:(null===(f=null===(p=window.location.pathname)||void 0===p?void 0:p.split("/"))||void 0===f?void 0:f.pop())||"",...I||{}},R).then((e=>{console.info("session timeout"),(null==e?void 0:e.sessionID)&&setTimeout((()=>{Ut(n,r,null==e?void 0:e.sessionID)}),500)})));u||(Xe(void 0),Ye(!1))},jt=async(e,t,n)=>{var r,i,o;const s=null!==(r=e.emission)&&void 0!==r?r:null==Qt?void 0:Qt.emission;let a={...e},l=null;if(s&&!Ie&&je.toUpperCase()!==t.toUpperCase()&&Ve){const r=await px(s,t,je,T);if(e.hints&&e.hints.length>0){const n=await Promise.all((null!==(i=e.hints)&&void 0!==i?i:[]).map((async e=>{var n;const r=await px(e,t,je,T);return{text:null!==(n=null==r?void 0:r.text)&&void 0!==n?n:e,originalText:e}})));a={...e,emission:r.text,translatedHints:n}}else a={...e,emission:r.text,hints:null!==(o=e.hints)&&void 0!==o?o:"G1"===e.state?null==Qt?void 0:Qt.hints:[]};r.text.length>0&&(l={text:r.text,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,generatedByAI:!!e.completion,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags})}else a={...e,emission:s},s&&(l={text:s,emitter:e.emitter,media:e.media,fromUser:!1,questionAnswered:n,contextVars:e.contextVars,date:e.currentDate,placeName:e.currentPlaceName,placeLatitude:e.currentLatitude,placeLongitude:e.currentLongitude,placeUncertaintyKm:e.currentUncertaintyKm,tag:e.currentTag,memoryTags:e.memoryTags});return Zt(a),l&&Ft(l),a},Ht=void 0!==e.ageRestriction?e.ageRestriction:e.nsfw?18:e.enableCompletions?14:0,[Vt,Gt]=(0,c.useState)(),[Wt,qt]=(0,c.useState)(!1),[Kt,Jt]=(0,c.useState)(k),[Qt,Yt]=(0,c.useState)(),Zt=e=>{var t;Yt(e),z&&z(e);const n=null===(t=null==e?void 0:e.media)||void 0===t?void 0:t.filter((e=>{var t;return"text/javascript"===e.mimeType&&!!(null===(t=e.properties)||void 0===t?void 0:t.executable)}));null==n||n.forEach((e=>{try{setTimeout((()=>{var t;console.log("snippet",e),new Function(null!==(t=e.content)&&void 0!==t?t:"")(),setTimeout((()=>{var e,t,n;null===(e=document.querySelector(".memori-chat--content"))||void 0===e||e.scrollTo(0,null!==(n=null===(t=document.querySelector(".memori-chat--content"))||void 0===t?void 0:t.scrollHeight)&&void 0!==n?n:0)}),400)}),1e3)}catch(e){console.error(e)}}))},Xt=async n=>{var r,i,o,s,a;let l=Rj("birthDate",void 0);if(Vt||l||!Ht)if("PUBLIC"===e.privacyType||e.secretToken||Ct||Et){Je(!0);try{if(!e.giverTag&&(null===(r=e.receivedInvitations)||void 0===r?void 0:r.length)){let t=e.receivedInvitations.find((e=>"GIVER"===e.type&&"ACCEPTED"===e.state));t&&(e.giverTag=t.tag,e.giverPIN=t.pin)}let l;try{l=window.location.href}catch(e){console.error(e)}const c=await be({...n,tag:null!==(i=n.tag)&&void 0!==i?i:null==N?void 0:N.tag,pin:null!==(o=n.pin)&&void 0!==o?o:null==N?void 0:N.pin,additionalInfo:{...F||{},loginToken:null!==(a=null!==(s=null!=dH?dH:Pe)&&void 0!==s?s:null==F?void 0:F.loginToken)&&void 0!==a?a:L,language:dn(We),referral:l}});if((null==c?void 0:c.sessionID)&&(null==c?void 0:c.currentState)&&0===c.resultCode)return Jt(c.sessionID),Rt&&kt(Rt,c.sessionID),Je(!1),{dialogState:c.currentState,sessionID:c.sessionID};(null==c?void 0:c.resultMessage.startsWith("This Memori is aged restricted"))?(console.error(c),t(Ju).error(fe("underageTwinSession",{age:Ht})),Ue(!0)):403===(null==c?void 0:c.resultCode)?(At(void 0),It("password")):(console.error(c),t(Ju).error(fe(Gv(null==c?void 0:c.resultCode))),Ue(!0))}catch(e){console.error(e),new Error("Error fetching session")}}else It("password");else qt(!0)},$t=async(n=!1,r,i,o,s,a,l,c)=>{var u,d,h,p,f;Je(!0);try{let m,g=Rj("birthDate",void 0);if(!c&&!g&&Ht)return void qt(!0);if(!("PUBLIC"===e.privacyType||r||e.secretToken||Ct||i||Et))return void It("password");try{m=window.location.href}catch(e){console.error(e)}const{sessionID:v,currentState:y,...b}=await be({memoriID:null!==(u=e.engineMemoriID)&&void 0!==u?u:"",password:r||Ct||e.secretToken,recoveryTokens:i||Et,tag:o,pin:s,initialContextVars:{PATHNAME:window.location.pathname,ROUTE:(null===(h=null===(d=window.location.pathname)||void 0===d?void 0:d.split("/"))||void 0===h?void 0:h.pop())||"",...a||{}},initialQuestion:l,birthDate:c||g||void 0,additionalInfo:{...F||{},loginToken:null!==(f=null!==(p=null!=dH?dH:Pe)&&void 0!==p?p:null==F?void 0:F.loginToken)&&void 0!==f?f:L,language:dn(We),referral:m}});if(v&&y&&0===b.resultCode)return Jt(v),n&&(Zt(y),y.emission&&(Bt.length<=1?zt([{text:y.emission,emitter:y.emitter,media:y.media,fromUser:!1,initial:!0,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}]):Ft({text:y.emission,emitter:y.emitter,media:y.media,fromUser:!1,initial:!0,contextVars:y.contextVars,date:y.currentDate,placeName:y.currentPlaceName,placeLatitude:y.currentLatitude,placeLongitude:y.currentLongitude,placeUncertaintyKm:y.currentUncertaintyKm,tag:y.currentTag,memoryTags:y.memoryTags}))),Rt&&kt(Rt,v),e.needsDateTime&&tn({sessionID:v,state:y}),Je(!1),{dialogState:y,sessionID:v};(null==b?void 0:b.resultMessage.startsWith("This Memori is aged restricted"))?(console.error(b),t(Ju).error(fe("underageTwinSession",{age:Ht})),Ue(!0)):403===(null==b?void 0:b.resultCode)?(At(void 0),It("password")):(console.error(b),t(Ju).error(fe(Gv(b.resultCode))),Ue(!0))}catch(e){console.error(e)}return Je(!1),null},en=async(t,n,r,i)=>{var o,s,a,l,c;if(!t||!n)return console.error("CHANGETAG/Session not found"),Promise.reject("Session not found");try{const{currentState:t,resultCode:u}=await Ae(n,null!=r?r:Kv);if(0===u){let d=0;if(r!==Kv&&i&&("X1a"===t.state||"X1b"===t.state)){const{resultCode:e}=await xe({sessionId:n,text:null!=i?i:""});d=e}if(0===d){const{currentState:e,...t}=await Ee(n);if(0===t.resultCode&&e)return{currentState:e,sessionId:n,...t}}else if([400,401,403,404,500].includes(u)){console.warn("[APPCONTEXT/CHANGETAG]",u);let t,n=Rj("birthDate",void 0);try{t=window.location.href}catch(e){console.error(e)}Xt({memoriID:null!==(o=e.engineMemoriID)&&void 0!==o?o:"",password:E||Ct||e.secretToken,tag:e.giverTag,pin:e.giverPIN,initialContextVars:{PATHNAME:window.location.pathname,ROUTE:(null===(a=null===(s=window.location.pathname)||void 0===s?void 0:s.split("/"))||void 0===a?void 0:a.pop())||"",...I||{}},initialQuestion:R,birthDate:Vt||n||void 0,additionalInfo:{...F||{},loginToken:null!==(c=null!==(l=null!=dH?dH:Pe)&&void 0!==l?l:null==F?void 0:F.loginToken)&&void 0!==c?c:L,language:dn(We),referral:t}})}else if(t)return{currentState:t,sessionId:n,resultCode:u}}}catch(e){let t=e;return console.error("[APPCONTEXT/CHANGETAG]",t),Promise.reject(t)}return null};(0,c.useEffect)((()=>()=>{Qt&&(null==Qt?void 0:Qt.currentTag)===e.giverTag||(async()=>{Kt&&e.giverTag&&e.giverPIN&&(zt([]),await en(e.engineMemoriID,Kt,e.giverTag,e.giverPIN))})()}),[]);const tn=(0,c.useCallback)((async({sessionID:t,date:n,state:r})=>{var i;const o=null!=t?t:Kt,s=null!=r?r:Qt;if(!o||!e.needsDateTime||(null===(i=null==s?void 0:s.hints)||void 0===i?void 0:i.length))return;const a=(n?_s.DateTime.fromISO(n):_s.DateTime.now()).toUTC().toFormat("yyyy/MM/dd HH:mm:ss ZZ").split(":").slice(0,-1).join(":"),{currentState:l,...c}=await _e(o,a);0===c.resultCode&&l&&Yt((e=>{var t;return{...e,...l,hints:(null===(t=l.hints)||void 0===t?void 0:t.length)?l.hints:null==e?void 0:e.hints}}))}),[Qt,e.needsDateTime,Kt]);(0,c.useEffect)((()=>{if(Kt&&e.needsDateTime){tn({sessionID:Kt,state:Qt});let e=setInterval((()=>{tn({sessionID:Kt})}),6e4);return()=>{clearInterval(e)}}}),[e.needsDateTime,Kt]);const[nn,rn]=(0,c.useState)(),on=(0,c.useRef)(),sn=()=>{nn&&(clearTimeout(nn),rn(void 0)),(null==on?void 0:on.current)&&(clearTimeout(on.current),on.current=void 0)},an=()=>{sn(),yt||Ot.length||Qe||Lt||cn()},ln=async()=>{var e;if(!et||yt||Ot.length||Qe||Lt)an();else if(Kt&&et&&(null==Qt?void 0:Qt.acceptsTimeout)){const{currentState:t,...n}=await Ce(Kt);if(0===n.resultCode&&t){const n=t.emission;if(!Ie&&Ve&&We!==(null==me?void 0:me.language)&&n&&n.length>0)jt({...t,emission:n},We).then((e=>{e.emission&&mn(e.emission)}));else{if(!(n&&n.length>0))return void an();Ft({text:n,emitter:t.emitter,media:t.media,fromUser:!1,generatedByAI:!!t.completion,contextVars:t.contextVars,date:t.currentDate,placeName:t.currentPlaceName,placeLatitude:t.currentLatitude,placeLongitude:t.currentLongitude,placeUncertaintyKm:t.currentUncertaintyKm,tag:t.currentTag,memoryTags:t.memoryTags}),mn(n),Zt({...t,hints:null!==(e=t.hints)&&void 0!==e?e:"G1"===t.state?null==Qt?void 0:Qt.hints:[]})}}}},cn=()=>{let e=null==Qt?void 0:Qt.timeout;if(!e){let t=40,n=25;if(e=Math.floor(Math.random()*(t-n))+n,null==Qt?void 0:Qt.emission){e+=Qt.emission.length/26.5}}if(Ge&&(e=Ge,null==Qt?void 0:Qt.emission)){e+=Qt.emission.length/26.5}let t=setTimeout(ln,1e3*e);rn(t),on.current=t};(0,c.useEffect)((()=>{(Ot.length||yt||Qe)&&sn(),Kt&&!Ot.length&&an()}),[null==Qt?void 0:Qt.acceptsTimeout,null==Qt?void 0:Qt.timeout,null==Qt?void 0:Qt.state,yt,Kt,Bt,Ot,Qe,et]),(0,c.useEffect)((()=>()=>{tt(!1),ze(!1),sn(),on.current=void 0}),[]);const un=(0,c.useCallback)((t=>{var n,r,i,o;let s="",a=(null!==(o=null!==(i=null!=t?t:null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])&&void 0!==i?i:me.language)&&void 0!==o?o:"IT").toUpperCase(),l=e.voiceType;if(e.enableBoardOfExperts&&(null==Qt?void 0:Qt.emitter)){null==Kn||Kn.find((e=>e.name===(null==Qt?void 0:Qt.emitter)))}switch(a){case"IT":s=""+("MALE"===l?"it-IT-DiegoNeural":"it-IT-ElsaNeural");break;case"DE":s=""+("MALE"===l?"de-DE-ConradNeural":"de-DE-KatjaNeural");break;case"EN":s=""+("MALE"===l?"en-GB-RyanNeural":"en-GB-SoniaNeural");break;case"ES":s=""+("MALE"===l?"es-ES-AlvaroNeural":"es-ES-ElviraNeural");break;case"FR":s=""+("MALE"===l?"fr-FR-HenriNeural":"fr-FR-DeniseNeural");break;case"PT":s=""+("MALE"===l?"pt-PT-DuarteNeural":"pt-PT-RaquelNeural");break;case"UK":s=""+("MALE"===l?"uk-UA-OstapNeural":"uk-UA-PolinaNeural");break;case"RU":s=""+("MALE"===l?"ru-RU-DmitryNeural":"ru-RU-SvetlanaNeural");break;case"PL":s=""+("MALE"===l?"pl-PL-MarekNeural":"pl-PL-AgnieszkaNeural");break;case"FI":s=""+("MALE"===l?"fi-FI-HarriNeural":"fi-FI-SelmaNeural");break;case"EL":s=""+("MALE"===l?"el-GR-NestorasNeural":"el-GR-AthinaNeural");break;case"AR":s=""+("MALE"===l?"ar-SA-HamedNeural":"ar-SA-ZariyahNeural");break;case"ZH":s=""+("MALE"===l?"zh-CN-YunxiNeural":"zh-CN-XiaoxiaoNeural");break;case"JA":s=""+("MALE"===l?"ja-JP-KeitaNeural":"ja-JP-NanamiNeural");break;default:s=""+("MALE"===l?"it-IT-DiegoNeural":"it-IT-IsabellaNeural")}return s}),[e.voiceType,e.enableBoardOfExperts,null==Qt?void 0:Qt.emitter,me.language,e.culture]),dn=t=>{var n,r;let i="";switch((t||(null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])||me.language||"IT").toUpperCase()){case"IT":default:i="it-IT";break;case"DE":i="de-DE";break;case"EN":i="en-GB";break;case"ES":i="es-ES";break;case"FR":i="fr-FR";break;case"PT":i="pt-PT";break;case"UK":i="uk-UK";break;case"RU":i="ru-RU";break;case"PL":i="pl-PL";break;case"FI":i="fi-FI";break;case"EL":i="el-GR";break;case"AR":i="ar-SA";break;case"ZH":i="zh-CN";break;case"JA":i="ja-JP"}return i},[hn,pn]=(0,c.useState)();(0,c.useEffect)((()=>{(async()=>{try{const e=await fetch(`${T||"https://aisuru.com"}/api/lexiconmap`);return await e.json()}catch(e){console.error(e)}})().then((e=>{pn(e)}))}),[]);const fn=()=>{const e=new CustomEvent("MemoriEndSpeak");document.dispatchEvent(e)},mn=e=>{if(!D||m)return void fn();if(An(),m)return;if(ht||hH)return pH=!1,Ye(!1),fn(),void(ft&&wn());lH&&lH.pause();let t=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"),n=/iPad|iPhone|iPod/.test(navigator.userAgent);if("interrupted"===cH.state)return void cH.resume().then((()=>mn(e)));if("closed"===cH.state){cH=new Qo;let e=cH.createBuffer(1,1e4,22050),t=cH.createBufferSource();t.buffer=e,t.connect(cH.destination)}else if("suspended"===cH.state){gn(),cH=new Qo;let e=cH.createBuffer(1,1e4,22050),t=cH.createBufferSource();t.buffer=e,t.connect(cH.destination)}if(!aH){n||(lH=new bs.SpeakerAudioDestination);let e=bs.AudioConfig.fromSpeakerOutput(lH);aH=new bs.SpeechSynthesizer(sH,e)}const r=cH.createBufferSource();r.addEventListener("ended",(()=>{bt(!1),pH=!1})),lH.onAudioEnd=()=>{bt(!1),pH=!1,r.disconnect(),fn(),Rn()},aH.speakSsmlAsync(`<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" xml:lang="${dn(We)}"><voice name="${un(We)}"><s>${((e,t)=>{var n;if(!hn)return e;const r={...null!==(n=hn.common)&&void 0!==n?n:{},...(null==O?void 0:O.id)&&hn[O.id]?hn[O.id]:{}},i=Object.keys(r).map((e=>{var n;return{word:e,phoneme:null!==(n=r[e][t.toLowerCase()])&&void 0!==n?n:r[e].default,caseSensitive:r[e].caseSensitive}}));return i.reduce(((e,{word:t,phoneme:n,caseSensitive:r})=>e.replace(new RegExp(`\\b${t}\\b`,r?"g":"gi"),`<phoneme alphabet="ipa" ph="${n}">${t}</phoneme>`)),e)})(sm(om(im(e))),We.toLowerCase())}</s></voice></speak>`,(i=>{if(i){bt(!0),pH=!0;try{cH.decodeAudioData(i.audioData,(function(e){r.buffer=e,r.connect(cH.destination),(Bt.length<1||t&&n)&&r.start(0)})),cH.onstatechange=()=>{"suspended"===cH.state||"closed"===cH.state?(r.disconnect(),bt(!1),pH=!1):"interrupted"===cH.state&&cH.resume()},cH.resume(),aH&&(aH.close(),aH=null)}catch(t){console.error("speak error: ",t),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),bt(!1),pH=!1,aH&&(aH.close(),aH=null),fn()}}else cH.resume(),bt(!1),pH=!1,fn()}),(t=>{console.error("speak:",t),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),bt(!1),pH=!1,fn()})),Ye(!1)},gn=()=>{bt(!1),pH=!1;try{aH&&(aH.close(),aH=null),"closed"!==cH.state&&cH.close(),lH&&(lH.pause(),lH.close())}catch(e){console.error("stopAudio error: ",e)}};(0,c.useEffect)((()=>{let e=document.querySelector("#chat-fieldset textarea");e&&e.focus()}),[null==Qt?void 0:Qt.emission]);const[vn,yn]=(0,c.useState)(""),bn=()=>yn(""),[xn,Sn]=(0,c.useState)(null),wn=()=>{let e=setTimeout((async()=>{En();const e=rm(vn);e.length>0&&Lt?(Ut(e),bn(),Nt("")):Lt&&an()}),1e3*gt);Sn(e)},_n=()=>{xn&&(clearTimeout(xn),Sn(null))};(0,c.useEffect)((()=>{_n(),ft&&wn(),an()}),[vn]);const Cn=()=>{if(D){En(),yn(""),bn();try{navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){rt(!0),sH||(sH=bs.SpeechConfig.fromSubscription(D,"eastus"),sH.speechRecognitionLanguage=dn(We),sH.speechSynthesisLanguage=dn(We),sH.speechSynthesisVoiceName=un(We));const t=bs.AudioConfig.fromDefaultMicrophoneInput();oH=new bs.SpeechRecognizer(sH,t),Dt(!0),oH.recognized=(e,t)=>{if(t.result.text)if(t.result.reason===bs.ResultReason.RecognizedSpeech){let e=t.result.text;if(yn(e||""),(null==e?void 0:e.length)>0){const t=rm(e);t.length>0&&Nt((e=>`${e} ${t}`))}}else t.result.reason===bs.ResultReason.NoMatch&&console.debug("NOMATCH: Speech could not be recognized.")},oH.canceled=(e,t)=>{t.reason===bs.CancellationReason.Error&&(console.debug(`"CANCELED: ErrorCode=${t.errorCode}`),console.debug(`"CANCELED: ErrorDetails=${t.errorDetails}`),console.debug("CANCELED: Did you set the speech resource key and region values?")),An()},oH.sessionStopped=(e,t)=>{An()},bn(),oH.startContinuousRecognitionAsync()})).catch(console.error)}catch(e){console.error(e)}}},An=()=>{oH&&(oH.stopContinuousRecognitionAsync(),oH.close(),oH=null),Dt(!1)},En=()=>{rt(!1),An(),_n()},Tn=()=>{try{En(),sn(),ze(!1),on.current=void 0,gn()}catch(e){console.log("Error: resetUIEffects",e)}};(0,c.useEffect)((()=>()=>{Tn()}),[]),(0,c.useEffect)((()=>(document.addEventListener("MemoriResetUIEffects",Tn),()=>{document.removeEventListener("MemoriResetUIEffects",Tn)})),[]),(0,c.useEffect)((()=>{"Z0"===(null==Qt?void 0:Qt.state)&&En()}),[null==Qt?void 0:Qt.state]);const[Mn,In]=(0,c.useState)(!1),Rn=(0,c.useCallback)((e=>{yt&&aH&&(aH.close(),aH=null),!ft||!nt&&Mn||(In(!0),Cn())}),[ft,nt]);(0,c.useEffect)((()=>{Bt.length>1&&!yt&&ft&&(nt||!Mn)?Cn():yt&&Lt&&An()}),[yt]),(0,c.useEffect)((()=>{Lt&&(En(),bn(),Nt(""),Cn())}),[je]);const[Pn,kn]=(0,c.useState)("keypress");(0,c.useEffect)((()=>{const e=Rj("sendOnEnter","keypress");window.innerWidth<=768?kn("click"):kn(e)}),[]),(0,c.useEffect)((()=>{Pj("sendOnEnter",Pn)}),[Pn]);const[On,Nn]=(0,c.useState)(),Ln=null==He?void 0:He.globalBackground,Dn=Ln?`url(${Ln})`:null,Bn=u?{"--memori-chat-bubble-bg":"#fff",...He&&!p?{"--memori-text-color":null!==(ne=He.textColor)&&void 0!==ne?ne:"#000"}:{},...(null==He?void 0:He.buttonBgColor)?{"--memori-button-bg":He.buttonBgColor,"--memori-primary":He.buttonBgColor}:{},...(null==He?void 0:He.buttonTextColor)?{"--memori-button-text":He.buttonTextColor}:{},...(null==He?void 0:He.blurBackground)?{"--memori-blur-background":"5px"}:{"--memori-blur-background":"0px"},...(null==He?void 0:He.innerBgColor)?{"--memori-inner-bg":`rgba(${"dark"===He.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(re=He.innerBgAlpha)&&void 0!==re?re:.4})`,"--memori-inner-content-pad":"1.5rem","--memori-nav-bg-image":"none","--memori-nav-bg":`rgba(${"dark"===He.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(ie=null==He?void 0:He.innerBgAlpha)&&void 0!==ie?ie:.4})`}:{"--memori-inner-content-pad":"0px"}}:{},zn=`\n ${m?"#preview,":"WEBSITE_ASSISTANT"===$e?"":":root,"} .memori-widget, .memori-drawer, .memori-modal {\n ${Object.entries(Bn).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `,Fn=void 0===(null==He?void 0:He.showAIicon)||(null==He?void 0:He.showAIicon),Un=void 0===(null==He?void 0:He.showWhyThisAnswer)||(null==He?void 0:He.showWhyThisAnswer),[jn,Hn]=(0,c.useState)(!1);(0,c.useEffect)((()=>{(window.innerWidth>=768&&"FULLPAGE"===$e||"FULLPAGE"!==$e)&&Hn(!0)}),[]);const[Vn,Gn]=(0,c.useState)();(0,c.useEffect)((()=>{e.engineMemoriID&&(async e=>{let t,n;try{const{contentQualityIndex:r,answerQualityIndex:i,unansweredQuestions:o,...s}=await Te(e);0===s.resultCode&&(t=r,n=o)}catch(e){let t=e;console.error("[APPCONTEXT/QUERYGAMIFICATIONPOINTS]",t)}return{points:null!=t?t:0,unansweredQuestions:null!=n?n:0}})(e.engineMemoriID).then((e=>{Gn(nH(e.points))})).catch(console.error)}),[e.engineMemoriID]),(0,c.useEffect)((()=>{if(null==He?void 0:He.seoTitle){let e=document.createElement("meta");e.setAttribute("property","og:title"),e.setAttribute("content",He.seoTitle),document.head.append(e)}if(null==He?void 0:He.seoDescription){let e=document.createElement("meta");e.setAttribute("property","og:description"),e.setAttribute("content",He.seoDescription),document.head.append(e)}if(null==He?void 0:He.seoUrl){let e=document.createElement("meta");e.setAttribute("property","og:url"),e.setAttribute("content",He.seoUrl),document.head.append(e)}let t=P||e.avatarURL;if((null==He?void 0:He.seoImageShowAvatar)&&t){let e=document.createElement("meta");e.setAttribute("property","og:image"),e.setAttribute("content",t),document.head.append(e)}}),[He,e.avatarURL,P]);const Wn=(0,c.useCallback)((e=>{const{text:t,waitForPrevious:n,hidden:r,typingText:i,useLoaderTextAsMsg:o,hasBatchQueued:s}=e.detail;t&&(n&&!hH&&(pH||Qe)?setTimeout((()=>{Wn(e)}),1e3):(An(),gn(),Ut(t,void 0,void 0,void 0,void 0,r,i,o,s)))}),[Kt,yt,Qe,We]);(0,c.useEffect)((()=>(document.addEventListener("MemoriTextEntered",Wn),()=>{document.removeEventListener("MemoriTextEntered",Wn)})),[Kt,We]);const qn=(0,c.useCallback)((async t=>{var n,r,i,o,s,a,l,c,u,d,h,p,f,m,g,v,y,b;const x=(null==t?void 0:t.sessionID)||Kt,S=(null==t?void 0:t.dialogState)||Qt;ze(!0);let w=document.getElementById("memori-audio"),_=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome");w&&_&&(w.muted=!1,w.play().catch((e=>{console.error("error playing intro audio",e)})));let C=Rj("birthDate",void 0),A=Vt||C||void 0;if(x||!Ht||A){if(!x&&"PUBLIC"!==e.privacyType&&!e.secretToken&&!Ct&&!Et||!x&&Fe)return It("password"),void ze(!1);if(!x){ze(!1),Ue(!1);const t=await Xt({memoriID:e.engineMemoriID,password:E||Ct||e.secretToken,tag:null==N?void 0:N.tag,pin:null==N?void 0:N.pin,initialContextVars:{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...I||{}},initialQuestion:R,birthDate:A,additionalInfo:{...F||{},loginToken:null!==(a=null!==(s=null!=dH?dH:Pe)&&void 0!==s?s:null==F?void 0:F.loginToken)&&void 0!==a?a:L,language:dn(We)}});return void((null==t?void 0:t.dialogState)?(zt([]),jt(t.dialogState,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))):await qn(t||void 0))}if(k){const{currentState:t,...n}=await Ee(x);if(0!==n.resultCode||!t)return console.debug("session expired, opening new session"),Ue(!0),Jt(void 0),ze(!1),void await qn();if(zt([]),Rt&&kt(Rt,x),e.needsDateTime&&tn({sessionID:x,state:t}),Ie&&e.giverTag&&(null==Qt?void 0:Qt.currentTag)!==e.giverTag)try{console.debug("change tag #0"),await en(e.engineMemoriID,x,"-");const t=await en(e.engineMemoriID,x,e.giverTag,e.giverPIN);if(!t||0!==t.resultCode)throw console.error("session #1",t),new Error("No session");jt(t.currentState,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))}catch(t){console.error("session #2",t),$t(!0,null==e?void 0:e.secretToken,void 0,null==e?void 0:e.giverTag,null==e?void 0:e.giverPIN,{PATHNAME:null===(l=window.location.pathname)||void 0===l?void 0:l.toUpperCase(),ROUTE:(null===(d=null===(u=null===(c=window.location.pathname)||void 0===c?void 0:c.split("/"))||void 0===u?void 0:u.pop())||void 0===d?void 0:d.toUpperCase())||"",...I||{}},R,A).then((()=>{tt(!0)}))}else if(!Ie&&N&&(null==Qt?void 0:Qt.currentTag)!==N.tag)try{console.debug("change tag #3"),await en(e.engineMemoriID,x,"-");const t=await en(e.engineMemoriID,x,N.tag,N.pin);if(!t||0!==t.resultCode)throw console.error("session #4",t),new Error("No session");jt(t.currentState,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))}catch(t){console.error("session #5",t),$t(!0,null==e?void 0:e.secretToken,void 0,N.tag,N.pin,{PATHNAME:null===(h=window.location.pathname)||void 0===h?void 0:h.toUpperCase(),ROUTE:(null===(m=null===(f=null===(p=window.location.pathname)||void 0===p?void 0:p.split("/"))||void 0===f?void 0:f.pop())||void 0===m?void 0:m.toUpperCase())||"",...I||{}},R,A).then((()=>{tt(!0)}))}else if(Ie||N||(null==Qt?void 0:Qt.currentTag)===Kv)jt(t,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}));else try{console.debug("change tag #6"),await en(e.engineMemoriID,x,"-");const t=await en(e.engineMemoriID,x,Kv);if(!t||0!==t.resultCode)throw console.error("session #7",t),new Error("No session");jt(t.currentState,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))}catch(t){console.error("session #8",t),$t(!0,null==e?void 0:e.secretToken,void 0,void 0,void 0,{PATHNAME:null===(g=window.location.pathname)||void 0===g?void 0:g.toUpperCase(),ROUTE:(null===(b=null===(y=null===(v=window.location.pathname)||void 0===v?void 0:v.split("/"))||void 0===y?void 0:y.pop())||void 0===b?void 0:b.toUpperCase())||"",...I||{}},R,A).then((()=>{tt(!0)}))}Rt&&kt(Rt,x),e.needsDateTime&&tn({sessionID:x,state:t})}else zt([]),jt(S,We).then((e=>{e.emission&&mn(e.emission)})).finally((()=>{tt(!0)}))}else qt(!0),ze(!1)}),[Ct,e,Et,Vt,Kt,We,Rt]);(0,c.useEffect)((()=>{const t=document.querySelector(`memori-client[memoriname="${e.name}"]`)||document.querySelector(`memori-client[memoriid="${e.memoriID}"]`)||document.querySelector("memori-client");if(!t)return;const n=new MutationObserver(((e,t)=>{var n,r,i;for(const t of e)"attributes"===t.type&&"authtoken"===(null===(n=t.attributeName)||void 0===n?void 0:n.toLowerCase())&&("MEMORI-CLIENT"===t.target.nodeName?(ke(t.target.getAttribute("authtoken")||void 0),dH=t.target.getAttribute("authtoken")||void 0):(ke((null===(i=null===(r=t.target)||void 0===r?void 0:r.parentElement)||void 0===i?void 0:i.getAttribute("authtoken"))||void 0),dH=t.target.getAttribute("authtoken")||void 0))}));return n.observe(t,{attributes:!0,childList:!1,subtree:!1}),()=>{n.disconnect()}}),[]);const[Kn,Jn]=(0,c.useState)(),Qn=(0,c.useCallback)((async()=>{if(Kt&&(null==e?void 0:e.enableBoardOfExperts))try{const{experts:e,count:t,...n}=await Me(Kt);0===n.resultCode?Jn(e):console.warn("Error fetching experts",n)}catch(e){console.warn(e)}}),[Kt,null==e?void 0:e.enableBoardOfExperts]);(0,c.useEffect)((()=>{Qn()}),[Kt,Qn]);const Yn=e.enableDeepThought&&!!Pe&&!!(null==Oe?void 0:Oe.userID)&&(null==Oe?void 0:Oe.pAndCUAccepted),Zn=null==O?void 0:O.billingDelegation,[Xn,$n]=(0,c.useState)(!0),er=(0,c.useCallback)((async()=>{if(null==O?void 0:O.billingDelegation)try{const e=await rH({operation:Yn?"dt_session_creation":"session_creation",baseUrl:T,userID:r,userName:i,tenant:o});e.enough?$n(!0):($n(!1),console.warn("Not enough credits. Required:",e.required))}catch(e){let t=e;console.error(t)}}),[null==O?void 0:O.billingDelegation,Yn]);(0,c.useEffect)((()=>{(null==O?void 0:O.billingDelegation)&&er()}),[null==O?void 0:O.billingDelegation,Yn]);const tr=void 0===C?"TOTEM"!==d&&"WEBSITE_ASSISTANT"!==d:!C,nr={memori:e,tenant:O,history:Bt,showShare:null===(oe=null!=f?f:null==He?void 0:He.showShare)||void 0===oe||oe,position:Rt,setShowPositionDrawer:ot,setShowSettingsDrawer:at,setShowKnownFactsDrawer:ct,setShowExpertsDrawer:dt,showSpeaker:!!D,speakerMuted:ht||hH,setSpeakerMuted:e=>{if(hH=!!e,pt(e),Pj("muteSpeaker",!!e),e)gn();else{cH=new Qo;let e=cH.createBuffer(1,1e4,22050),t=cH.createBufferSource();t.buffer=e,t.connect(cH.destination)}},showSettings:x,hasUserActivatedSpeak:et,showReload:"TOTEM"===$e,showClear:w,clearHistory:()=>zt((e=>e.slice(-1))),showLogin:_,setShowLoginDrawer:De,loginToken:Pe,user:Oe,sessionID:Kt},rr={memori:e,integration:u,integrationConfig:He,tenant:O,instruct:Ie,avatar3dVisible:jn,setAvatar3dVisible:Hn,hasUserActivatedSpeak:et,isPlayingAudio:yt&&!ht,loading:!!Qe,baseUrl:T,apiUrl:M},ir={memori:e,tenant:O,gamificationLevel:Vn,language:je,userLang:We,setUserLang:qe,baseUrl:T,apiUrl:M,position:Rt,openPositionDrawer:()=>ot(!0),integrationConfig:He,instruct:Ie,sessionId:Kt,clickedStart:Be,onClickStart:qn,initializeTTS:()=>{if(!D)return;sH=bs.SpeechConfig.fromSubscription(D,"eastus"),sH.speechSynthesisLanguage=dn(We),sH.speechSynthesisVoiceName=un(We),sH.speechRecognitionLanguage=dn(We),Zf()&&(sH.speechSynthesisOutputFormat=bs.SpeechSynthesisOutputFormat.Audio16Khz32KBitRateMonoMp3),cH=new Qo;let e=cH.createBuffer(1,1e4,22050),t=cH.createBufferSource();t.buffer=e,t.connect(cH.destination),lH=new bs.SpeakerAudioDestination;let n=bs.AudioConfig.fromSpeakerOutput(lH);aH=new bs.SpeechSynthesizer(sH,n)},isUserLoggedIn:!!Pe&&!!(null==Oe?void 0:Oe.userID),notEnoughCredits:Zn&&!Xn,showLogin:_,setShowLoginDrawer:De,user:Oe},or={memori:e,sessionID:Kt||"",tenant:O,translateTo:Ve&&We.toUpperCase()!==(null===(ue=null!==(ce=null!==(le=null===(ae=null===(se=e.culture)||void 0===se?void 0:se.split("-"))||void 0===ae?void 0:ae[0])&&void 0!==le?le:me.language)&&void 0!==ce?ce:"IT")||void 0===ue?void 0:ue.toUpperCase())?We:void 0,baseUrl:T,apiUrl:M,layout:d,memoriTyping:Qe,typingText:Ze,showTypingText:S,history:tr?Bt:Bt.slice(-2),authToken:null!==(he=null!==(de=null!=Pe?Pe:dH)&&void 0!==de?de:null==F?void 0:F.loginToken)&&void 0!==he?he:L,dialogState:Qt,setDialogState:Zt,pushMessage:Ft,simulateUserPrompt:(e,t)=>{An(),gn(),Ut(e,void 0,void 0,!1,t)},showDates:y,showContextPerLine:b,showAIicon:Fn,showWhyThisAnswer:Un,client:ye,selectReceiverTag:async n=>{var r;if(Kt)try{const{currentState:i,...o}=await Ae(Kt,n);if(0===o.resultCode)if(Ft({text:n,fromUser:!0}),"X4"===i.state&&e.giverTag){const{currentState:n,...r}=await ye.postTagChangedEvent(Kt,e.giverTag);0===r.resultCode?(Zt(n),n.emission&&Ft({text:n.emission,emitter:n.emitter,media:n.media,fromUser:!1,contextVars:n.contextVars,date:n.currentDate,placeName:n.currentPlaceName,placeLatitude:n.currentLatitude,placeLongitude:n.currentLongitude,placeUncertaintyKm:n.currentUncertaintyKm,tag:n.currentTag,memoryTags:n.memoryTags})):(console.error(r),t(Ju).error(fe(Gv(r.resultCode))))}else Zt(i),i.emission&&Ft({text:i.emission,emitter:i.emitter,media:i.media,fromUser:!1,contextVars:i.contextVars,date:i.currentDate,placeName:i.currentPlaceName,placeLatitude:i.currentLatitude,placeLongitude:i.currentLongitude,placeUncertaintyKm:i.currentUncertaintyKm,tag:i.currentTag,memoryTags:i.memoryTags});else console.error(o,n,null===(r=null==Qt?void 0:Qt.knownTags)||void 0===r?void 0:r[n]),t(Ju).error(fe(Gv(o.resultCode)))}catch(e){let n=e;console.error(n),t(Ju).error(n.message)}},preview:m,sendOnEnter:Pn,setSendOnEnter:kn,microphoneMode:ft?"CONTINUOUS":"HOLD_TO_TALK",attachmentsMenuOpen:On,setAttachmentsMenuOpen:Nn,instruct:Ie,showInputs:v,showMicrophone:!!D,userMessage:Ot,onChangeUserMessage:e=>{if(!e||"\n"===e||""===e.trim())return Nt(""),void an();Nt(e),sn()},sendMessage:e=>{gn(),An(),Ut(e),Nt(""),bn()},stopListening:En,startListening:Cn,stopAudio:gn,resetTranscript:bn,listening:Lt,isPlayingAudio:yt,customMediaRenderer:j,user:Oe,userAvatar:H,experts:Kn},sr=u&&Dn?(0,s.jsx)("div",{className:"memori--global-background",children:(0,s.jsx)("div",{className:"memori--global-background-image",style:{backgroundImage:Dn}})}):(0,s.jsx)("div",{className:"memori--global-background no-background-image"}),ar=u?(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:zn}}):null,lr={canInstruct:!!e.giverTag,instruct:!!Ie,onChangeMode:e=>{Re("instruct"===e),tt(!1),ze(!1)}},cr=(0,s.jsx)(ij,{tenant:O,userLang:We,integrationID:null==u?void 0:u.integrationID,memoriHash:`${e.ownerTenantName}-${e.ownerUserName}-${e.name}`}),ur=h||("TOTEM"===$e?qj:"CHAT"===$e?Kj:"FULLPAGE"===$e?Wj:"WEBSITE_ASSISTANT"===$e?Jj:Wj);return(0,s.jsxs)("div",{className:t(ws)("memori","memori-widget",`memori-layout-${d.toLowerCase()}`,`memori-controls-${xt.toLowerCase()}`,`memori--avatar-${(null==He?void 0:He.avatar)||"default"}`,{"memori--preview":m,"memori--embed":g,"memori--with-integration":u,"memori--with-speechkey":!!D,"memori--active":et,"memori--hide-emissions":wt,"memori--has-active-session":!!Kt}),"data-memori-name":null==e?void 0:e.name,"data-memori-id":null==e?void 0:e.engineMemoriID,"data-memori-secondary-id":null==e?void 0:e.memoriID,"data-memori-session-id":Kt,"data-memori-integration":null==u?void 0:u.integrationID,"data-memori-engine-state":JSON.stringify({...Qt,sessionID:Kt}),style:{height:A},children:[(0,s.jsx)(ur,{Header:rj,headerProps:nr,Avatar:XF,avatarProps:rr,Chat:tS,chatProps:or,StartPanel:cS,startPanelProps:ir,integrationStyle:ar,integrationBackground:sr,ChangeMode:$F,changeModeProps:lr,poweredBy:cr,sessionId:Kt,hasUserActivatedSpeak:et,showInstruct:p,loading:Ke}),(0,s.jsx)("audio",{id:"memori-audio",style:{display:"none"},src:"https://aisuru.com/intro.mp3"}),ge&&(0,s.jsx)(pv,{withModal:!0,pwdOrTokens:Mt,openModal:!!Mt,setPwdOrTokens:It,showTokens:"SECRET"===e.privacyType,onFinish:async t=>{var n,r,i,o;t.password&&At(t.password),t.password&&(uH=t.password),t.tokens&&Tt(t.tokens),$t(!Kt,t.password,t.tokens,Ie?e.giverTag:null==N?void 0:N.tag,Ie?e.giverPIN:null==N?void 0:N.pin,{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...I||{}},R,Vt).then((e=>{It(null),qn(e||void 0)})).catch((()=>{It(null),Ue(!0)}))},minimumNumberOfRecoveryTokens:null!==(pe=null==e?void 0:e.minimumNumberOfRecoveryTokens)&&void 0!==pe?pe:1}),ge&&(0,s.jsx)(Ej,{visible:Wt,minAge:Ht,onClose:t=>{var n,r,i,o;t?(Gt(t),Pj("birthDate",t),$t(!Kt,uH||Ct||(null==e?void 0:e.secretToken),Et,Ie?e.giverTag:null==N?void 0:N.tag,Ie?e.giverPIN:null==N?void 0:N.pin,{PATHNAME:null===(n=window.location.pathname)||void 0===n?void 0:n.toUpperCase(),ROUTE:(null===(o=null===(i=null===(r=window.location.pathname)||void 0===r?void 0:r.split("/"))||void 0===i?void 0:i.pop())||void 0===o?void 0:o.toUpperCase())||"",...I||{}},R,t).then((e=>{qt(!1),It(null),qn(e||void 0)})).catch((()=>{qt(!1),Ue(!0)}))):(qt(!1),ze(!1))}}),st&&(0,s.jsx)(Nj,{layout:$e,open:!!st,onClose:()=>at(!1),microphoneMode:ft?"CONTINUOUS":"HOLD_TO_TALK",continuousSpeechTimeout:gt,setMicrophoneMode:e=>mt("CONTINUOUS"===e),setContinuousSpeechTimeout:vt,controlsPosition:xt,setControlsPosition:St,hideEmissions:wt,setHideEmissions:_t,additionalSettings:U}),it&&(0,s.jsx)(Gm,{memori:e,open:!!it,venue:Rt,setVenue:e=>{Pt(e),kt(e),e?Pj("position",JSON.stringify(e)):kj("position")},onClose:e=>{e&&kt(e),ot(!1)}}),lt&&Kt&&(0,s.jsx)(zj,{apiURL:M,memori:e,sessionID:Kt,visible:lt,closeDrawer:()=>ct(!1)}),ut&&!!Kn&&(0,s.jsx)(Fj,{apiUrl:M,baseUrl:T,tenant:O,experts:Kn,open:ut,onClose:()=>dt(!1)}),Le&&(null==O?void 0:O.id)&&(0,s.jsx)(Gj,{tenant:O,apiUrl:M,open:!!Le,user:Oe,loginToken:Pe,onClose:()=>De(!1),onLogin:(e,t)=>{Ne(e),ke(t),dH=t,De(!1),Pj("loginToken",t)},onLogout:()=>{Pe&&ye.backend.userLogout(Pe).then((()=>{De(!1),Ne(void 0),ke(void 0),dH=void 0,kj("loginToken")}))}})]})};const mH={id:"aisuru.com",theme:"aisuru",config:{name:"Memori",showNewUser:!1,requirePosition:!1}},gH=async(e,t)=>{const n=t?new URL(`${t.startsWith("http")?"":t.includes("localhost")?"http://":"https://"}${t}`).origin:"https://aisuru.com";try{const t=await fetch(`${n}/api/tenant/${e}`),{tenant:r}=await t.json();return r||{...mH,tenantID:e}}catch(t){return{...mH,tenantID:e}}};function vH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BF(r.key),r)}}function bH(e,t,n){return t&&yH(e.prototype,t),n&&yH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xH(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SH(e,t){return SH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},SH(e,t)}function wH(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&SH(e,t)}function _H(e,t){if(t&&("object"===LF(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return xH(e)}function CH(e){return CH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},CH(e)}function AH(e){if(Array.isArray(e))return e}function EH(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function TH(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MH(e,t){if(e){if("string"==typeof e)return TH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TH(e,t):void 0}}function IH(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function RH(e){return AH(e)||EH(e)||MH(e)||IH()}function PH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PH(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var OH={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},NH=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vH(this,e),this.init(t,n)}return bH(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||OH,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,kH(kH({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),LH=new NH,DH=function(){function e(){vH(this,e),this.observers={}}return bH(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function BH(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function zH(e){return null==e?"":""+e}function FH(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function UH(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function jH(e,t,n){var r=UH(e,t,Object);r.obj[r.k]=n}function HH(e,t){var n=UH(e,t),r=n.obj,i=n.k;if(r)return r[i]}function VH(e,t,n){var r=HH(e,n);return void 0!==r?r:HH(t,n)}function GH(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):GH(e[r],t[r],n):e[r]=t[r]);return e}function WH(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var qH={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function KH(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return qH[e]})):e}var JH="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,QH=[" ",",","?","!",";"];function YH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ZH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YH(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XH(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CH(e);if(t){var i=CH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _H(this,n)}}function $H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i)return;if("string"==typeof i[r[o]]&&o+1<r.length)return;if(void 0===i[r[o]]){for(var s=2,a=r.slice(o,o+s).join(n),l=i[a];void 0===l&&r.length>o+s;)s++,l=i[a=r.slice(o,o+s).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}var c=r.slice(o+s).join(n);return c?$H(l,c,n):void 0}i=i[r[o]]}return i}}var eV=function(e){wH(n,e);var t=XH(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return vH(this,n),r=t.call(this),JH&&DH.call(xH(r)),r.data=e||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return bH(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."));var a=HH(this.data,s);return a||!o||"string"!=typeof n?a:$H(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(s=e.split("."))[1]),this.addNamespaces(t),jH(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var a=HH(this.data,s)||{};r?GH(a,n,i):a=ZH(ZH({},a),n),jH(this.data,s,a),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?ZH(ZH({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(DH),tV={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}};function nV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iV(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CH(e);if(t){var i=CH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _H(this,n)}}var oV={},sV=function(e){wH(n,e);var t=iV(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return vH(this,n),r=t.call(this),JH&&DH.call(xH(r)),FH(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,xH(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=LH.create("translator"),r}return bH(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=QH.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,n,r));if(o&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==LF(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),l=a.key,c=a.namespaces,u=c[c.length-1],d=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return o?(f.res="".concat(u).concat(p).concat(l),f):"".concat(u).concat(p).concat(l)}return o?(f.res=l,f):l}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||l,v=f&&f.exactUsedKey||l,y=Object.prototype.toString.apply(m),b=["[object Number]","[object Function]","[object RegExp]"],x=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,w="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(S&&m&&w&&b.indexOf(y)<0&&("string"!=typeof x||"[object Array]"!==y)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var _=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,rV(rV({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(f.res=_,f):_}if(s){var C="[object Array]"===y,A=C?[]:{},E=C?v:g;for(var T in m)if(Object.prototype.hasOwnProperty.call(m,T)){var M="".concat(E).concat(s).concat(T);A[T]=this.translate(M,rV(rV({},t),{joinArrays:!1,ns:c})),A[T]===M&&(A[T]=m[T])}m=A}}else if(S&&"string"==typeof x&&"[object Array]"===y)(m=m.join(x))&&(m=this.extendTranslation(m,e,t,r));else{var I=!1,R=!1,P=void 0!==t.count&&"string"!=typeof t.count,k=n.hasDefaultValue(t),O=P?this.pluralResolver.getSuffix(d,t.count,t):"",N=t["defaultValue".concat(O)]||t.defaultValue;!this.isValidLookup(m)&&k&&(I=!0,m=N),this.isValidLookup(m)||(R=!0,m=l);var L=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,D=L&&R?void 0:m,B=k&&N!==m&&this.options.updateMissing;if(R||I||B){if(this.logger.log(B?"updateKey":"missingKey",d,u,l,B?N:m),s){var z=this.resolve(l,rV(rV({},t),{},{keySeparator:!1}));z&&z.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&U&&U[0])for(var j=0;j<U.length;j++)F.push(U[j]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var H=function(e,n,r){var o=k&&r!==m?r:D;i.options.missingKeyHandler?i.options.missingKeyHandler(e,u,n,o,B,t):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(e,u,n,o,B,t),i.emit("missingKey",e,u,n,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?F.forEach((function(e){i.pluralResolver.getSuffixes(e,t).forEach((function(n){H([e],l+n,t["defaultValue".concat(n)]||N)}))})):H(F,l,N))}m=this.extendTranslation(m,e,t,f,r),R&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(u,":").concat(l)),(R||I)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,I?m:void 0):this.options.parseMissingKeyHandler(m))}return o?(f.res=m,f):m}},{key:"extendTranslation",value:function(e,t,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,rV(rV({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(rV(rV({},n),{interpolation:rV(rV({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=e.match(this.interpolator.nestingRegexp);s=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=rV(rV({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),a){var u=e.match(this.interpolator.nestingRegexp);s<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),s=0;s<e;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):o.translate.apply(o,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,h="string"==typeof d?[d]:d;return null!=e&&h&&h.length&&!1!==n.applyPostProcessor&&(e=tV.handle(h,e,t,this.options&&this.options.postProcessPassResolved?rV({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;n=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=d&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),p=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(e){s.isValidLookup(t)||(o=e,!oV["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(oV["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){i=n;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,n,e,a);else{var u;d&&(u=s.pluralResolver.getSuffix(n,a.count,a));var f="".concat(s.options.pluralSeparator,"zero");if(d&&(l.push(c+u),h&&l.push(c+f)),p){var m="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(m),d&&(l.push(m+u),h&&l.push(m+f))}}for(;o=l.pop();)s.isValidLookup(t)||(r=o,t=s.getResource(n,e,o,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}(DH);function aV(e){return e.charAt(0).toUpperCase()+e.slice(1)}var lV=function(){function e(t){vH(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=LH.create("languageUtils")}return bH(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=aV(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=aV(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=aV(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),cV=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],uV={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},dV=["v1","v2","v3"],hV={zero:0,one:1,two:2,few:3,many:4,other:5};function pV(){var e={};return cV.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:uV[t.fc]}}))})),e}var fV=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};vH(this,e),this.languageUtils=t,this.options=n,this.logger=LH.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=pV()}return bH(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return hV[e]-hV[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!dV.includes(this.options.compatibilityJSON)}}]),e}();function mV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vV=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vH(this,e),this.logger=LH.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return bH(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:KH,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?WH(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?WH(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?WH(t.nestingPrefix):t.nestingPrefixEscaped||WH("$t("),this.nestingSuffix=t.nestingSuffix?WH(t.nestingSuffix):t.nestingSuffixEscaped||WH(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0){var i=VH(t,l,e);return a.alwaysFormat?a.format(i,void 0,n,gV(gV(gV({},r),t),{},{interpolationkey:e})):i}var o=e.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(VH(t,l,s),c,n,gV(gV(gV({},r),t),{},{interpolationkey:s}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?c(a.escape(e)):c(e)}}].forEach((function(t){for(s=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=u(n)))if("function"==typeof d){var l=d(e,i,r);o="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else{if(h){o=i[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=zH(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),h?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=gV({},o);function a(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);e=r[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),t&&(s=gV(gV({},t),s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(i)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(a.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=zH(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return i.format(e,t,o.lng,gV(gV({},o),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function yV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xV(e){var t={};return function(n,r,i){var o=r+JSON.stringify(i),s=t[o];return s||(s=e(r,i),t[o]=s),s(n)}}var SV=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};vH(this,e),this.logger=LH.create("formatter"),this.options=t,this.formats={number:xV((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:xV((function(e,t){var n=new Intl.NumberFormat(e,bV(bV({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:xV((function(e,t){var n=new Intl.DateTimeFormat(e,bV({},t));return function(e){return n.format(e)}})),relativetime:xV((function(e,t){var n=new Intl.RelativeTimeFormat(e,bV({},t));return function(e){return n.format(e,t.range||"day")}})),list:xV((function(e,t){var n=new Intl.ListFormat(e,bV({},t));return function(e){return n.format(e)}}))},this.init(t)}return bH(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=xV(t)}},{key:"format",value:function(e,t,n,r){var i=this,o=t.split(this.formatSeparator).reduce((function(e,t){var o=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===t&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):"relativetime"===t&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach((function(e){if(e){var t=RH(e.split(":")),r=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}}))}return{formatName:t,formatOptions:n}}(t),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=i.formats[s](e,u,bV(bV(bV({},a),r),c))}catch(e){i.logger.warn(e)}return l}return i.logger.warn("there was no format function for ".concat(s)),e}),e);return o}}]),e}();function wV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CV(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CH(e);if(t){var i=CH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _H(this,n)}}var AV=function(e){wH(n,e);var t=CV(n);function n(e,r,i){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return vH(this,n),o=t.call(this),JH&&DH.call(xH(o)),o.backend=e,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=LH.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return bH(n,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},s={},a={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var r,a,l,c,u,d;r=n.loaded,a=o,c=UH(r,[i],Object),u=c.obj,d=c.k,u[d]=u[d]||[],l&&(u[d]=u[d].concat(a)),l||u[d].push(a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===s[e][t]&&(s[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:s}):(this.readingCalls++,this.backend[n](e,t,(function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&l&&i<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,i+1,2*o,s)}),o):s(a,l)}))):s(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,s){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),t.loaded(e,r,s)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,_V(_V({},o),{},{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),n}(DH);function EV(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===LF(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===LF(e[2])||"object"===LF(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function TV(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function MV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function IV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MV(Object(n),!0).forEach((function(t){zF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function RV(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CH(e);if(t){var i=CH(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _H(this,n)}}function PV(){}function kV(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var OV=function(e){wH(n,e);var t=RV(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(vH(this,n),e=t.call(this),JH&&DH.call(xH(e)),e.options=TV(r),e.services={},e.logger=LH,e.modules={external:[]},kV(xH(e)),i&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,i),_H(e,xH(e));setTimeout((function(){e.init(r,i)}),0)}return e}return bH(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=EV();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=IV(IV(IV({},r),this.options),TV(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=IV(IV({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?LH.init(i(this.modules.logger),this.options):LH.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=SV);var s=new lV(this.options);this.store=new eV(this.options.resources,this.options);var a=this.services;a.logger=LH,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new fV(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new vV(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new AV(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=i(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=i(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new sV(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=PV),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=BH(),h=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PV,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)s(i);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=BH();return e||(e=this.languages),t||(t=this.options.ns),n||(n=PV),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&tV.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=BH();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var s="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);s&&(n.language||i(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,(function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,s)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var o;if("object"!==LF(i)){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l<s;l++)a[l-2]=arguments[l];o=r.options.overloadTranslationOptionHandler([t,i].concat(a))}else o=IV({},i);o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,o.keyPrefix=o.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",u=o.keyPrefix?"".concat(o.keyPrefix).concat(c).concat(t):t;return r.t(u,o)};return"string"==typeof e?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=n,i}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=BH();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=BH();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:PV,i=IV(IV(IV({},this.options),t),{isClone:!0}),o=new n(i);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));var s=["store","services","language"];return s.forEach((function(t){o[t]=e[t]})),o.services=IV({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new sV(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit.apply(o,[e].concat(n))})),o.init(i,r),o.translator.options=o.options,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(DH);zF(OV,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new OV(e,t)}));var NV=OV.createInstance();NV.createInstance=OV.createInstance;var LV,DV=NV.createInstance;NV.init,NV.loadResources,NV.reloadResources,NV.use,NV.changeLanguage,NV.getFixedT,NV.t,NV.exists,NV.setDefaultNamespace,NV.hasLoadedNamespace,NV.loadNamespaces,NV.loadLanguages;LV=JSON.parse('{"yes":"Si","no":"No","confirm":"Conferma","apply":"Applica","cancel":"Annulla","show":"Mostra","hide":"Nascondi","send":"Invia","close":"Chiudi","edit":"Modifica","delete":"Elimina","loading":"Caricamento","expand":"Espandi","collapse":"Riduci","fullscreenEnter":"Passa a schermo intero","fullscreenExit":"Esci da schermo intero","center":"Centro","bottom":"In basso","hidden":"Nascosto","day":"Giorno","month":"Mese","year":"Anno","createdAt":"Data creazione","selected":"Selezionati","page":"pagina","actions":"Azioni","next":"Successivo","previous":"Precedente","copy":"Copia","copyToClipboard":"Copia negli appunti","showOriginalText":"Mostra originale","showTranslatedText":"Mostra traduzione","exactPosition":"Posizione esatta","uncertain":"Incertezza","question":"Domanda","nothingFound":"Nessun risultato","venue":"Luogo","searchVenue":"Cerca luogo...","memoriBlockedTitle":"Bloccato","memoriBlockedUntil":"Memori bloccato fino al {{date}}","memoriBlockedAnon":"Attualmente \\"{{name}}\\" non può rispondere, torna qui il {{date}}","memoriBlockedReasonExceedChats":"perchè ha superato la soglia mensile di chat ammesse.","memoriBlockedGiverHelper":"Puoi sempre gestirlo in qualità di amministratore, ma altri utenti non potranno interrogarlo.","generatedByAI":"Risposta generata da IA, può talvolta generare informazioni non corrette","whyThisAnswer":"Perché questa risposta?","whyThisAnswerHelper":"Questa risposta è stata generata automaticamente da un\'intelligenza artificiale sulla base di questi contenuti verificati.","completionsEnabled":"IA evoluta, può rispondere con risposte generate automaticamente che talvolta potrebbero contenere informazioni non corrette","completionProviderDown":"Questo Twin è integrato con una IA generativa di {{provider}}, ma al momento non è disponibile. Riprova più tardi.","completionProviderFallbackName":"un provider esterno","completionProviderCheckStatusPage":"Vedi pagina di stato","boardOfExperts":"Gruppo di esperti","birthDate":"Data di nascita","birthDateHelper":"Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all\'età","underage":"Devi avere almeno {{age}} anni per registrarti.","underageTwinSession":"Devi avere almeno {{age}} anni per interagire con questo Twin.","ageVerification":"Verifica dell\'età","ageVerificationText":"Per interagire con questo Twin, devi aver almeno {{minAge}} anni.","nsfw":"NSFW: Questo Twin contiene contenuti per adulti","deepThought":"Pensiero profondo","deepThoughtHelper":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme.","deepThoughtDisclaimerTitle":"Pensiero profondo abilitato","deepThoughtDisclaimer":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme.","deepThoughtPreDisclaimerUnlogged":"Accedi per abilitare Pensiero Profondo.","deepThoughtPreDisclaimerNotAllowed":"Pensiero Profondo è disabilitato poiché non hai acconsentito al suo utilizzo, puoi cambiare la tua scelta in qualsiasi momento nelle impostazioni del tuo account.","notEnoughCredits":"L\'autore di questo Twin non ha abbastanza crediti per rispondere alla tua domanda.","knownFacts":{"title":"Fatti noti","description":"Dettagli delle informazioni condivise tra te e {{memoriName}}","type":"Tipo","typeShortTerm":"Breve termine","typeLongTerm":"Lungo termine","typeHelper":"Tipi:\\n- Breve termine: questo fatto noto è sempre utilizzato durante le conversazioni\\n- Lungo termine: questo fatto noto è utilizzato durante le conversazioni solo se rilevante per la domanda corrente","text":"Testo","deleteSuccess":"Fatto noto eliminato","deleteConfirmTitle":"Elimina il fatto noto","deleteConfirmMessage":"Confermi di voler eliminare questo fatto noto?","deleteSelectedConfirmTitle":"Elimina i fatti noti selezionati","deleteSelectedConfirmMessage":"Confermi di voler eliminare i fatti noti selezionati?"},"auth":{"title":"Autenticazione","useRecoveryTokens":"Utilizza i token di recupero","tokens":"Token","addToken":"Aggiungi token","usePassword":"Utilizza la password","atLeast":"Almeno"},"widget":{"instruct":"Istruisci","test":"Prova","sound":"Audio","position":"Preferenze posizione","settings":"Impostazioni","share":"Condividi","sendOnKeypress":"Premi Invio per inviare","sendOnClick":"Clicca sul bottone di invio","boardOfExperts":"Gruppo di esperti","showExpertsInTheBoard":"Mostra gli esperti di questo gruppo","expertsInTheBoard":"Esperti di questo gruppo","goToIntegrationsToCustomizeAvatar":"Per personalizzare l\'avatar, vai a Condividimi e configura la pagina pubblica"},"write_and_speak":{"micButtonPopover":"Premi il pulsante per parlare","micButtonPopoverListening":"Premi il pulsante per smettere di parlare","pageInstructExplanation":"Per insegnarmi nuove cose clicca sul pulsante ISTRUISCIMI per cominciare","pageTryMeExplanation":"Per parlare con me clicca sul pulsante INIZIAMO per cominciare","instructButton":"ISTRUISCIMI","tryMeButton":"INIZIAMO","chatHistory":"Cronologia chat","exportChatHistory":"Esporta la cronologia chat","exportChatHistoryMessage":"Vuoi esportare la cronologia chat?","chatBotButtonText":"CLICCA QUI PER APRIRE LA CHAT","conversationStartedLabel":"Conversazione avvenuta il","settingsHeaderLabel":"Configura qui il memori se vuoi impostare una conversazione continua. Setta i secondi di silenzio prima dell\'invio.","continuousSpeechLabel":"Conversazione continua","holdToSpeak":"Tieni premuto per parlare","releaseToEndListening":"Rilascia per smettere di parlare","pressAndHoldToSpeak":"Premi e tieni premuto per parlare","microphoneMode":"Modalità microfono","hideEmissionsLabel":"Nascondi testo emesso dal Twin","secondsLabel":"Secondi","controlsPosition":"Posizione dei controlli","tryMeHeaderLabel":"PROVA","unknownPosition":"Posizione sconosciuta","fieldPlace":"Indica la posizione (es \'Milano\')","showMapLinkFor":"Visualizza sulla mappa la posizione","useMyPosition":"Usa la mia posizione","myPosition":"Posizione corrente","updatingPosition":"Aggiorno la posizione...","placeNotFound":"Luogo sconosciuto!","requirePositionHelp":"Per parlare con {{name}} devi decidere se fornire o meno la tua posizione. Questo perchè diverse risposte che potrà fornirti potrebbero dipendere da dove ti trovi.","dontWantToProvidePosition":"Non voglio fornire la mia posizione","attachmentsLabel":"Arricchisci il tuo messaggio","iWantToTalkToIn":"Voglio parlare con {{name}} in"},"media":{"title":"Titolo","editAttributes":"Modifica attributi media","uploadMimeTypeNotAllowed":"Il tipo di file non è permesso","uploadSizeLimitMessage":"Il file caricato è troppo grande (max {{size}}MB)","uploadWrongResolutionMessage":"La risoluzione deve essere {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"Hai già un Twin con questo nome","uploadHelperImages":"Caricare un file con estensione png, jpg, jpeg o gif e con dimensione massima di {{size}}MB","uploadHelper":"Caricare un file di dimensione massima di {{size}}MB","uploadError":"Errore nel caricamento","square":"quadrato","scaleRatio":"Proporzioni","addMediaLabel":"Aggiungi media","insertThisMediaMsg":"Inserisci questi media","mediaUploadMessage":"Clicca per caricare un nuovo media","addLinkLabel":"Aggiungi un link","linkKey":"URL","linkValue":"Titolo link","insertThisLink":"Inserisci un link a {{url}} con titolo {{title}}"},"gamification":{"level":"Livello","points":"punti","memoriReachedLevel":"è diventato più evoluto ed ha raggiunto il livello","levelGoToStatistics":"{{memori}} è al livello {{level}} con {{points}} punti. Clicca per andare alle statistiche.","congratulationsNewLevel":"Congratulazioni, hai raggiunto un nuovo livello!","congratulationsNewLevelDescription":"Il tuo Memori è diventato più evoluto con {{points}} punti, guarda le","statistics":"statistiche"},"login":{"login":"Accedi","logout":"Esci","user":"Utente","loggedDrawerTitle":"Ciao, {{name}}!","loginDrawerTitle":"Accedi","signupDrawerTitle":"Registrati","newUserSignUp":"Sei un nuovo utente?","signUp":"Registrati!","alreadyHaveAnAccount":"Hai già un account?","backToLogin":"Torna al login","registrationDisabled":"La registrazione è disabilitata.","contactAdmin":"Contatta l\'amministratore per richiedere l\'accesso","userNameOrEmail":"Nome utente o email","email":"Email","emailFormatError":"Per favore, inserisci una mail valida","username":"Nome utente","usernameContainsReservedWord":"Il nome utente contiene una parola riservata, per favore cambia il nome utente","usernameFormatError":"Il nome utente deve essere lungo almeno 3 caratteri e può contenere solo lettere, numeri e _","otpCode":"Codice di verifica","resendVerificationCode":"Invia di nuovo","resentVerificationCode":"Codice di verifica inviato! Controlla la tua mail.","password":"Password","newPassword":"Nuova password","confirmPassword":"Conferma la password","currentPassword":"Password attuale","passwordMatchingError":"Le password non coincidono.","passwordFormatError":"La password deve essere lunga almeno 8 caratteri e contenere almeno un numero, una lettera maiuscola, una minuscola e un simbolo","pwdWeak":"Debole","pwdAcceptable":"Accettabile","pwdStrong":"Forte","mustChangePassword":"Devi cambiare la password","passwordChange":"Cambio password","emailChange":"Cambio email","avatarChange":"Cambio avatar","underage":"Devi avere almeno {{age}} anni per registrarti.","optional":"opzionale","birthDate":"Data di nascita","birthDateHelper":"Ti chiediamo la data di nascita esclusivamente per abilitare o disabilitare le funzionalità che hanno restrizioni in base all\'età","missingData":"Informazioni mancanti","missingDataHelper":"Sappiamo che questo è un po\' fastidioso, ma abbiamo bisogno di alcune informazioni in più per completare la tua registrazione.","goToAccountToChangeYourPreferences":"Puoi cambiare la tua scelta in qualsiasi momento dalla tua pagina Account.","deepThoughtExplaination":"Pensiero Profondo è una funzionalità avanzata delle AI che ti consentirà di poter sfruttare a pieno le tue conversazioni mantenendo memoria delle stesse. Le AI con Pensiero Profondo possono darti informazioni adattandosi a te e alle cose che condividerete insieme. Consenti all\'autore del twin di contattarti per offerte commerciali riguardanti prodotti su cui hai espresso interesse.","tnCAndPPAcceptedHelper":"Dall\'ultimo accesso, i T&C e l\'Informativa sulla privacy sono stati modificati. Si prega di accettarle, altrimenti non sarà possibile apportare modifiche ai propri gemelli. Puoi sempre cancellare il tuo account nella pagina del tuo profilo utente.","privacyLabel":"Ho letto e accettato l\'","privacyAndCookiePolicy":"informativa sui cookie e sulla privacy","and":"e","termsOfService":"i termini del servizio","pAndCUAccepted":"Accetto le condizioni di utilizzo relative a Pensiero Profondo","editAccount":"Modifica account","save":"Salva"},"success":"Operazione andata a buon fine","Error":"Errore","internal server error":"Ops, scusa... qualcosa è andato storto nel server","error":"Errore","error.loading":"Errore durante il caricamento dei contenuti.","error.notFound":"Ops, non abbiamo trovato ciò che cercavi.","error.generic":"Ops, qualcosa è andato storto.","error.serverNotResponding":"Stiamo facendo manutenzione o rilasciando aggiornamenti. Riprova più tardi.","error.unprocessableEntity":"Errore durante il salvataggio dei dati. Ricontrolla i dati inseriti.","error.goBackTo":"Prova a tornare alla","error.reloadPage":"Ricarica la pagina","error.tryAgain":"Riprova","error.unauthorized":"Non sei autorizzato a visualizzare questo contenuto.","errors":{"TENANT_NOT_FOUND":"Tenant non trovato","TENANT_REGISTRATION_DISABLED":"La registrazione su questa piattaforma è disabilitata","TENANT_MISSING_NAME":"Tenant: nome mancante","TENANT_MAX_USERS_REACHED":"Numero massimo di utenti raggiunto","TENANT_MAX_ADMINS_REACHED":"Numero massimo di utenti amministratori raggiunto","TENANT_ALREADY_EXISTS":"Tenant già esistente","TENANT_MISSING_DESCRIPTION":"Tenant: descrizione mancante","TENANT_CANT_SET_COMPLETION_PROVIDER":"Tenant: non abilitato a gestire il provider di completamento","USER_NOT_CONFIRMED":"Utente ancora non confermato","USER_NOT_FOUND":"Utente non trovato","USER_OR_PASSWORD_INVALID":"Utente o password non validi","USER_MUST_CHANGE_PASSWORD":"Devi cambiare la password","USER_MUST_ENTER_VERIFICATION_CODE":"Devi inserire il codice di verifica","USER_MISSING_TENANT":"Utente: tenant mancante","USER_MISSING_NAME":"Utente: nome mancante","USER_MISSING_PASSWORD":"Utente: password mancante","USER_MISSING_EMAIL":"Utente: email mancante","USER_MISSING_VERIFICATION_CODE":"Utente: codice di verifica mancante","USER_NAME_ALREADY_USED":"Nome utente già in uso","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"La password non rispetta le regole di sicurezza","USER_EMAIL_ALREADY_USED":"Email già in uso","USER_EMAIL_INVALID":"Email non valida","USER_VERIFICATION_CODE_INVALID":"Codice di verifica non valido","USER_MISSING_NAME_OR_EMAIL":"Nome utente o email mancante","USER_NAME_INVALID":"Nome utente non valido","USER_HAS_ONE_OR_MORE_MEMORI":"L\'utente ha uno o più memori","USER_MISSING_NEW_PASSWORD":"Utente: nuova password mancante","USER_NOTHING_TO_DO":"Niente da fare","USER_CANT_CREATE_MEMORI":"Utente non abilitato a creare Memori","USER_MAX_MEMORI_REACHED":"Massimo numero di Memori raggiunto","USER_TOO_MANY_ATTEMPTS":"Troppi tentativi","USER_MUST_ACCEPT_TNC_AND_PP":"Devi accettare i termini e le condizioni","USER_BIRTH_DATE_CANT_BE_CHANGED":"Data di nascita non può essere cambiata","USER_CANT_SET_COMPLETION_PROVIDER":"Utente: non abilitato a gestire il provider di completamento","USER_CANT_ENABLE_DEEP_THOUGHT":"Utente: non abilitato a gestire Pensiero Profondo","USER_CANT_ENABLE_DCM_INTEGRATION":"Utente: non abilitato a gestire l\'integrazione con DCM","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"Utente: non abilitato a gestire la concatenazione o il gruppo di esperti","USER_CREATION_BILLING_DENIED_PERMISSION":"Non hai crediti sufficienti per creare un Twin","MEMORI_NOT_FOUND":"Memori non trovato","MEMORI_NOT_ACCESSIBLE":"Memori non accessibile","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Solo il proprietario può cambiare il tag e il pin","SESSION_NOT_FOUND":"Sessione non trovata","SESSION_IS_NOT_ADMINISTRATIVE":"Sessione non amministrativa","SESSION_EXPIRED":"Sessione scaduta","MEMORI_MISSING_CONFIGURATION":"Memori: configurazione mancante","MEMORI_CONFIGURATION_NOT_FOUND":"Memori: configurazione non trovata","MEMORI_INVALID_PRIVACY_TYPE":"Memori: tipo di privacy non valido","MEMORI_MISSING_PASSWORD":"Memori: password mancante","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero totale di token di recupero non valido","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero minimo di token di recupero non valido","MEMORI_INVALID_VOICE_TYPE":"Memori: tipo di voce non valido","MEMORI_MISSING_NAME":"Memori: nome mancante","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memori: password o token di recupero mancanti","MEMORI_INVALID_ID":"Memori: ID non valido","MEMORI_NAME_ALREADY_USED":"Nome memori già in uso","MEMORI_INVALID_PIN":"Memori: PIN non valido","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memori: cambio TAG e PIN richiedono operazioni separate","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memori: password non richiesta su Memori pubblico","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Pensiero Profondo richiede l\'abilitazione delle completions","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"Il gruppo di esperti richiede l\'abilitazione delle completions","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Trasferimento: utente di destinazione mancante","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Trasferimento: ID utente di destinazione non valido","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Trasferimento: dati utente di destinazione non validi","MEMORI_TRANSFER_NOTHING_TO_DO":"Trasferimento: alcuna operazione da fare","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memori: la configurazione non può essere modificata","MEMORI_MISSING_NEW_PASSWORD":"Memori: nuova password mancante","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Formato non valido data a partire da","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Formato non valido data fino a","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Memori: funzionalità richiede un abbonamento","INTEGRATION_NOT_FOUND":"Integrazione non trovata","INTEGRATION_INVALID_TYPE":"Tipo integrazione non valido","INTEGRATION_ALREADY_EXISTS":"Integrazione già esistente","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Memori non pubblici non possono essere integrati","INTEGRATION_MISSING_INVOCATION_TEXT":"Integrazione: testo di invocazione mancante","INTEGRATION_MISSING_DEVICE_EMAILS":"Integrazione: email del dispositivo mancante","INTEGRATION_MEMORI_IS_EMPTY":"Memori vuoti non possono essere integrati","INTEGRATION_MISSING_PRIVACY_POLICY":"Integrazione: privacy policy mancante","INTEGRATION_MISSING_CATEGORY":"Categoria integrazione mancante","INTEGRATION_MISSING_DESCRIPTION":"Descrizione integrazione mancante","INTEGRATION_INVALID_INVOCATION_TEXT":"Testo di invocazione non valido","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home non più disponibile","UPLOAD_REQUIRES_MULTIPART_ENCODING":"L\'upload richiede l\'encoding multipart","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: manca il content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: dimensione massima superata","UPLOAD_FILE_IS_EMPTY":"Upload: file vuoto","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: tipo di file o firma non validi","UPLOAD_MISSING_FILE_NAME":"Upload: nome file mancante","UPLOAD_INVALID_MEMORY_ID":"Upload: ID contenuto non valido","UPLOAD_MISSING_FILE_CONTENT":"Upload: contenuto file mancante","ASSET_NOT_FOUND":"Asset non trovato","ASSET_NOT_ACCESSIBLE":"Asset non accessibile","ASSET_MISSING_SESSION_ID":"Asset: ID sessione mancante","ASSET_INVALID_FILE_NAME":"Asset: nome file non valido","INVITATION_NOT_FOUND":"Invito non trovato","INVITATION_NOT_ACCESSIBLE":"Invito non accessibile","INVITATION_ALREADY_ACCEPTED":"Invito già accettato","INVITATION_ALREADY_REJECTED":"Invito già rifiutato","INVITATION_MISSING_DESTINATION_EMAIL":"Invito: email di destinazione mancante","INVITATION_DESTINATION_EMAIL_INVALID":"Invito: email di destinazione non valida","INVITATION_MISSING_TAG":"Invito: tag mancante","INVITATION_MISSING_PIN":"Invito: PIN mancante","INVITATION_INVALID_PIN":"Invito: PIN non valido","INVITATION_INVALID_TYPE":"Invito: tipo non valido","INVITATION_MISSING_DESTINATION_NAME":"Invito: nome destinatario mancante","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invito: tag e pin non possono essere cambiati","INVITATION_CANT_BE_CHANGED":"Invito: non può essere modificato","ACTIONLOG_INVALID_USER_ID":"ID utente non valido","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","ACTIONLOG_INVALID_MEMORI_ID":"ID Memori non valido","CONSUMPTIONLOG_INVALID_TYPE":"Tipo di log non valido","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","CONSUMPTIONLOG_INVALID_USER_ID":"ID utente non valido","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Memori ID non valido","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifiche: Periodo di estrazione chatlog non valido","PROCESS_INVALID_TYPE":"Tipo di processo non valido","PROCESS_ALREADY_RUNNING":"Processo già in esecuzione","PROCESS_NOT_FOUND":"Processo non trovato","IMPORTCSV_MISSING_ROWS":"Importazione CSV: righe mancanti","IMPORTCSV_MISSING_CSV":"Importazione CSV: CSV mancante","IMPORTCSV_MISSING_SEPARATOR":"Importazione CSV: separatore mancante","IMPORTCSV_INVALID_SEPARATOR":"Importazione CSV: separatore non valido","IMPORTCSV_MISSING_HEADERS":"Importazione CSV: intestazioni mancanti","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Importazione CSV: separatore varianti titolo mancante","IMPORTCSV_INVALID_RECEIVER_ID":"Importazione CSV: ID receiver non valido","IMPORTCSV_INVALID_MEDIA_LINK":"Importazione CSV: link media non valido","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"Importazione CSV: encoding caratteri non rilevabile","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"Importazione CSV: impossibile importare in Memori segreti","IMPORTTXT_MISSING_ROWS":"Importazione TXT: righe mancanti","IMPORTTXT_INVALID_GRANULARITY":"Importazione TXT: granularità non valida","IMPORTTXT_INVALID_RECEIVER_ID":"Importazione TXT: ID receiver non valido","IMPORTTXT_INVALID_MEDIA_LINK":"Importazione TXT: link media non valido","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"Importazione TXT: encoding caratteri non rilevabile","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"Importazione TXT: impossibile importare in Memori segreti","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Importazione TXT: limite importazione superato","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Importazione TXT: importazione su GPT-4 richiede API key","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Importazione TXT: importazione richiede un piano a pagamento","IMPORTTXT_BILLING_DENIED_PERMISSION":"Importazione TXT: non hai crediti sufficienti per l\'operazione","EXPORTCSV_MISSING_CSV_SPECS":"Esportazione CSV: specifiche CSV mancanti","EXPORTCSV_MISSING_SEPARATOR":"Esportazione CSV: separatore mancante","EXPORTCSV_INVALID_SEPARATOR":"Esportazione CSV: separatore non valido","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"Esportazione CSV: separatore varianti titolo mancante","EXPORTCSV_MISSING_NEW_LINE_CHAR":"Esportazione CSV: carattere di nuova riga mancante","EXPORTCSV_INVALID_NEW_LINE_CHAR":"Esportazione CSV: carattere di nuova riga non valido","EXPORTCSV_MISSING_PASSWORD":"Esportazione CSV: password mancante","EXPORTJSONL_MISSING_JSONL_SPECS":"Esportazione JSONL: specifiche JSONL mancanti","EXPORTJSONL_MISSING_PLATFORM":"Esportazione JSONL: piattaforma mancante","EXPORTJSONL_INVALID_PLATFORM":"Esportazione JSONL: piattaforma non valida","EXPORTJSONL_MISSING_PASSWORD":"Esportazione JSONL: password mancante","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"Esportazione JSONL: esportazione richiede un piano a pagamento","ANALYSIS_MISSING_QUERY":"Analisi: query mancante","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analisi: impossibile analizzare Memori segreti","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analisi: corrispondenza query utente richiede Pensiero Profondo","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Assegnazione badge: credenziali errate o mancanti","BADGE_ASSIGNMENT_MISSING_REF_ID":"Assegnazione badge: ID ref mancante","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Assegnazione badge: esito non trovato","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Assegnazione badge: URL di asserzione mancante","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Assegnazione badge: URL badge mancante","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Assegnazione badge: URL issuer mancante","BADGE_ASSIGNMENT_INVALID_URL":"Assegnazione badge: URL non valido","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Assegnazione badge: destinatario mancante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Assegnazione badge: tipo destinatario sconosciuto","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Assegnazione badge: identità destinatario mancante","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Assegnazione badge: tipo hash destinatario mancante","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Assegnazione badge: tipo hash destinatario sconosciuto","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Assegnazione badge: identità destinatario errata","BADGE_NOT_FOUND":"Badge non trovato","OUTCOME_NO_DCM_CONFIGURED":"Esito: nessun DCM configurato","OUTCOME_USER_BADGES_DISABLED":"Esito: badge utente disabilitati"}}');const BV=DV({resources:{en:{translation:t(JSON.parse('{"yes":"Yes","no":"No","confirm":"Confirm","apply":"Apply","cancel":"Cancel","show":"Show","hide":"Hide","send":"Send","close":"Close","edit":"Edit","delete":"Delete","loading":"Loading","expand":"Expand","collapse":"Collapse","fullscreenEnter":"Enter fullscreen","fullscreenExit":"Exit fullscreen","center":"Center","bottom":"Bottom","hidden":"Hidden","day":"Day","month":"Month","year":"Year","createdAt":"Creation date","selected":"Selected","page":"page","actions":"Actions","next":"Next","previous":"Previous","copy":"Copy","copyToClipboard":"Copy to clipboard","showOriginalText":"Show original","showTranslatedText":"Show translation","exactPosition":"Exact position","uncertain":"Uncertain","question":"Question","nothingFound":"Nothing found","venue":"Venue","searchVenue":"Search venue...","memoriBlockedTitle":"Blocked","memoriBlockedUntil":"Memori blocked until {{date}}","memoriBlockedAnon":"Currently \\"{{name}}\\" can\'t answer, come back here on {{date}}","memoriBlockedReasonExceedChats":"because it has exceeded the monthly threshold of allowed chats.","memoriBlockedGiverHelper":"You can still manage it as administrator, but other users will not be able to interact with it.","generatedByAI":"Answer generated by AI, may occasionally generate incorrect informations","whyThisAnswer":"Why this answer?","whyThisAnswerHelper":"This answer was generated automatically by an artificial intelligence based on these verified contents.","completionsEnabled":"Advanced AI, can respond with automatically generated answers that may sometimes contain incorrect information","completionProviderDown":"This Twin is integrated with a generative AI from {{provider}}, but it is currently unavailable. Try again later.","completionProviderFallbackName":"an external provider","completionProviderCheckStatusPage":"Check status page","boardOfExperts":"Board of experts","birthDate":"Birth date","birthDateHelper":"We ask for your birth date only to enable or disable functionalities that have age restrictions","underage":"You must be at least {{age}} years old to sign up.","underageTwinSession":"You must be at least {{age}} years old to interact with this Twin.","ageVerification":"Age verification","ageVerificationText":"To interact with this Twin, you must be at least {{minAge}} years old.","nsfw":"NSFW: This Twin contains adult contents","deepThought":"Deep Thought","deepThoughtHelper":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together. Allow the twin\'s author to contact you for commercial offers regarding products you have shown interest in.","deepThoughtDisclaimerTitle":"Deep Thought enabled","deepThoughtDisclaimer":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together.","deepThoughtPreDisclaimerUnlogged":"Log in to enable Deep Thought.","deepThoughtPreDisclaimerNotAllowed":"Deep Thought is disabled since you didn\'t consent its usage, you can change this any time in your account settings.","notEnoughCredits":"The author of this Twin does not have enough credits to answer your question.","knownFacts":{"title":"Known facts","description":"Details of the information shared between you and {{memoriName}}","type":"Type","typeShortTerm":"Short term","typeLongTerm":"Long term","typeHelper":"Types:\\n- Short Term: this Known Fact is always used during conversations\\n- Long Term: this Known Fact is used during conversations only if relevant to the current question","text":"Text","deleteSuccess":"Known fact deleted","deleteConfirmTitle":"Delete known fact","deleteConfirmMessage":"Are you sure you want to delete this known fact?","deleteSelectedConfirmTitle":"Delete selected known facts","deleteSelectedConfirmMessage":"Are you sure you want to delete the selected known facts?"},"auth":{"title":"Authentication","useRecoveryTokens":"Use recovery tokens","tokens":"Tokens","addToken":"Add token","usePassword":"Use password","atLeast":"At least"},"widget":{"instruct":"Instruct","test":"Test","sound":"Sound","position":"Position preferences","settings":"Settings","share":"Share","sendOnKeypress":"Hit Enter to send","sendOnClick":"Click on Submit","boardOfExperts":"Board of experts","showExpertsInTheBoard":"Show experts in this board","expertsInTheBoard":"Experts in this board","goToIntegrationsToCustomizeAvatar":"To customize the avatar, go to Share and customize the public page"},"write_and_speak":{"micButtonPopover":"Click the button to speak","micButtonPopoverListening":"Click the button to stop speak","pageInstructExplanation":"To teach me new things click on the INSTRUCT ME button to get started","pageTryMeExplanation":"To talk to me click on the START button to get started","instructButton":"INSTRUCT ME","tryMeButton":"START","chatHistory":"Chat history","exportChatHistory":"Export chat history","exportChatHistoryMessage":"Do you want to export chat history?","chatBotButtonText":"CLICK HERE TO OPEN CHATBOT","conversationStartedLabel":"Conversation started on","settingsHeaderLabel":"Setup here if you want to set the memori as continuous speech, and change the silence seconds if you want to customize them.","continuousSpeechLabel":"Continuous speech","holdToSpeak":"Hold to speak","releaseToEndListening":"Release to end listening","pressAndHoldToSpeak":"Press and hold to speak","microphoneMode":"Microphone mode","hideEmissionsLabel":"Hide text emitted by the Twin","secondsLabel":"Set seconds","controlsPosition":"Controls position","tryMeHeaderLabel":"TRY","unknownPosition":"Unknown position","fieldPlace":"Write the place (eg \'Milano\')","showMapLinkFor":"Show the position on the map","useMyPosition":"Use my position","myPosition":"Your position","updatingPosition":"Updating position...","placeNotFound":"Place not found!","requirePosition":"Insert your position before start","requirePositionHelp":"To talk to {{name}} you have to decide whether to provide your position or not. This is because different answers that it can provide you may depend on where you are.","dontWantToProvidePosition":"I don\'t want to provide my position","attachmentsLabel":"Enrich your message","iWantToTalkToIn":"I want to talk to {{name}} in"},"media":{"title":"Title","editAttributes":"Edit media attributes","uploadMimeTypeNotAllowed":"The file type is not allowed","uploadSizeLimitMessage":"The uploaded size is too big (max {{size}}MB)","uploadWrongResolutionMessage":"The resolution must be {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"You already have a Twin with this name","uploadHelperImages":"Upload a file with extension png, jpg, jpeg or gif, and having at maximum a size of {{size}}MB","uploadHelper":"Upload a file having at maximum a size of {{size}}MB","uploadError":"Upload failed","square":"square","scaleRatio":"Scale ratio","addMediaLabel":"Add a media","insertThisMediaMsg":"Insert these media","mediaUploadMessage":"Click to load a new media","addLinkLabel":"Add a link","linkKey":"URL","linkValue":"Link title","insertThisLink":"Insert a link to {{url}} with title {{title}}"},"gamification":{"level":"Level","points":"points","memoriReachedLevel":"became more evolved and reached level","levelGoToStatistics":"{{memori}} is at level {{level}} with {{points}} points. Click to go to statistics.","congratulationsNewLevel":"Congratulations, you have reached a new level!","congratulationsNewLevelDescription":"Your Memori became more evolved with {{points}} points, look at the","statistics":"statistics"},"login":{"login":"Login","logout":"Logout","user":"User","loggedDrawerTitle":"Hi, {{name}}!","loginDrawerTitle":"Login","signupDrawerTitle":"Sign up","newUserSignUp":"New user?","signUp":"Sign up!","alreadyHaveAnAccount":"Already have an account?","backToLogin":"Back to login","registrationDisabled":"Registration is disabled","contactAdmin":"Contact the administrator to request access","userNameOrEmail":"Username or email","email":"Email","emailFormatError":"Please, insert a valid email","username":"Username","usernameContainsReservedWord":"Username contains a reserved word, please choose another one","usernameFormatError":"Username must be at least 3 characters long and contain only letters, numbers and _","otpCode":"Verification code","resendVerificationCode":"Resend code","resentVerificationCode":"Confirmation code sent! Please check your email.","password":"Password","newPassword":"New password","confirmPassword":"Confirm Password","currentPassword":"Current password","passwordMatchingError":"Passwords do not match.","passwordFormatError":"Password must be at least 8 characters long and contain at least a number, an upper case letter, a lower case letter and a symbol","pwdWeak":"Weak","pwdAcceptable":"Acceptable","pwdStrong":"Strong","mustChangePassword":"You must change your password","passwordChange":"Change password","emailChange":"Change email","avatarChange":"Change avatar","underage":"You must be at least {{age}} years old to sign up.","optional":"Optional","birthDate":"Birth date","birthDateHelper":"We ask for your birth date only to enable or disable functionalities that have age restrictions","missingData":"Missing informations","missingDataHelper":"We know that this is a bit annoying, but we need some more informations to complete your registration.","goToAccountToChangeYourPreferences":"You can change your choice at any time from your Account page.","deepThoughtExplaination":"Deep Thought is an advanced feature of the AI that will allow you to fully exploit your conversations by keeping track of them. The AI with Deep Thought can give you information tailored to you and the things you will share together. Allow the twin\'s author to contact you for commercial offers regarding products you have shown interest in.","tnCAndPPAcceptedHelper":"Since your last login, T&C and Privacy Policy have changed. Please accept them, otherwise you won\'t be able to make changes to your Twins. You can always delete your account in your user profile page.","privacyLabel":"I have read and accepted the","privacyAndCookiePolicy":"Privacy e Cookie Policy","and":"and","termsOfService":"Terms of Service","pAndCUAccepted":"I accept the terms of service about Deep Thought","editAccount":"Edit account","save":"Save"},"success":"Success","Error":"Error","internal server error":"Oupsie, sorry... Something went wrong on the server","error":"Error","error.loading":"Error while loading content.","error.generic":"Oupsie, sorry... something went wrong.","error.serverNotResponding":"We are doing maintenance or releasing updates. Please try again later.","error.notFound":"Oupsie, we didn\'t find the page you were looking for.","error.goBackTo":"You can try to go back to the","error.reloadPage":"Reload the page","error.tryAgain":"Try again","error.unauthorized":"You are unauthorized to view this content.","error.unprocessableEntity":"Error while processing the request. Check the data you entered.","errors":{"TENANT_NOT_FOUND":"Tenant not found","TENANT_REGISTRATION_DISABLED":"Registration on this platform is disabled","TENANT_MISSING_NAME":"Tenant: name missing","TENANT_MAX_USERS_REACHED":"Maximum number of users reached","TENANT_MAX_ADMINS_REACHED":"Maximum number of admin users reached","TENANT_ALREADY_EXISTS":"Tenant already exists","TENANT_MISSING_DESCRIPTION":"Tenant: description missing","TENANT_CANT_SET_COMPLETION_PROVIDER":"Tenant: can\'t set completion provider","USER_NOT_CONFIRMED":"User still not confirmed","USER_NOT_FOUND":"User not found","USER_OR_PASSWORD_INVALID":"Invalid user or password","USER_MUST_CHANGE_PASSWORD":"You must change your password","USER_MUST_ENTER_VERIFICATION_CODE":"You must enter the verification code","USER_MISSING_TENANT":"User: missing tenant","USER_MISSING_NAME":"User: name is missing","USER_MISSING_PASSWORD":"User: password missing","USER_MISSING_EMAIL":"User: Missing email","USER_MISSING_VERIFICATION_CODE":"User: Missing verification code","USER_NAME_ALREADY_USED":"User name already in use","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"The password does not meet the security rules","USER_EMAIL_ALREADY_USED":"Email already in use","USER_EMAIL_INVALID":"Invalid email","USER_VERIFICATION_CODE_INVALID":"Invalid verification code","USER_MISSING_NAME_OR_EMAIL":"Missing username or email","USER_NAME_INVALID":"Invalid user name","USER_HAS_ONE_OR_MORE_MEMORI":"The user has one or more memories","USER_MISSING_NEW_PASSWORD":"User: new password missing","USER_NOTHING_TO_DO":"Nothing to do","USER_CANT_CREATE_MEMORI":"User not allowed to create Memori","USER_MAX_MEMORI_REACHED":"Maximum number of Memori reached","USER_TOO_MANY_ATTEMPTS":"Too many attempts","USER_MUST_ACCEPT_TNC_AND_PP":"You must accept the terms and conditions","USER_BIRTH_DATE_CANT_BE_CHANGED":"Date of birth cannot be changed","USER_CANT_SET_COMPLETION_PROVIDER":"User: not allowed to manage completion provider","USER_CANT_ENABLE_DEEP_THOUGHT":"User: not enabled to manage Deep Thought","USER_CANT_ENABLE_DCM_INTEGRATION":"User: not enabled to manage DCM integration","USER_CANT_ENABLE_CHAINING_OR_BOARD_OF_EXPERTS":"User: not allowed to manage chaining or expert group","USER_CREATION_BILLING_DENIED_PERMISSION":"You don\'t have enough credits to create a Twin","MEMORI_NOT_FOUND":"Memori not found","MEMORI_NOT_ACCESSIBLE":"Memori not accessible","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Only owner can change tag or pin","SESSION_NOT_FOUND":"Session not found","SESSION_IS_NOT_ADMINISTRATIVE":"Non-administrative session","SESSION_EXPIRED":"Session expired","MEMORI_MISSING_CONFIGURATION":"Memori: missing configuration","MEMORI_CONFIGURATION_NOT_FOUND":"Memories: configuration not found","MEMORI_INVALID_PRIVACY_TYPE":"Memories: invalid privacy type","MEMORI_MISSING_PASSWORD":"Memori: missing password","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memories: total number of invalid recovery tokens","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memories: minimum number of invalid recovery tokens","MEMORI_INVALID_VOICE_TYPE":"Memories: invalid voice type","MEMORI_MISSING_NAME":"Memories: missing name","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memories: missing password or recovery token","MEMORI_INVALID_ID":"Memories: invalid ID","MEMORI_NAME_ALREADY_USED":"Memory name already in use","MEMORI_INVALID_PIN":"Memories: Invalid PIN","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memories: TAG and PIN change require separate operations","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memories: no password required when public","MEMORI_DEEP_THOUGHT_REQUIRES_COMPLETIONS":"Deep Thought requires completions to be enabled","MEMORI_BOARD_OF_EXPERTS_REQUIRES_COMPLETIONS":"The expert group requires completions to be enabled","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transfer: missing destination user","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transfer: invalid destination user ID","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transfer: invalid destination user data","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfer: nothing to do","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memories: configuration cannot be changed","MEMORI_MISSING_NEW_PASSWORD":"Memories: new password missing","MEMORI_FEATURE_REQUIRES_SUBSCRIPTION":"Feature requires subscription","INTEGRATION_NOT_FOUND":"Integration not found","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Invalid date from format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Invalid date to format","INTEGRATION_INVALID_TYPE":"Invalid integration type","INTEGRATION_ALREADY_EXISTS":"Integration already exists","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Non-public memories cannot be integrated","INTEGRATION_MISSING_INVOCATION_TEXT":"Integration: missing invocation text","INTEGRATION_MISSING_DEVICE_EMAILS":"Integration: missing device email","INTEGRATION_MEMORI_IS_EMPTY":"Empty memories cannot be integrated","INTEGRATION_MISSING_PRIVACY_POLICY":"Integration: privacy policy missing","INTEGRATION_MISSING_CATEGORY":"Integration category missing","INTEGRATION_MISSING_DESCRIPTION":"Missing integration description","INTEGRATION_INVALID_INVOCATION_TEXT":"Invalid invocation text","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home no more available","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Upload requires multipart encoding","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: missing content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: maximum size exceeded","UPLOAD_FILE_IS_EMPTY":"Upload: empty file","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: invalid file type or signature","UPLOAD_MISSING_FILE_NAME":"Upload: missing file name","UPLOAD_INVALID_MEMORY_ID":"Upload: Invalid content ID","UPLOAD_MISSING_FILE_CONTENT":"Upload: Missing file content","ASSET_NOT_FOUND":"Asset not found","ASSET_NOT_ACCESSIBLE":"Asset not accessible","ASSET_MISSING_SESSION_ID":"Asset: missing session ID","ASSET_INVALID_FILE_NAME":"Asset: invalid file name","INVITATION_NOT_FOUND":"Invitation not found","INVITATION_NOT_ACCESSIBLE":"Invitation not accessible","INVITATION_ALREADY_ACCEPTED":"Invitation already accepted","INVITATION_ALREADY_REJECTED":"Invitation already rejected","INVITATION_MISSING_DESTINATION_EMAIL":"Invitation: missing destination email","INVITATION_DESTINATION_EMAIL_INVALID":"Invitation: destination email invalid","INVITATION_MISSING_TAG":"Invitation: missing tag","INVITATION_MISSING_PIN":"Invitation: PIN missing","INVITATION_INVALID_PIN":"Invitation: invalid PIN","INVITATION_INVALID_TYPE":"Invitation: invalid type","INVITATION_MISSING_DESTINATION_NAME":"Invitation: destination name missing","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitation: tag and pin can\'t be changed","INVITATION_CANT_BE_CHANGED":"Intation: can\'t be changed","ACTIONLOG_INVALID_USER_ID":"Invalid user ID","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","ACTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","CONSUMPTIONLOG_INVALID_TYPE":"Invalid log type","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","CONSUMPTIONLOG_INVALID_USER_ID":"Invalid user ID","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","NOTIFICATIONPREFS_INVALID_CHATLOG_EXTRACTION_PERIOD":"Notifications: Invalid chat log extraction period","PROCESS_INVALID_TYPE":"Invalid process type","PROCESS_ALREADY_RUNNING":"Process already running","PROCESS_NOT_FOUND":"Process not found","IMPORTCSV_MISSING_ROWS":"CSV import: missing rows","IMPORTCSV_MISSING_CSV":"CSV Import: Missing CSV","IMPORTCSV_MISSING_SEPARATOR":"CSV import: missing separator","IMPORTCSV_INVALID_SEPARATOR":"CSV import: invalid separator","IMPORTCSV_MISSING_HEADERS":"CSV import: missing headers","IMPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV import: missing title variant separator","IMPORTCSV_INVALID_RECEIVER_ID":"CSV import: invalid receiver ID","IMPORTCSV_INVALID_MEDIA_LINK":"CSV import: invalid media link","IMPORTCSV_UNDETECTABLE_CHAR_ENCODING":"CSV import: undetectable character encoding","IMPORTCSV_CANT_IMPORT_TO_SECRET_MEMORI":"CSV Import: Cannot import to Secret Memories","IMPORTTXT_MISSING_ROWS":"Importing TXT: missing rows","IMPORTTXT_INVALID_GRANULARITY":"Import TXT: invalid granularity","IMPORTTXT_INVALID_RECEIVER_ID":"Import TXT: invalid receiver ID","IMPORTTXT_INVALID_MEDIA_LINK":"Import TXT: invalid media link","IMPORTTXT_UNDETECTABLE_CHAR_ENCODING":"TXT import: undetectable character encoding","IMPORTTXT_CANT_IMPORT_TO_SECRET_MEMORI":"TXT Import: Cannot import to Secret Memories","IMPORTTXT_IMPORT_LIMIT_EXCEEDED":"Import TXT: import limit exceeded","IMPORTTXT_IMPORT_ON_GPT4_REQUIRES_API_KEY":"Import TXT: import on GPT-4 requires API key","IMPORTTXT_IMPORT_REQUIRES_PAYING":"Import TXT: Import requires a paying plan","IMPORTTXT_BILLING_DENIED_PERMISSION":"Import TXT: you don\'t have enough credits for the operation","EXPORTCSV_MISSING_CSV_SPECS":"CSV export: missing CSV specifications","EXPORTCSV_MISSING_SEPARATOR":"CSV export: missing separator","EXPORTCSV_INVALID_SEPARATOR":"CSV export: invalid separator","EXPORTCSV_MISSING_TITLE_VARIANT_SEPARATOR":"CSV export: missing title variant separator","EXPORTCSV_MISSING_NEW_LINE_CHAR":"CSV export: missing newline character","EXPORTCSV_INVALID_NEW_LINE_CHAR":"CSV export: invalid newline character","EXPORTCSV_MISSING_PASSWORD":"CSV export: missing password","EXPORTJSONL_MISSING_JSONL_SPECS":"JSONL export: missing JSONL specifications","EXPORTJSONL_MISSING_PLATFORM":"JSONL export: missing platform","EXPORTJSONL_INVALID_PLATFORM":"JSONL export: invalid platform","EXPORTJSONL_MISSING_PASSWORD":"JSONL export: missing password","EXPORTJSONL_EXPORT_REQUIRES_PAYING":"JSONL Export: Export requires a paid plan","ANALYSIS_MISSING_QUERY":"Analysis: missing query","ANALYSIS_CANT_ANALYZE_SECRET_MEMORI":"Analysis: Unable to analyze Secret Memories","ANALYSIS_USER_QUERY_MATCH_REQUIRES_DEEP_THOUGHT":"Analysis: matching user query requires Deep Thinking","BADGE_ASSIGNMENT_WRONG_OR_MISSING_CREDENTIALS":"Badge assignment: incorrect or missing credentials","BADGE_ASSIGNMENT_MISSING_REF_ID":"Badge assignment: ref ID missing","BADGE_ASSIGNMENT_OUTCOME_NOT_FOUND":"Badge assignment: result not found","BADGE_ASSIGNMENT_MISSING_ASSERTION_URL":"Badge assignment: Missing assertion URL","BADGE_ASSIGNMENT_MISSING_BADGE_URL":"Badge Assignment: Missing Badge URL","BADGE_ASSIGNMENT_MISSING_ISSUER_URL":"Badge assignment: missing issuer URL","BADGE_ASSIGNMENT_INVALID_URL":"Badge assignment: Invalid URL","BADGE_ASSIGNMENT_MISSING_RECIPIENT":"Badge assignment: missing recipient","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_TYPE":"Badge assignment: unknown recipient type","BADGE_ASSIGNMENT_MISSING_RECIPIENT_IDENTITY":"Badge assignment: missing recipient identity","BADGE_ASSIGNMENT_MISSING_RECIPIENT_HASH_TYPE":"Badge assignment: missing recipient hash type","BADGE_ASSIGNMENT_UNKNOWN_RECIPIENT_HASH_TYPE":"Badge assignment: recipient hash type unknown","BADGE_ASSIGNMENT_WRONG_RECIPIENT_IDENTITY":"Badge assignment: incorrect recipient identity","BADGE_NOT_FOUND":"Badge not found","OUTCOME_NO_DCM_CONFIGURED":"Result: no DCM configured","OUTCOME_USER_BADGES_DISABLED":"Result: user badges disabled"}}'))},it:{translation:t(LV)}},lng:"en",fallbackLng:"it",supportedLngs:["en","it"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1}});BV.init();var zV=BV;c=o("85Hg2");function FV(e){var t=e.i18n,n=e.defaultNS,r=e.children,i=(0,c.useMemo)((function(){return{i18n:t,defaultNS:n}}),[t,n]);return(0,c.createElement)(ae.Provider,{value:i},r)}const UV=({ownerUserName:e,ownerUserID:t,memoriName:n,memoriID:r,integrationID:i,tenantID:o,secretToken:a,sessionID:l,layout:u="DEFAULT",customLayout:d,showShare:h=!0,showSettings:p=!0,showInstruct:f=!1,showTypingText:m=!1,showClear:g=!1,showOnlyLastMessages:v=!1,showInputs:y=!0,showDates:b=!1,showContextPerLine:x=!1,showLogin:S,height:w="100%",baseURL:_,apiURL:C="https://backend.memori.ai",engineURL:A="https://engine.memori.ai",tag:E,pin:T,context:M,initialQuestion:I,uiLang:R,spokenLang:P,multilingual:k,authToken:O,AZURE_COGNITIVE_SERVICES_TTS_KEY:N,defaultSpeakerActive:L=!0,onStateChange:D,additionalInfo:B,customMediaRenderer:z,additionalSettings:F,userAvatar:U})=>{var j,H,V;const[G,W]=(0,c.useState)(),[q,K]=(0,c.useState)(),[J,Q]=(0,c.useState)(N),{t:Z}=Se();if(!(r&&t||n&&e))throw new Error("Identifier pair required: please provide either memoriID and ownerUserID or memoriName and ownerUserName");const X=Y(C,A),$=(0,c.useCallback)((async()=>{const e=_||(o.startsWith("https://")?o:`https://${o}`),t=await fetch(`${e}/api/speechkey`),n=await t.json();n.AZURE_COGNITIVE_SERVICES_TTS_KEY&&Q(n.AZURE_COGNITIVE_SERVICES_TTS_KEY)}),[]);(0,c.useEffect)((()=>{N||$()}),[N]);const ee=(0,c.useCallback)((async()=>{if(r&&t){const{memori:e,...n}=await X.backend.getMemoriByUserAndId(o,t,r);0===n.resultCode&&e?W(e):console.error("[MEMORI]",n,e)}else if(n&&e){const{memori:t,...r}=await X.backend.getMemori(o,e,n);0===r.resultCode&&t?W(t):console.error("[MEMORI]",r,t)}}),[r,t,n,e,o]);(0,c.useEffect)((()=>{ee()}),[ee,o]);const te=(0,c.useCallback)((async()=>{const e=await gH(o,_);e&&K(e)}),[o,C]);(0,c.useEffect)((()=>{te()}),[te]),(0,c.useEffect)((()=>{if(R)zV.changeLanguage(R.toLowerCase());else{const{lng:e,fallbackLng:t}=(()=>{const e=navigator.language;if(e){let t=e.split("-")[0];if(["en","it"].includes(t))return{lng:t,fallbackLng:"en"===t?"it":"en"}}return{lng:"en",fallbackLng:"it"}})();zV.changeLanguage(e).catch((()=>{zV.changeLanguage(t)}))}}),[R]),(0,c.useEffect)((()=>{window.MathJax={startup:{elements:[".memori-chat--bubble-content"]},options:{processHtmlClass:"memori-chat--bubble-content"},tex:{inlineMath:[["$","$"],["\\$","\\$"],["(","\\)"],["\\(",")"],["(",")"],["[","\\]"],["[","]"],["\\(","\\)"],["\\[","\\]"],["\\\\[","\\\\]"],["\\\\\\[","\\\\\\]"],["((","))"]],displayMath:[["$$","$$"],["\\[[","\\]]"],["\\\\[[","\\\\]]"],["\\\\\\[[","\\\\\\]]"]],processEscapes:!1},asciimath:{fixphi:!0,displaystyle:!0,decimalsign:"."},skipStartupTypeset:!0,chtml:{displayAlign:"left"},svg:{fontCache:"global"}};const e=document.createElement("script");e.src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js",e.async=!0,e.id="mathjax-script",document.head.appendChild(e)}),[]);const ne=G?(0,s.jsx)(fH,{layout:u,customLayout:d,height:w,baseUrl:_||(o.startsWith("https://")?o:`https://${o}`),apiUrl:C,memori:{...G,secretToken:a},ownerUserName:null!=e?e:G.ownerUserName,ownerUserID:null!=t?t:G.ownerUserID,tenantID:o,memoriLang:null!=P?P:null===(H=null===(j=G.culture)||void 0===j?void 0:j.split("-"))||void 0===H?void 0:H[0],multilingual:k,tenant:q,secret:a,sessionID:l,showShare:h,showSettings:p,showInstruct:f,showTypingText:m,showClear:g,showOnlyLastMessages:v,showInputs:y,showDates:b,showContextPerLine:x,showLogin:null!=S?S:null==G?void 0:G.enableDeepThought,integration:null===(V=null==G?void 0:G.integrations)||void 0===V?void 0:V.find((e=>i?e.integrationID===i:!!e.publish&&"LANDING_EXPERIENCE"===e.type)),initialContextVars:M,initialQuestion:I,authToken:O,AZURE_COGNITIVE_SERVICES_TTS_KEY:J||N,defaultSpeakerActive:L,onStateChange:D,additionalInfo:B,customMediaRenderer:z,additionalSettings:F,userAvatar:U,...E&&T?{personification:{tag:E,pin:T}}:{}}):(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,s.jsxs)("p",{style:{textAlign:"center",margin:"2rem auto",textTransform:"capitalize"},children:[Z("loading")||"Loading","..."]})});return(0,s.jsxs)(FV,{i18n:zV,children:[(0,s.jsx)(Ju.Toaster,{position:"top-center",reverseOrder:!0}),ne]})};UV.propTypes={memoriName:t(l).string,memoriID:t(l).string,ownerUserName:t(l).string,ownerUserID:t(l).string,integrationID:t(l).string,tenantID:t(l).string.isRequired,secretToken:t(l).string,sessionID:t(l).string,layout:t(l).oneOf(["DEFAULT","FULLPAGE","TOTEM","WEBSITE_ASSISTANT","CHAT"]),customLayout:t(l).any,showShare:t(l).bool,showInstruct:t(l).bool,showInputs:t(l).bool,showDates:t(l).bool,showContextPerLine:t(l).bool,showSettings:t(l).bool,showClear:t(l).bool,showOnlyLastMessages:t(l).bool,showTypingText:t(l).bool,showLogin:t(l).bool,height:t(l).oneOfType([t(l).string,t(l).number]),baseURL:t(l).string,apiURL:t(l).string,engineURL:t(l).string,tag:t(l).string,pin:t(l).string,context:t(l).objectOf(t(l).any),initialQuestion:t(l).string,uiLang:t(l).oneOf(["en","it","EN","IT"]),spokenLang:t(l).string,multilingual:t(l).bool,authToken:t(l).string,defaultSpeakerActive:t(l).bool,AZURE_COGNITIVE_SERVICES_TTS_KEY:t(l).string,onStateChange:t(l).func,additionalInfo:t(l).objectOf(t(l).any),customMediaRenderer:t(l).func,additionalSettings:t(l).any,userAvatar:t(l).oneOfType([t(l).string,t(l).any])};var jV=UV;class HV extends HTMLElement{connectedCallback(){const e=document.createElement("div"),n=document.createElement("div");n.setAttribute("id","memori-root"),e.appendChild(n),this.appendChild(e);const r=Object.keys(jV.propTypes).reduce(((e,t)=>(this.hasAttribute(t)&&(e[t]=this.getAttribute(t),"true"!==e[t]&&"false"!==e[t]||(e[t]="true"===e[t])),e)),{}),i=this.getAttribute("tenantId"),o=this.getAttribute("context")?.split(",")?.reduce(((e,t)=>{const[n,r]=t.split(":").map((e=>e.trim()));return{...e,[n]:r}}),{}),l=(e=>{try{return JSON.parse(e)}catch(e){return null}})(this.getAttribute("additionalInfo")||"{}")||{};i?t(a).render((0,s.jsx)(jV,{...r,context:o,tenantID:i,additionalInfo:l}),n):console.error("No tenantId attribute found")}}customElements.define("memori-client",HV)})();