@hiver/connector-agent 4.7.2 → 4.7.3-cfAppsFix-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(ue,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react-dom"),require("@hiver/hiver-ui-kit")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@hiver/hiver-ui-kit"],w):(ue=typeof globalThis<"u"?globalThis:ue||self,w(ue["@hiver/connector-agent"]={},ue.React,ue.ReactDOM,ue.hiverUiKit))})(this,function(ue,w,Re,d){"use strict";var HS=Object.defineProperty;var Up=ue=>{throw TypeError(ue)};var WS=(ue,w,Re)=>w in ue?HS(ue,w,{enumerable:!0,configurable:!0,writable:!0,value:Re}):ue[w]=Re;var De=(ue,w,Re)=>WS(ue,typeof w!="symbol"?w+"":w,Re),gl=(ue,w,Re)=>w.has(ue)||Up("Cannot "+Re);var F=(ue,w,Re)=>(gl(ue,w,"read from private field"),Re?Re.call(ue):w.get(ue)),le=(ue,w,Re)=>w.has(ue)?Up("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(ue):w.set(ue,Re),K=(ue,w,Re,d)=>(gl(ue,w,"write to private field"),d?d.call(ue,Re):w.set(ue,Re),Re),be=(ue,w,Re)=>(gl(ue,w,"access private method"),Re);var ja=(ue,w,Re,d)=>({set _(Va){K(ue,w,Va,Re)},get _(){return F(ue,w,d)}});var ur,Ln,Zr,Hp,Xr,On,zr,Wp,dr,Zp,Yr,Jr,kt,fr,st,Go,pr,Zt,xn,Xp,rn,zp,on,lt,hr,sn,Wn,Yp,mn,Xt,Ho,Jp,We,Fn,kn,qr,$r,Dn,Qr,Ur,qp,yt,xe,Wo,ut,gr,Kr,Nn,an,Zo,eo,to,mr,br,Rn,no,ke,Qo,ml,bl,yl,Cl,xl,vl,El,Kp,$p,Mn,Pn,Ct,bn,yn,Ba,Il,Qp;function Va(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=Va(w);var pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ga={exports:{}},io={};/**
1
+ (function(ue,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("react-dom"),require("@hiver/hiver-ui-kit")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@hiver/hiver-ui-kit"],w):(ue=typeof globalThis<"u"?globalThis:ue||self,w(ue["@hiver/connector-agent"]={},ue.React,ue.ReactDOM,ue.hiverUiKit))})(this,function(ue,w,Re,d){"use strict";var ZS=Object.defineProperty;var Kp=ue=>{throw TypeError(ue)};var XS=(ue,w,Re)=>w in ue?ZS(ue,w,{enumerable:!0,configurable:!0,writable:!0,value:Re}):ue[w]=Re;var De=(ue,w,Re)=>XS(ue,typeof w!="symbol"?w+"":w,Re),gl=(ue,w,Re)=>w.has(ue)||Kp("Cannot "+Re);var F=(ue,w,Re)=>(gl(ue,w,"read from private field"),Re?Re.call(ue):w.get(ue)),le=(ue,w,Re)=>w.has(ue)?Kp("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(ue):w.set(ue,Re),U=(ue,w,Re,d)=>(gl(ue,w,"write to private field"),d?d.call(ue,Re):w.set(ue,Re),Re),ye=(ue,w,Re)=>(gl(ue,w,"access private method"),Re);var Pa=(ue,w,Re,d)=>({set _(Ba){U(ue,w,Ba,Re)},get _(){return F(ue,w,d)}});var ir,Ln,Wr,Wp,Zr,On,Xr,Zp,cr,Xp,zr,Yr,Dt,lr,st,Bo,ur,zt,xn,zp,an,Yp,cn,ct,dr,ln,Bn,Jp,mn,Yt,Vo,qp,We,Fn,kn,Jr,qr,Dn,$r,Qr,$p,Ct,xe,Go,lt,fr,Ur,Nn,un,Ho,Kr,eo,pr,hr,Rn,to,ke,Uo,ml,bl,yl,Cl,xl,vl,El,e2,Qp,Mn,Pn,xt,bn,yn,ja,Il,Up;function Ba(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=Ba(w);var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Va={exports:{}},so={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var wl;function e2(){if(wl)return io;wl=1;var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,c,l){var f,g={},y=null,v=null;l!==void 0&&(y=""+l),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(v=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(g[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)g[f]===void 0&&(g[f]=c[f]);return{$$typeof:t,type:i,key:y,ref:v,props:g,_owner:o.current}}return io.Fragment=n,io.jsx=a,io.jsxs=a,io}var co={};/**
9
+ */var wl;function t2(){if(wl)return so;wl=1;var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,c,l){var f,g={},y=null,v=null;l!==void 0&&(y=""+l),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(v=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(g[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)g[f]===void 0&&(g[f]=c[f]);return{$$typeof:t,type:i,key:y,ref:v,props:g,_owner:o.current}}return so.Fragment=n,so.jsx=a,so.jsxs=a,so}var ao={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,25 +14,25 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var _l;function t2(){return _l||(_l=1,process.env.NODE_ENV!=="production"&&function(){var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b=Symbol.iterator,p="@@iterator";function h(O){if(O===null||typeof O!="object")return null;var W=b&&O[b]||O[p];return typeof W=="function"?W:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(O){{for(var W=arguments.length,U=new Array(W>1?W-1:0),Y=1;Y<W;Y++)U[Y-1]=arguments[Y];C("error",O,U)}}function C(O,W,U){{var Y=m.ReactDebugCurrentFrame,ae=Y.getStackAddendum();ae!==""&&(W+="%s",U=U.concat([ae]));var me=U.map(function(ge){return String(ge)});me.unshift("Warning: "+W),Function.prototype.apply.call(console[O],console,me)}}var I=!1,E=!1,_=!1,T=!1,S=!1,L;L=Symbol.for("react.module.reference");function N(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||T||O===v||I||E||_||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===g||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function k(O,W,U){var Y=O.displayName;if(Y)return Y;var ae=W.displayName||W.name||"";return ae!==""?U+"("+ae+")":U}function D(O){return O.displayName||"Context"}function P(O){if(O==null)return null;if(typeof O.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case i:var W=O;return D(W)+".Consumer";case a:var U=O;return D(U._context)+".Provider";case c:return k(O,O.render,"ForwardRef");case g:var Y=O.displayName||null;return Y!==null?Y:P(O.type)||"Memo";case y:{var ae=O,me=ae._payload,ge=ae._init;try{return P(ge(me))}catch{return null}}}return null}var V=Object.assign,z=0,$,Q,X,q,oe,ie,B;function R(){}R.__reactDisabledLog=!0;function G(){{if(z===0){$=console.log,Q=console.info,X=console.warn,q=console.error,oe=console.group,ie=console.groupCollapsed,B=console.groupEnd;var O={configurable:!0,enumerable:!0,value:R,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}z++}}function H(){{if(z--,z===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},O,{value:$}),info:V({},O,{value:Q}),warn:V({},O,{value:X}),error:V({},O,{value:q}),group:V({},O,{value:oe}),groupCollapsed:V({},O,{value:ie}),groupEnd:V({},O,{value:B})})}z<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=m.ReactCurrentDispatcher,re;function se(O,W,U){{if(re===void 0)try{throw Error()}catch(ae){var Y=ae.stack.trim().match(/\n( *(at )?)/);re=Y&&Y[1]||""}return`
18
- `+re+O}}var j=!1,te;{var Ee=typeof WeakMap=="function"?WeakMap:Map;te=new Ee}function Z(O,W){if(!O||j)return"";{var U=te.get(O);if(U!==void 0)return U}var Y;j=!0;var ae=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var me;me=J.current,J.current=null,G();try{if(W){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(vt){Y=vt}Reflect.construct(O,[],ge)}else{try{ge.call()}catch(vt){Y=vt}O.call(ge.prototype)}}else{try{throw Error()}catch(vt){Y=vt}O()}}catch(vt){if(vt&&Y&&typeof vt.stack=="string"){for(var ye=vt.stack.split(`
19
- `),dt=Y.stack.split(`
20
- `),Ze=ye.length-1,qe=dt.length-1;Ze>=1&&qe>=0&&ye[Ze]!==dt[qe];)qe--;for(;Ze>=1&&qe>=0;Ze--,qe--)if(ye[Ze]!==dt[qe]){if(Ze!==1||qe!==1)do if(Ze--,qe--,qe<0||ye[Ze]!==dt[qe]){var Dt=`
21
- `+ye[Ze].replace(" at new "," at ");return O.displayName&&Dt.includes("<anonymous>")&&(Dt=Dt.replace("<anonymous>",O.displayName)),typeof O=="function"&&te.set(O,Dt),Dt}while(Ze>=1&&qe>=0);break}}}finally{j=!1,J.current=me,H(),Error.prepareStackTrace=ae}var ao=O?O.displayName||O.name:"",Cr=ao?se(ao):"";return typeof O=="function"&&te.set(O,Cr),Cr}function Ve(O,W,U){return Z(O,!1)}function Ne(O){var W=O.prototype;return!!(W&&W.isReactComponent)}function Je(O,W,U){if(O==null)return"";if(typeof O=="function")return Z(O,Ne(O));if(typeof O=="string")return se(O);switch(O){case l:return se("Suspense");case f:return se("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Ve(O.render);case g:return Je(O.type,W,U);case y:{var Y=O,ae=Y._payload,me=Y._init;try{return Je(me(ae),W,U)}catch{}}}return""}var at=Object.prototype.hasOwnProperty,cn={},xt=m.ReactDebugCurrentFrame;function Ke(O){if(O){var W=O._owner,U=Je(O.type,O._source,W?W.type:null);xt.setExtraStackFrame(U)}else xt.setExtraStackFrame(null)}function Qe(O,W,U,Y,ae){{var me=Function.call.bind(at);for(var ge in O)if(me(O,ge)){var ye=void 0;try{if(typeof O[ge]!="function"){var dt=Error((Y||"React class")+": "+U+" type `"+ge+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[ge]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw dt.name="Invariant Violation",dt}ye=O[ge](W,ge,Y,U,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ze){ye=Ze}ye&&!(ye instanceof Error)&&(Ke(ae),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Y||"React class",U,ge,typeof ye),Ke(null)),ye instanceof Error&&!(ye.message in cn)&&(cn[ye.message]=!0,Ke(ae),x("Failed %s type: %s",U,ye.message),Ke(null))}}}var jn=Array.isArray;function zt(O){return jn(O)}function Bn(O){{var W=typeof Symbol=="function"&&Symbol.toStringTag,U=W&&O[Symbol.toStringTag]||O.constructor.name||"Object";return U}}function ln(O){try{return yr(O),!1}catch{return!0}}function yr(O){return""+O}function Vn(O){if(ln(O))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Bn(O)),yr(O)}var fe=m.ReactCurrentOwner,Ie={key:!0,ref:!0,__self:!0,__source:!0},rt,it,Ot;Ot={};function Gn(O){if(at.call(O,"ref")){var W=Object.getOwnPropertyDescriptor(O,"ref").get;if(W&&W.isReactWarning)return!1}return O.ref!==void 0}function Cn(O){if(at.call(O,"key")){var W=Object.getOwnPropertyDescriptor(O,"key").get;if(W&&W.isReactWarning)return!1}return O.key!==void 0}function ro(O,W){if(typeof O.ref=="string"&&fe.current&&W&&fe.current.stateNode!==W){var U=P(fe.current.type);Ot[U]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',P(fe.current.type),O.ref),Ot[U]=!0)}}function Oa(O,W){{var U=function(){rt||(rt=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};U.isReactWarning=!0,Object.defineProperty(O,"key",{get:U,configurable:!0})}}function ll(O,W){{var U=function(){it||(it=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};U.isReactWarning=!0,Object.defineProperty(O,"ref",{get:U,configurable:!0})}}var ul=function(O,W,U,Y,ae,me,ge){var ye={$$typeof:t,type:O,key:W,ref:U,props:ge,_owner:me};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function dl(O,W,U,Y,ae){{var me,ge={},ye=null,dt=null;U!==void 0&&(Vn(U),ye=""+U),Cn(W)&&(Vn(W.key),ye=""+W.key),Gn(W)&&(dt=W.ref,ro(W,ae));for(me in W)at.call(W,me)&&!Ie.hasOwnProperty(me)&&(ge[me]=W[me]);if(O&&O.defaultProps){var Ze=O.defaultProps;for(me in Ze)ge[me]===void 0&&(ge[me]=Ze[me])}if(ye||dt){var qe=typeof O=="function"?O.displayName||O.name||"Unknown":O;ye&&Oa(ge,qe),dt&&ll(ge,qe)}return ul(O,ye,dt,ae,Y,fe.current,ge)}}var oo=m.ReactCurrentOwner,Fa=m.ReactDebugCurrentFrame;function Hn(O){if(O){var W=O._owner,U=Je(O.type,O._source,W?W.type:null);Fa.setExtraStackFrame(U)}else Fa.setExtraStackFrame(null)}var Xo;Xo=!1;function so(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function zo(){{if(oo.current){var O=P(oo.current.type);if(O)return`
17
+ */var _l;function n2(){return _l||(_l=1,process.env.NODE_ENV!=="production"&&function(){var e=w,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b=Symbol.iterator,p="@@iterator";function h(O){if(O===null||typeof O!="object")return null;var W=b&&O[b]||O[p];return typeof W=="function"?W:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(O){{for(var W=arguments.length,Q=new Array(W>1?W-1:0),pe=1;pe<W;pe++)Q[pe-1]=arguments[pe];C("error",O,Q)}}function C(O,W,Q){{var pe=m.ReactDebugCurrentFrame,ee=pe.getStackAddendum();ee!==""&&(W+="%s",Q=Q.concat([ee]));var ce=Q.map(function(he){return String(he)});ce.unshift("Warning: "+W),Function.prototype.apply.call(console[O],console,ce)}}var I=!1,E=!1,_=!1,T=!1,S=!1,L;L=Symbol.for("react.module.reference");function N(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||T||O===v||I||E||_||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===g||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function k(O,W,Q){var pe=O.displayName;if(pe)return pe;var ee=W.displayName||W.name||"";return ee!==""?Q+"("+ee+")":Q}function D(O){return O.displayName||"Context"}function M(O){if(O==null)return null;if(typeof O.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case i:var W=O;return D(W)+".Consumer";case a:var Q=O;return D(Q._context)+".Provider";case c:return k(O,O.render,"ForwardRef");case g:var pe=O.displayName||null;return pe!==null?pe:M(O.type)||"Memo";case y:{var ee=O,ce=ee._payload,he=ee._init;try{return M(he(ce))}catch{return null}}}return null}var V=Object.assign,z=0,q,$,X,J,oe,ae,B;function P(){}P.__reactDisabledLog=!0;function G(){{if(z===0){q=console.log,$=console.info,X=console.warn,J=console.error,oe=console.group,ae=console.groupCollapsed,B=console.groupEnd;var O={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}z++}}function H(){{if(z--,z===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:V({},O,{value:q}),info:V({},O,{value:$}),warn:V({},O,{value:X}),error:V({},O,{value:J}),group:V({},O,{value:oe}),groupCollapsed:V({},O,{value:ae}),groupEnd:V({},O,{value:B})})}z<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=m.ReactCurrentDispatcher,re;function se(O,W,Q){{if(re===void 0)try{throw Error()}catch(ee){var pe=ee.stack.trim().match(/\n( *(at )?)/);re=pe&&pe[1]||""}return`
18
+ `+re+O}}var j=!1,te;{var Ee=typeof WeakMap=="function"?WeakMap:Map;te=new Ee}function Z(O,W){if(!O||j)return"";{var Q=te.get(O);if(Q!==void 0)return Q}var pe;j=!0;var ee=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ce;ce=Y.current,Y.current=null,G();try{if(W){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(It){pe=It}Reflect.construct(O,[],he)}else{try{he.call()}catch(It){pe=It}O.call(he.prototype)}}else{try{throw Error()}catch(It){pe=It}O()}}catch(It){if(It&&pe&&typeof It.stack=="string"){for(var me=It.stack.split(`
19
+ `),ft=pe.stack.split(`
20
+ `),Ze=me.length-1,$e=ft.length-1;Ze>=1&&$e>=0&&me[Ze]!==ft[$e];)$e--;for(;Ze>=1&&$e>=0;Ze--,$e--)if(me[Ze]!==ft[$e]){if(Ze!==1||$e!==1)do if(Ze--,$e--,$e<0||me[Ze]!==ft[$e]){var Rt=`
21
+ `+me[Ze].replace(" at new "," at ");return O.displayName&&Rt.includes("<anonymous>")&&(Rt=Rt.replace("<anonymous>",O.displayName)),typeof O=="function"&&te.set(O,Rt),Rt}while(Ze>=1&&$e>=0);break}}}finally{j=!1,Y.current=ce,H(),Error.prepareStackTrace=ee}var oo=O?O.displayName||O.name:"",Cr=oo?se(oo):"";return typeof O=="function"&&te.set(O,Cr),Cr}function Ve(O,W,Q){return Z(O,!1)}function Ne(O){var W=O.prototype;return!!(W&&W.isReactComponent)}function Ke(O,W,Q){if(O==null)return"";if(typeof O=="function")return Z(O,Ne(O));if(typeof O=="string")return se(O);switch(O){case l:return se("Suspense");case f:return se("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Ve(O.render);case g:return Ke(O.type,W,Q);case y:{var pe=O,ee=pe._payload,ce=pe._init;try{return Ke(ce(ee),W,Q)}catch{}}}return""}var rt=Object.prototype.hasOwnProperty,Jt={},vt=m.ReactDebugCurrentFrame;function at(O){if(O){var W=O._owner,Q=Ke(O.type,O._source,W?W.type:null);vt.setExtraStackFrame(Q)}else vt.setExtraStackFrame(null)}function Je(O,W,Q,pe,ee){{var ce=Function.call.bind(rt);for(var he in O)if(ce(O,he)){var me=void 0;try{if(typeof O[he]!="function"){var ft=Error((pe||"React class")+": "+Q+" type `"+he+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[he]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ft.name="Invariant Violation",ft}me=O[he](W,he,pe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ze){me=Ze}me&&!(me instanceof Error)&&(at(ee),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",pe||"React class",Q,he,typeof me),at(null)),me instanceof Error&&!(me.message in Jt)&&(Jt[me.message]=!0,at(ee),x("Failed %s type: %s",Q,me.message),at(null))}}}var gr=Array.isArray;function ut(O){return gr(O)}function no(O){{var W=typeof Symbol=="function"&&Symbol.toStringTag,Q=W&&O[Symbol.toStringTag]||O.constructor.name||"Object";return Q}}function mr(O){try{return Nt(O),!1}catch{return!0}}function Nt(O){return""+O}function br(O){if(mr(O))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",no(O)),Nt(O)}var fe=m.ReactCurrentOwner,we={key:!0,ref:!0,__self:!0,__source:!0},qe,Et,dt;dt={};function yr(O){if(rt.call(O,"ref")){var W=Object.getOwnPropertyDescriptor(O,"ref").get;if(W&&W.isReactWarning)return!1}return O.ref!==void 0}function Cn(O){if(rt.call(O,"key")){var W=Object.getOwnPropertyDescriptor(O,"key").get;if(W&&W.isReactWarning)return!1}return O.key!==void 0}function ro(O,W){if(typeof O.ref=="string"&&fe.current&&W&&fe.current.stateNode!==W){var Q=M(fe.current.type);dt[Q]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(fe.current.type),O.ref),dt[Q]=!0)}}function Fa(O,W){{var Q=function(){qe||(qe=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};Q.isReactWarning=!0,Object.defineProperty(O,"key",{get:Q,configurable:!0})}}function ka(O,W){{var Q=function(){Et||(Et=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};Q.isReactWarning=!0,Object.defineProperty(O,"ref",{get:Q,configurable:!0})}}var cl=function(O,W,Q,pe,ee,ce,he){var me={$$typeof:t,type:O,key:W,ref:Q,props:he,_owner:ce};return me._store={},Object.defineProperty(me._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(me,"_self",{configurable:!1,enumerable:!1,writable:!1,value:pe}),Object.defineProperty(me,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.freeze&&(Object.freeze(me.props),Object.freeze(me)),me};function ll(O,W,Q,pe,ee){{var ce,he={},me=null,ft=null;Q!==void 0&&(br(Q),me=""+Q),Cn(W)&&(br(W.key),me=""+W.key),yr(W)&&(ft=W.ref,ro(W,ee));for(ce in W)rt.call(W,ce)&&!we.hasOwnProperty(ce)&&(he[ce]=W[ce]);if(O&&O.defaultProps){var Ze=O.defaultProps;for(ce in Ze)he[ce]===void 0&&(he[ce]=Ze[ce])}if(me||ft){var $e=typeof O=="function"?O.displayName||O.name||"Unknown":O;me&&Fa(he,$e),ft&&ka(he,$e)}return cl(O,me,ft,ee,pe,fe.current,he)}}var Wo=m.ReactCurrentOwner,Zo=m.ReactDebugCurrentFrame;function jn(O){if(O){var W=O._owner,Q=Ke(O.type,O._source,W?W.type:null);Zo.setExtraStackFrame(Q)}else Zo.setExtraStackFrame(null)}var Xo;Xo=!1;function zo(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function Yo(){{if(Wo.current){var O=M(Wo.current.type);if(O)return`
22
22
 
23
- Check the render method of \``+O+"`."}return""}}function un(O){return""}var ka={};function Da(O){{var W=zo();if(!W){var U=typeof O=="string"?O:O.displayName||O.name;U&&(W=`
23
+ Check the render method of \``+O+"`."}return""}}function Da(O){return""}var qt={};function ul(O){{var W=Yo();if(!W){var Q=typeof O=="string"?O:O.displayName||O.name;Q&&(W=`
24
24
 
25
- Check the top-level render call using <`+U+">.")}return W}}function Na(O,W){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var U=Da(W);if(ka[U])return;ka[U]=!0;var Y="";O&&O._owner&&O._owner!==oo.current&&(Y=" It was passed a child from "+P(O._owner.type)+"."),Hn(O),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',U,Y),Hn(null)}}function Yo(O,W){{if(typeof O!="object")return;if(zt(O))for(var U=0;U<O.length;U++){var Y=O[U];so(Y)&&Na(Y,W)}else if(so(O))O._store&&(O._store.validated=!0);else if(O){var ae=h(O);if(typeof ae=="function"&&ae!==O.entries)for(var me=ae.call(O),ge;!(ge=me.next()).done;)so(ge.value)&&Na(ge.value,W)}}}function fl(O){{var W=O.type;if(W==null||typeof W=="string")return;var U;if(typeof W=="function")U=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===c||W.$$typeof===g))U=W.propTypes;else return;if(U){var Y=P(W);Qe(U,O.props,"prop",Y,O)}else if(W.PropTypes!==void 0&&!Xo){Xo=!0;var ae=P(W);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ae||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ra(O){{for(var W=Object.keys(O.props),U=0;U<W.length;U++){var Y=W[U];if(Y!=="children"&&Y!=="key"){Hn(O),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Y),Hn(null);break}}O.ref!==null&&(Hn(O),x("Invalid attribute `ref` supplied to `React.Fragment`."),Hn(null))}}var Jo={};function Ma(O,W,U,Y,ae,me){{var ge=N(O);if(!ge){var ye="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var dt=un();dt?ye+=dt:ye+=zo();var Ze;O===null?Ze="null":zt(O)?Ze="array":O!==void 0&&O.$$typeof===t?(Ze="<"+(P(O.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):Ze=typeof O,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ze,ye)}var qe=dl(O,W,U,ae,me);if(qe==null)return qe;if(ge){var Dt=W.children;if(Dt!==void 0)if(Y)if(zt(Dt)){for(var ao=0;ao<Dt.length;ao++)Yo(Dt[ao],O);Object.freeze&&Object.freeze(Dt)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Yo(Dt,O)}if(at.call(W,"key")){var Cr=P(O),vt=Object.keys(W).filter(function(GS){return GS!=="key"}),hl=vt.length>0?"{key: someKey, "+vt.join(": ..., ")+": ...}":"{key: someKey}";if(!Jo[Cr+hl]){var VS=vt.length>0?"{"+vt.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+Q+">.")}return W}}function Jo(O,W){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=ul(W);if(qt[Q])return;qt[Q]=!0;var pe="";O&&O._owner&&O._owner!==Wo.current&&(pe=" It was passed a child from "+M(O._owner.type)+"."),jn(O),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,pe),jn(null)}}function Na(O,W){{if(typeof O!="object")return;if(ut(O))for(var Q=0;Q<O.length;Q++){var pe=O[Q];zo(pe)&&Jo(pe,W)}else if(zo(O))O._store&&(O._store.validated=!0);else if(O){var ee=h(O);if(typeof ee=="function"&&ee!==O.entries)for(var ce=ee.call(O),he;!(he=ce.next()).done;)zo(he.value)&&Jo(he.value,W)}}}function Ra(O){{var W=O.type;if(W==null||typeof W=="string")return;var Q;if(typeof W=="function")Q=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===c||W.$$typeof===g))Q=W.propTypes;else return;if(Q){var pe=M(W);Je(Q,O.props,"prop",pe,O)}else if(W.PropTypes!==void 0&&!Xo){Xo=!0;var ee=M(W);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ee||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dl(O){{for(var W=Object.keys(O.props),Q=0;Q<W.length;Q++){var pe=W[Q];if(pe!=="children"&&pe!=="key"){jn(O),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",pe),jn(null);break}}O.ref!==null&&(jn(O),x("Invalid attribute `ref` supplied to `React.Fragment`."),jn(null))}}var qo={};function $o(O,W,Q,pe,ee,ce){{var he=N(O);if(!he){var me="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(me+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ft=Da();ft?me+=ft:me+=Yo();var Ze;O===null?Ze="null":ut(O)?Ze="array":O!==void 0&&O.$$typeof===t?(Ze="<"+(M(O.type)||"Unknown")+" />",me=" Did you accidentally export a JSX literal instead of a component?"):Ze=typeof O,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ze,me)}var $e=ll(O,W,Q,ee,ce);if($e==null)return $e;if(he){var Rt=W.children;if(Rt!==void 0)if(pe)if(ut(Rt)){for(var oo=0;oo<Rt.length;oo++)Na(Rt[oo],O);Object.freeze&&Object.freeze(Rt)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Na(Rt,O)}if(rt.call(W,"key")){var Cr=M(O),It=Object.keys(W).filter(function(WS){return WS!=="key"}),hl=It.length>0?"{key: someKey, "+It.join(": ..., ")+": ...}":"{key: someKey}";if(!qo[Cr+hl]){var HS=It.length>0?"{"+It.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,hl,Cr,VS,Cr),Jo[Cr+hl]=!0}}return O===r?Ra(qe):fl(qe),qe}}function Pa(O,W,U){return Ma(O,W,U,!0)}function pl(O,W,U){return Ma(O,W,U,!1)}var qo=pl,$o=Pa;co.Fragment=r,co.jsx=qo,co.jsxs=$o}()),co}process.env.NODE_ENV==="production"?Ga.exports=e2():Ga.exports=t2();var u=Ga.exports;function Sl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Sl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sl(e))&&(r&&(r+=" "),r+=t);return r}const lo=e=>typeof e=="number"&&!isNaN(e),Zn=e=>typeof e=="string",Et=e=>typeof e=="function",Ko=e=>Zn(e)||Et(e)?e:null,Ha=e=>w.isValidElement(e)||Zn(e)||Et(e)||lo(e);function n2(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function es(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(a){let{children:i,position:c,preventExitTransition:l,done:f,nodeRef:g,isIn:y,playToast:v}=a;const b=r?`${t}--${c}`:t,p=r?`${n}--${c}`:n,h=w.useRef(0);return w.useLayoutEffect(()=>{const m=g.current,x=b.split(" "),C=I=>{I.target===g.current&&(v(),m.removeEventListener("animationend",C),m.removeEventListener("animationcancel",C),h.current===0&&I.type!=="animationcancel"&&m.classList.remove(...x))};m.classList.add(...x),m.addEventListener("animationend",C),m.addEventListener("animationcancel",C)},[]),w.useEffect(()=>{const m=g.current,x=()=>{m.removeEventListener("animationend",x),o?n2(m,f,s):f()};y||(l?x():(h.current=1,m.className+=` ${p}`,m.addEventListener("animationend",x)))},[y]),w.createElement(w.Fragment,null,i)}}function Tl(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const ct=new Map;let uo=[];const Wa=new Set,r2=e=>Wa.forEach(t=>t(e)),Al=()=>ct.size>0;function Ll(e,t){var n;if(t)return!((n=ct.get(t))==null||!n.isToastActive(e));let r=!1;return ct.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Ol(e,t){Ha(e)&&(Al()||uo.push({content:e,options:t}),ct.forEach(n=>{n.buildToast(e,t)}))}function Fl(e,t){ct.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function o2(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,g,y){let v=1,b=0,p=[],h=[],m=[],x=g;const C=new Map,I=new Set,E=()=>{m=Array.from(C.values()),I.forEach(S=>S())},_=S=>{h=S==null?[]:h.filter(L=>L!==S),E()},T=S=>{const{toastId:L,onOpen:N,updateId:k,children:D}=S.props,P=k==null;S.staleId&&C.delete(S.staleId),C.set(L,S),h=[...h,S.props.toastId].filter(V=>V!==S.staleId),E(),y(Tl(S,P?"added":"updated")),P&&Et(N)&&N(w.isValidElement(D)&&D.props)};return{id:f,props:x,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{C.forEach(N=>{L!=null&&L!==N.props.toastId||Et(N.toggle)&&N.toggle(S)})},removeToast:_,toasts:C,clearQueue:()=>{b-=p.length,p=[]},buildToast:(S,L)=>{if((B=>{let{containerId:R,toastId:G,updateId:H}=B;const J=R?R!==f:f!==1,re=C.has(G)&&H==null;return J||re})(L))return;const{toastId:N,updateId:k,data:D,staleId:P,delay:V}=L,z=()=>{_(N)},$=k==null;$&&b++;const Q={...x,style:x.toastStyle,key:v++,...Object.fromEntries(Object.entries(L).filter(B=>{let[R,G]=B;return G!=null})),toastId:N,updateId:k,data:D,closeToast:z,isIn:!1,className:Ko(L.className||x.toastClassName),bodyClassName:Ko(L.bodyClassName||x.bodyClassName),progressClassName:Ko(L.progressClassName||x.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,q=x.autoClose,X===!1||lo(X)&&X>0?X:q),deleteToast(){const B=C.get(N),{onClose:R,children:G}=B.props;Et(R)&&R(w.isValidElement(G)&&G.props),y(Tl(B,"removed")),C.delete(N),b--,b<0&&(b=0),p.length>0?T(p.shift()):E()}};var X,q;Q.closeButton=x.closeButton,L.closeButton===!1||Ha(L.closeButton)?Q.closeButton=L.closeButton:L.closeButton===!0&&(Q.closeButton=!Ha(x.closeButton)||x.closeButton);let oe=S;w.isValidElement(S)&&!Zn(S.type)?oe=w.cloneElement(S,{closeToast:z,toastProps:Q,data:D}):Et(S)&&(oe=S({closeToast:z,toastProps:Q,data:D}));const ie={content:oe,props:Q,staleId:P};x.limit&&x.limit>0&&b>x.limit&&$?p.push(ie):lo(V)?setTimeout(()=>{T(ie)},V):T(ie)},setProps(S){x=S},setToggle:(S,L)=>{C.get(S).toggle=L},isToastActive:S=>h.some(L=>L===S),getSnapshot:()=>x.newestOnTop?m.reverse():m}}(a,s,r2);ct.set(a,c);const l=c.observe(i);return uo.forEach(f=>Ol(f.content,f.options)),uo=[],()=>{l(),ct.delete(a)}},setProps(i){var c;(c=ct.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=ct.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=w.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const a=new Map;return o.forEach(i=>{const{position:c}=i.props;a.has(c)||a.set(c,[]),a.get(c).push(i)}),Array.from(a,i=>s(i[0],i[1]))},isToastActive:Ll,count:o==null?void 0:o.length}}function s2(e){const[t,n]=w.useState(!1),[r,o]=w.useState(!1),s=w.useRef(null),a=w.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:g}=e;var y,v;function b(){n(!0)}function p(){n(!1)}function h(C){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?C.clientX-a.start:C.clientY-a.start,a.start!==C.clientX&&(a.canCloseOnClick=!1),I.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,I.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function m(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",m);const C=s.current;if(a.canDrag&&a.didMove&&C){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}(v=ct.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||v.setToggle(y.id,y.fn),w.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",b),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",b),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const x={onPointerDown:function(C){if(e.draggable===!0||e.draggable===C.pointerType){a.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",m);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=C.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=C.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(C){const{top:I,bottom:E,left:_,right:T}=s.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=_&&C.clientX<=T&&C.clientY>=I&&C.clientY<=E?p():b()}};return i&&c&&(x.onMouseEnter=p,e.stacked||(x.onMouseLeave=b)),g&&(x.onClick=C=>{f&&f(C),a.canCloseOnClick&&l()}),{playToast:b,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:x}}function a2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:g,theme:y}=e;const v=s||c&&l===0,b={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(b.transform=`scaleX(${l})`);const p=vn("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${y}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),h=Et(a)?a({rtl:f,type:o,defaultClassName:p}):vn(p,a),m={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{g&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:h,style:b,...m}))}let i2=1;const kl=()=>""+i2++;function c2(e){return e&&(Zn(e.toastId)||lo(e.toastId))?e.toastId:kl()}function fo(e,t){return Ol(e,t),t.toastId}function ts(e,t){return{...t,type:t&&t.type||e,toastId:c2(t)}}function ns(e){return(t,n)=>fo(t,ts(e,n))}function Ae(e,t){return fo(e,ts("default",t))}Ae.loading=(e,t)=>fo(e,ts("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Ae.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=Zn(o)?Ae.loading(o,n):Ae.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,g,y)=>{if(g==null)return void Ae.dismiss(r);const v={type:f,...i,...n,data:y},b=Zn(g)?{render:g}:g;return r?Ae.update(r,{...v,...b}):Ae(b.render,{...v,...b}),y},l=Et(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},Ae.success=ns("success"),Ae.info=ns("info"),Ae.error=ns("error"),Ae.warning=ns("warning"),Ae.warn=Ae.warning,Ae.dark=(e,t)=>fo(e,ts("default",{theme:"dark",...t})),Ae.dismiss=function(e){(function(t){var n;if(Al()){if(t==null||Zn(n=t)||lo(n))ct.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=ct.get(t.containerId);r?r.removeToast(t.id):ct.forEach(o=>{o.removeToast(t.id)})}}else uo=uo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Ae.clearWaitingQueue=function(e){e===void 0&&(e={}),ct.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Ae.isActive=Ll,Ae.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=ct.get(a||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:kl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,fo(a,s)}},Ae.done=e=>{Ae.update(e,{progress:1})},Ae.onChange=function(e){return Wa.add(e),()=>{Wa.delete(e)}},Ae.play=e=>Fl(!0,e),Ae.pause=e=>Fl(!1,e);const l2=typeof window<"u"?w.useLayoutEffect:w.useEffect,rs=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return w.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},Za={info:function(e){return w.createElement(rs,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return w.createElement(rs,{...e},w.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return w.createElement(rs,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return w.createElement(rs,{...e},w.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return w.createElement("div",{className:"Toastify__spinner"})}},u2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=s2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:g,closeToast:y,transition:v,position:b,className:p,style:h,bodyClassName:m,bodyStyle:x,progressClassName:C,progressStyle:I,updateId:E,role:_,progress:T,rtl:S,toastId:L,deleteToast:N,isIn:k,isLoading:D,closeOnClick:P,theme:V}=e,z=vn("Toastify__toast",`Toastify__toast-theme--${V}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":P}),$=Et(p)?p({rtl:S,position:b,type:f,defaultClassName:z}):vn(z,p),Q=function(ie){let{theme:B,type:R,isLoading:G,icon:H}=ie,J=null;const re={theme:B,type:R};return H===!1||(Et(H)?J=H({...re,isLoading:G}):w.isValidElement(H)?J=w.cloneElement(H,re):G?J=Za.spinner():(se=>se in Za)(R)&&(J=Za[R](re))),J}(e),X=!!T||!c,q={closeToast:y,type:f,theme:V};let oe=null;return a===!1||(oe=Et(a)?a(q):w.isValidElement(a)?w.cloneElement(a,q):function(ie){let{closeToast:B,theme:R,ariaLabel:G="close"}=ie;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${R}`,type:"button",onClick:H=>{H.stopPropagation(),B(H)},"aria-label":G},w.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},w.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(q)),w.createElement(v,{isIn:k,done:N,position:b,preventExitTransition:n,nodeRef:r,playToast:s},w.createElement("div",{id:L,onClick:l,"data-in":k,className:$,...o,style:h,ref:r},w.createElement("div",{...k&&{role:_},className:Et(m)?m({type:f}):vn("Toastify__toast-body",m),style:x},Q!=null&&w.createElement("div",{className:vn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},Q),w.createElement("div",null,i)),oe,w.createElement(a2,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:V,delay:c,isRunning:t,isIn:k,closeToast:y,hide:g,type:f,style:I,className:C,controlledProgress:X,progress:T||0})))},os=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},d2=es(os("bounce",!0));es(os("slide",!0)),es(os("zoom")),es(os("flip"));const f2={position:"top-right",transition:d2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Xa(e){let t={...f2,...e};const n=e.stacked,[r,o]=w.useState(!0),s=w.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=o2(t),{className:l,style:f,rtl:g,containerId:y}=t;function v(p){const h=vn("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":g});return Et(l)?l({position:p,rtl:g,defaultClassName:h}):vn(h,Ko(l))}function b(){n&&(o(!0),Ae.play())}return l2(()=>{if(n){var p;const h=s.current.querySelectorAll('[data-in="true"]'),m=12,x=(p=t.position)==null?void 0:p.includes("top");let C=0,I=0;Array.from(h).reverse().forEach((E,_)=>{const T=E;T.classList.add("Toastify__toast--stacked"),_>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=x?"top":"bot");const S=C*(r?.2:1)+(r?0:m*_);T.style.setProperty("--y",`${x?S:-1*S}px`),T.style.setProperty("--g",`${m}`),T.style.setProperty("--s",""+(1-(r?I:0))),C+=T.offsetHeight,I+=.025})}},[r,c,n]),w.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),Ae.pause())},onMouseLeave:b},a((p,h)=>{const m=h.length?{...f}:{...f,pointerEvents:"none"};return w.createElement("div",{className:v(p),style:m,key:`container-${p}`},h.map(x=>{let{content:C,props:I}=x;return w.createElement(u2,{...I,stacked:n,collapseAll:b,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},C)}))}))}var xr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Xn=typeof window>"u"||"Deno"in globalThis;function Ft(){}function p2(e,t){return typeof e=="function"?e(t):e}function za(e){return typeof e=="number"&&e>=0&&e!==1/0}function Dl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vr(e,t){return typeof e=="function"?e(t):e}function Nt(e,t){return typeof e=="function"?e(t):e}function Nl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ya(a,t.options))return!1}else if(!po(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Rl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(zn(t.options.mutationKey)!==zn(s))return!1}else if(!po(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ya(e,t){return((t==null?void 0:t.queryKeyHashFn)||zn)(e)}function zn(e){return JSON.stringify(e,(t,n)=>qa(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function po(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!po(e[n],t[n])):!1}function Ja(e,t){if(e===t)return e;const n=Ml(e)&&Ml(t);if(n||qa(e)&&qa(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let c=0;for(let l=0;l<a;l++){const f=n?l:s[l];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=Ja(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function ss(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ml(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qa(e){if(!Pl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Pl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Pl(e){return Object.prototype.toString.call(e)==="[object Object]"}function h2(e){return new Promise(t=>{setTimeout(t,e)})}function $a(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Ja(e,t)}catch(r){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`)}return Ja(e,t)}return t}function g2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function m2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var as=Symbol();function jl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===as&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===as?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var b2=(Hp=class extends xr{constructor(){super();le(this,ur);le(this,Ln);le(this,Zr);K(this,Zr,t=>{if(!Xn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Ln)||this.setEventListener(F(this,Zr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Ln))==null||t.call(this),K(this,Ln,void 0))}setEventListener(t){var n;K(this,Zr,t),(n=F(this,Ln))==null||n.call(this),K(this,Ln,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,ur)!==t&&(K(this,ur,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,ur)=="boolean"?F(this,ur):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ur=new WeakMap,Ln=new WeakMap,Zr=new WeakMap,Hp),Qa=new b2,y2=(Wp=class extends xr{constructor(){super();le(this,Xr,!0);le(this,On);le(this,zr);K(this,zr,t=>{if(!Xn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,On)||this.setEventListener(F(this,zr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,On))==null||t.call(this),K(this,On,void 0))}setEventListener(t){var n;K(this,zr,t),(n=F(this,On))==null||n.call(this),K(this,On,t(this.setOnline.bind(this)))}setOnline(t){F(this,Xr)!==t&&(K(this,Xr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,Xr)}},Xr=new WeakMap,On=new WeakMap,zr=new WeakMap,Wp),is=new y2;function Ua(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function C2(e){return Math.min(1e3*2**e,3e4)}function Bl(e){return(e??"online")==="online"?is.isOnline():!0}var Vl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ka(e){return e instanceof Vl}function Gl(e){let t=!1,n=0,r=!1,o;const s=Ua(),a=p=>{var h;r||(y(new Vl(p)),(h=e.abort)==null||h.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>Qa.isFocused()&&(e.networkMode==="always"||is.isOnline())&&e.canRun(),f=()=>Bl(e.networkMode)&&e.canRun(),g=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),s.resolve(p))},y=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s.reject(p))},v=()=>new Promise(p=>{var h;o=m=>{(r||l())&&p(m)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),b=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(g).catch(m=>{var _;if(r)return;const x=e.retry??(Xn?0:3),C=e.retryDelay??C2,I=typeof C=="function"?C(n,m):C,E=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,m);if(t||!E){y(m);return}n++,(_=e.onFail)==null||_.call(e,n,m),h2(I).then(()=>l()?void 0:v()).then(()=>{t?y(m):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?b():v().then(b),s)}}function x2(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=i=>setTimeout(i,0);const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||a()}return c},batchCalls:i=>(...c)=>{s(()=>{i(...c)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var $e=x2(),Hl=(Zp=class{constructor(){le(this,dr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),za(this.gcTime)&&K(this,dr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xn?1/0:5*60*1e3))}clearGcTimeout(){F(this,dr)&&(clearTimeout(F(this,dr)),K(this,dr,void 0))}},dr=new WeakMap,Zp),v2=(Xp=class extends Hl{constructor(t){super();le(this,Zt);le(this,Yr);le(this,Jr);le(this,kt);le(this,fr);le(this,st);le(this,Go);le(this,pr);K(this,pr,!1),K(this,Go,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,fr,t.client),K(this,kt,F(this,fr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Yr,E2(this.options)),this.state=t.state??F(this,Yr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,st))==null?void 0:t.promise}setOptions(t){this.options={...F(this,Go),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,kt).remove(this)}setData(t,n){const r=$a(this.state.data,t,this.options);return be(this,Zt,xn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,Zt,xn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,st))==null?void 0:r.promise;return(o=F(this,st))==null||o.cancel(t),n?n.then(Ft).catch(Ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,Yr))}isActive(){return this.observers.some(t=>Nt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===as||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Dl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,st))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,st))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,kt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,st)&&(F(this,pr)?F(this,st).cancel({revert:!0}):F(this,st).cancelRetry()),this.scheduleGc()),F(this,kt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,Zt,xn).call(this,{type:"invalidate"})}fetch(t,n){var c,l,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,st))return F(this,st).continueRetry(),F(this,st).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(K(this,pr,!0),r.signal)})},s=()=>{const g=jl(this.options,n),y={client:F(this,fr),queryKey:this.queryKey,meta:this.meta};return o(y),K(this,pr,!1),this.options.persister?this.options.persister(g,y,this):g(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,fr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),K(this,Jr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&be(this,Zt,xn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=g=>{var y,v,b,p;Ka(g)&&g.silent||be(this,Zt,xn).call(this,{type:"error",error:g}),Ka(g)||((v=(y=F(this,kt).config).onError)==null||v.call(y,g,this),(p=(b=F(this,kt).config).onSettled)==null||p.call(b,this.state.data,g,this)),this.scheduleGc()};return K(this,st,Gl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var y,v,b,p;if(g===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(h){i(h);return}(v=(y=F(this,kt).config).onSuccess)==null||v.call(y,g,this),(p=(b=F(this,kt).config).onSettled)==null||p.call(b,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,y)=>{be(this,Zt,xn).call(this,{type:"failed",failureCount:g,error:y})},onPause:()=>{be(this,Zt,xn).call(this,{type:"pause"})},onContinue:()=>{be(this,Zt,xn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,st).start()}},Yr=new WeakMap,Jr=new WeakMap,kt=new WeakMap,fr=new WeakMap,st=new WeakMap,Go=new WeakMap,pr=new WeakMap,Zt=new WeakSet,xn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Wl(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Ka(o)&&o.revert&&F(this,Jr)?{...F(this,Jr),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),$e.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,kt).notify({query:this,type:"updated",action:t})})},Xp);function Wl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function E2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var I2=(zp=class extends xr{constructor(t={}){super();le(this,rn);this.config=t,K(this,rn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ya(o,n);let a=this.get(s);return a||(a=new v2({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,rn).has(t.queryHash)||(F(this,rn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,rn).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,rn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){$e.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,rn).get(t)}getAll(){return[...F(this,rn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Nl(t,r)):n}notify(t){$e.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){$e.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){$e.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},rn=new WeakMap,zp),w2=(Yp=class extends Hl{constructor(t){super();le(this,sn);le(this,on);le(this,lt);le(this,hr);this.mutationId=t.mutationId,K(this,lt,t.mutationCache),K(this,on,[]),this.state=t.state||Zl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,on).includes(t)||(F(this,on).push(t),this.clearGcTimeout(),F(this,lt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,on,F(this,on).filter(n=>n!==t)),this.scheduleGc(),F(this,lt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,on).length||(this.state.status==="pending"?this.scheduleGc():F(this,lt).remove(this))}continue(){var t;return((t=F(this,hr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,g,y,v,b,p,h,m,x,C,I,E,_,T;K(this,hr,Gl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{be(this,sn,Wn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{be(this,sn,Wn).call(this,{type:"pause"})},onContinue:()=>{be(this,sn,Wn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,lt).canRun(this)}));const n=this.state.status==="pending",r=!F(this,hr).canStart();try{if(!n){be(this,sn,Wn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,lt).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&be(this,sn,Wn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,hr).start();return await((l=(c=F(this,lt).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,S,t,this.state.context)),await((v=(y=F(this,lt).config).onSettled)==null?void 0:v.call(y,S,null,this.state.variables,this.state.context,this)),await((p=(b=this.options).onSettled)==null?void 0:p.call(b,S,null,t,this.state.context)),be(this,sn,Wn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(h=F(this,lt).config).onError)==null?void 0:m.call(h,S,t,this.state.context,this)),await((C=(x=this.options).onError)==null?void 0:C.call(x,S,t,this.state.context)),await((E=(I=F(this,lt).config).onSettled)==null?void 0:E.call(I,void 0,S,this.state.variables,this.state.context,this)),await((T=(_=this.options).onSettled)==null?void 0:T.call(_,void 0,S,t,this.state.context)),S}finally{be(this,sn,Wn).call(this,{type:"error",error:S})}}finally{F(this,lt).runNext(this)}}},on=new WeakMap,lt=new WeakMap,hr=new WeakMap,sn=new WeakSet,Wn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),$e.batch(()=>{F(this,on).forEach(r=>{r.onMutationUpdate(t)}),F(this,lt).notify({mutation:this,type:"updated",action:t})})},Yp);function Zl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _2=(Jp=class extends xr{constructor(t={}){super();le(this,mn);le(this,Xt);le(this,Ho);this.config=t,K(this,mn,new Set),K(this,Xt,new Map),K(this,Ho,0)}build(t,n,r){const o=new w2({mutationCache:this,mutationId:++ja(this,Ho)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,mn).add(t);const n=cs(t);if(typeof n=="string"){const r=F(this,Xt).get(n);r?r.push(t):F(this,Xt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,mn).delete(t)){const n=cs(t);if(typeof n=="string"){const r=F(this,Xt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,Xt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=cs(t);if(typeof n=="string"){const r=F(this,Xt).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=cs(t);if(typeof n=="string"){const o=(r=F(this,Xt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){$e.batch(()=>{F(this,mn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,mn).clear(),F(this,Xt).clear()})}getAll(){return Array.from(F(this,mn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rl(n,r))}findAll(t={}){return this.getAll().filter(n=>Rl(t,n))}notify(t){$e.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return $e.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ft))))}},mn=new WeakMap,Xt=new WeakMap,Ho=new WeakMap,Jp);function cs(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Xl(e){return{onFetch:(t,n)=>{var f,g,y,v,b;const r=t.options,o=(y=(g=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:y.direction,s=((v=t.state.data)==null?void 0:v.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const h=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},m=jl(t.options,t.fetchOptions),x=async(C,I,E)=>{if(p)return Promise.reject();if(I==null&&C.pages.length)return Promise.resolve(C);const _={client:t.client,queryKey:t.queryKey,pageParam:I,direction:E?"backward":"forward",meta:t.options.meta};h(_);const T=await m(_),{maxPages:S}=t.options,L=E?m2:g2;return{pages:L(C.pages,T,S),pageParams:L(C.pageParams,I,S)}};if(o&&s.length){const C=o==="backward",I=C?S2:zl,E={pages:s,pageParams:a},_=I(r,E);i=await x(E,_,C)}else{const C=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:zl(r,i);if(c>0&&I==null)break;i=await x(i,I),c++}while(c<C)}return i};t.options.persister?t.fetchFn=()=>{var p,h;return(h=(p=t.options).persister)==null?void 0:h.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function zl(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function S2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var T2=(qp=class{constructor(e={}){le(this,We);le(this,Fn);le(this,kn);le(this,qr);le(this,$r);le(this,Dn);le(this,Qr);le(this,Ur);K(this,We,e.queryCache||new I2),K(this,Fn,e.mutationCache||new _2),K(this,kn,e.defaultOptions||{}),K(this,qr,new Map),K(this,$r,new Map),K(this,Dn,0)}mount(){ja(this,Dn)._++,F(this,Dn)===1&&(K(this,Qr,Qa.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,We).onFocus())})),K(this,Ur,is.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,We).onOnline())})))}unmount(){var e,t;ja(this,Dn)._--,F(this,Dn)===0&&((e=F(this,Qr))==null||e.call(this),K(this,Qr,void 0),(t=F(this,Ur))==null||t.call(this),K(this,Ur,void 0))}isFetching(e){return F(this,We).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,Fn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,We).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,We).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,We).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,We).get(r.queryHash),s=o==null?void 0:o.state.data,a=p2(t,s);if(a!==void 0)return F(this,We).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return $e.batch(()=>F(this,We).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,We).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,We);$e.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,We);return $e.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=$e.batch(()=>F(this,We).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ft).catch(Ft)}invalidateQueries(e,t={}){return $e.batch(()=>(F(this,We).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=$e.batch(()=>F(this,We).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ft)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ft)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,We).build(this,t);return n.isStaleByTime(vr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ft).catch(Ft)}fetchInfiniteQuery(e){return e.behavior=Xl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ft).catch(Ft)}ensureInfiniteQueryData(e){return e.behavior=Xl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return is.isOnline()?F(this,Fn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,We)}getMutationCache(){return F(this,Fn)}getDefaultOptions(){return F(this,kn)}setDefaultOptions(e){K(this,kn,e)}setQueryDefaults(e,t){F(this,qr).set(zn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,qr).values()],n={};return t.forEach(r=>{po(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,$r).set(zn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,$r).values()],n={};return t.forEach(r=>{po(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,kn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ya(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===as&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,kn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,We).clear(),F(this,Fn).clear()}},We=new WeakMap,Fn=new WeakMap,kn=new WeakMap,qr=new WeakMap,$r=new WeakMap,Dn=new WeakMap,Qr=new WeakMap,Ur=new WeakMap,qp),A2=($p=class extends xr{constructor(t,n){super();le(this,ke);le(this,yt);le(this,xe);le(this,Wo);le(this,ut);le(this,gr);le(this,Kr);le(this,Nn);le(this,an);le(this,Zo);le(this,eo);le(this,to);le(this,mr);le(this,br);le(this,Rn);le(this,no,new Set);this.options=n,K(this,yt,t),K(this,an,null),K(this,Nn,Ua()),this.options.experimental_prefetchInRender||F(this,Nn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,xe).addObserver(this),Yl(F(this,xe),this.options)?be(this,ke,Qo).call(this):this.updateResult(),be(this,ke,Cl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ei(F(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ei(F(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,ke,xl).call(this),be(this,ke,vl).call(this),F(this,xe).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,xe);if(this.options=F(this,yt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(this.options.enabled,F(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,ke,El).call(this),F(this,xe).setOptions(this.options),r._defaulted&&!ss(this.options,r)&&F(this,yt).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,xe),observer:this});const s=this.hasListeners();s&&Jl(F(this,xe),o,this.options,r)&&be(this,ke,Qo).call(this),this.updateResult(n),s&&(F(this,xe)!==o||Nt(this.options.enabled,F(this,xe))!==Nt(r.enabled,F(this,xe))||vr(this.options.staleTime,F(this,xe))!==vr(r.staleTime,F(this,xe)))&&be(this,ke,ml).call(this);const a=be(this,ke,bl).call(this);s&&(F(this,xe)!==o||Nt(this.options.enabled,F(this,xe))!==Nt(r.enabled,F(this,xe))||a!==F(this,Rn))&&be(this,ke,yl).call(this,a)}getOptimisticResult(t){const n=F(this,yt).getQueryCache().build(F(this,yt),t),r=this.createResult(n,t);return O2(this,r)&&(K(this,ut,r),K(this,Kr,this.options),K(this,gr,F(this,xe).state)),r}getCurrentResult(){return F(this,ut)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,no).add(t)}getCurrentQuery(){return F(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,yt).defaultQueryOptions(t),r=F(this,yt).getQueryCache().build(F(this,yt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,ke,Qo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,ut)))}createResult(t,n){var S;const r=F(this,xe),o=this.options,s=F(this,ut),a=F(this,gr),i=F(this,Kr),l=t!==r?t.state:F(this,Wo),{state:f}=t;let g={...f},y=!1,v;if(n._optimisticResults){const L=this.hasListeners(),N=!L&&Yl(t,n),k=L&&Jl(t,r,n,o);(N||k)&&(g={...g,...Wl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:p,status:h}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===F(this,Zo))v=F(this,eo);else try{K(this,Zo,n.select),v=n.select(g.data),v=$a(s==null?void 0:s.data,v,n),K(this,eo,v),K(this,an,null)}catch(L){K(this,an,L)}else v=g.data;if(n.placeholderData!==void 0&&v===void 0&&h==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,to))==null?void 0:S.state.data,F(this,to)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),K(this,an,null)}catch(N){K(this,an,N)}L!==void 0&&(h="success",v=$a(s==null?void 0:s.data,L,n),y=!0)}F(this,an)&&(b=F(this,an),v=F(this,eo),p=Date.now(),h="error");const m=g.fetchStatus==="fetching",x=h==="pending",C=h==="error",I=x&&m,E=v!==void 0,T={status:h,fetchStatus:g.fetchStatus,isPending:x,isSuccess:h==="success",isError:C,isInitialLoading:I,isLoading:I,data:v,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:p,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>l.dataUpdateCount||g.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!x,isLoadingError:C&&!E,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:C&&E,isStale:ti(t,n),refetch:this.refetch,promise:F(this,Nn)};if(this.options.experimental_prefetchInRender){const L=D=>{T.status==="error"?D.reject(T.error):T.data!==void 0&&D.resolve(T.data)},N=()=>{const D=K(this,Nn,T.promise=Ua());L(D)},k=F(this,Nn);switch(k.status){case"pending":t.queryHash===r.queryHash&&L(k);break;case"fulfilled":(T.status==="error"||T.data!==k.value)&&N();break;case"rejected":(T.status!=="error"||T.error!==k.reason)&&N();break}}return T}updateResult(t){const n=F(this,ut),r=this.createResult(F(this,xe),this.options);if(K(this,gr,F(this,xe).state),K(this,Kr,this.options),F(this,gr).data!==void 0&&K(this,to,F(this,xe)),ss(r,n))return;K(this,ut,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,no).size)return!0;const c=new Set(i??F(this,no));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,ut)).some(l=>{const f=l;return F(this,ut)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),be(this,ke,Kp).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,ke,Cl).call(this)}},yt=new WeakMap,xe=new WeakMap,Wo=new WeakMap,ut=new WeakMap,gr=new WeakMap,Kr=new WeakMap,Nn=new WeakMap,an=new WeakMap,Zo=new WeakMap,eo=new WeakMap,to=new WeakMap,mr=new WeakMap,br=new WeakMap,Rn=new WeakMap,no=new WeakMap,ke=new WeakSet,Qo=function(t){be(this,ke,El).call(this);let n=F(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ft)),n},ml=function(){be(this,ke,xl).call(this);const t=vr(this.options.staleTime,F(this,xe));if(Xn||F(this,ut).isStale||!za(t))return;const r=Dl(F(this,ut).dataUpdatedAt,t)+1;K(this,mr,setTimeout(()=>{F(this,ut).isStale||this.updateResult()},r))},bl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,xe)):this.options.refetchInterval)??!1},yl=function(t){be(this,ke,vl).call(this),K(this,Rn,t),!(Xn||Nt(this.options.enabled,F(this,xe))===!1||!za(F(this,Rn))||F(this,Rn)===0)&&K(this,br,setInterval(()=>{(this.options.refetchIntervalInBackground||Qa.isFocused())&&be(this,ke,Qo).call(this)},F(this,Rn)))},Cl=function(){be(this,ke,ml).call(this),be(this,ke,yl).call(this,be(this,ke,bl).call(this))},xl=function(){F(this,mr)&&(clearTimeout(F(this,mr)),K(this,mr,void 0))},vl=function(){F(this,br)&&(clearInterval(F(this,br)),K(this,br,void 0))},El=function(){const t=F(this,yt).getQueryCache().build(F(this,yt),this.options);if(t===F(this,xe))return;const n=F(this,xe);K(this,xe,t),K(this,Wo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Kp=function(t){$e.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,ut))}),F(this,yt).getQueryCache().notify({query:F(this,xe),type:"observerResultsUpdated"})})},$p);function L2(e,t){return Nt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Yl(e,t){return L2(e,t)||e.state.data!==void 0&&ei(e,t,t.refetchOnMount)}function ei(e,t,n){if(Nt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ti(e,t)}return!1}function Jl(e,t,n,r){return(e!==t||Nt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ti(e,n)}function ti(e,t){return Nt(t.enabled,e)!==!1&&e.isStaleByTime(vr(t.staleTime,e))}function O2(e,t){return!ss(e.getCurrentResult(),t)}var F2=(Qp=class extends xr{constructor(n,r){super();le(this,yn);le(this,Mn);le(this,Pn);le(this,Ct);le(this,bn);K(this,Mn,n),this.setOptions(r),this.bindMethods(),be(this,yn,Ba).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,Mn).defaultMutationOptions(n),ss(this.options,r)||F(this,Mn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,Ct),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&zn(r.mutationKey)!==zn(this.options.mutationKey)?this.reset():((o=F(this,Ct))==null?void 0:o.state.status)==="pending"&&F(this,Ct).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,Ct))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,yn,Ba).call(this),be(this,yn,Il).call(this,n)}getCurrentResult(){return F(this,Pn)}reset(){var n;(n=F(this,Ct))==null||n.removeObserver(this),K(this,Ct,void 0),be(this,yn,Ba).call(this),be(this,yn,Il).call(this)}mutate(n,r){var o;return K(this,bn,r),(o=F(this,Ct))==null||o.removeObserver(this),K(this,Ct,F(this,Mn).getMutationCache().build(F(this,Mn),this.options)),F(this,Ct).addObserver(this),F(this,Ct).execute(n)}},Mn=new WeakMap,Pn=new WeakMap,Ct=new WeakMap,bn=new WeakMap,yn=new WeakSet,Ba=function(){var r;const n=((r=F(this,Ct))==null?void 0:r.state)??Zl();K(this,Pn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Il=function(n){$e.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,bn)&&this.hasListeners()){const g=F(this,Pn).variables,y=F(this,Pn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,bn)).onSuccess)==null||o.call(r,n.data,g,y),(a=(s=F(this,bn)).onSettled)==null||a.call(s,n.data,null,g,y)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,bn)).onError)==null||c.call(i,n.error,g,y),(f=(l=F(this,bn)).onSettled)==null||f.call(l,void 0,n.error,g,y))}this.listeners.forEach(g=>{g(F(this,Pn))})})},Qp),ql=A.createContext(void 0),ho=e=>{const t=A.useContext(ql);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},k2=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(ql.Provider,{value:e,children:t})),$l=A.createContext(!1),D2=()=>A.useContext($l);$l.Provider;function N2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var R2=A.createContext(N2()),M2=()=>A.useContext(R2);function Ql(e,t){return typeof e=="function"?e(...t):!!e}function ni(){}var P2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},j2=e=>{A.useEffect(()=>{e.clearReset()},[e])},B2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ql(n,[e.error,r])),V2=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},G2=(e,t)=>e.isLoading&&e.isFetching&&!t,H2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ul=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function W2(e,t,n){var g,y,v,b,p;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=ho(),o=D2(),s=M2(),a=r.defaultQueryOptions(e);(y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",V2(a),P2(a,s),j2(s);const i=!r.getQueryCache().get(a.queryHash),[c]=A.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(h=>{const m=f?c.subscribe($e.batchCalls(h)):ni;return c.updateResult(),m},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),H2(a,l))throw Ul(a,c,s);if(B2({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((b=(v=r.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||b.call(v,a,l),a.experimental_prefetchInRender&&!Xn&&G2(l,o)){const h=i?Ul(a,c,s):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;h==null||h.catch(ni).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Er(e,t){return W2(e,A2)}function Yt(e,t){const n=ho(),[r]=A.useState(()=>new F2(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const o=A.useSyncExternalStore(A.useCallback(a=>r.subscribe($e.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=A.useCallback((a,i)=>{r.mutate(a,i).catch(ni)},[r]);if(o.error&&Ql(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const ri=(e,t)=>t.some(n=>e instanceof n);let Kl,eu;function Z2(){return Kl||(Kl=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function X2(){return eu||(eu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const oi=new WeakMap,si=new WeakMap,ls=new WeakMap;function z2(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(Yn(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return ls.set(t,e),t}function Y2(e){if(oi.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),o()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});oi.set(e,t)}let ai={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return oi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Yn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function tu(e){ai=e(ai)}function J2(e){return X2().includes(e)?function(...t){return e.apply(ii(this),t),Yn(this.request)}:function(...t){return Yn(e.apply(ii(this),t))}}function q2(e){return typeof e=="function"?J2(e):(e instanceof IDBTransaction&&Y2(e),ri(e,Z2())?new Proxy(e,ai):e)}function Yn(e){if(e instanceof IDBRequest)return z2(e);if(si.has(e))return si.get(e);const t=q2(e);return t!==e&&(si.set(e,t),ls.set(t,e)),t}const ii=e=>ls.get(e);function $2(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=Yn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Yn(a.result),c.oldVersion,c.newVersion,Yn(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const Q2=["get","getKey","getAll","getAllKeys","count"],U2=["put","add","delete","clear"],ci=new Map;function nu(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ci.get(t))return ci.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=U2.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||Q2.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[n](...i),o&&c.done]))[0]};return ci.set(t,s),s}tu(e=>({...e,get:(t,n,r)=>nu(t,n)||e.get(t,n,r),has:(t,n)=>!!nu(t,n)||e.has(t,n)}));const K2=["continue","continuePrimaryKey","advance"],ru={},li=new WeakMap,ou=new WeakMap,eh={get(e,t){if(!K2.includes(t))return e[t];let n=ru[t];return n||(n=ru[t]=function(...r){li.set(this,ou.get(this)[t](...r))}),n}};async function*th(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,eh);for(ou.set(n,t),ls.set(n,ii(t));t;)yield n,t=await(li.get(n)||t.continue()),li.delete(n)}function su(e,t){return t===Symbol.asyncIterator&&ri(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ri(e,[IDBIndex,IDBObjectStore])}tu(e=>({...e,get(t,n,r){return su(t,n)?th:e.get(t,n,r)},has(t,n){return su(t,n)||e.has(t,n)}}));const nh="connector-db",rh=1,us={FEEDBACK:"feedback"},go=`${us.FEEDBACK}:data`,ds=`${us.FEEDBACK}:last_submitted`,mo=`${us.FEEDBACK}:capture_on_demand`,bo=`${us.FEEDBACK}:show_notification`,oh=12*60*60*1e3,ui=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=oh:!0,au=(e,t=!1)=>e.captureFeedback&&(ui(e.firstViewed)&&(!e.lastSubmittedFeedback||ui(e.lastSubmittedFeedback))||!!t);let Jn=null;const En=async()=>{try{Jn||(Jn=await $2(nh,rh,{upgrade(e){e.objectStoreNames.contains(go)||e.createObjectStore(go),e.objectStoreNames.contains(ds)||e.createObjectStore(ds),e.objectStoreNames.contains(mo)||e.createObjectStore(mo),e.objectStoreNames.contains(bo)||e.createObjectStore(bo)},blocked(){console.warn("Upgrade blocked! Close other tabs using this DB.")},blocking(){console.warn("Another tab is trying to upgrade. Closing connection to allow upgrade."),Jn&&(Jn.close(),Jn=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Jn=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Jn},di=async e=>{if(!e)return[];const t=await En();if(!t)return[];try{return await t.get(go,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},sh=async e=>{if(!e)return null;const t=await En();if(!t)return null;try{return await t.get(ds,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},fs=async e=>{if(!e)return;const t=await En();if(t)try{return await t.get(mo,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},ah=async e=>{if(!e)return!1;const t=await En();if(!t)return!1;try{return await t.get(bo,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},ih=async(e,t)=>{if(!e||!t||!t.length)return;const n=await En();if(n)try{const r=await di(e),o=new Set(r.map(a=>a.connectorId)),s=t.filter(a=>!o.has(a.connector_id)).map(a=>({connectorId:a.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const a=[...r,...s];await n.put(go,a,e),await n.put(bo,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},ch=async e=>{if(!e)return;const t=await En();if(t)try{const n=await di(e),r=await fs(e),o=new Date,s=n.map(a=>{const i=au(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(go,s,e),await t.put(ds,o,e),r&&await t.put(mo,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},iu=async(e,t)=>{if(!e)return;const n=await En();if(n)try{await n.put(mo,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},lh=async e=>{if(!e)return;const t=await En();if(t)try{await t.put(bo,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},uh=async e=>{const t=await di(e),n=await fs(e);return t.filter(o=>au(o,n))},fi=async e=>{const t=await sh(e);return t&&!ui(t)?!1:await fs(e)&&!t?!0:!!(await uh(e)).length},dh=async(e,t)=>{await ih(e,t)},ps=async e=>{e&&await ch(e)},fh=async(e,t)=>{const n=await fs(e);t?n!==!1&&await iu(e,t):await iu(e,void 0)},cu=async e=>await ah(e)&&await fi(e),lu=async e=>{await lh(e)};var pi={},qn={};function uu(e,t){return function(){return e.apply(t,arguments)}}const{toString:ph}=Object.prototype,{getPrototypeOf:hi}=Object,hs=(e=>t=>{const n=ph.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=e=>(e=e.toLowerCase(),t=>hs(t)===e),gs=e=>t=>typeof t===e,{isArray:Ir}=Array,yo=gs("undefined");function hh(e){return e!==null&&!yo(e)&&e.constructor!==null&&!yo(e.constructor)&&It(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const du=Rt("ArrayBuffer");function gh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&du(e.buffer),t}const mh=gs("string"),It=gs("function"),fu=gs("number"),ms=e=>e!==null&&typeof e=="object",bh=e=>e===!0||e===!1,bs=e=>{if(hs(e)!=="object")return!1;const t=hi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},yh=Rt("Date"),Ch=Rt("File"),xh=Rt("Blob"),vh=Rt("FileList"),Eh=e=>ms(e)&&It(e.pipe),Ih=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||It(e.append)&&((t=hs(e))==="formdata"||t==="object"&&It(e.toString)&&e.toString()==="[object FormData]"))},wh=Rt("URLSearchParams"),[_h,Sh,Th,Ah]=["ReadableStream","Request","Response","Headers"].map(Rt),Lh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Co(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Ir(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function pu(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const $n=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:pe,hu=e=>!yo(e)&&e!==$n;function gi(){const{caseless:e}=hu(this)&&this||{},t={},n=(r,o)=>{const s=e&&pu(t,o)||o;bs(t[s])&&bs(r)?t[s]=gi(t[s],r):bs(r)?t[s]=gi({},r):Ir(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Co(arguments[r],n);return t}const Oh=(e,t,n,{allOwnKeys:r}={})=>(Co(t,(o,s)=>{n&&It(o)?e[s]=uu(o,n):e[s]=o},{allOwnKeys:r}),e),Fh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Dh=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&hi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Nh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Rh=e=>{if(!e)return null;if(Ir(e))return e;let t=e.length;if(!fu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Mh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&hi(Uint8Array)),Ph=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},jh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Bh=Rt("HTMLFormElement"),Vh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),gu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Gh=Rt("RegExp"),mu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Co(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Hh=e=>{mu(e,(t,n)=>{if(It(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(It(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Wh=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Ir(e)?r(e):r(String(e).split(t)),n},Zh=()=>{},Xh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,mi="abcdefghijklmnopqrstuvwxyz",bu="0123456789",yu={DIGIT:bu,ALPHA:mi,ALPHA_DIGIT:mi+mi.toUpperCase()+bu},zh=(e=16,t=yu.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Yh(e){return!!(e&&It(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Jh=e=>{const t=new Array(10),n=(r,o)=>{if(ms(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Ir(r)?[]:{};return Co(r,(a,i)=>{const c=n(a,o+1);!yo(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},qh=Rt("AsyncFunction"),$h=e=>e&&(ms(e)||It(e))&&It(e.then)&&It(e.catch),Cu=((e,t)=>e?setImmediate:t?((n,r)=>($n.addEventListener("message",({source:o,data:s})=>{o===$n&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),$n.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",It($n.postMessage)),Qh=typeof queueMicrotask<"u"?queueMicrotask.bind($n):typeof process<"u"&&process.nextTick||Cu;var M={isArray:Ir,isArrayBuffer:du,isBuffer:hh,isFormData:Ih,isArrayBufferView:gh,isString:mh,isNumber:fu,isBoolean:bh,isObject:ms,isPlainObject:bs,isReadableStream:_h,isRequest:Sh,isResponse:Th,isHeaders:Ah,isUndefined:yo,isDate:yh,isFile:Ch,isBlob:xh,isRegExp:Gh,isFunction:It,isStream:Eh,isURLSearchParams:wh,isTypedArray:Mh,isFileList:vh,forEach:Co,merge:gi,extend:Oh,trim:Lh,stripBOM:Fh,inherits:kh,toFlatObject:Dh,kindOf:hs,kindOfTest:Rt,endsWith:Nh,toArray:Rh,forEachEntry:Ph,matchAll:jh,isHTMLForm:Bh,hasOwnProperty:gu,hasOwnProp:gu,reduceDescriptors:mu,freezeMethods:Hh,toObjectSet:Wh,toCamelCase:Vh,noop:Zh,toFiniteNumber:Xh,findKey:pu,global:$n,isContextDefined:hu,ALPHABET:yu,generateString:zh,isSpecCompliantForm:Yh,toJSONObject:Jh,isAsyncFn:qh,isThenable:$h,setImmediate:Cu,asap:Qh};function he(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}M.inherits(he,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:M.toJSONObject(this.config),code:this.code,status:this.status}}});const xu=he.prototype,vu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vu[e]={value:e}}),Object.defineProperties(he,vu),Object.defineProperty(xu,"isAxiosError",{value:!0}),he.from=(e,t,n,r,o,s)=>{const a=Object.create(xu);return M.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),he.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var Uh=null;function bi(e){return M.isPlainObject(e)||M.isArray(e)}function Eu(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function Iu(e,t,n){return e?e.concat(t).map(function(o,s){return o=Eu(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Kh(e){return M.isArray(e)&&!e.some(bi)}const eg=M.toFlatObject(M,{},null,function(t){return/^is[A-Z]/.test(t)});function ys(e,t,n){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=M.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!M.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function l(b){if(b===null)return"";if(M.isDate(b))return b.toISOString();if(!c&&M.isBlob(b))throw new he("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(b)||M.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,p,h){let m=b;if(b&&!h&&typeof b=="object"){if(M.endsWith(p,"{}"))p=r?p:p.slice(0,-2),b=JSON.stringify(b);else if(M.isArray(b)&&Kh(b)||(M.isFileList(b)||M.endsWith(p,"[]"))&&(m=M.toArray(b)))return p=Eu(p),m.forEach(function(C,I){!(M.isUndefined(C)||C===null)&&t.append(a===!0?Iu([p],I,s):a===null?p:p+"[]",l(C))}),!1}return bi(b)?!0:(t.append(Iu(h,p,s),l(b)),!1)}const g=[],y=Object.assign(eg,{defaultVisitor:f,convertValue:l,isVisitable:bi});function v(b,p){if(!M.isUndefined(b)){if(g.indexOf(b)!==-1)throw Error("Circular reference detected in "+p.join("."));g.push(b),M.forEach(b,function(m,x){(!(M.isUndefined(m)||m===null)&&o.call(t,m,M.isString(x)?x.trim():x,p,y))===!0&&v(m,p?p.concat(x):[x])}),g.pop()}}if(!M.isObject(e))throw new TypeError("data must be an object");return v(e),t}function wu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function yi(e,t){this._pairs=[],e&&ys(e,this,t)}const _u=yi.prototype;_u.append=function(t,n){this._pairs.push([t,n])},_u.toString=function(t){const n=t?function(r){return t.call(this,r,wu)}:wu;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function tg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Su(e,t,n){if(!t)return e;const r=n&&n.encode||tg,o=n&&n.serialize;let s;if(o?s=o(t,n):s=M.isURLSearchParams(t)?t.toString():new yi(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class ng{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){M.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Tu=ng,Au={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},rg=typeof URLSearchParams<"u"?URLSearchParams:yi,og=typeof FormData<"u"?FormData:null,sg=typeof Blob<"u"?Blob:null,ag={isBrowser:!0,classes:{URLSearchParams:rg,FormData:og,Blob:sg},protocols:["http","https","file","blob","url","data"]};const Ci=typeof window<"u"&&typeof document<"u",xi=typeof navigator=="object"&&navigator||void 0,ig=Ci&&(!xi||["ReactNative","NativeScript","NS"].indexOf(xi.product)<0),cg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lg=Ci&&window.location.href||"http://localhost";var ug=Object.freeze({__proto__:null,hasBrowserEnv:Ci,hasStandardBrowserWebWorkerEnv:cg,hasStandardBrowserEnv:ig,navigator:xi,origin:lg}),ft={...ug,...ag};function dg(e,t){return ys(e,new ft.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ft.isNode&&M.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function fg(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function pg(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Lu(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=s>=n.length;return a=!a&&M.isArray(o)?o.length:a,c?(M.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!M.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&M.isArray(o[a])&&(o[a]=pg(o[a])),!i)}if(M.isFormData(e)&&M.isFunction(e.entries)){const n={};return M.forEachEntry(e,(r,o)=>{t(fg(r),o,n,0)}),n}return null}function hg(e,t,n){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const vi={transitional:Au,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=M.isObject(t);if(s&&M.isHTMLForm(t)&&(t=new FormData(t)),M.isFormData(t))return o?JSON.stringify(Lu(t)):t;if(M.isArrayBuffer(t)||M.isBuffer(t)||M.isStream(t)||M.isFile(t)||M.isBlob(t)||M.isReadableStream(t))return t;if(M.isArrayBufferView(t))return t.buffer;if(M.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return dg(t,this.formSerializer).toString();if((i=M.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ys(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),hg(t)):t}],transformResponse:[function(t){const n=this.transitional||vi.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(M.isResponse(t)||M.isReadableStream(t))return t;if(t&&M.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?he.from(i,he.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],e=>{vi.headers[e]={}});var Ei=vi;const gg=M.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var mg=e=>{const t={};let n,r,o;return e&&e.split(`
31
- `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&gg[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Ou=Symbol("internals");function xo(e){return e&&String(e).trim().toLowerCase()}function Cs(e){return e===!1||e==null?e:M.isArray(e)?e.map(Cs):String(e)}function bg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const yg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ii(e,t,n,r,o){if(M.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!M.isString(t)){if(M.isString(r))return t.indexOf(r)!==-1;if(M.isRegExp(r))return r.test(t)}}function Cg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function xg(e,t){const n=M.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}class xs{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=xo(c);if(!f)throw new Error("header name must be a non-empty string");const g=M.findKey(o,f);(!g||o[g]===void 0||l===!0||l===void 0&&o[g]!==!1)&&(o[g||c]=Cs(i))}const a=(i,c)=>M.forEach(i,(l,f)=>s(l,f,c));if(M.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(M.isString(t)&&(t=t.trim())&&!yg(t))a(mg(t),n);else if(M.isHeaders(t))for(const[i,c]of t.entries())s(c,i,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=xo(t),t){const r=M.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return bg(o);if(M.isFunction(n))return n.call(this,o,r);if(M.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=xo(t),t){const r=M.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ii(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=xo(a),a){const i=M.findKey(r,a);i&&(!n||Ii(r,r[i],i,n))&&(delete r[i],o=!0)}}return M.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Ii(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return M.forEach(this,(o,s)=>{const a=M.findKey(r,s);if(a){n[a]=Cs(o),delete n[s];return}const i=t?Cg(s):String(s).trim();i!==s&&delete n[s],n[i]=Cs(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return M.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&M.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
32
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ou]=this[Ou]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=xo(a);r[i]||(xg(o,a),r[i]=!0)}return M.isArray(t)?t.forEach(s):s(t),this}}xs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(xs.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),M.freezeMethods(xs);var Mt=xs;function wi(e,t){const n=this||Ei,r=t||n,o=Mt.from(r.headers);let s=r.data;return M.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Fu(e){return!!(e&&e.__CANCEL__)}function wr(e,t,n){he.call(this,e??"canceled",he.ERR_CANCELED,t,n),this.name="CanceledError"}M.inherits(wr,he,{__CANCEL__:!0});function ku(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new he("Request failed with status code "+n.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function vg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Eg(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[s];a||(a=l),n[o]=c,r[o]=l;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const v=f&&l-f;return v?Math.round(y*1e3/v):void 0}}function Ig(e,t){let n=0,r=1e3/t,o,s;const a=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),g=f-n;g>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const vs=(e,t,n=3)=>{let r=0;const o=Eg(50,250);return Ig(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const g={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&f?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},Du=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Nu=e=>(...t)=>M.asap(()=>e(...t));var wg=ft.hasStandardBrowserEnv?function(){const t=ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const i=M.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),_g=ft.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];M.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),M.isString(r)&&a.push("path="+r),M.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Sg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Tg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ru(e,t){return e&&!Sg(t)?Tg(e,t):t}const Mu=e=>e instanceof Mt?{...e}:e;function Qn(e,t){t=t||{};const n={};function r(l,f,g){return M.isPlainObject(l)&&M.isPlainObject(f)?M.merge.call({caseless:g},l,f):M.isPlainObject(f)?M.merge({},f):M.isArray(f)?f.slice():f}function o(l,f,g){if(M.isUndefined(f)){if(!M.isUndefined(l))return r(void 0,l,g)}else return r(l,f,g)}function s(l,f){if(!M.isUndefined(f))return r(void 0,f)}function a(l,f){if(M.isUndefined(f)){if(!M.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function i(l,f,g){if(g in t)return r(l,f);if(g in e)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,f)=>o(Mu(l),Mu(f),!0)};return M.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=c[f]||o,y=g(e[f],t[f],f);M.isUndefined(y)&&g!==i||(n[f]=y)}),n}var Pu=e=>{const t=Qn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Mt.from(a),t.url=Su(Ru(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(M.isFormData(n)){if(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(ft.hasStandardBrowserEnv&&(r&&M.isFunction(r)&&(r=r(t)),r||r!==!1&&wg(t.url))){const l=o&&s&&_g.read(s);l&&a.set(o,l)}return t},Ag=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Pu(e);let s=o.data;const a=Mt.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,g,y,v,b;function p(){v&&v(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function m(){if(!h)return;const C=Mt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:e,request:h};ku(function(T){n(T),p()},function(T){r(T),p()},E),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(m)},h.onabort=function(){h&&(r(new he("Request aborted",he.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new he("Network Error",he.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Au;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new he(I,E.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&M.forEach(a.toJSON(),function(I,E){h.setRequestHeader(E,I)}),M.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),l&&([y,b]=vs(l,!0),h.addEventListener("progress",y)),c&&h.upload&&([g,v]=vs(c),h.upload.addEventListener("progress",g),h.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(f=C=>{h&&(r(!C||C.type?new wr(null,e,h):C),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=vg(o.url);if(x&&ft.protocols.indexOf(x)===-1){r(new he("Unsupported protocol "+x+":",he.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Lg=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,i();const f=l instanceof Error?l:this.reason;r.abort(f instanceof he?f:new wr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new he(`timeout ${t} of ms exceeded`,he.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>M.asap(i),c}};const Og=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Fg=async function*(e,t){for await(const n of kg(e))yield*Og(n,t)},kg=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ju=(e,t,n,r)=>{const o=Fg(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){i(),c.close();return}let g=f.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Es=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Bu=Es&&typeof ReadableStream=="function",Dg=Es&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Vu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Ng=Bu&&Vu(()=>{let e=!1;const t=new Request(ft.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Gu=64*1024,_i=Bu&&Vu(()=>M.isReadableStream(new Response("").body)),Is={stream:_i&&(e=>e.body)};Es&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Is[t]&&(Is[t]=M.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new he(`Response type '${t}' is not supported`,he.ERR_NOT_SUPPORT,r)})})})(new Response);const Rg=async e=>{if(e==null)return 0;if(M.isBlob(e))return e.size;if(M.isSpecCompliantForm(e))return(await new Request(ft.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(M.isArrayBufferView(e)||M.isArrayBuffer(e))return e.byteLength;if(M.isURLSearchParams(e)&&(e=e+""),M.isString(e))return(await Dg(e)).byteLength},Mg=async(e,t)=>{const n=M.toFiniteNumber(e.getContentLength());return n??Rg(t)};var Pg=Es&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:g="same-origin",fetchOptions:y}=Pu(e);l=l?(l+"").toLowerCase():"text";let v=Lg([o,s&&s.toAbortSignal()],a),b;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let h;try{if(c&&Ng&&n!=="get"&&n!=="head"&&(h=await Mg(f,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(M.isFormData(r)&&(_=E.headers.get("content-type"))&&f.setContentType(_),E.body){const[T,S]=Du(h,vs(Nu(c)));r=ju(E.body,Gu,T,S)}}M.isString(g)||(g=g?"include":"omit");const m="credentials"in Request.prototype;b=new Request(t,{...y,signal:v,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:m?g:void 0});let x=await fetch(b);const C=_i&&(l==="stream"||l==="response");if(_i&&(i||C&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=x[L]});const _=M.toFiniteNumber(x.headers.get("content-length")),[T,S]=i&&Du(_,vs(Nu(i),!0))||[];x=new Response(ju(x.body,Gu,T,()=>{S&&S(),p&&p()}),E)}l=l||"text";let I=await Is[M.findKey(Is,l)||"text"](x,e);return!C&&p&&p(),await new Promise((E,_)=>{ku(E,_,{data:I,headers:Mt.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:b})})}catch(m){throw p&&p(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new he("Network Error",he.ERR_NETWORK,e,b),{cause:m.cause||m}):he.from(m,m&&m.code,e,b)}});const Si={http:Uh,xhr:Ag,fetch:Pg};M.forEach(Si,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Hu=e=>`- ${e}`,jg=e=>M.isFunction(e)||e===null||e===!1;var Wu={getAdapter:e=>{e=M.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!jg(n)&&(r=Si[(a=String(n)).toLowerCase()],r===void 0))throw new he(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,c])=>`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
30
+ <%s key={someKey} {...props} />`,hl,Cr,HS,Cr),qo[Cr+hl]=!0}}return O===r?dl($e):Ra($e),$e}}function fl(O,W,Q){return $o(O,W,Q,!0)}function Ma(O,W,Q){return $o(O,W,Q,!1)}var pl=Ma,Qo=fl;ao.Fragment=r,ao.jsx=pl,ao.jsxs=Qo}()),ao}process.env.NODE_ENV==="production"?Va.exports=t2():Va.exports=n2();var u=Va.exports;function Sl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Sl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function vn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sl(e))&&(r&&(r+=" "),r+=t);return r}const io=e=>typeof e=="number"&&!isNaN(e),Vn=e=>typeof e=="string",wt=e=>typeof e=="function",es=e=>Vn(e)||wt(e)?e:null,Ga=e=>w.isValidElement(e)||Vn(e)||wt(e)||io(e);function r2(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function ts(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(a){let{children:i,position:c,preventExitTransition:l,done:f,nodeRef:g,isIn:y,playToast:v}=a;const b=r?`${t}--${c}`:t,p=r?`${n}--${c}`:n,h=w.useRef(0);return w.useLayoutEffect(()=>{const m=g.current,x=b.split(" "),C=I=>{I.target===g.current&&(v(),m.removeEventListener("animationend",C),m.removeEventListener("animationcancel",C),h.current===0&&I.type!=="animationcancel"&&m.classList.remove(...x))};m.classList.add(...x),m.addEventListener("animationend",C),m.addEventListener("animationcancel",C)},[]),w.useEffect(()=>{const m=g.current,x=()=>{m.removeEventListener("animationend",x),o?r2(m,f,s):f()};y||(l?x():(h.current=1,m.className+=` ${p}`,m.addEventListener("animationend",x)))},[y]),w.createElement(w.Fragment,null,i)}}function Tl(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const it=new Map;let co=[];const Ha=new Set,o2=e=>Ha.forEach(t=>t(e)),Al=()=>it.size>0;function Ll(e,t){var n;if(t)return!((n=it.get(t))==null||!n.isToastActive(e));let r=!1;return it.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Ol(e,t){Ga(e)&&(Al()||co.push({content:e,options:t}),it.forEach(n=>{n.buildToast(e,t)}))}function Fl(e,t){it.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function s2(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,g,y){let v=1,b=0,p=[],h=[],m=[],x=g;const C=new Map,I=new Set,E=()=>{m=Array.from(C.values()),I.forEach(S=>S())},_=S=>{h=S==null?[]:h.filter(L=>L!==S),E()},T=S=>{const{toastId:L,onOpen:N,updateId:k,children:D}=S.props,M=k==null;S.staleId&&C.delete(S.staleId),C.set(L,S),h=[...h,S.props.toastId].filter(V=>V!==S.staleId),E(),y(Tl(S,M?"added":"updated")),M&&wt(N)&&N(w.isValidElement(D)&&D.props)};return{id:f,props:x,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{C.forEach(N=>{L!=null&&L!==N.props.toastId||wt(N.toggle)&&N.toggle(S)})},removeToast:_,toasts:C,clearQueue:()=>{b-=p.length,p=[]},buildToast:(S,L)=>{if((B=>{let{containerId:P,toastId:G,updateId:H}=B;const Y=P?P!==f:f!==1,re=C.has(G)&&H==null;return Y||re})(L))return;const{toastId:N,updateId:k,data:D,staleId:M,delay:V}=L,z=()=>{_(N)},q=k==null;q&&b++;const $={...x,style:x.toastStyle,key:v++,...Object.fromEntries(Object.entries(L).filter(B=>{let[P,G]=B;return G!=null})),toastId:N,updateId:k,data:D,closeToast:z,isIn:!1,className:es(L.className||x.toastClassName),bodyClassName:es(L.bodyClassName||x.bodyClassName),progressClassName:es(L.progressClassName||x.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,J=x.autoClose,X===!1||io(X)&&X>0?X:J),deleteToast(){const B=C.get(N),{onClose:P,children:G}=B.props;wt(P)&&P(w.isValidElement(G)&&G.props),y(Tl(B,"removed")),C.delete(N),b--,b<0&&(b=0),p.length>0?T(p.shift()):E()}};var X,J;$.closeButton=x.closeButton,L.closeButton===!1||Ga(L.closeButton)?$.closeButton=L.closeButton:L.closeButton===!0&&($.closeButton=!Ga(x.closeButton)||x.closeButton);let oe=S;w.isValidElement(S)&&!Vn(S.type)?oe=w.cloneElement(S,{closeToast:z,toastProps:$,data:D}):wt(S)&&(oe=S({closeToast:z,toastProps:$,data:D}));const ae={content:oe,props:$,staleId:M};x.limit&&x.limit>0&&b>x.limit&&q?p.push(ae):io(V)?setTimeout(()=>{T(ae)},V):T(ae)},setProps(S){x=S},setToggle:(S,L)=>{C.get(S).toggle=L},isToastActive:S=>h.some(L=>L===S),getSnapshot:()=>x.newestOnTop?m.reverse():m}}(a,s,o2);it.set(a,c);const l=c.observe(i);return co.forEach(f=>Ol(f.content,f.options)),co=[],()=>{l(),it.delete(a)}},setProps(i){var c;(c=it.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=it.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=w.useSyncExternalStore(t,n,n);return{getToastToRender:function(s){if(!o)return[];const a=new Map;return o.forEach(i=>{const{position:c}=i.props;a.has(c)||a.set(c,[]),a.get(c).push(i)}),Array.from(a,i=>s(i[0],i[1]))},isToastActive:Ll,count:o==null?void 0:o.length}}function a2(e){const[t,n]=w.useState(!1),[r,o]=w.useState(!1),s=w.useRef(null),a=w.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:g}=e;var y,v;function b(){n(!0)}function p(){n(!1)}function h(C){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?C.clientX-a.start:C.clientY-a.start,a.start!==C.clientX&&(a.canCloseOnClick=!1),I.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,I.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function m(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",m);const C=s.current;if(a.canDrag&&a.didMove&&C){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}(v=it.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||v.setToggle(y.id,y.fn),w.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",b),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",b),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const x={onPointerDown:function(C){if(e.draggable===!0||e.draggable===C.pointerType){a.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",m);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=C.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=C.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(C){const{top:I,bottom:E,left:_,right:T}=s.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=_&&C.clientX<=T&&C.clientY>=I&&C.clientY<=E?p():b()}};return i&&c&&(x.onMouseEnter=p,e.stacked||(x.onMouseLeave=b)),g&&(x.onClick=C=>{f&&f(C),a.canCloseOnClick&&l()}),{playToast:b,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:x}}function i2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:g,theme:y}=e;const v=s||c&&l===0,b={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(b.transform=`scaleX(${l})`);const p=vn("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${y}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),h=wt(a)?a({rtl:f,type:o,defaultClassName:p}):vn(p,a),m={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{g&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:h,style:b,...m}))}let c2=1;const kl=()=>""+c2++;function l2(e){return e&&(Vn(e.toastId)||io(e.toastId))?e.toastId:kl()}function lo(e,t){return Ol(e,t),t.toastId}function ns(e,t){return{...t,type:t&&t.type||e,toastId:l2(t)}}function rs(e){return(t,n)=>lo(t,ns(e,n))}function Le(e,t){return lo(e,ns("default",t))}Le.loading=(e,t)=>lo(e,ns("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Le.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=Vn(o)?Le.loading(o,n):Le.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,g,y)=>{if(g==null)return void Le.dismiss(r);const v={type:f,...i,...n,data:y},b=Vn(g)?{render:g}:g;return r?Le.update(r,{...v,...b}):Le(b.render,{...v,...b}),y},l=wt(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},Le.success=rs("success"),Le.info=rs("info"),Le.error=rs("error"),Le.warning=rs("warning"),Le.warn=Le.warning,Le.dark=(e,t)=>lo(e,ns("default",{theme:"dark",...t})),Le.dismiss=function(e){(function(t){var n;if(Al()){if(t==null||Vn(n=t)||io(n))it.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=it.get(t.containerId);r?r.removeToast(t.id):it.forEach(o=>{o.removeToast(t.id)})}}else co=co.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Le.clearWaitingQueue=function(e){e===void 0&&(e={}),it.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Le.isActive=Ll,Le.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=it.get(a||1))==null?void 0:s.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,s={delay:100,...r,...t,toastId:t.toastId||e,updateId:kl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,lo(a,s)}},Le.done=e=>{Le.update(e,{progress:1})},Le.onChange=function(e){return Ha.add(e),()=>{Ha.delete(e)}},Le.play=e=>Fl(!0,e),Le.pause=e=>Fl(!1,e);const u2=typeof window<"u"?w.useLayoutEffect:w.useEffect,os=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return w.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},Wa={info:function(e){return w.createElement(os,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return w.createElement(os,{...e},w.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return w.createElement(os,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return w.createElement(os,{...e},w.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return w.createElement("div",{className:"Toastify__spinner"})}},d2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=a2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:g,closeToast:y,transition:v,position:b,className:p,style:h,bodyClassName:m,bodyStyle:x,progressClassName:C,progressStyle:I,updateId:E,role:_,progress:T,rtl:S,toastId:L,deleteToast:N,isIn:k,isLoading:D,closeOnClick:M,theme:V}=e,z=vn("Toastify__toast",`Toastify__toast-theme--${V}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),q=wt(p)?p({rtl:S,position:b,type:f,defaultClassName:z}):vn(z,p),$=function(ae){let{theme:B,type:P,isLoading:G,icon:H}=ae,Y=null;const re={theme:B,type:P};return H===!1||(wt(H)?Y=H({...re,isLoading:G}):w.isValidElement(H)?Y=w.cloneElement(H,re):G?Y=Wa.spinner():(se=>se in Wa)(P)&&(Y=Wa[P](re))),Y}(e),X=!!T||!c,J={closeToast:y,type:f,theme:V};let oe=null;return a===!1||(oe=wt(a)?a(J):w.isValidElement(a)?w.cloneElement(a,J):function(ae){let{closeToast:B,theme:P,ariaLabel:G="close"}=ae;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${P}`,type:"button",onClick:H=>{H.stopPropagation(),B(H)},"aria-label":G},w.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},w.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(J)),w.createElement(v,{isIn:k,done:N,position:b,preventExitTransition:n,nodeRef:r,playToast:s},w.createElement("div",{id:L,onClick:l,"data-in":k,className:q,...o,style:h,ref:r},w.createElement("div",{...k&&{role:_},className:wt(m)?m({type:f}):vn("Toastify__toast-body",m),style:x},$!=null&&w.createElement("div",{className:vn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},$),w.createElement("div",null,i)),oe,w.createElement(i2,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:V,delay:c,isRunning:t,isIn:k,closeToast:y,hide:g,type:f,style:I,className:C,controlledProgress:X,progress:T||0})))},ss=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},f2=ts(ss("bounce",!0));ts(ss("slide",!0)),ts(ss("zoom")),ts(ss("flip"));const p2={position:"top-right",transition:f2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Za(e){let t={...p2,...e};const n=e.stacked,[r,o]=w.useState(!0),s=w.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=s2(t),{className:l,style:f,rtl:g,containerId:y}=t;function v(p){const h=vn("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":g});return wt(l)?l({position:p,rtl:g,defaultClassName:h}):vn(h,es(l))}function b(){n&&(o(!0),Le.play())}return u2(()=>{if(n){var p;const h=s.current.querySelectorAll('[data-in="true"]'),m=12,x=(p=t.position)==null?void 0:p.includes("top");let C=0,I=0;Array.from(h).reverse().forEach((E,_)=>{const T=E;T.classList.add("Toastify__toast--stacked"),_>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=x?"top":"bot");const S=C*(r?.2:1)+(r?0:m*_);T.style.setProperty("--y",`${x?S:-1*S}px`),T.style.setProperty("--g",`${m}`),T.style.setProperty("--s",""+(1-(r?I:0))),C+=T.offsetHeight,I+=.025})}},[r,c,n]),w.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),Le.pause())},onMouseLeave:b},a((p,h)=>{const m=h.length?{...f}:{...f,pointerEvents:"none"};return w.createElement("div",{className:v(p),style:m,key:`container-${p}`},h.map(x=>{let{content:C,props:I}=x;return w.createElement(d2,{...I,stacked:n,collapseAll:b,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},C)}))}))}var xr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Gn=typeof window>"u"||"Deno"in globalThis;function kt(){}function h2(e,t){return typeof e=="function"?e(t):e}function Xa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Dl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vr(e,t){return typeof e=="function"?e(t):e}function Mt(e,t){return typeof e=="function"?e(t):e}function Nl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==za(a,t.options))return!1}else if(!uo(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Rl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Hn(t.options.mutationKey)!==Hn(s))return!1}else if(!uo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function za(e,t){return((t==null?void 0:t.queryKeyHashFn)||Hn)(e)}function Hn(e){return JSON.stringify(e,(t,n)=>Ja(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function uo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!uo(e[n],t[n])):!1}function Ya(e,t){if(e===t)return e;const n=Ml(e)&&Ml(t);if(n||Ja(e)&&Ja(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let c=0;for(let l=0;l<a;l++){const f=n?l:s[l];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=Ya(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function as(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Ml(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ja(e){if(!Pl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Pl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Pl(e){return Object.prototype.toString.call(e)==="[object Object]"}function g2(e){return new Promise(t=>{setTimeout(t,e)})}function qa(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Ya(e,t)}catch(r){console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`)}return Ya(e,t)}return t}function m2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function b2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var is=Symbol();function jl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===is&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===is?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var y2=(Wp=class extends xr{constructor(){super();le(this,ir);le(this,Ln);le(this,Wr);U(this,Wr,t=>{if(!Gn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Ln)||this.setEventListener(F(this,Wr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Ln))==null||t.call(this),U(this,Ln,void 0))}setEventListener(t){var n;U(this,Wr,t),(n=F(this,Ln))==null||n.call(this),U(this,Ln,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,ir)!==t&&(U(this,ir,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,ir)=="boolean"?F(this,ir):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ir=new WeakMap,Ln=new WeakMap,Wr=new WeakMap,Wp),$a=new y2,C2=(Zp=class extends xr{constructor(){super();le(this,Zr,!0);le(this,On);le(this,Xr);U(this,Xr,t=>{if(!Gn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,On)||this.setEventListener(F(this,Xr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,On))==null||t.call(this),U(this,On,void 0))}setEventListener(t){var n;U(this,Xr,t),(n=F(this,On))==null||n.call(this),U(this,On,t(this.setOnline.bind(this)))}setOnline(t){F(this,Zr)!==t&&(U(this,Zr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,Zr)}},Zr=new WeakMap,On=new WeakMap,Xr=new WeakMap,Zp),cs=new C2;function Qa(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function x2(e){return Math.min(1e3*2**e,3e4)}function Bl(e){return(e??"online")==="online"?cs.isOnline():!0}var Vl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ua(e){return e instanceof Vl}function Gl(e){let t=!1,n=0,r=!1,o;const s=Qa(),a=p=>{var h;r||(y(new Vl(p)),(h=e.abort)==null||h.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>$a.isFocused()&&(e.networkMode==="always"||cs.isOnline())&&e.canRun(),f=()=>Bl(e.networkMode)&&e.canRun(),g=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),s.resolve(p))},y=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s.reject(p))},v=()=>new Promise(p=>{var h;o=m=>{(r||l())&&p(m)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),b=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(g).catch(m=>{var _;if(r)return;const x=e.retry??(Gn?0:3),C=e.retryDelay??x2,I=typeof C=="function"?C(n,m):C,E=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,m);if(t||!E){y(m);return}n++,(_=e.onFail)==null||_.call(e,n,m),g2(I).then(()=>l()?void 0:v()).then(()=>{t?y(m):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?b():v().then(b),s)}}function v2(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=i=>setTimeout(i,0);const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||a()}return c},batchCalls:i=>(...c)=>{s(()=>{i(...c)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var Qe=v2(),Hl=(Xp=class{constructor(){le(this,cr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Xa(this.gcTime)&&U(this,cr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gn?1/0:5*60*1e3))}clearGcTimeout(){F(this,cr)&&(clearTimeout(F(this,cr)),U(this,cr,void 0))}},cr=new WeakMap,Xp),E2=(zp=class extends Hl{constructor(t){super();le(this,zt);le(this,zr);le(this,Yr);le(this,Dt);le(this,lr);le(this,st);le(this,Bo);le(this,ur);U(this,ur,!1),U(this,Bo,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,lr,t.client),U(this,Dt,F(this,lr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,zr,I2(this.options)),this.state=t.state??F(this,zr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,st))==null?void 0:t.promise}setOptions(t){this.options={...F(this,Bo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Dt).remove(this)}setData(t,n){const r=qa(this.state.data,t,this.options);return ye(this,zt,xn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ye(this,zt,xn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,st))==null?void 0:r.promise;return(o=F(this,st))==null||o.cancel(t),n?n.then(kt).catch(kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,zr))}isActive(){return this.observers.some(t=>Mt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===is||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Dl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,st))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,st))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Dt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,st)&&(F(this,ur)?F(this,st).cancel({revert:!0}):F(this,st).cancelRetry()),this.scheduleGc()),F(this,Dt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,zt,xn).call(this,{type:"invalidate"})}fetch(t,n){var c,l,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,st))return F(this,st).continueRetry(),F(this,st).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(U(this,ur,!0),r.signal)})},s=()=>{const g=jl(this.options,n),y={client:F(this,lr),queryKey:this.queryKey,meta:this.meta};return o(y),U(this,ur,!1),this.options.persister?this.options.persister(g,y,this):g(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,lr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),U(this,Yr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&ye(this,zt,xn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=g=>{var y,v,b,p;Ua(g)&&g.silent||ye(this,zt,xn).call(this,{type:"error",error:g}),Ua(g)||((v=(y=F(this,Dt).config).onError)==null||v.call(y,g,this),(p=(b=F(this,Dt).config).onSettled)==null||p.call(b,this.state.data,g,this)),this.scheduleGc()};return U(this,st,Gl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var y,v,b,p;if(g===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(h){i(h);return}(v=(y=F(this,Dt).config).onSuccess)==null||v.call(y,g,this),(p=(b=F(this,Dt).config).onSettled)==null||p.call(b,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,y)=>{ye(this,zt,xn).call(this,{type:"failed",failureCount:g,error:y})},onPause:()=>{ye(this,zt,xn).call(this,{type:"pause"})},onContinue:()=>{ye(this,zt,xn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,st).start()}},zr=new WeakMap,Yr=new WeakMap,Dt=new WeakMap,lr=new WeakMap,st=new WeakMap,Bo=new WeakMap,ur=new WeakMap,zt=new WeakSet,xn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Wl(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Ua(o)&&o.revert&&F(this,Yr)?{...F(this,Yr),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Qe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Dt).notify({query:this,type:"updated",action:t})})},zp);function Wl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function I2(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var w2=(Yp=class extends xr{constructor(t={}){super();le(this,an);this.config=t,U(this,an,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??za(o,n);let a=this.get(s);return a||(a=new E2({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,an).has(t.queryHash)||(F(this,an).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,an).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,an).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,an).get(t)}getAll(){return[...F(this,an).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Nl(t,r)):n}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},an=new WeakMap,Yp),_2=(Jp=class extends Hl{constructor(t){super();le(this,ln);le(this,cn);le(this,ct);le(this,dr);this.mutationId=t.mutationId,U(this,ct,t.mutationCache),U(this,cn,[]),this.state=t.state||Zl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,cn).includes(t)||(F(this,cn).push(t),this.clearGcTimeout(),F(this,ct).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,cn,F(this,cn).filter(n=>n!==t)),this.scheduleGc(),F(this,ct).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,cn).length||(this.state.status==="pending"?this.scheduleGc():F(this,ct).remove(this))}continue(){var t;return((t=F(this,dr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,g,y,v,b,p,h,m,x,C,I,E,_,T;U(this,dr,Gl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{ye(this,ln,Bn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{ye(this,ln,Bn).call(this,{type:"pause"})},onContinue:()=>{ye(this,ln,Bn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ct).canRun(this)}));const n=this.state.status==="pending",r=!F(this,dr).canStart();try{if(!n){ye(this,ln,Bn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,ct).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&ye(this,ln,Bn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,dr).start();return await((l=(c=F(this,ct).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,S,t,this.state.context)),await((v=(y=F(this,ct).config).onSettled)==null?void 0:v.call(y,S,null,this.state.variables,this.state.context,this)),await((p=(b=this.options).onSettled)==null?void 0:p.call(b,S,null,t,this.state.context)),ye(this,ln,Bn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(h=F(this,ct).config).onError)==null?void 0:m.call(h,S,t,this.state.context,this)),await((C=(x=this.options).onError)==null?void 0:C.call(x,S,t,this.state.context)),await((E=(I=F(this,ct).config).onSettled)==null?void 0:E.call(I,void 0,S,this.state.variables,this.state.context,this)),await((T=(_=this.options).onSettled)==null?void 0:T.call(_,void 0,S,t,this.state.context)),S}finally{ye(this,ln,Bn).call(this,{type:"error",error:S})}}finally{F(this,ct).runNext(this)}}},cn=new WeakMap,ct=new WeakMap,dr=new WeakMap,ln=new WeakSet,Bn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Qe.batch(()=>{F(this,cn).forEach(r=>{r.onMutationUpdate(t)}),F(this,ct).notify({mutation:this,type:"updated",action:t})})},Jp);function Zl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var S2=(qp=class extends xr{constructor(t={}){super();le(this,mn);le(this,Yt);le(this,Vo);this.config=t,U(this,mn,new Set),U(this,Yt,new Map),U(this,Vo,0)}build(t,n,r){const o=new _2({mutationCache:this,mutationId:++Pa(this,Vo)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,mn).add(t);const n=ls(t);if(typeof n=="string"){const r=F(this,Yt).get(n);r?r.push(t):F(this,Yt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,mn).delete(t)){const n=ls(t);if(typeof n=="string"){const r=F(this,Yt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,Yt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ls(t);if(typeof n=="string"){const r=F(this,Yt).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=ls(t);if(typeof n=="string"){const o=(r=F(this,Yt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Qe.batch(()=>{F(this,mn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,mn).clear(),F(this,Yt).clear()})}getAll(){return Array.from(F(this,mn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rl(n,r))}findAll(t={}){return this.getAll().filter(n=>Rl(t,n))}notify(t){Qe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Qe.batch(()=>Promise.all(t.map(n=>n.continue().catch(kt))))}},mn=new WeakMap,Yt=new WeakMap,Vo=new WeakMap,qp);function ls(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Xl(e){return{onFetch:(t,n)=>{var f,g,y,v,b;const r=t.options,o=(y=(g=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:y.direction,s=((v=t.state.data)==null?void 0:v.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const h=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},m=jl(t.options,t.fetchOptions),x=async(C,I,E)=>{if(p)return Promise.reject();if(I==null&&C.pages.length)return Promise.resolve(C);const _={client:t.client,queryKey:t.queryKey,pageParam:I,direction:E?"backward":"forward",meta:t.options.meta};h(_);const T=await m(_),{maxPages:S}=t.options,L=E?b2:m2;return{pages:L(C.pages,T,S),pageParams:L(C.pageParams,I,S)}};if(o&&s.length){const C=o==="backward",I=C?T2:zl,E={pages:s,pageParams:a},_=I(r,E);i=await x(E,_,C)}else{const C=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:zl(r,i);if(c>0&&I==null)break;i=await x(i,I),c++}while(c<C)}return i};t.options.persister?t.fetchFn=()=>{var p,h;return(h=(p=t.options).persister)==null?void 0:h.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function zl(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function T2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var A2=($p=class{constructor(e={}){le(this,We);le(this,Fn);le(this,kn);le(this,Jr);le(this,qr);le(this,Dn);le(this,$r);le(this,Qr);U(this,We,e.queryCache||new w2),U(this,Fn,e.mutationCache||new S2),U(this,kn,e.defaultOptions||{}),U(this,Jr,new Map),U(this,qr,new Map),U(this,Dn,0)}mount(){Pa(this,Dn)._++,F(this,Dn)===1&&(U(this,$r,$a.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,We).onFocus())})),U(this,Qr,cs.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,We).onOnline())})))}unmount(){var e,t;Pa(this,Dn)._--,F(this,Dn)===0&&((e=F(this,$r))==null||e.call(this),U(this,$r,void 0),(t=F(this,Qr))==null||t.call(this),U(this,Qr,void 0))}isFetching(e){return F(this,We).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,Fn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,We).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,We).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,We).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,We).get(r.queryHash),s=o==null?void 0:o.state.data,a=h2(t,s);if(a!==void 0)return F(this,We).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Qe.batch(()=>F(this,We).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,We).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,We);Qe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,We);return Qe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Qe.batch(()=>F(this,We).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(kt).catch(kt)}invalidateQueries(e,t={}){return Qe.batch(()=>(F(this,We).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Qe.batch(()=>F(this,We).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(kt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,We).build(this,t);return n.isStaleByTime(vr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kt).catch(kt)}fetchInfiniteQuery(e){return e.behavior=Xl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kt).catch(kt)}ensureInfiniteQueryData(e){return e.behavior=Xl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return cs.isOnline()?F(this,Fn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,We)}getMutationCache(){return F(this,Fn)}getDefaultOptions(){return F(this,kn)}setDefaultOptions(e){U(this,kn,e)}setQueryDefaults(e,t){F(this,Jr).set(Hn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,Jr).values()],n={};return t.forEach(r=>{uo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,qr).set(Hn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,qr).values()],n={};return t.forEach(r=>{uo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,kn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=za(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===is&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,kn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,We).clear(),F(this,Fn).clear()}},We=new WeakMap,Fn=new WeakMap,kn=new WeakMap,Jr=new WeakMap,qr=new WeakMap,Dn=new WeakMap,$r=new WeakMap,Qr=new WeakMap,$p),L2=(Qp=class extends xr{constructor(t,n){super();le(this,ke);le(this,Ct);le(this,xe);le(this,Go);le(this,lt);le(this,fr);le(this,Ur);le(this,Nn);le(this,un);le(this,Ho);le(this,Kr);le(this,eo);le(this,pr);le(this,hr);le(this,Rn);le(this,to,new Set);this.options=n,U(this,Ct,t),U(this,un,null),U(this,Nn,Qa()),this.options.experimental_prefetchInRender||F(this,Nn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,xe).addObserver(this),Yl(F(this,xe),this.options)?ye(this,ke,Uo).call(this):this.updateResult(),ye(this,ke,Cl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ka(F(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ka(F(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,ke,xl).call(this),ye(this,ke,vl).call(this),F(this,xe).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,xe);if(this.options=F(this,Ct).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Mt(this.options.enabled,F(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,ke,El).call(this),F(this,xe).setOptions(this.options),r._defaulted&&!as(this.options,r)&&F(this,Ct).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,xe),observer:this});const s=this.hasListeners();s&&Jl(F(this,xe),o,this.options,r)&&ye(this,ke,Uo).call(this),this.updateResult(n),s&&(F(this,xe)!==o||Mt(this.options.enabled,F(this,xe))!==Mt(r.enabled,F(this,xe))||vr(this.options.staleTime,F(this,xe))!==vr(r.staleTime,F(this,xe)))&&ye(this,ke,ml).call(this);const a=ye(this,ke,bl).call(this);s&&(F(this,xe)!==o||Mt(this.options.enabled,F(this,xe))!==Mt(r.enabled,F(this,xe))||a!==F(this,Rn))&&ye(this,ke,yl).call(this,a)}getOptimisticResult(t){const n=F(this,Ct).getQueryCache().build(F(this,Ct),t),r=this.createResult(n,t);return F2(this,r)&&(U(this,lt,r),U(this,Ur,this.options),U(this,fr,F(this,xe).state)),r}getCurrentResult(){return F(this,lt)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,to).add(t)}getCurrentQuery(){return F(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,Ct).defaultQueryOptions(t),r=F(this,Ct).getQueryCache().build(F(this,Ct),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ye(this,ke,Uo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,lt)))}createResult(t,n){var S;const r=F(this,xe),o=this.options,s=F(this,lt),a=F(this,fr),i=F(this,Ur),l=t!==r?t.state:F(this,Go),{state:f}=t;let g={...f},y=!1,v;if(n._optimisticResults){const L=this.hasListeners(),N=!L&&Yl(t,n),k=L&&Jl(t,r,n,o);(N||k)&&(g={...g,...Wl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:p,status:h}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===F(this,Ho))v=F(this,Kr);else try{U(this,Ho,n.select),v=n.select(g.data),v=qa(s==null?void 0:s.data,v,n),U(this,Kr,v),U(this,un,null)}catch(L){U(this,un,L)}else v=g.data;if(n.placeholderData!==void 0&&v===void 0&&h==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,eo))==null?void 0:S.state.data,F(this,eo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),U(this,un,null)}catch(N){U(this,un,N)}L!==void 0&&(h="success",v=qa(s==null?void 0:s.data,L,n),y=!0)}F(this,un)&&(b=F(this,un),v=F(this,Kr),p=Date.now(),h="error");const m=g.fetchStatus==="fetching",x=h==="pending",C=h==="error",I=x&&m,E=v!==void 0,T={status:h,fetchStatus:g.fetchStatus,isPending:x,isSuccess:h==="success",isError:C,isInitialLoading:I,isLoading:I,data:v,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:p,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>l.dataUpdateCount||g.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!x,isLoadingError:C&&!E,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:C&&E,isStale:ei(t,n),refetch:this.refetch,promise:F(this,Nn)};if(this.options.experimental_prefetchInRender){const L=D=>{T.status==="error"?D.reject(T.error):T.data!==void 0&&D.resolve(T.data)},N=()=>{const D=U(this,Nn,T.promise=Qa());L(D)},k=F(this,Nn);switch(k.status){case"pending":t.queryHash===r.queryHash&&L(k);break;case"fulfilled":(T.status==="error"||T.data!==k.value)&&N();break;case"rejected":(T.status!=="error"||T.error!==k.reason)&&N();break}}return T}updateResult(t){const n=F(this,lt),r=this.createResult(F(this,xe),this.options);if(U(this,fr,F(this,xe).state),U(this,Ur,this.options),F(this,fr).data!==void 0&&U(this,eo,F(this,xe)),as(r,n))return;U(this,lt,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,to).size)return!0;const c=new Set(i??F(this,to));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,lt)).some(l=>{const f=l;return F(this,lt)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),ye(this,ke,e2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,ke,Cl).call(this)}},Ct=new WeakMap,xe=new WeakMap,Go=new WeakMap,lt=new WeakMap,fr=new WeakMap,Ur=new WeakMap,Nn=new WeakMap,un=new WeakMap,Ho=new WeakMap,Kr=new WeakMap,eo=new WeakMap,pr=new WeakMap,hr=new WeakMap,Rn=new WeakMap,to=new WeakMap,ke=new WeakSet,Uo=function(t){ye(this,ke,El).call(this);let n=F(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kt)),n},ml=function(){ye(this,ke,xl).call(this);const t=vr(this.options.staleTime,F(this,xe));if(Gn||F(this,lt).isStale||!Xa(t))return;const r=Dl(F(this,lt).dataUpdatedAt,t)+1;U(this,pr,setTimeout(()=>{F(this,lt).isStale||this.updateResult()},r))},bl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,xe)):this.options.refetchInterval)??!1},yl=function(t){ye(this,ke,vl).call(this),U(this,Rn,t),!(Gn||Mt(this.options.enabled,F(this,xe))===!1||!Xa(F(this,Rn))||F(this,Rn)===0)&&U(this,hr,setInterval(()=>{(this.options.refetchIntervalInBackground||$a.isFocused())&&ye(this,ke,Uo).call(this)},F(this,Rn)))},Cl=function(){ye(this,ke,ml).call(this),ye(this,ke,yl).call(this,ye(this,ke,bl).call(this))},xl=function(){F(this,pr)&&(clearTimeout(F(this,pr)),U(this,pr,void 0))},vl=function(){F(this,hr)&&(clearInterval(F(this,hr)),U(this,hr,void 0))},El=function(){const t=F(this,Ct).getQueryCache().build(F(this,Ct),this.options);if(t===F(this,xe))return;const n=F(this,xe);U(this,xe,t),U(this,Go,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},e2=function(t){Qe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,lt))}),F(this,Ct).getQueryCache().notify({query:F(this,xe),type:"observerResultsUpdated"})})},Qp);function O2(e,t){return Mt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Yl(e,t){return O2(e,t)||e.state.data!==void 0&&Ka(e,t,t.refetchOnMount)}function Ka(e,t,n){if(Mt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ei(e,t)}return!1}function Jl(e,t,n,r){return(e!==t||Mt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ei(e,n)}function ei(e,t){return Mt(t.enabled,e)!==!1&&e.isStaleByTime(vr(t.staleTime,e))}function F2(e,t){return!as(e.getCurrentResult(),t)}var k2=(Up=class extends xr{constructor(n,r){super();le(this,yn);le(this,Mn);le(this,Pn);le(this,xt);le(this,bn);U(this,Mn,n),this.setOptions(r),this.bindMethods(),ye(this,yn,ja).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,Mn).defaultMutationOptions(n),as(this.options,r)||F(this,Mn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Hn(r.mutationKey)!==Hn(this.options.mutationKey)?this.reset():((o=F(this,xt))==null?void 0:o.state.status)==="pending"&&F(this,xt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,xt))==null||n.removeObserver(this)}onMutationUpdate(n){ye(this,yn,ja).call(this),ye(this,yn,Il).call(this,n)}getCurrentResult(){return F(this,Pn)}reset(){var n;(n=F(this,xt))==null||n.removeObserver(this),U(this,xt,void 0),ye(this,yn,ja).call(this),ye(this,yn,Il).call(this)}mutate(n,r){var o;return U(this,bn,r),(o=F(this,xt))==null||o.removeObserver(this),U(this,xt,F(this,Mn).getMutationCache().build(F(this,Mn),this.options)),F(this,xt).addObserver(this),F(this,xt).execute(n)}},Mn=new WeakMap,Pn=new WeakMap,xt=new WeakMap,bn=new WeakMap,yn=new WeakSet,ja=function(){var r;const n=((r=F(this,xt))==null?void 0:r.state)??Zl();U(this,Pn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Il=function(n){Qe.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,bn)&&this.hasListeners()){const g=F(this,Pn).variables,y=F(this,Pn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,bn)).onSuccess)==null||o.call(r,n.data,g,y),(a=(s=F(this,bn)).onSettled)==null||a.call(s,n.data,null,g,y)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,bn)).onError)==null||c.call(i,n.error,g,y),(f=(l=F(this,bn)).onSettled)==null||f.call(l,void 0,n.error,g,y))}this.listeners.forEach(g=>{g(F(this,Pn))})})},Up),ql=A.createContext(void 0),fo=e=>{const t=A.useContext(ql);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},D2=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(ql.Provider,{value:e,children:t})),$l=A.createContext(!1),N2=()=>A.useContext($l);$l.Provider;function R2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var M2=A.createContext(R2()),P2=()=>A.useContext(M2);function Ql(e,t){return typeof e=="function"?e(...t):!!e}function ti(){}var j2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},B2=e=>{A.useEffect(()=>{e.clearReset()},[e])},V2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Ql(n,[e.error,r])),G2=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},H2=(e,t)=>e.isLoading&&e.isFetching&&!t,W2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ul=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Z2(e,t,n){var g,y,v,b,p;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=fo(),o=N2(),s=P2(),a=r.defaultQueryOptions(e);(y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",G2(a),j2(a,s),B2(s);const i=!r.getQueryCache().get(a.queryHash),[c]=A.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(h=>{const m=f?c.subscribe(Qe.batchCalls(h)):ti;return c.updateResult(),m},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),W2(a,l))throw Ul(a,c,s);if(V2({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((b=(v=r.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||b.call(v,a,l),a.experimental_prefetchInRender&&!Gn&&H2(l,o)){const h=i?Ul(a,c,s):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;h==null||h.catch(ti).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Wn(e,t){return Z2(e,L2)}function $t(e,t){const n=fo(),[r]=A.useState(()=>new k2(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const o=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(Qe.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=A.useCallback((a,i)=>{r.mutate(a,i).catch(ti)},[r]);if(o.error&&Ql(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const ni=(e,t)=>t.some(n=>e instanceof n);let Kl,eu;function X2(){return Kl||(Kl=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function z2(){return eu||(eu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ri=new WeakMap,oi=new WeakMap,us=new WeakMap;function Y2(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(Zn(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return us.set(t,e),t}function J2(e){if(ri.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",a),e.removeEventListener("abort",a)},s=()=>{n(),o()},a=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",a),e.addEventListener("abort",a)});ri.set(e,t)}let si={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return ri.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Zn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function tu(e){si=e(si)}function q2(e){return z2().includes(e)?function(...t){return e.apply(ai(this),t),Zn(this.request)}:function(...t){return Zn(e.apply(ai(this),t))}}function $2(e){return typeof e=="function"?q2(e):(e instanceof IDBTransaction&&J2(e),ni(e,X2())?new Proxy(e,si):e)}function Zn(e){if(e instanceof IDBRequest)return Y2(e);if(oi.has(e))return oi.get(e);const t=$2(e);return t!==e&&(oi.set(e,t),us.set(t,e)),t}const ai=e=>us.get(e);function Q2(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=Zn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Zn(a.result),c.oldVersion,c.newVersion,Zn(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const U2=["get","getKey","getAll","getAllKeys","count"],K2=["put","add","delete","clear"],ii=new Map;function nu(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ii.get(t))return ii.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=K2.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||U2.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[n](...i),o&&c.done]))[0]};return ii.set(t,s),s}tu(e=>({...e,get:(t,n,r)=>nu(t,n)||e.get(t,n,r),has:(t,n)=>!!nu(t,n)||e.has(t,n)}));const eh=["continue","continuePrimaryKey","advance"],ru={},ci=new WeakMap,ou=new WeakMap,th={get(e,t){if(!eh.includes(t))return e[t];let n=ru[t];return n||(n=ru[t]=function(...r){ci.set(this,ou.get(this)[t](...r))}),n}};async function*nh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,th);for(ou.set(n,t),us.set(n,ai(t));t;)yield n,t=await(ci.get(n)||t.continue()),ci.delete(n)}function su(e,t){return t===Symbol.asyncIterator&&ni(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&ni(e,[IDBIndex,IDBObjectStore])}tu(e=>({...e,get(t,n,r){return su(t,n)?nh:e.get(t,n,r)},has(t,n){return su(t,n)||e.has(t,n)}}));const rh="connector-db",oh=1,ds={FEEDBACK:"feedback"},po=`${ds.FEEDBACK}:data`,fs=`${ds.FEEDBACK}:last_submitted`,ho=`${ds.FEEDBACK}:capture_on_demand`,go=`${ds.FEEDBACK}:show_notification`,sh=12*60*60*1e3,li=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=sh:!0,au=(e,t=!1)=>e.captureFeedback&&(li(e.firstViewed)&&(!e.lastSubmittedFeedback||li(e.lastSubmittedFeedback))||!!t);let Xn=null;const En=async()=>{try{Xn||(Xn=await Q2(rh,oh,{upgrade(e){e.objectStoreNames.contains(po)||e.createObjectStore(po),e.objectStoreNames.contains(fs)||e.createObjectStore(fs),e.objectStoreNames.contains(ho)||e.createObjectStore(ho),e.objectStoreNames.contains(go)||e.createObjectStore(go)},blocked(){console.warn("Upgrade blocked! Close other tabs using this DB.")},blocking(){console.warn("Another tab is trying to upgrade. Closing connection to allow upgrade."),Xn&&(Xn.close(),Xn=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Xn=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Xn},ui=async e=>{if(!e)return[];const t=await En();if(!t)return[];try{return await t.get(po,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},ah=async e=>{if(!e)return null;const t=await En();if(!t)return null;try{return await t.get(fs,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},ps=async e=>{if(!e)return;const t=await En();if(t)try{return await t.get(ho,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},ih=async e=>{if(!e)return!1;const t=await En();if(!t)return!1;try{return await t.get(go,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},ch=async(e,t)=>{if(!e||!t||!t.length)return;const n=await En();if(n)try{const r=await ui(e),o=new Set(r.map(a=>a.connectorId)),s=t.filter(a=>!o.has(a.connector_id)).map(a=>({connectorId:a.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const a=[...r,...s];await n.put(po,a,e),await n.put(go,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},lh=async e=>{if(!e)return;const t=await En();if(t)try{const n=await ui(e),r=await ps(e),o=new Date,s=n.map(a=>{const i=au(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(po,s,e),await t.put(fs,o,e),r&&await t.put(ho,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},iu=async(e,t)=>{if(!e)return;const n=await En();if(n)try{await n.put(ho,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},uh=async e=>{if(!e)return;const t=await En();if(t)try{await t.put(go,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},dh=async e=>{const t=await ui(e),n=await ps(e);return t.filter(o=>au(o,n))},di=async e=>{const t=await ah(e);return t&&!li(t)?!1:await ps(e)&&!t?!0:!!(await dh(e)).length},fh=async(e,t)=>{await ch(e,t)},hs=async e=>{e&&await lh(e)},ph=async(e,t)=>{const n=await ps(e);t?n!==!1&&await iu(e,t):await iu(e,void 0)},cu=async e=>await ih(e)&&await di(e),lu=async e=>{await uh(e)};var fi={},zn={};function uu(e,t){return function(){return e.apply(t,arguments)}}const{toString:hh}=Object.prototype,{getPrototypeOf:pi}=Object,gs=(e=>t=>{const n=hh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Pt=e=>(e=e.toLowerCase(),t=>gs(t)===e),ms=e=>t=>typeof t===e,{isArray:Er}=Array,mo=ms("undefined");function gh(e){return e!==null&&!mo(e)&&e.constructor!==null&&!mo(e.constructor)&&_t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const du=Pt("ArrayBuffer");function mh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&du(e.buffer),t}const bh=ms("string"),_t=ms("function"),fu=ms("number"),bs=e=>e!==null&&typeof e=="object",yh=e=>e===!0||e===!1,ys=e=>{if(gs(e)!=="object")return!1;const t=pi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ch=Pt("Date"),xh=Pt("File"),vh=Pt("Blob"),Eh=Pt("FileList"),Ih=e=>bs(e)&&_t(e.pipe),wh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_t(e.append)&&((t=gs(e))==="formdata"||t==="object"&&_t(e.toString)&&e.toString()==="[object FormData]"))},_h=Pt("URLSearchParams"),[Sh,Th,Ah,Lh]=["ReadableStream","Request","Response","Headers"].map(Pt),Oh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function bo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Er(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function pu(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ge,hu=e=>!mo(e)&&e!==Yn;function hi(){const{caseless:e}=hu(this)&&this||{},t={},n=(r,o)=>{const s=e&&pu(t,o)||o;ys(t[s])&&ys(r)?t[s]=hi(t[s],r):ys(r)?t[s]=hi({},r):Er(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&bo(arguments[r],n);return t}const Fh=(e,t,n,{allOwnKeys:r}={})=>(bo(t,(o,s)=>{n&&_t(o)?e[s]=uu(o,n):e[s]=o},{allOwnKeys:r}),e),kh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Dh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Nh=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&pi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Rh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Mh=e=>{if(!e)return null;if(Er(e))return e;let t=e.length;if(!fu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ph=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&pi(Uint8Array)),jh=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Bh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Vh=Pt("HTMLFormElement"),Gh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),gu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Hh=Pt("RegExp"),mu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};bo(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Wh=e=>{mu(e,(t,n)=>{if(_t(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_t(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Zh=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Er(e)?r(e):r(String(e).split(t)),n},Xh=()=>{},zh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,gi="abcdefghijklmnopqrstuvwxyz",bu="0123456789",yu={DIGIT:bu,ALPHA:gi,ALPHA_DIGIT:gi+gi.toUpperCase()+bu},Yh=(e=16,t=yu.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Jh(e){return!!(e&&_t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const qh=e=>{const t=new Array(10),n=(r,o)=>{if(bs(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Er(r)?[]:{};return bo(r,(a,i)=>{const c=n(a,o+1);!mo(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},$h=Pt("AsyncFunction"),Qh=e=>e&&(bs(e)||_t(e))&&_t(e.then)&&_t(e.catch),Cu=((e,t)=>e?setImmediate:t?((n,r)=>(Yn.addEventListener("message",({source:o,data:s})=>{o===Yn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Yn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_t(Yn.postMessage)),Uh=typeof queueMicrotask<"u"?queueMicrotask.bind(Yn):typeof process<"u"&&process.nextTick||Cu;var R={isArray:Er,isArrayBuffer:du,isBuffer:gh,isFormData:wh,isArrayBufferView:mh,isString:bh,isNumber:fu,isBoolean:yh,isObject:bs,isPlainObject:ys,isReadableStream:Sh,isRequest:Th,isResponse:Ah,isHeaders:Lh,isUndefined:mo,isDate:Ch,isFile:xh,isBlob:vh,isRegExp:Hh,isFunction:_t,isStream:Ih,isURLSearchParams:_h,isTypedArray:Ph,isFileList:Eh,forEach:bo,merge:hi,extend:Fh,trim:Oh,stripBOM:kh,inherits:Dh,toFlatObject:Nh,kindOf:gs,kindOfTest:Pt,endsWith:Rh,toArray:Mh,forEachEntry:jh,matchAll:Bh,isHTMLForm:Vh,hasOwnProperty:gu,hasOwnProp:gu,reduceDescriptors:mu,freezeMethods:Wh,toObjectSet:Zh,toCamelCase:Gh,noop:Xh,toFiniteNumber:zh,findKey:pu,global:Yn,isContextDefined:hu,ALPHABET:yu,generateString:Yh,isSpecCompliantForm:Jh,toJSONObject:qh,isAsyncFn:$h,isThenable:Qh,setImmediate:Cu,asap:Uh};function be(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const xu=be.prototype,vu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vu[e]={value:e}}),Object.defineProperties(be,vu),Object.defineProperty(xu,"isAxiosError",{value:!0}),be.from=(e,t,n,r,o,s)=>{const a=Object.create(xu);return R.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),be.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var Kh=null;function mi(e){return R.isPlainObject(e)||R.isArray(e)}function Eu(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Iu(e,t,n){return e?e.concat(t).map(function(o,s){return o=Eu(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function eg(e){return R.isArray(e)&&!e.some(mi)}const tg=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function Cs(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!R.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function l(b){if(b===null)return"";if(R.isDate(b))return b.toISOString();if(!c&&R.isBlob(b))throw new be("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(b)||R.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,p,h){let m=b;if(b&&!h&&typeof b=="object"){if(R.endsWith(p,"{}"))p=r?p:p.slice(0,-2),b=JSON.stringify(b);else if(R.isArray(b)&&eg(b)||(R.isFileList(b)||R.endsWith(p,"[]"))&&(m=R.toArray(b)))return p=Eu(p),m.forEach(function(C,I){!(R.isUndefined(C)||C===null)&&t.append(a===!0?Iu([p],I,s):a===null?p:p+"[]",l(C))}),!1}return mi(b)?!0:(t.append(Iu(h,p,s),l(b)),!1)}const g=[],y=Object.assign(tg,{defaultVisitor:f,convertValue:l,isVisitable:mi});function v(b,p){if(!R.isUndefined(b)){if(g.indexOf(b)!==-1)throw Error("Circular reference detected in "+p.join("."));g.push(b),R.forEach(b,function(m,x){(!(R.isUndefined(m)||m===null)&&o.call(t,m,R.isString(x)?x.trim():x,p,y))===!0&&v(m,p?p.concat(x):[x])}),g.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return v(e),t}function wu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function bi(e,t){this._pairs=[],e&&Cs(e,this,t)}const _u=bi.prototype;_u.append=function(t,n){this._pairs.push([t,n])},_u.toString=function(t){const n=t?function(r){return t.call(this,r,wu)}:wu;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ng(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Su(e,t,n){if(!t)return e;const r=n&&n.encode||ng,o=n&&n.serialize;let s;if(o?s=o(t,n):s=R.isURLSearchParams(t)?t.toString():new bi(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class rg{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Tu=rg,Au={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},og=typeof URLSearchParams<"u"?URLSearchParams:bi,sg=typeof FormData<"u"?FormData:null,ag=typeof Blob<"u"?Blob:null,ig={isBrowser:!0,classes:{URLSearchParams:og,FormData:sg,Blob:ag},protocols:["http","https","file","blob","url","data"]};const yi=typeof window<"u"&&typeof document<"u",Ci=typeof navigator=="object"&&navigator||void 0,cg=yi&&(!Ci||["ReactNative","NativeScript","NS"].indexOf(Ci.product)<0),lg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ug=yi&&window.location.href||"http://localhost";var dg=Object.freeze({__proto__:null,hasBrowserEnv:yi,hasStandardBrowserWebWorkerEnv:lg,hasStandardBrowserEnv:cg,navigator:Ci,origin:ug}),pt={...dg,...ig};function fg(e,t){return Cs(e,new pt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return pt.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function pg(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function hg(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Lu(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=s>=n.length;return a=!a&&R.isArray(o)?o.length:a,c?(R.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&R.isArray(o[a])&&(o[a]=hg(o[a])),!i)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(pg(r),o,n,0)}),n}return null}function gg(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const xi={transitional:Au,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=R.isObject(t);if(s&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(Lu(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return fg(t,this.formSerializer).toString();if((i=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Cs(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),gg(t)):t}],transformResponse:[function(t){const n=this.transitional||xi.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?be.from(i,be.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{xi.headers[e]={}});var vi=xi;const mg=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var bg=e=>{const t={};let n,r,o;return e&&e.split(`
31
+ `).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&mg[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Ou=Symbol("internals");function yo(e){return e&&String(e).trim().toLowerCase()}function xs(e){return e===!1||e==null?e:R.isArray(e)?e.map(xs):String(e)}function yg(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Cg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ei(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function xg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function vg(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}class vs{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=yo(c);if(!f)throw new Error("header name must be a non-empty string");const g=R.findKey(o,f);(!g||o[g]===void 0||l===!0||l===void 0&&o[g]!==!1)&&(o[g||c]=xs(i))}const a=(i,c)=>R.forEach(i,(l,f)=>s(l,f,c));if(R.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(R.isString(t)&&(t=t.trim())&&!Cg(t))a(bg(t),n);else if(R.isHeaders(t))for(const[i,c]of t.entries())s(c,i,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=yo(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return yg(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=yo(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ei(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=yo(a),a){const i=R.findKey(r,a);i&&(!n||Ei(r,r[i],i,n))&&(delete r[i],o=!0)}}return R.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Ei(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,s)=>{const a=R.findKey(r,s);if(a){n[a]=xs(o),delete n[s];return}const i=t?xg(s):String(s).trim();i!==s&&delete n[s],n[i]=xs(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
32
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ou]=this[Ou]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=yo(a);r[i]||(vg(o,a),r[i]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}}vs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(vs.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(vs);var jt=vs;function Ii(e,t){const n=this||vi,r=t||n,o=jt.from(r.headers);let s=r.data;return R.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Fu(e){return!!(e&&e.__CANCEL__)}function Ir(e,t,n){be.call(this,e??"canceled",be.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(Ir,be,{__CANCEL__:!0});function ku(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,[be.ERR_BAD_REQUEST,be.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Eg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ig(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[s];a||(a=l),n[o]=c,r[o]=l;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const v=f&&l-f;return v?Math.round(y*1e3/v):void 0}}function wg(e,t){let n=0,r=1e3/t,o,s;const a=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),g=f-n;g>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const Es=(e,t,n=3)=>{let r=0;const o=Ig(50,250);return wg(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const g={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&f?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},Du=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Nu=e=>(...t)=>R.asap(()=>e(...t));var _g=pt.hasStandardBrowserEnv?function(){const t=pt.navigator&&/(msie|trident)/i.test(pt.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const i=R.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Sg=pt.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Tg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ag(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ru(e,t){return e&&!Tg(t)?Ag(e,t):t}const Mu=e=>e instanceof jt?{...e}:e;function Jn(e,t){t=t||{};const n={};function r(l,f,g){return R.isPlainObject(l)&&R.isPlainObject(f)?R.merge.call({caseless:g},l,f):R.isPlainObject(f)?R.merge({},f):R.isArray(f)?f.slice():f}function o(l,f,g){if(R.isUndefined(f)){if(!R.isUndefined(l))return r(void 0,l,g)}else return r(l,f,g)}function s(l,f){if(!R.isUndefined(f))return r(void 0,f)}function a(l,f){if(R.isUndefined(f)){if(!R.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function i(l,f,g){if(g in t)return r(l,f);if(g in e)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,f)=>o(Mu(l),Mu(f),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=c[f]||o,y=g(e[f],t[f],f);R.isUndefined(y)&&g!==i||(n[f]=y)}),n}var Pu=e=>{const t=Jn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=jt.from(a),t.url=Su(Ru(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(R.isFormData(n)){if(pt.hasStandardBrowserEnv||pt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(pt.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&_g(t.url))){const l=o&&s&&Sg.read(s);l&&a.set(o,l)}return t},Lg=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Pu(e);let s=o.data;const a=jt.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,g,y,v,b;function p(){v&&v(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function m(){if(!h)return;const C=jt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:e,request:h};ku(function(T){n(T),p()},function(T){r(T),p()},E),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(m)},h.onabort=function(){h&&(r(new be("Request aborted",be.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new be("Network Error",be.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Au;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new be(I,E.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&R.forEach(a.toJSON(),function(I,E){h.setRequestHeader(E,I)}),R.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),l&&([y,b]=Es(l,!0),h.addEventListener("progress",y)),c&&h.upload&&([g,v]=Es(c),h.upload.addEventListener("progress",g),h.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(f=C=>{h&&(r(!C||C.type?new Ir(null,e,h):C),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=Eg(o.url);if(x&&pt.protocols.indexOf(x)===-1){r(new be("Unsupported protocol "+x+":",be.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Og=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,i();const f=l instanceof Error?l:this.reason;r.abort(f instanceof be?f:new Ir(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new be(`timeout ${t} of ms exceeded`,be.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>R.asap(i),c}};const Fg=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},kg=async function*(e,t){for await(const n of Dg(e))yield*Fg(n,t)},Dg=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ju=(e,t,n,r)=>{const o=kg(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){i(),c.close();return}let g=f.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Is=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Bu=Is&&typeof ReadableStream=="function",Ng=Is&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Vu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Rg=Bu&&Vu(()=>{let e=!1;const t=new Request(pt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Gu=64*1024,wi=Bu&&Vu(()=>R.isReadableStream(new Response("").body)),ws={stream:wi&&(e=>e.body)};Is&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ws[t]&&(ws[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new be(`Response type '${t}' is not supported`,be.ERR_NOT_SUPPORT,r)})})})(new Response);const Mg=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(pt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await Ng(e)).byteLength},Pg=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??Mg(t)};var jg=Is&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:g="same-origin",fetchOptions:y}=Pu(e);l=l?(l+"").toLowerCase():"text";let v=Og([o,s&&s.toAbortSignal()],a),b;const p=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let h;try{if(c&&Rg&&n!=="get"&&n!=="head"&&(h=await Pg(f,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(R.isFormData(r)&&(_=E.headers.get("content-type"))&&f.setContentType(_),E.body){const[T,S]=Du(h,Es(Nu(c)));r=ju(E.body,Gu,T,S)}}R.isString(g)||(g=g?"include":"omit");const m="credentials"in Request.prototype;b=new Request(t,{...y,signal:v,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:m?g:void 0});let x=await fetch(b);const C=wi&&(l==="stream"||l==="response");if(wi&&(i||C&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=x[L]});const _=R.toFiniteNumber(x.headers.get("content-length")),[T,S]=i&&Du(_,Es(Nu(i),!0))||[];x=new Response(ju(x.body,Gu,T,()=>{S&&S(),p&&p()}),E)}l=l||"text";let I=await ws[R.findKey(ws,l)||"text"](x,e);return!C&&p&&p(),await new Promise((E,_)=>{ku(E,_,{data:I,headers:jt.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:b})})}catch(m){throw p&&p(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new be("Network Error",be.ERR_NETWORK,e,b),{cause:m.cause||m}):be.from(m,m&&m.code,e,b)}});const _i={http:Kh,xhr:Lg,fetch:jg};R.forEach(_i,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Hu=e=>`- ${e}`,Bg=e=>R.isFunction(e)||e===null||e===!1;var Wu={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!Bg(n)&&(r=_i[(a=String(n)).toLowerCase()],r===void 0))throw new be(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,c])=>`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
33
33
  `+s.map(Hu).join(`
34
- `):" "+Hu(s[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Si};function Ti(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wr(null,e)}function Zu(e){return Ti(e),e.headers=Mt.from(e.headers),e.data=wi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Wu.getAdapter(e.adapter||Ei.adapter)(e).then(function(r){return Ti(e),r.data=wi.call(e,e.transformResponse,r),r.headers=Mt.from(r.headers),r},function(r){return Fu(r)||(Ti(e),r&&r.response&&(r.response.data=wi.call(e,e.transformResponse,r.response),r.response.headers=Mt.from(r.response.headers))),Promise.reject(r)})}const Xu="1.7.7",Ai={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ai[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const zu={};Ai.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Xu+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new he(o(a," has been removed"+(n?" in "+n:"")),he.ERR_DEPRECATED);return n&&!zu[a]&&(zu[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};function Bg(e,t,n){if(typeof e!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],c=i===void 0||a(i,s,e);if(c!==!0)throw new he("option "+s+" must be "+c,he.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new he("Unknown option "+s,he.ERR_BAD_OPTION)}}var Li={assertOptions:Bg,validators:Ai};const In=Li.validators;let ws=class{constructor(t){this.defaults=t,this.interceptors={request:new Tu,response:new Tu}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Qn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Li.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean)},!1),o!=null&&(M.isFunction(o)?n.paramsSerializer={serialize:o}:Li.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&M.merge(s.common,s[n.method]);s&&M.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=Mt.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let f,g=0,y;if(!c){const b=[Zu.bind(this),void 0];for(b.unshift.apply(b,i),b.push.apply(b,l),y=b.length,f=Promise.resolve(n);g<y;)f=f.then(b[g++],b[g++]);return f}y=i.length;let v=n;for(g=0;g<y;){const b=i[g++],p=i[g++];try{v=b(v)}catch(h){p.call(this,h);break}}try{f=Zu.call(this,v)}catch(b){return Promise.reject(b)}for(g=0,y=l.length;g<y;)f=f.then(l[g++],l[g++]);return f}getUri(t){t=Qn(this.defaults,t);const n=Ru(t.baseURL,t.url);return Su(n,t.params,t.paramsSerializer)}};M.forEach(["delete","get","head","options"],function(t){ws.prototype[t]=function(n,r){return this.request(Qn(r||{},{method:t,url:n,data:(r||{}).data}))}}),M.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(Qn(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}ws.prototype[t]=n(),ws.prototype[t+"Form"]=n(!0)});var _s=ws;class Oi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new wr(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Oi(function(o){t=o}),cancel:t}}}var Vg=Oi;function Gg(e){return function(n){return e.apply(null,n)}}function Hg(e){return M.isObject(e)&&e.isAxiosError===!0}const Fi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fi).forEach(([e,t])=>{Fi[t]=e});var Wg=Fi;function Yu(e){const t=new _s(e),n=uu(_s.prototype.request,t);return M.extend(n,_s.prototype,t,{allOwnKeys:!0}),M.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Yu(Qn(e,o))},n}const Xe=Yu(Ei);Xe.Axios=_s,Xe.CanceledError=wr,Xe.CancelToken=Vg,Xe.isCancel=Fu,Xe.VERSION=Xu,Xe.toFormData=ys,Xe.AxiosError=he,Xe.Cancel=Xe.CanceledError,Xe.all=function(t){return Promise.all(t)},Xe.spread=Gg,Xe.isAxiosError=Hg,Xe.mergeConfig=Qn,Xe.AxiosHeaders=Mt,Xe.formToJSON=e=>Lu(M.isHTMLForm(e)?new FormData(e):e),Xe.getAdapter=Wu.getAdapter,Xe.HttpStatusCode=Wg,Xe.default=Xe;var Ju=Xe,_e={},wn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PLATFORM=e.TENANT_PLATFORM=e.API_CALL_ORIGIN=e.TIERS=e.APP_UI=e.CONFIG_HIVER=e.DEFAULT_INIT_CONFIG_HIVER=e.TWO_MINUTES_IN_MS=e.REFETCH_CHECK_DELAY=e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=e.INITIAL_RETRY_DELAY=e.MAX_BACKOFF_LIMIT=e.MAX_CONFLICT_RETRY_DELAY=e.MAX_RETRY_DELAY=e.GET_METHOD=void 0,e.GET_METHOD="GET",e.MAX_RETRY_DELAY=18e4,e.MAX_CONFLICT_RETRY_DELAY=63e3,e.MAX_BACKOFF_LIMIT=8e3,e.INITIAL_RETRY_DELAY=1e3,e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=3e3,e.REFETCH_CHECK_DELAY=168e4,e.TWO_MINUTES_IN_MS=2*60*1e3,e.DEFAULT_INIT_CONFIG_HIVER={getToken:!0,isHiverApiDomain:!0,fetchCsrfToken:function(){return""}},e.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},e.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},e.TIERS={DEV:"dev",SIT:"sit",QA:"qa",PRODUCTION:"production",PROD:"prod"},e.API_CALL_ORIGIN={API_RETRY:"Api Retry"},e.TENANT_PLATFORM={GMAIL:"GMAIL",HIVERWEB:"HIVERWEB"},function(t){t[t.WEB=0]="WEB",t[t.MOBILE=1]="MOBILE"}(e.PLATFORM||(e.PLATFORM={}))})(wn);var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.getProdHqConfig=pt.getProdApiConfig=pt.getSitHqConfig=pt.getSitApiConfig=pt.getDevHqConfig=pt.getDevApiConfig=void 0;var _r={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},Zg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:_r}};pt.getDevApiConfig=Zg;var Xg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:_r}};pt.getDevHqConfig=Xg;var zg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:_r}};pt.getSitApiConfig=zg;var Yg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:_r}};pt.getSitHqConfig=Yg;var Jg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:_r}};pt.getProdApiConfig=Jg;var qg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:_r}};pt.getProdHqConfig=qg;var Jt={},qt={};Object.defineProperty(qt,"__esModule",{value:!0}),qt.removeValue=qt.getValue=qt.setValue=void 0;var ki={};function $g(e,t){ki[e]=t}qt.setValue=$g;function Qg(e){return ki[e]}qt.getValue=Qg;function Ug(e){delete ki[e]}qt.removeValue=Ug,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.removeItemFromStorage=Jt.setItemInStorage=Jt.getItemFromStorage=void 0;var Sr=wn,Tr=qt,Kg=function(e,t){switch(t===void 0&&(t=(0,Tr.getValue)("PLATFORM")),t){case Sr.PLATFORM.WEB:return sessionStorage.getItem(e);case Sr.PLATFORM.MOBILE:return(0,Tr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};Jt.getItemFromStorage=Kg;var em=function(e,t,n){switch(n===void 0&&(n=(0,Tr.getValue)("PLATFORM")),n){case Sr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Sr.PLATFORM.MOBILE:return(0,Tr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};Jt.setItemInStorage=em;var tm=function(e,t){switch(t===void 0&&(t=(0,Tr.getValue)("PLATFORM")),t){case Sr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Sr.PLATFORM.MOBILE:(0,Tr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};Jt.removeItemFromStorage=tm;var nm=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},rm=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(_e,"__esModule",{value:!0}),_e.expireToken=_e.invalidateToken=_e.validateToken=_e.validateAccount=_e.getConfig=_e.introduceDelay=_e.isTokenInExpiryWindow=_e.getStoredAuthData=_e.setUserDetails=_e.getRefreshInterval=_e.setTokenAndExpiry=_e.getRandomDelay=_e.hasValidToken=void 0;var dn=wn,Ar=pt,wt=Jt,Di=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Ni=function(e){var t=parseInt((0,wt.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,wt.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};_e.validateAccount=Ni;var om=function(e){var t=Ni(e);return!qu()&&t};_e.validateToken=om;var sm=function(e){return e.apiRetry?e.apiRetry>0:!1};_e.invalidateToken=sm;var am=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};_e.expireToken=am;var im=function(e){var t=(0,wt.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Di(),o=Ni(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};_e.hasValidToken=im;var cm=function(){return Math.floor(Math.random()*6e4)+6e4};_e.getRandomDelay=cm;var lm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,wt.setItemInStorage)("hiverAuthUserId",e),(0,wt.setItemInStorage)("hiverAuthUserGroupId",t)};_e.setUserDetails=lm;var um=function(e,t){if(!e)throw new Error("Token not found in the response");(0,wt.setItemInStorage)("hiverAuthToken",e),(0,wt.setItemInStorage)("hiverAuthTokenExpiry",t)};_e.setTokenAndExpiry=um;var dm=function(){var e=(0,wt.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,wt.getItemFromStorage)("hiverAuthToken"),n=(0,wt.getItemFromStorage)("hiverAuthUserId"),r=(0,wt.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};_e.getStoredAuthData=dm;var qu=function(){var e=(0,wt.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Di(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};_e.isTokenInExpiryWindow=qu;var fm=function(e){return nm(void 0,void 0,void 0,function(){return rm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};_e.introduceDelay=fm;var pm=function(e,t,n){switch(n===void 0&&(n=!0),t){case dn.TIERS.SIT:case dn.TIERS.QA:return n?(0,Ar.getSitApiConfig)(e):(0,Ar.getSitHqConfig)(e);case dn.TIERS.PRODUCTION:case dn.TIERS.PROD:return n?(0,Ar.getProdApiConfig)():(0,Ar.getProdHqConfig)();case dn.TIERS.DEV:default:return n?(0,Ar.getDevApiConfig)():(0,Ar.getDevHqConfig)()}};_e.getConfig=pm;var hm=function(){try{var e=(0,wt.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return dn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Di();return t.getTime()-n.getTime()>dn.TWO_MINUTES_IN_MS?t.getTime()-dn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),dn.REFETCH_CHECK_DELAY}};_e.getRefreshInterval=hm;var vo={},Pt={},$u;function Qu(){if($u)return Pt;$u=1;var e=pe&&pe.__awaiter||function(b,p,h,m){function x(C){return C instanceof h?C:new h(function(I){I(C)})}return new(h||(h=Promise))(function(C,I){function E(S){try{T(m.next(S))}catch(L){I(L)}}function _(S){try{T(m.throw(S))}catch(L){I(L)}}function T(S){S.done?C(S.value):x(S.value).then(E,_)}T((m=m.apply(b,p||[])).next())})},t=pe&&pe.__generator||function(b,p){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},m,x,C,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(T){return function(S){return _([T,S])}}function _(T){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,T[0]&&(h=0)),h;)try{if(m=1,x&&(C=T[0]&2?x.return:T[0]?x.throw||((C=x.return)&&C.call(x),0):x.next)&&!(C=C.call(x,T[1])).done)return C;switch(x=0,C&&(T=[T[0]&2,C.value]),T[0]){case 0:case 1:C=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,x=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!C||T[1]>C[0]&&T[1]<C[3])){h.label=T[1];break}if(T[0]===6&&h.label<C[1]){h.label=C[1],C=T;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(T);break}C[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(b,h)}catch(S){T=[6,S],x=0}finally{m=C=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.logoutFromHeimdall=Pt.getTenantLoginCode=Pt.getLoginToken=Pt.getAccessToken=void 0;var n=wn,r=nd(),o=_e,s=function(b,p,h,m){var x=(0,o.getStoredAuthData)(),C=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":C},data:{user_id:p.userId,usergroup_id:p.usergroupId,access_token:(x==null?void 0:x.token)||"",source:m}}},a=function(b,p,h,m,x){var C=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:p.heimdallUrl,url:p.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},headers:{"x-hiver-tenant":C,"x-hiver-userid":m,"x-hiver-usergroupid":x}}},i=function(b,p){var h=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":h}}},c=function(b){return parseInt(b,10)},l=function(b,p,h,m){return{root_url:h===n.TENANT_PLATFORM.HIVERWEB?b.hotUrl:b.v2Url,url:h===n.TENANT_PLATFORM.HIVERWEB?b.apiEndpoints.hotLogin:b.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(p.userId),app:m||n.APP_UI.DEFAULT}}},f=function(b,p,h,m,x){return e(void 0,void 0,void 0,function(){var C,I,E,_,T,S,L;return t(this,function(N){switch(N.label){case 0:console.log("GETTOKEN tenantPlatform -> ",m),N.label=1;case 1:return N.trys.push([1,5,,6]),!(0,o.validateToken)(h)||(0,o.invalidateToken)(h)?(console.log("HEIMDALL: No valid token, fetching token"),C=s(p,h,m,x),[4,(0,r.performAxiosCall)(C)]):[3,3];case 2:return I=N.sent(),[2,{atToken:(_=I==null?void 0:I.data.at)===null||_===void 0?void 0:_.token,expiryTime:(T=I==null?void 0:I.data.at)===null||T===void 0?void 0:T.expires_at,userId:(S=I==null?void 0:I.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=I==null?void 0:I.data)===null||L===void 0?void 0:L.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw E=N.sent(),E;case 6:return[2]}})})};Pt.getAccessToken=f;var g=function(b,p,h,m,x,C){return e(void 0,void 0,void 0,function(){var I,E,_,T,S,L,N;return t(this,function(k){switch(k.label){case 0:I=a(b,h,m,x,C),k.label=1;case 1:return k.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return E=k.sent(),[2,{userId:(T=E==null?void 0:E.data)===null||T===void 0?void 0:T.user_id,userGroupId:(S=E==null?void 0:E.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=E==null?void 0:E.data.at)===null||L===void 0?void 0:L.token,expiryTime:(N=E==null?void 0:E.data.at)===null||N===void 0?void 0:N.expires_at}];case 3:throw _=k.sent(),_;case 4:return[2]}})})};Pt.getLoginToken=g;var y=function(b,p,h,m,x){return e(void 0,void 0,void 0,function(){var C,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",x),C=l(p,h,m,x),[4,(0,r.performAxiosCall)(C)];case 1:return I=_.sent(),[2,I==null?void 0:I.data.code];case 2:throw E=_.sent(),E;case 3:return[2]}})})};Pt.getTenantLoginCode=y;var v=function(b,p,h){return h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var m,x,C;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),m=i(b,p),[4,(0,r.performAxiosCall)(m)];case 1:return x=I.sent(),[2,x==null?void 0:x.status];case 2:return C=I.sent(),h<2?[4,v(b,p,h+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw C;case 5:return[2]}})})};return Pt.logoutFromHeimdall=v,Pt}var Ss={},gm=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},mm=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.subscribeToOnlineEvent=void 0;var Uu=wn,bm=qt,ym=function(e,t){switch(t===void 0&&(t=(0,bm.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Uu.PLATFORM.WEB:return window.addEventListener("online",function(){return gm(void 0,void 0,void 0,function(){return mm(this,function(n){switch(n.label){case 0:return console.log("Online status detected. Fetching token..."),[4,e()];case 1:return n.sent(),[2]}})})});case Uu.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};Ss.subscribeToOnlineEvent=ym;var Ku;function ed(){if(Ku)return vo;Ku=1;var e=pe&&pe.__awaiter||function(b,p,h,m){function x(C){return C instanceof h?C:new h(function(I){I(C)})}return new(h||(h=Promise))(function(C,I){function E(S){try{T(m.next(S))}catch(L){I(L)}}function _(S){try{T(m.throw(S))}catch(L){I(L)}}function T(S){S.done?C(S.value):x(S.value).then(E,_)}T((m=m.apply(b,p||[])).next())})},t=pe&&pe.__generator||function(b,p){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},m,x,C,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(T){return function(S){return _([T,S])}}function _(T){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,T[0]&&(h=0)),h;)try{if(m=1,x&&(C=T[0]&2?x.return:T[0]?x.throw||((C=x.return)&&C.call(x),0):x.next)&&!(C=C.call(x,T[1])).done)return C;switch(x=0,C&&(T=[T[0]&2,C.value]),T[0]){case 0:case 1:C=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,x=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!C||T[1]>C[0]&&T[1]<C[3])){h.label=T[1];break}if(T[0]===6&&h.label<C[1]){h.label=C[1],C=T;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(T);break}C[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(b,h)}catch(S){T=[6,S],x=0}finally{m=C=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(vo,"__esModule",{value:!0}),vo.fetchAccessToken=void 0;var n=Qu(),r=wn,o=_e,s=Ss,a,i,c,l=function(b,p,h,m,x,C){return C===void 0&&(C=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,E,_,T,S,L,N,k,D;return t(this,function(P){switch(P.label){case 0:I=2,P.label=1;case 1:return P.trys.push([1,7,,12]),console.log("ERROR debug: in login:",C,m),E=void 0,x?[4,x()]:[3,3];case 2:return E=P.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,p,m,C)];case 4:E=P.sent(),P.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,b,m,p.userId,p.usergroupId)];case 6:return _=P.sent(),T=_.userId,S=_.userGroupId,L=_.atToken,N=_.expiryTime,(0,o.setTokenAndExpiry)(L,N),(0,o.setUserDetails)(T,S),[3,12];case 7:k=P.sent(),console.log("ERROR debug: in error login:",k,C),D=h,P.label=8;case 8:return D<I?[4,l(b,p,D+1,m,x,C)]:[3,11];case 9:P.sent(),P.label=10;case 10:return D++,[3,8];case 11:throw k;case 12:return[2]}})})},f=function(b,p,h,m,x){return e(void 0,void 0,void 0,function(){var C,I,E,_;return t(this,function(T){switch(T.label){case 0:return p<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,b)})]:[3,3];case 1:return T.sent(),p+=b,b*2<=r.MAX_BACKOFF_LIMIT?b*=2:b=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",b),C=h.retryDelay,I=h.configs,E=h.apiParams,_=h.appUI,[4,g(C,b,p,I,E,m,x,_)];case 2:T.sent(),T.label=3;case 3:return[2]}})})},g=function(b,p,h,m,x,C,I,E,_){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var T,S,L,N,k,D,P,V,z,$,Q,X,q,oe;return t(this,function(ie){switch(ie.label){case 0:return ie.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,m,x,C,E)];case 1:return T=ie.sent(),S=T.atToken,L=T.expiryTime,N=T.userId,k=T.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),N&&k&&(0,o.setUserDetails)(N,k),b=r.INITIAL_RETRY_DELAY,p=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return D=ie.sent(),console.log("ERROR: Heimdall fetch token",D),((z=D.response)===null||z===void 0?void 0:z.status)===401||(($=D.request)===null||$===void 0?void 0:$.status)===401?(P=1,[4,l(m,x,P,C,I,_)]):[3,4];case 3:return ie.sent(),[3,11];case 4:return((Q=D.response)===null||Q===void 0?void 0:Q.status)===409||((X=D.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),V={retryDelay:b,configs:m,apiParams:x,appUI:_},[4,f(p,h,V,C,I)]):[3,6];case 5:if(ie.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw D;return[3,11];case 6:if(!(((q=D.response)===null||q===void 0?void 0:q.status)===422||((oe=D.request)===null||oe===void 0?void 0:oe.status)===422))return[3,7];throw console.log("ERROR: Throwing error",D.response.status),D;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(B){return setTimeout(B,b)})]:[3,10];case 8:return ie.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,g(b,p,h,m,x,C,I,_)];case 9:return ie.sent(),[3,11];case 10:throw D;case 11:return[3,12];case 12:return[2]}})})},y=function(b,p,h,m,x,C,I,E){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var _,T,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),_=(0,o.isTokenInExpiryWindow)(),_?(T=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(T)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,g(h,m,x,b,p,C,I,E)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},v=function(b,p,h,m,x,C,I){return e(void 0,void 0,void 0,function(){var E,_,T,S,L,N;return t(this,function(k){switch(k.label){case 0:a=b,i=p,E=r.INITIAL_RETRY_DELAY,_=r.INITIAL_RETRY_DELAY,T=0,S=(0,o.getConfig)(a,i),console.log("Instance: Fetch Call"),k.label=1;case 1:return k.trys.push([1,3,,4]),[4,g(E,_,T,S,h,m,x,C,I)];case 2:return k.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return y(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,x,I)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(D){switch(D.label){case 0:return[4,y(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,x,I)];case 1:return D.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return N=k.sent(),console.log("ERROR: Fetching token failed",N),[3,4];case 4:return[2]}})})};return vo.fetchAccessToken=v,vo}var td;function nd(){if(td)return qn;td=1;var e=pe&&pe.__assign||function(){return e=Object.assign||function(p){for(var h,m=1,x=arguments.length;m<x;m++){h=arguments[m];for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(p[C]=h[C])}return p},e.apply(this,arguments)},t=pe&&pe.__awaiter||function(p,h,m,x){function C(I){return I instanceof m?I:new m(function(E){E(I)})}return new(m||(m=Promise))(function(I,E){function _(L){try{S(x.next(L))}catch(N){E(N)}}function T(L){try{S(x.throw(L))}catch(N){E(N)}}function S(L){L.done?I(L.value):C(L.value).then(_,T)}S((x=x.apply(p,h||[])).next())})},n=pe&&pe.__generator||function(p,h){var m={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},x,C,I,E;return E={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function _(S){return function(L){return T([S,L])}}function T(S){if(x)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(m=0)),m;)try{if(x=1,C&&(I=S[0]&2?C.return:S[0]?C.throw||((I=C.return)&&I.call(C),0):C.next)&&!(I=I.call(C,S[1])).done)return I;switch(C=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,C=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(I=m.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){m.label=S[1];break}if(S[0]===6&&m.label<I[1]){m.label=I[1],I=S;break}if(I&&m.label<I[2]){m.label=I[2],m.ops.push(S);break}I[2]&&m.ops.pop(),m.trys.pop();continue}S=h.call(p,m)}catch(L){S=[6,L],C=0}finally{x=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(qn,"__esModule",{value:!0}),qn.hiverAxiosCall=qn.performAxiosCall=void 0;var r=Ju,o=_e,s=ed(),a=Jt,i=wn,c,l=2,f=function(p,h){var m=h.fetchCsrfToken();p.formData?p.formData.append("_csrf_token",m):(p.data=p.data||{},p.data._csrf_token=m)},g=function(p,h){var m={};!p.method||p.method.toLowerCase()==="get"?m={params:p.params?p.params:p.data}:m=p.params?{params:p,data:p.data}:{data:p.data};var x=e(e({method:p.method,url:"".concat(p.root_url).concat(p.url),headers:p.headers},m),{withCredentials:h,responseType:(p==null?void 0:p.responseType)||""});return x};function y(p,h){return h===void 0&&(h=!0),t(this,void 0,void 0,function(){var m;return n(this,function(x){return m=g(p,h),[2,(0,r.default)(m).then(function(C){return C}).catch(function(C){throw C})]})})}qn.performAxiosCall=y;function v(p,h,m){return t(this,void 0,void 0,function(){var x,C,I;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),p.authTokenFetchingInProgress?[3,2]:(p.authTokenFetchingInProgress=!0,x=p.appEnv,C=p.tier,[4,(0,s.fetchAccessToken)(x,C,h,p.tenantPlatform,p.getTokenForLogin,m)]);case 1:return E.sent(),p.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(_){return setTimeout(_,100)})];case 3:return E.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,v(p,h,m)];case 4:E.sent(),E.label=5;case 5:return[3,8];case 6:return I=E.sent(),console.log("Error while fetching Auth Token :",I),p.authTokenFetchingInProgress=!1,[4,v(p,h,m)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function b(p,h,m,x,C){var I,E;return C===void 0&&(C=0),t(this,void 0,void 0,function(){var _,T,S,L,N,k,D;return n(this,function(P){switch(P.label){case 0:if(P.trys.push([0,4,,5]),!(m.getToken&&!(0,o.hasValidToken)(h)))return[3,2];if(_=p.appEnv,T=p.tier,!_||!T)throw Error("appEnv or tier missing : ".concat(_,"/").concat(T));return"userId"in h&&"usergroupId"in h?(S={userId:h.userId,usergroupId:h.usergroupId},[4,v(p,S,x)]):[3,2];case 1:P.sent(),P.label=2;case 2:return p.csrfToken&&f(h,m),L=p.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,h.headers=e(e({},h.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),m.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",h.headers=e(e({},h.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",h),[4,y(h,p.withCredentials)];case 3:return N=P.sent(),h.onSuccess&&h.onSuccess(N),[2,N];case 4:if(k=P.sent(),D=((I=k.response)===null||I===void 0?void 0:I.status)===403||((E=k.request)===null||E===void 0?void 0:E.status)===403,C<l&&D)return(0,o.expireToken)(),[2,b(p,h,m,x,C+1)];if(C>=l&&D||!D)throw h.onFail&&h.onFail(k),console.log("ERROR: Reached make Axios",k),k;return[3,5];case 5:return[2]}})})}return qn.hiverAxiosCall=b,qn}var Eo={},Pe={},Ge={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.TIERS=Ge.APP_UI=Ge.CONFIG_HIVER=Ge.REFETCH_CHECK_DELAY=Ge.INITIAL_RETRY_DELAY=Ge.MAX_BACKOFF_LIMIT=Ge.MAX_CONFLICT_RETRY_DELAY=Ge.MAX_RETRY_DELAY=Ge.GET_METHOD=void 0,Ge.GET_METHOD="GET",Ge.MAX_RETRY_DELAY=18e4,Ge.MAX_CONFLICT_RETRY_DELAY=63e3,Ge.MAX_BACKOFF_LIMIT=8e3,Ge.INITIAL_RETRY_DELAY=1e3,Ge.REFETCH_CHECK_DELAY=168e4,Ge.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Ge.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Ge.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.getProdHqConfig=ht.getProdApiConfig=ht.getSitHqConfig=ht.getSitApiConfig=ht.getDevHqConfig=ht.getDevApiConfig=void 0;var Lr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},Cm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:Lr}};ht.getDevApiConfig=Cm;var xm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:Lr}};ht.getDevHqConfig=xm;var vm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:Lr}};ht.getSitApiConfig=vm;var Em=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:Lr}};ht.getSitHqConfig=Em;var Im=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:Lr}};ht.getProdApiConfig=Im;var wm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:Lr}};ht.getProdHqConfig=wm;var _m=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Sm=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.expireToken=Pe.validateToken=Pe.validateAccount=Pe.getConfig=Pe.introduceDelay=Pe.isTokenInExpiryWindow=Pe.getStoredAuthData=Pe.setUserDetails=Pe.setTokenAndExpiry=Pe.getRandomDelay=Pe.hasValidToken=void 0;var Ri=Ge,Un=ht,rd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Mi=function(e){var t=parseInt(sessionStorage.getItem("hiverAuthUserId")||"0"),n=parseInt(sessionStorage.getItem("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Pe.validateAccount=Mi;var Tm=function(e){var t=Mi(e);return!od()&&t};Pe.validateToken=Tm;var Am=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Pe.expireToken=Am;var Lm=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=rd(),o=Mi(e);return r<n&&o};Pe.hasValidToken=Lm;var Om=function(){return Math.floor(Math.random()*6e4)+6e4};Pe.getRandomDelay=Om;var Fm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");sessionStorage.setItem("hiverAuthUserId",e),sessionStorage.setItem("hiverAuthUserGroupId",t)};Pe.setUserDetails=Fm;var km=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Pe.setTokenAndExpiry=km;var Dm=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry"),t=sessionStorage.getItem("hiverAuthToken"),n=sessionStorage.getItem("hiverAuthUserId"),r=sessionStorage.getItem("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Pe.getStoredAuthData=Dm;var od=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=rd(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Pe.isTokenInExpiryWindow=od;var Nm=function(e){return _m(void 0,void 0,void 0,function(){return Sm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Pe.introduceDelay=Nm;var Rm=function(e,t,n){switch(t){case Ri.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,Un.getSitHqConfig)(e)),n?(0,Un.getSitApiConfig)(e):(0,Un.getSitHqConfig)(e);case Ri.TIERS.PROD:return n?(0,Un.getProdApiConfig)():(0,Un.getProdHqConfig)();case Ri.TIERS.DEV:default:return n?(0,Un.getDevApiConfig)():(0,Un.getDevHqConfig)()}};Pe.getConfig=Rm;var Io={},fn={},sd;function Mm(){if(sd)return fn;sd=1;var e=pe&&pe.__awaiter||function(y,v,b,p){function h(m){return m instanceof b?m:new b(function(x){x(m)})}return new(b||(b=Promise))(function(m,x){function C(_){try{E(p.next(_))}catch(T){x(T)}}function I(_){try{E(p.throw(_))}catch(T){x(T)}}function E(_){_.done?m(_.value):h(_.value).then(C,I)}E((p=p.apply(y,v||[])).next())})},t=pe&&pe.__generator||function(y,v){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,x;return x={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function C(E){return function(_){return I([E,_])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;x&&(x=0,E[0]&&(b=0)),b;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,h=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){b.label=E[1];break}if(E[0]===6&&b.label<m[1]){b.label=m[1],m=E;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(E);break}m[2]&&b.ops.pop(),b.trys.pop();continue}E=v.call(y,b)}catch(_){E=[6,_],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(fn,"__esModule",{value:!0}),fn.getV2LoginCode=fn.getLoginToken=fn.getAccessToken=void 0;var n=Ge,r=ld(),o=Pe,s=function(y,v,b){var p=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:v.userId,usergroup_id:v.usergroupId,access_token:(p==null?void 0:p.token)||"",source:b},withCredentials:!0}},a=function(y,v){return{root_url:v.heimdallUrl,url:v.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,v){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:v||n.APP_UI.DEFAULT}}},l=function(y,v,b,p){return e(void 0,void 0,void 0,function(){var h,m,x,C,I,E,_;return t(this,function(T){switch(T.label){case 0:return T.trys.push([0,4,,5]),(0,o.validateToken)(b)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),h=s(v,b,p),[4,(0,r.makeAxiosCall)(h,y)]);case 1:return m=T.sent(),[2,{atToken:(C=m==null?void 0:m.data.at)===null||C===void 0?void 0:C.token,expiryTime:(I=m==null?void 0:m.data.at)===null||I===void 0?void 0:I.expires_at,userId:(E=m==null?void 0:m.data)===null||E===void 0?void 0:E.user_id,userGroupId:(_=m==null?void 0:m.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw x=T.sent(),x;case 5:return[2]}})})};fn.getAccessToken=l;var f=function(y,v,b){return e(void 0,void 0,void 0,function(){var p,h,m,x,C,I,E;return t(this,function(_){switch(_.label){case 0:p=a(y,b),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(p,v)];case 2:return h=_.sent(),[2,{userId:(x=h==null?void 0:h.data)===null||x===void 0?void 0:x.user_id,userGroupId:(C=h==null?void 0:h.data)===null||C===void 0?void 0:C.usergroup_id,atToken:(I=h==null?void 0:h.data.at)===null||I===void 0?void 0:I.token,expiryTime:(E=h==null?void 0:h.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw m=_.sent(),m;case 4:return[2]}})})};fn.getLoginToken=f;var g=function(y,v,b){return e(void 0,void 0,void 0,function(){var p,h,m;return t(this,function(x){switch(x.label){case 0:return x.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),p=c(v,b),[4,(0,r.makeAxiosCall)(p,y)];case 1:return h=x.sent(),console.log("DEBUG HEIMDALL: local storage:",h==null?void 0:h.data),[2,h==null?void 0:h.data.code];case 2:throw m=x.sent(),m;case 3:return[2]}})})};return fn.getV2LoginCode=g,fn}var ad;function id(){if(ad)return Io;ad=1;var e=pe&&pe.__awaiter||function(v,b,p,h){function m(x){return x instanceof p?x:new p(function(C){C(x)})}return new(p||(p=Promise))(function(x,C){function I(T){try{_(h.next(T))}catch(S){C(S)}}function E(T){try{_(h.throw(T))}catch(S){C(S)}}function _(T){T.done?x(T.value):m(T.value).then(I,E)}_((h=h.apply(v,b||[])).next())})},t=pe&&pe.__generator||function(v,b){var p={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},h,m,x,C;return C={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function I(_){return function(T){return E([_,T])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,_[0]&&(p=0)),p;)try{if(h=1,m&&(x=_[0]&2?m.return:_[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,_[1])).done)return x;switch(m=0,x&&(_=[_[0]&2,x.value]),_[0]){case 0:case 1:x=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,m=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(x=p.trys,!(x=x.length>0&&x[x.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!x||_[1]>x[0]&&_[1]<x[3])){p.label=_[1];break}if(_[0]===6&&p.label<x[1]){p.label=x[1],x=_;break}if(x&&p.label<x[2]){p.label=x[2],p.ops.push(_);break}x[2]&&p.ops.pop(),p.trys.pop();continue}_=b.call(v,p)}catch(T){_=[6,T],m=0}finally{h=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(Io,"__esModule",{value:!0}),Io.fetchToken=void 0;var n=Mm(),r=Ge,o=Pe,s,a,i,c=function(v,b,p){return p===void 0&&(p=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var h,m,x,C,I,E,_,T,S;return t(this,function(L){switch(L.label){case 0:h=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",p),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,v,p)];case 2:return m=L.sent(),[4,(0,n.getLoginToken)(m,r.CONFIG_HIVER,v)];case 3:return x=L.sent(),C=x.userId,I=x.userGroupId,E=x.atToken,_=x.expiryTime,(0,o.setTokenAndExpiry)(E,_),(0,o.setUserDetails)(C,I),[3,9];case 4:T=L.sent(),console.log("ERROR debug: in error login:",T,p),S=b,L.label=5;case 5:return S<h?[4,c(v,S+1,p)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw T;case 9:return[2]}})})},l=function(v,b,p){return e(void 0,void 0,void 0,function(){var h,m,x,C;return t(this,function(I){switch(I.label){case 0:return b<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,v)})]:[3,3];case 1:return I.sent(),b+=v,v*2<=r.MAX_BACKOFF_LIMIT?v*=2:v=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",v),h=p.retryDelay,m=p.configs,x=p.api_params,C=p.appUI,[4,f(h,v,b,m,x,C)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},f=function(v,b,p,h,m,x,C){return x===void 0&&(x="default"),e(void 0,void 0,void 0,function(){var I,E,_,T,S,L,N,k,D,P,V,z,$,Q;return t(this,function(X){switch(X.label){case 0:return X.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,m,x)];case 1:return I=X.sent(),E=I.atToken,_=I.expiryTime,T=I.userId,S=I.userGroupId,E&&_&&(0,o.setTokenAndExpiry)(E,_),T&&S&&(0,o.setUserDetails)(T,S),v=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return L=X.sent(),console.log("ERROR: Heimdall fetch token",L),((D=L.response)===null||D===void 0?void 0:D.status)===401||((P=L.request)===null||P===void 0?void 0:P.status)===401?(N=1,[4,c(h,N,C)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((V=L.response)===null||V===void 0?void 0:V.status)===409||((z=L.request)===null||z===void 0?void 0:z.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),k={retryDelay:v,configs:h,api_params:m,appUI:C},[4,l(b,p,k)]):[3,6];case 5:if(X.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!((($=L.response)===null||$===void 0?void 0:$.status)===422||((Q=L.request)===null||Q===void 0?void 0:Q.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return v<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,v)})]:[3,10];case 8:return X.sent(),v*=2,console.log("Heimdall: Fetch token post doubling retry delay",v),[4,f(v,b,p,h,m,C)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(v,b,p,h,m,x){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=0),e(void 0,void 0,void 0,function(){var C,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),C=(0,o.isTokenInExpiryWindow)(),C?(I=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(I)]):[3,3];case 1:return _.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,f(p,h,m,v,b,x)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw E=_.sent(),E;case 5:return[2]}})})},y=function(v,b,p,h,m,x){return e(void 0,void 0,void 0,function(){var C,I,E,_,T;return t(this,function(S){switch(S.label){case 0:s=v,a=b,C=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,E=0,_=(0,o.getConfig)(s,a,h),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(C,I,E,_,p,m,x)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return g(_,p)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",i),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(L){switch(L.label){case 0:return console.log("Online status detected. Fetching token..."),[4,g(_,p)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw T=S.sent(),T;case 4:return[2]}})})};return Io.fetchToken=y,Io}var cd;function ld(){if(cd)return Eo;cd=1;var e=pe&&pe.__assign||function(){return e=Object.assign||function(y){for(var v,b=1,p=arguments.length;b<p;b++){v=arguments[b];for(var h in v)Object.prototype.hasOwnProperty.call(v,h)&&(y[h]=v[h])}return y},e.apply(this,arguments)},t=pe&&pe.__awaiter||function(y,v,b,p){function h(m){return m instanceof b?m:new b(function(x){x(m)})}return new(b||(b=Promise))(function(m,x){function C(_){try{E(p.next(_))}catch(T){x(T)}}function I(_){try{E(p.throw(_))}catch(T){x(T)}}function E(_){_.done?m(_.value):h(_.value).then(C,I)}E((p=p.apply(y,v||[])).next())})},n=pe&&pe.__generator||function(y,v){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,x;return x={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function C(E){return function(_){return I([E,_])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;x&&(x=0,E[0]&&(b=0)),b;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,h=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){b.label=E[1];break}if(E[0]===6&&b.label<m[1]){b.label=m[1],m=E;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(E);break}m[2]&&b.ops.pop(),b.trys.pop();continue}E=v.call(y,b)}catch(_){E=[6,_],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.makeAxiosCall=void 0;var r=Ju,o=Pe,s=id(),a,i=2,c=function(y,v){var b=v.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",b):(y.data=y.data||{},y.data._csrf_token=b)},l=function(y){var v=!y.method||y.method.toLowerCase()==="get"?{params:y.data}:{data:y.data},b=e(e({method:y.method,url:"".concat(y.root_url).concat(y.url),headers:y.headers},v),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return b};function f(y){return t(this,void 0,void 0,function(){var v;return n(this,function(b){return v=l(y),[2,(0,r.default)(v).then(function(p){return p}).catch(function(p){throw p})]})})}function g(y,v,b,p){var h,m;return p===void 0&&(p=0),t(this,void 0,void 0,function(){var x,C,I,E,_,T;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(v.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(x=y.app_env,C=y.tier,!x||!C)throw Error("app_env or tier missing : ".concat(x,"/").concat(C));return"userId"in y&&"usergroupId"in y?(I={userId:y.userId,usergroupId:y.usergroupId},typeof v.isHiverApiDomain!="boolean"&&(v.isHiverApiDomain=!0),[4,(0,s.fetchToken)(x,C,I,v.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,v),v.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",y.headers=e(e({},y.headers),{Authorization:"Bearer ".concat(a)})),[4,f(y)];case 3:return E=S.sent(),y.onSuccess&&y.onSuccess(E),[2,E];case 4:if(_=S.sent(),T=((h=_.response)===null||h===void 0?void 0:h.status)===403||((m=_.request)===null||m===void 0?void 0:m.status)===403,p<i&&T)return(0,o.expireToken)(),[2,g(y,v,b,p+1)];if(p>=i&&T||!T)throw y.onFail&&y.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Eo.makeAxiosCall=g,Eo}(function(e){var t=pe&&pe.__awaiter||function(v,b,p,h){function m(x){return x instanceof p?x:new p(function(C){C(x)})}return new(p||(p=Promise))(function(x,C){function I(T){try{_(h.next(T))}catch(S){C(S)}}function E(T){try{_(h.throw(T))}catch(S){C(S)}}function _(T){T.done?x(T.value):m(T.value).then(I,E)}_((h=h.apply(v,b||[])).next())})},n=pe&&pe.__generator||function(v,b){var p={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},h,m,x,C;return C={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function I(_){return function(T){return E([_,T])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,_[0]&&(p=0)),p;)try{if(h=1,m&&(x=_[0]&2?m.return:_[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,_[1])).done)return x;switch(m=0,x&&(_=[_[0]&2,x.value]),_[0]){case 0:case 1:x=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,m=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(x=p.trys,!(x=x.length>0&&x[x.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!x||_[1]>x[0]&&_[1]<x[3])){p.label=_[1];break}if(_[0]===6&&p.label<x[1]){p.label=x[1],x=_;break}if(x&&p.label<x[2]){p.label=x[2],p.ops.push(_);break}x[2]&&p.ops.pop(),p.trys.pop();continue}_=b.call(v,p)}catch(T){_=[6,T],m=0}finally{h=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=nd(),o=ed(),s=wn;Object.defineProperty(e,"TENANT_PLATFORM",{enumerable:!0,get:function(){return s.TENANT_PLATFORM}}),Object.defineProperty(e,"DEFAULT_INIT_CONFIG_HIVER",{enumerable:!0,get:function(){return s.DEFAULT_INIT_CONFIG_HIVER}});var a=Qu(),i=_e,c=Jt,l=ld();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=id();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var g=qt,y=function(){function v(b,p,h,m,x,C){h===void 0&&(h=s.TENANT_PLATFORM.GMAIL),m===void 0&&(m=null),x===void 0&&(x=!0),C===void 0&&(C=!1),this.setEnvironment(),this.appEnv=b,this.tier=p,this.tenantPlatform=h,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=m,this.withCredentials=x,this.csrfToken=C}return v.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},v.prototype.hiverAxios=function(b,p,h,m){return p===void 0&&(p=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var x,C;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),m&&m<2?(x={userId:b.userId,usergroupId:b.usergroupId,apiRetry:m},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,x,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:I.sent(),I.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,b,p,h)];case 3:return[2,I.sent()];case 4:throw C=I.sent(),console.log("ERROR: Axios call failed",C),C;case 5:return[2]}})})},v.prototype.fetchAuthToken=function(b,p,h){return t(this,void 0,void 0,function(){var m;return n(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,b,this.tenantPlatform,this.getTokenForLogin,p,h)]);case 1:return x.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),x.label=3;case 3:return[3,8];case 4:return m=x.sent(),console.log("ERROR: Fetching token failed",m),this.authTokenFetchingInProgress=!1,[4,new Promise(function(C){return setTimeout(C,100)})];case 5:return x.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,p,h)];case 6:return x.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},v.prototype.logout=function(){return t(this,void 0,void 0,function(){var b,p;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),b=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(b,this.tenantPlatform)];case 1:return h.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw p=h.sent(),console.error("Heimdall: Logout failed",p),p;case 3:return[2]}})})},v.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},v}();e.Bifrost=y})(pi);const jt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Bt=()=>{if(!jt.isInitiated)return null;if(!jt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return jt},Pm=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=pi.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{jt.baseUrl=e,jt.appEnv=t,jt.tier=n,jt.userGroupId=o,jt.userId=r,jt.tenantPlatform=s,jt.bifrost=new pi.Bifrost(t,n,s,i,a),jt.isInitiated=!0},Le=(({configHiver:e})=>async n=>{const r=Bt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:a}=r,{url:i,method:c,root_url:l}=n,g={root_url:(l||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(g,{...e,isHiverApiDomain:!0}))}catch(y){throw console.error("API call failed with error: ",y),y}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),jm=e=>A.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1180_840)"},A.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1180_840"},A.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Bm=e=>A.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),A.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),Vm=e=>A.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_825_73646)"},A.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_825_73646"},A.createElement("rect",{width:24,height:24,fill:"white"})))),Gm="Rate your experience with Hiver Apps",Hm="Share feedback on Apps",Wm="Got any feedback?",ud="https://txeep2wshyx.typeform.com/to/RuOwF9SG",Zm="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",Xm="https://txeep2wshyx.typeform.com/to/bqhVSfDk",zm="https://cdn.hiverhq.com/chat-support/hiver-chat.html",Ym="enable_connectors_clicked",Jm="learn_more_clicked",qm="connector_card_expand_clicked",$m="connector_card_collapsed_clicked",Qm="connector_card_refresh_clicked",Um="connector_cards_loaded",Km="connector_whats_new_card_viewed",e3="connector_whats_new_explore_now_clicked",t3="connector_whats_new_learn_more_clicked",n3="connector_whats_new_dismissed",r3="connector_create_new_object_clicked",o3="connector_link_new_object_clicked",s3="connector_new_object_created_by_form",a3="connector_new_object_linked_by_form",i3="connector_object_unlinked_by_form",c3="connector_link_preview_clicked",l3="connector_create_panel_cancel_clicked",u3="connector_create_panel_back_clicked",d3="card_loaded_on_click",f3="card_loaded",p3="schedule_call_clicked",h3="schedule_call_cross_clicked",dd="CONNECTOR_EDIT_CLICKED",g3="CONNECTOR_EDIT_REQUEST_SEND",m3="CONNECTOR_EDIT_CANCELLED",b3="CONNECTOR_EDIT_BACK_CLICKED",y3="CONNECTOR_EDIT_SUCCESS",C3="connector_video_clicked",x3="connector_card_error",Pi="got_any_feedback_clicked",v3="connector_deeplink_clicked",E3="search_bar_tapped",I3="search_suggestions_selected",w3="search_initiated",_3="no_results_found",S3="search_results_found",T3="search_result_selected",A3="search_result_linked",L3="feedback_closed_clicked",O3="help_btn_clicked",F3="connector_chat_support_clicked",k3="missing_field_clicked",fd="clicked_on_lookup_config",D3="clicked_on_lookup_field",N3="saved_lookup_config",R3={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Be=w.createContext(R3),Ts="hiver_connectors",ji={NOT_FOUND:404},M3="ftr-connector-blue-dot",pd="ftr-connectors-write-flow",P3="ftr-connectors-enhancements",j3="ftr-connector-schedule-call-agent",B3="ftr-connectors-edit",V3="enableAllConnectorFtr",G3="ftr-cards-open-state",H3="ftr-connectors-global-search",W3="ftr-connectors-smart-suggestions",Z3="ftr-connectors-email-selection",X3="ftr-connector-agent-feedback",As="ftr-connector-unified-view",z3="ftr-connectors-expanded-form",hd="ftr-apps-lookup-revamp",gd="Please refresh and try again",Y3="No data available",Ls="-",md="Refresh",bd="Minimize",Bi="Expand",yd="Connectors",Vi="Apps",J3="Collapse",q3="Close",Cd="Link",$3="Create",Q3="Update",xd="Unlink",vd="Edit",Gi="Cancel",Ed="Create new object",Id="Link existing object",U3="Are you sure you want to unlink this object?",K3="The object will be removed from this conversation for all users. However the object will still be available on {{connectorName}} if you'd like to link it back in the future.",e5="Edit card",t5="bullet_list",n5="Expanded",r5="Collapsed",wd="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",_d="UNKNOWN_ERROR",o5="https://help.hiverhq.com/custom-connectors/common-connector-errors",Sd={MAIN_BUTTON:"main_button",ICON:"create_icon"},s5="Missing any fields? Inform us.",Hi=e=>{let t=localStorage.getItem(Ts);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},a5=e=>!!Hi(e),Td=()=>{const{userId:e=""}=Bt()||{};return String(e)},i5=(e,t=Td())=>{const n=Hi(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Wi=(e,t=!1,n=!1)=>{const r=Td(),o=Hi(e);if(t||!o){localStorage.removeItem(Ts);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Ts,JSON.stringify(s));return}else{const s=(o==null?void 0:o.isExtensionNew)??[],a=(o==null?void 0:o.extensionExpand)??[],i={[e]:{...o,...!n&&{isExtensionNew:[...new Set([...s,r])]},...n&&{extensionExpand:[...new Set([...a,r])]}}};localStorage.setItem(Ts,JSON.stringify(i));return}},et=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[V3])===!0:(e==null?void 0:e[t])===!0,gt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Ad=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?n5:r5,r&&e?(o.data_state=e==null?void 0:e.status,o.connector_names=(s=e==null?void 0:e.data)==null?void 0:s.connectorNames):e&&(o.data_state=(e==null?void 0:e.status)||"unknown_error"),o},Ld=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==ji.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay={data:t}}else{const t=e.data.flatDisplay.data.filter(n=>Number(n.statusCode)!==ji.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay.data=t}break;case"flat_with_list":e.data.listItems.fields=e.data.listItems.fields.map(t=>Array.isArray(t)?{data:t.sort((r,o)=>r.priority-o.priority)}:{data:t.data.sort((r,o)=>r.priority-o.priority),externalResourceId:t.externalResourceId});break}return e},c5=e=>{if(!e||Object.keys(e).length===0)return[];const t=new Set;return Object.values(e).forEach(n=>{n.connectorNames&&n.connectorNames.forEach(r=>t.add(r))}),Array.from(t)},Os=({url:e,params:t})=>{const n=Object.entries(t).reduce((o,[s,a])=>(a!==void 0&&a!==""&&a!==null&&(o[s]=a),o),{}),r=new URL(e);return Object.entries(n).forEach(([o,s])=>{r.searchParams.set(o,s)}),r.toString()};function Od(e,t){return e.length>t?e.substring(0,t)+"...":e}const l5=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1187_180)"},A.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1187_180"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),u5=e=>A.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_847_49587)"},A.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_847_49587"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),d5=d.keyframes`
34
+ `):" "+Hu(s[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:_i};function Si(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ir(null,e)}function Zu(e){return Si(e),e.headers=jt.from(e.headers),e.data=Ii.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Wu.getAdapter(e.adapter||vi.adapter)(e).then(function(r){return Si(e),r.data=Ii.call(e,e.transformResponse,r),r.headers=jt.from(r.headers),r},function(r){return Fu(r)||(Si(e),r&&r.response&&(r.response.data=Ii.call(e,e.transformResponse,r.response),r.response.headers=jt.from(r.response.headers))),Promise.reject(r)})}const Xu="1.7.7",Ti={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ti[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const zu={};Ti.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Xu+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new be(o(a," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!zu[a]&&(zu[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};function Vg(e,t,n){if(typeof e!="object")throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],c=i===void 0||a(i,s,e);if(c!==!0)throw new be("option "+s+" must be "+c,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+s,be.ERR_BAD_OPTION)}}var Ai={assertOptions:Vg,validators:Ti};const In=Ai.validators;let _s=class{constructor(t){this.defaults=t,this.interceptors={request:new Tu,response:new Tu}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
+ `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Ai.assertOptions(r,{silentJSONParsing:In.transitional(In.boolean),forcedJSONParsing:In.transitional(In.boolean),clarifyTimeoutError:In.transitional(In.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Ai.assertOptions(o,{encode:In.function,serialize:In.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=jt.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let f,g=0,y;if(!c){const b=[Zu.bind(this),void 0];for(b.unshift.apply(b,i),b.push.apply(b,l),y=b.length,f=Promise.resolve(n);g<y;)f=f.then(b[g++],b[g++]);return f}y=i.length;let v=n;for(g=0;g<y;){const b=i[g++],p=i[g++];try{v=b(v)}catch(h){p.call(this,h);break}}try{f=Zu.call(this,v)}catch(b){return Promise.reject(b)}for(g=0,y=l.length;g<y;)f=f.then(l[g++],l[g++]);return f}getUri(t){t=Jn(this.defaults,t);const n=Ru(t.baseURL,t.url);return Su(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){_s.prototype[t]=function(n,r){return this.request(Jn(r||{},{method:t,url:n,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(Jn(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}_s.prototype[t]=n(),_s.prototype[t+"Form"]=n(!0)});var Ss=_s;class Li{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new Ir(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Li(function(o){t=o}),cancel:t}}}var Gg=Li;function Hg(e){return function(n){return e.apply(null,n)}}function Wg(e){return R.isObject(e)&&e.isAxiosError===!0}const Oi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Oi).forEach(([e,t])=>{Oi[t]=e});var Zg=Oi;function Yu(e){const t=new Ss(e),n=uu(Ss.prototype.request,t);return R.extend(n,Ss.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Yu(Jn(e,o))},n}const Xe=Yu(vi);Xe.Axios=Ss,Xe.CanceledError=Ir,Xe.CancelToken=Gg,Xe.isCancel=Fu,Xe.VERSION=Xu,Xe.toFormData=Cs,Xe.AxiosError=be,Xe.Cancel=Xe.CanceledError,Xe.all=function(t){return Promise.all(t)},Xe.spread=Hg,Xe.isAxiosError=Wg,Xe.mergeConfig=Jn,Xe.AxiosHeaders=jt,Xe.formToJSON=e=>Lu(R.isHTMLForm(e)?new FormData(e):e),Xe.getAdapter=Wu.getAdapter,Xe.HttpStatusCode=Zg,Xe.default=Xe;var Ju=Xe,_e={},wn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PLATFORM=e.TENANT_PLATFORM=e.API_CALL_ORIGIN=e.TIERS=e.APP_UI=e.CONFIG_HIVER=e.DEFAULT_INIT_CONFIG_HIVER=e.TWO_MINUTES_IN_MS=e.REFETCH_CHECK_DELAY=e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=e.INITIAL_RETRY_DELAY=e.MAX_BACKOFF_LIMIT=e.MAX_CONFLICT_RETRY_DELAY=e.MAX_RETRY_DELAY=e.GET_METHOD=void 0,e.GET_METHOD="GET",e.MAX_RETRY_DELAY=18e4,e.MAX_CONFLICT_RETRY_DELAY=63e3,e.MAX_BACKOFF_LIMIT=8e3,e.INITIAL_RETRY_DELAY=1e3,e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=3e3,e.REFETCH_CHECK_DELAY=168e4,e.TWO_MINUTES_IN_MS=2*60*1e3,e.DEFAULT_INIT_CONFIG_HIVER={getToken:!0,isHiverApiDomain:!0,fetchCsrfToken:function(){return""}},e.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},e.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},e.TIERS={DEV:"dev",SIT:"sit",QA:"qa",PRODUCTION:"production",PROD:"prod"},e.API_CALL_ORIGIN={API_RETRY:"Api Retry"},e.TENANT_PLATFORM={GMAIL:"GMAIL",HIVERWEB:"HIVERWEB"},function(t){t[t.WEB=0]="WEB",t[t.MOBILE=1]="MOBILE"}(e.PLATFORM||(e.PLATFORM={}))})(wn);var ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.getProdHqConfig=ht.getProdApiConfig=ht.getSitHqConfig=ht.getSitApiConfig=ht.getDevHqConfig=ht.getDevApiConfig=void 0;var wr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},Xg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:wr}};ht.getDevApiConfig=Xg;var zg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:wr}};ht.getDevHqConfig=zg;var Yg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:wr}};ht.getSitApiConfig=Yg;var Jg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),hotUrl:"https://api-staging.hiverhq.co.in",apiEndpoints:wr}};ht.getSitHqConfig=Jg;var qg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:wr}};ht.getProdApiConfig=qg;var $g=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:wr}};ht.getProdHqConfig=$g;var Qt={},Ut={};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.removeValue=Ut.getValue=Ut.setValue=void 0;var Fi={};function Qg(e,t){Fi[e]=t}Ut.setValue=Qg;function Ug(e){return Fi[e]}Ut.getValue=Ug;function Kg(e){delete Fi[e]}Ut.removeValue=Kg,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.removeItemFromStorage=Qt.setItemInStorage=Qt.getItemFromStorage=void 0;var _r=wn,Sr=Ut,em=function(e,t){switch(t===void 0&&(t=(0,Sr.getValue)("PLATFORM")),t){case _r.PLATFORM.WEB:return sessionStorage.getItem(e);case _r.PLATFORM.MOBILE:return(0,Sr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};Qt.getItemFromStorage=em;var tm=function(e,t,n){switch(n===void 0&&(n=(0,Sr.getValue)("PLATFORM")),n){case _r.PLATFORM.WEB:return sessionStorage.setItem(e,t);case _r.PLATFORM.MOBILE:return(0,Sr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};Qt.setItemInStorage=tm;var nm=function(e,t){switch(t===void 0&&(t=(0,Sr.getValue)("PLATFORM")),t){case _r.PLATFORM.WEB:sessionStorage.removeItem(e);break;case _r.PLATFORM.MOBILE:(0,Sr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};Qt.removeItemFromStorage=nm;var rm=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},om=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(_e,"__esModule",{value:!0}),_e.expireToken=_e.invalidateToken=_e.validateToken=_e.validateAccount=_e.getConfig=_e.introduceDelay=_e.isTokenInExpiryWindow=_e.getStoredAuthData=_e.setUserDetails=_e.getRefreshInterval=_e.setTokenAndExpiry=_e.getRandomDelay=_e.hasValidToken=void 0;var dn=wn,Tr=ht,St=Qt,ki=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Di=function(e){var t=parseInt((0,St.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,St.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};_e.validateAccount=Di;var sm=function(e){var t=Di(e);return!qu()&&t};_e.validateToken=sm;var am=function(e){return e.apiRetry?e.apiRetry>0:!1};_e.invalidateToken=am;var im=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};_e.expireToken=im;var cm=function(e){var t=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=ki(),o=Di(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};_e.hasValidToken=cm;var lm=function(){return Math.floor(Math.random()*6e4)+6e4};_e.getRandomDelay=lm;var um=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,St.setItemInStorage)("hiverAuthUserId",e),(0,St.setItemInStorage)("hiverAuthUserGroupId",t)};_e.setUserDetails=um;var dm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,St.setItemInStorage)("hiverAuthToken",e),(0,St.setItemInStorage)("hiverAuthTokenExpiry",t)};_e.setTokenAndExpiry=dm;var fm=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,St.getItemFromStorage)("hiverAuthToken"),n=(0,St.getItemFromStorage)("hiverAuthUserId"),r=(0,St.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};_e.getStoredAuthData=fm;var qu=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=ki(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};_e.isTokenInExpiryWindow=qu;var pm=function(e){return rm(void 0,void 0,void 0,function(){return om(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};_e.introduceDelay=pm;var hm=function(e,t,n){switch(n===void 0&&(n=!0),t){case dn.TIERS.SIT:case dn.TIERS.QA:return n?(0,Tr.getSitApiConfig)(e):(0,Tr.getSitHqConfig)(e);case dn.TIERS.PRODUCTION:case dn.TIERS.PROD:return n?(0,Tr.getProdApiConfig)():(0,Tr.getProdHqConfig)();case dn.TIERS.DEV:default:return n?(0,Tr.getDevApiConfig)():(0,Tr.getDevHqConfig)()}};_e.getConfig=hm;var gm=function(){try{var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return dn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=ki();return t.getTime()-n.getTime()>dn.TWO_MINUTES_IN_MS?t.getTime()-dn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),dn.REFETCH_CHECK_DELAY}};_e.getRefreshInterval=gm;var Co={},Bt={},$u;function Qu(){if($u)return Bt;$u=1;var e=ge&&ge.__awaiter||function(b,p,h,m){function x(C){return C instanceof h?C:new h(function(I){I(C)})}return new(h||(h=Promise))(function(C,I){function E(S){try{T(m.next(S))}catch(L){I(L)}}function _(S){try{T(m.throw(S))}catch(L){I(L)}}function T(S){S.done?C(S.value):x(S.value).then(E,_)}T((m=m.apply(b,p||[])).next())})},t=ge&&ge.__generator||function(b,p){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},m,x,C,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(T){return function(S){return _([T,S])}}function _(T){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,T[0]&&(h=0)),h;)try{if(m=1,x&&(C=T[0]&2?x.return:T[0]?x.throw||((C=x.return)&&C.call(x),0):x.next)&&!(C=C.call(x,T[1])).done)return C;switch(x=0,C&&(T=[T[0]&2,C.value]),T[0]){case 0:case 1:C=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,x=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!C||T[1]>C[0]&&T[1]<C[3])){h.label=T[1];break}if(T[0]===6&&h.label<C[1]){h.label=C[1],C=T;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(T);break}C[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(b,h)}catch(S){T=[6,S],x=0}finally{m=C=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.logoutFromHeimdall=Bt.getTenantLoginCode=Bt.getLoginToken=Bt.getAccessToken=void 0;var n=wn,r=nd(),o=_e,s=function(b,p,h,m){var x=(0,o.getStoredAuthData)(),C=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":C},data:{user_id:p.userId,usergroup_id:p.usergroupId,access_token:(x==null?void 0:x.token)||"",source:m}}},a=function(b,p,h,m,x){var C=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:p.heimdallUrl,url:p.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},headers:{"x-hiver-tenant":C,"x-hiver-userid":m,"x-hiver-usergroupid":x}}},i=function(b,p){var h=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":h}}},c=function(b){return parseInt(b,10)},l=function(b,p,h,m){return{root_url:h===n.TENANT_PLATFORM.HIVERWEB?b.hotUrl:b.v2Url,url:h===n.TENANT_PLATFORM.HIVERWEB?b.apiEndpoints.hotLogin:b.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(p.userId),app:m||n.APP_UI.DEFAULT}}},f=function(b,p,h,m,x){return e(void 0,void 0,void 0,function(){var C,I,E,_,T,S,L;return t(this,function(N){switch(N.label){case 0:console.log("GETTOKEN tenantPlatform -> ",m),N.label=1;case 1:return N.trys.push([1,5,,6]),!(0,o.validateToken)(h)||(0,o.invalidateToken)(h)?(console.log("HEIMDALL: No valid token, fetching token"),C=s(p,h,m,x),[4,(0,r.performAxiosCall)(C)]):[3,3];case 2:return I=N.sent(),[2,{atToken:(_=I==null?void 0:I.data.at)===null||_===void 0?void 0:_.token,expiryTime:(T=I==null?void 0:I.data.at)===null||T===void 0?void 0:T.expires_at,userId:(S=I==null?void 0:I.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=I==null?void 0:I.data)===null||L===void 0?void 0:L.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw E=N.sent(),E;case 6:return[2]}})})};Bt.getAccessToken=f;var g=function(b,p,h,m,x,C){return e(void 0,void 0,void 0,function(){var I,E,_,T,S,L,N;return t(this,function(k){switch(k.label){case 0:I=a(b,h,m,x,C),k.label=1;case 1:return k.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return E=k.sent(),[2,{userId:(T=E==null?void 0:E.data)===null||T===void 0?void 0:T.user_id,userGroupId:(S=E==null?void 0:E.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=E==null?void 0:E.data.at)===null||L===void 0?void 0:L.token,expiryTime:(N=E==null?void 0:E.data.at)===null||N===void 0?void 0:N.expires_at}];case 3:throw _=k.sent(),_;case 4:return[2]}})})};Bt.getLoginToken=g;var y=function(b,p,h,m,x){return e(void 0,void 0,void 0,function(){var C,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",x),C=l(p,h,m,x),[4,(0,r.performAxiosCall)(C)];case 1:return I=_.sent(),[2,I==null?void 0:I.data.code];case 2:throw E=_.sent(),E;case 3:return[2]}})})};Bt.getTenantLoginCode=y;var v=function(b,p,h){return h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var m,x,C;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),m=i(b,p),[4,(0,r.performAxiosCall)(m)];case 1:return x=I.sent(),[2,x==null?void 0:x.status];case 2:return C=I.sent(),h<2?[4,v(b,p,h+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw C;case 5:return[2]}})})};return Bt.logoutFromHeimdall=v,Bt}var Ts={},mm=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},bm=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.subscribeToOnlineEvent=void 0;var Uu=wn,ym=Ut,Cm=function(e,t){switch(t===void 0&&(t=(0,ym.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Uu.PLATFORM.WEB:return window.addEventListener("online",function(){return mm(void 0,void 0,void 0,function(){return bm(this,function(n){switch(n.label){case 0:return console.log("Online status detected. Fetching token..."),[4,e()];case 1:return n.sent(),[2]}})})});case Uu.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};Ts.subscribeToOnlineEvent=Cm;var Ku;function ed(){if(Ku)return Co;Ku=1;var e=ge&&ge.__awaiter||function(b,p,h,m){function x(C){return C instanceof h?C:new h(function(I){I(C)})}return new(h||(h=Promise))(function(C,I){function E(S){try{T(m.next(S))}catch(L){I(L)}}function _(S){try{T(m.throw(S))}catch(L){I(L)}}function T(S){S.done?C(S.value):x(S.value).then(E,_)}T((m=m.apply(b,p||[])).next())})},t=ge&&ge.__generator||function(b,p){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},m,x,C,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(T){return function(S){return _([T,S])}}function _(T){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,T[0]&&(h=0)),h;)try{if(m=1,x&&(C=T[0]&2?x.return:T[0]?x.throw||((C=x.return)&&C.call(x),0):x.next)&&!(C=C.call(x,T[1])).done)return C;switch(x=0,C&&(T=[T[0]&2,C.value]),T[0]){case 0:case 1:C=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,x=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!C||T[1]>C[0]&&T[1]<C[3])){h.label=T[1];break}if(T[0]===6&&h.label<C[1]){h.label=C[1],C=T;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(T);break}C[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(b,h)}catch(S){T=[6,S],x=0}finally{m=C=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(Co,"__esModule",{value:!0}),Co.fetchAccessToken=void 0;var n=Qu(),r=wn,o=_e,s=Ts,a,i,c,l=function(b,p,h,m,x,C){return C===void 0&&(C=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,E,_,T,S,L,N,k,D;return t(this,function(M){switch(M.label){case 0:I=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",C,m),E=void 0,x?[4,x()]:[3,3];case 2:return E=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,p,m,C)];case 4:E=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,b,m,p.userId,p.usergroupId)];case 6:return _=M.sent(),T=_.userId,S=_.userGroupId,L=_.atToken,N=_.expiryTime,(0,o.setTokenAndExpiry)(L,N),(0,o.setUserDetails)(T,S),[3,12];case 7:k=M.sent(),console.log("ERROR debug: in error login:",k,C),D=h,M.label=8;case 8:return D<I?[4,l(b,p,D+1,m,x,C)]:[3,11];case 9:M.sent(),M.label=10;case 10:return D++,[3,8];case 11:throw k;case 12:return[2]}})})},f=function(b,p,h,m,x){return e(void 0,void 0,void 0,function(){var C,I,E,_;return t(this,function(T){switch(T.label){case 0:return p<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,b)})]:[3,3];case 1:return T.sent(),p+=b,b*2<=r.MAX_BACKOFF_LIMIT?b*=2:b=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",b),C=h.retryDelay,I=h.configs,E=h.apiParams,_=h.appUI,[4,g(C,b,p,I,E,m,x,_)];case 2:T.sent(),T.label=3;case 3:return[2]}})})},g=function(b,p,h,m,x,C,I,E,_){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var T,S,L,N,k,D,M,V,z,q,$,X,J,oe;return t(this,function(ae){switch(ae.label){case 0:return ae.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,m,x,C,E)];case 1:return T=ae.sent(),S=T.atToken,L=T.expiryTime,N=T.userId,k=T.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),N&&k&&(0,o.setUserDetails)(N,k),b=r.INITIAL_RETRY_DELAY,p=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return D=ae.sent(),console.log("ERROR: Heimdall fetch token",D),((z=D.response)===null||z===void 0?void 0:z.status)===401||((q=D.request)===null||q===void 0?void 0:q.status)===401?(M=1,[4,l(m,x,M,C,I,_)]):[3,4];case 3:return ae.sent(),[3,11];case 4:return(($=D.response)===null||$===void 0?void 0:$.status)===409||((X=D.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),V={retryDelay:b,configs:m,apiParams:x,appUI:_},[4,f(p,h,V,C,I)]):[3,6];case 5:if(ae.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw D;return[3,11];case 6:if(!(((J=D.response)===null||J===void 0?void 0:J.status)===422||((oe=D.request)===null||oe===void 0?void 0:oe.status)===422))return[3,7];throw console.log("ERROR: Throwing error",D.response.status),D;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(B){return setTimeout(B,b)})]:[3,10];case 8:return ae.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,g(b,p,h,m,x,C,I,_)];case 9:return ae.sent(),[3,11];case 10:throw D;case 11:return[3,12];case 12:return[2]}})})},y=function(b,p,h,m,x,C,I,E){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var _,T,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),_=(0,o.isTokenInExpiryWindow)(),_?(T=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(T)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,g(h,m,x,b,p,C,I,E)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},v=function(b,p,h,m,x,C,I){return e(void 0,void 0,void 0,function(){var E,_,T,S,L,N;return t(this,function(k){switch(k.label){case 0:a=b,i=p,E=r.INITIAL_RETRY_DELAY,_=r.INITIAL_RETRY_DELAY,T=0,S=(0,o.getConfig)(a,i),console.log("Instance: Fetch Call"),k.label=1;case 1:return k.trys.push([1,3,,4]),[4,g(E,_,T,S,h,m,x,C,I)];case 2:return k.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return y(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,x,I)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(D){switch(D.label){case 0:return[4,y(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,x,I)];case 1:return D.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return N=k.sent(),console.log("ERROR: Fetching token failed",N),[3,4];case 4:return[2]}})})};return Co.fetchAccessToken=v,Co}var td;function nd(){if(td)return zn;td=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(p){for(var h,m=1,x=arguments.length;m<x;m++){h=arguments[m];for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(p[C]=h[C])}return p},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(p,h,m,x){function C(I){return I instanceof m?I:new m(function(E){E(I)})}return new(m||(m=Promise))(function(I,E){function _(L){try{S(x.next(L))}catch(N){E(N)}}function T(L){try{S(x.throw(L))}catch(N){E(N)}}function S(L){L.done?I(L.value):C(L.value).then(_,T)}S((x=x.apply(p,h||[])).next())})},n=ge&&ge.__generator||function(p,h){var m={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},x,C,I,E;return E={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function _(S){return function(L){return T([S,L])}}function T(S){if(x)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(m=0)),m;)try{if(x=1,C&&(I=S[0]&2?C.return:S[0]?C.throw||((I=C.return)&&I.call(C),0):C.next)&&!(I=I.call(C,S[1])).done)return I;switch(C=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,C=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(I=m.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){m.label=S[1];break}if(S[0]===6&&m.label<I[1]){m.label=I[1],I=S;break}if(I&&m.label<I[2]){m.label=I[2],m.ops.push(S);break}I[2]&&m.ops.pop(),m.trys.pop();continue}S=h.call(p,m)}catch(L){S=[6,L],C=0}finally{x=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(zn,"__esModule",{value:!0}),zn.hiverAxiosCall=zn.performAxiosCall=void 0;var r=Ju,o=_e,s=ed(),a=Qt,i=wn,c,l=2,f=function(p,h){var m=h.fetchCsrfToken();p.formData?p.formData.append("_csrf_token",m):(p.data=p.data||{},p.data._csrf_token=m)},g=function(p,h){var m={};!p.method||p.method.toLowerCase()==="get"?m={params:p.params?p.params:p.data}:m=p.params?{params:p,data:p.data}:{data:p.data};var x=e(e({method:p.method,url:"".concat(p.root_url).concat(p.url),headers:p.headers},m),{withCredentials:h,responseType:(p==null?void 0:p.responseType)||""});return x};function y(p,h){return h===void 0&&(h=!0),t(this,void 0,void 0,function(){var m;return n(this,function(x){return m=g(p,h),[2,(0,r.default)(m).then(function(C){return C}).catch(function(C){throw C})]})})}zn.performAxiosCall=y;function v(p,h,m){return t(this,void 0,void 0,function(){var x,C,I;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),p.authTokenFetchingInProgress?[3,2]:(p.authTokenFetchingInProgress=!0,x=p.appEnv,C=p.tier,[4,(0,s.fetchAccessToken)(x,C,h,p.tenantPlatform,p.getTokenForLogin,m)]);case 1:return E.sent(),p.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(_){return setTimeout(_,100)})];case 3:return E.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,v(p,h,m)];case 4:E.sent(),E.label=5;case 5:return[3,8];case 6:return I=E.sent(),console.log("Error while fetching Auth Token :",I),p.authTokenFetchingInProgress=!1,[4,v(p,h,m)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function b(p,h,m,x,C){var I,E;return C===void 0&&(C=0),t(this,void 0,void 0,function(){var _,T,S,L,N,k,D;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(m.getToken&&!(0,o.hasValidToken)(h)))return[3,2];if(_=p.appEnv,T=p.tier,!_||!T)throw Error("appEnv or tier missing : ".concat(_,"/").concat(T));return"userId"in h&&"usergroupId"in h?(S={userId:h.userId,usergroupId:h.usergroupId},[4,v(p,S,x)]):[3,2];case 1:M.sent(),M.label=2;case 2:return p.csrfToken&&f(h,m),L=p.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,h.headers=e(e({},h.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),m.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",h.headers=e(e({},h.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",h),[4,y(h,p.withCredentials)];case 3:return N=M.sent(),h.onSuccess&&h.onSuccess(N),[2,N];case 4:if(k=M.sent(),D=((I=k.response)===null||I===void 0?void 0:I.status)===403||((E=k.request)===null||E===void 0?void 0:E.status)===403,C<l&&D)return(0,o.expireToken)(),[2,b(p,h,m,x,C+1)];if(C>=l&&D||!D)throw h.onFail&&h.onFail(k),console.log("ERROR: Reached make Axios",k),k;return[3,5];case 5:return[2]}})})}return zn.hiverAxiosCall=b,zn}var xo={},Pe={},Ge={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.TIERS=Ge.APP_UI=Ge.CONFIG_HIVER=Ge.REFETCH_CHECK_DELAY=Ge.INITIAL_RETRY_DELAY=Ge.MAX_BACKOFF_LIMIT=Ge.MAX_CONFLICT_RETRY_DELAY=Ge.MAX_RETRY_DELAY=Ge.GET_METHOD=void 0,Ge.GET_METHOD="GET",Ge.MAX_RETRY_DELAY=18e4,Ge.MAX_CONFLICT_RETRY_DELAY=63e3,Ge.MAX_BACKOFF_LIMIT=8e3,Ge.INITIAL_RETRY_DELAY=1e3,Ge.REFETCH_CHECK_DELAY=168e4,Ge.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Ge.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Ge.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.getProdHqConfig=gt.getProdApiConfig=gt.getSitHqConfig=gt.getSitApiConfig=gt.getDevHqConfig=gt.getDevApiConfig=void 0;var Ar={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},xm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:Ar}};gt.getDevApiConfig=xm;var vm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:Ar}};gt.getDevHqConfig=vm;var Em=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:Ar}};gt.getSitApiConfig=Em;var Im=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:Ar}};gt.getSitHqConfig=Im;var wm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:Ar}};gt.getProdApiConfig=wm;var _m=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:Ar}};gt.getProdHqConfig=_m;var Sm=ge&&ge.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Tm=ge&&ge.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.expireToken=Pe.validateToken=Pe.validateAccount=Pe.getConfig=Pe.introduceDelay=Pe.isTokenInExpiryWindow=Pe.getStoredAuthData=Pe.setUserDetails=Pe.setTokenAndExpiry=Pe.getRandomDelay=Pe.hasValidToken=void 0;var Ni=Ge,qn=gt,rd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Ri=function(e){var t=parseInt(sessionStorage.getItem("hiverAuthUserId")||"0"),n=parseInt(sessionStorage.getItem("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Pe.validateAccount=Ri;var Am=function(e){var t=Ri(e);return!od()&&t};Pe.validateToken=Am;var Lm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Pe.expireToken=Lm;var Om=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=rd(),o=Ri(e);return r<n&&o};Pe.hasValidToken=Om;var Fm=function(){return Math.floor(Math.random()*6e4)+6e4};Pe.getRandomDelay=Fm;var km=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");sessionStorage.setItem("hiverAuthUserId",e),sessionStorage.setItem("hiverAuthUserGroupId",t)};Pe.setUserDetails=km;var Dm=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Pe.setTokenAndExpiry=Dm;var Nm=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry"),t=sessionStorage.getItem("hiverAuthToken"),n=sessionStorage.getItem("hiverAuthUserId"),r=sessionStorage.getItem("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Pe.getStoredAuthData=Nm;var od=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=rd(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Pe.isTokenInExpiryWindow=od;var Rm=function(e){return Sm(void 0,void 0,void 0,function(){return Tm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Pe.introduceDelay=Rm;var Mm=function(e,t,n){switch(t){case Ni.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,qn.getSitHqConfig)(e)),n?(0,qn.getSitApiConfig)(e):(0,qn.getSitHqConfig)(e);case Ni.TIERS.PROD:return n?(0,qn.getProdApiConfig)():(0,qn.getProdHqConfig)();case Ni.TIERS.DEV:default:return n?(0,qn.getDevApiConfig)():(0,qn.getDevHqConfig)()}};Pe.getConfig=Mm;var vo={},fn={},sd;function Pm(){if(sd)return fn;sd=1;var e=ge&&ge.__awaiter||function(y,v,b,p){function h(m){return m instanceof b?m:new b(function(x){x(m)})}return new(b||(b=Promise))(function(m,x){function C(_){try{E(p.next(_))}catch(T){x(T)}}function I(_){try{E(p.throw(_))}catch(T){x(T)}}function E(_){_.done?m(_.value):h(_.value).then(C,I)}E((p=p.apply(y,v||[])).next())})},t=ge&&ge.__generator||function(y,v){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,x;return x={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function C(E){return function(_){return I([E,_])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;x&&(x=0,E[0]&&(b=0)),b;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,h=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){b.label=E[1];break}if(E[0]===6&&b.label<m[1]){b.label=m[1],m=E;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(E);break}m[2]&&b.ops.pop(),b.trys.pop();continue}E=v.call(y,b)}catch(_){E=[6,_],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(fn,"__esModule",{value:!0}),fn.getV2LoginCode=fn.getLoginToken=fn.getAccessToken=void 0;var n=Ge,r=ld(),o=Pe,s=function(y,v,b){var p=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:v.userId,usergroup_id:v.usergroupId,access_token:(p==null?void 0:p.token)||"",source:b},withCredentials:!0}},a=function(y,v){return{root_url:v.heimdallUrl,url:v.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,v){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:v||n.APP_UI.DEFAULT}}},l=function(y,v,b,p){return e(void 0,void 0,void 0,function(){var h,m,x,C,I,E,_;return t(this,function(T){switch(T.label){case 0:return T.trys.push([0,4,,5]),(0,o.validateToken)(b)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),h=s(v,b,p),[4,(0,r.makeAxiosCall)(h,y)]);case 1:return m=T.sent(),[2,{atToken:(C=m==null?void 0:m.data.at)===null||C===void 0?void 0:C.token,expiryTime:(I=m==null?void 0:m.data.at)===null||I===void 0?void 0:I.expires_at,userId:(E=m==null?void 0:m.data)===null||E===void 0?void 0:E.user_id,userGroupId:(_=m==null?void 0:m.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw x=T.sent(),x;case 5:return[2]}})})};fn.getAccessToken=l;var f=function(y,v,b){return e(void 0,void 0,void 0,function(){var p,h,m,x,C,I,E;return t(this,function(_){switch(_.label){case 0:p=a(y,b),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(p,v)];case 2:return h=_.sent(),[2,{userId:(x=h==null?void 0:h.data)===null||x===void 0?void 0:x.user_id,userGroupId:(C=h==null?void 0:h.data)===null||C===void 0?void 0:C.usergroup_id,atToken:(I=h==null?void 0:h.data.at)===null||I===void 0?void 0:I.token,expiryTime:(E=h==null?void 0:h.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw m=_.sent(),m;case 4:return[2]}})})};fn.getLoginToken=f;var g=function(y,v,b){return e(void 0,void 0,void 0,function(){var p,h,m;return t(this,function(x){switch(x.label){case 0:return x.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),p=c(v,b),[4,(0,r.makeAxiosCall)(p,y)];case 1:return h=x.sent(),console.log("DEBUG HEIMDALL: local storage:",h==null?void 0:h.data),[2,h==null?void 0:h.data.code];case 2:throw m=x.sent(),m;case 3:return[2]}})})};return fn.getV2LoginCode=g,fn}var ad;function id(){if(ad)return vo;ad=1;var e=ge&&ge.__awaiter||function(v,b,p,h){function m(x){return x instanceof p?x:new p(function(C){C(x)})}return new(p||(p=Promise))(function(x,C){function I(T){try{_(h.next(T))}catch(S){C(S)}}function E(T){try{_(h.throw(T))}catch(S){C(S)}}function _(T){T.done?x(T.value):m(T.value).then(I,E)}_((h=h.apply(v,b||[])).next())})},t=ge&&ge.__generator||function(v,b){var p={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},h,m,x,C;return C={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function I(_){return function(T){return E([_,T])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,_[0]&&(p=0)),p;)try{if(h=1,m&&(x=_[0]&2?m.return:_[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,_[1])).done)return x;switch(m=0,x&&(_=[_[0]&2,x.value]),_[0]){case 0:case 1:x=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,m=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(x=p.trys,!(x=x.length>0&&x[x.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!x||_[1]>x[0]&&_[1]<x[3])){p.label=_[1];break}if(_[0]===6&&p.label<x[1]){p.label=x[1],x=_;break}if(x&&p.label<x[2]){p.label=x[2],p.ops.push(_);break}x[2]&&p.ops.pop(),p.trys.pop();continue}_=b.call(v,p)}catch(T){_=[6,T],m=0}finally{h=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(vo,"__esModule",{value:!0}),vo.fetchToken=void 0;var n=Pm(),r=Ge,o=Pe,s,a,i,c=function(v,b,p){return p===void 0&&(p=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var h,m,x,C,I,E,_,T,S;return t(this,function(L){switch(L.label){case 0:h=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",p),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,v,p)];case 2:return m=L.sent(),[4,(0,n.getLoginToken)(m,r.CONFIG_HIVER,v)];case 3:return x=L.sent(),C=x.userId,I=x.userGroupId,E=x.atToken,_=x.expiryTime,(0,o.setTokenAndExpiry)(E,_),(0,o.setUserDetails)(C,I),[3,9];case 4:T=L.sent(),console.log("ERROR debug: in error login:",T,p),S=b,L.label=5;case 5:return S<h?[4,c(v,S+1,p)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw T;case 9:return[2]}})})},l=function(v,b,p){return e(void 0,void 0,void 0,function(){var h,m,x,C;return t(this,function(I){switch(I.label){case 0:return b<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,v)})]:[3,3];case 1:return I.sent(),b+=v,v*2<=r.MAX_BACKOFF_LIMIT?v*=2:v=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",v),h=p.retryDelay,m=p.configs,x=p.api_params,C=p.appUI,[4,f(h,v,b,m,x,C)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},f=function(v,b,p,h,m,x,C){return x===void 0&&(x="default"),e(void 0,void 0,void 0,function(){var I,E,_,T,S,L,N,k,D,M,V,z,q,$;return t(this,function(X){switch(X.label){case 0:return X.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,m,x)];case 1:return I=X.sent(),E=I.atToken,_=I.expiryTime,T=I.userId,S=I.userGroupId,E&&_&&(0,o.setTokenAndExpiry)(E,_),T&&S&&(0,o.setUserDetails)(T,S),v=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return L=X.sent(),console.log("ERROR: Heimdall fetch token",L),((D=L.response)===null||D===void 0?void 0:D.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(N=1,[4,c(h,N,C)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((V=L.response)===null||V===void 0?void 0:V.status)===409||((z=L.request)===null||z===void 0?void 0:z.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),k={retryDelay:v,configs:h,api_params:m,appUI:C},[4,l(b,p,k)]):[3,6];case 5:if(X.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((q=L.response)===null||q===void 0?void 0:q.status)===422||(($=L.request)===null||$===void 0?void 0:$.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return v<=r.MAX_RETRY_DELAY?[4,new Promise(function(J){return setTimeout(J,v)})]:[3,10];case 8:return X.sent(),v*=2,console.log("Heimdall: Fetch token post doubling retry delay",v),[4,f(v,b,p,h,m,C)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(v,b,p,h,m,x){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=0),e(void 0,void 0,void 0,function(){var C,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),C=(0,o.isTokenInExpiryWindow)(),C?(I=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(I)]):[3,3];case 1:return _.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,f(p,h,m,v,b,x)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw E=_.sent(),E;case 5:return[2]}})})},y=function(v,b,p,h,m,x){return e(void 0,void 0,void 0,function(){var C,I,E,_,T;return t(this,function(S){switch(S.label){case 0:s=v,a=b,C=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,E=0,_=(0,o.getConfig)(s,a,h),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(C,I,E,_,p,m,x)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return g(_,p)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",i),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(L){switch(L.label){case 0:return console.log("Online status detected. Fetching token..."),[4,g(_,p)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw T=S.sent(),T;case 4:return[2]}})})};return vo.fetchToken=y,vo}var cd;function ld(){if(cd)return xo;cd=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(y){for(var v,b=1,p=arguments.length;b<p;b++){v=arguments[b];for(var h in v)Object.prototype.hasOwnProperty.call(v,h)&&(y[h]=v[h])}return y},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(y,v,b,p){function h(m){return m instanceof b?m:new b(function(x){x(m)})}return new(b||(b=Promise))(function(m,x){function C(_){try{E(p.next(_))}catch(T){x(T)}}function I(_){try{E(p.throw(_))}catch(T){x(T)}}function E(_){_.done?m(_.value):h(_.value).then(C,I)}E((p=p.apply(y,v||[])).next())})},n=ge&&ge.__generator||function(y,v){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,x;return x={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function C(E){return function(_){return I([E,_])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;x&&(x=0,E[0]&&(b=0)),b;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,h=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){b.label=E[1];break}if(E[0]===6&&b.label<m[1]){b.label=m[1],m=E;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(E);break}m[2]&&b.ops.pop(),b.trys.pop();continue}E=v.call(y,b)}catch(_){E=[6,_],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(xo,"__esModule",{value:!0}),xo.makeAxiosCall=void 0;var r=Ju,o=Pe,s=id(),a,i=2,c=function(y,v){var b=v.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",b):(y.data=y.data||{},y.data._csrf_token=b)},l=function(y){var v=!y.method||y.method.toLowerCase()==="get"?{params:y.data}:{data:y.data},b=e(e({method:y.method,url:"".concat(y.root_url).concat(y.url),headers:y.headers},v),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return b};function f(y){return t(this,void 0,void 0,function(){var v;return n(this,function(b){return v=l(y),[2,(0,r.default)(v).then(function(p){return p}).catch(function(p){throw p})]})})}function g(y,v,b,p){var h,m;return p===void 0&&(p=0),t(this,void 0,void 0,function(){var x,C,I,E,_,T;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(v.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(x=y.app_env,C=y.tier,!x||!C)throw Error("app_env or tier missing : ".concat(x,"/").concat(C));return"userId"in y&&"usergroupId"in y?(I={userId:y.userId,usergroupId:y.usergroupId},typeof v.isHiverApiDomain!="boolean"&&(v.isHiverApiDomain=!0),[4,(0,s.fetchToken)(x,C,I,v.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,v),v.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",y.headers=e(e({},y.headers),{Authorization:"Bearer ".concat(a)})),[4,f(y)];case 3:return E=S.sent(),y.onSuccess&&y.onSuccess(E),[2,E];case 4:if(_=S.sent(),T=((h=_.response)===null||h===void 0?void 0:h.status)===403||((m=_.request)===null||m===void 0?void 0:m.status)===403,p<i&&T)return(0,o.expireToken)(),[2,g(y,v,b,p+1)];if(p>=i&&T||!T)throw y.onFail&&y.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return xo.makeAxiosCall=g,xo}(function(e){var t=ge&&ge.__awaiter||function(v,b,p,h){function m(x){return x instanceof p?x:new p(function(C){C(x)})}return new(p||(p=Promise))(function(x,C){function I(T){try{_(h.next(T))}catch(S){C(S)}}function E(T){try{_(h.throw(T))}catch(S){C(S)}}function _(T){T.done?x(T.value):m(T.value).then(I,E)}_((h=h.apply(v,b||[])).next())})},n=ge&&ge.__generator||function(v,b){var p={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},h,m,x,C;return C={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function I(_){return function(T){return E([_,T])}}function E(_){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,_[0]&&(p=0)),p;)try{if(h=1,m&&(x=_[0]&2?m.return:_[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,_[1])).done)return x;switch(m=0,x&&(_=[_[0]&2,x.value]),_[0]){case 0:case 1:x=_;break;case 4:return p.label++,{value:_[1],done:!1};case 5:p.label++,m=_[1],_=[0];continue;case 7:_=p.ops.pop(),p.trys.pop();continue;default:if(x=p.trys,!(x=x.length>0&&x[x.length-1])&&(_[0]===6||_[0]===2)){p=0;continue}if(_[0]===3&&(!x||_[1]>x[0]&&_[1]<x[3])){p.label=_[1];break}if(_[0]===6&&p.label<x[1]){p.label=x[1],x=_;break}if(x&&p.label<x[2]){p.label=x[2],p.ops.push(_);break}x[2]&&p.ops.pop(),p.trys.pop();continue}_=b.call(v,p)}catch(T){_=[6,T],m=0}finally{h=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=nd(),o=ed(),s=wn;Object.defineProperty(e,"TENANT_PLATFORM",{enumerable:!0,get:function(){return s.TENANT_PLATFORM}}),Object.defineProperty(e,"DEFAULT_INIT_CONFIG_HIVER",{enumerable:!0,get:function(){return s.DEFAULT_INIT_CONFIG_HIVER}});var a=Qu(),i=_e,c=Qt,l=ld();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=id();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var g=Ut,y=function(){function v(b,p,h,m,x,C){h===void 0&&(h=s.TENANT_PLATFORM.GMAIL),m===void 0&&(m=null),x===void 0&&(x=!0),C===void 0&&(C=!1),this.setEnvironment(),this.appEnv=b,this.tier=p,this.tenantPlatform=h,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=m,this.withCredentials=x,this.csrfToken=C}return v.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},v.prototype.hiverAxios=function(b,p,h,m){return p===void 0&&(p=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var x,C;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),m&&m<2?(x={userId:b.userId,usergroupId:b.usergroupId,apiRetry:m},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,x,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:I.sent(),I.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,b,p,h)];case 3:return[2,I.sent()];case 4:throw C=I.sent(),console.log("ERROR: Axios call failed",C),C;case 5:return[2]}})})},v.prototype.fetchAuthToken=function(b,p,h){return t(this,void 0,void 0,function(){var m;return n(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,b,this.tenantPlatform,this.getTokenForLogin,p,h)]);case 1:return x.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),x.label=3;case 3:return[3,8];case 4:return m=x.sent(),console.log("ERROR: Fetching token failed",m),this.authTokenFetchingInProgress=!1,[4,new Promise(function(C){return setTimeout(C,100)})];case 5:return x.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,p,h)];case 6:return x.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},v.prototype.logout=function(){return t(this,void 0,void 0,function(){var b,p;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),b=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(b,this.tenantPlatform)];case 1:return h.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw p=h.sent(),console.error("Heimdall: Logout failed",p),p;case 3:return[2]}})})},v.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},v}();e.Bifrost=y})(fi);const Vt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Gt=()=>{if(!Vt.isInitiated)return null;if(!Vt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Vt},jm=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=fi.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Vt.baseUrl=e,Vt.appEnv=t,Vt.tier=n,Vt.userGroupId=o,Vt.userId=r,Vt.tenantPlatform=s,Vt.bifrost=new fi.Bifrost(t,n,s,i,a),Vt.isInitiated=!0},Se=(({configHiver:e})=>async n=>{const r=Gt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:a}=r,{url:i,method:c,root_url:l}=n,g={root_url:(l||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(g,{...e,isHiverApiDomain:!0}))}catch(y){throw console.error("API call failed with error: ",y),y}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Bm=e=>A.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1180_840)"},A.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1180_840"},A.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Vm=e=>A.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),A.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),Gm=e=>A.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_825_73646)"},A.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_825_73646"},A.createElement("rect",{width:24,height:24,fill:"white"})))),Hm="Rate your experience with Hiver Apps",Wm="Share feedback on Apps",Zm="Got any feedback?",ud="https://txeep2wshyx.typeform.com/to/RuOwF9SG",Xm="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",zm="https://txeep2wshyx.typeform.com/to/bqhVSfDk",Ym="https://cdn.hiverhq.com/chat-support/hiver-chat.html",Jm="enable_connectors_clicked",qm="learn_more_clicked",$m="connector_card_expand_clicked",Qm="connector_card_collapsed_clicked",Um="connector_card_refresh_clicked",Km="connector_cards_loaded",e3="connector_whats_new_card_viewed",t3="connector_whats_new_explore_now_clicked",n3="connector_whats_new_learn_more_clicked",r3="connector_whats_new_dismissed",o3="connector_create_new_object_clicked",s3="connector_link_new_object_clicked",a3="connector_new_object_created_by_form",i3="connector_new_object_linked_by_form",c3="connector_object_unlinked_by_form",l3="connector_link_preview_clicked",u3="connector_create_panel_cancel_clicked",d3="connector_create_panel_back_clicked",f3="card_loaded_on_click",p3="card_loaded",h3="schedule_call_clicked",g3="schedule_call_cross_clicked",dd="CONNECTOR_EDIT_CLICKED",m3="CONNECTOR_EDIT_REQUEST_SEND",b3="CONNECTOR_EDIT_CANCELLED",y3="CONNECTOR_EDIT_BACK_CLICKED",C3="CONNECTOR_EDIT_SUCCESS",x3="connector_video_clicked",v3="connector_card_error",Mi="got_any_feedback_clicked",E3="connector_deeplink_clicked",I3="search_bar_tapped",w3="search_suggestions_selected",_3="search_initiated",S3="no_results_found",T3="search_results_found",A3="search_result_selected",L3="search_result_linked",O3="feedback_closed_clicked",F3="help_btn_clicked",k3="connector_chat_support_clicked",D3="missing_field_clicked",fd="clicked_on_lookup_config",N3="clicked_on_lookup_field",R3="saved_lookup_config",M3={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Be=w.createContext(M3),As="hiver_connectors",Pi={NOT_FOUND:404},P3="ftr-connector-blue-dot",pd="ftr-connectors-write-flow",j3="ftr-connectors-enhancements",B3="ftr-connector-schedule-call-agent",V3="ftr-connectors-edit",G3="enableAllConnectorFtr",H3="ftr-cards-open-state",W3="ftr-connectors-global-search",Z3="ftr-connectors-smart-suggestions",X3="ftr-connectors-email-selection",z3="ftr-connector-agent-feedback",Ls="ftr-connector-unified-view",Y3="ftr-connectors-expanded-form",hd="ftr-apps-lookup-revamp",gd="Please refresh and try again",J3="No data available",Os="-",md="Refresh",bd="Minimize",ji="Expand",yd="Connectors",Bi="Apps",q3="Collapse",$3="Close",Cd="Link",Q3="Create",U3="Update",xd="Unlink",vd="Edit",Vi="Cancel",Ed="Create new object",Id="Link existing object",K3="Are you sure you want to unlink this object?",e5="The object will be removed from this conversation for all users. However the object will still be available on {{connectorName}} if you'd like to link it back in the future.",t5="Edit card",n5="bullet_list",r5="Expanded",o5="Collapsed",wd="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",_d="UNKNOWN_ERROR",s5="https://help.hiverhq.com/custom-connectors/common-connector-errors",Sd={MAIN_BUTTON:"main_button",ICON:"create_icon"},a5="Missing any fields? Inform us.",Gi=e=>{let t=localStorage.getItem(As);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},i5=e=>!!Gi(e),Td=()=>{const{userId:e=""}=Gt()||{};return String(e)},c5=(e,t=Td())=>{const n=Gi(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Hi=(e,t=!1,n=!1)=>{const r=Td(),o=Gi(e);if(t||!o){localStorage.removeItem(As);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(As,JSON.stringify(s));return}else{const s=(o==null?void 0:o.isExtensionNew)??[],a=(o==null?void 0:o.extensionExpand)??[],i={[e]:{...o,...!n&&{isExtensionNew:[...new Set([...s,r])]},...n&&{extensionExpand:[...new Set([...a,r])]}}};localStorage.setItem(As,JSON.stringify(i));return}},et=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[G3])===!0:(e==null?void 0:e[t])===!0,mt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Ad=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?r5:o5,r&&e?(o.data_state=e==null?void 0:e.status,o.connector_names=(s=e==null?void 0:e.data)==null?void 0:s.connectorNames):e&&(o.data_state=(e==null?void 0:e.status)||"unknown_error"),o},Ld=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==Pi.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay={data:t}}else{const t=e.data.flatDisplay.data.filter(n=>Number(n.statusCode)!==Pi.NOT_FOUND).sort((n,r)=>n.priority-r.priority);e.data.flatDisplay.data=t}break;case"flat_with_list":e.data.listItems.fields=e.data.listItems.fields.map(t=>Array.isArray(t)?{data:t.sort((r,o)=>r.priority-o.priority)}:{data:t.data.sort((r,o)=>r.priority-o.priority),externalResourceId:t.externalResourceId});break}return e},l5=e=>{if(!e||Object.keys(e).length===0)return[];const t=new Set;return Object.values(e).forEach(n=>{n.connectorNames&&n.connectorNames.forEach(r=>t.add(r))}),Array.from(t)},Fs=({url:e,params:t})=>{const n=Object.entries(t).reduce((o,[s,a])=>(a!==void 0&&a!==""&&a!==null&&(o[s]=a),o),{}),r=new URL(e);return Object.entries(n).forEach(([o,s])=>{r.searchParams.set(o,s)}),r.toString()};function Od(e,t){return e.length>t?e.substring(0,t)+"...":e}const u5=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1187_180)"},A.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1187_180"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),d5=e=>A.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_847_49587)"},A.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_847_49587"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),f5=d.keyframes`
36
36
  from {
37
37
  transform: translateY(-100%);
38
38
  opacity: 0;
@@ -49,7 +49,7 @@ React keys must be passed directly to JSX without using spread:
49
49
  height: 48px;
50
50
  padding-top: 20px;
51
51
  }
52
- `,f5=d.keyframes`
52
+ `,p5=d.keyframes`
53
53
  from {
54
54
  transform: translateY(0);
55
55
  opacity: 1;
@@ -62,7 +62,7 @@ React keys must be passed directly to JSX without using spread:
62
62
  display: none;
63
63
  pointer-events: none;
64
64
  }
65
- `,p5=d.styled(d.Stack)`
65
+ `,h5=d.styled(d.Stack)`
66
66
  width: 100%;
67
67
  overflow: hidden;
68
68
  flex-direction: row;
@@ -93,9 +93,9 @@ React keys must be passed directly to JSX without using spread:
93
93
  pointer-events: auto;
94
94
  height: 48px;
95
95
  padding-top: 20px;
96
- animation: ${d5} 0.4s ease-in forwards;
96
+ animation: ${f5} 0.4s ease-in forwards;
97
97
  }
98
- `,h5=d.styled(d.Stack)`
98
+ `,g5=d.styled(d.Stack)`
99
99
  padding: 12px;
100
100
  margin-top: 20px;
101
101
  width: 100%;
@@ -112,18 +112,18 @@ React keys must be passed directly to JSX without using spread:
112
112
  opacity: 0;
113
113
  display: none;
114
114
  pointer-events: none;
115
- animation: ${f5} 0.4s ease-in forwards;
115
+ animation: ${p5} 0.4s ease-in forwards;
116
116
  }
117
- `,g5=d.styled(d.IconButton)`
117
+ `,m5=d.styled(d.IconButton)`
118
118
  position: absolute;
119
119
  right: -8px;
120
120
  top: -5px;
121
- `,m5=d.styled(d.Stack)`
121
+ `,b5=d.styled(d.Stack)`
122
122
  margin-top: 8px;
123
123
  flex-direction: row;
124
124
  flex-wrap: wrap;
125
125
  gap: 12px;
126
- `,b5=d.styled(d.Stack)`
126
+ `,y5=d.styled(d.Stack)`
127
127
  width: 20px;
128
128
  height: 20px;
129
129
  cursor: pointer;
@@ -147,9 +147,9 @@ React keys must be passed directly to JSX without using spread:
147
147
  &:hover svg {
148
148
  transform: scale(1.1);
149
149
  }
150
- `,y5=d.styled(d.Typography)`
150
+ `,C5=d.styled(d.Typography)`
151
151
  letter-spacing: 0.042px;
152
- `,C5=({rating:e,setRating:t,count:n=5})=>{const[r,o]=w.useState(e),s=r??e,a=l=>{t(l)},i=l=>{o(l)},c=()=>{o(0)};return u.jsx(m5,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const g=f<s;return u.jsx(b5,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:u.jsxs("div",{children:[u.jsx(u5,{width:"20px",height:"20px",style:{opacity:g?1:0,zIndex:g?2:1}}),u.jsx(l5,{width:"20px",height:"20px",style:{opacity:g?0:1,zIndex:g?1:2}})]})},f)})})},x5=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=w.useContext(Be),{userGroupId:s,userId:a}=Bt()||{},i=Os({url:ud,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[c,l]=w.useState(t),[f,g]=w.useState(!1),[y,v]=w.useState(0),b=()=>{r(Pi,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),ps(a)},p=x=>{r(Pi,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:x});const C=Os({url:Zm,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(x)}});v(x),window.open(C,"_blank"),l(!1),ps(a)},h=()=>{r(L3,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),g(!0),ps(a)},m=()=>{f&&(l(!1),g(!1))};return u.jsxs(u.Fragment,{children:[u.jsxs(h5,{className:f||!c?"slide-down-out":"",onAnimationEnd:m,children:[u.jsxs(d.Stack,{width:"100%",direction:"row",gap:"8px",children:[u.jsx(Bm,{}),u.jsxs(d.Box,{width:"175px",children:[u.jsx(y5,{variant:"h3",children:Gm}),u.jsx(C5,{rating:y,setRating:p})]})]}),u.jsx(d.Box,{position:"relative",children:u.jsx(d.Tooltip,{title:"Close",children:u.jsx(g5,{onClick:h,children:u.jsx(Vm,{width:"16px",height:"16px"})})})})]}),u.jsx(p5,{className:f||!c?"fade-in":"",children:u.jsxs(d.Button,{size:"small",variant:"outlined",color:"tertiary",href:i,target:"_blank",onClick:b,children:[u.jsx(jm,{}),Hm]})})]})},v5="Need setup help?",E5="Expert setup assistance available! Book a 15 min call with our integration specialist.",I5="Schedule call",w5="https://calendar.app.google/V2cJcwKMV4ax9rpk9",Fd="agent_panel",Zi="hiver_schedule_call_close_button_click",_5=d.styled(d.Stack)`
152
+ `,x5=({rating:e,setRating:t,count:n=5})=>{const[r,o]=w.useState(e),s=r??e,a=l=>{t(l)},i=l=>{o(l)},c=()=>{o(0)};return u.jsx(b5,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const g=f<s;return u.jsx(y5,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:u.jsxs("div",{children:[u.jsx(d5,{width:"20px",height:"20px",style:{opacity:g?1:0,zIndex:g?2:1}}),u.jsx(u5,{width:"20px",height:"20px",style:{opacity:g?0:1,zIndex:g?1:2}})]})},f)})})},v5=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=w.useContext(Be),{userGroupId:s,userId:a}=Gt()||{},i=Fs({url:ud,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[c,l]=w.useState(t),[f,g]=w.useState(!1),[y,v]=w.useState(0),b=()=>{r(Mi,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),hs(a)},p=x=>{r(Mi,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:x});const C=Fs({url:Xm,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(x)}});v(x),window.open(C,"_blank"),l(!1),hs(a)},h=()=>{r(O3,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),g(!0),hs(a)},m=()=>{f&&(l(!1),g(!1))};return u.jsxs(u.Fragment,{children:[u.jsxs(g5,{className:f||!c?"slide-down-out":"",onAnimationEnd:m,children:[u.jsxs(d.Stack,{width:"100%",direction:"row",gap:"8px",children:[u.jsx(Vm,{}),u.jsxs(d.Box,{width:"175px",children:[u.jsx(C5,{variant:"h3",children:Hm}),u.jsx(x5,{rating:y,setRating:p})]})]}),u.jsx(d.Box,{position:"relative",children:u.jsx(d.Tooltip,{title:"Close",children:u.jsx(m5,{onClick:h,children:u.jsx(Gm,{width:"16px",height:"16px"})})})})]}),u.jsx(h5,{className:f||!c?"fade-in":"",children:u.jsxs(d.Button,{size:"small",variant:"outlined",color:"tertiary",href:i,target:"_blank",onClick:b,children:[u.jsx(Bm,{}),Wm]})})]})},E5="Need setup help?",I5="Expert setup assistance available! Book a 15 min call with our integration specialist.",w5="Schedule call",_5="https://calendar.app.google/V2cJcwKMV4ax9rpk9",Fd="agent_panel",Wi="hiver_schedule_call_close_button_click",S5=d.styled(d.Stack)`
153
153
  padding: 12px;
154
154
  width: 250px;
155
155
  min-height: 151px;
@@ -157,11 +157,11 @@ React keys must be passed directly to JSX without using spread:
157
157
  margin-bottom: 5px;
158
158
  background-color: ${d.theme.palette.gray.white};
159
159
  box-shadow: 0px 0px 8px 0px #0000001a;
160
- `,S5=d.styled(d.Stack)`
160
+ `,T5=d.styled(d.Stack)`
161
161
  width: 100%;
162
162
  gap: 4px;
163
163
  justify-content: space-between;
164
- `,T5=d.styled(d.Button)`
164
+ `,A5=d.styled(d.Button)`
165
165
  width: 127px;
166
166
  height: 28px;
167
167
  gap: 8px;
@@ -175,18 +175,18 @@ React keys must be passed directly to JSX without using spread:
175
175
  box-shadow: none;
176
176
  background-color: #e3dfff;
177
177
  }
178
- `,A5=d.styled(d.icons.Close)`
178
+ `,L5=d.styled(d.icons.Close)`
179
179
  height: 20px;
180
180
  width: 20px;
181
181
  cursor: pointer;
182
- `,L5=d.styled(d.icons.CalendarTodayOutlinedIcon)`
182
+ `,O5=d.styled(d.icons.CalendarTodayOutlinedIcon)`
183
183
  height: 16px;
184
184
  width: 16px;
185
- `,O5=d.styled(d.Typography)`
186
- color: ${d.theme.palette.gray.black};
187
185
  `,F5=d.styled(d.Typography)`
186
+ color: ${d.theme.palette.gray.black};
187
+ `,k5=d.styled(d.Typography)`
188
188
  color: ${d.theme.palette.gray.gray2};
189
- `,k5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=w.useContext(Be),[r,o]=w.useState(()=>!(localStorage.getItem(Zi)==="true")&&et(e,j3));w.useEffect(()=>{localStorage.getItem(Zi)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(Zi,"true"),o(!1),t(h3,{source:Fd})},a=()=>{window.open(w5,"_blank"),t(p3,{source:Fd})};return!r||!n?null:u.jsxs(_5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[u.jsxs(S5,{gap:"4px",children:[u.jsxs(d.Stack,{direction:"row",justifyContent:"space-between",children:[u.jsx(O5,{variant:"body1_medium",children:v5}),u.jsx(d.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:u.jsx(d.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(d.IconButton,{children:u.jsx(A5,{})})})})]}),u.jsx(F5,{variant:"body2",children:E5})]}),u.jsx(d.Stack,{onClick:a,direction:"row",alignItems:"center",children:u.jsxs(T5,{variant:"outlined",size:"small",children:[u.jsx(L5,{}),I5]})})]})},D5="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4649_80352'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='21'%3e%3crect%20y='0.320312'%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4649_80352)'%3e%3cpath%20d='M9.16797%2014.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013%2018.654C8.84852%2018.654%207.76519%2018.4352%206.7513%2017.9977C5.73741%2017.5602%204.85547%2016.9665%204.10547%2016.2165C3.35547%2015.4665%202.76172%2014.5845%202.32422%2013.5706C1.88672%2012.5567%201.66797%2011.4734%201.66797%2010.3206C1.66797%209.16786%201.88672%208.08453%202.32422%207.07064C2.76172%206.05675%203.35547%205.1748%204.10547%204.4248C4.85547%203.6748%205.73741%203.08105%206.7513%202.64355C7.76519%202.20605%208.84852%201.9873%2010.0013%201.9873C11.1541%201.9873%2012.2374%202.20605%2013.2513%202.64355C14.2652%203.08105%2015.1471%203.6748%2015.8971%204.4248C16.6471%205.1748%2017.2409%206.05675%2017.6784%207.07064C18.1159%208.08453%2018.3346%209.16786%2018.3346%2010.3206C18.3346%2011.4734%2018.1159%2012.5567%2017.6784%2013.5706C17.2409%2014.5845%2016.6471%2015.4665%2015.8971%2016.2165C15.1471%2016.9665%2014.2652%2017.5602%2013.2513%2017.9977C12.2374%2018.4352%2011.1541%2018.654%2010.0013%2018.654ZM10.0013%2016.9873C11.8624%2016.9873%2013.4388%2016.3415%2014.7305%2015.0498C16.0221%2013.7581%2016.668%2012.1817%2016.668%2010.3206C16.668%208.45953%2016.0221%206.88314%2014.7305%205.59147C13.4388%204.2998%2011.8624%203.65397%2010.0013%203.65397C8.14019%203.65397%206.5638%204.2998%205.27214%205.59147C3.98047%206.88314%203.33464%208.45953%203.33464%2010.3206C3.33464%2012.1817%203.98047%2013.7581%205.27214%2015.0498C6.5638%2016.3415%208.14019%2016.9873%2010.0013%2016.9873Z'%20fill='%234D596C'/%3e%3c/g%3e%3c/svg%3e",kd=e=>A.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M15.505 1.84634C15.1241 1.46545 14.6074 1.25146 14.0688 1.25146C13.5301 1.25146 13.0134 1.46545 12.6325 1.84634L10.6244 3.85447C10.6108 3.3249 10.391 2.82156 10.0116 2.45179C9.63228 2.08203 9.12349 1.87508 8.59375 1.87509H3.90625C3.36753 1.87509 2.85087 2.0891 2.46994 2.47003C2.08901 2.85097 1.875 3.36762 1.875 3.90634V16.0938C1.875 16.6326 2.08901 17.1492 2.46994 17.5302C2.85087 17.9111 3.36753 18.1251 3.90625 18.1251H16.0938C16.6325 18.1251 17.1491 17.9111 17.5301 17.5302C17.911 17.1492 18.125 16.6326 18.125 16.0938V11.4063C18.125 10.8775 17.9189 10.3696 17.5503 9.99039C17.1817 9.6112 16.6798 9.39069 16.1512 9.37572L18.1569 7.37072C18.5378 6.98979 18.7518 6.47316 18.7518 5.93447C18.7518 5.39578 18.5378 4.87915 18.1569 4.49822L15.505 1.84634ZM11.985 9.37509H10.625V8.01509L11.985 9.37509ZM13.5162 2.73009C13.5888 2.65753 13.6749 2.59996 13.7697 2.56069C13.8645 2.52141 13.9661 2.5012 14.0688 2.5012C14.1714 2.5012 14.273 2.52141 14.3678 2.56069C14.4626 2.59996 14.5487 2.65753 14.6212 2.73009L17.2725 5.38197C17.3451 5.45452 17.4026 5.54065 17.4419 5.63545C17.4812 5.73025 17.5014 5.83186 17.5014 5.93447C17.5014 6.03708 17.4812 6.13869 17.4419 6.23349C17.4026 6.32829 17.3451 6.41442 17.2725 6.48697L14.6212 9.13822C14.5487 9.21079 14.4626 9.26835 14.3678 9.30763C14.273 9.3469 14.1714 9.36711 14.0688 9.36711C13.9661 9.36711 13.8645 9.3469 13.7697 9.30763C13.6749 9.26835 13.5888 9.21079 13.5162 9.13822L10.8644 6.48697C10.7918 6.41442 10.7342 6.32829 10.695 6.23349C10.6557 6.13869 10.6355 6.03708 10.6355 5.93447C10.6355 5.83186 10.6557 5.73025 10.695 5.63545C10.7342 5.54065 10.7918 5.45452 10.8644 5.38197L13.5162 2.73009ZM9.375 3.90634V9.37509H3.125V3.90634C3.125 3.47509 3.475 3.12509 3.90625 3.12509H8.59375C9.025 3.12509 9.375 3.47509 9.375 3.90634ZM3.125 16.0938V10.6251H9.375V16.8751H3.90625C3.475 16.8751 3.125 16.5251 3.125 16.0938ZM10.625 10.6251H16.0938C16.525 10.6251 16.875 10.9751 16.875 11.4063V16.0938C16.875 16.5251 16.525 16.8751 16.0938 16.8751H10.625V10.6251Z",fill:"#3E4C5A"}),A.createElement("rect",{x:10.877,y:5.90918,width:4.54545,height:4.54545,rx:1,transform:"rotate(-45 10.877 5.90918)",fill:"#FFE250"}),A.createElement("path",{d:"M3.77344 12.2727C3.77344 11.7204 4.22115 11.2727 4.77344 11.2727H7.77344C8.32572 11.2727 8.77344 11.7204 8.77344 12.2727V15.2727C8.77344 15.825 8.32572 16.2727 7.77344 16.2727H4.77344C4.22115 16.2727 3.77344 15.825 3.77344 15.2727L3.77344 12.2727Z",fill:"#FFE250"})),N5="data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1012_80924)'%3e%3cpath%20d='M9.66663%2015.1202H11.3333V13.4535H9.66663V15.1202ZM10.5%201.78687C5.89996%201.78687%202.16663%205.5202%202.16663%2010.1202C2.16663%2014.7202%205.89996%2018.4535%2010.5%2018.4535C15.1%2018.4535%2018.8333%2014.7202%2018.8333%2010.1202C18.8333%205.5202%2015.1%201.78687%2010.5%201.78687ZM10.5%2016.7869C6.82496%2016.7869%203.83329%2013.7952%203.83329%2010.1202C3.83329%206.4452%206.82496%203.45353%2010.5%203.45353C14.175%203.45353%2017.1666%206.4452%2017.1666%2010.1202C17.1666%2013.7952%2014.175%2016.7869%2010.5%2016.7869ZM10.5%205.1202C8.65829%205.1202%207.16663%206.61187%207.16663%208.45353H8.83329C8.83329%207.53687%209.58329%206.78687%2010.5%206.78687C11.4166%206.78687%2012.1666%207.53687%2012.1666%208.45353C12.1666%2010.1202%209.66663%209.91187%209.66663%2012.6202H11.3333C11.3333%2010.7452%2013.8333%2010.5369%2013.8333%208.45353C13.8333%206.61187%2012.3416%205.1202%2010.5%205.1202Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1012_80924'%3e%3crect%20width='20'%20height='20'%20fill='white'%20transform='translate(0.5%200.120117)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",R5=e=>A.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1329_1727)"},A.createElement("path",{d:"M15 1.5H3C2.175 1.5 1.5 2.175 1.5 3V16.5L4.5 13.5H15C15.825 13.5 16.5 12.825 16.5 12V3C16.5 2.175 15.825 1.5 15 1.5ZM15 12H4.5L3 13.5V3H15V12ZM5.25 6.75H6.75V8.25H5.25V6.75ZM8.25 6.75H9.75V8.25H8.25V6.75ZM11.25 6.75H12.75V8.25H11.25V6.75Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1329_1727"},A.createElement("rect",{width:18,height:18,fill:"white"})))),M5=e=>A.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1329_1720)"},A.createElement("path",{d:"M16.5 6.93L11.1075 6.465L9 1.5L6.8925 6.4725L1.5 6.93L5.595 10.4775L4.365 15.75L9 12.9525L13.635 15.75L12.4125 10.4775L16.5 6.93ZM9 11.55L6.18 13.2525L6.93 10.0425L4.44 7.8825L7.725 7.5975L9 4.575L10.2825 7.605L13.5675 7.89L11.0775 10.05L11.8275 13.26L9 11.55Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1329_1720"},A.createElement("rect",{width:18,height:18,fill:"white"})))),P5="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.3462%208.73757C14.0406%208.43198%2013.5451%208.43198%2013.2395%208.73757C12.9339%209.04316%2012.9339%209.53863%2013.2395%209.84422L14.3462%208.73757ZM15.2392%2010.7372L15.7925%2010.1839L15.2392%2010.7372ZM16.2377%2013.1478L15.4552%2013.1478L16.2377%2013.1478ZM15.2392%2015.5584L14.6859%2015.0051L15.2392%2015.5584ZM10.418%2015.5584L9.86469%2016.1118L10.418%2015.5584ZM9.52499%2013.5588C9.2194%2013.2532%208.72393%2013.2532%208.41834%2013.5588C8.11275%2013.8643%208.11275%2014.3598%208.41834%2014.6654L9.52499%2013.5588ZM5.52477%2011.7731C5.83036%2012.0787%206.32583%2012.0787%206.63142%2011.7731C6.93701%2011.4675%206.93701%2010.972%206.63142%2010.6665L5.52477%2011.7731ZM9.45292%204.95224L10.0062%204.39892L9.45292%204.95224ZM10.346%206.95192C10.6515%207.25752%2011.147%207.25752%2011.4526%206.95192C11.7582%206.64633%2011.7582%206.15087%2011.4526%205.84527L10.346%206.95192ZM13.2395%209.84422L14.6859%2011.2906L15.7925%2010.1839L14.3462%208.73757L13.2395%209.84422ZM14.6859%2011.2906C15.1785%2011.7832%2015.4552%2012.4512%2015.4552%2013.1478L17.0202%2013.1478C17.0202%2012.0362%2016.5786%2010.97%2015.7925%2010.1839L14.6859%2011.2906ZM15.4552%2013.1478C15.4552%2013.8445%2015.1785%2014.5125%2014.6859%2015.0051L15.7925%2016.1118C16.5786%2015.3257%2017.0202%2014.2595%2017.0202%2013.1478L15.4552%2013.1478ZM14.6859%2015.0051C13.6601%2016.0308%2011.9971%2016.0308%2010.9713%2015.0051L9.86469%2016.1118C11.5016%2017.7487%2014.1556%2017.7487%2015.7925%2016.1118L14.6859%2015.0051ZM10.9713%2015.0051L9.52499%2013.5588L8.41834%2014.6654L9.86469%2016.1118L10.9713%2015.0051ZM6.63142%2010.6665L5.18507%209.2201L4.07842%2010.3268L5.52477%2011.7731L6.63142%2010.6665ZM5.18507%209.2201C4.69249%208.72752%204.41576%208.05944%204.41576%207.36283H2.85072C2.85072%208.47452%203.29234%209.54067%204.07842%2010.3268L5.18507%209.2201ZM4.41576%207.36283C4.41576%206.66622%204.69249%205.99815%205.18507%205.50557L4.07842%204.39892C3.29234%205.185%202.85072%206.25115%202.85072%207.36283H4.41576ZM5.18507%205.50557C6.21081%204.47983%207.87386%204.47983%208.8996%205.50557L10.0062%204.39892C8.36932%202.76199%205.71534%202.76199%204.07842%204.39892L5.18507%205.50557ZM8.8996%205.50557L10.346%206.95192L11.4526%205.84527L10.0062%204.39892L8.8996%205.50557Z'%20fill='%234D596C'/%3e%3crect%20x='6.36328'%20y='7.91895'%20width='1.66667'%20height='8.33333'%20rx='0.833333'%20transform='rotate(-45%206.36328%207.91895)'%20fill='%234D596C'/%3e%3c/svg%3e",j5=({options:e,anchor:t,open:n,onClose:r})=>u.jsx(d.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>u.jsxs(d.MenuItem,{onClick:o.onClick,children:[u.jsx(d.ListItemIcon,{children:o.icon}),o.label]},o.id))}),Dd="connector-header-stuck",B5=d.styled(d.Stack)`
189
+ `,D5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=w.useContext(Be),[r,o]=w.useState(()=>!(localStorage.getItem(Wi)==="true")&&et(e,B3));w.useEffect(()=>{localStorage.getItem(Wi)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(Wi,"true"),o(!1),t(g3,{source:Fd})},a=()=>{window.open(_5,"_blank"),t(h3,{source:Fd})};return!r||!n?null:u.jsxs(S5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[u.jsxs(T5,{gap:"4px",children:[u.jsxs(d.Stack,{direction:"row",justifyContent:"space-between",children:[u.jsx(F5,{variant:"body1_medium",children:E5}),u.jsx(d.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:u.jsx(d.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(d.IconButton,{children:u.jsx(L5,{})})})})]}),u.jsx(k5,{variant:"body2",children:I5})]}),u.jsx(d.Stack,{onClick:a,direction:"row",alignItems:"center",children:u.jsxs(A5,{variant:"outlined",size:"small",children:[u.jsx(O5,{}),w5]})})]})},N5="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_4649_80352'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='20'%20height='21'%3e%3crect%20y='0.320312'%20width='20'%20height='20'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_4649_80352)'%3e%3cpath%20d='M9.16797%2014.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013%2018.654C8.84852%2018.654%207.76519%2018.4352%206.7513%2017.9977C5.73741%2017.5602%204.85547%2016.9665%204.10547%2016.2165C3.35547%2015.4665%202.76172%2014.5845%202.32422%2013.5706C1.88672%2012.5567%201.66797%2011.4734%201.66797%2010.3206C1.66797%209.16786%201.88672%208.08453%202.32422%207.07064C2.76172%206.05675%203.35547%205.1748%204.10547%204.4248C4.85547%203.6748%205.73741%203.08105%206.7513%202.64355C7.76519%202.20605%208.84852%201.9873%2010.0013%201.9873C11.1541%201.9873%2012.2374%202.20605%2013.2513%202.64355C14.2652%203.08105%2015.1471%203.6748%2015.8971%204.4248C16.6471%205.1748%2017.2409%206.05675%2017.6784%207.07064C18.1159%208.08453%2018.3346%209.16786%2018.3346%2010.3206C18.3346%2011.4734%2018.1159%2012.5567%2017.6784%2013.5706C17.2409%2014.5845%2016.6471%2015.4665%2015.8971%2016.2165C15.1471%2016.9665%2014.2652%2017.5602%2013.2513%2017.9977C12.2374%2018.4352%2011.1541%2018.654%2010.0013%2018.654ZM10.0013%2016.9873C11.8624%2016.9873%2013.4388%2016.3415%2014.7305%2015.0498C16.0221%2013.7581%2016.668%2012.1817%2016.668%2010.3206C16.668%208.45953%2016.0221%206.88314%2014.7305%205.59147C13.4388%204.2998%2011.8624%203.65397%2010.0013%203.65397C8.14019%203.65397%206.5638%204.2998%205.27214%205.59147C3.98047%206.88314%203.33464%208.45953%203.33464%2010.3206C3.33464%2012.1817%203.98047%2013.7581%205.27214%2015.0498C6.5638%2016.3415%208.14019%2016.9873%2010.0013%2016.9873Z'%20fill='%234D596C'/%3e%3c/g%3e%3c/svg%3e",kd=e=>A.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M15.505 1.84634C15.1241 1.46545 14.6074 1.25146 14.0688 1.25146C13.5301 1.25146 13.0134 1.46545 12.6325 1.84634L10.6244 3.85447C10.6108 3.3249 10.391 2.82156 10.0116 2.45179C9.63228 2.08203 9.12349 1.87508 8.59375 1.87509H3.90625C3.36753 1.87509 2.85087 2.0891 2.46994 2.47003C2.08901 2.85097 1.875 3.36762 1.875 3.90634V16.0938C1.875 16.6326 2.08901 17.1492 2.46994 17.5302C2.85087 17.9111 3.36753 18.1251 3.90625 18.1251H16.0938C16.6325 18.1251 17.1491 17.9111 17.5301 17.5302C17.911 17.1492 18.125 16.6326 18.125 16.0938V11.4063C18.125 10.8775 17.9189 10.3696 17.5503 9.99039C17.1817 9.6112 16.6798 9.39069 16.1512 9.37572L18.1569 7.37072C18.5378 6.98979 18.7518 6.47316 18.7518 5.93447C18.7518 5.39578 18.5378 4.87915 18.1569 4.49822L15.505 1.84634ZM11.985 9.37509H10.625V8.01509L11.985 9.37509ZM13.5162 2.73009C13.5888 2.65753 13.6749 2.59996 13.7697 2.56069C13.8645 2.52141 13.9661 2.5012 14.0688 2.5012C14.1714 2.5012 14.273 2.52141 14.3678 2.56069C14.4626 2.59996 14.5487 2.65753 14.6212 2.73009L17.2725 5.38197C17.3451 5.45452 17.4026 5.54065 17.4419 5.63545C17.4812 5.73025 17.5014 5.83186 17.5014 5.93447C17.5014 6.03708 17.4812 6.13869 17.4419 6.23349C17.4026 6.32829 17.3451 6.41442 17.2725 6.48697L14.6212 9.13822C14.5487 9.21079 14.4626 9.26835 14.3678 9.30763C14.273 9.3469 14.1714 9.36711 14.0688 9.36711C13.9661 9.36711 13.8645 9.3469 13.7697 9.30763C13.6749 9.26835 13.5888 9.21079 13.5162 9.13822L10.8644 6.48697C10.7918 6.41442 10.7342 6.32829 10.695 6.23349C10.6557 6.13869 10.6355 6.03708 10.6355 5.93447C10.6355 5.83186 10.6557 5.73025 10.695 5.63545C10.7342 5.54065 10.7918 5.45452 10.8644 5.38197L13.5162 2.73009ZM9.375 3.90634V9.37509H3.125V3.90634C3.125 3.47509 3.475 3.12509 3.90625 3.12509H8.59375C9.025 3.12509 9.375 3.47509 9.375 3.90634ZM3.125 16.0938V10.6251H9.375V16.8751H3.90625C3.475 16.8751 3.125 16.5251 3.125 16.0938ZM10.625 10.6251H16.0938C16.525 10.6251 16.875 10.9751 16.875 11.4063V16.0938C16.875 16.5251 16.525 16.8751 16.0938 16.8751H10.625V10.6251Z",fill:"#3E4C5A"}),A.createElement("rect",{x:10.877,y:5.90918,width:4.54545,height:4.54545,rx:1,transform:"rotate(-45 10.877 5.90918)",fill:"#FFE250"}),A.createElement("path",{d:"M3.77344 12.2727C3.77344 11.7204 4.22115 11.2727 4.77344 11.2727H7.77344C8.32572 11.2727 8.77344 11.7204 8.77344 12.2727V15.2727C8.77344 15.825 8.32572 16.2727 7.77344 16.2727H4.77344C4.22115 16.2727 3.77344 15.825 3.77344 15.2727L3.77344 12.2727Z",fill:"#FFE250"})),R5="data:image/svg+xml,%3csvg%20width='21'%20height='21'%20viewBox='0%200%2021%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1012_80924)'%3e%3cpath%20d='M9.66663%2015.1202H11.3333V13.4535H9.66663V15.1202ZM10.5%201.78687C5.89996%201.78687%202.16663%205.5202%202.16663%2010.1202C2.16663%2014.7202%205.89996%2018.4535%2010.5%2018.4535C15.1%2018.4535%2018.8333%2014.7202%2018.8333%2010.1202C18.8333%205.5202%2015.1%201.78687%2010.5%201.78687ZM10.5%2016.7869C6.82496%2016.7869%203.83329%2013.7952%203.83329%2010.1202C3.83329%206.4452%206.82496%203.45353%2010.5%203.45353C14.175%203.45353%2017.1666%206.4452%2017.1666%2010.1202C17.1666%2013.7952%2014.175%2016.7869%2010.5%2016.7869ZM10.5%205.1202C8.65829%205.1202%207.16663%206.61187%207.16663%208.45353H8.83329C8.83329%207.53687%209.58329%206.78687%2010.5%206.78687C11.4166%206.78687%2012.1666%207.53687%2012.1666%208.45353C12.1666%2010.1202%209.66663%209.91187%209.66663%2012.6202H11.3333C11.3333%2010.7452%2013.8333%2010.5369%2013.8333%208.45353C13.8333%206.61187%2012.3416%205.1202%2010.5%205.1202Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1012_80924'%3e%3crect%20width='20'%20height='20'%20fill='white'%20transform='translate(0.5%200.120117)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",M5=e=>A.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1329_1727)"},A.createElement("path",{d:"M15 1.5H3C2.175 1.5 1.5 2.175 1.5 3V16.5L4.5 13.5H15C15.825 13.5 16.5 12.825 16.5 12V3C16.5 2.175 15.825 1.5 15 1.5ZM15 12H4.5L3 13.5V3H15V12ZM5.25 6.75H6.75V8.25H5.25V6.75ZM8.25 6.75H9.75V8.25H8.25V6.75ZM11.25 6.75H12.75V8.25H11.25V6.75Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1329_1727"},A.createElement("rect",{width:18,height:18,fill:"white"})))),P5=e=>A.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1329_1720)"},A.createElement("path",{d:"M16.5 6.93L11.1075 6.465L9 1.5L6.8925 6.4725L1.5 6.93L5.595 10.4775L4.365 15.75L9 12.9525L13.635 15.75L12.4125 10.4775L16.5 6.93ZM9 11.55L6.18 13.2525L6.93 10.0425L4.44 7.8825L7.725 7.5975L9 4.575L10.2825 7.605L13.5675 7.89L11.0775 10.05L11.8275 13.26L9 11.55Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1329_1720"},A.createElement("rect",{width:18,height:18,fill:"white"})))),j5="data:image/svg+xml,%3csvg%20width='20'%20height='21'%20viewBox='0%200%2020%2021'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.3462%208.73757C14.0406%208.43198%2013.5451%208.43198%2013.2395%208.73757C12.9339%209.04316%2012.9339%209.53863%2013.2395%209.84422L14.3462%208.73757ZM15.2392%2010.7372L15.7925%2010.1839L15.2392%2010.7372ZM16.2377%2013.1478L15.4552%2013.1478L16.2377%2013.1478ZM15.2392%2015.5584L14.6859%2015.0051L15.2392%2015.5584ZM10.418%2015.5584L9.86469%2016.1118L10.418%2015.5584ZM9.52499%2013.5588C9.2194%2013.2532%208.72393%2013.2532%208.41834%2013.5588C8.11275%2013.8643%208.11275%2014.3598%208.41834%2014.6654L9.52499%2013.5588ZM5.52477%2011.7731C5.83036%2012.0787%206.32583%2012.0787%206.63142%2011.7731C6.93701%2011.4675%206.93701%2010.972%206.63142%2010.6665L5.52477%2011.7731ZM9.45292%204.95224L10.0062%204.39892L9.45292%204.95224ZM10.346%206.95192C10.6515%207.25752%2011.147%207.25752%2011.4526%206.95192C11.7582%206.64633%2011.7582%206.15087%2011.4526%205.84527L10.346%206.95192ZM13.2395%209.84422L14.6859%2011.2906L15.7925%2010.1839L14.3462%208.73757L13.2395%209.84422ZM14.6859%2011.2906C15.1785%2011.7832%2015.4552%2012.4512%2015.4552%2013.1478L17.0202%2013.1478C17.0202%2012.0362%2016.5786%2010.97%2015.7925%2010.1839L14.6859%2011.2906ZM15.4552%2013.1478C15.4552%2013.8445%2015.1785%2014.5125%2014.6859%2015.0051L15.7925%2016.1118C16.5786%2015.3257%2017.0202%2014.2595%2017.0202%2013.1478L15.4552%2013.1478ZM14.6859%2015.0051C13.6601%2016.0308%2011.9971%2016.0308%2010.9713%2015.0051L9.86469%2016.1118C11.5016%2017.7487%2014.1556%2017.7487%2015.7925%2016.1118L14.6859%2015.0051ZM10.9713%2015.0051L9.52499%2013.5588L8.41834%2014.6654L9.86469%2016.1118L10.9713%2015.0051ZM6.63142%2010.6665L5.18507%209.2201L4.07842%2010.3268L5.52477%2011.7731L6.63142%2010.6665ZM5.18507%209.2201C4.69249%208.72752%204.41576%208.05944%204.41576%207.36283H2.85072C2.85072%208.47452%203.29234%209.54067%204.07842%2010.3268L5.18507%209.2201ZM4.41576%207.36283C4.41576%206.66622%204.69249%205.99815%205.18507%205.50557L4.07842%204.39892C3.29234%205.185%202.85072%206.25115%202.85072%207.36283H4.41576ZM5.18507%205.50557C6.21081%204.47983%207.87386%204.47983%208.8996%205.50557L10.0062%204.39892C8.36932%202.76199%205.71534%202.76199%204.07842%204.39892L5.18507%205.50557ZM8.8996%205.50557L10.346%206.95192L11.4526%205.84527L10.0062%204.39892L8.8996%205.50557Z'%20fill='%234D596C'/%3e%3crect%20x='6.36328'%20y='7.91895'%20width='1.66667'%20height='8.33333'%20rx='0.833333'%20transform='rotate(-45%206.36328%207.91895)'%20fill='%234D596C'/%3e%3c/svg%3e",B5=({options:e,anchor:t,open:n,onClose:r})=>u.jsx(d.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>u.jsxs(d.MenuItem,{onClick:o.onClick,children:[u.jsx(d.ListItemIcon,{children:o.icon}),o.label]},o.id))}),Dd="connector-header-stuck",V5=d.styled(d.Stack)`
190
190
  position: sticky;
191
191
  top: 0;
192
192
  box-sizing: content-box;
@@ -203,7 +203,7 @@ React keys must be passed directly to JSX without using spread:
203
203
  &.${Dd} {
204
204
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
205
205
  }
206
- `,V5=d.styled(d.Stack)`
206
+ `,G5=d.styled(d.Stack)`
207
207
  width: 0;
208
208
  height: 0;
209
209
  `,Nd=d.styled(d.brandIcons.Connector)`
@@ -230,7 +230,7 @@ React keys must be passed directly to JSX without using spread:
230
230
  }
231
231
  display: flex;
232
232
  flex-direction: column;
233
- `,G5=d.styled(d.Box)`
233
+ `,H5=d.styled(d.Box)`
234
234
  flex-grow: 1;
235
235
  overflow-y: auto;
236
236
  overflow-x: hidden;
@@ -239,12 +239,12 @@ React keys must be passed directly to JSX without using spread:
239
239
  `;d.styled(d.Box)`
240
240
  width: inherit;
241
241
  height: inherit;
242
- `;const H5=d.styled(d.Box)`
242
+ `;const W5=d.styled(d.Box)`
243
243
  margin-top: 12px;
244
244
  border: 1px solid ${d.theme.palette.gray.gray5};
245
245
  border-radius: 8px;
246
246
  width: 100%;
247
- `,W5=d.styled(d.Stack)`
247
+ `,Z5=d.styled(d.Stack)`
248
248
  align-items: center;
249
249
  padding: 11px;
250
250
  width: 100%;
@@ -259,7 +259,7 @@ React keys must be passed directly to JSX without using spread:
259
259
  `,Pd=d.styled(d.Stack)`
260
260
  flex-direction: row;
261
261
  align-items: stretch;
262
- `,Z5=d.styled(d.Stack)`
262
+ `,X5=d.styled(d.Stack)`
263
263
  flex-direction: row;
264
264
  flex-grow: 1;
265
265
  align-items: center;
@@ -270,14 +270,14 @@ React keys must be passed directly to JSX without using spread:
270
270
  height: 16px;
271
271
  flex-shrink: 0;
272
272
  }
273
- `,X5=d.styled(d.Typography)`
273
+ `,z5=d.styled(d.Typography)`
274
274
  max-width: 150px;
275
275
  min-width: 0;
276
276
  letter-spacing: 0.5px;
277
277
  text-overflow: ellipsis;
278
278
  white-space: nowrap;
279
279
  overflow: hidden;
280
- `,z5=d.styled(d.Box)`
280
+ `,Y5=d.styled(d.Box)`
281
281
  box-sizing: border-box;
282
282
  overflow-y: hidden;
283
283
  height: ${e=>e.height?`${e.height}px`:"0px"};
@@ -286,20 +286,20 @@ React keys must be passed directly to JSX without using spread:
286
286
  &.slideUp {
287
287
  height: 0;
288
288
  }
289
- `,Y5=d.styled(d.Typography)`
289
+ `,J5=d.styled(d.Typography)`
290
290
  text-transform: uppercase;
291
291
  color: ${d.theme.palette.gray.gray3};
292
292
  `,jd=d.styled(d.Typography)`
293
293
  color: ${d.theme.palette.gray.gray4};
294
294
  overflow: hidden;
295
295
  word-break: break-word;
296
- `,J5=d.styled(d.Link)`
296
+ `,q5=d.styled(d.Link)`
297
297
  color: ${d.theme.palette.blue.primary};
298
298
  display: inline;
299
299
  whitespace: nowrap;
300
300
  cursor: pointer;
301
301
  text-decoration: none;
302
- `,q5=d.styled(d.Typography)`
302
+ `,$5=d.styled(d.Typography)`
303
303
  &.ellipsisClass {
304
304
  text-overflow: ellipsis;
305
305
  white-space: nowrap;
@@ -313,7 +313,7 @@ React keys must be passed directly to JSX without using spread:
313
313
  text-overflow: ellipsis;
314
314
  -webkit-line-clamp: 3;
315
315
  cursor: pointer;
316
- `,$5=d.styled(d.Typography)`
316
+ `,Q5=d.styled(d.Typography)`
317
317
  display: -webkit-box;
318
318
  -webkit-box-orient: vertical;
319
319
  overflow: hidden;
@@ -321,7 +321,7 @@ React keys must be passed directly to JSX without using spread:
321
321
  text-overflow: ellipsis;
322
322
  -webkit-line-clamp: 3;
323
323
  color: ${d.theme.palette.gray.gray1};
324
- `,Xi=d.styled(d.Box)`
324
+ `,Zi=d.styled(d.Box)`
325
325
  position: relative;
326
326
  top: 1px;
327
327
  content: '';
@@ -363,7 +363,7 @@ React keys must be passed directly to JSX without using spread:
363
363
  `,_n=d.styled(d.Skeleton)`
364
364
  display: block;
365
365
  margin: ${e=>e.margin?e.margin:0};
366
- `,Or=d.styled(d.IconButton)`
366
+ `,Lr=d.styled(d.IconButton)`
367
367
  ${e=>e.disabled?"opacity: 0.5;":""}
368
368
  width: 32px;
369
369
  height: 32px;
@@ -388,7 +388,7 @@ React keys must be passed directly to JSX without using spread:
388
388
  transform: rotate(360deg);
389
389
  }
390
390
  }
391
- `,Q5=d.styled(d.Stack)`
391
+ `,U5=d.styled(d.Stack)`
392
392
  flex-direction: row;
393
393
  position: relative;
394
394
  align-items: center;
@@ -402,10 +402,10 @@ React keys must be passed directly to JSX without using spread:
402
402
  opacity: ${e=>e.isHovered?1:0};
403
403
  transition: opacity ${e=>e.isHovered?"0.5s":"0.1s"} ease-in;
404
404
  }
405
- `,U5=d.styled(d.TableHead)`
405
+ `,K5=d.styled(d.TableHead)`
406
406
  background-color: ${d.theme.palette.gray.white};
407
407
  border-bottom: 1px solid ${d.theme.palette.gray.gray5};
408
- `,K5=d.styled(d.TableCell)`
408
+ `,e4=d.styled(d.TableCell)`
409
409
  height: 12px;
410
410
  padding: 12px 16px;
411
411
  border-top: 1px solid ${d.theme.palette.gray.gray5};
@@ -418,7 +418,7 @@ React keys must be passed directly to JSX without using spread:
418
418
  &:nth-last-child(2) {
419
419
  border-radius: 0px 5px 0px 0px;
420
420
  }
421
- `,e4=d.styled(d.TableRow)`
421
+ `,t4=d.styled(d.TableRow)`
422
422
  .row-edit {
423
423
  visibility: hidden;
424
424
  }
@@ -435,7 +435,7 @@ React keys must be passed directly to JSX without using spread:
435
435
  border-radius: 0px 0px 5px 0px;
436
436
  }
437
437
  }
438
- `,t4=d.styled(d.TableCell)`
438
+ `,n4=d.styled(d.TableCell)`
439
439
  height: 32px;
440
440
  padding: 8px 16px;
441
441
  border-right: 1px solid ${d.theme.palette.gray.gray5};
@@ -443,23 +443,23 @@ React keys must be passed directly to JSX without using spread:
443
443
  &:first-child {
444
444
  border-left: 1px solid ${d.theme.palette.gray.gray5};
445
445
  }
446
- `,n4=d.styled(d.TableCell)`
446
+ `,r4=d.styled(d.TableCell)`
447
447
  width: 34px;
448
448
  position: sticky;
449
449
  right: 0px;
450
450
  background-color: white;
451
451
  border: none;
452
452
  padding: 0px 2px;
453
- `,r4=d.styled(d.TableCell)`
453
+ `,o4=d.styled(d.TableCell)`
454
454
  padding: 16px 19px;
455
455
  position: sticky;
456
456
  right: 0px;
457
457
  background-color: white;
458
458
  border: none;
459
- `,o4=d.styled("img")`
459
+ `,s4=d.styled("img")`
460
460
  transition: transform 0.3s;
461
461
  transform: rotate(${e=>e.transformAngle}deg);
462
- `,s4=d.styled(d.Typography)`
462
+ `,a4=d.styled(d.Typography)`
463
463
  display: flex;
464
464
  font-size: 12px;
465
465
  color: ${d.theme.palette.blue.primary};
@@ -467,16 +467,16 @@ React keys must be passed directly to JSX without using spread:
467
467
  align-items: center;
468
468
  margin: 0 12px 12px 12px;
469
469
  cursor: pointer;
470
- `,a4=d.styled(d.Typography)`
470
+ `,i4=d.styled(d.Typography)`
471
471
  display: flex;
472
472
  align-items: center;
473
473
  line-height: 28px;
474
474
  font-weight: 600;
475
- `,i4=d.styled(d.Box)`
475
+ `,c4=d.styled(d.Box)`
476
476
  margin-top: 12px;
477
477
  border: 1px solid ${d.palette.gray.gray5};
478
478
  border-radius: 4px;
479
- `,c4=d.styled(d.Stack)`
479
+ `,l4=d.styled(d.Stack)`
480
480
  flex-direction: row;
481
481
  align-items: center;
482
482
  background-color: #e1e8ff;
@@ -484,7 +484,7 @@ React keys must be passed directly to JSX without using spread:
484
484
  box-sizing: border-box;
485
485
  height: 48px;
486
486
  justify-content: space-between;
487
- `,l4=d.styled(d.Box)`
487
+ `,u4=d.styled(d.Box)`
488
488
  overflow: hidden;
489
489
  transition: max-height 300ms;
490
490
  &.slideUp {
@@ -493,17 +493,17 @@ React keys must be passed directly to JSX without using spread:
493
493
  &.slideDown {
494
494
  max-height: ${({height:e})=>e?`${e}px`:"0px"};
495
495
  }
496
- `,u4=d.styled(d.Box)`
496
+ `,d4=d.styled(d.Box)`
497
497
  background-color: #f0f3ff99;
498
498
  padding: 14px 12px 8px 12px;
499
499
  box-sizing: border-box;
500
- `,d4=d.styled(d.Box)`
500
+ `,f4=d.styled(d.Box)`
501
501
  margin-bottom: 12px;
502
502
  margin-top: 8px;
503
503
  li {
504
504
  display: list-item;
505
505
  }
506
- `,f4=d.styled(d.Stack)`
506
+ `,p4=d.styled(d.Stack)`
507
507
  margin-bottom: 6px;
508
508
  list-style-type: disc;
509
509
  margin-left: ${e=>e.marginLeft?`${e.marginLeft}`:"14px"};
@@ -515,35 +515,35 @@ React keys must be passed directly to JSX without using spread:
515
515
  height: 20px;
516
516
  border-radius: 2px;
517
517
  }
518
- `,p4=d.styled(d.Button)`
518
+ `,h4=d.styled(d.Button)`
519
519
  height: 28px;
520
520
  max-width: 115px;
521
521
  white-space: pre;
522
- `,h4=d.styled(d.Typography)`
522
+ `,g4=d.styled(d.Typography)`
523
523
  font-weight: 500;
524
524
  height: 100%;
525
- `,g4=d.styled(d.Box)`
525
+ `,m4=d.styled(d.Box)`
526
526
  &:last-child {
527
527
  margin-bottom: 16px;
528
528
  }
529
- `,m4=d.styled(d.Typography)`
529
+ `,b4=d.styled(d.Typography)`
530
530
  white-space: nowrap;
531
531
  overflow: hidden;
532
532
  text-overflow: ellipsis;
533
533
  max-width: 100%;
534
534
  height: 100%;
535
535
  color: ${d.theme.palette.gray.gray2};
536
- `,b4=d.styled(d.Stack)`
536
+ `,y4=d.styled(d.Stack)`
537
537
  padding: 8px 16px;
538
538
  color: ${d.theme.palette.gray.black};
539
- `,y4=d.styled(d.Typography)`
539
+ `,C4=d.styled(d.Typography)`
540
540
  white-space: nowrap;
541
541
  overflow: hidden;
542
542
  text-overflow: ellipsis;
543
543
  width: calc(100% - 20px);
544
544
  display: inline-block;
545
545
  color: ${d.theme.palette.gray.gray2};
546
- `,C4=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:a})=>{const i=w.useRef(null),c=w.useRef(null),[l,f]=w.useState(null),g=!!l,{availableFeatures:y,sendTrackingEvent:v,currentSmIds:b,userEmail:p}=w.useContext(Be),{userGroupId:h,userId:m}=Bt()||{},x=et(y,As),C=[{id:"rate-experience",label:"Rate your experience",icon:u.jsx(M5,{}),onClick:()=>{f(null);const _=Os({url:ud,params:{email:p,user_id:m,ug_id:h,sm_ids:b.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(_,"_blank"),v(Pi,{sm_ids:b,ug_id:h,connector_names:e,source:"help_drop_down"}),ps(m)}},{id:"instant-chat",label:"Instant chat with support",icon:u.jsx(R5,{}),onClick:()=>{f(null),window.open(zm,"_blank"),v(F3,{sm_ids:b,ug_id:h,connector_names:e,source:"help_drop_down"})}}],I=w.useCallback(_=>{const T=document.getElementById("connector-agent-container");if(!_||!T)return;c.current&&c.current.disconnect();const S=new IntersectionObserver(L=>{const N=i.current;for(const k of L)N==null||N.classList.toggle(Dd,k.intersectionRatio===0)},{root:T});S.observe(_),c.current=S},[]),E=_=>{v(O3,{sm_ids:b,ug_id:h,connector_names:e}),f(_.currentTarget)};return u.jsxs(u.Fragment,{children:[u.jsx(V5,{ref:I}),u.jsx(j5,{options:C,anchor:l,open:g,onClose:()=>f(null)}),u.jsxs(B5,{ref:i,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[x?u.jsx(kd,{width:"20px",height:"20px"}):u.jsx(Nd,{}),u.jsx(Rd,{variant:"h2",children:x?Vi:yd})]}),u.jsxs(d.Stack,{direction:"row",children:[u.jsx(d.Tooltip,{title:Wm,placement:"bottom",children:u.jsx(d.IconButton,{onClick:E,id:"help-button",sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:N5,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?u.jsxs(u.Fragment,{children:[r?u.jsx(d.Tooltip,{title:Id,placement:"bottom",children:u.jsx(d.IconButton,{onClick:a,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:P5,alt:"Link Task",height:"20px"})})}):null,n?u.jsx(d.Tooltip,{title:Ed,placement:"bottom",children:u.jsx(d.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:D5,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var zi={exports:{}},Yi={};/**
546
+ `,x4=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:a})=>{const i=w.useRef(null),c=w.useRef(null),[l,f]=w.useState(null),g=!!l,{availableFeatures:y,sendTrackingEvent:v,currentSmIds:b,userEmail:p}=w.useContext(Be),{userGroupId:h,userId:m}=Gt()||{},x=et(y,Ls),C=[{id:"rate-experience",label:"Rate your experience",icon:u.jsx(P5,{}),onClick:()=>{f(null);const _=Fs({url:ud,params:{email:p,user_id:m,ug_id:h,sm_ids:b.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(_,"_blank"),v(Mi,{sm_ids:b,ug_id:h,connector_names:e,source:"help_drop_down"}),hs(m)}},{id:"instant-chat",label:"Instant chat with support",icon:u.jsx(M5,{}),onClick:()=>{f(null),window.open(Ym,"_blank"),v(k3,{sm_ids:b,ug_id:h,connector_names:e,source:"help_drop_down"})}}],I=w.useCallback(_=>{const T=document.getElementById("connector-agent-container");if(!_||!T)return;c.current&&c.current.disconnect();const S=new IntersectionObserver(L=>{const N=i.current;for(const k of L)N==null||N.classList.toggle(Dd,k.intersectionRatio===0)},{root:T});S.observe(_),c.current=S},[]),E=_=>{v(F3,{sm_ids:b,ug_id:h,connector_names:e}),f(_.currentTarget)};return u.jsxs(u.Fragment,{children:[u.jsx(G5,{ref:I}),u.jsx(B5,{options:C,anchor:l,open:g,onClose:()=>f(null)}),u.jsxs(V5,{ref:i,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[x?u.jsx(kd,{width:"20px",height:"20px"}):u.jsx(Nd,{}),u.jsx(Rd,{variant:"h2",children:x?Bi:yd})]}),u.jsxs(d.Stack,{direction:"row",children:[u.jsx(d.Tooltip,{title:Zm,placement:"bottom",children:u.jsx(d.IconButton,{onClick:E,id:"help-button",sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:R5,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?u.jsxs(u.Fragment,{children:[r?u.jsx(d.Tooltip,{title:Id,placement:"bottom",children:u.jsx(d.IconButton,{onClick:a,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:j5,alt:"Link Task",height:"20px"})})}):null,n?u.jsx(d.Tooltip,{title:Ed,placement:"bottom",children:u.jsx(d.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:N5,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var Xi={exports:{}},zi={};/**
547
547
  * @license React
548
548
  * use-sync-external-store-with-selector.production.min.js
549
549
  *
@@ -551,7 +551,7 @@ React keys must be passed directly to JSX without using spread:
551
551
  *
552
552
  * This source code is licensed under the MIT license found in the
553
553
  * LICENSE file in the root directory of this source tree.
554
- */var Vd;function x4(){if(Vd)return Yi;Vd=1;var e=w;function t(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return Yi.useSyncExternalStoreWithSelector=function(c,l,f,g,y){var v=o(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=a(function(){function h(E){if(!m){if(m=!0,x=E,E=g(E),y!==void 0&&b.hasValue){var _=b.value;if(y(_,E))return C=_}return C=E}if(_=C,n(x,E))return _;var T=g(E);return y!==void 0&&y(_,T)?_:(x=E,C=T)}var m=!1,x,C,I=f===void 0?null:f;return[function(){return h(l())},I===null?void 0:function(){return h(I())}]},[l,f,g,y]);var p=r(c,v[0],v[1]);return s(function(){b.hasValue=!0,b.value=p},[p]),i(p),p},Yi}var Ji={};/**
554
+ */var Vd;function v4(){if(Vd)return zi;Vd=1;var e=w;function t(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return zi.useSyncExternalStoreWithSelector=function(c,l,f,g,y){var v=o(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=a(function(){function h(E){if(!m){if(m=!0,x=E,E=g(E),y!==void 0&&b.hasValue){var _=b.value;if(y(_,E))return C=_}return C=E}if(_=C,n(x,E))return _;var T=g(E);return y!==void 0&&y(_,T)?_:(x=E,C=T)}var m=!1,x,C,I=f===void 0?null:f;return[function(){return h(l())},I===null?void 0:function(){return h(I())}]},[l,f,g,y]);var p=r(c,v[0],v[1]);return s(function(){b.hasValue=!0,b.value=p},[p]),i(p),p},zi}var Yi={};/**
555
555
  * @license React
556
556
  * use-sync-external-store-with-selector.development.js
557
557
  *
@@ -559,30 +559,30 @@ React keys must be passed directly to JSX without using spread:
559
559
  *
560
560
  * This source code is licensed under the MIT license found in the
561
561
  * LICENSE file in the root directory of this source tree.
562
- */var Gd;function v4(){return Gd||(Gd=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;function c(l,f,g,y,v){var b=o(null),p;b.current===null?(p={hasValue:!1,value:null},b.current=p):p=b.current;var h=a(function(){var I=!1,E,_,T=function(k){if(!I){I=!0,E=k;var D=y(k);if(v!==void 0&&p.hasValue){var P=p.value;if(v(P,D))return _=P,P}return _=D,D}var V=E,z=_;if(n(V,k))return z;var $=y(k);return v!==void 0&&v(z,$)?z:(E=k,_=$,$)},S=g===void 0?null:g,L=function(){return T(f())},N=S===null?void 0:function(){return T(S())};return[L,N]},[f,g,y,v]),m=h[0],x=h[1],C=r(l,m,x);return s(function(){p.hasValue=!0,p.value=C},[C]),i(C),C}Ji.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ji}process.env.NODE_ENV==="production"?zi.exports=x4():zi.exports=v4();var E4=zi.exports,_t="default"in A?A.default:A,Hd=Symbol.for("react-redux-context"),Wd=typeof globalThis<"u"?globalThis:{};function I4(){if(!_t.createContext)return{};const e=Wd[Hd]??(Wd[Hd]=new Map);let t=e.get(_t.createContext);return t||(t=_t.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(_t.createContext,t)),t}var Sn=I4(),w4=()=>{throw new Error("uSES not initialized!")};function qi(e=Sn){return function(){const n=_t.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var Zd=qi(),Xd=w4,_4=e=>{Xd=e},S4=(e,t)=>e===t;function T4(e=Sn){const t=e===Sn?Zd:qi(e),n=(r,o={})=>{const{equalityFn:s=S4,devModeChecks:a={}}=typeof o=="function"?{equalityFn:o}:o;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof s!="function")throw new Error("You must pass a function as an equality function to useSelector")}const{store:i,subscription:c,getServerState:l,stabilityCheck:f,identityFunctionCheck:g}=t(),y=_t.useRef(!0),v=_t.useCallback({[r.name](p){const h=r(p);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:m,stabilityCheck:x}={stabilityCheck:f,identityFunctionCheck:g,...a};if(x==="always"||x==="once"&&y.current){const C=r(p);if(!s(h,C)){let I;try{throw new Error}catch(E){({stack:I}=E)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
562
+ */var Gd;function E4(){return Gd||(Gd=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=w;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;function c(l,f,g,y,v){var b=o(null),p;b.current===null?(p={hasValue:!1,value:null},b.current=p):p=b.current;var h=a(function(){var I=!1,E,_,T=function(k){if(!I){I=!0,E=k;var D=y(k);if(v!==void 0&&p.hasValue){var M=p.value;if(v(M,D))return _=M,M}return _=D,D}var V=E,z=_;if(n(V,k))return z;var q=y(k);return v!==void 0&&v(z,q)?z:(E=k,_=q,q)},S=g===void 0?null:g,L=function(){return T(f())},N=S===null?void 0:function(){return T(S())};return[L,N]},[f,g,y,v]),m=h[0],x=h[1],C=r(l,m,x);return s(function(){p.hasValue=!0,p.value=C},[C]),i(C),C}Yi.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yi}process.env.NODE_ENV==="production"?Xi.exports=v4():Xi.exports=E4();var I4=Xi.exports,Tt="default"in A?A.default:A,Hd=Symbol.for("react-redux-context"),Wd=typeof globalThis<"u"?globalThis:{};function w4(){if(!Tt.createContext)return{};const e=Wd[Hd]??(Wd[Hd]=new Map);let t=e.get(Tt.createContext);return t||(t=Tt.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(Tt.createContext,t)),t}var Sn=w4(),_4=()=>{throw new Error("uSES not initialized!")};function Ji(e=Sn){return function(){const n=Tt.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var Zd=Ji(),Xd=_4,S4=e=>{Xd=e},T4=(e,t)=>e===t;function A4(e=Sn){const t=e===Sn?Zd:Ji(e),n=(r,o={})=>{const{equalityFn:s=T4,devModeChecks:a={}}=typeof o=="function"?{equalityFn:o}:o;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof s!="function")throw new Error("You must pass a function as an equality function to useSelector")}const{store:i,subscription:c,getServerState:l,stabilityCheck:f,identityFunctionCheck:g}=t(),y=Tt.useRef(!0),v=Tt.useCallback({[r.name](p){const h=r(p);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:m,stabilityCheck:x}={stabilityCheck:f,identityFunctionCheck:g,...a};if(x==="always"||x==="once"&&y.current){const C=r(p);if(!s(h,C)){let I;try{throw new Error}catch(E){({stack:I}=E)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
563
563
  Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,{state:p,selected:h,selected2:C,stack:I})}}if((m==="always"||m==="once"&&y.current)&&h===p){let C;try{throw new Error}catch(I){({stack:C}=I)}console.warn("Selector "+(r.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
564
- Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:C})}y.current&&(y.current=!1)}return h}}[r.name],[r,f,a.stabilityCheck]),b=Xd(c.addNestedSub,i.getState,l||i.getState,v,s);return _t.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var A4=T4();function L4(e){e()}function O4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){L4(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var zd={notify(){},get:()=>[]};function F4(e,t){let n,r=zd,o=0,s=!1;function a(p){f();const h=r.subscribe(p);let m=!1;return()=>{m||(m=!0,h(),g())}}function i(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=O4())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=zd)}function y(){s||(s=!0,f())}function v(){s&&(s=!1,g())}const b={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:y,tryUnsubscribe:v,getListeners:()=>r};return b}var k4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",D4=typeof navigator<"u"&&navigator.product==="ReactNative",N4=k4||D4?_t.useLayoutEffect:_t.useEffect;function R4({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=_t.useMemo(()=>{const l=F4(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=_t.useMemo(()=>e.getState(),[e]);N4(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]);const c=t||Sn;return _t.createElement(c.Provider,{value:a},n)}var $i=R4;function Yd(e=Sn){const t=e===Sn?Zd:qi(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var M4=Yd();function P4(e=Sn){const t=e===Sn?M4:Yd(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var j4=P4();_4(E4.useSyncExternalStoreWithSelector);const Vt=j4.withTypes(),Ce=A4.withTypes(),je={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},ee={IDLE:"idle",LOADING:"loading",FAILED:"failed"},B4="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.7%209.71005L6.19497%207.20503C5.92161%206.93166%205.47839%206.93166%205.20503%207.20503C4.93166%207.47839%204.93166%207.92161%205.20503%208.19497L8.20503%2011.195C8.47839%2011.4683%208.92161%2011.4683%209.19497%2011.195L12.195%208.19497C12.4683%207.92161%2012.4683%207.47839%2012.195%207.20503C11.9216%206.93166%2011.4784%206.93166%2011.205%207.20503L8.7%209.71005Z'%20fill='%23196FE0'/%3e%3c/svg%3e",Jd="Show more",V4="Show less",G4="Show preview",H4="Hide preview",W4="Select email";function tt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Z4=typeof Symbol=="function"&&Symbol.observable||"@@observable",qd=Z4,Qi=()=>Math.random().toString(36).substring(7).split("").join("."),X4={INIT:`@@redux/INIT${Qi()}`,REPLACE:`@@redux/REPLACE${Qi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Qi()}`},Kn=X4;function wo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function z4(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(q4(e))return"date";if(J4(e))return"error";const n=Y4(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function Y4(e){return typeof e.constructor=="function"?e.constructor.name:null}function J4(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function q4(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Tn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=z4(e)),t}function $d(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?tt(2):`Expected the root reducer to be a function. Instead, received: '${Tn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?tt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?tt(1):`Expected the enhancer to be a function. Instead, received: '${Tn(n)}'`);return n($d)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((h,m)=>{a.set(m,h)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?tt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?tt(4):`Expected the listener to be a function. Instead, received: '${Tn(h)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?tt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;l();const x=i++;return a.set(x,h),function(){if(m){if(c)throw new Error(process.env.NODE_ENV==="production"?tt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,l(),a.delete(x),s=null}}}function y(h){if(!wo(h))throw new Error(process.env.NODE_ENV==="production"?tt(7):`Actions must be plain objects. Instead, the actual type was: '${Tn(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?tt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?tt(17):`Action "type" property must be a string. Instead, the actual type was: '${Tn(h.type)}'. Value was: '${h.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?tt(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,h)}finally{c=!1}return(s=a).forEach(x=>{x()}),h}function v(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?tt(10):`Expected the nextReducer to be a function. Instead, received: '${Tn(h)}`);r=h,y({type:Kn.REPLACE})}function b(){const h=g;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?tt(11):`Expected the observer to be an object. Instead, received: '${Tn(m)}'`);function x(){const I=m;I.next&&I.next(f())}return x(),{unsubscribe:h(x)}},[qd](){return this}}}return y({type:Kn.INIT}),{dispatch:y,subscribe:g,getState:f,replaceReducer:v,[qd]:b}}function Qd(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function $4(e,t,n,r){const o=Object.keys(t),s=n&&n.type===Kn.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!wo(e))return`The ${s} has unexpected type of "${Tn(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(i=>!t.hasOwnProperty(i)&&!r[i]);if(a.forEach(i=>{r[i]=!0}),!(n&&n.type===Kn.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function Q4(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Kn.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?tt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:Kn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?tt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Kn.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function Ud(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const i=t[a];process.env.NODE_ENV!=="production"&&typeof e[i]>"u"&&Qd(`No reducer provided for key "${i}"`),typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let s;try{Q4(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=$4(i,n,c,o);g&&Qd(g)}let l=!1;const f={};for(let g=0;g<r.length;g++){const y=r[g],v=n[y],b=i[y],p=v(b,c);if(typeof p>"u"){const h=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?tt(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${y}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}f[y]=p,l=l||p!==b}return l=l||r.length!==Object.keys(i).length,l?f:i}}function Fs(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function U4(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?tt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(c,...l)=>s(c,...l)},i=e.map(c=>c(a));return s=Fs(...i)(o.dispatch),{...o,dispatch:s}}}function Kd(e){return wo(e)&&"type"in e&&typeof e.type=="string"}var e0=Symbol.for("immer-nothing"),t0=Symbol.for("immer-draftable"),St=Symbol.for("immer-state"),K4=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function mt(e,...t){if(process.env.NODE_ENV!=="production"){const n=K4[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fr=Object.getPrototypeOf;function er(e){return!!e&&!!e[St]}function pn(e){var t;return e?n0(e)||Array.isArray(e)||!!e[t0]||!!((t=e.constructor)!=null&&t[t0])||Ns(e)||Rs(e):!1}var eb=Object.prototype.constructor.toString();function n0(e){if(!e||typeof e!="object")return!1;const t=Fr(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===eb}function ks(e,t){Ds(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ds(e){const t=e[St];return t?t.type_:Array.isArray(e)?1:Ns(e)?2:Rs(e)?3:0}function Ui(e,t){return Ds(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function r0(e,t,n){const r=Ds(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function tb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ns(e){return e instanceof Map}function Rs(e){return e instanceof Set}function tr(e){return e.copy_||e.base_}function Ki(e,t){if(Ns(e))return new Map(e);if(Rs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=n0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[St];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const a=o[s],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Fr(e),r)}else{const r=Fr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function ec(e,t=!1){return Ms(e)||er(e)||!pn(e)||(Ds(e)>1&&(e.set=e.add=e.clear=e.delete=nb),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ec(r,!0))),e}function nb(){mt(2)}function Ms(e){return Object.isFrozen(e)}var rb={};function nr(e){const t=rb[e];return t||mt(0,e),t}var _o;function o0(){return _o}function ob(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function s0(e,t){t&&(nr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function tc(e){nc(e),e.drafts_.forEach(sb),e.drafts_=null}function nc(e){e===_o&&(_o=e.parent_)}function a0(e){return _o=ob(_o,e)}function sb(e){const t=e[St];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function i0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[St].modified_&&(tc(t),mt(4)),pn(e)&&(e=Ps(t,e),t.parent_||js(t,e)),t.patches_&&nr("Patches").generateReplacementPatches_(n[St].base_,e,t.patches_,t.inversePatches_)):e=Ps(t,n,[]),tc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==e0?e:void 0}function Ps(e,t,n){if(Ms(t))return t;const r=t[St];if(!r)return ks(t,(o,s)=>c0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return js(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,a=!1;r.type_===3&&(s=new Set(o),o.clear(),a=!0),ks(s,(i,c)=>c0(e,r,o,i,c,n,a)),js(e,o,!1),n&&e.patches_&&nr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function c0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&mt(5),er(o)){const i=s&&t&&t.type_!==3&&!Ui(t.assigned_,r)?s.concat(r):void 0,c=Ps(e,o,i);if(r0(n,r,c),er(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(pn(o)&&!Ms(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ps(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&js(e,o)}}function js(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ec(t,n)}function ab(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:o0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=rc;n&&(o=[r],s=So);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var rc={get(e,t){if(t===St)return e;const n=tr(e);if(!Ui(n,t))return ib(e,n,t);const r=n[t];return e.finalized_||!pn(r)?r:r===oc(e.base_,t)?(ac(e),e.copy_[t]=ic(r,e)):r},has(e,t){return t in tr(e)},ownKeys(e){return Reflect.ownKeys(tr(e))},set(e,t,n){const r=l0(tr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=oc(tr(e),t),s=o==null?void 0:o[St];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(tb(n,o)&&(n!==void 0||Ui(e.base_,t)))return!0;ac(e),sc(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return oc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ac(e),sc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=tr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){mt(11)},getPrototypeOf(e){return Fr(e.base_)},setPrototypeOf(){mt(12)}},So={};ks(rc,(e,t)=>{So[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),So.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&mt(13),So.set.call(this,e,t,void 0)},So.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&mt(14),rc.set.call(this,e[0],t,n,e[0])};function oc(e,t){const n=e[St];return(n?tr(n):e)[t]}function ib(e,t,n){var o;const r=l0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function l0(e,t){if(!(t in e))return;let n=Fr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Fr(n)}}function sc(e){e.modified_||(e.modified_=!0,e.parent_&&sc(e.parent_))}function ac(e){e.copy_||(e.copy_=Ki(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var cb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(c=s,...l){return a.produce(c,f=>n.call(this,f,...l))}}typeof n!="function"&&mt(6),r!==void 0&&typeof r!="function"&&mt(7);let o;if(pn(t)){const s=a0(this),a=ic(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?tc(s):nc(s)}return s0(s,r),i0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===e0&&(o=void 0),this.autoFreeze_&&ec(o,!0),r){const s=[],a=[];nr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else mt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...i)=>this.produceWithPatches(a,c=>t(c,...i));let r,o;return[this.produce(t,n,(a,i)=>{r=a,o=i}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){pn(e)||mt(8),er(e)&&(e=lb(e));const t=a0(this),n=ic(e,void 0);return n[St].isManual_=!0,nc(t),n}finishDraft(e,t){const n=e&&e[St];(!n||!n.isManual_)&&mt(9);const{scope_:r}=n;return s0(r,t),i0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=nr("Patches").applyPatches_;return er(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ic(e,t){const n=Ns(e)?nr("MapSet").proxyMap_(e,t):Rs(e)?nr("MapSet").proxySet_(e,t):ab(e,t);return(t?t.scope_:o0()).drafts_.push(n),n}function lb(e){return er(e)||mt(10,e),u0(e)}function u0(e){if(!pn(e)||Ms(e))return e;const t=e[St];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ki(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ki(e,!0);return ks(n,(r,o)=>{r0(n,r,u0(o))}),t&&(t.finalized_=!1),n}var Tt=new cb,d0=Tt.produce;Tt.produceWithPatches.bind(Tt),Tt.setAutoFreeze.bind(Tt),Tt.setUseStrictShallowCopy.bind(Tt),Tt.applyPatches.bind(Tt),Tt.createDraft.bind(Tt),Tt.finishDraft.bind(Tt);var ub=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
564
+ Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:C})}y.current&&(y.current=!1)}return h}}[r.name],[r,f,a.stabilityCheck]),b=Xd(c.addNestedSub,i.getState,l||i.getState,v,s);return Tt.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var L4=A4();function O4(e){e()}function F4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){O4(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var zd={notify(){},get:()=>[]};function k4(e,t){let n,r=zd,o=0,s=!1;function a(p){f();const h=r.subscribe(p);let m=!1;return()=>{m||(m=!0,h(),g())}}function i(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=F4())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=zd)}function y(){s||(s=!0,f())}function v(){s&&(s=!1,g())}const b={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:y,tryUnsubscribe:v,getListeners:()=>r};return b}var D4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",N4=typeof navigator<"u"&&navigator.product==="ReactNative",R4=D4||N4?Tt.useLayoutEffect:Tt.useEffect;function M4({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=Tt.useMemo(()=>{const l=k4(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=Tt.useMemo(()=>e.getState(),[e]);R4(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]);const c=t||Sn;return Tt.createElement(c.Provider,{value:a},n)}var qi=M4;function Yd(e=Sn){const t=e===Sn?Zd:Ji(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var P4=Yd();function j4(e=Sn){const t=e===Sn?P4:Yd(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var B4=j4();S4(I4.useSyncExternalStoreWithSelector);const Ht=B4.withTypes(),Ce=L4.withTypes(),je={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},K={IDLE:"idle",LOADING:"loading",FAILED:"failed"},V4="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.7%209.71005L6.19497%207.20503C5.92161%206.93166%205.47839%206.93166%205.20503%207.20503C4.93166%207.47839%204.93166%207.92161%205.20503%208.19497L8.20503%2011.195C8.47839%2011.4683%208.92161%2011.4683%209.19497%2011.195L12.195%208.19497C12.4683%207.92161%2012.4683%207.47839%2012.195%207.20503C11.9216%206.93166%2011.4784%206.93166%2011.205%207.20503L8.7%209.71005Z'%20fill='%23196FE0'/%3e%3c/svg%3e",Jd="Show more",G4="Show less",H4="Show preview",W4="Hide preview",Z4="Select email";function tt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var X4=typeof Symbol=="function"&&Symbol.observable||"@@observable",qd=X4,$i=()=>Math.random().toString(36).substring(7).split("").join("."),z4={INIT:`@@redux/INIT${$i()}`,REPLACE:`@@redux/REPLACE${$i()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${$i()}`},$n=z4;function Eo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Y4(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if($4(e))return"date";if(q4(e))return"error";const n=J4(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function J4(e){return typeof e.constructor=="function"?e.constructor.name:null}function q4(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function $4(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Tn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Y4(e)),t}function $d(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?tt(2):`Expected the root reducer to be a function. Instead, received: '${Tn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?tt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?tt(1):`Expected the enhancer to be a function. Instead, received: '${Tn(n)}'`);return n($d)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((h,m)=>{a.set(m,h)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?tt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?tt(4):`Expected the listener to be a function. Instead, received: '${Tn(h)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?tt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;l();const x=i++;return a.set(x,h),function(){if(m){if(c)throw new Error(process.env.NODE_ENV==="production"?tt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,l(),a.delete(x),s=null}}}function y(h){if(!Eo(h))throw new Error(process.env.NODE_ENV==="production"?tt(7):`Actions must be plain objects. Instead, the actual type was: '${Tn(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?tt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?tt(17):`Action "type" property must be a string. Instead, the actual type was: '${Tn(h.type)}'. Value was: '${h.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?tt(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,h)}finally{c=!1}return(s=a).forEach(x=>{x()}),h}function v(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?tt(10):`Expected the nextReducer to be a function. Instead, received: '${Tn(h)}`);r=h,y({type:$n.REPLACE})}function b(){const h=g;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?tt(11):`Expected the observer to be an object. Instead, received: '${Tn(m)}'`);function x(){const I=m;I.next&&I.next(f())}return x(),{unsubscribe:h(x)}},[qd](){return this}}}return y({type:$n.INIT}),{dispatch:y,subscribe:g,getState:f,replaceReducer:v,[qd]:b}}function Qd(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Q4(e,t,n,r){const o=Object.keys(t),s=n&&n.type===$n.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Eo(e))return`The ${s} has unexpected type of "${Tn(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(i=>!t.hasOwnProperty(i)&&!r[i]);if(a.forEach(i=>{r[i]=!0}),!(n&&n.type===$n.REPLACE)&&a.length>0)return`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${s}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`}function U4(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:$n.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?tt(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:$n.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?tt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${$n.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function Ud(e){const t=Object.keys(e),n={};for(let a=0;a<t.length;a++){const i=t[a];process.env.NODE_ENV!=="production"&&typeof e[i]>"u"&&Qd(`No reducer provided for key "${i}"`),typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;process.env.NODE_ENV!=="production"&&(o={});let s;try{U4(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=Q4(i,n,c,o);g&&Qd(g)}let l=!1;const f={};for(let g=0;g<r.length;g++){const y=r[g],v=n[y],b=i[y],p=v(b,c);if(typeof p>"u"){const h=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?tt(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${y}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}f[y]=p,l=l||p!==b}return l=l||r.length!==Object.keys(i).length,l?f:i}}function ks(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function K4(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?tt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(c,...l)=>s(c,...l)},i=e.map(c=>c(a));return s=ks(...i)(o.dispatch),{...o,dispatch:s}}}function Kd(e){return Eo(e)&&"type"in e&&typeof e.type=="string"}var e0=Symbol.for("immer-nothing"),t0=Symbol.for("immer-draftable"),At=Symbol.for("immer-state"),eb=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function bt(e,...t){if(process.env.NODE_ENV!=="production"){const n=eb[e],r=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Or=Object.getPrototypeOf;function Qn(e){return!!e&&!!e[At]}function pn(e){var t;return e?n0(e)||Array.isArray(e)||!!e[t0]||!!((t=e.constructor)!=null&&t[t0])||Rs(e)||Ms(e):!1}var tb=Object.prototype.constructor.toString();function n0(e){if(!e||typeof e!="object")return!1;const t=Or(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===tb}function Ds(e,t){Ns(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ns(e){const t=e[At];return t?t.type_:Array.isArray(e)?1:Rs(e)?2:Ms(e)?3:0}function Qi(e,t){return Ns(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function r0(e,t,n){const r=Ns(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function nb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Rs(e){return e instanceof Map}function Ms(e){return e instanceof Set}function Un(e){return e.copy_||e.base_}function Ui(e,t){if(Rs(e))return new Map(e);if(Ms(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=n0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[At];let o=Reflect.ownKeys(r);for(let s=0;s<o.length;s++){const a=o[s],i=r[a];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(r[a]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[a]})}return Object.create(Or(e),r)}else{const r=Or(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function Ki(e,t=!1){return Ps(e)||Qn(e)||!pn(e)||(Ns(e)>1&&(e.set=e.add=e.clear=e.delete=rb),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Ki(r,!0))),e}function rb(){bt(2)}function Ps(e){return Object.isFrozen(e)}var ob={};function Kn(e){const t=ob[e];return t||bt(0,e),t}var Io;function o0(){return Io}function sb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function s0(e,t){t&&(Kn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ec(e){tc(e),e.drafts_.forEach(ab),e.drafts_=null}function tc(e){e===Io&&(Io=e.parent_)}function a0(e){return Io=sb(Io,e)}function ab(e){const t=e[At];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function i0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[At].modified_&&(ec(t),bt(4)),pn(e)&&(e=js(t,e),t.parent_||Bs(t,e)),t.patches_&&Kn("Patches").generateReplacementPatches_(n[At].base_,e,t.patches_,t.inversePatches_)):e=js(t,n,[]),ec(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==e0?e:void 0}function js(e,t,n){if(Ps(t))return t;const r=t[At];if(!r)return Ds(t,(o,s)=>c0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Bs(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,a=!1;r.type_===3&&(s=new Set(o),o.clear(),a=!0),Ds(s,(i,c)=>c0(e,r,o,i,c,n,a)),Bs(e,o,!1),n&&e.patches_&&Kn("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function c0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&bt(5),Qn(o)){const i=s&&t&&t.type_!==3&&!Qi(t.assigned_,r)?s.concat(r):void 0,c=js(e,o,i);if(r0(n,r,c),Qn(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(pn(o)&&!Ps(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;js(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Bs(e,o)}}function Bs(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ki(t,n)}function ib(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:o0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=nc;n&&(o=[r],s=wo);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var nc={get(e,t){if(t===At)return e;const n=Un(e);if(!Qi(n,t))return cb(e,n,t);const r=n[t];return e.finalized_||!pn(r)?r:r===rc(e.base_,t)?(sc(e),e.copy_[t]=ac(r,e)):r},has(e,t){return t in Un(e)},ownKeys(e){return Reflect.ownKeys(Un(e))},set(e,t,n){const r=l0(Un(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=rc(Un(e),t),s=o==null?void 0:o[At];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(nb(n,o)&&(n!==void 0||Qi(e.base_,t)))return!0;sc(e),oc(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return rc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,sc(e),oc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Un(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){bt(11)},getPrototypeOf(e){return Or(e.base_)},setPrototypeOf(){bt(12)}},wo={};Ds(nc,(e,t)=>{wo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),wo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&bt(13),wo.set.call(this,e,t,void 0)},wo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&bt(14),nc.set.call(this,e[0],t,n,e[0])};function rc(e,t){const n=e[At];return(n?Un(n):e)[t]}function cb(e,t,n){var o;const r=l0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function l0(e,t){if(!(t in e))return;let n=Or(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Or(n)}}function oc(e){e.modified_||(e.modified_=!0,e.parent_&&oc(e.parent_))}function sc(e){e.copy_||(e.copy_=Ui(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(c=s,...l){return a.produce(c,f=>n.call(this,f,...l))}}typeof n!="function"&&bt(6),r!==void 0&&typeof r!="function"&&bt(7);let o;if(pn(t)){const s=a0(this),a=ac(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?ec(s):tc(s)}return s0(s,r),i0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===e0&&(o=void 0),this.autoFreeze_&&Ki(o,!0),r){const s=[],a=[];Kn("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else bt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...i)=>this.produceWithPatches(a,c=>t(c,...i));let r,o;return[this.produce(t,n,(a,i)=>{r=a,o=i}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){pn(e)||bt(8),Qn(e)&&(e=ub(e));const t=a0(this),n=ac(e,void 0);return n[At].isManual_=!0,tc(t),n}finishDraft(e,t){const n=e&&e[At];(!n||!n.isManual_)&&bt(9);const{scope_:r}=n;return s0(r,t),i0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Kn("Patches").applyPatches_;return Qn(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ac(e,t){const n=Rs(e)?Kn("MapSet").proxyMap_(e,t):Ms(e)?Kn("MapSet").proxySet_(e,t):ib(e,t);return(t?t.scope_:o0()).drafts_.push(n),n}function ub(e){return Qn(e)||bt(10,e),u0(e)}function u0(e){if(!pn(e)||Ps(e))return e;const t=e[At];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ui(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ui(e,!0);return Ds(n,(r,o)=>{r0(n,r,u0(o))}),t&&(t.finalized_=!1),n}var Lt=new lb,d0=Lt.produce;Lt.produceWithPatches.bind(Lt),Lt.setAutoFreeze.bind(Lt),Lt.setUseStrictShallowCopy.bind(Lt),Lt.applyPatches.bind(Lt),Lt.createDraft.bind(Lt),Lt.finishDraft.bind(Lt);var db=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
565
565
  \`createSelector([state => state.todos], todos => todos)\`
566
566
  This could lead to inefficient memoization and unnecessary re-renders.
567
- Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},db=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=r(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let l;try{throw new Error}catch(f){({stack:l}=f)}console.warn(`An input selector returned a different result when passed same arguments.
567
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},fb=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=r(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let l;try{throw new Error}catch(f){({stack:l}=f)}console.warn(`An input selector returned a different result when passed same arguments.
568
568
  This means your output selector will likely run more frequently than intended.
569
569
  Avoid returning a new reference inside your input selector, e.g.
570
- \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:l})}},fb={inputStabilityCheck:"once",identityFunctionCheck:"once"};function pb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function hb(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function gb(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var f0=e=>Array.isArray(e)?e:[e];function mb(e){const t=Array.isArray(e[0])?e[0]:e;return gb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function p0(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var bb=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...fb,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:ub},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:db}}},yb=class{constructor(e){this.value=e}deref(){return this.value}},Cb=typeof WeakRef<"u"?WeakRef:yb,xb=0,h0=1;function Bs(){return{s:xb,v:void 0,o:null,p:null}}function g0(e,t={}){let n=Bs();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var g;let i=n;const{length:c}=arguments;for(let y=0,v=c;y<v;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let p=i.o;p===null&&(i.o=p=new WeakMap);const h=p.get(b);h===void 0?(i=Bs(),p.set(b,i)):i=h}else{let p=i.p;p===null&&(i.p=p=new Map);const h=p.get(b);h===void 0?(i=Bs(),p.set(b,i)):i=h}}const l=i;let f;if(i.s===h0)f=i.v;else if(f=e.apply(null,arguments),s++,r){const y=((g=o==null?void 0:o.deref)==null?void 0:g.call(o))??o;y!=null&&r(y,f)&&(f=y,s!==0&&s--),o=typeof f=="object"&&f!==null||typeof f=="function"?new Cb(f):f}return l.s=h0,l.v=f,f}return a.clearCache=()=>{n=Bs(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function vb(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,a=0,i,c={},l=o.pop();typeof l=="object"&&(c=l,l=o.pop()),pb(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const f={...n,...c},{memoize:g,memoizeOptions:y=[],argsMemoize:v=g0,argsMemoizeOptions:b=[],devModeChecks:p={}}=f,h=f0(y),m=f0(b),x=mb(o),C=g(function(){return s++,l.apply(null,arguments)},...h);let I=!0;const E=v(function(){a++;const T=p0(x,arguments);if(i=C.apply(null,T),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=bb(I,p);if(S.shouldRun&&S.run(l,T,i),L.shouldRun){const N=p0(x,arguments);L.run({inputSelectorResults:T,inputSelectorResultsCopy:N},{memoize:g,memoizeOptions:h},arguments)}I&&(I=!1)}return i},...m);return Object.assign(E,{resultFunc:l,memoizedResultFunc:C,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:g,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var Eb=vb(g0),Ib=Object.assign((e,t=Eb)=>{hb(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((a,i,c)=>(a[n[c]]=i,a),{}))},{withTypes:()=>Ib});function m0(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var wb=m0(),_b=m0,Sb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Fs:Fs.apply(null,arguments)},b0=e=>e&&typeof e.match=="function";function To(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?Me(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Kd(r)&&r.type===e,n}function Tb(e){return typeof e=="function"&&"type"in e&&b0(e)}function Ab(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
571
- Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}function Lb(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Tb}=e;return()=>n=>r=>(t(r)&&console.warn(Ab(r.type)),n(r))}function y0(e,t){let n=0;return{measureTime(r){const o=Date.now();try{return r()}finally{const s=Date.now();n+=s-o}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms.
570
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:l})}},pb={inputStabilityCheck:"once",identityFunctionCheck:"once"};function hb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function gb(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function mb(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var f0=e=>Array.isArray(e)?e:[e];function bb(e){const t=Array.isArray(e[0])?e[0]:e;return mb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function p0(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var yb=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...pb,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:db},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:fb}}},Cb=class{constructor(e){this.value=e}deref(){return this.value}},xb=typeof WeakRef<"u"?WeakRef:Cb,vb=0,h0=1;function Vs(){return{s:vb,v:void 0,o:null,p:null}}function g0(e,t={}){let n=Vs();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var g;let i=n;const{length:c}=arguments;for(let y=0,v=c;y<v;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let p=i.o;p===null&&(i.o=p=new WeakMap);const h=p.get(b);h===void 0?(i=Vs(),p.set(b,i)):i=h}else{let p=i.p;p===null&&(i.p=p=new Map);const h=p.get(b);h===void 0?(i=Vs(),p.set(b,i)):i=h}}const l=i;let f;if(i.s===h0)f=i.v;else if(f=e.apply(null,arguments),s++,r){const y=((g=o==null?void 0:o.deref)==null?void 0:g.call(o))??o;y!=null&&r(y,f)&&(f=y,s!==0&&s--),o=typeof f=="object"&&f!==null||typeof f=="function"?new xb(f):f}return l.s=h0,l.v=f,f}return a.clearCache=()=>{n=Vs(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Eb(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,a=0,i,c={},l=o.pop();typeof l=="object"&&(c=l,l=o.pop()),hb(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const f={...n,...c},{memoize:g,memoizeOptions:y=[],argsMemoize:v=g0,argsMemoizeOptions:b=[],devModeChecks:p={}}=f,h=f0(y),m=f0(b),x=bb(o),C=g(function(){return s++,l.apply(null,arguments)},...h);let I=!0;const E=v(function(){a++;const T=p0(x,arguments);if(i=C.apply(null,T),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=yb(I,p);if(S.shouldRun&&S.run(l,T,i),L.shouldRun){const N=p0(x,arguments);L.run({inputSelectorResults:T,inputSelectorResultsCopy:N},{memoize:g,memoizeOptions:h},arguments)}I&&(I=!1)}return i},...m);return Object.assign(E,{resultFunc:l,memoizedResultFunc:C,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:g,argsMemoize:v})};return Object.assign(r,{withTypes:()=>r}),r}var Ib=Eb(g0),wb=Object.assign((e,t=Ib)=>{gb(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((a,i,c)=>(a[n[c]]=i,a),{}))},{withTypes:()=>wb});function m0(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var _b=m0(),Sb=m0,Tb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ks:ks.apply(null,arguments)},b0=e=>e&&typeof e.match=="function";function _o(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?Me(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Kd(r)&&r.type===e,n}function Ab(e){return typeof e=="function"&&"type"in e&&b0(e)}function Lb(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
571
+ Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}function Ob(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Ab}=e;return()=>n=>r=>(t(r)&&console.warn(Lb(r.type)),n(r))}function y0(e,t){let n=0;return{measureTime(r){const o=Date.now();try{return r()}finally{const s=Date.now();n+=s-o}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms.
572
572
  If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
573
- It is disabled in production builds, so you don't need to worry about that.`)}}}var C0=class Uo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Uo.prototype)}static get[Symbol.species](){return Uo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Uo(...t[0].concat(this)):new Uo(...t.concat(this))}};function x0(e){return pn(e)?d0(e,()=>{}):e}function v0(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(process.env.NODE_ENV==="production"?Me(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function Ob(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Fb(e,t,n){const r=E0(e,t,n);return{detectMutations(){return I0(e,t,r,n)}}}function E0(e,t=[],n,r="",o=new Set){const s={value:n};if(!e(n)&&!o.has(n)){o.add(n),s.children={};for(const a in n){const i=r?r+"."+a:a;t.length&&t.indexOf(i)!==-1||(s.children[a]=E0(e,t,n[a],i))}}return s}function I0(e,t=[],n,r,o=!1,s=""){const a=n?n.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:s};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let f in n.children)c[f]=!0;for(let f in r)c[f]=!0;const l=t.length>0;for(let f in c){const g=s?s+"."+f:f;if(l&&t.some(b=>b instanceof RegExp?b.test(g):g===b))continue;const y=I0(e,t,n.children[f],r[f],i,g);if(y.wasMutated)return y}return{wasMutated:!1}}function kb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(i,c,l,f){return JSON.stringify(i,n(c,f),l)},n=function(i,c){let l=[],f=[];return c||(c=function(g,y){return l[0]===y?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(y)).join(".")+"]"}),function(g,y){if(l.length>0){var v=l.indexOf(this);~v?l.splice(v+1):l.push(this),~v?f.splice(v,1/0,g):f.push(g),~l.indexOf(y)&&(y=c.call(this,g,y))}else l.push(y);return i==null?y:i.call(this,g,y)}},{isImmutable:r=Ob,ignoredPaths:o,warnAfter:s=32}=e;const a=Fb.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return g=>y=>{const v=y0(s,"ImmutableStateInvariantMiddleware");v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Me(19):`A state mutation was detected between dispatches, in the path '${f.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const b=g(y);return v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Me(20):`A state mutation was detected inside a dispatch, in the path: ${f.path||""}. Take a look at the reducer(s) handling the action ${t(y)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),v.warnIfExceeded(),b}}}}function w0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||wo(e)}function cc(e,t="",n=w0,r,o=[],s){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const i=r!=null?r(e):Object.entries(e),c=o.length>0;for(const[l,f]of i){const g=t?t+"."+l:l;if(!(c&&o.some(v=>v instanceof RegExp?v.test(g):g===v))){if(!n(f))return{keyPath:g,value:f};if(typeof f=="object"&&(a=cc(f,g,n,r,o,s),a))return a}}return s&&_0(e)&&s.add(e),!1}function _0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!_0(t))return!1;return!0}function Db(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=w0,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:a=32,ignoreState:i=!1,ignoreActions:c=!1,disableCache:l=!1}=e,f=!l&&WeakSet?new WeakSet:void 0;return g=>y=>v=>{if(!Kd(v))return y(v);const b=y(v),p=y0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(v.type)!==-1)&&p.measureTime(()=>{const h=cc(v,"",t,n,o,f);if(h){const{keyPath:m,value:x}=h;console.error(`A non-serializable value was detected in an action, in the path: \`${m}\`. Value:`,x,`
573
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var C0=class Ko extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ko.prototype)}static get[Symbol.species](){return Ko}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ko(...t[0].concat(this)):new Ko(...t.concat(this))}};function x0(e){return pn(e)?d0(e,()=>{}):e}function v0(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(process.env.NODE_ENV==="production"?Me(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function Fb(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function kb(e,t,n){const r=E0(e,t,n);return{detectMutations(){return I0(e,t,r,n)}}}function E0(e,t=[],n,r="",o=new Set){const s={value:n};if(!e(n)&&!o.has(n)){o.add(n),s.children={};for(const a in n){const i=r?r+"."+a:a;t.length&&t.indexOf(i)!==-1||(s.children[a]=E0(e,t,n[a],i))}}return s}function I0(e,t=[],n,r,o=!1,s=""){const a=n?n.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:s};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let f in n.children)c[f]=!0;for(let f in r)c[f]=!0;const l=t.length>0;for(let f in c){const g=s?s+"."+f:f;if(l&&t.some(b=>b instanceof RegExp?b.test(g):g===b))continue;const y=I0(e,t,n.children[f],r[f],i,g);if(y.wasMutated)return y}return{wasMutated:!1}}function Db(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(i,c,l,f){return JSON.stringify(i,n(c,f),l)},n=function(i,c){let l=[],f=[];return c||(c=function(g,y){return l[0]===y?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(y)).join(".")+"]"}),function(g,y){if(l.length>0){var v=l.indexOf(this);~v?l.splice(v+1):l.push(this),~v?f.splice(v,1/0,g):f.push(g),~l.indexOf(y)&&(y=c.call(this,g,y))}else l.push(y);return i==null?y:i.call(this,g,y)}},{isImmutable:r=Fb,ignoredPaths:o,warnAfter:s=32}=e;const a=kb.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return g=>y=>{const v=y0(s,"ImmutableStateInvariantMiddleware");v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Me(19):`A state mutation was detected between dispatches, in the path '${f.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const b=g(y);return v.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Me(20):`A state mutation was detected inside a dispatch, in the path: ${f.path||""}. Take a look at the reducer(s) handling the action ${t(y)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),v.warnIfExceeded(),b}}}}function w0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||Eo(e)}function ic(e,t="",n=w0,r,o=[],s){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const i=r!=null?r(e):Object.entries(e),c=o.length>0;for(const[l,f]of i){const g=t?t+"."+l:l;if(!(c&&o.some(v=>v instanceof RegExp?v.test(g):g===v))){if(!n(f))return{keyPath:g,value:f};if(typeof f=="object"&&(a=ic(f,g,n,r,o,s),a))return a}}return s&&_0(e)&&s.add(e),!1}function _0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!_0(t))return!1;return!0}function Nb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=w0,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:a=32,ignoreState:i=!1,ignoreActions:c=!1,disableCache:l=!1}=e,f=!l&&WeakSet?new WeakSet:void 0;return g=>y=>v=>{if(!Kd(v))return y(v);const b=y(v),p=y0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(v.type)!==-1)&&p.measureTime(()=>{const h=ic(v,"",t,n,o,f);if(h){const{keyPath:m,value:x}=h;console.error(`A non-serializable value was detected in an action, in the path: \`${m}\`. Value:`,x,`
574
574
  Take a look at the logic that dispatched this action: `,v,`
575
575
  (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
576
- (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),i||(p.measureTime(()=>{const h=g.getState(),m=cc(h,"",t,n,s,f);if(m){const{keyPath:x,value:C}=m;console.error(`A non-serializable value was detected in the state, in the path: \`${x}\`. Value:`,C,`
576
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),i||(p.measureTime(()=>{const h=g.getState(),m=ic(h,"",t,n,s,f);if(m){const{keyPath:x,value:C}=m;console.error(`A non-serializable value was detected in the state, in the path: \`${x}\`. Value:`,C,`
577
577
  Take a look at the reducer(s) handling this action type: ${v.type}.
578
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),b}}}function Vs(e){return typeof e=="boolean"}var Nb=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new C0;if(n&&(Vs(n)?a.push(wb):a.push(_b(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};Vs(r)||(i=r),a.unshift(kb(i))}if(o){let i={};Vs(o)||(i=o),a.push(Db(i))}if(s){let i={};Vs(s)||(i=s),a.unshift(Lb(i))}}return a},Rb="RTK_autoBatch",S0=e=>t=>{setTimeout(t,e)},Mb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:S0(10),Pb=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,a=!1;const i=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?Mb:e.type==="callback"?e.queueNotification:S0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const g=()=>o&&f(),y=r.subscribe(g);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var g;try{return o=!((g=f==null?void 0:f.meta)!=null&&g[Rb]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},jb=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new C0(e);return r&&o.push(Pb(typeof r=="object"?r:void 0)),o};function Bb(e){const t=Nb(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let i;if(typeof n=="function")i=n;else if(wo(n))i=Ud(n);else throw new Error(process.env.NODE_ENV==="production"?Me(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Me(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Me(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Me(4):"each middleware provided to configureStore must be a function");let l=Fs;o&&(l=Sb({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=U4(...c),g=jb(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Me(5):"`enhancers` field must be a callback");let y=typeof a=="function"?a(g):g();if(process.env.NODE_ENV!=="production"&&!Array.isArray(y))throw new Error(process.env.NODE_ENV==="production"?Me(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&y.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Me(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!y.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=l(...y);return $d(i,s,v)}function T0(e){const t={},n=[];let r;const o={addCase(s,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Me(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Me(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i=typeof s=="string"?s:s.type;if(!i)throw new Error(process.env.NODE_ENV==="production"?Me(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?Me(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addMatcher(s,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Me(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:s,reducer:a}),o},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Me(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function Vb(e){return typeof e=="function"}function Gb(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Me(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=T0(t),s;if(Vb(e))s=()=>x0(e());else{const i=x0(e);s=()=>i}function a(i=s(),c){let l=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return l.filter(f=>!!f).length===0&&(l=[o]),l.reduce((f,g)=>{if(g)if(er(f)){const v=g(f,c);return v===void 0?f:v}else{if(pn(f))return d0(f,y=>g(y,c));{const y=g(f,c);if(y===void 0){if(f===null)return f;throw new Error(process.env.NODE_ENV==="production"?Me(9):"A case reducer on a non-draftable value must not return undefined")}return y}}return f},i)}return a.getInitialState=s,a}var Hb=(e,t)=>b0(e)?e.match(t):e(t);function Wb(...e){return t=>e.some(n=>Hb(n,t))}var Zb="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Xb=(e=21)=>{let t="",n=e;for(;n--;)t+=Zb[Math.random()*64|0];return t},zb=["name","message","stack","code"],lc=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},A0=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},Yb=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of zb)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Gt=(()=>{function e(t,n,r){const o=To(t+"/fulfilled",(c,l,f,g)=>({payload:c,meta:{...g||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=To(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=To(t+"/rejected",(c,l,f,g,y)=>({payload:g,error:(r&&r.serializeError||Yb)(c||"Rejected"),meta:{...y||{},arg:f,requestId:l,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,g)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):Xb(),v=new AbortController;let b,p;function h(x){p=x,v.abort()}const m=async function(){var I,E;let x;try{let _=(I=r==null?void 0:r.condition)==null?void 0:I.call(r,c,{getState:f,extra:g});if(qb(_)&&(_=await _),_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((S,L)=>{b=()=>{L({name:"AbortError",message:p||"Aborted"})},v.signal.addEventListener("abort",b)});l(s(y,c,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:y,arg:c},{getState:f,extra:g}))),x=await Promise.race([T,Promise.resolve(n(c,{dispatch:l,getState:f,extra:g,requestId:y,signal:v.signal,abort:h,rejectWithValue:(S,L)=>new lc(S,L),fulfillWithValue:(S,L)=>new A0(S,L)})).then(S=>{if(S instanceof lc)throw S;return S instanceof A0?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){x=_ instanceof lc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{b&&v.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(m,{abort:h,requestId:y,arg:c,unwrap(){return m.then(Jb)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Wb(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Jb(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function qb(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $b=Symbol.for("rtk-slice-createasyncthunk");function Qb(e,t){return`${e}/${t}`}function Ub({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[$b];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Me(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&o.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=(typeof o.reducers=="function"?o.reducers(ey()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(C,I){const E=typeof C=="string"?C:C.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?Me(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Me(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=I,f},addMatcher(C,I){return l.sliceMatchers.push({matcher:C,reducer:I}),f},exposeAction(C,I){return l.actionCreators[C]=I,f},exposeCaseReducer(C,I){return l.sliceCaseReducersByName[C]=I,f}};c.forEach(C=>{const I=i[C],E={reducerName:C,type:Qb(s,C),createNotation:typeof o.reducers=="function"};ny(I)?oy(E,I,f,t):ty(E,I,f)});function g(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Me(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[C={},I=[],E=void 0]=typeof o.extraReducers=="function"?T0(o.extraReducers):[o.extraReducers],_={...C,...l.sliceCaseReducersByType};return Gb(o.initialState,T=>{for(let S in _)T.addCase(S,_[S]);for(let S of l.sliceMatchers)T.addMatcher(S.matcher,S.reducer);for(let S of I)T.addMatcher(S.matcher,S.reducer);E&&T.addDefaultCase(E)})}const y=C=>C,v=new Map;let b;function p(C,I){return b||(b=g()),b(C,I)}function h(){return b||(b=g()),b.getInitialState()}function m(C,I=!1){function E(T){let S=T[C];if(typeof S>"u"){if(I)S=h();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Me(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(T=y){const S=v0(v,I,{insert:()=>new WeakMap});return v0(S,T,{insert:()=>{const L={};for(const[N,k]of Object.entries(o.selectors??{}))L[N]=Kb(k,T,h,I);return L}})}return{reducerPath:C,getSelectors:_,get selectors(){return _(E)},selectSlice:E}}const x={name:s,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...m(a),injectInto(C,{reducerPath:I,...E}={}){const _=I??a;return C.inject({reducerPath:_,reducer:p},E),{...x,...m(_,!0)}}};return x}}function Kb(e,t,n,r){function o(s,...a){let i=t(s);if(typeof i>"u"){if(r)i=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Me(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var uc=Ub();function ey(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function ty({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!ry(r))throw new Error(process.env.NODE_ENV==="production"?Me(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=r.reducer,a=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,a?To(e,a):To(e))}function ny(e){return e._reducerDefinitionType==="asyncThunk"}function ry(e){return e._reducerDefinitionType==="reducerWithPrepare"}function oy({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Me(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:a,pending:i,rejected:c,settled:l,options:f}=n,g=o(e,s,f);r.exposeAction(t,g),a&&r.addCase(g.fulfilled,a),i&&r.addCase(g.pending,i),c&&r.addCase(g.rejected,c),l&&r.addMatcher(g.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Gs,pending:i||Gs,rejected:c||Gs,settled:l||Gs})}function Gs(){}function Me(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const $t="success",ze="error",L0="Some error occured. Please contact support@hiverhq.com",O0="Card refreshed successfully",sy="Card linked successfully",ay="Error in linking the card",iy="Card unlinked successfully",cy="Failed to unlink the card",hn="Something went wrong",ly="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e",uy=d.styled(d.Box)`
578
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),b}}}function Gs(e){return typeof e=="boolean"}var Rb=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new C0;if(n&&(Gs(n)?a.push(_b):a.push(Sb(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};Gs(r)||(i=r),a.unshift(Db(i))}if(o){let i={};Gs(o)||(i=o),a.push(Nb(i))}if(s){let i={};Gs(s)||(i=s),a.unshift(Ob(i))}}return a},Mb="RTK_autoBatch",S0=e=>t=>{setTimeout(t,e)},Pb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:S0(10),jb=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,a=!1;const i=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?Pb:e.type==="callback"?e.queueNotification:S0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const g=()=>o&&f(),y=r.subscribe(g);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var g;try{return o=!((g=f==null?void 0:f.meta)!=null&&g[Mb]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},Bb=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new C0(e);return r&&o.push(jb(typeof r=="object"?r:void 0)),o};function Vb(e){const t=Rb(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let i;if(typeof n=="function")i=n;else if(Eo(n))i=Ud(n);else throw new Error(process.env.NODE_ENV==="production"?Me(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Me(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Me(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Me(4):"each middleware provided to configureStore must be a function");let l=ks;o&&(l=Tb({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=K4(...c),g=Bb(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Me(5):"`enhancers` field must be a callback");let y=typeof a=="function"?a(g):g();if(process.env.NODE_ENV!=="production"&&!Array.isArray(y))throw new Error(process.env.NODE_ENV==="production"?Me(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&y.some(b=>typeof b!="function"))throw new Error(process.env.NODE_ENV==="production"?Me(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!y.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const v=l(...y);return $d(i,s,v)}function T0(e){const t={},n=[];let r;const o={addCase(s,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Me(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Me(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const i=typeof s=="string"?s:s.type;if(!i)throw new Error(process.env.NODE_ENV==="production"?Me(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?Me(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${i}'`);return t[i]=a,o},addMatcher(s,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Me(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:s,reducer:a}),o},addDefaultCase(s){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Me(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function Gb(e){return typeof e=="function"}function Hb(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Me(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=T0(t),s;if(Gb(e))s=()=>x0(e());else{const i=x0(e);s=()=>i}function a(i=s(),c){let l=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return l.filter(f=>!!f).length===0&&(l=[o]),l.reduce((f,g)=>{if(g)if(Qn(f)){const v=g(f,c);return v===void 0?f:v}else{if(pn(f))return d0(f,y=>g(y,c));{const y=g(f,c);if(y===void 0){if(f===null)return f;throw new Error(process.env.NODE_ENV==="production"?Me(9):"A case reducer on a non-draftable value must not return undefined")}return y}}return f},i)}return a.getInitialState=s,a}var Wb=(e,t)=>b0(e)?e.match(t):e(t);function Zb(...e){return t=>e.some(n=>Wb(n,t))}var Xb="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",zb=(e=21)=>{let t="",n=e;for(;n--;)t+=Xb[Math.random()*64|0];return t},Yb=["name","message","stack","code"],cc=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},A0=class{constructor(e,t){De(this,"_type");this.payload=e,this.meta=t}},Jb=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Yb)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Wt=(()=>{function e(t,n,r){const o=_o(t+"/fulfilled",(c,l,f,g)=>({payload:c,meta:{...g||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=_o(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=_o(t+"/rejected",(c,l,f,g,y)=>({payload:g,error:(r&&r.serializeError||Jb)(c||"Rejected"),meta:{...y||{},arg:f,requestId:l,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,g)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):zb(),v=new AbortController;let b,p;function h(x){p=x,v.abort()}const m=async function(){var I,E;let x;try{let _=(I=r==null?void 0:r.condition)==null?void 0:I.call(r,c,{getState:f,extra:g});if($b(_)&&(_=await _),_===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((S,L)=>{b=()=>{L({name:"AbortError",message:p||"Aborted"})},v.signal.addEventListener("abort",b)});l(s(y,c,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:y,arg:c},{getState:f,extra:g}))),x=await Promise.race([T,Promise.resolve(n(c,{dispatch:l,getState:f,extra:g,requestId:y,signal:v.signal,abort:h,rejectWithValue:(S,L)=>new cc(S,L),fulfillWithValue:(S,L)=>new A0(S,L)})).then(S=>{if(S instanceof cc)throw S;return S instanceof A0?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){x=_ instanceof cc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{b&&v.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(m,{abort:h,requestId:y,arg:c,unwrap(){return m.then(qb)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Zb(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function qb(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function $b(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Qb=Symbol.for("rtk-slice-createasyncthunk");function Ub(e,t){return`${e}/${t}`}function Kb({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Qb];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Me(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&o.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const i=(typeof o.reducers=="function"?o.reducers(ty()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(C,I){const E=typeof C=="string"?C:C.type;if(!E)throw new Error(process.env.NODE_ENV==="production"?Me(12):"`context.addCase` cannot be called with an empty action type");if(E in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Me(13):"`context.addCase` cannot be called with two reducers for the same action type: "+E);return l.sliceCaseReducersByType[E]=I,f},addMatcher(C,I){return l.sliceMatchers.push({matcher:C,reducer:I}),f},exposeAction(C,I){return l.actionCreators[C]=I,f},exposeCaseReducer(C,I){return l.sliceCaseReducersByName[C]=I,f}};c.forEach(C=>{const I=i[C],E={reducerName:C,type:Ub(s,C),createNotation:typeof o.reducers=="function"};ry(I)?sy(E,I,f,t):ny(E,I,f)});function g(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Me(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[C={},I=[],E=void 0]=typeof o.extraReducers=="function"?T0(o.extraReducers):[o.extraReducers],_={...C,...l.sliceCaseReducersByType};return Hb(o.initialState,T=>{for(let S in _)T.addCase(S,_[S]);for(let S of l.sliceMatchers)T.addMatcher(S.matcher,S.reducer);for(let S of I)T.addMatcher(S.matcher,S.reducer);E&&T.addDefaultCase(E)})}const y=C=>C,v=new Map;let b;function p(C,I){return b||(b=g()),b(C,I)}function h(){return b||(b=g()),b.getInitialState()}function m(C,I=!1){function E(T){let S=T[C];if(typeof S>"u"){if(I)S=h();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Me(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(T=y){const S=v0(v,I,{insert:()=>new WeakMap});return v0(S,T,{insert:()=>{const L={};for(const[N,k]of Object.entries(o.selectors??{}))L[N]=ey(k,T,h,I);return L}})}return{reducerPath:C,getSelectors:_,get selectors(){return _(E)},selectSlice:E}}const x={name:s,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...m(a),injectInto(C,{reducerPath:I,...E}={}){const _=I??a;return C.inject({reducerPath:_,reducer:p},E),{...x,...m(_,!0)}}};return x}}function ey(e,t,n,r){function o(s,...a){let i=t(s);if(typeof i>"u"){if(r)i=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Me(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var lc=Kb();function ty(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function ny({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!oy(r))throw new Error(process.env.NODE_ENV==="production"?Me(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");s=r.reducer,a=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,a?_o(e,a):_o(e))}function ry(e){return e._reducerDefinitionType==="asyncThunk"}function oy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function sy({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Me(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:a,pending:i,rejected:c,settled:l,options:f}=n,g=o(e,s,f);r.exposeAction(t,g),a&&r.addCase(g.fulfilled,a),i&&r.addCase(g.pending,i),c&&r.addCase(g.rejected,c),l&&r.addMatcher(g.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Hs,pending:i||Hs,rejected:c||Hs,settled:l||Hs})}function Hs(){}function Me(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Kt="success",ze="error",L0="Some error occured. Please contact support@hiverhq.com",O0="Card refreshed successfully",ay="Card linked successfully",iy="Error in linking the card",cy="Card unlinked successfully",ly="Failed to unlink the card",hn="Something went wrong",uy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e",dy=d.styled(d.Box)`
579
579
  display: flex;
580
580
  flex-direction: row;
581
581
  align-items: center;
582
- `,dy=d.styled(d.Box)`
582
+ `,fy=d.styled(d.Box)`
583
583
  padding: 5px 8px;
584
584
  color: white;
585
- `,fy=d.styled(d.brandIcons.Logo)(()=>({height:"26px",width:"26px",color:"#FFFFFF",marginRight:"4px"})),py=d.styled(d.Stack)`
585
+ `,py=d.styled(d.brandIcons.Logo)(()=>({height:"26px",width:"26px",color:"#FFFFFF",marginRight:"4px"})),hy=d.styled(d.Stack)`
586
586
  flex-direction: row;
587
587
  padding: 0 10px;
588
588
  img {
@@ -592,26 +592,26 @@ Take a look at the reducer(s) handling this action type: ${v.type}.
592
592
  fill: #ffffff;
593
593
  width: 10px;
594
594
  }
595
- `,hy=(e,{closeToast:t})=>u.jsx(py,{children:u.jsx("img",{src:ly,onClick:t})}),Hs=({message:e})=>u.jsxs(uy,{children:[u.jsx(fy,{}),u.jsx(dy,{children:e})]});function we(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:u.jsx(hy,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=Ae.success(u.jsx(Hs,{message:t}),{...o,icon:!1});break}case"error":{s=Ae.error(u.jsx(Hs,{message:t}),{...o,icon:!1});break}case"info-dark":{s=Ae.info(u.jsx(Hs,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=Ae.info(u.jsx(Hs,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{gy(s)},r&&!isNaN(r)?Number(r):5e3),s}function gy(e){Ae.dismiss(e)}const F0={updateFormApiStatus:ee.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:ee.IDLE,unlinkCardApiStatus:ee.IDLE,linkCardApiStatus:ee.IDLE,optionsMap:null,dropdownOptionsApis:ee.IDLE,dependentFieldsMap:{},createFormApiStatus:ee.IDLE,currentResourceDetailsApiStatus:ee.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},my="/v1/api"+"/templates/metadata",by={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},yy="Required Field",Cy="Invalid date",k0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,xy=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,D0="Please enter a valid URL",vy="Please enter valid ID",Ey="Please enter valid input",Iy="URL must start with https://",wy="URL should not end with a slash",_y="Invalid email address",Sy="Email must be a string",N0="Invalid date",Ty="Date cannot be in the past",Ay="Date cannot be in the future",Ly="Invalid number",Oy="Invalid text",Fy=async e=>{const t=new URLSearchParams,{inboxIds:n,channelType:r,conversationId:o,fetchAuthenticatedConnectors:s}=e||{};return n==null||n.forEach(i=>{t.append("inbox_ids",i)}),[["channel_type",r],["conversation_id",o],["fetch_authenticated_connectors",s==null?void 0:s.toString()]].forEach(([i,c])=>{c!==void 0&&t.append(i,c)}),Le({url:`${my}?${t.toString()}`,method:by.GET})};let kr={};const ky={get length(){return Object.keys(kr).length},getItem(e){return kr[e]??null},setItem(e,t){kr[e]=t},removeItem(e){delete kr[e]},clear(){kr={}},key(e){return Object.keys(kr)[e]}},Dy={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},R0=(e="LOCAL")=>Dy[e]??ky,Ny=(e="LOCAL")=>{const t=R0(e);return{...t,getItem(n){const r=t.getItem(n);if(!r)return r;try{return JSON.parse(r)}catch(o){return console.warn(o),r}},setItem(n,r){try{const o=JSON.stringify(r);t.setItem(n,o)}catch(o){console.warn(o)}}}};var dc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(dc||{});const Ry={[dc.ADD]:(e,t)=>e+t,[dc.MULTIPLY]:(e,t)=>e*t},My=e=>e,M0=()=>{if("crypto"in window&&"randomUUID"in window.crypto)return window.crypto.randomUUID();const e=Date.now().toString(16),t=Math.random().toString(16).substring(2,8);return`${e}-${t}`},P0=(e,t)=>{let n;const r=Ry[t]??My;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},j0=(e,t=n=>n)=>{const n=new Set,r=[];for(const o of e){const s=t(o);n.has(s)||(n.add(s),r.push(o))}return r},Py=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?wy:k0.test(n)?!0:e||D0:Iy}return!1},jy=e=>t=>t&&typeof t=="string"?xy.test(t)?!0:e||_y:Sy,By=e=>t=>t==null||t===""?e||yy:!0,Vy=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Cy)return N0;if(typeof t=="object"){const o=t,s=new Date;s.setHours(0,0,0,0);const a=n.disablePast,i=n.disableFuture;return a&&o<s?e||Ty:i&&o>s?e||Ay:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:N0},Gy=e=>(t,n)=>{if(t=Number(t),typeof t=="number"&&!isNaN(t)){const r=n.min,o=n.max;return r!==void 0&&t<r?e||`Value should not be less than ${r}`:o!==void 0&&t>o?e||`Value should not be greater than ${o}`:!0}return e||Ly},fc=e=>(t,n)=>{if(typeof t=="string"){const r=n.limit;return r!==void 0&&t.length>r?e||`Maximum characters allowed are ${r}`:!0}return e||Oy},Hy=e=>t=>typeof t=="string"?t.startsWith("https:")?k0.test(t)?!0:e||D0:t.trim().length>0?!0:e||vy:e||Ey;function rr(e){"@babel/helpers - typeof";return rr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rr(e)}function Wy(e,t){if(rr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(rr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B0(e){var t=Wy(e,"string");return rr(t)=="symbol"?t:t+""}function Dr(e,t,n){return(t=B0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V0(Object(n),!0).forEach(function(r){Dr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zy(e){if(Array.isArray(e))return e}function Xy(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,i=[],c=!0,l=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function pc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function G0(e,t){if(e){if(typeof e=="string")return pc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pc(e,t):void 0}}function zy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
596
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){return Zy(e)||Xy(e,t)||G0(e,t)||zy()}function Yy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Ht(e,t){if(e==null)return{};var n,r,o=Yy(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jy=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function hc(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,a=s===void 0?null:s,i=e.inputValue,c=e.menuIsOpen,l=e.onChange,f=e.onInputChange,g=e.onMenuClose,y=e.onMenuOpen,v=e.value,b=Ht(e,Jy),p=w.useState(i!==void 0?i:n),h=Ue(p,2),m=h[0],x=h[1],C=w.useState(c!==void 0?c:o),I=Ue(C,2),E=I[0],_=I[1],T=w.useState(v!==void 0?v:a),S=Ue(T,2),L=S[0],N=S[1],k=w.useCallback(function(X,q){typeof l=="function"&&l(X,q),N(X)},[l]),D=w.useCallback(function(X,q){var oe;typeof f=="function"&&(oe=f(X,q)),x(oe!==void 0?oe:X)},[f]),P=w.useCallback(function(){typeof y=="function"&&y(),_(!0)},[y]),V=w.useCallback(function(){typeof g=="function"&&g(),_(!1)},[g]),z=i!==void 0?i:m,$=c!==void 0?c:E,Q=v!==void 0?v:L;return ne(ne({},b),{},{inputValue:z,menuIsOpen:$,onChange:k,onInputChange:D,onMenuClose:V,onMenuOpen:P,value:Q})}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(null,arguments)}function qy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H0(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,B0(r.key),r)}}function $y(e,t,n){return t&&H0(e.prototype,t),n&&H0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gc(e,t){return gc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},gc(e,t)}function Qy(e,t){if(typeof t!="function"&&t!==null)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&&gc(e,t)}function Ws(e){return Ws=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ws(e)}function W0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W0=function(){return!!e})()}function Uy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ky(e,t){if(t&&(rr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Uy(e)}function e9(e){var t=W0();return function(){var n,r=Ws(e);if(t){var o=Ws(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ky(this,n)}}function t9(e){if(Array.isArray(e))return pc(e)}function n9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function r9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
597
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nr(e){return t9(e)||n9(e)||G0(e)||r9()}var o9=!1;function s9(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function a9(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var i9=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!o9:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(a9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=s9(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ot="-ms-",Zs="-moz-",Se="-webkit-",Z0="comm",mc="rule",bc="decl",c9="@import",X0="@keyframes",l9="@layer",u9=Math.abs,Xs=String.fromCharCode,d9=Object.assign;function f9(e,t){return nt(e,0)^45?(((t<<2^nt(e,0))<<2^nt(e,1))<<2^nt(e,2))<<2^nt(e,3):0}function z0(e){return e.trim()}function p9(e,t){return(e=t.exec(e))?e[0]:e}function Te(e,t,n){return e.replace(t,n)}function yc(e,t){return e.indexOf(t)}function nt(e,t){return e.charCodeAt(t)|0}function Ao(e,t,n){return e.slice(t,n)}function Qt(e){return e.length}function Cc(e){return e.length}function zs(e,t){return t.push(e),e}function h9(e,t){return e.map(t).join("")}var Ys=1,Rr=1,Y0=0,bt=0,Ye=0,Mr="";function Js(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Ys,column:Rr,length:a,return:""}}function Lo(e,t){return d9(Js("",null,null,"",null,null,0),e,{length:-e.length},t)}function g9(){return Ye}function m9(){return Ye=bt>0?nt(Mr,--bt):0,Rr--,Ye===10&&(Rr=1,Ys--),Ye}function At(){return Ye=bt<Y0?nt(Mr,bt++):0,Rr++,Ye===10&&(Rr=1,Ys++),Ye}function Ut(){return nt(Mr,bt)}function qs(){return bt}function Oo(e,t){return Ao(Mr,e,t)}function Fo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function J0(e){return Ys=Rr=1,Y0=Qt(Mr=e),bt=0,[]}function q0(e){return Mr="",e}function $s(e){return z0(Oo(bt-1,xc(e===91?e+2:e===40?e+1:e)))}function b9(e){for(;(Ye=Ut())&&Ye<33;)At();return Fo(e)>2||Fo(Ye)>3?"":" "}function y9(e,t){for(;--t&&At()&&!(Ye<48||Ye>102||Ye>57&&Ye<65||Ye>70&&Ye<97););return Oo(e,qs()+(t<6&&Ut()==32&&At()==32))}function xc(e){for(;At();)switch(Ye){case e:return bt;case 34:case 39:e!==34&&e!==39&&xc(Ye);break;case 40:e===41&&xc(e);break;case 92:At();break}return bt}function C9(e,t){for(;At()&&e+Ye!==57;)if(e+Ye===84&&Ut()===47)break;return"/*"+Oo(t,bt-1)+"*"+Xs(e===47?e:At())}function x9(e){for(;!Fo(Ut());)At();return Oo(e,bt)}function v9(e){return q0(Qs("",null,null,null,[""],e=J0(e),0,[0],e))}function Qs(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,g=a,y=0,v=0,b=0,p=1,h=1,m=1,x=0,C="",I=o,E=s,_=r,T=C;h;)switch(b=x,x=At()){case 40:if(b!=108&&nt(T,g-1)==58){yc(T+=Te($s(x),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:T+=$s(x);break;case 9:case 10:case 13:case 32:T+=b9(b);break;case 92:T+=y9(qs()-1,7);continue;case 47:switch(Ut()){case 42:case 47:zs(E9(C9(At(),qs()),t,n),c);break;default:T+="/"}break;case 123*p:i[l++]=Qt(T)*m;case 125*p:case 59:case 0:switch(x){case 0:case 125:h=0;case 59+f:m==-1&&(T=Te(T,/\f/g,"")),v>0&&Qt(T)-g&&zs(v>32?Q0(T+";",r,n,g-1):Q0(Te(T," ","")+";",r,n,g-2),c);break;case 59:T+=";";default:if(zs(_=$0(T,t,n,l,f,o,i,C,I=[],E=[],g),s),x===123)if(f===0)Qs(T,t,_,_,I,s,g,i,E);else switch(y===99&&nt(T,3)===110?100:y){case 100:case 108:case 109:case 115:Qs(e,_,_,r&&zs($0(e,_,_,0,0,o,i,C,o,I=[],g),E),o,E,g,i,r?I:E);break;default:Qs(T,_,_,_,[""],E,0,i,E)}}l=f=v=0,p=m=1,C=T="",g=a;break;case 58:g=1+Qt(T),v=b;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&m9()==125)continue}switch(T+=Xs(x),x*p){case 38:m=f>0?1:(T+="\f",-1);break;case 44:i[l++]=(Qt(T)-1)*m,m=1;break;case 64:Ut()===45&&(T+=$s(At())),y=Ut(),f=g=Qt(C=T+=x9(qs())),x++;break;case 45:b===45&&Qt(T)==2&&(p=0)}}return s}function $0(e,t,n,r,o,s,a,i,c,l,f){for(var g=o-1,y=o===0?s:[""],v=Cc(y),b=0,p=0,h=0;b<r;++b)for(var m=0,x=Ao(e,g+1,g=u9(p=a[b])),C=e;m<v;++m)(C=z0(p>0?y[m]+" "+x:Te(x,/&\f/g,y[m])))&&(c[h++]=C);return Js(e,t,n,o===0?mc:i,c,l,f)}function E9(e,t,n){return Js(e,t,n,Z0,Xs(g9()),Ao(e,2,-2),0)}function Q0(e,t,n,r){return Js(e,t,n,bc,Ao(e,0,r),Ao(e,r+1,-1),r)}function Pr(e,t){for(var n="",r=Cc(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function I9(e,t,n,r){switch(e.type){case l9:if(e.children.length)break;case c9:case bc:return e.return=e.return||e.value;case Z0:return"";case X0:return e.return=e.value+"{"+Pr(e.children,r)+"}";case mc:e.value=e.props.join(",")}return Qt(n=Pr(e.children,r))?e.return=e.value+"{"+n+"}":""}function w9(e){var t=Cc(e);return function(n,r,o,s){for(var a="",i=0;i<t;i++)a+=e[i](n,r,o,s)||"";return a}}function _9(e){return function(t){t.root||(t=t.return)&&e(t)}}function S9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var T9=function(t,n,r){for(var o=0,s=0;o=s,s=Ut(),o===38&&s===12&&(n[r]=1),!Fo(s);)At();return Oo(t,bt)},A9=function(t,n){var r=-1,o=44;do switch(Fo(o)){case 0:o===38&&Ut()===12&&(n[r]=1),t[r]+=T9(bt-1,n,r);break;case 2:t[r]+=$s(o);break;case 4:if(o===44){t[++r]=Ut()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Xs(o)}while(o=At());return t},L9=function(t,n){return q0(A9(J0(t),n))},U0=new WeakMap,O9=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!U0.get(r))&&!o){U0.set(t,!0);for(var s=[],a=L9(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var f=0;f<i.length;f++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},F9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function K0(e,t){switch(f9(e,t)){case 5103:return Se+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Se+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Se+e+Zs+e+ot+e+e;case 6828:case 4268:return Se+e+ot+e+e;case 6165:return Se+e+ot+"flex-"+e+e;case 5187:return Se+e+Te(e,/(\w+).+(:[^]+)/,Se+"box-$1$2"+ot+"flex-$1$2")+e;case 5443:return Se+e+ot+"flex-item-"+Te(e,/flex-|-self/,"")+e;case 4675:return Se+e+ot+"flex-line-pack"+Te(e,/align-content|flex-|-self/,"")+e;case 5548:return Se+e+ot+Te(e,"shrink","negative")+e;case 5292:return Se+e+ot+Te(e,"basis","preferred-size")+e;case 6060:return Se+"box-"+Te(e,"-grow","")+Se+e+ot+Te(e,"grow","positive")+e;case 4554:return Se+Te(e,/([^-])(transform)/g,"$1"+Se+"$2")+e;case 6187:return Te(Te(Te(e,/(zoom-|grab)/,Se+"$1"),/(image-set)/,Se+"$1"),e,"")+e;case 5495:case 3959:return Te(e,/(image-set\([^]*)/,Se+"$1$`$1");case 4968:return Te(Te(e,/(.+:)(flex-)?(.*)/,Se+"box-pack:$3"+ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Se+e+e;case 4095:case 3583:case 4068:case 2532:return Te(e,/(.+)-inline(.+)/,Se+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Qt(e)-1-t>6)switch(nt(e,t+1)){case 109:if(nt(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Se+"$2-$3$1"+Zs+(nt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yc(e,"stretch")?K0(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(nt(e,t+1)!==115)break;case 6444:switch(nt(e,Qt(e)-3-(~yc(e,"!important")&&10))){case 107:return Te(e,":",":"+Se)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Se+(nt(e,14)===45?"inline-":"")+"box$3$1"+Se+"$2$3$1"+ot+"$2box$3")+e}break;case 5936:switch(nt(e,t+11)){case 114:return Se+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Se+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Se+e+ot+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Se+e+ot+e+e}return e}var k9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case bc:t.return=K0(t.value,t.length);break;case X0:return Pr([Lo(t,{value:Te(t.value,"@","@"+Se)})],o);case mc:if(t.length)return h9(t.props,function(s){switch(p9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Pr([Lo(t,{props:[Te(s,/:(read-\w+)/,":"+Zs+"$1")]})],o);case"::placeholder":return Pr([Lo(t,{props:[Te(s,/:(plac\w+)/,":"+Se+"input-$1")]}),Lo(t,{props:[Te(s,/:(plac\w+)/,":"+Zs+"$1")]}),Lo(t,{props:[Te(s,/:(plac\w+)/,ot+"input-$1")]})],o)}return""})}},D9=[k9],N9=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var h=p.getAttribute("data-emotion");h.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||D9,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var h=p.getAttribute("data-emotion").split(" "),m=1;m<h.length;m++)s[h[m]]=!0;i.push(p)});var c,l=[O9,F9];{var f,g=[I9,_9(function(p){f.insert(p)})],y=w9(l.concat(o,g)),v=function(h){return Pr(v9(h),y)};c=function(h,m,x,C){f=x,v(h?h+"{"+m.styles+"}":m.styles),C&&(b.inserted[m.name]=!0)}}var b={key:n,sheet:new i9({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return b.sheet.hydrate(i),b},vc={exports:{}},Oe={};/** @license React v16.13.1
595
+ `,gy=(e,{closeToast:t})=>u.jsx(hy,{children:u.jsx("img",{src:uy,onClick:t})}),Ws=({message:e})=>u.jsxs(dy,{children:[u.jsx(py,{}),u.jsx(fy,{children:e})]});function Ie(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:u.jsx(gy,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=Le.success(u.jsx(Ws,{message:t}),{...o,icon:!1});break}case"error":{s=Le.error(u.jsx(Ws,{message:t}),{...o,icon:!1});break}case"info-dark":{s=Le.info(u.jsx(Ws,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=Le.info(u.jsx(Ws,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{my(s)},r&&!isNaN(r)?Number(r):5e3),s}function my(e){Le.dismiss(e)}const F0={updateFormApiStatus:K.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:K.IDLE,unlinkCardApiStatus:K.IDLE,linkCardApiStatus:K.IDLE,optionsMap:null,dropdownOptionsApis:K.IDLE,dependentFieldsMap:{},createFormApiStatus:K.IDLE,currentResourceDetailsApiStatus:K.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},by="/v1/api"+"/templates/metadata",k0={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},yy="Required Field",Cy="Invalid date",D0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,xy=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,N0="Please enter a valid URL",vy="Please enter valid ID",Ey="Please enter valid input",Iy="URL must start with https://",wy="URL should not end with a slash",_y="Invalid email address",Sy="Email must be a string",R0="Invalid date",Ty="Date cannot be in the past",Ay="Date cannot be in the future",Ly="Invalid number",Oy="Invalid text",Fy=async e=>{const t=new URLSearchParams,{inboxIds:n,channelType:r,conversationId:o,fetchAuthenticatedConnectors:s}=e||{};return n==null||n.forEach(i=>{t.append("inbox_ids",i)}),[["channel_type",r],["conversation_id",o],["fetch_authenticated_connectors",s==null?void 0:s.toString()]].forEach(([i,c])=>{c!==void 0&&t.append(i,c)}),Se({url:`${by}?${t.toString()}`,method:k0.GET})},ky="/v1/api/connectors/ug?onlyEnabledAuthenticated=true&minimal=true",Dy=async()=>{const e=await Se({url:ky,method:k0.GET}),t=e==null?void 0:e.data;return Array.isArray(t)?t.map(({id:n,name:r,logo:o,connectorType:s})=>({id:n,name:r,logo:o,connectorType:s})).filter(({logo:n})=>!!n):[]};let Fr={};const Ny={get length(){return Object.keys(Fr).length},getItem(e){return Fr[e]??null},setItem(e,t){Fr[e]=t},removeItem(e){delete Fr[e]},clear(){Fr={}},key(e){return Object.keys(Fr)[e]}},Ry={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},M0=(e="LOCAL")=>Ry[e]??Ny,My=(e="LOCAL")=>{const t=M0(e);return{...t,getItem(n){const r=t.getItem(n);if(!r)return r;try{return JSON.parse(r)}catch(o){return console.warn(o),r}},setItem(n,r){try{const o=JSON.stringify(r);t.setItem(n,o)}catch(o){console.warn(o)}}}};var uc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(uc||{});const Py={[uc.ADD]:(e,t)=>e+t,[uc.MULTIPLY]:(e,t)=>e*t},jy=e=>e,P0=()=>{if("crypto"in window&&"randomUUID"in window.crypto)return window.crypto.randomUUID();const e=Date.now().toString(16),t=Math.random().toString(16).substring(2,8);return`${e}-${t}`},j0=(e,t)=>{let n;const r=Py[t]??jy;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},B0=(e,t=n=>n)=>{const n=new Set,r=[];for(const o of e){const s=t(o);n.has(s)||(n.add(s),r.push(o))}return r},By=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?wy:D0.test(n)?!0:e||N0:Iy}return!1},Vy=e=>t=>t&&typeof t=="string"?xy.test(t)?!0:e||_y:Sy,Gy=e=>t=>t==null||t===""?e||yy:!0,Hy=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Cy)return R0;if(typeof t=="object"){const o=t,s=new Date;s.setHours(0,0,0,0);const a=n.disablePast,i=n.disableFuture;return a&&o<s?e||Ty:i&&o>s?e||Ay:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:R0},Wy=e=>(t,n)=>{if(t=Number(t),typeof t=="number"&&!isNaN(t)){const r=n.min,o=n.max;return r!==void 0&&t<r?e||`Value should not be less than ${r}`:o!==void 0&&t>o?e||`Value should not be greater than ${o}`:!0}return e||Ly},dc=e=>(t,n)=>{if(typeof t=="string"){const r=n.limit;return r!==void 0&&t.length>r?e||`Maximum characters allowed are ${r}`:!0}return e||Oy},Zy=e=>t=>typeof t=="string"?t.startsWith("https:")?D0.test(t)?!0:e||N0:t.trim().length>0?!0:e||vy:e||Ey;function er(e){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(e)}function Xy(e,t){if(er(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(er(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V0(e){var t=Xy(e,"string");return er(t)=="symbol"?t:t+""}function kr(e,t,n){return(t=V0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G0(Object(n),!0).forEach(function(r){kr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zy(e){if(Array.isArray(e))return e}function Yy(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,i=[],c=!0,l=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function fc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H0(e,t){if(e){if(typeof e=="string")return fc(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fc(e,t):void 0}}function Jy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
596
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){return zy(e)||Yy(e,t)||H0(e,t)||Jy()}function qy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Zt(e,t){if(e==null)return{};var n,r,o=qy(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $y=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function pc(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,a=s===void 0?null:s,i=e.inputValue,c=e.menuIsOpen,l=e.onChange,f=e.onInputChange,g=e.onMenuClose,y=e.onMenuOpen,v=e.value,b=Zt(e,$y),p=w.useState(i!==void 0?i:n),h=Ue(p,2),m=h[0],x=h[1],C=w.useState(c!==void 0?c:o),I=Ue(C,2),E=I[0],_=I[1],T=w.useState(v!==void 0?v:a),S=Ue(T,2),L=S[0],N=S[1],k=w.useCallback(function(X,J){typeof l=="function"&&l(X,J),N(X)},[l]),D=w.useCallback(function(X,J){var oe;typeof f=="function"&&(oe=f(X,J)),x(oe!==void 0?oe:X)},[f]),M=w.useCallback(function(){typeof y=="function"&&y(),_(!0)},[y]),V=w.useCallback(function(){typeof g=="function"&&g(),_(!1)},[g]),z=i!==void 0?i:m,q=c!==void 0?c:E,$=v!==void 0?v:L;return ne(ne({},b),{},{inputValue:z,menuIsOpen:q,onChange:k,onInputChange:D,onMenuClose:V,onMenuOpen:M,value:$})}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(null,arguments)}function Qy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W0(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,V0(r.key),r)}}function Uy(e,t,n){return t&&W0(e.prototype,t),n&&W0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function hc(e,t){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},hc(e,t)}function Ky(e,t){if(typeof t!="function"&&t!==null)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&&hc(e,t)}function Zs(e){return Zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zs(e)}function Z0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z0=function(){return!!e})()}function e9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t9(e,t){if(t&&(er(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e9(e)}function n9(e){var t=Z0();return function(){var n,r=Zs(e);if(t){var o=Zs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return t9(this,n)}}function r9(e){if(Array.isArray(e))return fc(e)}function o9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
597
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dr(e){return r9(e)||o9(e)||H0(e)||s9()}var a9=!1;function i9(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function c9(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var l9=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!a9:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(c9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=i9(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ot="-ms-",Xs="-moz-",Te="-webkit-",X0="comm",gc="rule",mc="decl",u9="@import",z0="@keyframes",d9="@layer",f9=Math.abs,zs=String.fromCharCode,p9=Object.assign;function h9(e,t){return nt(e,0)^45?(((t<<2^nt(e,0))<<2^nt(e,1))<<2^nt(e,2))<<2^nt(e,3):0}function Y0(e){return e.trim()}function g9(e,t){return(e=t.exec(e))?e[0]:e}function Ae(e,t,n){return e.replace(t,n)}function bc(e,t){return e.indexOf(t)}function nt(e,t){return e.charCodeAt(t)|0}function So(e,t,n){return e.slice(t,n)}function en(e){return e.length}function yc(e){return e.length}function Ys(e,t){return t.push(e),e}function m9(e,t){return e.map(t).join("")}var Js=1,Nr=1,J0=0,yt=0,Ye=0,Rr="";function qs(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Js,column:Nr,length:a,return:""}}function To(e,t){return p9(qs("",null,null,"",null,null,0),e,{length:-e.length},t)}function b9(){return Ye}function y9(){return Ye=yt>0?nt(Rr,--yt):0,Nr--,Ye===10&&(Nr=1,Js--),Ye}function Ot(){return Ye=yt<J0?nt(Rr,yt++):0,Nr++,Ye===10&&(Nr=1,Js++),Ye}function tn(){return nt(Rr,yt)}function $s(){return yt}function Ao(e,t){return So(Rr,e,t)}function Lo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function q0(e){return Js=Nr=1,J0=en(Rr=e),yt=0,[]}function $0(e){return Rr="",e}function Qs(e){return Y0(Ao(yt-1,Cc(e===91?e+2:e===40?e+1:e)))}function C9(e){for(;(Ye=tn())&&Ye<33;)Ot();return Lo(e)>2||Lo(Ye)>3?"":" "}function x9(e,t){for(;--t&&Ot()&&!(Ye<48||Ye>102||Ye>57&&Ye<65||Ye>70&&Ye<97););return Ao(e,$s()+(t<6&&tn()==32&&Ot()==32))}function Cc(e){for(;Ot();)switch(Ye){case e:return yt;case 34:case 39:e!==34&&e!==39&&Cc(Ye);break;case 40:e===41&&Cc(e);break;case 92:Ot();break}return yt}function v9(e,t){for(;Ot()&&e+Ye!==57;)if(e+Ye===84&&tn()===47)break;return"/*"+Ao(t,yt-1)+"*"+zs(e===47?e:Ot())}function E9(e){for(;!Lo(tn());)Ot();return Ao(e,yt)}function I9(e){return $0(Us("",null,null,null,[""],e=q0(e),0,[0],e))}function Us(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,g=a,y=0,v=0,b=0,p=1,h=1,m=1,x=0,C="",I=o,E=s,_=r,T=C;h;)switch(b=x,x=Ot()){case 40:if(b!=108&&nt(T,g-1)==58){bc(T+=Ae(Qs(x),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:T+=Qs(x);break;case 9:case 10:case 13:case 32:T+=C9(b);break;case 92:T+=x9($s()-1,7);continue;case 47:switch(tn()){case 42:case 47:Ys(w9(v9(Ot(),$s()),t,n),c);break;default:T+="/"}break;case 123*p:i[l++]=en(T)*m;case 125*p:case 59:case 0:switch(x){case 0:case 125:h=0;case 59+f:m==-1&&(T=Ae(T,/\f/g,"")),v>0&&en(T)-g&&Ys(v>32?U0(T+";",r,n,g-1):U0(Ae(T," ","")+";",r,n,g-2),c);break;case 59:T+=";";default:if(Ys(_=Q0(T,t,n,l,f,o,i,C,I=[],E=[],g),s),x===123)if(f===0)Us(T,t,_,_,I,s,g,i,E);else switch(y===99&&nt(T,3)===110?100:y){case 100:case 108:case 109:case 115:Us(e,_,_,r&&Ys(Q0(e,_,_,0,0,o,i,C,o,I=[],g),E),o,E,g,i,r?I:E);break;default:Us(T,_,_,_,[""],E,0,i,E)}}l=f=v=0,p=m=1,C=T="",g=a;break;case 58:g=1+en(T),v=b;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&y9()==125)continue}switch(T+=zs(x),x*p){case 38:m=f>0?1:(T+="\f",-1);break;case 44:i[l++]=(en(T)-1)*m,m=1;break;case 64:tn()===45&&(T+=Qs(Ot())),y=tn(),f=g=en(C=T+=E9($s())),x++;break;case 45:b===45&&en(T)==2&&(p=0)}}return s}function Q0(e,t,n,r,o,s,a,i,c,l,f){for(var g=o-1,y=o===0?s:[""],v=yc(y),b=0,p=0,h=0;b<r;++b)for(var m=0,x=So(e,g+1,g=f9(p=a[b])),C=e;m<v;++m)(C=Y0(p>0?y[m]+" "+x:Ae(x,/&\f/g,y[m])))&&(c[h++]=C);return qs(e,t,n,o===0?gc:i,c,l,f)}function w9(e,t,n){return qs(e,t,n,X0,zs(b9()),So(e,2,-2),0)}function U0(e,t,n,r){return qs(e,t,n,mc,So(e,0,r),So(e,r+1,-1),r)}function Mr(e,t){for(var n="",r=yc(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function _9(e,t,n,r){switch(e.type){case d9:if(e.children.length)break;case u9:case mc:return e.return=e.return||e.value;case X0:return"";case z0:return e.return=e.value+"{"+Mr(e.children,r)+"}";case gc:e.value=e.props.join(",")}return en(n=Mr(e.children,r))?e.return=e.value+"{"+n+"}":""}function S9(e){var t=yc(e);return function(n,r,o,s){for(var a="",i=0;i<t;i++)a+=e[i](n,r,o,s)||"";return a}}function T9(e){return function(t){t.root||(t=t.return)&&e(t)}}function A9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var L9=function(t,n,r){for(var o=0,s=0;o=s,s=tn(),o===38&&s===12&&(n[r]=1),!Lo(s);)Ot();return Ao(t,yt)},O9=function(t,n){var r=-1,o=44;do switch(Lo(o)){case 0:o===38&&tn()===12&&(n[r]=1),t[r]+=L9(yt-1,n,r);break;case 2:t[r]+=Qs(o);break;case 4:if(o===44){t[++r]=tn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=zs(o)}while(o=Ot());return t},F9=function(t,n){return $0(O9(q0(t),n))},K0=new WeakMap,k9=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!K0.get(r))&&!o){K0.set(t,!0);for(var s=[],a=F9(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var f=0;f<i.length;f++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},D9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function ef(e,t){switch(h9(e,t)){case 5103:return Te+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Te+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Te+e+Xs+e+ot+e+e;case 6828:case 4268:return Te+e+ot+e+e;case 6165:return Te+e+ot+"flex-"+e+e;case 5187:return Te+e+Ae(e,/(\w+).+(:[^]+)/,Te+"box-$1$2"+ot+"flex-$1$2")+e;case 5443:return Te+e+ot+"flex-item-"+Ae(e,/flex-|-self/,"")+e;case 4675:return Te+e+ot+"flex-line-pack"+Ae(e,/align-content|flex-|-self/,"")+e;case 5548:return Te+e+ot+Ae(e,"shrink","negative")+e;case 5292:return Te+e+ot+Ae(e,"basis","preferred-size")+e;case 6060:return Te+"box-"+Ae(e,"-grow","")+Te+e+ot+Ae(e,"grow","positive")+e;case 4554:return Te+Ae(e,/([^-])(transform)/g,"$1"+Te+"$2")+e;case 6187:return Ae(Ae(Ae(e,/(zoom-|grab)/,Te+"$1"),/(image-set)/,Te+"$1"),e,"")+e;case 5495:case 3959:return Ae(e,/(image-set\([^]*)/,Te+"$1$`$1");case 4968:return Ae(Ae(e,/(.+:)(flex-)?(.*)/,Te+"box-pack:$3"+ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Te+e+e;case 4095:case 3583:case 4068:case 2532:return Ae(e,/(.+)-inline(.+)/,Te+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(en(e)-1-t>6)switch(nt(e,t+1)){case 109:if(nt(e,t+4)!==45)break;case 102:return Ae(e,/(.+:)(.+)-([^]+)/,"$1"+Te+"$2-$3$1"+Xs+(nt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~bc(e,"stretch")?ef(Ae(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(nt(e,t+1)!==115)break;case 6444:switch(nt(e,en(e)-3-(~bc(e,"!important")&&10))){case 107:return Ae(e,":",":"+Te)+e;case 101:return Ae(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Te+(nt(e,14)===45?"inline-":"")+"box$3$1"+Te+"$2$3$1"+ot+"$2box$3")+e}break;case 5936:switch(nt(e,t+11)){case 114:return Te+e+ot+Ae(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Te+e+ot+Ae(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Te+e+ot+Ae(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Te+e+ot+e+e}return e}var N9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case mc:t.return=ef(t.value,t.length);break;case z0:return Mr([To(t,{value:Ae(t.value,"@","@"+Te)})],o);case gc:if(t.length)return m9(t.props,function(s){switch(g9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Mr([To(t,{props:[Ae(s,/:(read-\w+)/,":"+Xs+"$1")]})],o);case"::placeholder":return Mr([To(t,{props:[Ae(s,/:(plac\w+)/,":"+Te+"input-$1")]}),To(t,{props:[Ae(s,/:(plac\w+)/,":"+Xs+"$1")]}),To(t,{props:[Ae(s,/:(plac\w+)/,ot+"input-$1")]})],o)}return""})}},R9=[N9],M9=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var h=p.getAttribute("data-emotion");h.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||R9,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var h=p.getAttribute("data-emotion").split(" "),m=1;m<h.length;m++)s[h[m]]=!0;i.push(p)});var c,l=[k9,D9];{var f,g=[_9,T9(function(p){f.insert(p)})],y=S9(l.concat(o,g)),v=function(h){return Mr(I9(h),y)};c=function(h,m,x,C){f=x,v(h?h+"{"+m.styles+"}":m.styles),C&&(b.inserted[m.name]=!0)}}var b={key:n,sheet:new l9({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return b.sheet.hydrate(i),b},xc={exports:{}},Oe={};/** @license React v16.13.1
598
598
  * react-is.production.min.js
599
599
  *
600
600
  * Copyright (c) Facebook, Inc. and its affiliates.
601
601
  *
602
602
  * This source code is licensed under the MIT license found in the
603
603
  * LICENSE file in the root directory of this source tree.
604
- */var ef;function R9(){if(ef)return Oe;ef=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function C(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case t:switch(E=E.type,E){case c:case l:case r:case s:case o:case g:return E;default:switch(E=E&&E.$$typeof,E){case i:case f:case b:case v:case a:return E;default:return _}}case n:return _}}}function I(E){return C(E)===l}return Oe.AsyncMode=c,Oe.ConcurrentMode=l,Oe.ContextConsumer=i,Oe.ContextProvider=a,Oe.Element=t,Oe.ForwardRef=f,Oe.Fragment=r,Oe.Lazy=b,Oe.Memo=v,Oe.Portal=n,Oe.Profiler=s,Oe.StrictMode=o,Oe.Suspense=g,Oe.isAsyncMode=function(E){return I(E)||C(E)===c},Oe.isConcurrentMode=I,Oe.isContextConsumer=function(E){return C(E)===i},Oe.isContextProvider=function(E){return C(E)===a},Oe.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},Oe.isForwardRef=function(E){return C(E)===f},Oe.isFragment=function(E){return C(E)===r},Oe.isLazy=function(E){return C(E)===b},Oe.isMemo=function(E){return C(E)===v},Oe.isPortal=function(E){return C(E)===n},Oe.isProfiler=function(E){return C(E)===s},Oe.isStrictMode=function(E){return C(E)===o},Oe.isSuspense=function(E){return C(E)===g},Oe.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===s||E===o||E===g||E===y||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===v||E.$$typeof===a||E.$$typeof===i||E.$$typeof===f||E.$$typeof===h||E.$$typeof===m||E.$$typeof===x||E.$$typeof===p)},Oe.typeOf=C,Oe}var Fe={};/** @license React v16.13.1
604
+ */var tf;function P9(){if(tf)return Oe;tf=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function C(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case t:switch(E=E.type,E){case c:case l:case r:case s:case o:case g:return E;default:switch(E=E&&E.$$typeof,E){case i:case f:case b:case v:case a:return E;default:return _}}case n:return _}}}function I(E){return C(E)===l}return Oe.AsyncMode=c,Oe.ConcurrentMode=l,Oe.ContextConsumer=i,Oe.ContextProvider=a,Oe.Element=t,Oe.ForwardRef=f,Oe.Fragment=r,Oe.Lazy=b,Oe.Memo=v,Oe.Portal=n,Oe.Profiler=s,Oe.StrictMode=o,Oe.Suspense=g,Oe.isAsyncMode=function(E){return I(E)||C(E)===c},Oe.isConcurrentMode=I,Oe.isContextConsumer=function(E){return C(E)===i},Oe.isContextProvider=function(E){return C(E)===a},Oe.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},Oe.isForwardRef=function(E){return C(E)===f},Oe.isFragment=function(E){return C(E)===r},Oe.isLazy=function(E){return C(E)===b},Oe.isMemo=function(E){return C(E)===v},Oe.isPortal=function(E){return C(E)===n},Oe.isProfiler=function(E){return C(E)===s},Oe.isStrictMode=function(E){return C(E)===o},Oe.isSuspense=function(E){return C(E)===g},Oe.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===s||E===o||E===g||E===y||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===v||E.$$typeof===a||E.$$typeof===i||E.$$typeof===f||E.$$typeof===h||E.$$typeof===m||E.$$typeof===x||E.$$typeof===p)},Oe.typeOf=C,Oe}var Fe={};/** @license React v16.13.1
605
605
  * react-is.development.js
606
606
  *
607
607
  * Copyright (c) Facebook, Inc. and its affiliates.
608
608
  *
609
609
  * This source code is licensed under the MIT license found in the
610
610
  * LICENSE file in the root directory of this source tree.
611
- */var tf;function M9(){return tf||(tf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function C(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===l||Z===s||Z===o||Z===g||Z===y||typeof Z=="object"&&Z!==null&&(Z.$$typeof===b||Z.$$typeof===v||Z.$$typeof===a||Z.$$typeof===i||Z.$$typeof===f||Z.$$typeof===h||Z.$$typeof===m||Z.$$typeof===x||Z.$$typeof===p)}function I(Z){if(typeof Z=="object"&&Z!==null){var Ve=Z.$$typeof;switch(Ve){case t:var Ne=Z.type;switch(Ne){case c:case l:case r:case s:case o:case g:return Ne;default:var Je=Ne&&Ne.$$typeof;switch(Je){case i:case f:case b:case v:case a:return Je;default:return Ve}}case n:return Ve}}}var E=c,_=l,T=i,S=a,L=t,N=f,k=r,D=b,P=v,V=n,z=s,$=o,Q=g,X=!1;function q(Z){return X||(X=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),oe(Z)||I(Z)===c}function oe(Z){return I(Z)===l}function ie(Z){return I(Z)===i}function B(Z){return I(Z)===a}function R(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function G(Z){return I(Z)===f}function H(Z){return I(Z)===r}function J(Z){return I(Z)===b}function re(Z){return I(Z)===v}function se(Z){return I(Z)===n}function j(Z){return I(Z)===s}function te(Z){return I(Z)===o}function Ee(Z){return I(Z)===g}Fe.AsyncMode=E,Fe.ConcurrentMode=_,Fe.ContextConsumer=T,Fe.ContextProvider=S,Fe.Element=L,Fe.ForwardRef=N,Fe.Fragment=k,Fe.Lazy=D,Fe.Memo=P,Fe.Portal=V,Fe.Profiler=z,Fe.StrictMode=$,Fe.Suspense=Q,Fe.isAsyncMode=q,Fe.isConcurrentMode=oe,Fe.isContextConsumer=ie,Fe.isContextProvider=B,Fe.isElement=R,Fe.isForwardRef=G,Fe.isFragment=H,Fe.isLazy=J,Fe.isMemo=re,Fe.isPortal=se,Fe.isProfiler=j,Fe.isStrictMode=te,Fe.isSuspense=Ee,Fe.isValidElementType=C,Fe.typeOf=I}()),Fe}process.env.NODE_ENV==="production"?vc.exports=R9():vc.exports=M9();var P9=vc.exports,nf=P9,j9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},B9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},rf={};rf[nf.ForwardRef]=j9,rf[nf.Memo]=B9;var V9=!0;function G9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var of=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||V9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},H9=function(t,n,r){of(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function W9(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Z9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},X9=!1,z9=/[A-Z]|^ms/g,Y9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,sf=function(t){return t.charCodeAt(1)===45},af=function(t){return t!=null&&typeof t!="boolean"},Ec=S9(function(e){return sf(e)?e:e.replace(z9,"-$&").toLowerCase()}),cf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Y9,function(r,o,s){return Kt={name:o,styles:s,next:Kt},o})}return Z9[t]!==1&&!sf(t)&&typeof n=="number"&&n!==0?n+"px":n},J9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ko(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Kt={name:o.name,styles:o.styles,next:Kt},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)Kt={name:a.name,styles:a.styles,next:Kt},a=a.next;var i=s.styles+";";return i}return q9(e,t,n)}case"function":{if(e!==void 0){var c=Kt,l=n(e);return Kt=c,ko(e,t,l)}break}}var f=n;return f}function q9(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ko(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;af(i)&&(r+=Ec(s)+":"+cf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&X9)throw new Error(J9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)af(a[c])&&(r+=Ec(s)+":"+cf(s,a[c])+";");else{var l=ko(e,t,a);switch(s){case"animation":case"animationName":{r+=Ec(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var lf=/label:\s*([^\s;{]+)\s*(;|$)/g,Kt;function uf(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Kt=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=ko(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=ko(n,t,e[i]),r){var c=s;o+=c[i]}lf.lastIndex=0;for(var l="",f;(f=lf.exec(o))!==null;)l+="-"+f[1];var g=W9(o)+l;return{name:g,styles:o,next:Kt}}var $9=function(t){return t()},Q9=A.useInsertionEffect?A.useInsertionEffect:!1,U9=Q9||$9,K9=!1,df=A.createContext(typeof HTMLElement<"u"?N9({key:"css"}):null);df.Provider;var e6=function(t){return w.forwardRef(function(n,r){var o=w.useContext(df);return t(n,o,r)})},t6=A.createContext({}),Ic={}.hasOwnProperty,wc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",n6=function(t,n){var r={};for(var o in n)Ic.call(n,o)&&(r[o]=n[o]);return r[wc]=t,r},r6=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return of(n,r,o),U9(function(){return H9(n,r,o)}),null},o6=e6(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[wc],s=[r],a="";typeof e.className=="string"?a=G9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=uf(s,void 0,A.useContext(t6));a+=t.key+"-"+i.name;var c={};for(var l in e)Ic.call(e,l)&&l!=="css"&&l!==wc&&!K9&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),A.createElement(A.Fragment,null,A.createElement(r6,{cache:t,serialized:i,isStringTag:typeof o=="string"}),A.createElement(o,c))}),s6=o6,ce=function(t,n){var r=arguments;if(n==null||!Ic.call(n,"css"))return A.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=s6,s[1]=n6(t,n);for(var a=2;a<o;a++)s[a]=r[a];return A.createElement.apply(null,s)};function _c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return uf(t)}var a6=function(){var t=_c.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function i6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const c6=Math.min,l6=Math.max,Us=Math.round,Ks=Math.floor,ea=e=>({x:e,y:e});function u6(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ta(){return typeof window<"u"}function ff(e){return hf(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pf(e){var t;return(t=(hf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hf(e){return ta()?e instanceof Node||e instanceof gn(e).Node:!1}function d6(e){return ta()?e instanceof Element||e instanceof gn(e).Element:!1}function Sc(e){return ta()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function gf(e){return!ta()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}function mf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Tc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function f6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function p6(e){return["html","body","#document"].includes(ff(e))}function Tc(e){return gn(e).getComputedStyle(e)}function h6(e){if(ff(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gf(e)&&e.host||pf(e);return gf(t)?t.host:t}function bf(e){const t=h6(e);return p6(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sc(t)&&mf(t)?t:bf(t)}function na(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=bf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=gn(o);if(s){const i=Ac(a);return t.concat(a,a.visualViewport||[],mf(o)?o:[],i&&n?na(i):[])}return t.concat(o,na(o,[],n))}function Ac(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function g6(e){const t=Tc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Sc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=Us(n)!==s||Us(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Lc(e){return d6(e)?e:e.contextElement}function yf(e){const t=Lc(e);if(!Sc(t))return ea(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=g6(t);let a=(s?Us(n.width):n.width)/r,i=(s?Us(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const m6=ea(0);function b6(e){const t=gn(e);return!f6()||!t.visualViewport?m6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function y6(e,t,n){return!1}function Cf(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Lc(e);let a=ea(1);t&&(a=yf(e));const i=y6()?b6(s):ea(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,g=o.height/a.y;if(s){const y=gn(s),v=r;let b=y,p=Ac(b);for(;p&&r&&v!==b;){const h=yf(p),m=p.getBoundingClientRect(),x=Tc(p),C=m.left+(p.clientLeft+parseFloat(x.paddingLeft))*h.x,I=m.top+(p.clientTop+parseFloat(x.paddingTop))*h.y;c*=h.x,l*=h.y,f*=h.x,g*=h.y,c+=C,l+=I,b=gn(p),p=Ac(b)}}return u6({width:f,height:g,x:c,y:l})}function C6(e,t){let n=null,r;const o=pf(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const{left:l,top:f,width:g,height:y}=e.getBoundingClientRect();if(i||t(),!g||!y)return;const v=Ks(f),b=Ks(o.clientWidth-(l+g)),p=Ks(o.clientHeight-(f+y)),h=Ks(l),x={rootMargin:-v+"px "+-b+"px "+-p+"px "+-h+"px",threshold:l6(0,c6(1,c))||1};let C=!0;function I(E){const _=E[0].intersectionRatio;if(_!==c){if(!C)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(I,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,x)}n.observe(e)}return a(!0),s}function x6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Lc(e),f=o||s?[...l?na(l):[],...na(t)]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const g=l&&i?C6(l,n):null;let y=-1,v=null;a&&(v=new ResizeObserver(m=>{let[x]=m;x&&x.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),n()}),l&&!c&&v.observe(l),v.observe(t));let b,p=c?Cf(e):null;c&&h();function h(){const m=Cf(e);p&&(m.x!==p.x||m.y!==p.y||m.width!==p.width||m.height!==p.height)&&n(),p=m,b=requestAnimationFrame(h)}return n(),()=>{var m;f.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),g==null||g(),(m=v)==null||m.disconnect(),v=null,c&&cancelAnimationFrame(b)}}var Oc=w.useLayoutEffect,v6=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ra=function(){};function E6(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function I6(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var s=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&s.push("".concat(E6(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var oa=function(t){return D6(t)?t.filter(Boolean):rr(t)==="object"&&t!==null?[t]:[]},xf=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Ht(t,v6);return ne({},n)},He=function(t,n,r){var o=t.cx,s=t.getStyles,a=t.getClassNames,i=t.className;return{css:s(n,t),className:o(r??{},a(n,t),i)}};function w6(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function sa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function _6(e){return sa(e)?window.innerHeight:e.clientHeight}function vf(e){return sa(e)?window.pageYOffset:e.scrollTop}function aa(e,t){if(sa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function S6(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function T6(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ia(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ra,o=vf(e),s=t-o,a=10,i=0;function c(){i+=a;var l=T6(i,o,s,n);aa(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Ef(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?aa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&aa(e,Math.max(t.offsetTop-o,0))}function A6(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function If(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function L6(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var wf=!1,O6={get passive(){return wf=!0}},ca=typeof window<"u"?window:{};ca.addEventListener&&ca.removeEventListener&&(ca.addEventListener("p",ra,O6),ca.removeEventListener("p",ra,!1));var F6=wf;function k6(e){return e!=null}function D6(e){return Array.isArray(e)}function Do(e,t,n){return e?t:n}function JS(e){return e}function qS(e){return e}var N6=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(a){var i=Ue(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=Ue(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},R6=["children","innerProps"],M6=["children","innerProps"];function P6(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=S6(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),g=f.height,y=n.getBoundingClientRect(),v=y.bottom,b=y.height,p=y.top,h=n.offsetParent.getBoundingClientRect(),m=h.top,x=a?window.innerHeight:_6(c),C=vf(c),I=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),_=m-E,T=x-p,S=_+C,L=g-C-p,N=v-x+C+I,k=C+p-E,D=160;switch(o){case"auto":case"bottom":if(T>=b)return{placement:"bottom",maxHeight:t};if(L>=b&&!a)return s&&ia(c,N,D),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&T>=r){s&&ia(c,N,D);var P=a?T-I:L-I;return{placement:"bottom",maxHeight:P}}if(o==="auto"||a){var V=t,z=a?_:S;return z>=r&&(V=Math.min(z-I-i,t)),{placement:"top",maxHeight:V}}if(o==="bottom")return s&&aa(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(_>=b)return{placement:"top",maxHeight:t};if(S>=b&&!a)return s&&ia(c,k,D),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var $=t;return(!a&&S>=r||a&&_>=r)&&($=a?_-E:S-E),s&&ia(c,k,D),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function j6(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var _f=function(t){return t==="auto"?"bottom":t},B6=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return ne((r={label:"menu"},Dr(r,j6(o),"100%"),Dr(r,"position","absolute"),Dr(r,"width","100%"),Dr(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},Sf=w.createContext(null),V6=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,l=w.useContext(Sf)||{},f=l.setPortalPlacement,g=w.useRef(null),y=w.useState(o),v=Ue(y,2),b=v[0],p=v[1],h=w.useState(null),m=Ue(h,2),x=m[0],C=m[1],I=c.spacing.controlHeight;return Oc(function(){var E=g.current;if(E){var _=a==="fixed",T=i&&!_,S=P6({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:T,isFixedPosition:_,controlHeight:I});p(S.maxHeight),C(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,I]),n({ref:g,placerProps:ne(ne({},t),{},{placement:x||_f(s),maxHeight:b})})},G6=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ce("div",de({},He(t,"menu",{menu:!0}),{ref:r},o),n)},H6=G6,W6=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ne({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},Z6=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ce("div",de({},He(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Tf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ne({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},X6=Tf,z6=Tf,Y6=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Ht(t,R6);return ce("div",de({},He(ne(ne({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},J6=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Ht(t,M6);return ce("div",de({},He(ne(ne({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},q6=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},$6=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=w.useRef(null),l=w.useRef(null),f=w.useState(_f(a)),g=Ue(f,2),y=g[0],v=g[1],b=w.useMemo(function(){return{setPortalPlacement:v}},[]),p=w.useState(null),h=Ue(p,2),m=h[0],x=h[1],C=w.useCallback(function(){if(o){var T=A6(o),S=i==="fixed"?0:window.pageYOffset,L=T[y]+S;(L!==(m==null?void 0:m.offset)||T.left!==(m==null?void 0:m.rect.left)||T.width!==(m==null?void 0:m.rect.width))&&x({offset:L,rect:T})}},[o,i,y,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);Oc(function(){C()},[C]);var I=w.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=x6(o,c.current,C,{elementResize:"ResizeObserver"in window}))},[o,C]);Oc(function(){I()},[I]);var E=w.useCallback(function(T){c.current=T,I()},[I]);if(!n&&i!=="fixed"||!m)return null;var _=ce("div",de({ref:E},He(ne(ne({},t),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ce(Sf.Provider,{value:b},n?Re.createPortal(_,n):_)},Q6=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},U6=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ce("div",de({},He(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},K6=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ne({alignItems:"center",display:o&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},eC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ce("div",de({},He(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},tC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},nC=function(t){var n=t.children,r=t.innerProps;return ce("div",de({},He(t,"indicatorsContainer",{indicators:!0}),r),n)},Af,rC=["size"],oC=["innerProps","isRtl","size"];function sC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var aC=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:sC},Lf=function(t){var n=t.size,r=Ht(t,rC);return ce("svg",de({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:aC},r))},Fc=function(t){return ce(Lf,de({size:20},t),ce("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Of=function(t){return ce(Lf,de({size:20},t),ce("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ff=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ne({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},iC=Ff,cC=function(t){var n=t.children,r=t.innerProps;return ce("div",de({},He(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ce(Of,null))},lC=Ff,uC=function(t){var n=t.children,r=t.innerProps;return ce("div",de({},He(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ce(Fc,null))},dC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ne({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},fC=function(t){var n=t.innerProps;return ce("span",de({},n,He(t,"indicatorSeparator",{"indicator-separator":!0})))},pC=a6(Af||(Af=i6([`
611
+ */var nf;function j9(){return nf||(nf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function C(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===l||Z===s||Z===o||Z===g||Z===y||typeof Z=="object"&&Z!==null&&(Z.$$typeof===b||Z.$$typeof===v||Z.$$typeof===a||Z.$$typeof===i||Z.$$typeof===f||Z.$$typeof===h||Z.$$typeof===m||Z.$$typeof===x||Z.$$typeof===p)}function I(Z){if(typeof Z=="object"&&Z!==null){var Ve=Z.$$typeof;switch(Ve){case t:var Ne=Z.type;switch(Ne){case c:case l:case r:case s:case o:case g:return Ne;default:var Ke=Ne&&Ne.$$typeof;switch(Ke){case i:case f:case b:case v:case a:return Ke;default:return Ve}}case n:return Ve}}}var E=c,_=l,T=i,S=a,L=t,N=f,k=r,D=b,M=v,V=n,z=s,q=o,$=g,X=!1;function J(Z){return X||(X=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),oe(Z)||I(Z)===c}function oe(Z){return I(Z)===l}function ae(Z){return I(Z)===i}function B(Z){return I(Z)===a}function P(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function G(Z){return I(Z)===f}function H(Z){return I(Z)===r}function Y(Z){return I(Z)===b}function re(Z){return I(Z)===v}function se(Z){return I(Z)===n}function j(Z){return I(Z)===s}function te(Z){return I(Z)===o}function Ee(Z){return I(Z)===g}Fe.AsyncMode=E,Fe.ConcurrentMode=_,Fe.ContextConsumer=T,Fe.ContextProvider=S,Fe.Element=L,Fe.ForwardRef=N,Fe.Fragment=k,Fe.Lazy=D,Fe.Memo=M,Fe.Portal=V,Fe.Profiler=z,Fe.StrictMode=q,Fe.Suspense=$,Fe.isAsyncMode=J,Fe.isConcurrentMode=oe,Fe.isContextConsumer=ae,Fe.isContextProvider=B,Fe.isElement=P,Fe.isForwardRef=G,Fe.isFragment=H,Fe.isLazy=Y,Fe.isMemo=re,Fe.isPortal=se,Fe.isProfiler=j,Fe.isStrictMode=te,Fe.isSuspense=Ee,Fe.isValidElementType=C,Fe.typeOf=I}()),Fe}process.env.NODE_ENV==="production"?xc.exports=P9():xc.exports=j9();var B9=xc.exports,rf=B9,V9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},G9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},of={};of[rf.ForwardRef]=V9,of[rf.Memo]=G9;var H9=!0;function W9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var sf=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||H9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Z9=function(t,n,r){sf(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function X9(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var z9={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Y9=!1,J9=/[A-Z]|^ms/g,q9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,af=function(t){return t.charCodeAt(1)===45},cf=function(t){return t!=null&&typeof t!="boolean"},vc=A9(function(e){return af(e)?e:e.replace(J9,"-$&").toLowerCase()}),lf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(q9,function(r,o,s){return nn={name:o,styles:s,next:nn},o})}return z9[t]!==1&&!af(t)&&typeof n=="number"&&n!==0?n+"px":n},$9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Oo(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return nn={name:o.name,styles:o.styles,next:nn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)nn={name:a.name,styles:a.styles,next:nn},a=a.next;var i=s.styles+";";return i}return Q9(e,t,n)}case"function":{if(e!==void 0){var c=nn,l=n(e);return nn=c,Oo(e,t,l)}break}}var f=n;return f}function Q9(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Oo(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;cf(i)&&(r+=vc(s)+":"+lf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&Y9)throw new Error($9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)cf(a[c])&&(r+=vc(s)+":"+lf(s,a[c])+";");else{var l=Oo(e,t,a);switch(s){case"animation":case"animationName":{r+=vc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var uf=/label:\s*([^\s;{]+)\s*(;|$)/g,nn;function df(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";nn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Oo(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Oo(n,t,e[i]),r){var c=s;o+=c[i]}uf.lastIndex=0;for(var l="",f;(f=uf.exec(o))!==null;)l+="-"+f[1];var g=X9(o)+l;return{name:g,styles:o,next:nn}}var U9=function(t){return t()},K9=A.useInsertionEffect?A.useInsertionEffect:!1,e6=K9||U9,t6=!1,ff=A.createContext(typeof HTMLElement<"u"?M9({key:"css"}):null);ff.Provider;var n6=function(t){return w.forwardRef(function(n,r){var o=w.useContext(ff);return t(n,o,r)})},r6=A.createContext({}),Ec={}.hasOwnProperty,Ic="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",o6=function(t,n){var r={};for(var o in n)Ec.call(n,o)&&(r[o]=n[o]);return r[Ic]=t,r},s6=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return sf(n,r,o),e6(function(){return Z9(n,r,o)}),null},a6=n6(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Ic],s=[r],a="";typeof e.className=="string"?a=W9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=df(s,void 0,A.useContext(r6));a+=t.key+"-"+i.name;var c={};for(var l in e)Ec.call(e,l)&&l!=="css"&&l!==Ic&&!t6&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),A.createElement(A.Fragment,null,A.createElement(s6,{cache:t,serialized:i,isStringTag:typeof o=="string"}),A.createElement(o,c))}),i6=a6,ie=function(t,n){var r=arguments;if(n==null||!Ec.call(n,"css"))return A.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=i6,s[1]=o6(t,n);for(var a=2;a<o;a++)s[a]=r[a];return A.createElement.apply(null,s)};function wc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return df(t)}var c6=function(){var t=wc.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function l6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const u6=Math.min,d6=Math.max,Ks=Math.round,ea=Math.floor,ta=e=>({x:e,y:e});function f6(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function na(){return typeof window<"u"}function pf(e){return gf(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hf(e){var t;return(t=(gf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function gf(e){return na()?e instanceof Node||e instanceof gn(e).Node:!1}function p6(e){return na()?e instanceof Element||e instanceof gn(e).Element:!1}function _c(e){return na()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function mf(e){return!na()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}function bf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Sc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function h6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function g6(e){return["html","body","#document"].includes(pf(e))}function Sc(e){return gn(e).getComputedStyle(e)}function m6(e){if(pf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mf(e)&&e.host||hf(e);return mf(t)?t.host:t}function yf(e){const t=m6(e);return g6(t)?e.ownerDocument?e.ownerDocument.body:e.body:_c(t)&&bf(t)?t:yf(t)}function ra(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=yf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=gn(o);if(s){const i=Tc(a);return t.concat(a,a.visualViewport||[],bf(o)?o:[],i&&n?ra(i):[])}return t.concat(o,ra(o,[],n))}function Tc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function b6(e){const t=Sc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_c(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=Ks(n)!==s||Ks(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Ac(e){return p6(e)?e:e.contextElement}function Cf(e){const t=Ac(e);if(!_c(t))return ta(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=b6(t);let a=(s?Ks(n.width):n.width)/r,i=(s?Ks(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const y6=ta(0);function C6(e){const t=gn(e);return!h6()||!t.visualViewport?y6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function x6(e,t,n){return!1}function xf(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Ac(e);let a=ta(1);t&&(a=Cf(e));const i=x6()?C6(s):ta(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,g=o.height/a.y;if(s){const y=gn(s),v=r;let b=y,p=Tc(b);for(;p&&r&&v!==b;){const h=Cf(p),m=p.getBoundingClientRect(),x=Sc(p),C=m.left+(p.clientLeft+parseFloat(x.paddingLeft))*h.x,I=m.top+(p.clientTop+parseFloat(x.paddingTop))*h.y;c*=h.x,l*=h.y,f*=h.x,g*=h.y,c+=C,l+=I,b=gn(p),p=Tc(b)}}return f6({width:f,height:g,x:c,y:l})}function v6(e,t){let n=null,r;const o=hf(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const{left:l,top:f,width:g,height:y}=e.getBoundingClientRect();if(i||t(),!g||!y)return;const v=ea(f),b=ea(o.clientWidth-(l+g)),p=ea(o.clientHeight-(f+y)),h=ea(l),x={rootMargin:-v+"px "+-b+"px "+-p+"px "+-h+"px",threshold:d6(0,u6(1,c))||1};let C=!0;function I(E){const _=E[0].intersectionRatio;if(_!==c){if(!C)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(I,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,x)}n.observe(e)}return a(!0),s}function E6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Ac(e),f=o||s?[...l?ra(l):[],...ra(t)]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const g=l&&i?v6(l,n):null;let y=-1,v=null;a&&(v=new ResizeObserver(m=>{let[x]=m;x&&x.target===l&&v&&(v.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),n()}),l&&!c&&v.observe(l),v.observe(t));let b,p=c?xf(e):null;c&&h();function h(){const m=xf(e);p&&(m.x!==p.x||m.y!==p.y||m.width!==p.width||m.height!==p.height)&&n(),p=m,b=requestAnimationFrame(h)}return n(),()=>{var m;f.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),g==null||g(),(m=v)==null||m.disconnect(),v=null,c&&cancelAnimationFrame(b)}}var Lc=w.useLayoutEffect,I6=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],oa=function(){};function w6(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function _6(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var s=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&s.push("".concat(w6(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var sa=function(t){return R6(t)?t.filter(Boolean):er(t)==="object"&&t!==null?[t]:[]},vf=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Zt(t,I6);return ne({},n)},He=function(t,n,r){var o=t.cx,s=t.getStyles,a=t.getClassNames,i=t.className;return{css:s(n,t),className:o(r??{},a(n,t),i)}};function S6(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function aa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function T6(e){return aa(e)?window.innerHeight:e.clientHeight}function Ef(e){return aa(e)?window.pageYOffset:e.scrollTop}function ia(e,t){if(aa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function A6(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function L6(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function ca(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:oa,o=Ef(e),s=t-o,a=10,i=0;function c(){i+=a;var l=L6(i,o,s,n);ia(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function If(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?ia(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&ia(e,Math.max(t.offsetTop-o,0))}function O6(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function wf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function F6(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var _f=!1,k6={get passive(){return _f=!0}},la=typeof window<"u"?window:{};la.addEventListener&&la.removeEventListener&&(la.addEventListener("p",oa,k6),la.removeEventListener("p",oa,!1));var D6=_f;function N6(e){return e!=null}function R6(e){return Array.isArray(e)}function Fo(e,t,n){return e?t:n}function $S(e){return e}function QS(e){return e}var M6=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(a){var i=Ue(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=Ue(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},P6=["children","innerProps"],j6=["children","innerProps"];function B6(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=A6(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),g=f.height,y=n.getBoundingClientRect(),v=y.bottom,b=y.height,p=y.top,h=n.offsetParent.getBoundingClientRect(),m=h.top,x=a?window.innerHeight:T6(c),C=Ef(c),I=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),_=m-E,T=x-p,S=_+C,L=g-C-p,N=v-x+C+I,k=C+p-E,D=160;switch(o){case"auto":case"bottom":if(T>=b)return{placement:"bottom",maxHeight:t};if(L>=b&&!a)return s&&ca(c,N,D),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&T>=r){s&&ca(c,N,D);var M=a?T-I:L-I;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var V=t,z=a?_:S;return z>=r&&(V=Math.min(z-I-i,t)),{placement:"top",maxHeight:V}}if(o==="bottom")return s&&ia(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(_>=b)return{placement:"top",maxHeight:t};if(S>=b&&!a)return s&&ca(c,k,D),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var q=t;return(!a&&S>=r||a&&_>=r)&&(q=a?_-E:S-E),s&&ca(c,k,D),{placement:"top",maxHeight:q}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function V6(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Sf=function(t){return t==="auto"?"bottom":t},G6=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return ne((r={label:"menu"},kr(r,V6(o),"100%"),kr(r,"position","absolute"),kr(r,"width","100%"),kr(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},Tf=w.createContext(null),H6=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,l=w.useContext(Tf)||{},f=l.setPortalPlacement,g=w.useRef(null),y=w.useState(o),v=Ue(y,2),b=v[0],p=v[1],h=w.useState(null),m=Ue(h,2),x=m[0],C=m[1],I=c.spacing.controlHeight;return Lc(function(){var E=g.current;if(E){var _=a==="fixed",T=i&&!_,S=B6({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:T,isFixedPosition:_,controlHeight:I});p(S.maxHeight),C(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,I]),n({ref:g,placerProps:ne(ne({},t),{},{placement:x||Sf(s),maxHeight:b})})},W6=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ie("div",de({},He(t,"menu",{menu:!0}),{ref:r},o),n)},Z6=W6,X6=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ne({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},z6=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ie("div",de({},He(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Af=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ne({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},Y6=Af,J6=Af,q6=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Zt(t,P6);return ie("div",de({},He(ne(ne({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},$6=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Zt(t,j6);return ie("div",de({},He(ne(ne({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},Q6=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},U6=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=w.useRef(null),l=w.useRef(null),f=w.useState(Sf(a)),g=Ue(f,2),y=g[0],v=g[1],b=w.useMemo(function(){return{setPortalPlacement:v}},[]),p=w.useState(null),h=Ue(p,2),m=h[0],x=h[1],C=w.useCallback(function(){if(o){var T=O6(o),S=i==="fixed"?0:window.pageYOffset,L=T[y]+S;(L!==(m==null?void 0:m.offset)||T.left!==(m==null?void 0:m.rect.left)||T.width!==(m==null?void 0:m.rect.width))&&x({offset:L,rect:T})}},[o,i,y,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);Lc(function(){C()},[C]);var I=w.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=E6(o,c.current,C,{elementResize:"ResizeObserver"in window}))},[o,C]);Lc(function(){I()},[I]);var E=w.useCallback(function(T){c.current=T,I()},[I]);if(!n&&i!=="fixed"||!m)return null;var _=ie("div",de({ref:E},He(ne(ne({},t),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ie(Tf.Provider,{value:b},n?Re.createPortal(_,n):_)},K6=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},eC=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ie("div",de({},He(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},tC=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ne({alignItems:"center",display:o&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},nC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ie("div",de({},He(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},rC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},oC=function(t){var n=t.children,r=t.innerProps;return ie("div",de({},He(t,"indicatorsContainer",{indicators:!0}),r),n)},Lf,sC=["size"],aC=["innerProps","isRtl","size"];function iC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var cC=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */",toString:iC},Of=function(t){var n=t.size,r=Zt(t,sC);return ie("svg",de({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:cC},r))},Oc=function(t){return ie(Of,de({size:20},t),ie("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ff=function(t){return ie(Of,de({size:20},t),ie("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},kf=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ne({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},lC=kf,uC=function(t){var n=t.children,r=t.innerProps;return ie("div",de({},He(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ie(Ff,null))},dC=kf,fC=function(t){var n=t.children,r=t.innerProps;return ie("div",de({},He(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ie(Oc,null))},pC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ne({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},hC=function(t){var n=t.innerProps;return ie("span",de({},n,He(t,"indicatorSeparator",{"indicator-separator":!0})))},gC=c6(Lf||(Lf=l6([`
612
612
  0%, 80%, 100% { opacity: 0; }
613
613
  40% { opacity: 1; }
614
- `]))),hC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return ne({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:i*2})},kc=function(t){var n=t.delay,r=t.offset;return ce("span",{css:_c({animation:"".concat(pC," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},gC=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Ht(t,oC);return ce("div",de({},He(ne(ne({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ce(kc,{delay:0,offset:r}),ce(kc,{delay:160,offset:!0}),ce(kc,{delay:320,offset:!r}))},mC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return ne({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:o?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:o?a.primary:a.neutral30}})},bC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ce("div",de({ref:s},He(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},yC=bC,CC=["data"],xC=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},vC=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,l=t.label,f=t.theme,g=t.selectProps;return ce("div",de({},He(t,"group",{group:!0}),c),ce(a,de({},i,{selectProps:g,theme:f,getStyles:o,getClassNames:s,cx:r}),l),ce("div",null,n))},EC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ne({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},IC=function(t){var n=xf(t);n.data;var r=Ht(n,CC);return ce("div",de({},He(t,"groupHeading",{"group-heading":!0}),r))},wC=vC,_C=["innerRef","isDisabled","isHidden","inputClassName"],SC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return ne(ne({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},TC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},kf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},TC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ne({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},kf)},AC=function(t){return ne({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},kf)},LC=function(t){var n=t.cx,r=t.value,o=xf(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Ht(o,_C);return ce("div",de({},He(t,"input",{"input-container":!0}),{"data-value":r||""}),ce("input",de({className:n({input:!0},c),ref:s,style:AC(i),disabled:a},l)))},OC=LC,FC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return ne({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},kC=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return ne({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},DC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return ne({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Df=function(t){var n=t.children,r=t.innerProps;return ce("div",r,n)},NC=Df,RC=Df;function MC(e){var t=e.children,n=e.innerProps;return ce("div",de({role:"button"},n),t||ce(Fc,{size:14}))}var PC=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,l=r.Container,f=r.Label,g=r.Remove;return ce(l,{data:o,innerProps:ne(ne({},He(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ce(f,{data:o,innerProps:ne({},He(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ce(g,{data:o,innerProps:ne(ne({},He(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},jC=PC,BC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return ne({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(i.baseUnit*2,"px ").concat(i.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},VC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ce("div",de({},He(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},GC=VC,HC=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ne({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},WC=function(t){var n=t.children,r=t.innerProps;return ce("div",de({},He(t,"placeholder",{placeholder:!0}),r),n)},ZC=WC,XC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return ne({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},zC=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ce("div",de({},He(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},YC=zC,en={ClearIndicator:uC,Control:yC,DropdownIndicator:cC,DownChevron:Of,CrossIcon:Fc,Group:wC,GroupHeading:IC,IndicatorsContainer:nC,IndicatorSeparator:fC,Input:OC,LoadingIndicator:gC,Menu:H6,MenuList:Z6,MenuPortal:$6,LoadingMessage:J6,NoOptionsMessage:Y6,MultiValue:jC,MultiValueContainer:NC,MultiValueLabel:RC,MultiValueRemove:MC,Option:GC,Placeholder:ZC,SelectContainer:U6,SingleValue:YC,ValueContainer:eC},JC=function(t){return ne(ne({},en),t.components)},Nf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function qC(e,t){return!!(e===t||Nf(e)&&Nf(t))}function $C(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!qC(e[n],t[n]))return!1;return!0}function QC(e,t){t===void 0&&(t=$C);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}function UC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var KC=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:UC},e7=function(t){return ce("span",de({css:KC},t))},Rf=e7,t7={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,a=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,a=s===void 0?"":s,i=t.selectValue,c=t.isDisabled,l=t.isSelected,f=t.isAppleDevice,g=function(p,h){return p&&p.length?"".concat(p.indexOf(h)+1," of ").concat(p.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(g(i,r),".");if(n==="menu"&&f){var y=c?" disabled":"",v="".concat(l?" selected":"").concat(y);return"".concat(a).concat(v,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},n7=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,l=t.id,f=t.isAppleDevice,g=c.ariaLiveMessages,y=c.getOptionLabel,v=c.inputValue,b=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,x=c.options,C=c.screenReaderStatus,I=c.tabSelectsValue,E=c.isLoading,_=c["aria-label"],T=c["aria-live"],S=w.useMemo(function(){return ne(ne({},t7),g||{})},[g]),L=w.useMemo(function(){var z="";if(n&&S.onChange){var $=n.option,Q=n.options,X=n.removedValue,q=n.removedValues,oe=n.value,ie=function(se){return Array.isArray(se)?null:se},B=X||$||ie(oe),R=B?y(B):"",G=Q||q||void 0,H=G?G.map(y):[],J=ne({isDisabled:B&&p(B,i),label:R,labels:H},n);z=S.onChange(J)}return z},[n,S,p,i,y]),N=w.useMemo(function(){var z="",$=r||o,Q=!!(r&&i&&i.includes(r));if($&&S.onFocus){var X={focused:$,label:y($),isDisabled:p($,i),isSelected:Q,options:s,context:$===r?"menu":"value",selectValue:i,isAppleDevice:f};z=S.onFocus(X)}return z},[r,o,y,p,S,s,i,f]),k=w.useMemo(function(){var z="";if(m&&x.length&&!E&&S.onFilter){var $=C({count:s.length});z=S.onFilter({inputValue:v,resultsMessage:$})}return z},[s,v,m,S,x,C,E]),D=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var z="";if(S.guidance){var $=o?"value":m?"menu":"input";z=S.guidance({"aria-label":_,context:$,isDisabled:r&&p(r,i),isMulti:b,isSearchable:h,tabSelectsValue:I,isInitialFocus:D})}return z},[_,r,o,b,p,h,m,S,i,I,D]),V=ce(w.Fragment,null,ce("span",{id:"aria-selection"},L),ce("span",{id:"aria-focused"},N),ce("span",{id:"aria-results"},k),ce("span",{id:"aria-guidance"},P));return ce(w.Fragment,null,ce(Rf,{id:l},D&&V),ce(Rf,{"aria-live":T,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!D&&V))},r7=n7,Dc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],o7=new RegExp("["+Dc.map(function(e){return e.letters}).join("")+"]","g"),Mf={},Nc=0;Nc<Dc.length;Nc++)for(var Rc=Dc[Nc],Mc=0;Mc<Rc.letters.length;Mc++)Mf[Rc.letters[Mc]]=Rc.base;var Pf=function(t){return t.replace(o7,function(n){return Mf[n]})},s7=QC(Pf),jf=function(t){return t.replace(/^\s+|\s+$/g,"")},a7=function(t){return"".concat(t.label," ").concat(t.value)},i7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ne({ignoreCase:!0,ignoreAccents:!0,stringify:a7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?jf(r):r,g=c?jf(i(n)):i(n);return s&&(f=f.toLowerCase(),g=g.toLowerCase()),a&&(f=s7(f),g=Pf(g)),l==="start"?g.substr(0,f.length)===f:g.indexOf(f)>-1}},c7=["innerRef"];function l7(e){var t=e.innerRef,n=Ht(e,c7),r=N6(n,"onExited","in","enter","exit","appear");return ce("input",de({ref:t},r,{css:_c({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var u7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function d7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=w.useRef(!1),i=w.useRef(!1),c=w.useRef(0),l=w.useRef(null),f=w.useCallback(function(h,m){if(l.current!==null){var x=l.current,C=x.scrollTop,I=x.scrollHeight,E=x.clientHeight,_=l.current,T=m>0,S=I-E-C,L=!1;S>m&&a.current&&(r&&r(h),a.current=!1),T&&i.current&&(s&&s(h),i.current=!1),T&&m>S?(n&&!a.current&&n(h),_.scrollTop=I,L=!0,a.current=!0):!T&&-m>C&&(o&&!i.current&&o(h),_.scrollTop=0,L=!0,i.current=!0),L&&u7(h)}},[n,r,o,s]),g=w.useCallback(function(h){f(h,h.deltaY)},[f]),y=w.useCallback(function(h){c.current=h.changedTouches[0].clientY},[]),v=w.useCallback(function(h){var m=c.current-h.changedTouches[0].clientY;f(h,m)},[f]),b=w.useCallback(function(h){if(h){var m=F6?{passive:!1}:!1;h.addEventListener("wheel",g,m),h.addEventListener("touchstart",y,m),h.addEventListener("touchmove",v,m)}},[v,y,g]),p=w.useCallback(function(h){h&&(h.removeEventListener("wheel",g,!1),h.removeEventListener("touchstart",y,!1),h.removeEventListener("touchmove",v,!1))},[v,y,g]);return w.useEffect(function(){if(t){var h=l.current;return b(h),function(){p(h)}}},[t,b,p]),function(h){l.current=h}}var Bf=["boxSizing","height","overflow","paddingRight","position"],Vf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Gf(e){e.preventDefault()}function Hf(e){e.stopPropagation()}function Wf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Zf(){return"ontouchstart"in window||navigator.maxTouchPoints}var Xf=!!(typeof window<"u"&&window.document&&window.document.createElement),No=0,jr={capture:!1,passive:!1};function f7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=w.useRef({}),s=w.useRef(null),a=w.useCallback(function(c){if(Xf){var l=document.body,f=l&&l.style;if(r&&Bf.forEach(function(b){var p=f&&f[b];o.current[b]=p}),r&&No<1){var g=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,v=window.innerWidth-y+g||0;Object.keys(Vf).forEach(function(b){var p=Vf[b];f&&(f[b]=p)}),f&&(f.paddingRight="".concat(v,"px"))}l&&Zf()&&(l.addEventListener("touchmove",Gf,jr),c&&(c.addEventListener("touchstart",Wf,jr),c.addEventListener("touchmove",Hf,jr))),No+=1}},[r]),i=w.useCallback(function(c){if(Xf){var l=document.body,f=l&&l.style;No=Math.max(No-1,0),r&&No<1&&Bf.forEach(function(g){var y=o.current[g];f&&(f[g]=y)}),l&&Zf()&&(l.removeEventListener("touchmove",Gf,jr),c&&(c.removeEventListener("touchstart",Wf,jr),c.removeEventListener("touchmove",Hf,jr)))}},[r]);return w.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function p7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var h7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},g7=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:p7};function m7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,c=e.onTopLeave,l=d7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=f7({isEnabled:n}),g=function(v){l(v),f(v)};return ce(w.Fragment,null,n&&ce("div",{onClick:h7,css:g7}),t(g))}function b7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var y7=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:b7},C7=function(t){var n=t.name,r=t.onFocus;return ce("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:y7,value:"",onChange:function(){}})},x7=C7;function Pc(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function v7(){return Pc(/^iPhone/i)}function zf(){return Pc(/^Mac/i)}function E7(){return Pc(/^iPad/i)||zf()&&navigator.maxTouchPoints>1}function I7(){return v7()||E7()}function w7(){return zf()||I7()}var _7=function(t){return t.label},Yf=function(t){return t.label},Jf=function(t){return t.value},S7=function(t){return!!t.isDisabled},T7={clearIndicator:lC,container:Q6,control:mC,dropdownIndicator:iC,group:xC,groupHeading:EC,indicatorsContainer:tC,indicatorSeparator:dC,input:SC,loadingIndicator:hC,loadingMessage:z6,menu:B6,menuList:W6,menuPortal:q6,multiValue:FC,multiValueLabel:kC,multiValueRemove:DC,noOptionsMessage:X6,option:BC,placeholder:HC,singleValue:XC,valueContainer:K6},A7={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},L7=4,qf=4,O7=38,F7=qf*2,k7={baseUnit:qf,controlHeight:O7,menuGutter:F7},jc={borderRadius:L7,colors:A7,spacing:k7},D7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:If(),captureMenuScroll:!If(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:i7(),formatGroupLabel:_7,getOptionLabel:Yf,getOptionValue:Jf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:S7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!L6(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function $f(e,t,n,r){var o=t1(e,t,n),s=n1(e,t,n),a=e1(e,t),i=ua(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function la(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return $f(e,a,t,i)}).filter(function(a){return Kf(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=$f(e,n,t,r);return Kf(e,s)?s:void 0}).filter(k6)}function Qf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Nr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Uf(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Nr(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function N7(e,t){return Qf(la(e,t))}function Kf(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!o1(e)||!s)&&r1(e,{label:a,value:i,data:o},r)}function R7(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function M7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Bc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},e1=function(t,n){return t.getOptionLabel(n)},ua=function(t,n){return t.getOptionValue(n)};function t1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function n1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ua(e,t);return n.some(function(o){return ua(e,o)===r})}function r1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var o1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},P7=1,da=function(e){Qy(n,e);var t=e9(n);function n(r){var o;if(qy(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=w7(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,l){var f=o.props,g=f.onChange,y=f.name;l.name=y,o.ariaOnChange(c,l),g(c,l)},o.setValue=function(c,l,f){var g=o.props,y=g.closeMenuOnSelect,v=g.isMulti,b=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),y&&(o.setState({inputIsHiddenAfterUpdate:!v}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,g=l.isMulti,y=l.name,v=o.state.selectValue,b=g&&o.isOptionSelected(c,v),p=o.isOptionDisabled(c,v);if(b){var h=o.getOptionValue(c);o.setValue(v.filter(function(m){return o.getOptionValue(m)!==h}),"deselect-option",c)}else if(!p)g?o.setValue([].concat(Nr(v),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:y});return}f&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,f=o.state.selectValue,g=o.getOptionValue(c),y=f.filter(function(b){return o.getOptionValue(b)!==g}),v=Do(l,y,y[0]||null);o.onChange(v,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Do(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,l=o.state.selectValue,f=l[l.length-1],g=l.slice(0,l.length-1),y=Do(c,g,g[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return Bc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return Uf(la(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,l=new Array(c),f=0;f<c;f++)l[f]=arguments[f];return I6.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return e1(o.props,c)},o.getOptionValue=function(c){return ua(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,g=T7[c](l,f);g.boxSizing="border-box";var y=o.props.styles[c];return y?y(g,l):g},o.getClassNames=function(c,l){var f,g;return(f=(g=o.props.classNames)[c])===null||f===void 0?void 0:f.call(g,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return JC(o.props)},o.buildCategorizedOptions=function(){return la(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Qf(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:ne({value:c},l)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var l=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():l&&o.openMenu("first"):(l&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var l=o.props,f=l.isMulti,g=l.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&sa(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var l=c.touches,f=l&&l.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,f=l&&l.item(0);if(f){var g=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),v=5;o.userIsDragging=g>v||y>v}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:l}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var l=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:l}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var l=o.getFocusableOptions(),f=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return o1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,g=l.backspaceRemovesValue,y=l.escapeClearsValue,v=l.inputValue,b=l.isClearable,p=l.isDisabled,h=l.menuIsOpen,m=l.onKeyDown,x=l.tabSelectsValue,C=l.openMenuOnFocus,I=o.state,E=I.focusedOption,_=I.focusedValue,T=I.selectValue;if(!p&&!(typeof m=="function"&&(m(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||v)return;o.focusValue("previous");break;case"ArrowRight":if(!f||v)return;o.focusValue("next");break;case"Delete":case"Backspace":if(v)return;if(_)o.removeValue(_);else{if(!g)return;f?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!h||!x||!E||C&&o.isOptionSelected(E,T))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(h){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":h?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:v}),o.onMenuClose()):b&&y&&o.clearValue();break;case" ":if(v)return;if(!h){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":h?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":h?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!h)return;o.focusOption("pageup");break;case"PageDown":if(!h)return;o.focusOption("pagedown");break;case"Home":if(!h)return;o.focusOption("first");break;case"End":if(!h)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++P7),o.state.selectValue=oa(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),a=o.buildFocusableOptions(),i=a.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=a[i],o.state.focusedOptionId=Bc(s,a[i])}return o}return $y(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Ef(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,a=s.isDisabled,i=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&o.isDisabled||c&&i&&!o.menuIsOpen)&&this.focusInput(),c&&a&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!a&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Ef(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,a=this.state,i=a.selectValue,c=a.isFocused,l=this.buildFocusableOptions(),f=o==="first"?0:l.length-1;if(!this.props.isMulti){var g=l.indexOf(i[0]);g>-1&&(f=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[f],focusedOptionId:this.getFocusedOptionId(l[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(i);i||(c=-1);var l=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=l:f=c-1;break;case"next":c>-1&&c<l&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var c=0,l=i.indexOf(a);a||(l=-1),o==="up"?c=l>0?l-1:i.length-1:o==="down"?c=(l+1)%i.length:o==="pageup"?(c=l-s,c<0&&(c=0)):o==="pagedown"?(c=l+s,c>i.length-1&&(c=i.length-1)):o==="last"&&(c=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(jc):ne(ne({},jc),this.props.theme):jc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,f=this.setValue,g=this.props,y=g.isMulti,v=g.isRtl,b=g.options,p=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:p,isMulti:y,isRtl:v,options:b,selectOption:l,selectProps:g,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return t1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return n1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return r1(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,a=o.isSearchable,i=o.inputId,c=o.inputValue,l=o.tabIndex,f=o.form,g=o.menuIsOpen,y=o.required,v=this.getComponents(),b=v.Input,p=this.state,h=p.inputIsHidden,m=p.ariaSelection,x=this.commonProps,C=i||this.getElementId("input"),I=ne(ne(ne({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":y,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?A.createElement(b,de({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:s,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},I)):A.createElement(l7,de({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ra,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:f,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,f=s.SingleValue,g=s.Placeholder,y=this.commonProps,v=this.props,b=v.controlShouldRenderValue,p=v.isDisabled,h=v.isMulti,m=v.inputValue,x=v.placeholder,C=this.state,I=C.selectValue,E=C.focusedValue,_=C.isFocused;if(!this.hasValue()||!b)return m?null:A.createElement(g,de({},y,{key:"placeholder",isDisabled:p,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),x);if(h)return I.map(function(S,L){var N=S===E,k="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return A.createElement(a,de({},y,{components:{Container:i,Label:c,Remove:l},isFocused:N,isDisabled:p,key:k,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(P){P.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(m)return null;var T=I[0];return A.createElement(f,de({},y,{data:T,isDisabled:p}),this.formatOptionLabel(T,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:g,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!s||!l)return null;var g={"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:g,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return A.createElement(a,de({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:l,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,l=s.MenuList,f=s.MenuPortal,g=s.LoadingMessage,y=s.NoOptionsMessage,v=s.Option,b=this.commonProps,p=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,x=h.inputValue,C=h.isLoading,I=h.loadingMessage,E=h.minMenuHeight,_=h.maxMenuHeight,T=h.menuIsOpen,S=h.menuPlacement,L=h.menuPosition,N=h.menuPortalTarget,k=h.menuShouldBlockScroll,D=h.menuShouldScrollIntoView,P=h.noOptionsMessage,V=h.onMenuScrollToTop,z=h.onMenuScrollToBottom;if(!T)return null;var $=function(R,G){var H=R.type,J=R.data,re=R.isDisabled,se=R.isSelected,j=R.label,te=R.value,Ee=p===J,Z=re?void 0:function(){return o.onOptionHover(J)},Ve=re?void 0:function(){return o.selectOption(J)},Ne="".concat(o.getElementId("option"),"-").concat(G),Je={id:Ne,onClick:Ve,onMouseMove:Z,onMouseOver:Z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:se};return A.createElement(v,de({},b,{innerProps:Je,data:J,isDisabled:re,isSelected:se,key:Ne,label:j,type:H,value:te,isFocused:Ee,innerRef:Ee?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(R.data,"menu"))},Q;if(this.hasOptions())Q=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var R=B.data,G=B.options,H=B.index,J="".concat(o.getElementId("group"),"-").concat(H),re="".concat(J,"-heading");return A.createElement(a,de({},b,{key:J,data:R,options:G,Heading:i,headingProps:{id:re,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(se){return $(se,"".concat(H,"-").concat(se.index))}))}else if(B.type==="option")return $(B,"".concat(B.index))});else if(C){var X=I({inputValue:x});if(X===null)return null;Q=A.createElement(g,b,X)}else{var q=P({inputValue:x});if(q===null)return null;Q=A.createElement(y,b,q)}var oe={minMenuHeight:E,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:D},ie=A.createElement(V6,de({},b,oe),function(B){var R=B.ref,G=B.placerProps,H=G.placement,J=G.maxHeight;return A.createElement(c,de({},b,oe,{innerRef:R,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:C,placement:H}),A.createElement(m7,{captureEnabled:m,onTopArrive:V,onBottomArrive:z,lockEnabled:k},function(re){return A.createElement(l,de({},b,{innerRef:function(j){o.getMenuListRef(j),re(j)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:C,maxHeight:J,focusedOption:p}),Q)}))});return N||L==="fixed"?A.createElement(f,de({},b,{appendTo:N,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),ie):ie}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,f=s.required,g=this.state.selectValue;if(f&&!this.hasValue()&&!i)return A.createElement(x7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var y=g.map(function(p){return o.getOptionValue(p)}).join(a);return A.createElement("input",{name:l,type:"hidden",value:y})}else{var v=g.length>0?g.map(function(p,h){return A.createElement("input",{key:"i-".concat(h),name:l,type:"hidden",value:o.getOptionValue(p)})}):A.createElement("input",{name:l,type:"hidden",value:""});return A.createElement("div",null,v)}else{var b=g[0]?this.getOptionValue(g[0]):"";return A.createElement("input",{name:l,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,f=s.selectValue,g=this.getFocusableOptions();return A.createElement(r7,de({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,l=this.props,f=l.className,g=l.id,y=l.isDisabled,v=l.menuIsOpen,b=this.state.isFocused,p=this.commonProps=this.getCommonProps();return A.createElement(i,de({},p,{className:f,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:b}),this.renderLiveRegion(),A.createElement(s,de({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:b,menuIsOpen:v}),A.createElement(c,de({},p,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),A.createElement(a,de({},p,{isDisabled:y}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,f=s.isFocused,g=s.prevWasFocused,y=s.instancePrefix,v=o.options,b=o.value,p=o.menuIsOpen,h=o.inputValue,m=o.isMulti,x=oa(b),C={};if(a&&(b!==a.value||v!==a.options||p!==a.menuIsOpen||h!==a.inputValue)){var I=p?N7(o,x):[],E=p?Uf(la(o,x),"".concat(y,"-option")):[],_=i?R7(s,x):null,T=M7(s,I),S=Bc(E,T);C={selectValue:x,focusedOption:T,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},N=l,k=f&&g;return f&&!k&&(N={value:Do(m,x,x[0]||null),options:x,action:"initial-input-focus"},k=!g),(l==null?void 0:l.action)==="initial-input-focus"&&(N=null),ne(ne(ne({},C),L),{},{prevProps:o,ariaSelection:N,prevWasFocused:k})}}]),n}(w.Component);da.defaultProps=D7;var j7=w.forwardRef(function(e,t){var n=hc(e);return A.createElement(da,de({ref:t},n))}),B7=j7;const V7=d.styled(d.Box)`
614
+ `]))),mC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return ne({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:i*2})},Fc=function(t){var n=t.delay,r=t.offset;return ie("span",{css:wc({animation:"".concat(gC," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},bC=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Zt(t,aC);return ie("div",de({},He(ne(ne({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ie(Fc,{delay:0,offset:r}),ie(Fc,{delay:160,offset:!0}),ie(Fc,{delay:320,offset:!r}))},yC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return ne({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:o?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:o?a.primary:a.neutral30}})},CC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ie("div",de({ref:s},He(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},xC=CC,vC=["data"],EC=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},IC=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,l=t.label,f=t.theme,g=t.selectProps;return ie("div",de({},He(t,"group",{group:!0}),c),ie(a,de({},i,{selectProps:g,theme:f,getStyles:o,getClassNames:s,cx:r}),l),ie("div",null,n))},wC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ne({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},_C=function(t){var n=vf(t);n.data;var r=Zt(n,vC);return ie("div",de({},He(t,"groupHeading",{"group-heading":!0}),r))},SC=IC,TC=["innerRef","isDisabled","isHidden","inputClassName"],AC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return ne(ne({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},LC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},Df={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},LC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ne({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Df)},OC=function(t){return ne({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Df)},FC=function(t){var n=t.cx,r=t.value,o=vf(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Zt(o,TC);return ie("div",de({},He(t,"input",{"input-container":!0}),{"data-value":r||""}),ie("input",de({className:n({input:!0},c),ref:s,style:OC(i),disabled:a},l)))},kC=FC,DC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return ne({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},NC=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return ne({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},RC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return ne({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Nf=function(t){var n=t.children,r=t.innerProps;return ie("div",r,n)},MC=Nf,PC=Nf;function jC(e){var t=e.children,n=e.innerProps;return ie("div",de({role:"button"},n),t||ie(Oc,{size:14}))}var BC=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,l=r.Container,f=r.Label,g=r.Remove;return ie(l,{data:o,innerProps:ne(ne({},He(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ie(f,{data:o,innerProps:ne({},He(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ie(g,{data:o,innerProps:ne(ne({},He(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},VC=BC,GC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return ne({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(i.baseUnit*2,"px ").concat(i.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},HC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ie("div",de({},He(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},WC=HC,ZC=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ne({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},XC=function(t){var n=t.children,r=t.innerProps;return ie("div",de({},He(t,"placeholder",{placeholder:!0}),r),n)},zC=XC,YC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return ne({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},JC=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ie("div",de({},He(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},qC=JC,rn={ClearIndicator:fC,Control:xC,DropdownIndicator:uC,DownChevron:Ff,CrossIcon:Oc,Group:SC,GroupHeading:_C,IndicatorsContainer:oC,IndicatorSeparator:hC,Input:kC,LoadingIndicator:bC,Menu:Z6,MenuList:z6,MenuPortal:U6,LoadingMessage:$6,NoOptionsMessage:q6,MultiValue:VC,MultiValueContainer:MC,MultiValueLabel:PC,MultiValueRemove:jC,Option:WC,Placeholder:zC,SelectContainer:eC,SingleValue:qC,ValueContainer:nC},$C=function(t){return ne(ne({},rn),t.components)},Rf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function QC(e,t){return!!(e===t||Rf(e)&&Rf(t))}function UC(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!QC(e[n],t[n]))return!1;return!0}function KC(e,t){t===void 0&&(t=UC);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}function e7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var t7=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:e7},n7=function(t){return ie("span",de({css:t7},t))},Mf=n7,r7={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,a=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,a=s===void 0?"":s,i=t.selectValue,c=t.isDisabled,l=t.isSelected,f=t.isAppleDevice,g=function(p,h){return p&&p.length?"".concat(p.indexOf(h)+1," of ").concat(p.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(g(i,r),".");if(n==="menu"&&f){var y=c?" disabled":"",v="".concat(l?" selected":"").concat(y);return"".concat(a).concat(v,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},o7=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,l=t.id,f=t.isAppleDevice,g=c.ariaLiveMessages,y=c.getOptionLabel,v=c.inputValue,b=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,x=c.options,C=c.screenReaderStatus,I=c.tabSelectsValue,E=c.isLoading,_=c["aria-label"],T=c["aria-live"],S=w.useMemo(function(){return ne(ne({},r7),g||{})},[g]),L=w.useMemo(function(){var z="";if(n&&S.onChange){var q=n.option,$=n.options,X=n.removedValue,J=n.removedValues,oe=n.value,ae=function(se){return Array.isArray(se)?null:se},B=X||q||ae(oe),P=B?y(B):"",G=$||J||void 0,H=G?G.map(y):[],Y=ne({isDisabled:B&&p(B,i),label:P,labels:H},n);z=S.onChange(Y)}return z},[n,S,p,i,y]),N=w.useMemo(function(){var z="",q=r||o,$=!!(r&&i&&i.includes(r));if(q&&S.onFocus){var X={focused:q,label:y(q),isDisabled:p(q,i),isSelected:$,options:s,context:q===r?"menu":"value",selectValue:i,isAppleDevice:f};z=S.onFocus(X)}return z},[r,o,y,p,S,s,i,f]),k=w.useMemo(function(){var z="";if(m&&x.length&&!E&&S.onFilter){var q=C({count:s.length});z=S.onFilter({inputValue:v,resultsMessage:q})}return z},[s,v,m,S,x,C,E]),D=(n==null?void 0:n.action)==="initial-input-focus",M=w.useMemo(function(){var z="";if(S.guidance){var q=o?"value":m?"menu":"input";z=S.guidance({"aria-label":_,context:q,isDisabled:r&&p(r,i),isMulti:b,isSearchable:h,tabSelectsValue:I,isInitialFocus:D})}return z},[_,r,o,b,p,h,m,S,i,I,D]),V=ie(w.Fragment,null,ie("span",{id:"aria-selection"},L),ie("span",{id:"aria-focused"},N),ie("span",{id:"aria-results"},k),ie("span",{id:"aria-guidance"},M));return ie(w.Fragment,null,ie(Mf,{id:l},D&&V),ie(Mf,{"aria-live":T,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!D&&V))},s7=o7,kc=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],a7=new RegExp("["+kc.map(function(e){return e.letters}).join("")+"]","g"),Pf={},Dc=0;Dc<kc.length;Dc++)for(var Nc=kc[Dc],Rc=0;Rc<Nc.letters.length;Rc++)Pf[Nc.letters[Rc]]=Nc.base;var jf=function(t){return t.replace(a7,function(n){return Pf[n]})},i7=KC(jf),Bf=function(t){return t.replace(/^\s+|\s+$/g,"")},c7=function(t){return"".concat(t.label," ").concat(t.value)},l7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ne({ignoreCase:!0,ignoreAccents:!0,stringify:c7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?Bf(r):r,g=c?Bf(i(n)):i(n);return s&&(f=f.toLowerCase(),g=g.toLowerCase()),a&&(f=i7(f),g=jf(g)),l==="start"?g.substr(0,f.length)===f:g.indexOf(f)>-1}},u7=["innerRef"];function d7(e){var t=e.innerRef,n=Zt(e,u7),r=M6(n,"onExited","in","enter","exit","appear");return ie("input",de({ref:t},r,{css:wc({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process.env.NODE_ENV==="production"?"":";label:DummyInput;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgcmVtb3ZlUHJvcHMgfSBmcm9tICcuLi91dGlscyc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbm5lclJlZixcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snaW5wdXQnXSAmIHtcbiAgcmVhZG9ubHkgaW5uZXJSZWY6IFJlZjxIVE1MSW5wdXRFbGVtZW50Pjtcbn0pIHtcbiAgLy8gUmVtb3ZlIGFuaW1hdGlvbiBwcm9wcyBub3QgbWVhbnQgZm9yIEhUTUwgZWxlbWVudHNcbiAgY29uc3QgZmlsdGVyZWRQcm9wcyA9IHJlbW92ZVByb3BzKFxuICAgIHByb3BzLFxuICAgICdvbkV4aXRlZCcsXG4gICAgJ2luJyxcbiAgICAnZW50ZXInLFxuICAgICdleGl0JyxcbiAgICAnYXBwZWFyJ1xuICApO1xuXG4gIHJldHVybiAoXG4gICAgPGlucHV0XG4gICAgICByZWY9e2lubmVyUmVmfVxuICAgICAgey4uLmZpbHRlcmVkUHJvcHN9XG4gICAgICBjc3M9e3tcbiAgICAgICAgbGFiZWw6ICdkdW1teUlucHV0JyxcbiAgICAgICAgLy8gZ2V0IHJpZCBvZiBhbnkgZGVmYXVsdCBzdHlsZXNcbiAgICAgICAgYmFja2dyb3VuZDogMCxcbiAgICAgICAgYm9yZGVyOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHRoaXMgaGlkZXMgdGhlIGZsYXNoaW5nIGN1cnNvclxuICAgICAgICBjYXJldENvbG9yOiAndHJhbnNwYXJlbnQnLFxuICAgICAgICBmb250U2l6ZTogJ2luaGVyaXQnLFxuICAgICAgICBncmlkQXJlYTogJzEgLyAxIC8gMiAvIDMnLFxuICAgICAgICBvdXRsaW5lOiAwLFxuICAgICAgICBwYWRkaW5nOiAwLFxuICAgICAgICAvLyBpbXBvcnRhbnQhIHdpdGhvdXQgYHdpZHRoYCBicm93c2VycyB3b24ndCBhbGxvdyBmb2N1c1xuICAgICAgICB3aWR0aDogMSxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIGRlc2t0b3BcbiAgICAgICAgY29sb3I6ICd0cmFuc3BhcmVudCcsXG5cbiAgICAgICAgLy8gcmVtb3ZlIGN1cnNvciBvbiBtb2JpbGUgd2hpbHN0IG1haW50YWluaW5nIFwic2Nyb2xsIGludG8gdmlld1wiIGJlaGF2aW91clxuICAgICAgICBsZWZ0OiAtMTAwLFxuICAgICAgICBvcGFjaXR5OiAwLFxuICAgICAgICBwb3NpdGlvbjogJ3JlbGF0aXZlJyxcbiAgICAgICAgdHJhbnNmb3JtOiAnc2NhbGUoLjAxKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */")}))}var f7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function p7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=w.useRef(!1),i=w.useRef(!1),c=w.useRef(0),l=w.useRef(null),f=w.useCallback(function(h,m){if(l.current!==null){var x=l.current,C=x.scrollTop,I=x.scrollHeight,E=x.clientHeight,_=l.current,T=m>0,S=I-E-C,L=!1;S>m&&a.current&&(r&&r(h),a.current=!1),T&&i.current&&(s&&s(h),i.current=!1),T&&m>S?(n&&!a.current&&n(h),_.scrollTop=I,L=!0,a.current=!0):!T&&-m>C&&(o&&!i.current&&o(h),_.scrollTop=0,L=!0,i.current=!0),L&&f7(h)}},[n,r,o,s]),g=w.useCallback(function(h){f(h,h.deltaY)},[f]),y=w.useCallback(function(h){c.current=h.changedTouches[0].clientY},[]),v=w.useCallback(function(h){var m=c.current-h.changedTouches[0].clientY;f(h,m)},[f]),b=w.useCallback(function(h){if(h){var m=D6?{passive:!1}:!1;h.addEventListener("wheel",g,m),h.addEventListener("touchstart",y,m),h.addEventListener("touchmove",v,m)}},[v,y,g]),p=w.useCallback(function(h){h&&(h.removeEventListener("wheel",g,!1),h.removeEventListener("touchstart",y,!1),h.removeEventListener("touchmove",v,!1))},[v,y,g]);return w.useEffect(function(){if(t){var h=l.current;return b(h),function(){p(h)}}},[t,b,p]),function(h){l.current=h}}var Vf=["boxSizing","height","overflow","paddingRight","position"],Gf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Hf(e){e.preventDefault()}function Wf(e){e.stopPropagation()}function Zf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Xf(){return"ontouchstart"in window||navigator.maxTouchPoints}var zf=!!(typeof window<"u"&&window.document&&window.document.createElement),ko=0,Pr={capture:!1,passive:!1};function h7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=w.useRef({}),s=w.useRef(null),a=w.useCallback(function(c){if(zf){var l=document.body,f=l&&l.style;if(r&&Vf.forEach(function(b){var p=f&&f[b];o.current[b]=p}),r&&ko<1){var g=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,v=window.innerWidth-y+g||0;Object.keys(Gf).forEach(function(b){var p=Gf[b];f&&(f[b]=p)}),f&&(f.paddingRight="".concat(v,"px"))}l&&Xf()&&(l.addEventListener("touchmove",Hf,Pr),c&&(c.addEventListener("touchstart",Zf,Pr),c.addEventListener("touchmove",Wf,Pr))),ko+=1}},[r]),i=w.useCallback(function(c){if(zf){var l=document.body,f=l&&l.style;ko=Math.max(ko-1,0),r&&ko<1&&Vf.forEach(function(g){var y=o.current[g];f&&(f[g]=y)}),l&&Xf()&&(l.removeEventListener("touchmove",Hf,Pr),c&&(c.removeEventListener("touchstart",Zf,Pr),c.removeEventListener("touchmove",Wf,Pr)))}},[r]);return w.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function g7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var m7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},b7=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:g7};function y7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,c=e.onTopLeave,l=p7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=h7({isEnabled:n}),g=function(v){l(v),f(v)};return ie(w.Fragment,null,n&&ie("div",{onClick:m7,css:b7}),t(g))}function C7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var x7=process.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:C7},v7=function(t){var n=t.name,r=t.onFocus;return ie("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:x7,value:"",onChange:function(){}})},E7=v7;function Mc(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function I7(){return Mc(/^iPhone/i)}function Yf(){return Mc(/^Mac/i)}function w7(){return Mc(/^iPad/i)||Yf()&&navigator.maxTouchPoints>1}function _7(){return I7()||w7()}function S7(){return Yf()||_7()}var T7=function(t){return t.label},Jf=function(t){return t.label},qf=function(t){return t.value},A7=function(t){return!!t.isDisabled},L7={clearIndicator:dC,container:K6,control:yC,dropdownIndicator:lC,group:EC,groupHeading:wC,indicatorsContainer:rC,indicatorSeparator:pC,input:AC,loadingIndicator:mC,loadingMessage:J6,menu:G6,menuList:X6,menuPortal:Q6,multiValue:DC,multiValueLabel:NC,multiValueRemove:RC,noOptionsMessage:Y6,option:GC,placeholder:ZC,singleValue:YC,valueContainer:tC},O7={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},F7=4,$f=4,k7=38,D7=$f*2,N7={baseUnit:$f,controlHeight:k7,menuGutter:D7},Pc={borderRadius:F7,colors:O7,spacing:N7},R7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:wf(),captureMenuScroll:!wf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:l7(),formatGroupLabel:T7,getOptionLabel:Jf,getOptionValue:qf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:A7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!F6(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Qf(e,t,n,r){var o=n1(e,t,n),s=r1(e,t,n),a=t1(e,t),i=da(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function ua(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return Qf(e,a,t,i)}).filter(function(a){return e1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Qf(e,n,t,r);return e1(e,s)?s:void 0}).filter(N6)}function Uf(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Dr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Kf(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Dr(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function M7(e,t){return Uf(ua(e,t))}function e1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!s1(e)||!s)&&o1(e,{label:a,value:i,data:o},r)}function P7(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function j7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var jc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},t1=function(t,n){return t.getOptionLabel(n)},da=function(t,n){return t.getOptionValue(n)};function n1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function r1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=da(e,t);return n.some(function(o){return da(e,o)===r})}function o1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var s1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},B7=1,fa=function(e){Ky(n,e);var t=n9(n);function n(r){var o;if(Qy(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=S7(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,l){var f=o.props,g=f.onChange,y=f.name;l.name=y,o.ariaOnChange(c,l),g(c,l)},o.setValue=function(c,l,f){var g=o.props,y=g.closeMenuOnSelect,v=g.isMulti,b=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),y&&(o.setState({inputIsHiddenAfterUpdate:!v}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,g=l.isMulti,y=l.name,v=o.state.selectValue,b=g&&o.isOptionSelected(c,v),p=o.isOptionDisabled(c,v);if(b){var h=o.getOptionValue(c);o.setValue(v.filter(function(m){return o.getOptionValue(m)!==h}),"deselect-option",c)}else if(!p)g?o.setValue([].concat(Dr(v),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:y});return}f&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,f=o.state.selectValue,g=o.getOptionValue(c),y=f.filter(function(b){return o.getOptionValue(b)!==g}),v=Fo(l,y,y[0]||null);o.onChange(v,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Fo(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,l=o.state.selectValue,f=l[l.length-1],g=l.slice(0,l.length-1),y=Fo(c,g,g[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return jc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return Kf(ua(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,l=new Array(c),f=0;f<c;f++)l[f]=arguments[f];return _6.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return t1(o.props,c)},o.getOptionValue=function(c){return da(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,g=L7[c](l,f);g.boxSizing="border-box";var y=o.props.styles[c];return y?y(g,l):g},o.getClassNames=function(c,l){var f,g;return(f=(g=o.props.classNames)[c])===null||f===void 0?void 0:f.call(g,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return $C(o.props)},o.buildCategorizedOptions=function(){return ua(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return Uf(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:ne({value:c},l)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var l=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():l&&o.openMenu("first"):(l&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var l=o.props,f=l.isMulti,g=l.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&aa(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var l=c.touches,f=l&&l.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,f=l&&l.item(0);if(f){var g=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),v=5;o.userIsDragging=g>v||y>v}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:l}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var l=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:l}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var l=o.getFocusableOptions(),f=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return s1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,g=l.backspaceRemovesValue,y=l.escapeClearsValue,v=l.inputValue,b=l.isClearable,p=l.isDisabled,h=l.menuIsOpen,m=l.onKeyDown,x=l.tabSelectsValue,C=l.openMenuOnFocus,I=o.state,E=I.focusedOption,_=I.focusedValue,T=I.selectValue;if(!p&&!(typeof m=="function"&&(m(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||v)return;o.focusValue("previous");break;case"ArrowRight":if(!f||v)return;o.focusValue("next");break;case"Delete":case"Backspace":if(v)return;if(_)o.removeValue(_);else{if(!g)return;f?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!h||!x||!E||C&&o.isOptionSelected(E,T))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(h){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":h?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:v}),o.onMenuClose()):b&&y&&o.clearValue();break;case" ":if(v)return;if(!h){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":h?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":h?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!h)return;o.focusOption("pageup");break;case"PageDown":if(!h)return;o.focusOption("pagedown");break;case"Home":if(!h)return;o.focusOption("first");break;case"End":if(!h)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++B7),o.state.selectValue=sa(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),a=o.buildFocusableOptions(),i=a.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=a[i],o.state.focusedOptionId=jc(s,a[i])}return o}return Uy(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&If(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,a=s.isDisabled,i=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&o.isDisabled||c&&i&&!o.menuIsOpen)&&this.focusInput(),c&&a&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!a&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(If(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,a=this.state,i=a.selectValue,c=a.isFocused,l=this.buildFocusableOptions(),f=o==="first"?0:l.length-1;if(!this.props.isMulti){var g=l.indexOf(i[0]);g>-1&&(f=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[f],focusedOptionId:this.getFocusedOptionId(l[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(i);i||(c=-1);var l=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=l:f=c-1;break;case"next":c>-1&&c<l&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var c=0,l=i.indexOf(a);a||(l=-1),o==="up"?c=l>0?l-1:i.length-1:o==="down"?c=(l+1)%i.length:o==="pageup"?(c=l-s,c<0&&(c=0)):o==="pagedown"?(c=l+s,c>i.length-1&&(c=i.length-1)):o==="last"&&(c=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Pc):ne(ne({},Pc),this.props.theme):Pc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,f=this.setValue,g=this.props,y=g.isMulti,v=g.isRtl,b=g.options,p=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:p,isMulti:y,isRtl:v,options:b,selectOption:l,selectProps:g,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return n1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return r1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return o1(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,a=o.isSearchable,i=o.inputId,c=o.inputValue,l=o.tabIndex,f=o.form,g=o.menuIsOpen,y=o.required,v=this.getComponents(),b=v.Input,p=this.state,h=p.inputIsHidden,m=p.ariaSelection,x=this.commonProps,C=i||this.getElementId("input"),I=ne(ne(ne({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":y,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?A.createElement(b,de({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:s,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},I)):A.createElement(d7,de({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:oa,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:f,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,f=s.SingleValue,g=s.Placeholder,y=this.commonProps,v=this.props,b=v.controlShouldRenderValue,p=v.isDisabled,h=v.isMulti,m=v.inputValue,x=v.placeholder,C=this.state,I=C.selectValue,E=C.focusedValue,_=C.isFocused;if(!this.hasValue()||!b)return m?null:A.createElement(g,de({},y,{key:"placeholder",isDisabled:p,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),x);if(h)return I.map(function(S,L){var N=S===E,k="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return A.createElement(a,de({},y,{components:{Container:i,Label:c,Remove:l},isFocused:N,isDisabled:p,key:k,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(m)return null;var T=I[0];return A.createElement(f,de({},y,{data:T,isDisabled:p}),this.formatOptionLabel(T,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:g,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!s||!l)return null;var g={"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:g,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return A.createElement(a,de({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,de({},a,{innerProps:l,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,l=s.MenuList,f=s.MenuPortal,g=s.LoadingMessage,y=s.NoOptionsMessage,v=s.Option,b=this.commonProps,p=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,x=h.inputValue,C=h.isLoading,I=h.loadingMessage,E=h.minMenuHeight,_=h.maxMenuHeight,T=h.menuIsOpen,S=h.menuPlacement,L=h.menuPosition,N=h.menuPortalTarget,k=h.menuShouldBlockScroll,D=h.menuShouldScrollIntoView,M=h.noOptionsMessage,V=h.onMenuScrollToTop,z=h.onMenuScrollToBottom;if(!T)return null;var q=function(P,G){var H=P.type,Y=P.data,re=P.isDisabled,se=P.isSelected,j=P.label,te=P.value,Ee=p===Y,Z=re?void 0:function(){return o.onOptionHover(Y)},Ve=re?void 0:function(){return o.selectOption(Y)},Ne="".concat(o.getElementId("option"),"-").concat(G),Ke={id:Ne,onClick:Ve,onMouseMove:Z,onMouseOver:Z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:se};return A.createElement(v,de({},b,{innerProps:Ke,data:Y,isDisabled:re,isSelected:se,key:Ne,label:j,type:H,value:te,isFocused:Ee,innerRef:Ee?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(P.data,"menu"))},$;if(this.hasOptions())$=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var P=B.data,G=B.options,H=B.index,Y="".concat(o.getElementId("group"),"-").concat(H),re="".concat(Y,"-heading");return A.createElement(a,de({},b,{key:Y,data:P,options:G,Heading:i,headingProps:{id:re,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(se){return q(se,"".concat(H,"-").concat(se.index))}))}else if(B.type==="option")return q(B,"".concat(B.index))});else if(C){var X=I({inputValue:x});if(X===null)return null;$=A.createElement(g,b,X)}else{var J=M({inputValue:x});if(J===null)return null;$=A.createElement(y,b,J)}var oe={minMenuHeight:E,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:D},ae=A.createElement(H6,de({},b,oe),function(B){var P=B.ref,G=B.placerProps,H=G.placement,Y=G.maxHeight;return A.createElement(c,de({},b,oe,{innerRef:P,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:C,placement:H}),A.createElement(y7,{captureEnabled:m,onTopArrive:V,onBottomArrive:z,lockEnabled:k},function(re){return A.createElement(l,de({},b,{innerRef:function(j){o.getMenuListRef(j),re(j)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:C,maxHeight:Y,focusedOption:p}),$)}))});return N||L==="fixed"?A.createElement(f,de({},b,{appendTo:N,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),ae):ae}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,f=s.required,g=this.state.selectValue;if(f&&!this.hasValue()&&!i)return A.createElement(E7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var y=g.map(function(p){return o.getOptionValue(p)}).join(a);return A.createElement("input",{name:l,type:"hidden",value:y})}else{var v=g.length>0?g.map(function(p,h){return A.createElement("input",{key:"i-".concat(h),name:l,type:"hidden",value:o.getOptionValue(p)})}):A.createElement("input",{name:l,type:"hidden",value:""});return A.createElement("div",null,v)}else{var b=g[0]?this.getOptionValue(g[0]):"";return A.createElement("input",{name:l,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,f=s.selectValue,g=this.getFocusableOptions();return A.createElement(s7,de({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,l=this.props,f=l.className,g=l.id,y=l.isDisabled,v=l.menuIsOpen,b=this.state.isFocused,p=this.commonProps=this.getCommonProps();return A.createElement(i,de({},p,{className:f,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:b}),this.renderLiveRegion(),A.createElement(s,de({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:b,menuIsOpen:v}),A.createElement(c,de({},p,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),A.createElement(a,de({},p,{isDisabled:y}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,f=s.isFocused,g=s.prevWasFocused,y=s.instancePrefix,v=o.options,b=o.value,p=o.menuIsOpen,h=o.inputValue,m=o.isMulti,x=sa(b),C={};if(a&&(b!==a.value||v!==a.options||p!==a.menuIsOpen||h!==a.inputValue)){var I=p?M7(o,x):[],E=p?Kf(ua(o,x),"".concat(y,"-option")):[],_=i?P7(s,x):null,T=j7(s,I),S=jc(E,T);C={selectValue:x,focusedOption:T,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},N=l,k=f&&g;return f&&!k&&(N={value:Fo(m,x,x[0]||null),options:x,action:"initial-input-focus"},k=!g),(l==null?void 0:l.action)==="initial-input-focus"&&(N=null),ne(ne(ne({},C),L),{},{prevProps:o,ariaSelection:N,prevWasFocused:k})}}]),n}(w.Component);fa.defaultProps=R7;var V7=w.forwardRef(function(e,t){var n=pc(e);return A.createElement(fa,de({ref:t},n))}),G7=V7;const H7=d.styled(d.Box)`
615
615
  display: flex;
616
616
  align-items: center;
617
617
  gap: 2px;
@@ -622,12 +622,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
622
622
  max-width: 100%;
623
623
  overflow-wrap: break-word;
624
624
  }
625
- `,G7=d.styled("img")`
625
+ `,W7=d.styled("img")`
626
626
  width: 24px;
627
627
  height: 24px;
628
628
  border-radius: 50%;
629
629
  margin-right: 12px;
630
- `;function s1(e){const{data:t}=e;return u.jsx(en.Option,{...e,children:u.jsxs(V7,{children:[t.avatarUrl?u.jsx(G7,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,u.jsx("span",{children:e.children})]})})}const H7=d.styled(d.Box)`
630
+ `;function a1(e){const{data:t}=e;return u.jsx(rn.Option,{...e,children:u.jsxs(H7,{children:[t.avatarUrl?u.jsx(W7,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,u.jsx("span",{children:e.children})]})})}const Z7=d.styled(d.Box)`
631
631
  height: 24px;
632
632
  width: 24px;
633
633
  border-radius: 50%;
@@ -652,34 +652,34 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
652
652
  &:after {
653
653
  transform: rotate(-45deg);
654
654
  }
655
- `,a1=e=>u.jsx(en.ClearIndicator,{...e,children:u.jsx(H7,{})}),i1=(e,t)=>({...e,placeholder:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.placeholder)==null?void 0:o.call(e,n,r),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},control:(n,r)=>{var o;return{...n,backgroundColor:"transparent",...(o=e==null?void 0:e.control)==null?void 0:o.call(e,n,r)}},...t?{menuPortal:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.menuPortal)==null?void 0:o.call(e,n,r),zIndex:t,fontFamily:d.theme.typography.fontFamily,fontSize:"13px"}}}:null}),W7=d.styled(d.Stack)`
655
+ `,i1=e=>u.jsx(rn.ClearIndicator,{...e,children:u.jsx(Z7,{})}),c1=(e,t)=>({...e,placeholder:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.placeholder)==null?void 0:o.call(e,n,r),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},control:(n,r)=>{var o;return{...n,backgroundColor:"transparent",...(o=e==null?void 0:e.control)==null?void 0:o.call(e,n,r)}},...t?{menuPortal:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.menuPortal)==null?void 0:o.call(e,n,r),zIndex:t,fontFamily:d.theme.typography.fontFamily,fontSize:"13px"}}}:null}),X7=d.styled(d.Stack)`
656
656
  width: 0;
657
657
  height: 0;
658
- `,Z7=({root:e,rootMargin:t,callback:n})=>{const r=w.useRef(null),o=w.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const a=new IntersectionObserver(i=>{const c=i[0];n(c)},{root:e,rootMargin:t});a.observe(s),r.current=a},[e,t,n]);return u.jsx(W7,{ref:o})},c1=({options:e,isMulti:t,isScrollTarget:n})=>{const r=w.useRef(),o=w.useMemo(()=>e?Object.fromEntries(e.map(i=>[i.value,i])):{},[e]);return{optionsMap:o,getValue:i=>{var f;if(t||typeof i=="object")return i;const c=o[i];return c&&(r.current=c),i===((f=r.current)==null?void 0:f.value)?r.current:i},closeMenuOnScroll:n?i=>{const c=i.target;return!n||!c?!1:n(c)}:void 0}},X7=e=>u.jsx(en.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})}),l1=()=>({ClearIndicator:a1,DropdownIndicator:X7,IndicatorSeparator:()=>null,Option:s1}),Ro=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=w.useState(!1),c=w.useCallback(g=>{i(!g.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=c1({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(Z7,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(B7,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:i1(n.styles,e),components:n.components?n.components:l1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};Ro.getDefaultComponents=l1;const u1="Required Field",z7="Validation Failed";var d1=(e=>(e.DATE="DD/MM/YYYY",e))(d1||{}),Y7=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function f1(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var a=e.isLoading,i=a===void 0?!1:a,c=e.onInputChange,l=e.filterOption,f=l===void 0?null:l,g=Ht(e,Y7),y=g.inputValue,v=w.useRef(void 0),b=w.useRef(!1),p=w.useState(Array.isArray(n)?n:void 0),h=Ue(p,2),m=h[0],x=h[1],C=w.useState(typeof y<"u"?y:""),I=Ue(C,2),E=I[0],_=I[1],T=w.useState(n===!0),S=Ue(T,2),L=S[0],N=S[1],k=w.useState(void 0),D=Ue(k,2),P=D[0],V=D[1],z=w.useState([]),$=Ue(z,2),Q=$[0],X=$[1],q=w.useState(!1),oe=Ue(q,2),ie=oe[0],B=oe[1],R=w.useState({}),G=Ue(R,2),H=G[0],J=G[1],re=w.useState(void 0),se=Ue(re,2),j=se[0],te=se[1],Ee=w.useState(void 0),Z=Ue(Ee,2),Ve=Z[0],Ne=Z[1];o!==Ve&&(J({}),Ne(o)),n!==j&&(x(Array.isArray(n)?n:void 0),te(n)),w.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var Je=w.useCallback(function(xt,Ke){if(!s)return Ke();var Qe=s(xt,Ke);Qe&&typeof Qe.then=="function"&&Qe.then(Ke,function(){return Ke()})},[s]);w.useEffect(function(){n===!0&&Je(E,function(xt){b.current&&(x(xt||[]),N(!!v.current))})},[]);var at=w.useCallback(function(xt,Ke){var Qe=w6(xt,Ke,c);if(!Qe){v.current=void 0,_(""),V(""),X([]),N(!1),B(!1);return}if(o&&H[Qe])_(Qe),V(Qe),X(H[Qe]),N(!1),B(!1);else{var jn=v.current={};_(Qe),N(!0),B(!P),Je(Qe,function(zt){b&&jn===v.current&&(v.current=void 0,N(!1),V(Qe),X(zt||[]),B(!1),J(zt?ne(ne({},H),{},Dr({},Qe,zt)):H))})}},[o,Je,P,H,c]),cn=ie?[]:E&&P?Q:m||[];return ne(ne({},g),{},{options:cn,isLoading:L||i,onInputChange:at,filterOption:f})}var J7=w.forwardRef(function(e,t){var n=f1(e),r=hc(n);return A.createElement(da,de({ref:t},r))}),q7=J7,$7=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],p1=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return s===o||a===o},Vc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return p1(t,s,o)})||r.some(function(s){return p1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function Q7(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,s=e.formatCreateLabel,a=s===void 0?Vc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Vc.isValidNewOption:i,l=e.getNewOptionData,f=l===void 0?Vc.getNewOptionData:l,g=e.onCreateOption,y=e.options,v=y===void 0?[]:y,b=e.onChange,p=Ht(e,$7),h=p.getOptionValue,m=h===void 0?Jf:h,x=p.getOptionLabel,C=x===void 0?Yf:x,I=p.inputValue,E=p.isLoading,_=p.isMulti,T=p.value,S=p.name,L=w.useMemo(function(){return c(I,oa(T),v,{getOptionValue:m,getOptionLabel:C})?f(I,a(I)):void 0},[a,f,C,m,I,c,v,T]),N=w.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat(Nr(v)):[].concat(Nr(v),[L]):v},[n,o,E,L,v]),k=w.useCallback(function(D,P){if(P.action!=="select-option")return b(D,P);var V=Array.isArray(D)?D:[D];if(V[V.length-1]===L){if(g)g(I);else{var z=f(I,I),$={action:"create-option",name:S,option:z};b(Do(_,[].concat(Nr(oa(T)),[z]),z),$)}return}b(D,P)},[f,I,_,S,L,g,b,T]);return ne(ne({},p),{},{options:N,onChange:k})}var U7=w.forwardRef(function(e,t){var n=f1(e),r=hc(n),o=Q7(r);return A.createElement(da,de({ref:t},o))}),K7=U7;const e8=d.styled(d.Typography)`
658
+ `,z7=({root:e,rootMargin:t,callback:n})=>{const r=w.useRef(null),o=w.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const a=new IntersectionObserver(i=>{const c=i[0];n(c)},{root:e,rootMargin:t});a.observe(s),r.current=a},[e,t,n]);return u.jsx(X7,{ref:o})},l1=({options:e,isMulti:t,isScrollTarget:n})=>{const r=w.useRef(),o=w.useMemo(()=>e?Object.fromEntries(e.map(i=>[i.value,i])):{},[e]);return{optionsMap:o,getValue:i=>{var f;if(t||typeof i=="object")return i;const c=o[i];return c&&(r.current=c),i===((f=r.current)==null?void 0:f.value)?r.current:i},closeMenuOnScroll:n?i=>{const c=i.target;return!n||!c?!1:n(c)}:void 0}},Y7=e=>u.jsx(rn.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})}),u1=()=>({ClearIndicator:i1,DropdownIndicator:Y7,IndicatorSeparator:()=>null,Option:a1}),Do=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=w.useState(!1),c=w.useCallback(g=>{i(!g.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=l1({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(z7,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(G7,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:c1(n.styles,e),components:n.components?n.components:u1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};Do.getDefaultComponents=u1;const d1="Required Field",J7="Validation Failed";var f1=(e=>(e.DATE="DD/MM/YYYY",e))(f1||{}),q7=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function p1(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var a=e.isLoading,i=a===void 0?!1:a,c=e.onInputChange,l=e.filterOption,f=l===void 0?null:l,g=Zt(e,q7),y=g.inputValue,v=w.useRef(void 0),b=w.useRef(!1),p=w.useState(Array.isArray(n)?n:void 0),h=Ue(p,2),m=h[0],x=h[1],C=w.useState(typeof y<"u"?y:""),I=Ue(C,2),E=I[0],_=I[1],T=w.useState(n===!0),S=Ue(T,2),L=S[0],N=S[1],k=w.useState(void 0),D=Ue(k,2),M=D[0],V=D[1],z=w.useState([]),q=Ue(z,2),$=q[0],X=q[1],J=w.useState(!1),oe=Ue(J,2),ae=oe[0],B=oe[1],P=w.useState({}),G=Ue(P,2),H=G[0],Y=G[1],re=w.useState(void 0),se=Ue(re,2),j=se[0],te=se[1],Ee=w.useState(void 0),Z=Ue(Ee,2),Ve=Z[0],Ne=Z[1];o!==Ve&&(Y({}),Ne(o)),n!==j&&(x(Array.isArray(n)?n:void 0),te(n)),w.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var Ke=w.useCallback(function(vt,at){if(!s)return at();var Je=s(vt,at);Je&&typeof Je.then=="function"&&Je.then(at,function(){return at()})},[s]);w.useEffect(function(){n===!0&&Ke(E,function(vt){b.current&&(x(vt||[]),N(!!v.current))})},[]);var rt=w.useCallback(function(vt,at){var Je=S6(vt,at,c);if(!Je){v.current=void 0,_(""),V(""),X([]),N(!1),B(!1);return}if(o&&H[Je])_(Je),V(Je),X(H[Je]),N(!1),B(!1);else{var gr=v.current={};_(Je),N(!0),B(!M),Ke(Je,function(ut){b&&gr===v.current&&(v.current=void 0,N(!1),V(Je),X(ut||[]),B(!1),Y(ut?ne(ne({},H),{},kr({},Je,ut)):H))})}},[o,Ke,M,H,c]),Jt=ae?[]:E&&M?$:m||[];return ne(ne({},g),{},{options:Jt,isLoading:L||i,onInputChange:rt,filterOption:f})}var $7=w.forwardRef(function(e,t){var n=p1(e),r=pc(n);return A.createElement(fa,de({ref:t},r))}),Q7=$7,U7=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],h1=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=String(t).toLowerCase(),s=String(r.getOptionValue(n)).toLowerCase(),a=String(r.getOptionLabel(n)).toLowerCase();return s===o||a===o},Bc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return h1(t,s,o)})||r.some(function(s){return h1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function K7(e){var t=e.allowCreateWhileLoading,n=t===void 0?!1:t,r=e.createOptionPosition,o=r===void 0?"last":r,s=e.formatCreateLabel,a=s===void 0?Bc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Bc.isValidNewOption:i,l=e.getNewOptionData,f=l===void 0?Bc.getNewOptionData:l,g=e.onCreateOption,y=e.options,v=y===void 0?[]:y,b=e.onChange,p=Zt(e,U7),h=p.getOptionValue,m=h===void 0?qf:h,x=p.getOptionLabel,C=x===void 0?Jf:x,I=p.inputValue,E=p.isLoading,_=p.isMulti,T=p.value,S=p.name,L=w.useMemo(function(){return c(I,sa(T),v,{getOptionValue:m,getOptionLabel:C})?f(I,a(I)):void 0},[a,f,C,m,I,c,v,T]),N=w.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat(Dr(v)):[].concat(Dr(v),[L]):v},[n,o,E,L,v]),k=w.useCallback(function(D,M){if(M.action!=="select-option")return b(D,M);var V=Array.isArray(D)?D:[D];if(V[V.length-1]===L){if(g)g(I);else{var z=f(I,I),q={action:"create-option",name:S,option:z};b(Fo(_,[].concat(Dr(sa(T)),[z]),z),q)}return}b(D,M)},[f,I,_,S,L,g,b,T]);return ne(ne({},p),{},{options:N,onChange:k})}var e8=w.forwardRef(function(e,t){var n=p1(e),r=pc(n),o=K7(r);return A.createElement(fa,de({ref:t},o))}),t8=e8;const n8=d.styled(d.Typography)`
659
659
  display: block;
660
660
  white-space: nowrap;
661
661
  overflow: hidden;
662
662
  text-overflow: ellipsis;
663
- `,t8=(e,t)=>{const n=w.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},h1=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function n8(e){return u.jsx(en.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})})}const r8=e=>u.jsxs(d.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[u.jsx(d.Stack,{flexShrink:0,children:u.jsx(h1,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),u.jsxs(e8,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function o8({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=w.useState([]),[s,a]=w.useState(""),[i,c]=w.useState(!1),l=w.useRef(),{isMulti:f,createOption:g,loadOptions:y,isApiSearchEnabled:v=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:p=!1}=n,{getValue:h,closeMenuOnScroll:m}=c1({options:r,isMulti:f,isScrollTarget:t}),x=(P,V,z)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,y==null?void 0:y(P,V,z,l.current)),C=t8((P,V)=>{if(a(P),r.length>0&&!v){const $=r.filter(Q=>Q&&typeof Q=="object"&&"label"in Q&&typeof Q.label=="string"?Q.label.toLowerCase().includes(P.toLowerCase()):!1);V($);return}const z=$=>{V($),o($)};x==null||x(P,z,!1)},300),I=(P,V)=>{c(!1),!(V&&"isError"in V&&V.isError)&&o(P)},E=P=>{var V;(V=n.onMenuScrollToBottom)==null||V.call(n,P),b&&y&&!i&&(c(!0),x(s,I,!0))},_=(P,V)=>{var z;(z=n.onInputChange)==null||z.call(n,P,V),V.action==="input-change"&&v&&(a(P),o([]),P||(c(!0),C(P,I)))},T=P=>{var V;a(""),(V=n.onBlur)==null||V.call(n,P)},S=P=>{var V;(V=n.onFocus)==null||V.call(n,P),!i&&p&&(o([]),c(!0),x==null||x(s,I,!1))},L=P=>V=>{var $;const z=V.find(Q=>Q.label===P);!n.isMulti&&z&&(($=n.onChange)==null||$.call(n,z,{action:"select-option",name:n.name,option:z})),o(V),c(!1)},N=P=>{c(!0),g==null||g(P,L(P))},k=()=>{c(!0),x==null||x(s,I,!1)},D=g?K7:q7;return u.jsx(D,{...n,menuShouldScrollIntoView:!1,value:n.value?h(n.value):null,isDisabled:n.disabled,loadOptions:C,onMenuScrollToBottom:E,onInputChange:_,onBlur:T,onFocus:S,onMenuOpen:k,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:i1(n.styles,e),components:{ClearIndicator:a1,DropdownIndicator:n8,IndicatorSeparator:()=>null,Option:s1},closeMenuOnScroll:m,...g?{formatCreateLabel:r8,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:N,options:r}:null})}const Br="table-cell-form-field",fa="60px",pa="24px",s8=d.styled(d.Box)`
663
+ `,r8=(e,t)=>{const n=w.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},g1=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function o8(e){return u.jsx(rn.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})})}const s8=e=>u.jsxs(d.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[u.jsx(d.Stack,{flexShrink:0,children:u.jsx(g1,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),u.jsxs(n8,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function a8({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=w.useState([]),[s,a]=w.useState(""),[i,c]=w.useState(!1),l=w.useRef(),{isMulti:f,createOption:g,loadOptions:y,isApiSearchEnabled:v=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:p=!1}=n,{getValue:h,closeMenuOnScroll:m}=l1({options:r,isMulti:f,isScrollTarget:t}),x=(M,V,z)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,y==null?void 0:y(M,V,z,l.current)),C=r8((M,V)=>{if(a(M),r.length>0&&!v){const q=r.filter($=>$&&typeof $=="object"&&"label"in $&&typeof $.label=="string"?$.label.toLowerCase().includes(M.toLowerCase()):!1);V(q);return}const z=q=>{V(q),o(q)};x==null||x(M,z,!1)},300),I=(M,V)=>{c(!1),!(V&&"isError"in V&&V.isError)&&o(M)},E=M=>{var V;(V=n.onMenuScrollToBottom)==null||V.call(n,M),b&&y&&!i&&(c(!0),x(s,I,!0))},_=(M,V)=>{var z;(z=n.onInputChange)==null||z.call(n,M,V),V.action==="input-change"&&v&&(a(M),o([]),M||(c(!0),C(M,I)))},T=M=>{var V;a(""),(V=n.onBlur)==null||V.call(n,M)},S=M=>{var V;(V=n.onFocus)==null||V.call(n,M),!i&&p&&(o([]),c(!0),x==null||x(s,I,!1))},L=M=>V=>{var q;const z=V.find($=>$.label===M);!n.isMulti&&z&&((q=n.onChange)==null||q.call(n,z,{action:"select-option",name:n.name,option:z})),o(V),c(!1)},N=M=>{c(!0),g==null||g(M,L(M))},k=()=>{c(!0),x==null||x(s,I,!1)},D=g?t8:Q7;return u.jsx(D,{...n,menuShouldScrollIntoView:!1,value:n.value?h(n.value):null,isDisabled:n.disabled,loadOptions:C,onMenuScrollToBottom:E,onInputChange:_,onBlur:T,onFocus:S,onMenuOpen:k,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:c1(n.styles,e),components:{ClearIndicator:i1,DropdownIndicator:o8,IndicatorSeparator:()=>null,Option:a1},closeMenuOnScroll:m,...g?{formatCreateLabel:s8,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:N,options:r}:null})}const jr="table-cell-form-field",pa="60px",ha="24px",i8=d.styled(d.Box)`
664
664
  width: 100%;
665
- `,a8=d.styled(d.Box)`
665
+ `,c8=d.styled(d.Box)`
666
666
  width: 100%;
667
667
  overflow-x: auto;
668
- `,i8=d.styled(d.Box)`
668
+ `,l8=d.styled(d.Box)`
669
669
  --border-color: rgb(214, 221, 232);
670
670
  --border-size: 1px;
671
671
  display: grid;
672
672
  grid-template-columns: ${({gridColumns:e})=>e};
673
673
  border: 1px solid var(--border-color);
674
674
  border-radius; 4px;
675
- `,c8=d.styled(d.Stack)`
675
+ `,u8=d.styled(d.Stack)`
676
676
  margin-top: 16px;
677
677
  flex-direction: row;
678
678
  justify-content: space-between;
679
679
  &:empty {
680
680
  margin-top: 0;
681
681
  }
682
- `,g1=d.styled(d.Box)`
682
+ `,m1=d.styled(d.Box)`
683
683
  --cell-padding: 0;
684
684
  display: grid;
685
685
  grid-template-columns: subgrid;
@@ -688,10 +688,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
688
688
  &:last-child {
689
689
  border-bottom: 0;
690
690
  }
691
- `,l8=d.styled(g1)`
692
- --cell-padding: 10px ${pa};
691
+ `,d8=d.styled(m1)`
692
+ --cell-padding: 10px ${ha};
693
693
  border-bottom: 1px solid var(--border-color);
694
- `,Gc=d.styled(d.Box)`
694
+ `,Vc=d.styled(d.Box)`
695
695
  border: var(--border-size) solid transparent;
696
696
  border-right: var(--border-size) solid var(--border-color);
697
697
  padding: var(--cell-padding, 0);
@@ -699,7 +699,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
699
699
  border-right: var(--border-size) solid transparent;
700
700
  }
701
701
  ${({hasError:e})=>e?"border: var(--border-size) solid #CD3746;":""}
702
- `,m1=d.styled(d.Button)`
702
+ `,b1=d.styled(d.Button)`
703
703
  padding: 0;
704
704
  margin: 0;
705
705
  outline: 0;
@@ -718,7 +718,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
718
718
  width: 100%;
719
719
  height: 100%;
720
720
  }
721
- `,u8=d.styled(m1)`
721
+ `,f8=d.styled(b1)`
722
722
  box-sizing: content-box;
723
723
  padding: 4px 12px;
724
724
  color: rgb(80, 109, 255);
@@ -740,9 +740,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
740
740
  width: 20px;
741
741
  height: 20px;
742
742
  }
743
- `,d8=d.styled(d.Box)`
743
+ `,p8=d.styled(d.Box)`
744
744
  margin-left: auto;
745
- `,f8=d.styled(d.Stack)`
745
+ `,h8=d.styled(d.Stack)`
746
746
  box-sizing: content-box;
747
747
  padding: 4px 0;
748
748
  flex-direction: row;
@@ -752,31 +752,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
752
752
  min-height: 28px;
753
753
  color: ${d.theme.palette.gray.gray1};
754
754
  font-weight: bold;
755
- `,p8=d.styled(d.DatePicker)`
756
- &.${Br} .MuiInputBase-root {
757
- height: ${fa};
755
+ `,g8=d.styled(d.DatePicker)`
756
+ &.${jr} .MuiInputBase-root {
757
+ height: ${pa};
758
758
  border: 0;
759
- padding-left: ${pa};
759
+ padding-left: ${ha};
760
760
  }
761
- `;function h8(e){const[t,n]=w.useState(!1),r=w.useRef(null);w.useEffect(()=>{t&&r.current&&r.current.focus()},[t]);const o=(s,a)=>{s===null&&e.onChange(s,a),s&&typeof s.getTime=="function"&&!isNaN(s.getTime())&&e.onChange(s,a),e.onChange(s,a)};return u.jsx(p8,{inputFormat:e.inputFormat?e.inputFormat:d1.DATE,...e,value:e.value||null,open:t,onOpen:()=>n(!0),onClose:()=>n(!1),onChange:o,PopperProps:{anchorEl:r.current},renderInput:s=>u.jsx(d.DateTextField,{...s,fullWidth:!0,variant:"outlined",disabled:e.disabled,inputRef:r,inputProps:{...s.inputProps,placeholder:e.placeholder},onBlur:e.onBlur,onFocus:e.onFocus,InputProps:{endAdornment:u.jsx(d.InputAdornment,{position:"end",sx:{cursor:"pointer"},children:u.jsx(d.icons.CalendarTodayOutlinedIcon,{})})},onClick:()=>{t||n(!0)}})})}const g8=d.styled(d.Checkbox)`
762
- &.${Br} {
763
- --v-margin: calc((${fa} - 36px) / 2);
761
+ `;function m8(e){const[t,n]=w.useState(!1),r=w.useRef(null);w.useEffect(()=>{t&&r.current&&r.current.focus()},[t]);const o=(s,a)=>{s===null&&e.onChange(s,a),s&&typeof s.getTime=="function"&&!isNaN(s.getTime())&&e.onChange(s,a),e.onChange(s,a)};return u.jsx(g8,{inputFormat:e.inputFormat?e.inputFormat:f1.DATE,...e,value:e.value||null,open:t,onOpen:()=>n(!0),onClose:()=>n(!1),onChange:o,PopperProps:{anchorEl:r.current},renderInput:s=>u.jsx(d.DateTextField,{...s,fullWidth:!0,variant:"outlined",disabled:e.disabled,inputRef:r,inputProps:{...s.inputProps,placeholder:e.placeholder},onBlur:e.onBlur,onFocus:e.onFocus,InputProps:{endAdornment:u.jsx(d.InputAdornment,{position:"end",sx:{cursor:"pointer"},children:u.jsx(d.icons.CalendarTodayOutlinedIcon,{})})},onClick:()=>{t||n(!0)}})})}const b8=d.styled(d.Checkbox)`
762
+ &.${jr} {
763
+ --v-margin: calc((${pa} - 36px) / 2);
764
764
  --h-margin: calc((100% - 36px) / 2);
765
765
  margin: var(--v-margin) var(--h-margin);
766
766
  }
767
- `,m8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(g8,{onChange:o,onFocus:t,onBlur:n,...r})},b1=({label:e,isRequired:t,prefixNode:n,...r})=>e?u.jsxs(d.Typography,{variant:"h4",component:"label",color:d.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?u.jsx("span",{className:"required__star",children:"*"}):null]}):null,b8=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"})),y1=250,or="__id",Mo={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:y1,arithmeticOperation:[]},ha=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=Mo.defaultNumberOfRows,fixedRows:a=Mo.fixedRows,cellWidth:i=Mo.cellWidth,arithmeticOperation:c=Mo.arithmeticOperation}=Mo,fetchConfig:l={},createConfig:f={},stackIndex:g,onChange:y=()=>{},onFocus:v,onValidationError:b})=>{const p=t??[],h=(o==null?void 0:o.validations)??{},m=w.useRef(),x=w.useRef({}),[C,I]=w.useState({}),{colsLength:E,colsTemplate:_,colWidth:T}=w.useMemo(()=>{let B=0,R="";for(const G of r){let H=G.cols?Number(G.cols):1;isNaN(H)&&(H=1),B+=H,R+=`${G.cols??H}fr `}return a||(B+=.5,R+="0.5fr"),{colsLength:B,colsTemplate:R.trim(),colWidth:`${isNaN(i)?y1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=w.useMemo(()=>{const B={},R={};for(const G of r){if(!G.valueConfig)continue;R[G.name]=G.valueConfig;const H=G.valueConfig.columnNames;for(const J of H)B[J]||(B[J]=[]),B[J].push(G.name)}return{fieldDependency:B,fieldConfigs:R}},[r]);w.useEffect(()=>{if(t)return;const B=[];for(let R=0;R<s;R++){const G=M0();B.push({[or]:G})}y(B)},[t,y,s]);const N=()=>{const B=Object.entries(x.current).filter(R=>!!R[1])[0];return(B==null?void 0:B[1])??""},k=()=>{const B={[or]:M0()};y([...p,B])},D=B=>{const R=p.filter(G=>G[or]!==B);y(R),I(G=>({...G,[B]:{}}));for(const G in x.current)G.startsWith(`${B}.`)&&delete x.current[G];b==null||b(e,N())},P=(B,{columnNames:R=[],operationType:G})=>{const H=R.map(J=>B[J]);return""+P0(H,G)},V=(B,R)=>{const G=p.map(H=>B!==H[or]?H:{...H,...R});y(G)},z=(B,R)=>{const G=p.map(H=>{if(B!==H[or])return H;const J={...H};for(const re of R)delete J[re];return J});y(G)},$=(B,R,G,H)=>{var se;const J=((se=H==null?void 0:H.target)==null?void 0:se.value)??"",re={...G,[R]:J};if(S[R])for(const j of S[R]){const te=P(re,L[j]);re[j]=te}V(B,re)},Q=(B,R,G)=>{V(B,{[R]:G})},X=(B,R,G,H)=>{if(G&&typeof G=="object"&&"value"in G&&typeof G.value=="string"&&typeof H.name<"u"){const J="prefillValues"in G&&G.prefillValues,re={...R,[H.name]:G.value,...J};for(const se in re)if(S[se])for(const j of S[se]){const te=P(re,L[j]);re[j]=te}V(B,re)}(H==null?void 0:H.action)==="clear"&&H.name&&z(B,[H.name])},q=(B,R,G)=>{V(B,{[R]:(G==null?void 0:G.toISOString())??""})},oe=(B,R,G,H)=>{H&&I(J=>{const re=J[B]??{};return{...J,[B]:{...re,[R]:G}}}),x.current={...x.current,[`${B}.${R}`]:typeof G=="string"?G:""},b==null||b(e,N())},ie=B=>m.current===B;return u.jsxs(s8,{children:[u.jsx(a8,{ref:m,children:u.jsxs(i8,{gridColumns:_,minWidth:`calc( ${E} * ${T} )`,children:[u.jsx(l8,{children:r.map(({name:B,label:R,isRequired:G})=>u.jsx(Gc,{children:u.jsx(b1,{label:R,isRequired:G})},B))}),p.map(({[or]:B,...R})=>u.jsxs(g1,{children:[r.map(({name:G,key:H,...J})=>{var re;return u.jsx(Gc,{hasError:!!((re=C==null?void 0:C[B])!=null&&re[G]),children:u.jsx(sr,{name:G,value:R[G],...J,className:Br,label:"",hideHelperText:!0,validation:h==null?void 0:h[G],onFocus:v,inputChangeHandler:se=>$(B,G,R,se),checkboxChangeHandler:(...se)=>Q(B,G,se[1]),selectChangeHandler:(...se)=>X(B,R,...se),dateChangeHandler:(se,j)=>q(B,se,j),onValidationError:(...se)=>oe(B,...se),fetchConfig:l==null?void 0:l[G],createConfig:f==null?void 0:f[G],isScrollTarget:ie,...g?{menuPortalTarget:document.body,stackIndex:g}:null})},G??H)}),a?null:u.jsx(Gc,{children:u.jsx(d.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:u.jsx(m1,{onClick:()=>D(B),children:u.jsx(b8,{})})})})]},B))]})}),u.jsxs(c8,{children:[a?null:u.jsxs(u8,{onClick:k,children:[u.jsx(h1,{}),u.jsx(d.Typography,{children:"Add Line"})]}),c.length?u.jsx(d8,{children:c.map(({label:B,columnName:R,operationType:G,prefix:H="",prefixKey:J,suffix:re="",suffixKey:se})=>u.jsxs(f8,{children:[u.jsx(d.Typography,{fontWeight:500,children:B}),u.jsxs(d.Typography,{children:[u.jsxs("span",{children:[n[J]??H," "]}),u.jsx("span",{children:P0(p.map(j=>j[R]),G)}),u.jsx("span",{children:n[se]??re})]})]},B))}):null]})]})};ha.ROW_ID=or;const y8=d.styled(d.Box)`
767
+ `,y8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(b8,{onChange:o,onFocus:t,onBlur:n,...r})},y1=({label:e,isRequired:t,prefixNode:n,...r})=>e?u.jsxs(d.Typography,{variant:"h4",component:"label",color:d.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?u.jsx("span",{className:"required__star",children:"*"}):null]}):null,C8=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"})),C1=250,tr="__id",No={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:C1,arithmeticOperation:[]},ga=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=No.defaultNumberOfRows,fixedRows:a=No.fixedRows,cellWidth:i=No.cellWidth,arithmeticOperation:c=No.arithmeticOperation}=No,fetchConfig:l={},createConfig:f={},stackIndex:g,onChange:y=()=>{},onFocus:v,onValidationError:b})=>{const p=t??[],h=(o==null?void 0:o.validations)??{},m=w.useRef(),x=w.useRef({}),[C,I]=w.useState({}),{colsLength:E,colsTemplate:_,colWidth:T}=w.useMemo(()=>{let B=0,P="";for(const G of r){let H=G.cols?Number(G.cols):1;isNaN(H)&&(H=1),B+=H,P+=`${G.cols??H}fr `}return a||(B+=.5,P+="0.5fr"),{colsLength:B,colsTemplate:P.trim(),colWidth:`${isNaN(i)?C1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=w.useMemo(()=>{const B={},P={};for(const G of r){if(!G.valueConfig)continue;P[G.name]=G.valueConfig;const H=G.valueConfig.columnNames;for(const Y of H)B[Y]||(B[Y]=[]),B[Y].push(G.name)}return{fieldDependency:B,fieldConfigs:P}},[r]);w.useEffect(()=>{if(t)return;const B=[];for(let P=0;P<s;P++){const G=P0();B.push({[tr]:G})}y(B)},[t,y,s]);const N=()=>{const B=Object.entries(x.current).filter(P=>!!P[1])[0];return(B==null?void 0:B[1])??""},k=()=>{const B={[tr]:P0()};y([...p,B])},D=B=>{const P=p.filter(G=>G[tr]!==B);y(P),I(G=>({...G,[B]:{}}));for(const G in x.current)G.startsWith(`${B}.`)&&delete x.current[G];b==null||b(e,N())},M=(B,{columnNames:P=[],operationType:G})=>{const H=P.map(Y=>B[Y]);return""+j0(H,G)},V=(B,P)=>{const G=p.map(H=>B!==H[tr]?H:{...H,...P});y(G)},z=(B,P)=>{const G=p.map(H=>{if(B!==H[tr])return H;const Y={...H};for(const re of P)delete Y[re];return Y});y(G)},q=(B,P,G,H)=>{var se;const Y=((se=H==null?void 0:H.target)==null?void 0:se.value)??"",re={...G,[P]:Y};if(S[P])for(const j of S[P]){const te=M(re,L[j]);re[j]=te}V(B,re)},$=(B,P,G)=>{V(B,{[P]:G})},X=(B,P,G,H)=>{if(G&&typeof G=="object"&&"value"in G&&typeof G.value=="string"&&typeof H.name<"u"){const Y="prefillValues"in G&&G.prefillValues,re={...P,[H.name]:G.value,...Y};for(const se in re)if(S[se])for(const j of S[se]){const te=M(re,L[j]);re[j]=te}V(B,re)}(H==null?void 0:H.action)==="clear"&&H.name&&z(B,[H.name])},J=(B,P,G)=>{V(B,{[P]:(G==null?void 0:G.toISOString())??""})},oe=(B,P,G,H)=>{H&&I(Y=>{const re=Y[B]??{};return{...Y,[B]:{...re,[P]:G}}}),x.current={...x.current,[`${B}.${P}`]:typeof G=="string"?G:""},b==null||b(e,N())},ae=B=>m.current===B;return u.jsxs(i8,{children:[u.jsx(c8,{ref:m,children:u.jsxs(l8,{gridColumns:_,minWidth:`calc( ${E} * ${T} )`,children:[u.jsx(d8,{children:r.map(({name:B,label:P,isRequired:G})=>u.jsx(Vc,{children:u.jsx(y1,{label:P,isRequired:G})},B))}),p.map(({[tr]:B,...P})=>u.jsxs(m1,{children:[r.map(({name:G,key:H,...Y})=>{var re;return u.jsx(Vc,{hasError:!!((re=C==null?void 0:C[B])!=null&&re[G]),children:u.jsx(nr,{name:G,value:P[G],...Y,className:jr,label:"",hideHelperText:!0,validation:h==null?void 0:h[G],onFocus:v,inputChangeHandler:se=>q(B,G,P,se),checkboxChangeHandler:(...se)=>$(B,G,se[1]),selectChangeHandler:(...se)=>X(B,P,...se),dateChangeHandler:(se,j)=>J(B,se,j),onValidationError:(...se)=>oe(B,...se),fetchConfig:l==null?void 0:l[G],createConfig:f==null?void 0:f[G],isScrollTarget:ae,...g?{menuPortalTarget:document.body,stackIndex:g}:null})},G??H)}),a?null:u.jsx(Vc,{children:u.jsx(d.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:u.jsx(b1,{onClick:()=>D(B),children:u.jsx(C8,{})})})})]},B))]})}),u.jsxs(u8,{children:[a?null:u.jsxs(f8,{onClick:k,children:[u.jsx(g1,{}),u.jsx(d.Typography,{children:"Add Line"})]}),c.length?u.jsx(p8,{children:c.map(({label:B,columnName:P,operationType:G,prefix:H="",prefixKey:Y,suffix:re="",suffixKey:se})=>u.jsxs(h8,{children:[u.jsx(d.Typography,{fontWeight:500,children:B}),u.jsxs(d.Typography,{children:[u.jsxs("span",{children:[n[Y]??H," "]}),u.jsx("span",{children:j0(p.map(j=>j[P]),G)}),u.jsx("span",{children:n[se]??re})]})]},B))}):null]})]})};ga.ROW_ID=tr;const x8=d.styled(d.Box)`
768
768
  box-sizing: border-box;
769
- &:not(:has(.${Br})) {
769
+ &:not(:has(.${jr})) {
770
770
  transform: translate(0, 5px);
771
771
  padding-bottom: 5px;
772
772
  }
773
- `,C8=d.styled(d.TextField)`
774
- &.${Br} {
775
- height: ${fa};
773
+ `,v8=d.styled(d.TextField)`
774
+ &.${jr} {
775
+ height: ${pa};
776
776
  position: relative;
777
777
  & > div {
778
778
  height: 100%;
779
- padding-left: ${pa};
779
+ padding-left: ${ha};
780
780
  }
781
781
 
782
782
  fieldset.MuiOutlinedInput-notchedOutline {
@@ -790,7 +790,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
790
790
  margin-top: 0px;
791
791
  }
792
792
  }
793
- `,x8=({inputProps:e,...t})=>{const n=r=>{r.currentTarget&&r.currentTarget.blur(),r.stopPropagation()};return u.jsx(y8,{children:u.jsx(C8,{...t,inputProps:{onWheel:n,...e}})})},v8=d.styled(x8)`
793
+ `,E8=({inputProps:e,...t})=>{const n=r=>{r.currentTarget&&r.currentTarget.blur(),r.stopPropagation()};return u.jsx(x8,{children:u.jsx(v8,{...t,inputProps:{onWheel:n,...e}})})},I8=d.styled(E8)`
794
794
  & .MuiFormHelperText-root {
795
795
  position: absolute;
796
796
  bottom: -24px;
@@ -809,7 +809,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
809
809
  &.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
810
810
  border-width: 1px;
811
811
  }
812
- `,C1=d.styled(d.Box)`
812
+ `,x1=d.styled(d.Box)`
813
813
  & .hiverFormField__placeholder {
814
814
  color: #97a3b7;
815
815
  }
@@ -904,20 +904,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
904
904
  border-radius: 4px;
905
905
  }
906
906
 
907
- & .${Br} {
908
- height: ${fa};
907
+ & .${jr} {
908
+ height: ${pa};
909
909
  .hiverFormField__control {
910
910
  height: 100%;
911
911
  border: 0;
912
912
  .hiverFormField__value-container {
913
- padding-left: ${pa};
913
+ padding-left: ${ha};
914
914
  }
915
915
  }
916
916
  .hiverFormField__indicators {
917
917
  height: 100%;
918
918
  }
919
919
  }
920
- `,x1=d.styled(d.Box)`
920
+ `,v1=d.styled(d.Box)`
921
921
  font-size: 12px;
922
922
  font-weight: 400;
923
923
  font-family: ${d.theme.typography.fontFamily};
@@ -929,7 +929,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
929
929
  &.helper--error {
930
930
  color: #d32f2f;
931
931
  }
932
- `,E8=d.styled(d.Box)`
932
+ `,w8=d.styled(d.Box)`
933
933
  width: 100%;
934
934
  position: relative;
935
935
  & .MuiInputBase-root {
@@ -943,7 +943,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
943
943
  position: absolute;
944
944
  margin-left: 5px;
945
945
  }
946
- `,I8=d.styled(d.Box)`
946
+ `,_8=d.styled(d.Box)`
947
947
  display: inline-block;
948
948
  margin-right: 9px;
949
949
  width: 9px;
@@ -955,7 +955,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
955
955
  display: inline-block;
956
956
  transition: transform 300ms;
957
957
  }
958
- `,w8=d.styled(d.Stack)`
958
+ `,S8=d.styled(d.Stack)`
959
959
  position: relative;
960
960
  font-family: ${d.theme.typography.fontFamily};
961
961
  &.expandable {
@@ -986,19 +986,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
986
986
  overflow: hidden;
987
987
  }
988
988
  }
989
- `,_8=d.styled(d.IconButton)`
989
+ `,T8=d.styled(d.IconButton)`
990
990
  position: absolute;
991
991
  top: 0;
992
992
  left: 100%;
993
993
  transform: translate(5px, 0);
994
994
  height: 34px;
995
995
  width: 34px;
996
- `,S8=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),sr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:a,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:f,checkboxChangeHandler:g,...y})=>{const{validation:v,helperText:b,id:p,label:h,name:m,type:x,validateOnBlur:C=!0,validateOnChange:I=!0,isRequired:E,labelSpacing:_=1,showGlobalLoader:T=!1,hideHelperText:S=!1,meta:{isExpandable:L=x==="table",isExpanded:N=!0}={}}=y,[k,D]=w.useState(!1),[P,V]=w.useState(""),[z,$]=w.useState(N);w.useEffect(()=>{k||X(y.value,!1)},[k,y.value]);const Q=j=>{var te;j&&!k&&D(!0),(te=y.onFocus)==null||te.call(y,j)};function X(j,te=!0,Ee){let Z="";if((v!=null&&v.isRequired||E)&&(Z=j?"":u1,!j&&typeof(v==null?void 0:v.isRequired)=="function")){const Ne=v.isRequired(j);Ne&&typeof Ne=="boolean"?Z=u1:Ne&&(Z=Ne)}let Ve={id:p,name:m,label:h};if(y.type==="date"?Ve={...Ve,disableFuture:y.disableFuture,disablePast:y.disablePast}:y.type==="number"?Ve={...Ve,min:y.min,max:y.max}:y.type==="text"&&y.multiline&&(Ve={...Ve,maxCharacters:y.maxCharacters}),j&&!Z&&(v!=null&&v.validate)){const Ne=v.validate(j,{...Ve,...Ee});typeof Ne=="boolean"&&Ne===!1?Z=z7:typeof Ne=="string"&&(Z=Ne)}te&&V(Z),a==null||a(m,Z,te)}const q=j=>{var te;k||D(!0),(te=y.onBlur)==null||te.call(y,j),k&&C&&X(y.value)},oe=()=>S?null:y.helperText?u.jsx(x1,{children:b}):k&&P?u.jsx(x1,{className:"helper--error",children:P}):null,ie=j=>{j&&!k&&D(!0),i==null||i(j),k&&I&&X(j.target.value)},B=(j,te)=>{j&&!k&&D(!0),g==null||g(j,te),k&&I&&X(te)},R=(j,te)=>{c==null||c(j,te),j&&!k&&D(!0),j&&typeof j=="object"&&"value"in j&&k&&I&&X(j.value)},G=(j,te)=>{l==null||l(m,j,te),j&&!k&&D(!0),k&&I&&X(j)},H=j=>{f==null||f(m,j)},J=(j,te)=>{k&&(a==null||a(j,te),V(typeof te=="string"?te:""))},re=j=>{$(te=>!te)},se=j=>{if(T)return u.jsx(d.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(j.type){case"select":return u.jsx(C1,{children:u.jsx(Ro,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${P&&k?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:R,onFocus:Q,menuPortalTarget:n})});case"async-select":return u.jsx(C1,{children:u.jsx(o8,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${P&&k?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:R,onFocus:Q,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return u.jsx(h8,{...j,label:void 0,onBlur:q,onFocus:Q,onChange:G,error:!!(P&&k)});case"table":return u.jsx(ha,{...j,value:j.value,onChange:H,onFocus:Q,onValidationError:J,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return u.jsx(m8,{...j,onChange:B,onFocus:Q,onBlur:q});default:return u.jsx(v8,{variant:"outlined",fullWidth:!0,id:p,...j,value:j.value,label:void 0,onBlur:q,onChange:ie,onFocus:Q,error:!!(P&&k),inputProps:{type:j.type,min:j.min,max:j.max,...j.inputProps}})}};return u.jsxs(w8,{spacing:_,useFlexGap:!0,...L&&{className:`expandable ${z?"open":"close"}`},children:[u.jsx(b1,{label:h,htmlFor:p,isRequired:!!(v!=null&&v.isRequired)||E,prefixNode:L?u.jsx(I8,{children:u.jsx(S8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>re()}}),u.jsxs(E8,{className:"input-wrapper",children:[u.jsx(d.Tooltip,{title:y.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:se(y)}),r!=null&&r.icon?u.jsx(d.Tooltip,{title:r.toolTipText,placement:"bottom",children:u.jsx(_8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),oe()]})},T8=d.styled(d.Stack)`
996
+ `,A8=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),nr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:a,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:f,checkboxChangeHandler:g,...y})=>{const{validation:v,helperText:b,id:p,label:h,name:m,type:x,validateOnBlur:C=!0,validateOnChange:I=!0,isRequired:E,labelSpacing:_=1,showGlobalLoader:T=!1,hideHelperText:S=!1,meta:{isExpandable:L=x==="table",isExpanded:N=!0}={}}=y,[k,D]=w.useState(!1),[M,V]=w.useState(""),[z,q]=w.useState(N);w.useEffect(()=>{k||X(y.value,!1)},[k,y.value]);const $=j=>{var te;j&&!k&&D(!0),(te=y.onFocus)==null||te.call(y,j)};function X(j,te=!0,Ee){let Z="";if((v!=null&&v.isRequired||E)&&(Z=j?"":d1,!j&&typeof(v==null?void 0:v.isRequired)=="function")){const Ne=v.isRequired(j);Ne&&typeof Ne=="boolean"?Z=d1:Ne&&(Z=Ne)}let Ve={id:p,name:m,label:h};if(y.type==="date"?Ve={...Ve,disableFuture:y.disableFuture,disablePast:y.disablePast}:y.type==="number"?Ve={...Ve,min:y.min,max:y.max}:y.type==="text"&&y.multiline&&(Ve={...Ve,maxCharacters:y.maxCharacters}),j&&!Z&&(v!=null&&v.validate)){const Ne=v.validate(j,{...Ve,...Ee});typeof Ne=="boolean"&&Ne===!1?Z=J7:typeof Ne=="string"&&(Z=Ne)}te&&V(Z),a==null||a(m,Z,te)}const J=j=>{var te;k||D(!0),(te=y.onBlur)==null||te.call(y,j),k&&C&&X(y.value)},oe=()=>S?null:y.helperText?u.jsx(v1,{children:b}):k&&M?u.jsx(v1,{className:"helper--error",children:M}):null,ae=j=>{j&&!k&&D(!0),i==null||i(j),k&&I&&X(j.target.value)},B=(j,te)=>{j&&!k&&D(!0),g==null||g(j,te),k&&I&&X(te)},P=(j,te)=>{c==null||c(j,te),j&&!k&&D(!0),j&&typeof j=="object"&&"value"in j&&k&&I&&X(j.value)},G=(j,te)=>{l==null||l(m,j,te),j&&!k&&D(!0),k&&I&&X(j)},H=j=>{f==null||f(m,j)},Y=(j,te)=>{k&&(a==null||a(j,te),V(typeof te=="string"?te:""))},re=j=>{q(te=>!te)},se=j=>{if(T)return u.jsx(d.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(j.type){case"select":return u.jsx(x1,{children:u.jsx(Do,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&k?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:J,onChange:P,onFocus:$,menuPortalTarget:n})});case"async-select":return u.jsx(x1,{children:u.jsx(a8,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&k?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:J,onChange:P,onFocus:$,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return u.jsx(m8,{...j,label:void 0,onBlur:J,onFocus:$,onChange:G,error:!!(M&&k)});case"table":return u.jsx(ga,{...j,value:j.value,onChange:H,onFocus:$,onValidationError:Y,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return u.jsx(y8,{...j,onChange:B,onFocus:$,onBlur:J});default:return u.jsx(I8,{variant:"outlined",fullWidth:!0,id:p,...j,value:j.value,label:void 0,onBlur:J,onChange:ae,onFocus:$,error:!!(M&&k),inputProps:{type:j.type,min:j.min,max:j.max,...j.inputProps}})}};return u.jsxs(S8,{spacing:_,useFlexGap:!0,...L&&{className:`expandable ${z?"open":"close"}`},children:[u.jsx(y1,{label:h,htmlFor:p,isRequired:!!(v!=null&&v.isRequired)||E,prefixNode:L?u.jsx(_8,{children:u.jsx(A8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>re()}}),u.jsxs(w8,{className:"input-wrapper",children:[u.jsx(d.Tooltip,{title:y.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:se(y)}),r!=null&&r.icon?u.jsx(d.Tooltip,{title:r.toolTipText,placement:"bottom",children:u.jsx(T8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),oe()]})},L8=d.styled(d.Stack)`
997
997
  & .authform__section-title {
998
998
  margin-top: 32px;
999
999
  margin-bottom: -12px;
1000
1000
  }
1001
- `,A8=d.styled(d.Stack)`
1001
+ `,O8=d.styled(d.Stack)`
1002
1002
  ${({cols:e,spacing:t,theme:n})=>`
1003
1003
  flex-flow: row wrap;
1004
1004
  justify-content: flex-start;
@@ -1006,13 +1006,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1006
1006
  --field-space: calc( ${e-1} * var(--field-gap));
1007
1007
  --field-width: calc( ( 100% - var(--field-space) ) / ${e} );
1008
1008
  `}
1009
- `,L8=d.styled(d.Box)`
1009
+ `,F8=d.styled(d.Box)`
1010
1010
  --cols: ${({cols:e})=>e};
1011
1011
  --include-gap: calc((var(--cols) - 1) * var(--field-gap));
1012
1012
  --include-width: calc(var(--cols) * var(--field-width));
1013
1013
  width: calc(var(--include-width) + var(--include-gap));
1014
1014
  max-width: 100%;
1015
- `,v1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:l,onValidationError:f,stackIndex:g,sectionSpacing:y=3,fieldsSpacing:v=3,labelSpacing:b=1,fetchConfig:p,createConfig:h,showGlobalLoader:m=!1,cols:x=1})=>{const C=I=>(E,_)=>{n==null||n(E,_,I)};return u.jsx(T8,{spacing:y,children:e.map(({id:I,title:E,formFields:_})=>_.every(S=>S.hideInUI)?null:u.jsxs(w.Fragment,{children:[E&&_.length?u.jsx(d.Typography,{variant:"h3",className:"authform__section-title",children:E}):null,u.jsx(A8,{useFlexGap:!0,spacing:v,cols:x,children:_.map(S=>{var L;return i&&typeof i=="object"&&S.name in i&&i[S.name]===!1||S.hideInUI?null:u.jsx(L8,{cols:S.cols??1,children:u.jsx(sr,{value:c==null?void 0:c[S.name],data:c,...S,stackIndex:g,selectChangeHandler:C(S),inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,validation:l==null?void 0:l[S.name],onValidationError:f,iconData:t==null?void 0:t[S.name],labelSpacing:b,fetchConfig:p==null?void 0:p[S.name],createConfig:h==null?void 0:h[S.name],showGlobalLoader:m})},((L=p==null?void 0:p[S.name])==null?void 0:L.key)||S.name)})})]},I))})},O8=d.styled(d.Box)`
1015
+ `,E1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:l,onValidationError:f,stackIndex:g,sectionSpacing:y=3,fieldsSpacing:v=3,labelSpacing:b=1,fetchConfig:p,createConfig:h,showGlobalLoader:m=!1,cols:x=1})=>{const C=I=>(E,_)=>{n==null||n(E,_,I)};return u.jsx(L8,{spacing:y,children:e.map(({id:I,title:E,formFields:_})=>_.every(S=>S.hideInUI)?null:u.jsxs(w.Fragment,{children:[E&&_.length?u.jsx(d.Typography,{variant:"h3",className:"authform__section-title",children:E}):null,u.jsx(O8,{useFlexGap:!0,spacing:v,cols:x,children:_.map(S=>{var L;return i&&typeof i=="object"&&S.name in i&&i[S.name]===!1||S.hideInUI?null:u.jsx(F8,{cols:S.cols??1,children:u.jsx(nr,{value:c==null?void 0:c[S.name],data:c,...S,stackIndex:g,selectChangeHandler:C(S),inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,validation:l==null?void 0:l[S.name],onValidationError:f,iconData:t==null?void 0:t[S.name],labelSpacing:b,fetchConfig:p==null?void 0:p[S.name],createConfig:h==null?void 0:h[S.name],showGlobalLoader:m})},((L=p==null?void 0:p[S.name])==null?void 0:L.key)||S.name)})})]},I))})},k8=d.styled(d.Box)`
1016
1016
  width: 100%;
1017
1017
  aspect-ratio: ${({aspectRatio:e})=>e};
1018
1018
  border-radius: 8px;
@@ -1036,10 +1036,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1036
1036
  width: 40px;
1037
1037
  height: 40px;
1038
1038
  }
1039
- `,F8=e=>A.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),A.createElement("g",{clipPath:"url(#clip0_7787_114457)"},A.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_7787_114457"},A.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),k8=({aspectRatio:e="auto",...t})=>{const[n,r]=w.useState(!1);return n?null:u.jsxs(O8,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(F8,{className:"play-icon"})]})},E1=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${d.tooltipClasses.arrow}`]:{...t},[`& .${d.tooltipClasses.tooltip}`]:{...e}})),Hc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},D8=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],Po=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},Wc=({formFields:e})=>{const t={};return e.forEach(n=>{var r,o,s,a,i,c;if(t[n.name]={},(r=n.validations)!=null&&r.isRequired&&(typeof n.validations.isRequired=="object"?t[n.name].isRequired=By(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let l=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";l=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:l,t[n.name].validate=Vy(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=Gy();return}if(n.type==="text"&&n.limit){t[n.name].validate=fc();return}if(n.type==="table"){const l=Wc({formFields:n.columns??[]});t[n.name].validations=l}if((i=n.validations)!=null&&i.isUrl){const l=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=Py(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=jy(l)}}),t},ga={isMultiSelect:e=>Array.isArray(e)?e.every(t=>typeof t=="object"&&"label"in t&&"value"in t):!1,isTable:e=>Array.isArray(e)?e.some(n=>!!n[ha.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},ma=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return ga.isMultiSelect(o)?s=o.map(a=>a.value):ga.isTable(o)?s=o.map(({...i})=>(delete i[ha.ROW_ID],i)).filter(i=>Object.keys(i).length>0):ga.isSelect(o)?s=o.value:ga.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),N8=(e,t)=>{const n={},r=new Set;let o="";for(const s of e)s.rowId?(n[s.rowId]||(n[s.rowId]=[]),n[s.rowId].push(s),r.add(s.rowId),o=""):!n[o]||n[o].length>=t?(r.add(s.name),n[s.name]=[s],o=s.name):n[o].push(s);return[...r].map(s=>({id:s,formFields:n[s]}))},I1=(e,t)=>{if(!t||!Array.isArray(e))return 0;let n=0;for(const r of e){const o=t[r.name];if(r.type==="table"&&Array.isArray(o)){let s=0;for(const a of o){const i=I1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},ar="/v1/api",R8=`${ar}/connectors/conversation/:conversationId/metadata`,M8=`${ar}/connectors/forms/:formId/field/:fieldName/data`,P8=`${ar}/connectors/form/:formId`,j8=`${ar}/connectors/forms/:id/link`,B8=`${ar}/connectors/forms/:id/preview`,V8=`${ar}/connectors/conversation/:conversationId/selected-email`,G8=`${ar}/connectors/app-cf-values`,H8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Le({url:gt(`${M8}?${r.toString()}`,e),method:je.POST,data:t})},W8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Le({url:gt(`${P8}?${r.toString()}`,e),method:je.POST,data:t})},Z8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Le({url:`${B8.replace(":id",e)}?${r.toString()}`,method:je.POST,data:{args:t}})},X8="https://avatars.githubusercontent.com/u/62397590",w1={optionsMap:null,createOptionApi:ee.IDLE,dropdownOptionsApis:ee.IDLE,previewCardData:null,previewCardApiStatus:ee.IDLE,selectedSuggestionType:"basic"},_1=uc({name:"commonSlice",initialState:w1,reducers:{resetState:()=>w1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=ee.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(ba.pending,t=>{t.createOptionApi=ee.LOADING}).addCase(ba.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=ee.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(ba.rejected,t=>{t.createOptionApi=ee.FAILED}).addCase(ir.pending,t=>{t.dropdownOptionsApis=ee.LOADING}).addCase(ir.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=ee.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(ir.rejected,t=>{t.dropdownOptionsApis=ee.FAILED}).addCase(Vr.pending,t=>{t.previewCardApiStatus=ee.LOADING}).addCase(Vr.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=ee.IDLE}).addCase(Vr.rejected,t=>{t.previewCardApiStatus=ee.FAILED})}}),ba=Gt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var p,h,m;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,g=Hc(c||{},s,r),{common:y}=t(),{options:v=[],...b}=((p=y.optionsMap)==null?void 0:p[g])||{};try{const x=await W8({fieldName:r,formId:a},{args:l,conversation_id:i});if(!x||!("data"in x)||!("output_variables"in x.data)||!("external_resource_id"in x.data.output_variables))throw x;const C=x.data.output_variables,{external_resource_id:I,...E}=C,T=[{label:o,value:I,prefillValues:E},...v],S=j0(T,L=>L.value);return f==null||f(S),{optionsList:S,key:g,...b}}catch(x){f==null||f(v);const C=x,I=(h=C==null?void 0:C.response)==null?void 0:h.data,E=typeof I=="string"?I:(I==null?void 0:I.message)||hn;return we({message:E,type:ze}),n((m=C==null?void 0:C.response)==null?void 0:m.status)}}),ir=Gt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var T,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:g}=e,y=Hc(c||{},o,r),{common:v}=t();let b=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(b=a.meta.showAvatar);const p=((T=v.optionsMap)==null?void 0:T[y])||{},h=!e.isScrollToBottomEvent&&(!p||s!==p.searchTerm),m=h?[]:p.options||[],x=h?!0:p.hasMore??!0,C=h?0:p.currentPage??0,{enabled:I,limit:E}=f,_=E||10;try{let N;const k=g==null?void 0:g.signal,D=I?{pageNumber:C+1,searchTerm:s,limit:_,enabled:I}:null;if(x&&(N=await H8({fieldName:r,formId:o},{pagination:D||{},args:c,interfaceId:l})),k!=null&&k.aborted)throw k.reason;if(!N||!N.data||!("data"in N.data)||!Array.isArray(N.data.data)||!N.data.data.length){const{common:X}=t(),q=(S=X.optionsMap)==null?void 0:S[y];return i==null||i(q.options??[]),{...q,optionsList:q.options??[],key:y,hasMore:!1}}const V=N.data.data.map(X=>b?{...X,avatarUrl:X.avatarUrl||X8}:(delete X.avatarUrl,X)),z=[...m,...V],$=I?V.length>=_:!1,Q=j0(z,X=>X.value);return i==null||i(Q),{optionsList:Q,fieldName:r,formId:o,searchTerm:s,currentPage:C+1,hasMore:$,key:y}}catch(N){const{common:k}=t(),D=((L=k.optionsMap)==null?void 0:L[y])||{};return i==null||i(D.options??[]),n(N)}},{condition:(e,{getState:t})=>{var g;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=Hc(a||{},r,n),{common:c}=t(),l=(g=c.optionsMap)==null?void 0:g[i];if((l==null?void 0:l.searchTerm)!==o)return!0;const f=(l==null?void 0:l.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),Vr=Gt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await Z8(e,t,n),i=a==null?void 0:a.data;return i?(r&&we({message:O0,type:$t}),{data:Ld(i)}):(r&&we({message:L0,type:ze}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:$S,resetPreviewCardData:z8,setSelectedSuggestionType:Y8}=_1.actions,J8=_1.reducer,jo="/v1/api",q8=`${jo}/connectors/forms/list`,$8=`${jo}/connectors/cards/:id/unlink`,Q8=`${jo}/connectors/forms/:id/link`,U8=`${jo}/connectors/form/:formId`,K8=`${jo}/connectors/forms/:formId/data`,ex=({inboxIds:e,channelType:t,conversationId:n})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",t),r.append("conversation_id",String(n)),Le({url:`${q8}?${r.toString()}`,method:je.GET})},S1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Le({url:gt(`${U8}?${r.toString()}`,e),method:je.POST,data:t})},tx=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),Le({url:`${$8.replace(":id",e)}?${o.toString()}`,method:je.POST,data:{externalResourceId:n,conversationId:r}})},nx=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),Le({url:`${Q8.replace(":id",e)}?${s.toString()}`,method:je.POST,data:{externalResourceId:t,conversationId:r}})},rx=(e,t="email",n,r,o)=>{const s=new URLSearchParams;return s.append("channel_type",t),s.append("conversation_id",String(n||"")),s.append("senderEmail",o),s.append("externalResourceId",r),Le({url:`${K8.replace(":formId",e)}?${s.toString()}`,method:je.GET})},ox="Error in previewing the card",T1="Link format isn't recognized. Please check that you've entered a valid URL",sx="Item already linked",ax="Card linked successfully",ix="Error in linking the card",cx="New card created",lx="Card creation failed",ux="Create and link objects from different apps to this conversation",dx="Are you sure you want to change the primary object?",fx="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",px="Are you sure you want to leave?",hx=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
1040
- Do you want to continue?`,gx="Select an object to create",mx="Select an object to link",A1="Select object",bx="Paste URL or ID",yx="Object ID/Link",Cx="Card updated",xx="Card updation failed",L1=3,O1=(e,t)=>{var r,o,s,a,i,c,l,f,g,y,v,b,p;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((f=(l=e.validations)==null?void 0:l.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((y=(g=e.validations)==null?void 0:g.range)==null?void 0:y.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((v=e.validations)==null?void 0:v.maxRows)||5,limit:(b=e.validations)==null?void 0:b.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(p=e.validations)==null?void 0:p.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},F1=uc({name:"writeCapability",initialState:F0,reducers:{resetState:()=>F0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=ee.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ya.pending,t=>{t.objectListApiStatus=ee.LOADING}).addCase(ya.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=ee.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=f}).addCase(ya.rejected,t=>{t.objectListApiStatus=ee.FAILED}).addCase(ir.pending,t=>{t.dropdownOptionsApis=ee.LOADING}).addCase(ir.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=ee.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(ir.rejected,t=>{t.dropdownOptionsApis=ee.FAILED}).addCase(Ca.pending,t=>{t.createFormApiStatus=ee.LOADING}).addCase(Ca.fulfilled,t=>{t.createFormApiStatus=ee.IDLE}).addCase(Ca.rejected,t=>{t.createFormApiStatus=ee.FAILED}).addCase(Ea.pending,t=>{t.linkCardApiStatus=ee.LOADING}).addCase(Ea.fulfilled,t=>{t.linkCardApiStatus=ee.IDLE}).addCase(Ea.rejected,t=>{t.linkCardApiStatus=ee.FAILED}).addCase(va.pending,t=>{t.unlinkCardApiStatus=ee.LOADING}).addCase(va.fulfilled,t=>{t.unlinkCardApiStatus=ee.IDLE}).addCase(va.rejected,t=>{t.unlinkCardApiStatus=ee.FAILED}).addCase(xa.pending,t=>{t.updateFormApiStatus=ee.LOADING}).addCase(xa.fulfilled,t=>{t.updateFormApiStatus=ee.IDLE}).addCase(xa.rejected,t=>{t.updateFormApiStatus=ee.FAILED}).addCase(Ia.pending,t=>{t.currentResourceDetailsApiStatus=ee.LOADING}).addCase(Ia.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=ee.IDLE}).addCase(Ia.rejected,t=>{t.currentResourceDetailsApiStatus=ee.FAILED})}}),ya=Gt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await ex({inboxIds:t,channelType:n,conversationId:r});if(!s||!s.data||!("formsList"in s.data)||!Array.isArray(s.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const a=s.data.formsList,i={},c=[],l=[],f=[],g=[],y=[],v={},b={};return a==null||a.forEach(p=>{var m,x;if(p.expandedView&&!o)return;const h={...p};"fieldList"in h&&delete h.fieldList,b[p.id]=h,i[p.id]||(i[p.id]={}),v[p.id]||(v[p.id]=[]),p.type==="create"&&p.authenticated?(c.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!l.includes(p.connectorName)&&l.push(p.connectorName)):p.type==="link"&&p.authenticated?f.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?g.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&y.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(m=p.fieldList)==null||m.sort((C,I)=>C.priority-I.priority),(x=p.fieldList)==null||x.forEach(C=>{const I=O1(C);if(I.columns&&(I.columns=I.columns.map(E=>O1(E,{loadOptionsOnFocus:!0,defaultOptions:!1}))),v[p.id]=[...v[p.id],I],C.interfaceDetails&&(C.interfaceDetails.args||C.interfaceDetails.optionalArgs)){const E={...C.interfaceDetails.args,...C.interfaceDetails.optionalArgs};Object.values(E).forEach(_=>{i[p.id][_]?i[p.id][_]=[...i[p.id][_],C.name]:i[p.id][_]=[C.name]})}})}),{createObjectList:c,createObjectConnectorNamesList:l,linkObjectList:f,editObjectList:g,searchObjectList:y,formFields:v,objectDict:b,dependentFieldsMap:i}}),Ca=Gt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await S1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),we({message:cx,type:$t})}catch(l){const f=l,g=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(g==null?void 0:g.message)??lx;return o==null||o(l),we({message:y,type:ze}),t(l)}}),xa=Gt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await S1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),we({message:Cx,type:$t})}catch(f){return o==null||o(f),we({message:xx,type:ze}),t(f)}}),va=Gt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await tx(e,t,n,r)}),Ea=Gt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await nx(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Ia=Gt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await rx(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,y])=>{"label"in y&&(y.type&&y.type==="date"?f.values[g]=y.label?new Date(parseInt(y.label)).toISOString():"":y.type&&y.type==="multi-select"&&"value"in y&&"label"in y&&y.value&&y.label?f.values[g]=[{value:y.value,label:y.label}]:y.value?f.values[g]={value:y.value,label:y.label}:f.values[g]=y.label)}),{data:f,status:l}}catch(i){return we({message:hn,type:ze}),t(i)}}),{resetState:QS,setCurrentCardInEdit:Gr,resetCurrentResourceDetails:vx,setHasUnsavedChanges:k1}=F1.actions,Ex=F1.reducer,Ix=()=>{const[e,t]=w.useState(null),[n,r]=w.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=w.useCallback(s=>{t(s)},[]);return w.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const a=100;let i=null;const c=150,l=f=>{s||(s=window.setTimeout(()=>{const g=f.target,y=Number(e.dataset.prevScrollLeft)||0,v=Number(e.dataset.prevScrollTop)||0,b=g.scrollLeft,p=g.scrollTop,h=b-y,m=p-v,x=Math.abs(m)>Math.abs(h),C=Math.abs(h)>Math.abs(m);r({isVertical:x,isHorizontal:C,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(p),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(g=>({...g,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},wx="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8016%2011.709L12.3416%205.16893L11.4298%204.25712L4.88979%2010.7972V11.709H5.8016ZM6.33618%2012.9987H3.6001V10.2626L10.9739%202.88875C11.0948%202.76786%2011.2588%202.69995%2011.4298%202.69995C11.6008%202.69995%2011.7648%202.76786%2011.8857%202.88875L13.71%204.71302C13.8309%204.83395%2013.8988%204.99794%2013.8988%205.16893C13.8988%205.33992%2013.8309%205.50391%2013.71%205.62484L6.33618%2012.9987ZM3.6001%2014.2884H15.2073V15.578H3.6001V14.2884Z'%20fill='%236C7B94'/%3e%3c/svg%3e",_x=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=Vt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),{userGroupId:i}=Bt()||{},[c,l]=Ix(),{isScrolling:f,isVertical:g}=c,y=f&&g,v=w.useMemo(()=>(e==null?void 0:e[0].data.map(m=>m.label))||[],[e]),b=w.useMemo(()=>e.map(m=>{const x={cells:{},externalResourceId:m.externalResourceId};return m.data.forEach((C,I)=>{if(v[I]){let E=C.value?C.value:Ls;E&&C.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),x.cells[v[I]]={label:E,deepLink:C==null?void 0:C.deepLink}}}),x}),[e,v]),p=(m,x)=>u.jsx(t4,{align:"left",children:m.deepLink?u.jsx(d.Link,{target:"_blank",underline:"none",href:m.deepLink,children:m.label}):u.jsx(d.Typography,{variant:"body2",color:"gray.black",children:m.label})},`${x}_${m.label}`),h=m=>{!m||!n||(r(!1),s(dd,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(Gr({...n,externalResourceId:m})))};return u.jsxs(d.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[u.jsx(d.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),u.jsx(d.TableContainer,{ref:l,children:u.jsxs(d.Table,{stickyHeader:!0,children:[u.jsx(U5,{children:u.jsxs(d.TableRow,{children:[v.map(m=>u.jsx(K5,{sx:{whiteSpace:"nowrap"},children:u.jsx(d.Typography,{variant:"overline",color:"gray.gray3",children:m})},m)),u.jsx(r4,{})]})}),u.jsx(d.TableBody,{children:b.map((m,x)=>u.jsxs(e4,{children:[Object.values(m.cells).map((C,I)=>p(C,I)),u.jsx(n4,{children:!y&&m.externalResourceId&&u.jsx(d.Tooltip,{title:vd,placement:"bottom",children:u.jsx(d.IconButton,{className:"row-edit",onClick:()=>h(m.externalResourceId),children:u.jsx("img",{src:wx})})})})]},`id_${x}`))})]})})]})},Sx=e=>e.cardList.connectorCards,Tx=e=>e.cardList.connectorsEnabled,Ax=e=>e.cardList.connectorApiStatus,Lx=e=>e.cardList.cardSpecificData,Ox=e=>e.cardList.specificConnectorApiStatus,Fx=e=>e.cardList.specificConnectorErrorCode,kx=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==ee.IDLE||!n?!1:Object.values(n).every(r=>r===ee.IDLE||r===ee.FAILED)},Dx="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.8675L14.6475%2014.625H3.3525L9%204.8675ZM9%201.875L0.75%2016.125H17.25L9%201.875Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%2012.375H8.25V13.875H9.75V12.375Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%207.875H8.25V11.625H9.75V7.875Z'%20fill='%23F07530'/%3e%3c/svg%3e",D1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,N1=e=>{const t=/\(Error code: (.*?)\)$/,n=e.match(t),r=n?n[1]:null,o=n?e.replace(t,"").trim():e;return{error_code:r,error_message:o}},Nx=(e,t)=>`${wd} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),Rx=(e,t,n)=>{var l,f,g,y,v;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((v=(y=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:y[0])!=null&&v.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&D1.test(c)?!0:!R1(e,t,n)&&!i.length},R1=(e,t,n)=>{var f,g;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(g=(f=o.data)==null?void 0:f.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===ee.FAILED,c=o.cardErrorMessage,l=c&&D1.test(c);return i||a||c&&!l};function Mx(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const l=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[l],g=(f==null?void 0:f.connectorNames)??[];for(const y of g)r[y]||(r[y]=[],o[y]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[y].push(c),o[y].cards_visible+=1,o[y].card_key.push(c.id),o[y].card_title.push(c.title),Rx(c,t,n)&&(o[y].empty_cards+=1,s+=1),R1(c,t,n)&&(o[y].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,l])=>({app_name:c,...l})),total_empty_cards:s,total_cards_with_errors:a}}const M1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:g,cardId:y,isCardLevelError:v,fieldName:b,showErrorIcon:p}=e,h=w.useRef(null),m=w.useRef(null),{email:x,currentSmIds:C,conversationId:I,sendTrackingEvent:E,connectorFunctions:_}=w.useContext(Be),T=Ce(Fx),S=T==null?void 0:T[y],[L,N]=w.useState(!1),k=w.useMemo(()=>{if(n&&v){const{error_message:q}=N1(n);return q}return c?wd.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):gd},[n,c,l,v]),D=w.useCallback(()=>{const q=n||Nx(S,l),{error_code:oe,error_message:ie}=N1(q);E==null||E(x3,{sm_ids:C,frontend_req_params:{email:x,conversationId:I,externalResourceId:g==null?void 0:g.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:oe,error_message:ie})},[n,S,E,C,x,I,f,l,g==null?void 0:g.externalResourceId]);w.useEffect(()=>{(n&&v||c&&S)&&D()},[D,S,c,n,v]),w.useEffect(()=>{const q=r?m.current:h.current;if(q){const oe=q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth;N(oe)}},[t,r]);const P=o==ji.NOT_FOUND;let V=P?Ls:t;a==="date"&&V&&!P&&(V=new Date(parseInt(V)).toLocaleDateString(navigator.language));const z=!!n||c,$=()=>{i?_==null||_.redirectToAdmin():window.open(o5,"_blank")},Q=()=>{E==null||E(v3,{sm_ids:C,card_title:f,field_name:b})},X=q=>{const oe=/<>(.*?)<>/g,ie=q.split(oe);return u.jsx(w.Fragment,{children:ie.map((B,R)=>R%2===1?u.jsx(J5,{variant:"body2",onClick:$,children:B},R):B)})};return s?u.jsx(_n,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):z?u.jsxs(Pd,{gap:"7px",children:[p?u.jsx(d.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:Dx,width:"18px",height:"18px"})}):null,u.jsx(jd,{variant:"body2",children:k?X(k):gd})]}):u.jsx(d.Tooltip,{title:L?V:null,placement:"bottom",children:r?u.jsx(Bd,{ref:m,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:Q,children:V||Ls}):u.jsx($5,{ref:h,variant:"body2",children:V||Ls})})},P1="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_73646)'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_73646'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",cr=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>u.jsx(d.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:u.jsxs(d.Stack,{direction:"row",children:[r&&u.jsx(d.Box,{position:"absolute",right:10,top:10,children:u.jsx(d.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(d.IconButton,{onClick:()=>t(!1),children:u.jsx("img",{src:P1})})})}),n]})}),j1=e=>{var B,R,G;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===ee.IDLE,l=(o==null?void 0:o[t])===ee.LOADING,f=(o==null?void 0:o[t])===ee.FAILED,{cardType:g,data:y,cardErrorMessage:v,redirectToAdminTab:b,connectorNames:p}=(r==null?void 0:r[t])||{},h=g==="flat",[m,x]=w.useState(!1),[C,I]=w.useState(!1),[E,_]=w.useState(!1),[T,S]=w.useState(!1),L=((B=y==null?void 0:y.listItems)==null?void 0:B.statusCode)!==401,N=w.useMemo(()=>{var H,J,re,se;return h&&((H=y==null?void 0:y.flatDisplay)!=null&&H.data)?y.flatDisplay.data:!h&&((se=(re=(J=y==null?void 0:y.listItems)==null?void 0:J.fields)==null?void 0:re[0])!=null&&se.data)?y.listItems.fields[0].data:[]},[h,y]),k=w.useMemo(()=>N==null?void 0:N.slice(0,5),[N]),[D,P]=w.useState([]),V=w.useRef(null),[z,$]=w.useState(0),Q=m?-180:0,X=h?!1:!!((R=y==null?void 0:y.listItems)!=null&&R.errorMessage),q=X||f||v,oe=c&&!X&&s&&(E||C);w.useLayoutEffect(()=>{var H;(H=V.current)!=null&&H.scrollHeight&&$(V.current.scrollHeight+i)},[o==null?void 0:o[t],D,V]),w.useEffect(()=>{var se,j;const H=((N==null?void 0:N.length)||0)>5,J=!h&&(((j=(se=y==null?void 0:y.listItems)==null?void 0:se.fields)==null?void 0:j.length)||0)>1;_(H&&!J),I(J)},[y,h,N==null?void 0:N.length]),w.useEffect(()=>{P(m?N:k)},[y,m,k,N]);const ie=()=>{E?x(H=>!H):S(H=>!H)};return u.jsxs(u.Fragment,{children:[u.jsx(cr,{shown:T,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(_x,{data:((G=y==null?void 0:y.listItems)==null?void 0:G.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx(z5,{className:s?"":"slideUp",height:z,children:u.jsx(d.Stack,{ref:V,gap:1,margin:"12px",children:l&&!(D!=null&&D.length)?u.jsxs(u.Fragment,{children:[u.jsx(_n,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(_n,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:q?u.jsx(d.Box,{margin:"8px 0",children:u.jsx(M1,{error:v,isLoading:l,redirectToAdminTab:b,isFailed:f,showErrorIcon:!L,connectorNames:p,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):D!=null&&D.length?D==null?void 0:D.map(H=>{const{value:J,label:re,deepLink:se,type:j}=H,te="errorMessage"in H?H.errorMessage:null,Ee="statusCode"in H?H.statusCode:null;return u.jsxs("div",{children:[u.jsx(Y5,{variant:"overline",children:re}),u.jsx(M1,{value:J,error:te,deepLink:se,statusCode:Ee,isLoading:l,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:re})]},re)}):u.jsx(d.Box,{margin:"8px 0",children:u.jsx(jd,{children:Y3})})})})}),!v&&oe&&u.jsx(s4,{variant:"body2_medium",onClick:ie,children:E?u.jsxs(u.Fragment,{children:[m?V4:Jd,u.jsx(o4,{src:B4,transformAngle:Q})]}):Jd})]})},Px={connectorCards:null,cardSpecificData:null,connectorApiStatus:ee.IDLE,conversationMetaDataApiStatus:ee.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},B1="/v1/api",jx=`${B1}/connectors/cards`,Bx=`${B1}/connectors/cards/:id/data`,Vx=({inboxIds:e,conversationId:t,channelType:n="email"})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",n),r.append("conversation_id",String(t||"")),Le({url:`${jx}?${r.toString()}`,method:je.GET})},Gx=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),Le({url:`${Bx.replace(":id",e)}?${o.toString()}`,method:je.GET})},V1=uc({name:"connectorCardLibrary",initialState:Px,reducers:{updateThreadId(e,t){const{payload:n}=t;e.threadId=n.threadId,e.connectorCards=null},clearConnectorList(e){e.connectorCards=null,e.cardSpecificData=null}},extraReducers:e=>{e.addCase(wa.pending,t=>{t.connectorApiStatus=ee.LOADING}).addCase(wa.fulfilled,(t,n)=>{t.connectorApiStatus=ee.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(wa.rejected,t=>{t.connectorApiStatus=ee.FAILED}).addCase(Bo.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.LOADING}}).addCase(Bo.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.IDLE}}).addCase(Bo.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):_d;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),wa=Gt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var i;const r=await Vx({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((i=r==null?void 0:r.data)==null?void 0:i.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((c,l)=>(c==null?void 0:c.priority)-(l==null?void 0:l.priority)),connectorsEnabled:s}}),Bo=Gt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Gx(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&we({message:O0,type:$t}),{data:Ld(i),status:c}):(r&&we({message:L0,type:ze}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||_d})}}),Hx=V1.reducer,G1=V1.actions,H1="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",Wx="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.4587%206.7528C11.2244%206.51848%2010.8445%206.51848%2010.6102%206.7528C10.3759%206.98711%2010.3759%207.36701%2010.6102%207.60132L11.4587%206.7528ZM12.1916%208.33414L12.6158%207.90988L12.1916%208.33414ZM8.33462%2012.1911L8.75888%2011.7668L8.33462%2012.1911ZM7.6018%2010.6097C7.36748%2010.3754%206.98758%2010.3754%206.75327%2010.6097C6.51895%2010.8441%206.51895%2011.224%206.75327%2011.4583L7.6018%2010.6097ZM4.43911%209.14411C4.67343%209.37842%205.05333%209.37842%205.28764%209.14411C5.52196%208.9098%205.52196%208.5299%205.28764%208.29558L4.43911%209.14411ZM3.70629%207.56276L4.13056%207.1385L3.70629%207.56276ZM7.56324%203.70582L7.9875%203.28155L7.56324%203.70582ZM8.29606%205.28716C8.53037%205.52148%208.91027%205.52148%209.14459%205.28716C9.3789%205.05285%209.3789%204.67295%209.14459%204.43864L8.29606%205.28716ZM10.6102%207.60132L11.7673%208.75841L12.6158%207.90988L11.4587%206.7528L10.6102%207.60132ZM11.7673%208.75841C12.1662%209.15735%2012.3904%209.69843%2012.3904%2010.2626L13.5904%2010.2626C13.5904%209.38017%2013.2398%208.53387%2012.6158%207.90988L11.7673%208.75841ZM12.3904%2010.2626C12.3904%2010.8268%2012.1662%2011.3679%2011.7673%2011.7668L12.6158%2012.6154C13.2398%2011.9914%2013.5904%2011.1451%2013.5904%2010.2626L12.3904%2010.2626ZM11.7673%2011.7668C10.9365%2012.5976%209.58963%2012.5976%208.75888%2011.7668L7.91035%2012.6154C9.20973%2013.9147%2011.3164%2013.9147%2012.6158%2012.6154L11.7673%2011.7668ZM8.75888%2011.7668L7.6018%2010.6097L6.75327%2011.4583L7.91035%2012.6154L8.75888%2011.7668ZM5.28764%208.29558L4.13056%207.1385L3.28203%207.98703L4.43911%209.14411L5.28764%208.29558ZM4.13056%207.1385C3.73162%206.73956%203.50749%206.19848%203.50749%205.63429L2.30749%205.63429C2.30749%206.51674%202.65804%207.36304%203.28203%207.98703L4.13056%207.1385ZM3.50749%205.63429C3.50749%205.0701%203.73162%204.52902%204.13056%204.13008L3.28203%203.28155C2.65804%203.90554%202.30749%204.75184%202.30749%205.63429L3.50749%205.63429ZM4.13056%204.13008C4.96131%203.29933%206.30822%203.29933%207.13897%204.13008L7.9875%203.28155C6.68812%201.98217%204.58141%201.98217%203.28203%203.28155L4.13056%204.13008ZM7.13897%204.13008L8.29606%205.28716L9.14459%204.43864L7.9875%203.28155L7.13897%204.13008Z'%20fill='%236C7B94'/%3e%3crect%20x='5.08887'%20y='6.0791'%20width='1.33333'%20height='6.66667'%20rx='0.666667'%20transform='rotate(-45%205.08887%206.0791)'%20fill='%236C7B94'/%3e%3cpath%20d='M5.59961%2014.3998V12.7998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.7998%205.59961H14.3998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.40039%2011.2002H4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2002%202.40039V4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Zx="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5908_39767)'%3e%3cpath%20d='M9.37333%206.01333L9.98667%206.62667L3.94667%2012.6667H3.33333V12.0533L9.37333%206.01333ZM11.7733%202C11.6067%202%2011.4333%202.06667%2011.3067%202.19333L10.0867%203.41333L12.5867%205.91333L13.8067%204.69333C14.0667%204.43333%2014.0667%204.01333%2013.8067%203.75333L12.2467%202.19333C12.1133%202.06%2011.9467%202%2011.7733%202ZM9.37333%204.12667L2%2011.5V14H4.5L11.8733%206.62667L9.37333%204.12667Z'%20fill='%236C7B94'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5908_39767'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",W1=e=>e.write.createObjectList,Xx=e=>e.write.createObjectConnectorNamesList,Z1=e=>e.write.linkObjectList,zx=e=>e.write.editObjectList,Yx=e=>e.write.objectDict,Jx=e=>e.write.formFields,qx=e=>e.write.linkCardApiStatus,$x=e=>e.write.unlinkCardApiStatus,Qx=e=>e.write.dependentFieldsMap,Ux=e=>e.write.createFormApiStatus,Kx=e=>e.write.updateFormApiStatus,ev=e=>e.write.currentResourceDetails,tv=e=>e.write.currentResourceDetailsApiStatus,X1=e=>e.write.currentCardInEdit,z1=e=>e.write.hasUnsavedChanges,nv=e=>typeof e=="string"?/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(e):typeof e=="object"&&"_isValid"in e,Y1=e=>Object.keys(e).sort((n,r)=>r.localeCompare(n)).reduce((n,r)=>{var o;return(typeof e[r]=="string"||typeof e[r]=="object"&&e[r]!==null)&&nv(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),rv=e=>K3.replace("{{connectorName}}",e),ov=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=Vt(),{sendTrackingEvent:c}=w.useContext(Be),f=Ce($x)===ee.LOADING,g=()=>{s&&o&&i(va({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(i3,{connector_name:a,conversation_id:s}),t(!1),r(),we({message:iy,type:$t})}).catch(()=>{we({message:cy,type:$t})})};return u.jsx(cr,{shown:e,setShown:t,showCloseButton:!0,children:u.jsxs(d.Stack,{width:"400px",padding:"20px",gap:"8px",children:[u.jsx(d.Typography,{variant:"h2",children:U3}),u.jsx(d.Typography,{variant:"body2",children:rv(a)}),u.jsxs(d.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[u.jsx(d.Button,{variant:"text",onClick:()=>t(!1),children:Gi}),u.jsx(d.Button,{disabled:f,color:"error",onClick:g,children:xd})]})]})})},sv=({actions:e,isHovered:t=!1})=>{const r=e.filter(i=>i.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),a=t?(s.length+1)*32:32;return u.jsxs(Q5,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:g})=>u.jsx(d.Tooltip,{title:l,placement:"bottom",children:u.jsx(Or,{onClick:g,disabled:c,children:u.jsx("img",{src:f})})},i))}),o&&u.jsx(d.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(Or,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},av=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=Vt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:g}=w.useContext(Be),{userGroupId:y}=Bt()||{},[v,b]=w.useState(!!s),[p,h]=w.useState(!1),[m,x]=w.useState(!1),[C,I]=w.useState(!1),{id:E,title:_,externalResourceId:T="",forms:S=[],logoUrl:L}=t;let N=E;T&&(N=`${N}_${T}`);const{data:k,cardType:D,cardErrorMessage:P,connectorNames:V}=(n==null?void 0:n[N])??{},z=(V==null?void 0:V[0])||"",$=(o==null?void 0:o[N])===ee.LOADING,Q=(o==null?void 0:o[N])===ee.FAILED,X=!!(et(c,pd)&&T),q=w.useMemo(()=>{var j,te;if(P||Q||!(et(c,B3)&&S.some(Ee=>Ee.type==="edit")))return!1;switch(D){case"flat":return!!((k==null?void 0:k.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((j=k==null?void 0:k.listItems)==null?void 0:j.fields.length)===1?(te=k==null?void 0:k.listItems)==null?void 0:te.fields.some(Ee=>Ee.externalResourceId):!1;default:return!1}},[k,D,c,S,t,P,Q]),oe=w.useCallback((j=!1)=>{const te=j?f3:d3;r&&E&&f&&i(Bo({id:E,email:r,conversationId:f,externalResourceId:T})).unwrap().then(Ee=>{const Z={...Ad(Ee,_,j,!0),sm_ids:g};l(te,Z)}).catch(Ee=>{const Z={...Ad(Ee,_,j,!1),sm_ids:g};l(te,Z)})},[i,r,E,_,l,f,T,g]);w.useEffect(()=>{v&&oe(!0)},[v,oe]);const ie=(j,te)=>{var Z;j==null||j.stopPropagation(),i(Bo({id:te,email:r,conversationId:f,isRefresh:!0,externalResourceId:T})).unwrap().then(()=>{l(Qm,{id:te})});const Ee=j.target.tagName==="BUTTON"?(Z=j.target)==null?void 0:Z.firstChild:j.target;Ee.className&&(Ee.className=""),setTimeout(()=>Ee.className="selected",1)},B=(j,te)=>{j.stopPropagation(),!(n!=null&&n[te])&&!$&&oe(),l(v?$m:qm,{id:te}),b(Ee=>!Ee)},R=j=>{j.stopPropagation();const te=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;h(!!te)},G=j=>{var Ee,Z;j.stopPropagation(),l(dd,{card_title:_,connector_name:z,ug_id:y,sm_ids:g});let te;D==="flat"?te=(k==null?void 0:k.flatDisplay.externalResourceId)??t.externalResourceId:D==="flat_with_list"&&(te=(Z=(Ee=k==null?void 0:k.listItems)==null?void 0:Ee.fields[0])==null?void 0:Z.externalResourceId),te?i(Gr({...t,externalResourceId:te})):we({message:hn,type:ze})},H=j=>{j.stopPropagation(),x(!0)},J=()=>{I(!0)},re=()=>{I(!1)},se=[{id:"unlink",label:xd,disabled:$,shown:X,iconSrc:Wx,action:j=>H(j)},{id:"refresh",label:md,disabled:$,shown:!0,iconSrc:H1,action:j=>ie(j,E)},{id:"edit",label:vd,disabled:$,shown:q,iconSrc:Zx,action:j=>G(j)}];return u.jsxs(H5,{"data-testid":`test_${E}`,onMouseEnter:J,onMouseLeave:re,children:[u.jsxs(W5,{className:v?"hiver-card-expanded":"",onClick:j=>B(j,N),children:[u.jsxs(Z5,{children:[L&&u.jsx("img",{src:L,alt:_}),u.jsx(d.Tooltip,{title:p?_:"",placement:"bottom",children:u.jsx(X5,{variant:"h4",onMouseOver:j=>R(j),onMouseLeave:j=>R(j),children:_})})]}),u.jsxs(Pd,{children:[u.jsx(sv,{actions:se,isHovered:C}),u.jsx(d.Tooltip,{title:v?bd:Bi,placement:"bottom",children:u.jsx(Or,{onClick:j=>B(j,N),children:u.jsx(Xi,{className:v?"":"hiver-up"})})})]})]}),u.jsx(j1,{id:N,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:v}),u.jsx(ov,{showUnlinkModal:m,setShowUnlinkModal:x,cardId:E,onCardUnlinking:a,conversationId:f,externalResourceId:T,connectorName:z})]})},iv=Number.MAX_SAFE_INTEGER,cv=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=w.useContext(Be),i=et(s,G3)?iv:1;return u.jsx(d.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:g}=c;let y=f;return g&&(y=`${y}_${g}`),u.jsx("div",{children:u.jsx(av,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},y)})})},Hr=({children:e})=>{if(!Array.isArray(e))return e;let t=null;return e.find(r=>typeof(r==null?void 0:r.type)!="function"?!1:(r.props.fallback&&(t=r),r.props.condition))??t};function Wr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}Hr.CaseView=Wr;const lv="Bring your favourite tools into Hiver",uv="Plugin image",dv="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",fv="Enable Connectors",pv="Enable Apps",hv="Learn more",gv="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",mv="Contact your admin to enable this",bv="https://youtu.be/ODcJnzZLb50",yv="connectors-module/assets/connectors-images/connector-mainpage.png",Cv="connectors-module/assets/connectors-images/connector-mainpage-apps.png",xv="Explore connectors",vv="Connectors",Ev=d.styled(d.Box)`
1039
+ `,D8=e=>A.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),A.createElement("g",{clipPath:"url(#clip0_7787_114457)"},A.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_7787_114457"},A.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),N8=({aspectRatio:e="auto",...t})=>{const[n,r]=w.useState(!1);return n?null:u.jsxs(k8,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(D8,{className:"play-icon"})]})},I1=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${d.tooltipClasses.arrow}`]:{...t},[`& .${d.tooltipClasses.tooltip}`]:{...e}})),Gc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},R8=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],Ro=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},Hc=({formFields:e})=>{const t={};return e.forEach(n=>{var r,o,s,a,i,c;if(t[n.name]={},(r=n.validations)!=null&&r.isRequired&&(typeof n.validations.isRequired=="object"?t[n.name].isRequired=Gy(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let l=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";l=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:l,t[n.name].validate=Hy(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=Wy();return}if(n.type==="text"&&n.limit){t[n.name].validate=dc();return}if(n.type==="table"){const l=Hc({formFields:n.columns??[]});t[n.name].validations=l}if((i=n.validations)!=null&&i.isUrl){const l=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=By(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=Vy(l)}}),t},ma={isMultiSelect:e=>Array.isArray(e)?e.every(t=>typeof t=="object"&&"label"in t&&"value"in t):!1,isTable:e=>Array.isArray(e)?e.some(n=>!!n[ga.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},ba=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return ma.isMultiSelect(o)?s=o.map(a=>a.value):ma.isTable(o)?s=o.map(({...i})=>(delete i[ga.ROW_ID],i)).filter(i=>Object.keys(i).length>0):ma.isSelect(o)?s=o.value:ma.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),M8=(e,t)=>{const n={},r=new Set;let o="";for(const s of e)s.rowId?(n[s.rowId]||(n[s.rowId]=[]),n[s.rowId].push(s),r.add(s.rowId),o=""):!n[o]||n[o].length>=t?(r.add(s.name),n[s.name]=[s],o=s.name):n[o].push(s);return[...r].map(s=>({id:s,formFields:n[s]}))},w1=(e,t)=>{if(!t||!Array.isArray(e))return 0;let n=0;for(const r of e){const o=t[r.name];if(r.type==="table"&&Array.isArray(o)){let s=0;for(const a of o){const i=w1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},rr="/v1/api",P8=`${rr}/connectors/conversation/:conversationId/metadata`,j8=`${rr}/connectors/forms/:formId/field/:fieldName/data`,B8=`${rr}/connectors/form/:formId`,V8=`${rr}/connectors/forms/:id/link`,G8=`${rr}/connectors/forms/:id/preview`,H8=`${rr}/connectors/conversation/:conversationId/selected-email`,W8=`${rr}/connectors/app-cf-values`,Z8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Se({url:mt(`${j8}?${r.toString()}`,e),method:je.POST,data:t})},X8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Se({url:mt(`${B8}?${r.toString()}`,e),method:je.POST,data:t})},z8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Se({url:`${G8.replace(":id",e)}?${r.toString()}`,method:je.POST,data:{args:t}})},Y8="https://avatars.githubusercontent.com/u/62397590",_1={optionsMap:null,createOptionApi:K.IDLE,dropdownOptionsApis:K.IDLE,previewCardData:null,previewCardApiStatus:K.IDLE,selectedSuggestionType:"basic"},S1=lc({name:"commonSlice",initialState:_1,reducers:{resetState:()=>_1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=K.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(ya.pending,t=>{t.createOptionApi=K.LOADING}).addCase(ya.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=K.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(ya.rejected,t=>{t.createOptionApi=K.FAILED}).addCase(or.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(or.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(or.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(Br.pending,t=>{t.previewCardApiStatus=K.LOADING}).addCase(Br.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=K.IDLE}).addCase(Br.rejected,t=>{t.previewCardApiStatus=K.FAILED})}}),ya=Wt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var p,h,m;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,g=Gc(c||{},s,r),{common:y}=t(),{options:v=[],...b}=((p=y.optionsMap)==null?void 0:p[g])||{};try{const x=await X8({fieldName:r,formId:a},{args:l,conversation_id:i});if(!x||!("data"in x)||!("output_variables"in x.data)||!("external_resource_id"in x.data.output_variables))throw x;const C=x.data.output_variables,{external_resource_id:I,...E}=C,T=[{label:o,value:I,prefillValues:E},...v],S=B0(T,L=>L.value);return f==null||f(S),{optionsList:S,key:g,...b}}catch(x){f==null||f(v);const C=x,I=(h=C==null?void 0:C.response)==null?void 0:h.data,E=typeof I=="string"?I:(I==null?void 0:I.message)||hn;return Ie({message:E,type:ze}),n((m=C==null?void 0:C.response)==null?void 0:m.status)}}),or=Wt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var T,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:g}=e,y=Gc(c||{},o,r),{common:v}=t();let b=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(b=a.meta.showAvatar);const p=((T=v.optionsMap)==null?void 0:T[y])||{},h=!e.isScrollToBottomEvent&&(!p||s!==p.searchTerm),m=h?[]:p.options||[],x=h?!0:p.hasMore??!0,C=h?0:p.currentPage??0,{enabled:I,limit:E}=f,_=E||10;try{let N;const k=g==null?void 0:g.signal,D=I?{pageNumber:C+1,searchTerm:s,limit:_,enabled:I}:null;if(x&&(N=await Z8({fieldName:r,formId:o},{pagination:D||{},args:c,interfaceId:l})),k!=null&&k.aborted)throw k.reason;if(!N||!N.data||!("data"in N.data)||!Array.isArray(N.data.data)||!N.data.data.length){const{common:X}=t(),J=(S=X.optionsMap)==null?void 0:S[y];return i==null||i(J.options??[]),{...J,optionsList:J.options??[],key:y,hasMore:!1}}const V=N.data.data.map(X=>b?{...X,avatarUrl:X.avatarUrl||Y8}:(delete X.avatarUrl,X)),z=[...m,...V],q=I?V.length>=_:!1,$=B0(z,X=>X.value);return i==null||i($),{optionsList:$,fieldName:r,formId:o,searchTerm:s,currentPage:C+1,hasMore:q,key:y}}catch(N){const{common:k}=t(),D=((L=k.optionsMap)==null?void 0:L[y])||{};return i==null||i(D.options??[]),n(N)}},{condition:(e,{getState:t})=>{var g;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=Gc(a||{},r,n),{common:c}=t(),l=(g=c.optionsMap)==null?void 0:g[i];if((l==null?void 0:l.searchTerm)!==o)return!0;const f=(l==null?void 0:l.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),Br=Wt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await z8(e,t,n),i=a==null?void 0:a.data;return i?(r&&Ie({message:O0,type:Kt}),{data:Ld(i)}):(r&&Ie({message:L0,type:ze}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:US,resetPreviewCardData:J8,setSelectedSuggestionType:q8}=S1.actions,$8=S1.reducer,Mo="/v1/api",Q8=`${Mo}/connectors/forms/list`,U8=`${Mo}/connectors/cards/:id/unlink`,K8=`${Mo}/connectors/forms/:id/link`,ex=`${Mo}/connectors/form/:formId`,tx=`${Mo}/connectors/forms/:formId/data`,nx=({inboxIds:e,channelType:t,conversationId:n})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",t),r.append("conversation_id",String(n)),Se({url:`${Q8}?${r.toString()}`,method:je.GET})},T1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Se({url:mt(`${ex}?${r.toString()}`,e),method:je.POST,data:t})},rx=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),Se({url:`${U8.replace(":id",e)}?${o.toString()}`,method:je.POST,data:{externalResourceId:n,conversationId:r}})},ox=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),Se({url:`${K8.replace(":id",e)}?${s.toString()}`,method:je.POST,data:{externalResourceId:t,conversationId:r}})},sx=(e,t="email",n,r,o)=>{const s=new URLSearchParams;return s.append("channel_type",t),s.append("conversation_id",String(n||"")),s.append("senderEmail",o),s.append("externalResourceId",r),Se({url:`${tx.replace(":formId",e)}?${s.toString()}`,method:je.GET})},ax="Error in previewing the card",A1="Link format isn't recognized. Please check that you've entered a valid URL",ix="Item already linked",cx="Card linked successfully",lx="Error in linking the card",ux="New card created",dx="Card creation failed",fx="Create and link objects from different apps to this conversation",px="Are you sure you want to change the primary object?",hx="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",gx="Are you sure you want to leave?",mx=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
1040
+ Do you want to continue?`,bx="Select an object to create",yx="Select an object to link",L1="Select object",Cx="Paste URL or ID",xx="Object ID/Link",vx="Card updated",Ex="Card updation failed",O1=3,F1=(e,t)=>{var r,o,s,a,i,c,l,f,g,y,v,b,p;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((f=(l=e.validations)==null?void 0:l.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((y=(g=e.validations)==null?void 0:g.range)==null?void 0:y.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((v=e.validations)==null?void 0:v.maxRows)||5,limit:(b=e.validations)==null?void 0:b.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(p=e.validations)==null?void 0:p.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},k1=lc({name:"writeCapability",initialState:F0,reducers:{resetState:()=>F0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=K.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(Ca.pending,t=>{t.objectListApiStatus=K.LOADING}).addCase(Ca.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=K.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=f}).addCase(Ca.rejected,t=>{t.objectListApiStatus=K.FAILED}).addCase(or.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(or.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(or.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(xa.pending,t=>{t.createFormApiStatus=K.LOADING}).addCase(xa.fulfilled,t=>{t.createFormApiStatus=K.IDLE}).addCase(xa.rejected,t=>{t.createFormApiStatus=K.FAILED}).addCase(Ia.pending,t=>{t.linkCardApiStatus=K.LOADING}).addCase(Ia.fulfilled,t=>{t.linkCardApiStatus=K.IDLE}).addCase(Ia.rejected,t=>{t.linkCardApiStatus=K.FAILED}).addCase(Ea.pending,t=>{t.unlinkCardApiStatus=K.LOADING}).addCase(Ea.fulfilled,t=>{t.unlinkCardApiStatus=K.IDLE}).addCase(Ea.rejected,t=>{t.unlinkCardApiStatus=K.FAILED}).addCase(va.pending,t=>{t.updateFormApiStatus=K.LOADING}).addCase(va.fulfilled,t=>{t.updateFormApiStatus=K.IDLE}).addCase(va.rejected,t=>{t.updateFormApiStatus=K.FAILED}).addCase(wa.pending,t=>{t.currentResourceDetailsApiStatus=K.LOADING}).addCase(wa.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=K.IDLE}).addCase(wa.rejected,t=>{t.currentResourceDetailsApiStatus=K.FAILED})}}),Ca=Wt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await nx({inboxIds:t,channelType:n,conversationId:r});if(!s||!s.data||!("formsList"in s.data)||!Array.isArray(s.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const a=s.data.formsList,i={},c=[],l=[],f=[],g=[],y=[],v={},b={};return a==null||a.forEach(p=>{var m,x;if(p.expandedView&&!o)return;const h={...p};"fieldList"in h&&delete h.fieldList,b[p.id]=h,i[p.id]||(i[p.id]={}),v[p.id]||(v[p.id]=[]),p.type==="create"&&p.authenticated?(c.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!l.includes(p.connectorName)&&l.push(p.connectorName)):p.type==="link"&&p.authenticated?f.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?g.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&y.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(m=p.fieldList)==null||m.sort((C,I)=>C.priority-I.priority),(x=p.fieldList)==null||x.forEach(C=>{const I=F1(C);if(I.columns&&(I.columns=I.columns.map(E=>F1(E,{loadOptionsOnFocus:!0,defaultOptions:!1}))),v[p.id]=[...v[p.id],I],C.interfaceDetails&&(C.interfaceDetails.args||C.interfaceDetails.optionalArgs)){const E={...C.interfaceDetails.args,...C.interfaceDetails.optionalArgs};Object.values(E).forEach(_=>{i[p.id][_]?i[p.id][_]=[...i[p.id][_],C.name]:i[p.id][_]=[C.name]})}})}),{createObjectList:c,createObjectConnectorNamesList:l,linkObjectList:f,editObjectList:g,searchObjectList:y,formFields:v,objectDict:b,dependentFieldsMap:i}}),xa=Wt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await T1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),Ie({message:ux,type:Kt})}catch(l){const f=l,g=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(g==null?void 0:g.message)??dx;return o==null||o(l),Ie({message:y,type:ze}),t(l)}}),va=Wt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await T1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),Ie({message:vx,type:Kt})}catch(f){return o==null||o(f),Ie({message:Ex,type:ze}),t(f)}}),Ea=Wt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await rx(e,t,n,r)}),Ia=Wt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await ox(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),wa=Wt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await sx(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,y])=>{"label"in y&&(y.type&&y.type==="date"?f.values[g]=y.label?new Date(parseInt(y.label)).toISOString():"":y.type&&y.type==="multi-select"&&"value"in y&&"label"in y&&y.value&&y.label?f.values[g]=[{value:y.value,label:y.label}]:y.value?f.values[g]={value:y.value,label:y.label}:f.values[g]=y.label)}),{data:f,status:l}}catch(i){return Ie({message:hn,type:ze}),t(i)}}),{resetState:KS,setCurrentCardInEdit:Vr,resetCurrentResourceDetails:Ix,setHasUnsavedChanges:D1}=k1.actions,wx=k1.reducer,_x=()=>{const[e,t]=w.useState(null),[n,r]=w.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=w.useCallback(s=>{t(s)},[]);return w.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const a=100;let i=null;const c=150,l=f=>{s||(s=window.setTimeout(()=>{const g=f.target,y=Number(e.dataset.prevScrollLeft)||0,v=Number(e.dataset.prevScrollTop)||0,b=g.scrollLeft,p=g.scrollTop,h=b-y,m=p-v,x=Math.abs(m)>Math.abs(h),C=Math.abs(h)>Math.abs(m);r({isVertical:x,isHorizontal:C,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(p),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(g=>({...g,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},Sx="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.8016%2011.709L12.3416%205.16893L11.4298%204.25712L4.88979%2010.7972V11.709H5.8016ZM6.33618%2012.9987H3.6001V10.2626L10.9739%202.88875C11.0948%202.76786%2011.2588%202.69995%2011.4298%202.69995C11.6008%202.69995%2011.7648%202.76786%2011.8857%202.88875L13.71%204.71302C13.8309%204.83395%2013.8988%204.99794%2013.8988%205.16893C13.8988%205.33992%2013.8309%205.50391%2013.71%205.62484L6.33618%2012.9987ZM3.6001%2014.2884H15.2073V15.578H3.6001V14.2884Z'%20fill='%236C7B94'/%3e%3c/svg%3e",Tx=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),{userGroupId:i}=Gt()||{},[c,l]=_x(),{isScrolling:f,isVertical:g}=c,y=f&&g,v=w.useMemo(()=>(e==null?void 0:e[0].data.map(m=>m.label))||[],[e]),b=w.useMemo(()=>e.map(m=>{const x={cells:{},externalResourceId:m.externalResourceId};return m.data.forEach((C,I)=>{if(v[I]){let E=C.value?C.value:Os;E&&C.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),x.cells[v[I]]={label:E,deepLink:C==null?void 0:C.deepLink}}}),x}),[e,v]),p=(m,x)=>u.jsx(n4,{align:"left",children:m.deepLink?u.jsx(d.Link,{target:"_blank",underline:"none",href:m.deepLink,children:m.label}):u.jsx(d.Typography,{variant:"body2",color:"gray.black",children:m.label})},`${x}_${m.label}`),h=m=>{!m||!n||(r(!1),s(dd,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(Vr({...n,externalResourceId:m})))};return u.jsxs(d.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[u.jsx(d.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),u.jsx(d.TableContainer,{ref:l,children:u.jsxs(d.Table,{stickyHeader:!0,children:[u.jsx(K5,{children:u.jsxs(d.TableRow,{children:[v.map(m=>u.jsx(e4,{sx:{whiteSpace:"nowrap"},children:u.jsx(d.Typography,{variant:"overline",color:"gray.gray3",children:m})},m)),u.jsx(o4,{})]})}),u.jsx(d.TableBody,{children:b.map((m,x)=>u.jsxs(t4,{children:[Object.values(m.cells).map((C,I)=>p(C,I)),u.jsx(r4,{children:!y&&m.externalResourceId&&u.jsx(d.Tooltip,{title:vd,placement:"bottom",children:u.jsx(d.IconButton,{className:"row-edit",onClick:()=>h(m.externalResourceId),children:u.jsx("img",{src:Sx})})})})]},`id_${x}`))})]})})]})},Ax=e=>e.cardList.connectorCards,Lx=e=>e.cardList.connectorsEnabled,Ox=e=>e.cardList.connectorApiStatus,Fx=e=>e.cardList.cardSpecificData,kx=e=>e.cardList.specificConnectorApiStatus,Dx=e=>e.cardList.specificConnectorErrorCode,Nx=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==K.IDLE||!n?!1:Object.values(n).every(r=>r===K.IDLE||r===K.FAILED)},Rx="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9%204.8675L14.6475%2014.625H3.3525L9%204.8675ZM9%201.875L0.75%2016.125H17.25L9%201.875Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%2012.375H8.25V13.875H9.75V12.375Z'%20fill='%23F07530'/%3e%3cpath%20d='M9.75%207.875H8.25V11.625H9.75V7.875Z'%20fill='%23F07530'/%3e%3c/svg%3e",N1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,R1=e=>{const t=/\(Error code: (.*?)\)$/,n=e.match(t),r=n?n[1]:null,o=n?e.replace(t,"").trim():e;return{error_code:r,error_message:o}},Mx=(e,t)=>`${wd} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),Px=(e,t,n)=>{var l,f,g,y,v;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((v=(y=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:y[0])!=null&&v.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&N1.test(c)?!0:!M1(e,t,n)&&!i.length},M1=(e,t,n)=>{var f,g;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(g=(f=o.data)==null?void 0:f.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===K.FAILED,c=o.cardErrorMessage,l=c&&N1.test(c);return i||a||c&&!l};function jx(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const l=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[l],g=(f==null?void 0:f.connectorNames)??[];for(const y of g)r[y]||(r[y]=[],o[y]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[y].push(c),o[y].cards_visible+=1,o[y].card_key.push(c.id),o[y].card_title.push(c.title),Px(c,t,n)&&(o[y].empty_cards+=1,s+=1),M1(c,t,n)&&(o[y].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,l])=>({app_name:c,...l})),total_empty_cards:s,total_cards_with_errors:a}}const P1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:g,cardId:y,isCardLevelError:v,fieldName:b,showErrorIcon:p}=e,h=w.useRef(null),m=w.useRef(null),{email:x,currentSmIds:C,conversationId:I,sendTrackingEvent:E,connectorFunctions:_}=w.useContext(Be),T=Ce(Dx),S=T==null?void 0:T[y],[L,N]=w.useState(!1),k=w.useMemo(()=>{if(n&&v){const{error_message:J}=R1(n);return J}return c?wd.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):gd},[n,c,l,v]),D=w.useCallback(()=>{const J=n||Mx(S,l),{error_code:oe,error_message:ae}=R1(J);E==null||E(v3,{sm_ids:C,frontend_req_params:{email:x,conversationId:I,externalResourceId:g==null?void 0:g.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:oe,error_message:ae})},[n,S,E,C,x,I,f,l,g==null?void 0:g.externalResourceId]);w.useEffect(()=>{(n&&v||c&&S)&&D()},[D,S,c,n,v]),w.useEffect(()=>{const J=r?m.current:h.current;if(J){const oe=J.scrollHeight>J.clientHeight||J.scrollWidth>J.clientWidth;N(oe)}},[t,r]);const M=o==Pi.NOT_FOUND;let V=M?Os:t;a==="date"&&V&&!M&&(V=new Date(parseInt(V)).toLocaleDateString(navigator.language));const z=!!n||c,q=()=>{i?_==null||_.redirectToAdmin():window.open(s5,"_blank")},$=()=>{E==null||E(E3,{sm_ids:C,card_title:f,field_name:b})},X=J=>{const oe=/<>(.*?)<>/g,ae=J.split(oe);return u.jsx(w.Fragment,{children:ae.map((B,P)=>P%2===1?u.jsx(q5,{variant:"body2",onClick:q,children:B},P):B)})};return s?u.jsx(_n,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):z?u.jsxs(Pd,{gap:"7px",children:[p?u.jsx(d.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:Rx,width:"18px",height:"18px"})}):null,u.jsx(jd,{variant:"body2",children:k?X(k):gd})]}):u.jsx(d.Tooltip,{title:L?V:null,placement:"bottom",children:r?u.jsx(Bd,{ref:m,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:$,children:V||Os}):u.jsx(Q5,{ref:h,variant:"body2",children:V||Os})})},j1="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_73646)'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_73646'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",sr=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>u.jsx(d.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:u.jsxs(d.Stack,{direction:"row",children:[r&&u.jsx(d.Box,{position:"absolute",right:10,top:10,children:u.jsx(d.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(d.IconButton,{onClick:()=>t(!1),children:u.jsx("img",{src:j1})})})}),n]})}),B1=e=>{var B,P,G;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===K.IDLE,l=(o==null?void 0:o[t])===K.LOADING,f=(o==null?void 0:o[t])===K.FAILED,{cardType:g,data:y,cardErrorMessage:v,redirectToAdminTab:b,connectorNames:p}=(r==null?void 0:r[t])||{},h=g==="flat",[m,x]=w.useState(!1),[C,I]=w.useState(!1),[E,_]=w.useState(!1),[T,S]=w.useState(!1),L=((B=y==null?void 0:y.listItems)==null?void 0:B.statusCode)!==401,N=w.useMemo(()=>{var H,Y,re,se;return h&&((H=y==null?void 0:y.flatDisplay)!=null&&H.data)?y.flatDisplay.data:!h&&((se=(re=(Y=y==null?void 0:y.listItems)==null?void 0:Y.fields)==null?void 0:re[0])!=null&&se.data)?y.listItems.fields[0].data:[]},[h,y]),k=w.useMemo(()=>N==null?void 0:N.slice(0,5),[N]),[D,M]=w.useState([]),V=w.useRef(null),[z,q]=w.useState(0),$=m?-180:0,X=h?!1:!!((P=y==null?void 0:y.listItems)!=null&&P.errorMessage),J=X||f||v,oe=c&&!X&&s&&(E||C);w.useLayoutEffect(()=>{var H;(H=V.current)!=null&&H.scrollHeight&&q(V.current.scrollHeight+i)},[o==null?void 0:o[t],D,V]),w.useEffect(()=>{var se,j;const H=((N==null?void 0:N.length)||0)>5,Y=!h&&(((j=(se=y==null?void 0:y.listItems)==null?void 0:se.fields)==null?void 0:j.length)||0)>1;_(H&&!Y),I(Y)},[y,h,N==null?void 0:N.length]),w.useEffect(()=>{M(m?N:k)},[y,m,k,N]);const ae=()=>{E?x(H=>!H):S(H=>!H)};return u.jsxs(u.Fragment,{children:[u.jsx(sr,{shown:T,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(Tx,{data:((G=y==null?void 0:y.listItems)==null?void 0:G.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx(Y5,{className:s?"":"slideUp",height:z,children:u.jsx(d.Stack,{ref:V,gap:1,margin:"12px",children:l&&!(D!=null&&D.length)?u.jsxs(u.Fragment,{children:[u.jsx(_n,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(_n,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:J?u.jsx(d.Box,{margin:"8px 0",children:u.jsx(P1,{error:v,isLoading:l,redirectToAdminTab:b,isFailed:f,showErrorIcon:!L,connectorNames:p,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):D!=null&&D.length?D==null?void 0:D.map(H=>{const{value:Y,label:re,deepLink:se,type:j}=H,te="errorMessage"in H?H.errorMessage:null,Ee="statusCode"in H?H.statusCode:null;return u.jsxs("div",{children:[u.jsx(J5,{variant:"overline",children:re}),u.jsx(P1,{value:Y,error:te,deepLink:se,statusCode:Ee,isLoading:l,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:re})]},re)}):u.jsx(d.Box,{margin:"8px 0",children:u.jsx(jd,{children:J3})})})})}),!v&&oe&&u.jsx(a4,{variant:"body2_medium",onClick:ae,children:E?u.jsxs(u.Fragment,{children:[m?G4:Jd,u.jsx(s4,{src:V4,transformAngle:$})]}):Jd})]})},Bx={connectorCards:null,cardSpecificData:null,connectorApiStatus:K.IDLE,conversationMetaDataApiStatus:K.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},V1="/v1/api",Vx=`${V1}/connectors/cards`,Gx=`${V1}/connectors/cards/:id/data`,Hx=({inboxIds:e,conversationId:t,channelType:n="email"})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",n),r.append("conversation_id",String(t||"")),Se({url:`${Vx}?${r.toString()}`,method:je.GET})},Wx=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),Se({url:`${Gx.replace(":id",e)}?${o.toString()}`,method:je.GET})},G1=lc({name:"connectorCardLibrary",initialState:Bx,reducers:{updateThreadId(e,t){const{payload:n}=t;e.threadId=n.threadId,e.connectorCards=null},clearConnectorList(e){e.connectorCards=null,e.cardSpecificData=null}},extraReducers:e=>{e.addCase(_a.pending,t=>{t.connectorApiStatus=K.LOADING}).addCase(_a.fulfilled,(t,n)=>{t.connectorApiStatus=K.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(_a.rejected,t=>{t.connectorApiStatus=K.FAILED}).addCase(Po.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.LOADING}}).addCase(Po.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.IDLE}}).addCase(Po.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):_d;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),_a=Wt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var i;const r=await Hx({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((i=r==null?void 0:r.data)==null?void 0:i.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((c,l)=>(c==null?void 0:c.priority)-(l==null?void 0:l.priority)),connectorsEnabled:s}}),Po=Wt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Wx(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&Ie({message:O0,type:Kt}),{data:Ld(i),status:c}):(r&&Ie({message:L0,type:ze}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||_d})}}),Zx=G1.reducer,H1=G1.actions,W1="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",Xx="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.4587%206.7528C11.2244%206.51848%2010.8445%206.51848%2010.6102%206.7528C10.3759%206.98711%2010.3759%207.36701%2010.6102%207.60132L11.4587%206.7528ZM12.1916%208.33414L12.6158%207.90988L12.1916%208.33414ZM8.33462%2012.1911L8.75888%2011.7668L8.33462%2012.1911ZM7.6018%2010.6097C7.36748%2010.3754%206.98758%2010.3754%206.75327%2010.6097C6.51895%2010.8441%206.51895%2011.224%206.75327%2011.4583L7.6018%2010.6097ZM4.43911%209.14411C4.67343%209.37842%205.05333%209.37842%205.28764%209.14411C5.52196%208.9098%205.52196%208.5299%205.28764%208.29558L4.43911%209.14411ZM3.70629%207.56276L4.13056%207.1385L3.70629%207.56276ZM7.56324%203.70582L7.9875%203.28155L7.56324%203.70582ZM8.29606%205.28716C8.53037%205.52148%208.91027%205.52148%209.14459%205.28716C9.3789%205.05285%209.3789%204.67295%209.14459%204.43864L8.29606%205.28716ZM10.6102%207.60132L11.7673%208.75841L12.6158%207.90988L11.4587%206.7528L10.6102%207.60132ZM11.7673%208.75841C12.1662%209.15735%2012.3904%209.69843%2012.3904%2010.2626L13.5904%2010.2626C13.5904%209.38017%2013.2398%208.53387%2012.6158%207.90988L11.7673%208.75841ZM12.3904%2010.2626C12.3904%2010.8268%2012.1662%2011.3679%2011.7673%2011.7668L12.6158%2012.6154C13.2398%2011.9914%2013.5904%2011.1451%2013.5904%2010.2626L12.3904%2010.2626ZM11.7673%2011.7668C10.9365%2012.5976%209.58963%2012.5976%208.75888%2011.7668L7.91035%2012.6154C9.20973%2013.9147%2011.3164%2013.9147%2012.6158%2012.6154L11.7673%2011.7668ZM8.75888%2011.7668L7.6018%2010.6097L6.75327%2011.4583L7.91035%2012.6154L8.75888%2011.7668ZM5.28764%208.29558L4.13056%207.1385L3.28203%207.98703L4.43911%209.14411L5.28764%208.29558ZM4.13056%207.1385C3.73162%206.73956%203.50749%206.19848%203.50749%205.63429L2.30749%205.63429C2.30749%206.51674%202.65804%207.36304%203.28203%207.98703L4.13056%207.1385ZM3.50749%205.63429C3.50749%205.0701%203.73162%204.52902%204.13056%204.13008L3.28203%203.28155C2.65804%203.90554%202.30749%204.75184%202.30749%205.63429L3.50749%205.63429ZM4.13056%204.13008C4.96131%203.29933%206.30822%203.29933%207.13897%204.13008L7.9875%203.28155C6.68812%201.98217%204.58141%201.98217%203.28203%203.28155L4.13056%204.13008ZM7.13897%204.13008L8.29606%205.28716L9.14459%204.43864L7.9875%203.28155L7.13897%204.13008Z'%20fill='%236C7B94'/%3e%3crect%20x='5.08887'%20y='6.0791'%20width='1.33333'%20height='6.66667'%20rx='0.666667'%20transform='rotate(-45%205.08887%206.0791)'%20fill='%236C7B94'/%3e%3cpath%20d='M5.59961%2014.3998V12.7998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.7998%205.59961H14.3998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.40039%2011.2002H4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2002%202.40039V4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",zx="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5908_39767)'%3e%3cpath%20d='M9.37333%206.01333L9.98667%206.62667L3.94667%2012.6667H3.33333V12.0533L9.37333%206.01333ZM11.7733%202C11.6067%202%2011.4333%202.06667%2011.3067%202.19333L10.0867%203.41333L12.5867%205.91333L13.8067%204.69333C14.0667%204.43333%2014.0667%204.01333%2013.8067%203.75333L12.2467%202.19333C12.1133%202.06%2011.9467%202%2011.7733%202ZM9.37333%204.12667L2%2011.5V14H4.5L11.8733%206.62667L9.37333%204.12667Z'%20fill='%236C7B94'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5908_39767'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Z1=e=>e.write.createObjectList,Yx=e=>e.write.createObjectConnectorNamesList,X1=e=>e.write.linkObjectList,Jx=e=>e.write.editObjectList,qx=e=>e.write.objectDict,$x=e=>e.write.formFields,Qx=e=>e.write.linkCardApiStatus,Ux=e=>e.write.unlinkCardApiStatus,Kx=e=>e.write.dependentFieldsMap,ev=e=>e.write.createFormApiStatus,tv=e=>e.write.updateFormApiStatus,nv=e=>e.write.currentResourceDetails,rv=e=>e.write.currentResourceDetailsApiStatus,z1=e=>e.write.currentCardInEdit,Y1=e=>e.write.hasUnsavedChanges,ov=e=>typeof e=="string"?/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(e):typeof e=="object"&&"_isValid"in e,J1=e=>Object.keys(e).sort((n,r)=>r.localeCompare(n)).reduce((n,r)=>{var o;return(typeof e[r]=="string"||typeof e[r]=="object"&&e[r]!==null)&&ov(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),sv=e=>e5.replace("{{connectorName}}",e),av=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=Ht(),{sendTrackingEvent:c}=w.useContext(Be),f=Ce(Ux)===K.LOADING,g=()=>{s&&o&&i(Ea({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(c3,{connector_name:a,conversation_id:s}),t(!1),r(),Ie({message:cy,type:Kt})}).catch(()=>{Ie({message:ly,type:Kt})})};return u.jsx(sr,{shown:e,setShown:t,showCloseButton:!0,children:u.jsxs(d.Stack,{width:"400px",padding:"20px",gap:"8px",children:[u.jsx(d.Typography,{variant:"h2",children:K3}),u.jsx(d.Typography,{variant:"body2",children:sv(a)}),u.jsxs(d.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[u.jsx(d.Button,{variant:"text",onClick:()=>t(!1),children:Vi}),u.jsx(d.Button,{disabled:f,color:"error",onClick:g,children:xd})]})]})})},iv=({actions:e,isHovered:t=!1})=>{const r=e.filter(i=>i.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),a=t?(s.length+1)*32:32;return u.jsxs(U5,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:g})=>u.jsx(d.Tooltip,{title:l,placement:"bottom",children:u.jsx(Lr,{onClick:g,disabled:c,children:u.jsx("img",{src:f})})},i))}),o&&u.jsx(d.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(Lr,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},cv=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=Ht(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:g}=w.useContext(Be),{userGroupId:y}=Gt()||{},[v,b]=w.useState(!!s),[p,h]=w.useState(!1),[m,x]=w.useState(!1),[C,I]=w.useState(!1),{id:E,title:_,externalResourceId:T="",forms:S=[],logoUrl:L}=t;let N=E;T&&(N=`${N}_${T}`);const{data:k,cardType:D,cardErrorMessage:M,connectorNames:V}=(n==null?void 0:n[N])??{},z=(V==null?void 0:V[0])||"",q=(o==null?void 0:o[N])===K.LOADING,$=(o==null?void 0:o[N])===K.FAILED,X=!!(et(c,pd)&&T),J=w.useMemo(()=>{var j,te;if(M||$||!(et(c,V3)&&S.some(Ee=>Ee.type==="edit")))return!1;switch(D){case"flat":return!!((k==null?void 0:k.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((j=k==null?void 0:k.listItems)==null?void 0:j.fields.length)===1?(te=k==null?void 0:k.listItems)==null?void 0:te.fields.some(Ee=>Ee.externalResourceId):!1;default:return!1}},[k,D,c,S,t,M,$]),oe=w.useCallback((j=!1)=>{const te=j?p3:f3;r&&E&&f&&i(Po({id:E,email:r,conversationId:f,externalResourceId:T})).unwrap().then(Ee=>{const Z={...Ad(Ee,_,j,!0),sm_ids:g};l(te,Z)}).catch(Ee=>{const Z={...Ad(Ee,_,j,!1),sm_ids:g};l(te,Z)})},[i,r,E,_,l,f,T,g]);w.useEffect(()=>{v&&oe(!0)},[v,oe]);const ae=(j,te)=>{var Z;j==null||j.stopPropagation(),i(Po({id:te,email:r,conversationId:f,isRefresh:!0,externalResourceId:T})).unwrap().then(()=>{l(Um,{id:te})});const Ee=j.target.tagName==="BUTTON"?(Z=j.target)==null?void 0:Z.firstChild:j.target;Ee.className&&(Ee.className=""),setTimeout(()=>Ee.className="selected",1)},B=(j,te)=>{j.stopPropagation(),!(n!=null&&n[te])&&!q&&oe(),l(v?Qm:$m,{id:te}),b(Ee=>!Ee)},P=j=>{j.stopPropagation();const te=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;h(!!te)},G=j=>{var Ee,Z;j.stopPropagation(),l(dd,{card_title:_,connector_name:z,ug_id:y,sm_ids:g});let te;D==="flat"?te=(k==null?void 0:k.flatDisplay.externalResourceId)??t.externalResourceId:D==="flat_with_list"&&(te=(Z=(Ee=k==null?void 0:k.listItems)==null?void 0:Ee.fields[0])==null?void 0:Z.externalResourceId),te?i(Vr({...t,externalResourceId:te})):Ie({message:hn,type:ze})},H=j=>{j.stopPropagation(),x(!0)},Y=()=>{I(!0)},re=()=>{I(!1)},se=[{id:"unlink",label:xd,disabled:q,shown:X,iconSrc:Xx,action:j=>H(j)},{id:"refresh",label:md,disabled:q,shown:!0,iconSrc:W1,action:j=>ae(j,E)},{id:"edit",label:vd,disabled:q,shown:J,iconSrc:zx,action:j=>G(j)}];return u.jsxs(W5,{"data-testid":`test_${E}`,onMouseEnter:Y,onMouseLeave:re,children:[u.jsxs(Z5,{className:v?"hiver-card-expanded":"",onClick:j=>B(j,N),children:[u.jsxs(X5,{children:[L&&u.jsx("img",{src:L,alt:_}),u.jsx(d.Tooltip,{title:p?_:"",placement:"bottom",children:u.jsx(z5,{variant:"h4",onMouseOver:j=>P(j),onMouseLeave:j=>P(j),children:_})})]}),u.jsxs(Pd,{children:[u.jsx(iv,{actions:se,isHovered:C}),u.jsx(d.Tooltip,{title:v?bd:ji,placement:"bottom",children:u.jsx(Lr,{onClick:j=>B(j,N),children:u.jsx(Zi,{className:v?"":"hiver-up"})})})]})]}),u.jsx(B1,{id:N,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:v}),u.jsx(av,{showUnlinkModal:m,setShowUnlinkModal:x,cardId:E,onCardUnlinking:a,conversationId:f,externalResourceId:T,connectorName:z})]})},lv=Number.MAX_SAFE_INTEGER,uv=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=w.useContext(Be),i=et(s,H3)?lv:1;return u.jsx(d.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:g}=c;let y=f;return g&&(y=`${y}_${g}`),u.jsx("div",{children:u.jsx(cv,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},y)})})},Gr=({children:e})=>{if(!Array.isArray(e))return e;let t=null;return e.find(r=>typeof(r==null?void 0:r.type)!="function"?!1:(r.props.fallback&&(t=r),r.props.condition))??t};function Hr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}Gr.CaseView=Hr;const dv="Bring your favourite tools into Hiver",fv="Plugin image",pv="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",hv="Enable Connectors",gv="Enable Apps",mv="Learn more",bv="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",yv="Contact your admin to enable this",Cv="https://youtu.be/ODcJnzZLb50",xv="connectors-module/assets/connectors-images/connector-mainpage.png",vv="connectors-module/assets/connectors-images/connector-mainpage-apps.png",Ev="Explore connectors",Iv="Connectors",wv=d.styled(d.Box)`
1041
1041
  padding-top: 20px;
1042
- `,Iv=d.styled(d.Stack)`
1042
+ `,_v=d.styled(d.Stack)`
1043
1043
  width: 100%;
1044
1044
  height: 97px;
1045
1045
  background-color: ${d.theme.palette.purple.light};
@@ -1055,21 +1055,21 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1055
1055
  height: 56px;
1056
1056
  width: 102px;
1057
1057
  }
1058
- `,wv=d.styled(d.Typography)`
1058
+ `,Sv=d.styled(d.Typography)`
1059
1059
  color: ${d.theme.palette.gray.gray1};
1060
1060
  height: 54px;
1061
1061
  width: 120px;
1062
1062
  line-height: 18px;
1063
- `,_v=d.styled(d.Link)`
1063
+ `,Tv=d.styled(d.Link)`
1064
1064
  display: block;
1065
1065
  width: 100%;
1066
1066
  margin-bottom: 20px;
1067
1067
  margin-top: 12px;
1068
- `,Sv=d.styled(d.Typography)`
1068
+ `,Av=d.styled(d.Typography)`
1069
1069
  color: ${d.theme.palette.gray.gray1};
1070
1070
  font-size: 13px;
1071
1071
  margin-bottom: 24px;
1072
- `,J1=d.styled(d.Button)`
1072
+ `,q1=d.styled(d.Button)`
1073
1073
  width: 100%;
1074
1074
  color: ${d.theme.palette.gray.black};
1075
1075
  background-color: white;
@@ -1079,17 +1079,17 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1079
1079
  background-color: #e3dfff;
1080
1080
  border: 1px solid ${d.theme.palette.purple.primary};
1081
1081
  }
1082
- `,Tv=d.styled(d.Stack)`
1082
+ `,Lv=d.styled(d.Stack)`
1083
1083
  margin-top: 16px;
1084
1084
  justify-content: center;
1085
1085
  align-items: center;
1086
1086
  gap: 8px;
1087
- `,Av=d.styled(d.icons.InfoOutlined)`
1087
+ `,Ov=d.styled(d.icons.InfoOutlined)`
1088
1088
  width: 18px;
1089
1089
  color: ${d.theme.palette.gray.gray3};
1090
- `,Lv=d.styled(d.Typography)`
1090
+ `,Fv=d.styled(d.Typography)`
1091
1091
  color: ${d.theme.palette.gray.gray3};
1092
- `,Ov="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",Fv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_HIVER_CDN_URL:"https://cdn.hiverhq.com/",VITE_MY_ENV_VAR:"myVariable From Agent"},{VITE_HIVER_CDN_URL:kv}=Fv,q1=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=w.useContext(Be),s=et(r,P3),a=et(r,As),i=g=>{g.stopPropagation(),n(Ym),o==null||o.redirectToAdmin()},c=g=>{g.stopPropagation(),n(Jm),window.open(gv,"_blank")},l=()=>{n(C3,{source:"main_tab"})},f=a?Cv:yv;return u.jsxs(Ev,{"data-testid":"noConnectors",children:[s?u.jsxs(u.Fragment,{children:[t?null:u.jsx(d.Typography,{variant:"h2",children:a?Vi:vv}),u.jsx(_v,{onClick:l,href:bv,target:"_blank",children:u.jsx(k8,{src:kv+f,alt:xv,aspectRatio:"1000/783"})})]}):u.jsxs(Iv,{children:[u.jsx(wv,{variant:"body1_medium",children:lv}),u.jsx("img",{src:Ov,alt:uv})]}),u.jsx(Sv,{variant:"body2",children:dv}),e?u.jsx(J1,{endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?pv:fv}):u.jsxs(u.Fragment,{children:[u.jsx(J1,{onClick:c,children:hv}),u.jsxs(Tv,{direction:"row",children:[u.jsx(Av,{}),u.jsx(Lv,{variant:"caption",children:mv})]})]})]})},Dv=()=>{const{availableFeatures:e}=w.useContext(Be),t=et(e,As);return u.jsxs(Md,{children:[u.jsxs(d.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?u.jsx(kd,{width:"20px",height:"20px"}):u.jsx(Nd,{}),u.jsx(Rd,{variant:"h2",children:t?Vi:yd})]}),u.jsxs(d.Stack,{gap:"12px",children:[u.jsx(_n,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(_n,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(_n,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},Nv=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=w.useContext(Be),[o,s]=w.useState(!1),a=w.useRef(null),[i,c]=w.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:g=[],title:y}=l||{},{version:v=""}=l||{},b=i5(v),p=w.useMemo(()=>a5(v),[v]),h=w.useMemo(()=>(g==null?void 0:g.filter(({isAdminPanelLink:I})=>!(!n&&I)))??[],[g,n]);if(w.useEffect(()=>{!p&&l&&Wi(v,!0)},[p,v,l]),w.useLayoutEffect(()=>{var I;(I=a.current)!=null&&I.scrollHeight&&c(a.current.scrollHeight)},[a]),w.useEffect(()=>{l&&!b&&t(Km,{update_version_id:v})},[]),!l||b)return null;const m=I=>{var E;I.stopPropagation(),s(_=>!_),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Wi(v,!1,!0)},x=(I,E="",_=!1,T=!1)=>{var S;if(I.stopPropagation(),_&&T?t(e3,{update_version_id:v}):T&&t(t3,{update_version_id:v}),!_&&E){(S=window.open(E,"_blank"))==null||S.focus();return}C(I,!1),r==null||r.redirectToAdmin()},C=(I,E=!0)=>{I.stopPropagation(),Wi(v,!1),s(!1),E&&t(n3,{update_version_id:v})};return u.jsxs(i4,{children:[u.jsxs(c4,{children:[u.jsx(a4,{variant:"h3",children:y}),u.jsxs(d.Box,{children:[o?u.jsx(d.Tooltip,{title:q3,placement:"bottom",children:u.jsx(d.IconButton,{onClick:C,children:u.jsx(d.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,u.jsx(d.Tooltip,{title:o?J3:Bi,placement:"bottom",children:u.jsx(Or,{onClick:m,children:u.jsx(Xi,{className:o?"":"hiver-up"})})})]})]}),u.jsx(l4,{className:o?"slideDown":"slideUp",ref:a,height:i,children:u.jsxs(u4,{children:[f.map(({title:I,items:E,type:_})=>u.jsxs(g4,{children:[u.jsx(d.Typography,{variant:"body2_medium",children:I}),E.map(T=>{const S=_===t5,{deeplink:L,textHtml:N,imageUrl:k}=T,D=()=>u.jsx(q5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:N}});return u.jsx(d4,{component:"ul",children:u.jsxs(f4,{component:S?"li":"div",marginLeft:k?"0":"14px",children:[k?u.jsx("img",{src:k}):null,L?u.jsx(Bd,{target:"_blank",underline:"none",onClick:P=>x(P,L),fontSize:"13px",children:D()}):D()]})},N)})]},I)),u.jsx(d.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:h.map(({text:I,link:E,isAdminPanelLink:_})=>u.jsx(p4,{variant:_?"contained":"text",children:u.jsx(h4,{variant:"caption",onClick:T=>x(T,E,_,!0),children:I})},I))})]})})]})},Rv=({selectedEmail:e,conversationId:t})=>Le({url:V8.replace(":conversationId",""+t),method:je.PATCH,data:{selectedEmail:e}}),Mv="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",$1=e=>{const t=w.useRef(null),[n,r]=w.useState(!1);return w.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},Pv=e=>{const{textRef:t,isOverflow:n}=$1(e.data.label);return u.jsx(d.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:u.jsx(m4,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},jv=e=>u.jsxs(en.MenuList,{...e,children:[u.jsx(b4,{children:u.jsx(d.Typography,{variant:"body2_medium",children:W4})}),e.children]}),Bv=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=$1(e.data.label);return u.jsx(en.Option,{...e,children:u.jsxs(d.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[u.jsx(d.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:u.jsx(y4,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?u.jsx("img",{src:Mv,width:"14px",height:"14px"}):null]})})},Vv=e=>u.jsx(en.ValueContainer,{...e,children:u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[u.jsx(d.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:d.theme.palette.gray.gray3,flexShrink:0}}),u.jsx(d.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),Gv=e=>u.jsx(en.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:d.theme.palette.gray.gray3}}):u.jsx(d.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:d.theme.palette.gray.gray3}})}),Hv={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?d.theme.palette.gray.gray3:d.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${d.theme.palette.gray.gray3}`:"none",backgroundColor:d.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:d.theme.palette.gray.white,color:d.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?d.theme.palette.gray.gray7:d.theme.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},Wv=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=w.useContext(Be),a=t?Object.entries(t).map(([c])=>({value:c,label:c})):e?[{value:e,label:e}]:[];w.useEffect(()=>{if(!e&&!r&&t&&Object.keys(t).length>0){const c=Object.keys(t)[0];c&&o(c)}},[t,o,e,r]);const i=c=>{const l=String((c==null?void 0:c.value)||"");l&&s&&Rv({selectedEmail:l,conversationId:s}),o(l)};return u.jsx(d.Tooltip,{title:"Selected email",placement:"top",children:u.jsx("div",{style:{marginTop:"12px"},children:u.jsx(Ro,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...Ro.getDefaultComponents(),MenuList:jv,Option:Bv,SingleValue:Pv,DropdownIndicator:Gv,ValueContainer:Vv},root:n,styles:Hv,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})},Zv=d.styled(d.Paper)`
1092
+ `,kv="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",Dv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_HIVER_CDN_URL:"https://cdn.hiverhq.com/",VITE_MY_ENV_VAR:"myVariable From Agent"},{VITE_HIVER_CDN_URL:Nv}=Dv,$1=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=w.useContext(Be),s=et(r,j3),a=et(r,Ls),i=g=>{g.stopPropagation(),n(Jm),o==null||o.redirectToAdmin()},c=g=>{g.stopPropagation(),n(qm),window.open(bv,"_blank")},l=()=>{n(x3,{source:"main_tab"})},f=a?vv:xv;return u.jsxs(wv,{"data-testid":"noConnectors",children:[s?u.jsxs(u.Fragment,{children:[t?null:u.jsx(d.Typography,{variant:"h2",children:a?Bi:Iv}),u.jsx(Tv,{onClick:l,href:Cv,target:"_blank",children:u.jsx(N8,{src:Nv+f,alt:Ev,aspectRatio:"1000/783"})})]}):u.jsxs(_v,{children:[u.jsx(Sv,{variant:"body1_medium",children:dv}),u.jsx("img",{src:kv,alt:fv})]}),u.jsx(Av,{variant:"body2",children:pv}),e?u.jsx(q1,{endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?gv:hv}):u.jsxs(u.Fragment,{children:[u.jsx(q1,{onClick:c,children:mv}),u.jsxs(Lv,{direction:"row",children:[u.jsx(Ov,{}),u.jsx(Fv,{variant:"caption",children:yv})]})]})]})},Rv=()=>{const{availableFeatures:e}=w.useContext(Be),t=et(e,Ls);return u.jsxs(Md,{children:[u.jsxs(d.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?u.jsx(kd,{width:"20px",height:"20px"}):u.jsx(Nd,{}),u.jsx(Rd,{variant:"h2",children:t?Bi:yd})]}),u.jsxs(d.Stack,{gap:"12px",children:[u.jsx(_n,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(_n,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(_n,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},Mv=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=w.useContext(Be),[o,s]=w.useState(!1),a=w.useRef(null),[i,c]=w.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:g=[],title:y}=l||{},{version:v=""}=l||{},b=c5(v),p=w.useMemo(()=>i5(v),[v]),h=w.useMemo(()=>(g==null?void 0:g.filter(({isAdminPanelLink:I})=>!(!n&&I)))??[],[g,n]);if(w.useEffect(()=>{!p&&l&&Hi(v,!0)},[p,v,l]),w.useLayoutEffect(()=>{var I;(I=a.current)!=null&&I.scrollHeight&&c(a.current.scrollHeight)},[a]),w.useEffect(()=>{l&&!b&&t(e3,{update_version_id:v})},[]),!l||b)return null;const m=I=>{var E;I.stopPropagation(),s(_=>!_),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Hi(v,!1,!0)},x=(I,E="",_=!1,T=!1)=>{var S;if(I.stopPropagation(),_&&T?t(t3,{update_version_id:v}):T&&t(n3,{update_version_id:v}),!_&&E){(S=window.open(E,"_blank"))==null||S.focus();return}C(I,!1),r==null||r.redirectToAdmin()},C=(I,E=!0)=>{I.stopPropagation(),Hi(v,!1),s(!1),E&&t(r3,{update_version_id:v})};return u.jsxs(c4,{children:[u.jsxs(l4,{children:[u.jsx(i4,{variant:"h3",children:y}),u.jsxs(d.Box,{children:[o?u.jsx(d.Tooltip,{title:$3,placement:"bottom",children:u.jsx(d.IconButton,{onClick:C,children:u.jsx(d.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,u.jsx(d.Tooltip,{title:o?q3:ji,placement:"bottom",children:u.jsx(Lr,{onClick:m,children:u.jsx(Zi,{className:o?"":"hiver-up"})})})]})]}),u.jsx(u4,{className:o?"slideDown":"slideUp",ref:a,height:i,children:u.jsxs(d4,{children:[f.map(({title:I,items:E,type:_})=>u.jsxs(m4,{children:[u.jsx(d.Typography,{variant:"body2_medium",children:I}),E.map(T=>{const S=_===n5,{deeplink:L,textHtml:N,imageUrl:k}=T,D=()=>u.jsx($5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:N}});return u.jsx(f4,{component:"ul",children:u.jsxs(p4,{component:S?"li":"div",marginLeft:k?"0":"14px",children:[k?u.jsx("img",{src:k}):null,L?u.jsx(Bd,{target:"_blank",underline:"none",onClick:M=>x(M,L),fontSize:"13px",children:D()}):D()]})},N)})]},I)),u.jsx(d.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:h.map(({text:I,link:E,isAdminPanelLink:_})=>u.jsx(h4,{variant:_?"contained":"text",children:u.jsx(g4,{variant:"caption",onClick:T=>x(T,E,_,!0),children:I})},I))})]})})]})},Pv=({selectedEmail:e,conversationId:t})=>Se({url:H8.replace(":conversationId",""+t),method:je.PATCH,data:{selectedEmail:e}}),jv="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",Q1=e=>{const t=w.useRef(null),[n,r]=w.useState(!1);return w.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},Bv=e=>{const{textRef:t,isOverflow:n}=Q1(e.data.label);return u.jsx(d.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:u.jsx(b4,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},Vv=e=>u.jsxs(rn.MenuList,{...e,children:[u.jsx(y4,{children:u.jsx(d.Typography,{variant:"body2_medium",children:Z4})}),e.children]}),Gv=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=Q1(e.data.label);return u.jsx(rn.Option,{...e,children:u.jsxs(d.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[u.jsx(d.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:u.jsx(C4,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?u.jsx("img",{src:jv,width:"14px",height:"14px"}):null]})})},Hv=e=>u.jsx(rn.ValueContainer,{...e,children:u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[u.jsx(d.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:d.theme.palette.gray.gray3,flexShrink:0}}),u.jsx(d.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),Wv=e=>u.jsx(rn.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:d.theme.palette.gray.gray3}}):u.jsx(d.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:d.theme.palette.gray.gray3}})}),Zv={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?d.theme.palette.gray.gray3:d.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${d.theme.palette.gray.gray3}`:"none",backgroundColor:d.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:d.theme.palette.gray.white,color:d.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?d.theme.palette.gray.gray7:d.theme.palette.gray.white}}),singleValue:e=>({...e}),menuList:e=>({...e,maxHeight:"160px",borderRadius:"4px",overflowX:"hidden"}),menu:e=>({...e,boxShadow:"0px 3px 15px 0px #00000040",marginTop:"3px"}),menuPortal:e=>({...e,zIndex:2,maxHeight:"160px"})},Xv=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=w.useContext(Be),a=t?Object.entries(t).map(([c])=>({value:c,label:c})):e?[{value:e,label:e}]:[];w.useEffect(()=>{if(!e&&!r&&t&&Object.keys(t).length>0){const c=Object.keys(t)[0];c&&o(c)}},[t,o,e,r]);const i=c=>{const l=String((c==null?void 0:c.value)||"");l&&s&&Pv({selectedEmail:l,conversationId:s}),o(l)};return u.jsx(d.Tooltip,{title:"Selected email",placement:"top",children:u.jsx("div",{style:{marginTop:"12px"},children:u.jsx(Do,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...Do.getDefaultComponents(),MenuList:Vv,Option:Gv,SingleValue:Bv,DropdownIndicator:Wv,ValueContainer:Hv},root:n,styles:Zv,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})},zv=d.styled(d.Paper)`
1093
1093
  width: stretch;
1094
1094
  height: 100%;
1095
1095
  position: absolute;
@@ -1099,17 +1099,17 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1099
1099
  padding: 20px 14px;
1100
1100
  box-sizing: border-box;
1101
1101
  overflow: hidden;
1102
- `,Xv=d.styled("img")`
1102
+ `,Yv=d.styled("img")`
1103
1103
  height: 16px;
1104
1104
  width: 16px;
1105
- `,zv=d.styled(d.Box)`
1105
+ `,Jv=d.styled(d.Box)`
1106
1106
  margin-top: 12px;
1107
1107
  height: 100%;
1108
- `,Yv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_4735_44625)'%3e%3cpath%20d='M7.9987%2013.334L8.9387%2012.394L5.2187%208.66732H13.332V7.33398L5.2187%207.33398L8.9387%203.60732L7.9987%202.66732L2.66537%208.00065L7.9987%2013.334Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_4735_44625'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Zc=({children:e,isOpen:t,setIsOpen:n,onClose:r,title:o="Back",backButtonTooltip:s,portalId:a})=>{const i=w.useRef(null),[c,l]=w.useState(!1);return w.useEffect(()=>{a&&(i.current=document.querySelector(`[data-connectorid=${a}]`),l(!0))},[a,l]),w.useEffect(()=>()=>{n(!1)},[n]),t&&c&&i.current&&Re.createPortal(u.jsxs(Zv,{className:"layover-paper",elevation:0,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[u.jsx(d.Tooltip,{title:s,placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(Xv,{src:Yv})})}),u.jsx(d.Typography,{children:o})]}),u.jsx(zv,{children:e})]}),i.current)},Q1=e=>e.common.previewCardData,U1=e=>e.common.previewCardApiStatus,Jv=e=>e.common.selectedSuggestionType,qv=d.styled(d.Stack)`
1108
+ `,qv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_4735_44625)'%3e%3cpath%20d='M7.9987%2013.334L8.9387%2012.394L5.2187%208.66732H13.332V7.33398L5.2187%207.33398L8.9387%203.60732L7.9987%202.66732L2.66537%208.00065L7.9987%2013.334Z'%20fill='%234D596C'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_4735_44625'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Wc=({children:e,isOpen:t,setIsOpen:n,onClose:r,title:o="Back",backButtonTooltip:s,portalId:a})=>{const i=w.useRef(null),[c,l]=w.useState(!1);return w.useEffect(()=>{a&&(i.current=document.querySelector(`[data-connectorid=${a}]`),l(!0))},[a,l]),w.useEffect(()=>()=>{n(!1)},[n]),t&&c&&i.current&&Re.createPortal(u.jsxs(zv,{className:"layover-paper",elevation:0,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[u.jsx(d.Tooltip,{title:s,placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(Yv,{src:qv})})}),u.jsx(d.Typography,{children:o})]}),u.jsx(Jv,{children:e})]}),i.current)},U1=e=>e.common.previewCardData,K1=e=>e.common.previewCardApiStatus,$v=e=>e.common.selectedSuggestionType,Qv=d.styled(d.Stack)`
1109
1109
  width: 100%;
1110
1110
  border-radius: 8px;
1111
1111
  border: 1px solid ${d.theme.palette.gray.gray5};
1112
- `,$v=d.styled(d.Stack)`
1112
+ `,Uv=d.styled(d.Stack)`
1113
1113
  padding: 11px;
1114
1114
  height: 46px;
1115
1115
  background: ${d.theme.palette.gray.gray6};
@@ -1119,7 +1119,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1119
1119
  white-space: nowrap;
1120
1120
  overflow: hidden;
1121
1121
  }
1122
- `,Qv=d.styled(d.Button)`
1122
+ `,Kv=d.styled(d.Button)`
1123
1123
  &:hover {
1124
1124
  background-color: #e3e9ff !important;
1125
1125
  color: ${d.theme.palette.purple.primary} !important;
@@ -1127,7 +1127,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1127
1127
  }
1128
1128
  margin-top: 10px;
1129
1129
  display: block;
1130
- `,Uv=d.styled(d.Stack)`
1130
+ `,eE=d.styled(d.Stack)`
1131
1131
  flex-direction: row;
1132
1132
  flex-grow: 1;
1133
1133
  align-items: center;
@@ -1138,8 +1138,8 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1138
1138
  height: 20px;
1139
1139
  flex-shrink: 0;
1140
1140
  }
1141
- `,K1=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=Vt(),[s,a]=w.useState(!1),[i,c]=w.useState(!0),{id:l="",cardTitle:f="",logoUrl:g}=e||{},y=t===ee.LOADING,v=p=>{p.stopPropagation();const h=p.currentTarget.offsetWidth<p.currentTarget.scrollWidth;a(!!h)},b=p=>{var m;o(Vr({id:n,args:r,isRefresh:!0}));const h=p.target.tagName==="BUTTON"?(m=p.target)==null?void 0:m.firstChild:p.target;h.className&&(h.className=""),setTimeout(()=>h.className="selected",1)};return u.jsxs(qv,{children:[u.jsxs($v,{direction:"row",justifyContent:"space-between",children:[y?u.jsxs(d.Stack,{gap:"6px",direction:"row",children:[u.jsx(_n,{width:"16px",height:"24px"}),u.jsx(_n,{width:"100px",height:"24px"})]}):u.jsxs(Uv,{children:[g&&u.jsx("img",{src:g,alt:f}),u.jsx(d.Tooltip,{title:s?f:"",children:u.jsx(d.Typography,{variant:"h4",onMouseOver:p=>v(p),onMouseLeave:p=>v(p),children:f})})]}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",children:[i?u.jsx(d.Tooltip,{title:md,placement:"bottom",children:u.jsx(Or,{onClick:p=>b(p),children:u.jsx("img",{src:H1})})}):null,u.jsx(d.Tooltip,{title:i?bd:Bi,placement:"bottom",children:u.jsx(Or,{onClick:()=>c(p=>!p),children:u.jsx(Xi,{className:i?"":"hiver-up"})})})]})]}),u.jsx(j1,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},ep={values:{},errors:{}},tn={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},Kv=(e,t)=>{const{type:n,payload:r}=t;switch(n){case tn.SET_FIELD_VALUE:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return{...e,values:{...e.values,[o]:s}}}case tn.SET_FIELD_ERROR:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return typeof s=="boolean"||typeof s=="string"?{...e,errors:{...e.errors,[o]:s}}:e}case tn.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case tn.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case tn.RESET_STATE:return ep}return e},tp=()=>w.useReducer(Kv,ep),np=({state:e,dispatch:t,validations:n})=>{const r=e.errors,o=(g,y)=>{t({type:tn.SET_FIELD_VALUE,payload:{value:{value:y,name:g}}})},s=w.useCallback(()=>Object.keys(r).filter(y=>!!r[y]).length>0,[r]),a=g=>{g.stopPropagation();const{name:y,value:v}=(g==null?void 0:g.target)||{};o(y,v)},i=(g,y)=>{g.stopPropagation();const{name:v}=(g==null?void 0:g.target)||{};o(v,y)},c=(g,y)=>{o(g,y||"")},l=(g,y)=>{e.errors[g]!==y&&t({type:tn.SET_FIELD_ERROR,payload:{value:{name:g,value:y}}})},f=(g,y)=>{if(y){const v=y[g];v==null||v.forEach(b=>{var p;o(b,""),y[b]&&f(b,y),(p=n[b])!=null&&p.isRequired&&l(b,!0)})}};return{setValue:o,isErrorInValidations:s,inputChangeHandler:a,checkboxChangeHandler:i,dateChangeHandler:c,handleValidationError:l,clearDependentFields:f}},rp=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const a=s.interfaceDetails,i={loadOptions:(c,l,f,g)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const v=D8(n,y==null?void 0:y.args),b=Object.values((y==null?void 0:y.args)||{});if(v.length===b.length){r(ir({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:y==null?void 0:y.id,pagination:y==null?void 0:y.pagination,callback:l,args:{...Po(n,y==null?void 0:y.args),...Po(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:g}));return}return l([])}};return{...o,[s.name]:i}},{}),op=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,a)=>{if(!a.createOptionInterfaceDetails)return s;const i=a.createOptionInterfaceDetails;return{...s,[a.name]:{createOption:(c,l)=>{var g,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(ba({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...Po(n,(g=a==null?void 0:a.interfaceDetails)==null?void 0:g.args),...Po(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...Po(f,i.args)}}))}}}},{}),sp=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=Vt(),s=w.useMemo(()=>{if(e&&e.length){const i=rp({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=rp({formFields:g,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=w.useMemo(()=>{const i=op({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=op({formFields:g,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[f.name]:{createOptionList:y}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},ap=({setShown:e,shown:t,title:n,description:r,buttons:o})=>u.jsx(cr,{shown:t,setShown:e,showCloseButton:!0,children:u.jsxs(d.Stack,{width:"400px",padding:"20px",children:[u.jsx(d.Typography,{variant:"h2",marginBottom:"8px",children:n}),u.jsx(d.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
1142
- `).map((s,a)=>u.jsx(d.Typography,{variant:"body2",children:s},a))}),u.jsx(d.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>u.jsx(d.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),ip="connector-agent-expanded-write-form",cp=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s,connectors:a})=>{var Vn;const{userGroupId:i,userId:c}=Bt()||{},[l,f]=w.useState(null),[g,y]=w.useState(!1),v=w.useRef(null),[b,p]=tp(),h=Ce(X1),m=Ce(t?zx:W1),x=Ce(Jx),C=Ce(Yx),I=Ce(Qx),E=Ce(Ux),_=Ce(Kx),T=Ce(ev),S=Ce(tv),L=Ce(z1),N=C==null?void 0:C[(l==null?void 0:l.value)??""],k=N==null?void 0:N.expandedView,{formConfigs:D,formViewConfigs:P}=w.useMemo(()=>{if(l&&"value"in l&&x&&x[l.value]&&Array.isArray(x[l.value])){const Ie=x[l.value],rt=[{id:l.value,formFields:Ie}];return{formConfigs:rt,formViewConfigs:k?N8(Ie,L1):rt}}const fe=[{id:"emptyFormId",formFields:[]}];return{formConfigs:fe,formViewConfigs:fe}},[x,l,k]),V=w.useMemo(()=>{var Ie;const fe=((Ie=D==null?void 0:D[0])==null?void 0:Ie.formFields)||[];return Wc({formFields:fe})},[D]),{setValue:z,inputChangeHandler:$,checkboxChangeHandler:Q,dateChangeHandler:X,clearDependentFields:q,handleValidationError:oe,isErrorInValidations:ie}=np({state:b,dispatch:p,validations:V}),{conversationId:B,sendTrackingEvent:R,currentSmIds:G,connectorFunctions:{getFormElement:H,toggleFormElement:J},stackingContext:re,userEmail:se}=w.useContext(Be),{userGroupId:j}=Bt()||{},{fetchConfig:te,createConfig:Ee}=sp({formFields:D[0].formFields,formId:D[0].id,formState:b,conversationId:B}),Z=(Vn=h==null?void 0:h.forms.find(fe=>fe.type==="edit"))==null?void 0:Vn.id,{externalResourceId:Ve}=h??{},Ne=[E,_,S].includes(ee.LOADING),Je=w.useMemo(()=>!k||!H?null:H(),[k,H]),at=Vt();w.useEffect(()=>(k&&J&&J(!0),()=>{k&&J&&J(!1)}),[k,J]),w.useEffect(()=>{at(k1(t?!(T&&"values"in T&&"values"in b&&JSON.stringify(Y1(b.values))===JSON.stringify(Y1(T.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,T,b,at]),w.useEffect(()=>(t&&T&&p({type:tn.SET_FIELDS,payload:T}),()=>{p({type:tn.SET_FIELDS,payload:{values:{}}})}),[t,p,T]),w.useEffect(()=>{l!==null&&s(fe=>({...fe,object_type:l.label}))},[l,s]),w.useEffect(()=>{if(b.values){const fe=I1(D[0].formFields,b.values);s(Ie=>({...Ie,fields_filled:fe}))}},[b,D,s]),w.useEffect(()=>{if(n&&!t)return f(n);m&&m.length&&f(t&&Z?m.find(fe=>fe.value===Z)??null:fe=>fe||!C?fe:m.length===1?m[0]:m.find(rt=>!C[rt.value].expandedView)??null)},[m,C,t,Z,n]);const cn=()=>{f(v.current),y(!1),p({type:tn.RESET_STATE})},xt=(fe,Ie)=>{z(fe,Ie)},Ke=(fe,Ie,rt)=>{if(Ie.action==="clear"&&Ie.name&&(z(Ie.name,""),l!=null&&l.value&&q(Ie.name,I==null?void 0:I[l.value]),V[Ie.name].isRequired&&oe(Ie.name,!0)),fe&&typeof fe=="object"&&"label"in fe&&typeof fe.label=="string"&&"value"in fe&&(typeof fe.value=="string"||typeof fe.value=="number")&&typeof Ie.name<"u")if(Ie.name==="form-object")v.current={value:fe.value,label:fe.label},b.values&&fe.value!==(l==null?void 0:l.value)&&(Object.values(b.values).filter(Ot=>Ot!=="").length>0?y(!0):cn());else{let it=!1;rt&&(it=rt.isMultiSelect||!1);const Ot=!it&&"prefillValues"in fe&&fe.prefillValues,Gn=it?[{value:fe.value,label:fe.label}]:{value:fe.value,label:fe.label};if(z(Ie.name,Gn),Ot)for(const Cn in Ot)z(Cn,Ot[Cn]);l!=null&&l.value&&q(Ie.name,I==null?void 0:I[l.value])}},Qe=()=>{if(!ie()&&Z&&(C!=null&&C[Z])&&B&&Ve){const{connectorName:fe,title:Ie}=h;R(g3,{connector_name:fe,card_title:Ie,sm_ids:G,ug_id:j});const rt=C[Z].interfaceDetails;if(!rt||!T)return;const{id:it,args:Ot={},previousArgs:Gn={}}=rt,Cn=ma(T,Gn),ro=ma(b,Ot);at(xa({formId:String(Z),conversationId:B,args:ro,previousArgs:Cn,externalResourceId:Ve,interfaceId:it,successCallback:()=>{o()}})).unwrap().then(()=>{R(y3,{connector_name:fe,card_title:Ie,sm_ids:G,ug_id:j})}).finally(()=>{at(Gr(null))})}},jn=()=>{if(!ie()&&l&&(C!=null&&C[l.value])&&B){const fe=C==null?void 0:C[l.value].interfaceDetails;if(!fe)return;const{id:Ie,args:rt={}}=fe,it=ma(b,rt);at(Ca({formId:String(l.value),conversationId:B,args:it,interfaceId:Ie,successCallback:()=>{o()}})).unwrap().then(()=>{R(s3,{object_type:l})})}},zt=[{label:"Cancel",action:()=>y(!1),variant:"text"},{label:"Continue",action:cn}],Bn=Os({url:Xm,params:{email:se,user_id:c,ug_id:i,sm_ids:G.join(","),connector_names:a.join(","),form_object:N==null?void 0:N.name}}),ln=()=>{window.open(Bn,"_blank"),R(k3,{sm_ids:G,ug_id:i,connector_name:N==null?void 0:N.connectorName,form_object:N==null?void 0:N.name})},yr=u.jsxs(dp,{className:k?ip:"",children:[u.jsx(ap,{shown:g,setShown:y,title:dx,description:fx,buttons:zt}),k?u.jsxs(eE,{children:[u.jsxs(d.Typography,{children:[t?"Edit":"Add"," to ",N.connectorName]}),u.jsx(d.Tooltip,{title:"Close Popup",placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(tE,{src:P1})})})]}):null,u.jsxs(up,{spacing:3,children:[!t&&!k?u.jsx(sr,{type:"select",placeholder:A1,options:m,value:l,name:"form-object",selectChangeHandler:Ke,label:gx,labelSpacing:.5,validation:{isRequired:!0}}):null,u.jsx(v1,{showGlobalLoader:S===ee.LOADING,formConfig:P,selectChangeHandler:Ke,inputChangeHandler:$,checkboxChangeHandler:Q,dateChangeHandler:X,tableChangeHandler:xt,onValidationError:oe,fieldsSpacing:3,labelSpacing:.5,fetchConfig:te,createConfig:Ee,values:b.values,validations:V,...k?{cols:L1,stackIndex:re.expandedForm}:null}),u.jsx(d.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:u.jsx(nE,{variant:"text",onClick:ln,size:"small",children:s5})})]}),u.jsxs(lp,{children:[u.jsx(d.Button,{disabled:ie()||Ne||!L,onClick:t?Qe:jn,size:"small",...k?{style:{order:2}}:null,children:t?Q3:$3}),u.jsx(fp,{variant:"outlined",color:"tertiary",size:"small",onClick:r,disabled:Ne,children:Gi})]})]});return k&&Je?Re.createPortal(yr,Je):yr},lp=d.styled(d.Box)`
1141
+ `,ep=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=Ht(),[s,a]=w.useState(!1),[i,c]=w.useState(!0),{id:l="",cardTitle:f="",logoUrl:g}=e||{},y=t===K.LOADING,v=p=>{p.stopPropagation();const h=p.currentTarget.offsetWidth<p.currentTarget.scrollWidth;a(!!h)},b=p=>{var m;o(Br({id:n,args:r,isRefresh:!0}));const h=p.target.tagName==="BUTTON"?(m=p.target)==null?void 0:m.firstChild:p.target;h.className&&(h.className=""),setTimeout(()=>h.className="selected",1)};return u.jsxs(Qv,{children:[u.jsxs(Uv,{direction:"row",justifyContent:"space-between",children:[y?u.jsxs(d.Stack,{gap:"6px",direction:"row",children:[u.jsx(_n,{width:"16px",height:"24px"}),u.jsx(_n,{width:"100px",height:"24px"})]}):u.jsxs(eE,{children:[g&&u.jsx("img",{src:g,alt:f}),u.jsx(d.Tooltip,{title:s?f:"",children:u.jsx(d.Typography,{variant:"h4",onMouseOver:p=>v(p),onMouseLeave:p=>v(p),children:f})})]}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",children:[i?u.jsx(d.Tooltip,{title:md,placement:"bottom",children:u.jsx(Lr,{onClick:p=>b(p),children:u.jsx("img",{src:W1})})}):null,u.jsx(d.Tooltip,{title:i?bd:ji,placement:"bottom",children:u.jsx(Lr,{onClick:()=>c(p=>!p),children:u.jsx(Zi,{className:i?"":"hiver-up"})})})]})]}),u.jsx(B1,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},tp={values:{},errors:{}},on={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},tE=(e,t)=>{const{type:n,payload:r}=t;switch(n){case on.SET_FIELD_VALUE:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return{...e,values:{...e.values,[o]:s}}}case on.SET_FIELD_ERROR:{if(!(r!=null&&r.value))return e;const{name:o,value:s}=r.value;return typeof s=="boolean"||typeof s=="string"?{...e,errors:{...e.errors,[o]:s}}:e}case on.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case on.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case on.RESET_STATE:return tp}return e},np=()=>w.useReducer(tE,tp),rp=({state:e,dispatch:t,validations:n})=>{const r=e.errors,o=(g,y)=>{t({type:on.SET_FIELD_VALUE,payload:{value:{value:y,name:g}}})},s=w.useCallback(()=>Object.keys(r).filter(y=>!!r[y]).length>0,[r]),a=g=>{g.stopPropagation();const{name:y,value:v}=(g==null?void 0:g.target)||{};o(y,v)},i=(g,y)=>{g.stopPropagation();const{name:v}=(g==null?void 0:g.target)||{};o(v,y)},c=(g,y)=>{o(g,y||"")},l=(g,y)=>{e.errors[g]!==y&&t({type:on.SET_FIELD_ERROR,payload:{value:{name:g,value:y}}})},f=(g,y)=>{if(y){const v=y[g];v==null||v.forEach(b=>{var p;o(b,""),y[b]&&f(b,y),(p=n[b])!=null&&p.isRequired&&l(b,!0)})}};return{setValue:o,isErrorInValidations:s,inputChangeHandler:a,checkboxChangeHandler:i,dateChangeHandler:c,handleValidationError:l,clearDependentFields:f}},op=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const a=s.interfaceDetails,i={loadOptions:(c,l,f,g)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const v=R8(n,y==null?void 0:y.args),b=Object.values((y==null?void 0:y.args)||{});if(v.length===b.length){r(or({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:y==null?void 0:y.id,pagination:y==null?void 0:y.pagination,callback:l,args:{...Ro(n,y==null?void 0:y.args),...Ro(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:g}));return}return l([])}};return{...o,[s.name]:i}},{}),sp=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,a)=>{if(!a.createOptionInterfaceDetails)return s;const i=a.createOptionInterfaceDetails;return{...s,[a.name]:{createOption:(c,l)=>{var g,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(ya({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...Ro(n,(g=a==null?void 0:a.interfaceDetails)==null?void 0:g.args),...Ro(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...Ro(f,i.args)}}))}}}},{}),ap=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=Ht(),s=w.useMemo(()=>{if(e&&e.length){const i=op({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=op({formFields:g,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=w.useMemo(()=>{const i=sp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=sp({formFields:g,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[f.name]:{createOptionList:y}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},ip=({setShown:e,shown:t,title:n,description:r,buttons:o})=>u.jsx(sr,{shown:t,setShown:e,showCloseButton:!0,children:u.jsxs(d.Stack,{width:"400px",padding:"20px",children:[u.jsx(d.Typography,{variant:"h2",marginBottom:"8px",children:n}),u.jsx(d.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
1142
+ `).map((s,a)=>u.jsx(d.Typography,{variant:"body2",children:s},a))}),u.jsx(d.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>u.jsx(d.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),cp="connector-agent-expanded-write-form",lp=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s,connectors:a})=>{var br;const{userGroupId:i,userId:c}=Gt()||{},[l,f]=w.useState(null),[g,y]=w.useState(!1),v=w.useRef(null),[b,p]=np(),h=Ce(z1),m=Ce(t?Jx:Z1),x=Ce($x),C=Ce(qx),I=Ce(Kx),E=Ce(ev),_=Ce(tv),T=Ce(nv),S=Ce(rv),L=Ce(Y1),N=C==null?void 0:C[(l==null?void 0:l.value)??""],k=N==null?void 0:N.expandedView,{formConfigs:D,formViewConfigs:M}=w.useMemo(()=>{if(l&&"value"in l&&x&&x[l.value]&&Array.isArray(x[l.value])){const we=x[l.value],qe=[{id:l.value,formFields:we}];return{formConfigs:qe,formViewConfigs:k?M8(we,O1):qe}}const fe=[{id:"emptyFormId",formFields:[]}];return{formConfigs:fe,formViewConfigs:fe}},[x,l,k]),V=w.useMemo(()=>{var we;const fe=((we=D==null?void 0:D[0])==null?void 0:we.formFields)||[];return Hc({formFields:fe})},[D]),{setValue:z,inputChangeHandler:q,checkboxChangeHandler:$,dateChangeHandler:X,clearDependentFields:J,handleValidationError:oe,isErrorInValidations:ae}=rp({state:b,dispatch:p,validations:V}),{conversationId:B,sendTrackingEvent:P,currentSmIds:G,connectorFunctions:{getFormElement:H,toggleFormElement:Y},stackingContext:re,userEmail:se}=w.useContext(Be),{userGroupId:j}=Gt()||{},{fetchConfig:te,createConfig:Ee}=ap({formFields:D[0].formFields,formId:D[0].id,formState:b,conversationId:B}),Z=(br=h==null?void 0:h.forms.find(fe=>fe.type==="edit"))==null?void 0:br.id,{externalResourceId:Ve}=h??{},Ne=[E,_,S].includes(K.LOADING),Ke=w.useMemo(()=>!k||!H?null:H(),[k,H]),rt=Ht();w.useEffect(()=>(k&&Y&&Y(!0),()=>{k&&Y&&Y(!1)}),[k,Y]),w.useEffect(()=>{rt(D1(t?!(T&&"values"in T&&"values"in b&&JSON.stringify(J1(b.values))===JSON.stringify(J1(T.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,T,b,rt]),w.useEffect(()=>(t&&T&&p({type:on.SET_FIELDS,payload:T}),()=>{p({type:on.SET_FIELDS,payload:{values:{}}})}),[t,p,T]),w.useEffect(()=>{l!==null&&s(fe=>({...fe,object_type:l.label}))},[l,s]),w.useEffect(()=>{if(b.values){const fe=w1(D[0].formFields,b.values);s(we=>({...we,fields_filled:fe}))}},[b,D,s]),w.useEffect(()=>{if(n&&!t)return f(n);m&&m.length&&f(t&&Z?m.find(fe=>fe.value===Z)??null:fe=>fe||!C?fe:m.length===1?m[0]:m.find(qe=>!C[qe.value].expandedView)??null)},[m,C,t,Z,n]);const Jt=()=>{f(v.current),y(!1),p({type:on.RESET_STATE})},vt=(fe,we)=>{z(fe,we)},at=(fe,we,qe)=>{if(we.action==="clear"&&we.name&&(z(we.name,""),l!=null&&l.value&&J(we.name,I==null?void 0:I[l.value]),V[we.name].isRequired&&oe(we.name,!0)),fe&&typeof fe=="object"&&"label"in fe&&typeof fe.label=="string"&&"value"in fe&&(typeof fe.value=="string"||typeof fe.value=="number")&&typeof we.name<"u")if(we.name==="form-object")v.current={value:fe.value,label:fe.label},b.values&&fe.value!==(l==null?void 0:l.value)&&(Object.values(b.values).filter(dt=>dt!=="").length>0?y(!0):Jt());else{let Et=!1;qe&&(Et=qe.isMultiSelect||!1);const dt=!Et&&"prefillValues"in fe&&fe.prefillValues,yr=Et?[{value:fe.value,label:fe.label}]:{value:fe.value,label:fe.label};if(z(we.name,yr),dt)for(const Cn in dt)z(Cn,dt[Cn]);l!=null&&l.value&&J(we.name,I==null?void 0:I[l.value])}},Je=()=>{if(!ae()&&Z&&(C!=null&&C[Z])&&B&&Ve){const{connectorName:fe,title:we}=h;P(m3,{connector_name:fe,card_title:we,sm_ids:G,ug_id:j});const qe=C[Z].interfaceDetails;if(!qe||!T)return;const{id:Et,args:dt={},previousArgs:yr={}}=qe,Cn=ba(T,yr),ro=ba(b,dt);rt(va({formId:String(Z),conversationId:B,args:ro,previousArgs:Cn,externalResourceId:Ve,interfaceId:Et,successCallback:()=>{o()}})).unwrap().then(()=>{P(C3,{connector_name:fe,card_title:we,sm_ids:G,ug_id:j})}).finally(()=>{rt(Vr(null))})}},gr=()=>{if(!ae()&&l&&(C!=null&&C[l.value])&&B){const fe=C==null?void 0:C[l.value].interfaceDetails;if(!fe)return;const{id:we,args:qe={}}=fe,Et=ba(b,qe);rt(xa({formId:String(l.value),conversationId:B,args:Et,interfaceId:we,successCallback:()=>{o()}})).unwrap().then(()=>{P(a3,{object_type:l})})}},ut=[{label:"Cancel",action:()=>y(!1),variant:"text"},{label:"Continue",action:Jt}],no=Fs({url:zm,params:{email:se,user_id:c,ug_id:i,sm_ids:G.join(","),connector_names:a.join(","),form_object:N==null?void 0:N.name}}),mr=()=>{window.open(no,"_blank"),P(D3,{sm_ids:G,ug_id:i,connector_name:N==null?void 0:N.connectorName,form_object:N==null?void 0:N.name})},Nt=u.jsxs(fp,{className:k?cp:"",children:[u.jsx(ip,{shown:g,setShown:y,title:px,description:hx,buttons:ut}),k?u.jsxs(nE,{children:[u.jsxs(d.Typography,{children:[t?"Edit":"Add"," to ",N.connectorName]}),u.jsx(d.Tooltip,{title:"Close Popup",placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(rE,{src:j1})})})]}):null,u.jsxs(dp,{spacing:3,children:[!t&&!k?u.jsx(nr,{type:"select",placeholder:L1,options:m,value:l,name:"form-object",selectChangeHandler:at,label:bx,labelSpacing:.5,validation:{isRequired:!0}}):null,u.jsx(E1,{showGlobalLoader:S===K.LOADING,formConfig:M,selectChangeHandler:at,inputChangeHandler:q,checkboxChangeHandler:$,dateChangeHandler:X,tableChangeHandler:vt,onValidationError:oe,fieldsSpacing:3,labelSpacing:.5,fetchConfig:te,createConfig:Ee,values:b.values,validations:V,...k?{cols:O1,stackIndex:re.expandedForm}:null}),u.jsx(d.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:u.jsx(oE,{variant:"text",onClick:mr,size:"small",children:a5})})]}),u.jsxs(up,{children:[u.jsx(d.Button,{disabled:ae()||Ne||!L,onClick:t?Je:gr,size:"small",...k?{style:{order:2}}:null,children:t?U3:Q3}),u.jsx(pp,{variant:"outlined",color:"tertiary",size:"small",onClick:r,disabled:Ne,children:Vi})]})]});return k&&Ke?Re.createPortal(Nt,Ke):Nt},up=d.styled(d.Box)`
1143
1143
  box-sizing: border-box;
1144
1144
  height: 52px;
1145
1145
  background-color: var(--form-background-color, inherit);
@@ -1151,7 +1151,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1151
1151
  display: flex;
1152
1152
  justify-content: flex-end;
1153
1153
  column-gap: 12px;
1154
- `,up=d.styled(d.Stack)`
1154
+ `,dp=d.styled(d.Stack)`
1155
1155
  margin-bottom: 25px;
1156
1156
  padding-right: 12px;
1157
1157
  flex-grow: 1;
@@ -1160,7 +1160,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1160
1160
  position: relative;
1161
1161
  top: -5px;
1162
1162
  }
1163
- `,dp=d.styled(d.Stack)`
1163
+ `,fp=d.styled(d.Stack)`
1164
1164
  height: calc(100% - 44px);
1165
1165
  position: relative;
1166
1166
  overflow: auto;
@@ -1175,18 +1175,18 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1175
1175
  border-radius: 4px;
1176
1176
  }
1177
1177
  }
1178
- &.${ip} {
1178
+ &.${cp} {
1179
1179
  padding: 0 40px;
1180
1180
  background-color: inherit;
1181
1181
  --form-background-color: inherit;
1182
1182
  }
1183
- `,fp=d.styled(d.Button)`
1183
+ `,pp=d.styled(d.Button)`
1184
1184
  &:hover {
1185
1185
  background-color: #e3e9ff !important;
1186
1186
  color: ${d.theme.palette.purple.primary} !important;
1187
1187
  border: 1px solid ${d.theme.palette.purple.primary} !important;
1188
1188
  }
1189
- `,eE=d.styled(d.Stack)`
1189
+ `,nE=d.styled(d.Stack)`
1190
1190
  box-sizing: border-box;
1191
1191
  flex-flow: row nowrap;
1192
1192
  justify-content: space-between;
@@ -1198,15 +1198,15 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1198
1198
  background-color: var(--form-background-color, inherit);
1199
1199
  padding-top: 20px;
1200
1200
  padding-bottom: 10px;
1201
- `,tE=d.styled("img")`
1201
+ `,rE=d.styled("img")`
1202
1202
  height: 16px;
1203
1203
  width: 16px;
1204
- `,nE=d.styled(d.Button)`
1204
+ `,oE=d.styled(d.Button)`
1205
1205
  color: ${d.theme.palette.gray.gray3};
1206
1206
  &:hover {
1207
1207
  color: ${d.theme.palette.purple.primary};
1208
1208
  }
1209
- `,rE=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=Vt(),r=Ce(Q1),o=Ce(U1),s=Ce(qx),a=Ce(Z1),[i,c]=w.useState(!1),[l,f]=w.useState(null),[g,y]=w.useState(""),[v,b]=w.useState({}),{conversationId:p,sendTrackingEvent:h,email:m}=w.useContext(Be);w.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const x={externalResourceId:g},C=o===ee.LOADING,I=s===ee.LOADING,E=()=>{!i&&l&&"value"in l&&(h(c3,{object_type:l.label}),n(Vr({id:String(l==null?void 0:l.value),args:x})).unwrap().catch(D=>{(D==null?void 0:D.status)===400?we({message:T1,type:ze}):we({message:ox,type:ze})})),c(D=>!D)},_=()=>{l&&"value"in l&&p&&n(Ea({id:String(l.value),externalResourceId:g,conversationId:p,email:m})).unwrap().then(()=>{h(a3,{object_type:l.label,input_type:g}),we({message:ax,type:$t}),e(!1),t()}).catch(D=>{(D==null?void 0:D.status)===400?we({message:T1,type:ze}):(D==null?void 0:D.status)===409?we({message:sx,type:ze}):we({message:ix,type:ze})})},T=()=>{e(!1),c(!1)},S=(D,P)=>{D&&typeof D=="object"&&"label"in D&&typeof D.label=="string"&&"value"in D&&(typeof D.value=="string"||typeof D.value=="number")&&typeof P.name<"u"&&(f({value:D.value,label:D.label}),y(""))},L=D=>{D.stopPropagation();const{value:P}=(D==null?void 0:D.target)||{};y(P),c(!1)},N=(D,P)=>{b(V=>({...V,[D]:!!P}))},k=()=>Object.keys(v).filter(P=>v[P]).length>0;return u.jsxs(dp,{children:[u.jsxs(up,{spacing:3,children:[u.jsx(sr,{type:"select",placeholder:A1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:mx,labelSpacing:.5,validation:{isRequired:!0},onValidationError:N}),u.jsx(sr,{type:"text",placeholder:bx,value:g,name:"resourceId",inputChangeHandler:L,label:yx,labelSpacing:.5,validation:{isRequired:!0,validate:Hy()},onValidationError:N}),i?u.jsx(K1,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:x}):null,u.jsx(Qv,{fullWidth:!0,disabled:k()||C,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?H4:G4})]}),u.jsxs(lp,{children:[u.jsx(d.Button,{onClick:_,disabled:k()||I,size:"small",children:Cd}),u.jsx(fp,{color:"tertiary",variant:"outlined",onClick:T,disabled:I,size:"small",children:Gi})]})]})},oE=d.styled(d.Button)`
1209
+ `,sE=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=Ht(),r=Ce(U1),o=Ce(K1),s=Ce(Qx),a=Ce(X1),[i,c]=w.useState(!1),[l,f]=w.useState(null),[g,y]=w.useState(""),[v,b]=w.useState({}),{conversationId:p,sendTrackingEvent:h,email:m}=w.useContext(Be);w.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const x={externalResourceId:g},C=o===K.LOADING,I=s===K.LOADING,E=()=>{!i&&l&&"value"in l&&(h(l3,{object_type:l.label}),n(Br({id:String(l==null?void 0:l.value),args:x})).unwrap().catch(D=>{(D==null?void 0:D.status)===400?Ie({message:A1,type:ze}):Ie({message:ax,type:ze})})),c(D=>!D)},_=()=>{l&&"value"in l&&p&&n(Ia({id:String(l.value),externalResourceId:g,conversationId:p,email:m})).unwrap().then(()=>{h(i3,{object_type:l.label,input_type:g}),Ie({message:cx,type:Kt}),e(!1),t()}).catch(D=>{(D==null?void 0:D.status)===400?Ie({message:A1,type:ze}):(D==null?void 0:D.status)===409?Ie({message:ix,type:ze}):Ie({message:lx,type:ze})})},T=()=>{e(!1),c(!1)},S=(D,M)=>{D&&typeof D=="object"&&"label"in D&&typeof D.label=="string"&&"value"in D&&(typeof D.value=="string"||typeof D.value=="number")&&typeof M.name<"u"&&(f({value:D.value,label:D.label}),y(""))},L=D=>{D.stopPropagation();const{value:M}=(D==null?void 0:D.target)||{};y(M),c(!1)},N=(D,M)=>{b(V=>({...V,[D]:!!M}))},k=()=>Object.keys(v).filter(M=>v[M]).length>0;return u.jsxs(fp,{children:[u.jsxs(dp,{spacing:3,children:[u.jsx(nr,{type:"select",placeholder:L1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:yx,labelSpacing:.5,validation:{isRequired:!0},onValidationError:N}),u.jsx(nr,{type:"text",placeholder:Cx,value:g,name:"resourceId",inputChangeHandler:L,label:xx,labelSpacing:.5,validation:{isRequired:!0,validate:Zy()},onValidationError:N}),i?u.jsx(ep,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:x}):null,u.jsx(Kv,{fullWidth:!0,disabled:k()||C,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?W4:H4})]}),u.jsxs(up,{children:[u.jsx(d.Button,{onClick:_,disabled:k()||I,size:"small",children:Cd}),u.jsx(pp,{color:"tertiary",variant:"outlined",onClick:T,disabled:I,size:"small",children:Vi})]})]})},aE=d.styled(d.Button)`
1210
1210
  &:hover {
1211
1211
  background-color: #e3e9ff !important;
1212
1212
  color: ${d.theme.palette.purple.primary} !important;
@@ -1220,14 +1220,14 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1220
1220
  & .content__btn {
1221
1221
  margin-left: 8px;
1222
1222
  }
1223
- `,sE=d.styled(d.Button)`
1223
+ `,iE=d.styled(d.Button)`
1224
1224
  & path {
1225
1225
  fill: #fff;
1226
1226
  }
1227
1227
  & .content__btn {
1228
1228
  margin-left: 8px;
1229
1229
  }
1230
- `,aE=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},A.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),A.createElement("g",{mask:"url(#mask0_4649_80352)"},A.createElement("path",{d:"M9.16797 14.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013 18.654C8.84852 18.654 7.76519 18.4352 6.7513 17.9977C5.73741 17.5602 4.85547 16.9665 4.10547 16.2165C3.35547 15.4665 2.76172 14.5845 2.32422 13.5706C1.88672 12.5567 1.66797 11.4734 1.66797 10.3206C1.66797 9.16786 1.88672 8.08453 2.32422 7.07064C2.76172 6.05675 3.35547 5.1748 4.10547 4.4248C4.85547 3.6748 5.73741 3.08105 6.7513 2.64355C7.76519 2.20605 8.84852 1.9873 10.0013 1.9873C11.1541 1.9873 12.2374 2.20605 13.2513 2.64355C14.2652 3.08105 15.1471 3.6748 15.8971 4.4248C16.6471 5.1748 17.2409 6.05675 17.6784 7.07064C18.1159 8.08453 18.3346 9.16786 18.3346 10.3206C18.3346 11.4734 18.1159 12.5567 17.6784 13.5706C17.2409 14.5845 16.6471 15.4665 15.8971 16.2165C15.1471 16.9665 14.2652 17.5602 13.2513 17.9977C12.2374 18.4352 11.1541 18.654 10.0013 18.654ZM10.0013 16.9873C11.8624 16.9873 13.4388 16.3415 14.7305 15.0498C16.0221 13.7581 16.668 12.1817 16.668 10.3206C16.668 8.45953 16.0221 6.88314 14.7305 5.59147C13.4388 4.2998 11.8624 3.65397 10.0013 3.65397C8.14019 3.65397 6.5638 4.2998 5.27214 5.59147C3.98047 6.88314 3.33464 8.45953 3.33464 10.3206C3.33464 12.1817 3.98047 13.7581 5.27214 15.0498C6.5638 16.3415 8.14019 16.9873 10.0013 16.9873Z",fill:"#4D596C"}))),iE=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M14.3462 8.73757C14.0406 8.43198 13.5451 8.43198 13.2395 8.73757C12.9339 9.04316 12.9339 9.53863 13.2395 9.84422L14.3462 8.73757ZM15.2392 10.7372L15.7925 10.1839L15.2392 10.7372ZM16.2377 13.1478L15.4552 13.1478L16.2377 13.1478ZM15.2392 15.5584L14.6859 15.0051L15.2392 15.5584ZM10.418 15.5584L9.86469 16.1118L10.418 15.5584ZM9.52499 13.5588C9.2194 13.2532 8.72393 13.2532 8.41834 13.5588C8.11275 13.8643 8.11275 14.3598 8.41834 14.6654L9.52499 13.5588ZM5.52477 11.7731C5.83036 12.0787 6.32583 12.0787 6.63142 11.7731C6.93701 11.4675 6.93701 10.972 6.63142 10.6665L5.52477 11.7731ZM9.45292 4.95224L10.0062 4.39892L9.45292 4.95224ZM10.346 6.95192C10.6515 7.25752 11.147 7.25752 11.4526 6.95192C11.7582 6.64633 11.7582 6.15087 11.4526 5.84527L10.346 6.95192ZM13.2395 9.84422L14.6859 11.2906L15.7925 10.1839L14.3462 8.73757L13.2395 9.84422ZM14.6859 11.2906C15.1785 11.7832 15.4552 12.4512 15.4552 13.1478L17.0202 13.1478C17.0202 12.0362 16.5786 10.97 15.7925 10.1839L14.6859 11.2906ZM15.4552 13.1478C15.4552 13.8445 15.1785 14.5125 14.6859 15.0051L15.7925 16.1118C16.5786 15.3257 17.0202 14.2595 17.0202 13.1478L15.4552 13.1478ZM14.6859 15.0051C13.6601 16.0308 11.9971 16.0308 10.9713 15.0051L9.86469 16.1118C11.5016 17.7487 14.1556 17.7487 15.7925 16.1118L14.6859 15.0051ZM10.9713 15.0051L9.52499 13.5588L8.41834 14.6654L9.86469 16.1118L10.9713 15.0051ZM6.63142 10.6665L5.18507 9.2201L4.07842 10.3268L5.52477 11.7731L6.63142 10.6665ZM5.18507 9.2201C4.69249 8.72752 4.41576 8.05944 4.41576 7.36283H2.85072C2.85072 8.47452 3.29234 9.54067 4.07842 10.3268L5.18507 9.2201ZM4.41576 7.36283C4.41576 6.66622 4.69249 5.99815 5.18507 5.50557L4.07842 4.39892C3.29234 5.185 2.85072 6.25115 2.85072 7.36283H4.41576ZM5.18507 5.50557C6.21081 4.47983 7.87386 4.47983 8.8996 5.50557L10.0062 4.39892C8.36932 2.76199 5.71534 2.76199 4.07842 4.39892L5.18507 5.50557ZM8.8996 5.50557L10.346 6.95192L11.4526 5.84527L10.0062 4.39892L8.8996 5.50557Z",fill:"#4D596C"}),A.createElement("rect",{x:6.36328,y:7.91895,width:1.66667,height:8.33333,rx:.833333,transform:"rotate(-45 6.36328 7.91895)",fill:"#4D596C"})),cE=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>u.jsxs(d.Stack,{gap:2,marginTop:"12px",children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:ux}),u.jsxs(d.Stack,{gap:"12px",children:[n?u.jsxs(sE,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(aE,{}),u.jsx("span",{className:"content__btn",children:Ed})]}):null,r?u.jsxs(oE,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(iE,{}),u.jsx("span",{className:"content__btn",children:Id})]}):null]})]}),lE=e=>e.write.searchObjectList,pp=e=>e.write.objectDict,uE=e=>e.write.formFields,dE=e=>e.write.dependentFieldsMap,fE="Search in Connectors",pE="Search in Apps",hE="Start typing to search..",gE="Smart search suggestions",mE=":count result:countSuffix found for :searchObject in :connectorName",bE="Back to search results",yE="No search results found",hp=e=>A.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{id:"icons/Actions/Search"},A.createElement("path",{id:"Shape",fillRule:"evenodd",clipRule:"evenodd",d:"M8.57633 7.54717H8.03431L7.8422 7.36192C8.51458 6.57976 8.91938 5.56432 8.91938 4.45969C8.91938 1.99657 6.92281 0 4.45969 0C1.99657 0 0 1.99657 0 4.45969C0 6.92281 1.99657 8.91938 4.45969 8.91938C5.56432 8.91938 6.57976 8.51458 7.36192 7.8422L7.54717 8.03431V8.57633L10.9777 12L12 10.9777L8.57633 7.54717ZM4.45969 7.54717C2.75129 7.54717 1.37221 6.1681 1.37221 4.45969C1.37221 2.75129 2.75129 1.37221 4.45969 1.37221C6.1681 1.37221 7.54717 2.75129 7.54717 4.45969C7.54717 6.1681 6.1681 7.54717 4.45969 7.54717Z"}))),CE=d.styled(d.Stack)`
1230
+ `,cE=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},A.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),A.createElement("g",{mask:"url(#mask0_4649_80352)"},A.createElement("path",{d:"M9.16797 14.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013 18.654C8.84852 18.654 7.76519 18.4352 6.7513 17.9977C5.73741 17.5602 4.85547 16.9665 4.10547 16.2165C3.35547 15.4665 2.76172 14.5845 2.32422 13.5706C1.88672 12.5567 1.66797 11.4734 1.66797 10.3206C1.66797 9.16786 1.88672 8.08453 2.32422 7.07064C2.76172 6.05675 3.35547 5.1748 4.10547 4.4248C4.85547 3.6748 5.73741 3.08105 6.7513 2.64355C7.76519 2.20605 8.84852 1.9873 10.0013 1.9873C11.1541 1.9873 12.2374 2.20605 13.2513 2.64355C14.2652 3.08105 15.1471 3.6748 15.8971 4.4248C16.6471 5.1748 17.2409 6.05675 17.6784 7.07064C18.1159 8.08453 18.3346 9.16786 18.3346 10.3206C18.3346 11.4734 18.1159 12.5567 17.6784 13.5706C17.2409 14.5845 16.6471 15.4665 15.8971 16.2165C15.1471 16.9665 14.2652 17.5602 13.2513 17.9977C12.2374 18.4352 11.1541 18.654 10.0013 18.654ZM10.0013 16.9873C11.8624 16.9873 13.4388 16.3415 14.7305 15.0498C16.0221 13.7581 16.668 12.1817 16.668 10.3206C16.668 8.45953 16.0221 6.88314 14.7305 5.59147C13.4388 4.2998 11.8624 3.65397 10.0013 3.65397C8.14019 3.65397 6.5638 4.2998 5.27214 5.59147C3.98047 6.88314 3.33464 8.45953 3.33464 10.3206C3.33464 12.1817 3.98047 13.7581 5.27214 15.0498C6.5638 16.3415 8.14019 16.9873 10.0013 16.9873Z",fill:"#4D596C"}))),lE=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M14.3462 8.73757C14.0406 8.43198 13.5451 8.43198 13.2395 8.73757C12.9339 9.04316 12.9339 9.53863 13.2395 9.84422L14.3462 8.73757ZM15.2392 10.7372L15.7925 10.1839L15.2392 10.7372ZM16.2377 13.1478L15.4552 13.1478L16.2377 13.1478ZM15.2392 15.5584L14.6859 15.0051L15.2392 15.5584ZM10.418 15.5584L9.86469 16.1118L10.418 15.5584ZM9.52499 13.5588C9.2194 13.2532 8.72393 13.2532 8.41834 13.5588C8.11275 13.8643 8.11275 14.3598 8.41834 14.6654L9.52499 13.5588ZM5.52477 11.7731C5.83036 12.0787 6.32583 12.0787 6.63142 11.7731C6.93701 11.4675 6.93701 10.972 6.63142 10.6665L5.52477 11.7731ZM9.45292 4.95224L10.0062 4.39892L9.45292 4.95224ZM10.346 6.95192C10.6515 7.25752 11.147 7.25752 11.4526 6.95192C11.7582 6.64633 11.7582 6.15087 11.4526 5.84527L10.346 6.95192ZM13.2395 9.84422L14.6859 11.2906L15.7925 10.1839L14.3462 8.73757L13.2395 9.84422ZM14.6859 11.2906C15.1785 11.7832 15.4552 12.4512 15.4552 13.1478L17.0202 13.1478C17.0202 12.0362 16.5786 10.97 15.7925 10.1839L14.6859 11.2906ZM15.4552 13.1478C15.4552 13.8445 15.1785 14.5125 14.6859 15.0051L15.7925 16.1118C16.5786 15.3257 17.0202 14.2595 17.0202 13.1478L15.4552 13.1478ZM14.6859 15.0051C13.6601 16.0308 11.9971 16.0308 10.9713 15.0051L9.86469 16.1118C11.5016 17.7487 14.1556 17.7487 15.7925 16.1118L14.6859 15.0051ZM10.9713 15.0051L9.52499 13.5588L8.41834 14.6654L9.86469 16.1118L10.9713 15.0051ZM6.63142 10.6665L5.18507 9.2201L4.07842 10.3268L5.52477 11.7731L6.63142 10.6665ZM5.18507 9.2201C4.69249 8.72752 4.41576 8.05944 4.41576 7.36283H2.85072C2.85072 8.47452 3.29234 9.54067 4.07842 10.3268L5.18507 9.2201ZM4.41576 7.36283C4.41576 6.66622 4.69249 5.99815 5.18507 5.50557L4.07842 4.39892C3.29234 5.185 2.85072 6.25115 2.85072 7.36283H4.41576ZM5.18507 5.50557C6.21081 4.47983 7.87386 4.47983 8.8996 5.50557L10.0062 4.39892C8.36932 2.76199 5.71534 2.76199 4.07842 4.39892L5.18507 5.50557ZM8.8996 5.50557L10.346 6.95192L11.4526 5.84527L10.0062 4.39892L8.8996 5.50557Z",fill:"#4D596C"}),A.createElement("rect",{x:6.36328,y:7.91895,width:1.66667,height:8.33333,rx:.833333,transform:"rotate(-45 6.36328 7.91895)",fill:"#4D596C"})),uE=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>u.jsxs(d.Stack,{gap:2,marginTop:"12px",children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:fx}),u.jsxs(d.Stack,{gap:"12px",children:[n?u.jsxs(iE,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(cE,{}),u.jsx("span",{className:"content__btn",children:Ed})]}):null,r?u.jsxs(aE,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(lE,{}),u.jsx("span",{className:"content__btn",children:Id})]}):null]})]}),dE=e=>e.write.searchObjectList,hp=e=>e.write.objectDict,fE=e=>e.write.formFields,pE=e=>e.write.dependentFieldsMap,hE="Search in Connectors",gE="Search in Apps",mE="Start typing to search..",bE="Smart search suggestions",yE=":count result:countSuffix found for :searchObject in :connectorName",CE="Back to search results",xE="No search results found",gp=e=>A.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{id:"icons/Actions/Search"},A.createElement("path",{id:"Shape",fillRule:"evenodd",clipRule:"evenodd",d:"M8.57633 7.54717H8.03431L7.8422 7.36192C8.51458 6.57976 8.91938 5.56432 8.91938 4.45969C8.91938 1.99657 6.92281 0 4.45969 0C1.99657 0 0 1.99657 0 4.45969C0 6.92281 1.99657 8.91938 4.45969 8.91938C5.56432 8.91938 6.57976 8.51458 7.36192 7.8422L7.54717 8.03431V8.57633L10.9777 12L12 10.9777L8.57633 7.54717ZM4.45969 7.54717C2.75129 7.54717 1.37221 6.1681 1.37221 4.45969C1.37221 2.75129 2.75129 1.37221 4.45969 1.37221C6.1681 1.37221 7.54717 2.75129 7.54717 4.45969C7.54717 6.1681 6.1681 7.54717 4.45969 7.54717Z"}))),vE=d.styled(d.Stack)`
1231
1231
  flex-flow: row nowrap;
1232
1232
  align-items: center;
1233
1233
  column-gap: 12px;
@@ -1237,28 +1237,28 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1237
1237
  &:hover {
1238
1238
  background-color: ${({isSelected:e})=>e?"rgb(80, 109, 255, 0.12)":"rgba(0, 0, 0, 0.04)"};
1239
1239
  }
1240
- `,xE=d.styled("img")`
1240
+ `,EE=d.styled("img")`
1241
1241
  flex-shrink: 0;
1242
1242
  display: block;
1243
1243
  width: 24px;
1244
1244
  height: 24px;
1245
1245
  border-radius: 50%;
1246
- `,gp=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=Vt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),{label:i,description:c,avatarUrl:l,connectorName:f}=e,g=()=>{s(I3,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:f}),r(e,t),o(Y8(t))};return u.jsxs(CE,{isSelected:n,onClick:g,children:[u.jsx(xE,{src:l,alt:"option"}),u.jsxs(d.Stack,{children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray1,children:i}),u.jsx(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:"12px",children:c})]})]})},vE=d.styled(d.Stack)`
1246
+ `,mp=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),{label:i,description:c,avatarUrl:l,connectorName:f}=e,g=()=>{s(w3,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:f}),r(e,t),o(q8(t))};return u.jsxs(vE,{isSelected:n,onClick:g,children:[u.jsx(EE,{src:l,alt:"option"}),u.jsxs(d.Stack,{children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray1,children:i}),u.jsx(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:"12px",children:c})]})]})},IE=d.styled(d.Stack)`
1247
1247
  padding: 10px 0 10px 10px;
1248
- `,{Control:EE}=en,IE=({children:e,...t})=>u.jsxs(EE,{...t,children:[u.jsx(vE,{children:u.jsx(hp,{})}),e]}),wE=e=>{const{data:t,isSelected:n,selectOption:r}=e;return u.jsx(gp,{data:t,isSelected:n,onSelect:r})},_E={control:(e,{isFocused:t})=>({...e,cursor:"pointer",boxShadow:"none",borderColor:t?"#196FE0 !important":"#D6DDE8",borderWidth:"1px"}),menu:e=>({...e,marginTop:0,padding:0,borderRadius:"4px",background:"#fff",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",zIndex:3}),input:e=>({...e,"& input":{opacity:"1 !important"}}),menuPortal:e=>({...e,zIndex:3})},SE=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:f,currentSmIds:g}=w.useContext(Be),y=et(l,As),v=(h,{action:m})=>{m==="input-change"&&(s(h),h||a())},b=h=>{o(h),h||(s(""),a())},p=()=>{const h=[...new Set(e.map(m=>m.connectorName))];f(E3,{connector_names:h,sm_ids:g})};return u.jsx(Ro,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:y?pE:fE,isSearchable:!0,filterOption:null,styles:_E,onInputChange:v,onChange:b,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:p,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:wE,Control:IE,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},TE=d.styled(d.Stack)`
1248
+ `,{Control:wE}=rn,_E=({children:e,...t})=>u.jsxs(wE,{...t,children:[u.jsx(IE,{children:u.jsx(gp,{})}),e]}),SE=e=>{const{data:t,isSelected:n,selectOption:r}=e;return u.jsx(mp,{data:t,isSelected:n,onSelect:r})},TE={control:(e,{isFocused:t})=>({...e,cursor:"pointer",boxShadow:"none",borderColor:t?"#196FE0 !important":"#D6DDE8",borderWidth:"1px"}),menu:e=>({...e,marginTop:0,padding:0,borderRadius:"4px",background:"#fff",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",zIndex:3}),input:e=>({...e,"& input":{opacity:"1 !important"}}),menuPortal:e=>({...e,zIndex:3})},AE=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:f,currentSmIds:g}=w.useContext(Be),y=et(l,Ls),v=(h,{action:m})=>{m==="input-change"&&(s(h),h||a())},b=h=>{o(h),h||(s(""),a())},p=()=>{const h=[...new Set(e.map(m=>m.connectorName))];f(I3,{connector_names:h,sm_ids:g})};return u.jsx(Do,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:y?gE:hE,isSearchable:!0,filterOption:null,styles:TE,onInputChange:v,onChange:b,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:p,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:SE,Control:_E,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},LE=d.styled(d.Stack)`
1249
1249
  margin: ${({isEmpty:e})=>e?"0":"12px 0"};
1250
- `,AE=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=tp(),s=w.useRef(null),a=Ce(pp),i=Ce(uE),c=Ce(dE),l=w.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),f=w.useMemo(()=>{const E=(l==null?void 0:l.formFields)||[];return Wc({formFields:E})},[l]),{setValue:g,inputChangeHandler:y,dateChangeHandler:v,clearDependentFields:b,handleValidationError:p,isErrorInValidations:h}=np({state:r,dispatch:o,validations:f}),{fetchConfig:m}=sp({formState:r,formFields:l.formFields,formId:l.id}),x=w.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);w.useEffect(()=>{const E=r.values,_=l.id,T=l.formFields;if(Object.values(E).filter(V=>!!V).length<T.length||!a||h()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:N,args:k={}}=S,D=ma(r,k);x({id:_,interfaceId:N,searchString:t,connectorName:L,args:D})},[r,l,a,e,t,h,x]),w.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const C=(E,_,T)=>{if(_.action==="clear"&&_.name&&(g(_.name,""),b(_.name,c[e]),f[_.name].isRequired&&p(_.name,!0)),E&&typeof E=="object"&&"label"in E&&typeof E.label=="string"&&"value"in E&&(typeof E.value=="string"||typeof E.value=="number")&&typeof _.name<"u"){let S=!1;T&&(S=T.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};g(_.name,L),b(_.name,c[e])}};return u.jsx(TE,{isEmpty:((I=l.formFields)==null?void 0:I.length)===0,children:u.jsx(v1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:C,inputChangeHandler:y,dateChangeHandler:v,onValidationError:p,labelSpacing:.5,fetchConfig:m,values:r.values,validations:f})})},Xc="@connector-agent-global-search-priority",zc=Ny(),LE=({objectList:e})=>({sortedObjectList:w.useMemo(()=>{const r=zc.getItem(Xc);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=zc.getItem(Xc)??{};o[r]||(o[r]=0),o[r]++,zc.setItem(Xc,o)}}),OE=d.styled(d.Stack)`
1250
+ `,OE=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=np(),s=w.useRef(null),a=Ce(hp),i=Ce(fE),c=Ce(pE),l=w.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),f=w.useMemo(()=>{const E=(l==null?void 0:l.formFields)||[];return Hc({formFields:E})},[l]),{setValue:g,inputChangeHandler:y,dateChangeHandler:v,clearDependentFields:b,handleValidationError:p,isErrorInValidations:h}=rp({state:r,dispatch:o,validations:f}),{fetchConfig:m}=ap({formState:r,formFields:l.formFields,formId:l.id}),x=w.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);w.useEffect(()=>{const E=r.values,_=l.id,T=l.formFields;if(Object.values(E).filter(V=>!!V).length<T.length||!a||h()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:N,args:k={}}=S,D=ba(r,k);x({id:_,interfaceId:N,searchString:t,connectorName:L,args:D})},[r,l,a,e,t,h,x]),w.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const C=(E,_,T)=>{if(_.action==="clear"&&_.name&&(g(_.name,""),b(_.name,c[e]),f[_.name].isRequired&&p(_.name,!0)),E&&typeof E=="object"&&"label"in E&&typeof E.label=="string"&&"value"in E&&(typeof E.value=="string"||typeof E.value=="number")&&typeof _.name<"u"){let S=!1;T&&(S=T.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};g(_.name,L),b(_.name,c[e])}};return u.jsx(LE,{isEmpty:((I=l.formFields)==null?void 0:I.length)===0,children:u.jsx(E1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:C,inputChangeHandler:y,dateChangeHandler:v,onValidationError:p,labelSpacing:.5,fetchConfig:m,values:r.values,validations:f})})},Zc="@connector-agent-global-search-priority",Xc=My(),FE=({objectList:e})=>({sortedObjectList:w.useMemo(()=>{const r=Xc.getItem(Zc);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=Xc.getItem(Zc)??{};o[r]||(o[r]=0),o[r]++,Xc.setItem(Zc,o)}}),kE=d.styled(d.Stack)`
1251
1251
  padding: 8px 0;
1252
- `,FE=d.styled(d.Typography)`
1252
+ `,DE=d.styled(d.Typography)`
1253
1253
  padding: 6px 16px;
1254
1254
  color: ${d.theme.palette.gray.gray4};
1255
1255
  font-size: 13px;
1256
- `,kE=d.styled(d.Typography)`
1256
+ `,NE=d.styled(d.Typography)`
1257
1257
  padding: 6px 16px;
1258
1258
  color: ${d.theme.palette.gray.gray3};
1259
1259
  font-size: 11px;
1260
1260
  text-transform: uppercase;
1261
- `,DE=({onSelect:e,selectedOption:t,options:n})=>n.length?u.jsxs(OE,{children:[u.jsx(FE,{children:hE}),u.jsx(kE,{children:gE}),n.map(r=>u.jsx(gp,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null,NE=e=>new Promise(t=>setTimeout(t,e)),mp=({apiFn:e,intervalMillis:t,maxRetries:n,increaseIntervalMillis:r=0,isSatisfied:o,pushIntermediateResults:s=()=>{}})=>(...i)=>{const c=async(l=0)=>{const f=await e(...i);if(s(f),o(f))return s(null),f;if(l>=n)throw f;return l++,t+=r,NE(t).then(()=>c(l))};return c()},RE=async({conversationId:e,senderEmail:t})=>{try{const n=await Le({url:gt(R8,{conversationId:e}),params:{senderEmail:t},method:je.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},bp=({conversationId:e,senderEmail:t,enabled:n})=>Er({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>RE({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),yp="/v1/api",ME=`${yp}/connectors/forms/:formId/search`,PE=`${yp}/connectors/conversation/:conversationId/smart-suggestions`,jE=e=>{if(e.status!=="completed")return e;const t=e.smart_suggestions??[],n=[];for(const r of t)n.push({label:r.search_string,description:`${r.connector_name??""} - ${r.object_name??""}`,avatarUrl:r.connector_logo,value:r.form_id,connectorName:r.connector_name,objectName:r.object_name});return{...e,suggestedOptions:n}},BE=mp({apiFn:async({conversationId:e})=>{try{const t=await Le({url:gt(PE,{conversationId:e}),method:je.GET}),n=t==null?void 0:t.data;return jE(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),VE=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=bp({conversationId:e,senderEmail:t,enabled:n});return Er({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>BE({conversationId:e}),enabled:n&&r})},GE=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=w.useState(""),{conversationId:i,email:c,availableFeatures:l}=w.useContext(Be),f=Ce(lE),g=Ce(pp),y=et(l,W3),{sortedObjectList:v,updatePriority:b}=LE({objectList:f}),{data:p}=VE({enabled:y&&!!i,conversationId:String(i),senderEmail:c}),h=(p==null?void 0:p.suggestedOptions)??[],m=w.useMemo(()=>!g||!v.length?[]:v.map(({value:C})=>{const I=g[C];return I?{description:`${I.connectorName??""} - ${I.searchObject}`,avatarUrl:I.logoUrl,label:"",value:C,connectorName:I.connectorName,objectName:I.searchObject}:null}).filter(C=>!!C),[v,g]),x=C=>{n(C),C&&b(""+C.value)};return m.length?u.jsxs(d.Stack,{children:[u.jsx(SE,{value:e,options:m.map(C=>({...C,label:s})),inputValue:s,root:t,onInputChange:a,onChange:x,onReset:o,NoOptionsMessage:({selectOption:C})=>u.jsx(DE,{selectedOption:e,onSelect:C,options:h}),menuOpen:!s&&!h.length?!1:void 0}),e?u.jsx(AE,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},HE="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='%236C7B94'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.00483%2012.5052C7.73146%2012.7786%207.73146%2013.2218%208.00483%2013.4952C8.2782%2013.7685%208.72141%2013.7685%208.99478%2013.4952L11.9948%2010.4952C12.2681%2010.2218%2012.2681%209.77859%2011.9948%209.50522L8.99478%206.50522C8.72141%206.23185%208.2782%206.23185%208.00483%206.50522C7.73146%206.77859%207.73146%207.2218%208.00483%207.49517L10.5099%2010.0002L8.00483%2012.5052Z'/%3e%3c/svg%3e",WE=async({id:e,externalResourceId:t,conversationId:n,channelType:r="email",email:o})=>{const s=new URLSearchParams;s.append("channel_type",r),o&&s.append("senderEmail",o),await Le({url:`${j8.replace(":id",e)}?${s.toString()}`,method:je.POST,data:{externalResourceId:t,conversationId:n}})},ZE=({onSuccess:e})=>Yt({mutationFn:WE,onSuccess:()=>{we({message:sy,type:$t}),e==null||e()},onError:()=>{we({message:ay,type:ze})}}),XE="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8444_63907)'%3e%3cpath%20d='M7.99967%2013.333L8.93967%2012.393L5.21968%208.66634H13.333V7.33301L5.21968%207.33301L8.93967%203.60634L7.99967%202.66634L2.66634%207.99967L7.99967%2013.333Z'%20fill='%23343C45'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8444_63907'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",zE=d.styled(d.Stack)`
1261
+ `,RE=({onSelect:e,selectedOption:t,options:n})=>n.length?u.jsxs(kE,{children:[u.jsx(DE,{children:mE}),u.jsx(NE,{children:bE}),n.map(r=>u.jsx(mp,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null,ME=e=>new Promise(t=>setTimeout(t,e)),bp=({apiFn:e,intervalMillis:t,maxRetries:n,increaseIntervalMillis:r=0,isSatisfied:o,pushIntermediateResults:s=()=>{}})=>(...i)=>{const c=async(l=0)=>{const f=await e(...i);if(s(f),o(f))return s(null),f;if(l>=n)throw f;return l++,t+=r,ME(t).then(()=>c(l))};return c()},PE=async({conversationId:e,senderEmail:t})=>{try{const n=await Se({url:mt(P8,{conversationId:e}),params:{senderEmail:t},method:je.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},yp=({conversationId:e,senderEmail:t,enabled:n})=>Wn({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>PE({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),Cp="/v1/api",jE=`${Cp}/connectors/forms/:formId/search`,BE=`${Cp}/connectors/conversation/:conversationId/smart-suggestions`,VE=e=>{if(e.status!=="completed")return e;const t=e.smart_suggestions??[],n=[];for(const r of t)n.push({label:r.search_string,description:`${r.connector_name??""} - ${r.object_name??""}`,avatarUrl:r.connector_logo,value:r.form_id,connectorName:r.connector_name,objectName:r.object_name});return{...e,suggestedOptions:n}},GE=bp({apiFn:async({conversationId:e})=>{try{const t=await Se({url:mt(BE,{conversationId:e}),method:je.GET}),n=t==null?void 0:t.data;return VE(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),HE=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=yp({conversationId:e,senderEmail:t,enabled:n});return Wn({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>GE({conversationId:e}),enabled:n&&r})},WE=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=w.useState(""),{conversationId:i,email:c,availableFeatures:l}=w.useContext(Be),f=Ce(dE),g=Ce(hp),y=et(l,Z3),{sortedObjectList:v,updatePriority:b}=FE({objectList:f}),{data:p}=HE({enabled:y&&!!i,conversationId:String(i),senderEmail:c}),h=(p==null?void 0:p.suggestedOptions)??[],m=w.useMemo(()=>!g||!v.length?[]:v.map(({value:C})=>{const I=g[C];return I?{description:`${I.connectorName??""} - ${I.searchObject}`,avatarUrl:I.logoUrl,label:"",value:C,connectorName:I.connectorName,objectName:I.searchObject}:null}).filter(C=>!!C),[v,g]),x=C=>{n(C),C&&b(""+C.value)};return m.length?u.jsxs(d.Stack,{children:[u.jsx(AE,{value:e,options:m.map(C=>({...C,label:s})),inputValue:s,root:t,onInputChange:a,onChange:x,onReset:o,NoOptionsMessage:({selectOption:C})=>u.jsx(RE,{selectedOption:e,onSelect:C,options:h}),menuOpen:!s&&!h.length?!1:void 0}),e?u.jsx(OE,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},ZE="data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='%236C7B94'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8.00483%2012.5052C7.73146%2012.7786%207.73146%2013.2218%208.00483%2013.4952C8.2782%2013.7685%208.72141%2013.7685%208.99478%2013.4952L11.9948%2010.4952C12.2681%2010.2218%2012.2681%209.77859%2011.9948%209.50522L8.99478%206.50522C8.72141%206.23185%208.2782%206.23185%208.00483%206.50522C7.73146%206.77859%207.73146%207.2218%208.00483%207.49517L10.5099%2010.0002L8.00483%2012.5052Z'/%3e%3c/svg%3e",XE=async({id:e,externalResourceId:t,conversationId:n,channelType:r="email",email:o})=>{const s=new URLSearchParams;s.append("channel_type",r),o&&s.append("senderEmail",o),await Se({url:`${V8.replace(":id",e)}?${s.toString()}`,method:je.POST,data:{externalResourceId:t,conversationId:n}})},zE=({onSuccess:e})=>$t({mutationFn:XE,onSuccess:()=>{Ie({message:ay,type:Kt}),e==null||e()},onError:()=>{Ie({message:iy,type:ze})}}),YE="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8444_63907)'%3e%3cpath%20d='M7.99967%2013.333L8.93967%2012.393L5.21968%208.66634H13.333V7.33301L5.21968%207.33301L8.93967%203.60634L7.99967%202.66634L2.66634%207.99967L7.99967%2013.333Z'%20fill='%23343C45'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8444_63907'%3e%3crect%20width='16'%20height='16'%20fill='white'%20transform='matrix(-1%200%200%20-1%2016%2016)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",JE=d.styled(d.Stack)`
1262
1262
  width: fit-content;
1263
1263
  cursor: pointer;
1264
1264
  gap: 8px;
@@ -1270,7 +1270,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1270
1270
  letter-spacing: 0.4px;
1271
1271
  text-align: center;
1272
1272
  vertical-align: middle;
1273
- `,YE=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=Vt(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=w.useContext(Be),g=Ce(Q1),y=Ce(U1),{mutate:v,isPending:b}=ZE({onSuccess:s}),p=y===ee.LOADING,h={externalResourceId:e};w.useEffect(()=>{a(Vr({id:t,args:{externalResourceId:e}}))},[e,t,a]);const m=()=>{l(A3,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:g==null?void 0:g.cardTitle,connector_names:g==null?void 0:g.connectorNames}),v({id:t,externalResourceId:e,conversationId:i,email:f})};return u.jsxs(d.Stack,{gap:"12px",marginTop:"12px",children:[u.jsxs(zE,{onClick:o,children:[u.jsx("img",{src:XE,width:"16px",height:"16px"}),u.jsx(d.Typography,{children:bE})]}),u.jsxs(d.Stack,{gap:"24px",children:[u.jsx(K1,{cardData:g,cardDataApiStatus:y,objectToLink:t,args:h}),u.jsx(d.Stack,{alignItems:"flex-end",children:u.jsx(d.Button,{size:"small",disabled:p||b,onClick:m,children:Cd})})]})]})},Cp=d.styled(d.Stack)`
1273
+ `,qE=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=Ht(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=w.useContext(Be),g=Ce(U1),y=Ce(K1),{mutate:v,isPending:b}=zE({onSuccess:s}),p=y===K.LOADING,h={externalResourceId:e};w.useEffect(()=>{a(Br({id:t,args:{externalResourceId:e}}))},[e,t,a]);const m=()=>{l(L3,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:g==null?void 0:g.cardTitle,connector_names:g==null?void 0:g.connectorNames}),v({id:t,externalResourceId:e,conversationId:i,email:f})};return u.jsxs(d.Stack,{gap:"12px",marginTop:"12px",children:[u.jsxs(JE,{onClick:o,children:[u.jsx("img",{src:YE,width:"16px",height:"16px"}),u.jsx(d.Typography,{children:CE})]}),u.jsxs(d.Stack,{gap:"24px",children:[u.jsx(ep,{cardData:g,cardDataApiStatus:y,objectToLink:t,args:h}),u.jsx(d.Stack,{alignItems:"flex-end",children:u.jsx(d.Button,{size:"small",disabled:p||b,onClick:m,children:Cd})})]})]})},xp=d.styled(d.Stack)`
1274
1274
  padding: 12px 12px 12px 11px;
1275
1275
  border: 1px solid ${d.theme.palette.gray.gray5};
1276
1276
  border-radius: 8px;
@@ -1286,10 +1286,10 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1286
1286
  }
1287
1287
  }
1288
1288
  `};
1289
- `,JE="data:image/svg+xml,%3csvg%20width='124'%20height='107'%20viewBox='0%200%20124%20107'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M28.6168%2054.7446C28.6931%2052.5589%2031.0146%2051.1102%2033.0842%2051.8174C35.9985%2052.8133%2040.0375%2053.9024%2044.0621%2054.043C48.0034%2054.1806%2051.968%2053.4097%2054.8762%2052.6339C57.0264%2052.0602%2059.2927%2053.6932%2059.215%2055.9172C59.1742%2057.0856%2058.4742%2058.1269%2057.3723%2058.5178C54.8051%2059.4284%2049.7633%2060.8927%2044.3075%2060.7022C38.7694%2060.5088%2033.1999%2058.6241%2030.4004%2057.5311C29.2637%2057.0873%2028.5742%2055.9641%2028.6168%2054.7446Z'%20fill='url(%23paint0_linear_8481_102191)'/%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='url(%23paint1_linear_8481_102191)'/%3e%3cmask%20id='mask0_8481_102191'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='46'%20y='14'%20width='60'%20height='79'%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_8481_102191)'%3e%3cellipse%20cx='63.7775'%20cy='46.8684'%20rx='1.48152'%20ry='1.39438'%20transform='rotate(-12%2063.7775%2046.8684)'%20fill='%23435C71'/%3e%3crect%20x='47.4368'%20y='59.3203'%20width='53.657'%20height='13.2235'%20transform='rotate(-12%2047.4368%2059.3203)'%20fill='url(%23paint2_linear_8481_102191)'/%3e%3crect%20x='51.1907'%20y='76.9824'%20width='53.657'%20height='10.4263'%20transform='rotate(-12%2051.1907%2076.9824)'%20fill='url(%23paint3_linear_8481_102191)'/%3e%3c/g%3e%3cpath%20opacity='0.883952'%20d='M113.939%2051.0679C114.775%2055%20112.265%2058.865%20108.333%2059.7008L107.842%2059.8052C103.639%2060.6986%2099.5073%2058.0155%2098.6139%2053.8123L97.205%2047.1837L105.307%2045.4616C109.239%2044.6259%20113.104%2047.1359%20113.939%2051.0679Z'%20fill='url(%23paint4_linear_8481_102191)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M68.7215%2066.4138C67.1801%2064.8725%2067.6745%2062.2062%2069.587%2061.1603C72.4457%2059.5969%2076.2861%2057.1773%2079.3785%2054.0849C82.4099%2051.0535%2084.752%2047.3461%2086.2775%2044.5465C87.3388%2042.5989%2090.0598%2042.0819%2091.6282%2043.6503C92.4782%2044.5003%2092.758%2045.7623%2092.2604%2046.8566C91.0829%2049.4466%2088.5191%2054.344%2084.4346%2058.4285C80.2853%2062.5778%2074.8639%2065.591%2072.0553%2066.9952C70.9363%2067.5548%2069.6062%2067.2985%2068.7215%2066.4138Z'%20fill='url(%23paint5_linear_8481_102191)'/%3e%3crect%20x='48.7264'%20y='33.7744'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2048.7264%2033.7744)'%20fill='url(%23paint6_linear_8481_102191)'/%3e%3crect%20x='50.0175'%20y='35.8193'%20width='4.0158'%20height='3.84848'%20rx='1.92424'%20transform='rotate(-12%2050.0175%2035.8193)'%20fill='%23435C71'/%3e%3crect%20x='59.2875'%20y='31.5723'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2059.2875%2031.5723)'%20fill='%23FFFEFE'/%3e%3cpath%20opacity='0.883952'%20d='M111.25%2038.5376C110.415%2034.6055%20106.55%2032.0955%20102.618%2032.9313L102.127%2033.0356C97.9234%2033.9291%2095.2403%2038.0607%2096.1337%2042.2639L97.5426%2048.8925L105.644%2047.1705C109.576%2046.3347%20112.086%2042.4696%20111.25%2038.5376Z'%20fill='url(%23paint7_linear_8481_102191)'/%3e%3crect%20x='60.0181'%20y='33.8037'%20width='3.84848'%20height='3.84848'%20rx='1.90724'%20transform='rotate(-12%2060.0181%2033.8037)'%20fill='%23435C71'/%3e%3cpath%20d='M36.9246%2059.1604C36.4487%2060.717%2034.7371%2061.6271%2033.1805%2061.1512C32.3613%2060.9007%2031.7241%2060.3475%2031.3259%2059.5987L25.2059%2046.7983C24.9784%2046.3703%2025.1286%2045.8788%2025.5566%2045.6513L28.338%2044.1724C28.7659%2043.9449%2029.2574%2044.0951%2029.4849%2044.5231L36.6496%2056.8367C37.0728%2057.5036%2037.15%2058.423%2036.9246%2059.1604Z'%20fill='%23FFDF9F'/%3e%3crect%20x='27.9973'%20y='44.333'%20width='2.39869'%20height='3.59807'%20transform='rotate(152%2027.9973%2044.333)'%20fill='%23FF9090'/%3e%3cpath%20d='M26.6628%2044.3769L26.9472%2044.9118L28.0169%2044.343L26.3106%2041.1338L24.171%2042.2714L25.0243%2043.876C25.6661%2043.5347%2026.3215%2043.7351%2026.6628%2044.3769Z'%20fill='%23FFB19F'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.26386%2027.248C9.3428%2020.4481%2016.5101%2016.6372%2023.31%2018.7161C30.11%2020.7951%2033.9209%2027.9624%2031.8419%2034.7623C29.763%2041.5622%2022.5956%2045.3731%2015.7958%2043.2942C8.99587%2041.2152%205.18493%2034.0479%207.26386%2027.248ZM9.72157%2027.9983C8.06843%2033.4055%2011.1399%2039.1821%2016.5471%2040.8352C21.9543%2042.4884%2027.7309%2039.4168%2029.384%2034.0096C31.0372%2028.6024%2027.9657%2022.8258%2022.5585%2021.1727C17.1513%2019.5196%2011.3747%2022.5911%209.72157%2027.9983Z'%20fill='%23FFE69F'/%3e%3ccircle%20opacity='0.414016'%20cx='19.5529'%20cy='31.0039'%20r='10.2804'%20transform='rotate(17%2019.5529%2031.0039)'%20fill='%23BBDEFC'/%3e%3cpath%20d='M14.3685%2030.6746C15.7299%2027.6867%2018.9391%2025.9803%2022.1776%2026.5225L22.2595%2026.5475C23.7024%2026.8095%2024.3854%2024.8682%2023.1497%2024.2218C22.3806%2023.8074%2021.5613%2023.557%2020.717%2023.3884C17.3715%2022.9031%2014.0553%2024.6664%2012.6939%2027.6543C12.2796%2028.4235%2012.0859%2029.3497%2012.0244%2030.1372C11.8444%2031.6051%2013.8607%2032.0424%2014.4503%2030.6997C14.3434%2030.7566%2014.3685%2030.6746%2014.3685%2030.6746Z'%20fill='%23F6FBFF'/%3e%3cpath%20d='M10.2904%2029.0679C11.9436%2023.6607%2017.7202%2020.5893%2023.1274%2022.2424C25.6671%2023.0189%2027.5785%2024.6783%2028.9301%2026.704C27.7539%2024.1048%2025.508%2022.0744%2022.5586%2021.1727C17.1514%2019.5196%2011.3748%2022.591%209.72165%2027.9982C8.81993%2030.9476%209.32924%2033.97%2010.7444%2036.3735C9.82081%2034.1203%209.51395%2031.6077%2010.2904%2029.0679Z'%20fill='%23ADCBE7'/%3e%3cpath%20opacity='0.406087'%20d='M36.4864%2056.8021L36.1373%2056.2691C36.3845%2056.8563%2036.428%2057.5516%2036.2372%2058.1754C35.9273%2059.189%2034.5593%2059.1971%2034.0713%2058.2806L28.3787%2047.5877C28.0534%2046.9767%2027.3508%2046.7619%2026.7395%2047.0866L25.7206%2047.6277L31.4395%2059.3516C31.7648%2059.9627%2032.27%2060.5434%2032.8706%2060.8123C33.7054%2061.1528%2034.6593%2061.1034%2035.3726%2060.7247C36.0858%2060.3459%2036.6602%2059.5837%2036.8444%2058.7021C37.0351%2058.0783%2036.8117%2057.4132%2036.4864%2056.8021Z'%20fill='white'/%3e%3cpath%20d='M29.8826%2048.4977C29.8006%2048.4726%2029.6368%2048.4225%2029.5799%2048.3155L28.1579%2045.6411C28.0442%2045.4272%2028.1193%2045.1814%2028.3332%2045.0677C28.5472%2044.9539%2028.7929%2045.0291%2028.9067%2045.243L30.3287%2047.9174C30.4424%2048.1313%2030.3673%2048.3771%2030.1534%2048.4908C30.1284%2048.5728%2029.9645%2048.5227%2029.8826%2048.4977Z'%20fill='%23FFF5EB'/%3e%3cellipse%20cx='29.2637'%20cy='54.631'%20rx='1.50593'%20ry='3.17918'%20transform='rotate(-23%2029.2637%2054.631)'%20fill='%23FFC478'/%3e%3cellipse%20cx='34.0592'%20cy='52.4078'%20rx='0.920288'%20ry='1.67325'%20transform='rotate(106%2034.0592%2052.4078)'%20fill='%23FFC478'/%3e%3cpath%20d='M89.1282%2019.2055L68.2257%2026.8725L45.9197%2028.3898L44.4929%2016.4082C44.3371%2013.798%2047.5283%2011.4502%2050.9859%2011.6309L65.1429%2012.369L67.3969%2012.4869C68.5309%2012.5463%2069.7066%2012.3289%2070.7522%2011.8627L78.6899%208.34726C81.725%206.99992%2085.3012%207.87475%2086.2125%2010.1876L89.1282%2019.2055Z'%20fill='url(%23paint8_linear_8481_102191)'/%3e%3cpath%20opacity='0.479771'%20d='M88.6262%2019.0953L68.3101%2026.5288L65.3314%2012.5149L67.5211%2012.6263C68.6228%2012.6824%2069.7652%2012.471%2070.7816%2012.0192L78.4972%208.61266C81.4474%207.30707%2084.9208%208.14856%2085.8036%2010.3829L88.6262%2019.0953Z'%20fill='%23ADCBE7'/%3e%3cpath%20d='M91.6332%2026.6212L46.9517%2036.1186L46.0387%2028.4438L89.2535%2019.2582L91.6332%2026.6212Z'%20fill='%23717DAD'/%3e%3cpath%20d='M102.961%2024.2033C103.125%2024.9722%20102.371%2025.7829%20101.278%2026.015L37.9675%2039.4722C36.8754%2039.7043%2035.8568%2039.2704%2035.6933%2038.5015C35.5301%2037.7336%2036.284%2036.922%2037.3761%2036.6898L100.687%2023.2327C101.779%2023.0005%20102.798%2023.4354%20102.961%2024.2033Z'%20fill='%239ED1FF'/%3e%3cpath%20d='M102.703%2024.1718C102.838%2024.805%20102.067%2025.5045%20100.983%2025.7349L69.5583%2032.4144L69.0712%2030.123L100.496%2023.4436C101.58%2023.2131%20102.569%2023.5394%20102.703%2024.1718Z'%20fill='%2378AFE1'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8481_102191'%20x1='32.2665'%20y1='59.6553'%20x2='59.0518'%20y2='60.5906'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8481_102191'%20x1='67.3434'%20y1='85.966'%20x2='103.216'%20y2='78.3411'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8481_102191'%20x1='51.4347'%20y1='74.8197'%20x2='91.1539'%20y2='74.8197'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8481_102191'%20x1='55.1887'%20y1='89.2031'%20x2='94.9078'%20y2='89.2031'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_8481_102191'%20x1='94.5023'%20y1='53.1799'%20x2='106.762'%20y2='58.7056'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_8481_102191'%20x1='74.9906'%20y1='66.9871'%20x2='94.9778'%20y2='46.9999'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint6_linear_8481_102191'%20x1='50.5805'%20y1='44.0581'%20x2='59.9372'%20y2='44.0581'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23E3EEF3'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint7_linear_8481_102191'%20x1='88.4187'%20y1='43.3906'%20x2='99.3981'%20y2='25.1833'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint8_linear_8481_102191'%20x1='56.4985'%20y1='29.5482'%20x2='100.532'%20y2='20.1885'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ECF7FF'/%3e%3cstop%20offset='1'%20stop-color='%23C2E0FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",qE=()=>u.jsxs(d.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:JE,width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:yE})]}),$E=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=Vt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),[i,c]=w.useState(null),l=gt(mE,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(v,b)=>{s(T3,{search_keyword:t.label,search_result_label:b,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:v,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},g=()=>{c(null),o(z8())},y=()=>{n(),r(),g()};return e.length?i?u.jsx(YE,{meta:i,onBack:g,onLink:y}):u.jsxs(d.Stack,{gap:"14px",marginTop:"12px",children:[u.jsx(d.Typography,{variant:"body2",children:l}),u.jsx(d.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:v,name:b,description:p})=>u.jsxs(Cp,{onClick:()=>f(v,b),direction:"row",children:[u.jsxs(d.Stack,{flexGrow:1,children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:b}),u.jsx(d.Typography,{variant:"caption",color:d.theme.palette.gray.gray3,children:p})]}),u.jsx(d.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:HE})})]},v))})]}):u.jsx(qE,{})},Yc=d.styled(d.Skeleton)`
1289
+ `,$E="data:image/svg+xml,%3csvg%20width='124'%20height='107'%20viewBox='0%200%20124%20107'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M28.6168%2054.7446C28.6931%2052.5589%2031.0146%2051.1102%2033.0842%2051.8174C35.9985%2052.8133%2040.0375%2053.9024%2044.0621%2054.043C48.0034%2054.1806%2051.968%2053.4097%2054.8762%2052.6339C57.0264%2052.0602%2059.2927%2053.6932%2059.215%2055.9172C59.1742%2057.0856%2058.4742%2058.1269%2057.3723%2058.5178C54.8051%2059.4284%2049.7633%2060.8927%2044.3075%2060.7022C38.7694%2060.5088%2033.1999%2058.6241%2030.4004%2057.5311C29.2637%2057.0873%2028.5742%2055.9641%2028.6168%2054.7446Z'%20fill='url(%23paint0_linear_8481_102191)'/%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='url(%23paint1_linear_8481_102191)'/%3e%3cmask%20id='mask0_8481_102191'%20style='mask-type:luminance'%20maskUnits='userSpaceOnUse'%20x='46'%20y='14'%20width='60'%20height='79'%3e%3cpath%20d='M47.223%2043.6373C44.4928%2030.7926%2052.6922%2018.1666%2065.5368%2015.4364C78.3815%2012.7062%2091.0075%2020.9055%2093.7377%2033.7502L105.079%2087.1053L84.1844%2091.5466C70.0346%2094.5542%2056.1258%2085.5217%2053.1182%2071.3719L47.223%2043.6373Z'%20fill='white'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_8481_102191)'%3e%3cellipse%20cx='63.7775'%20cy='46.8684'%20rx='1.48152'%20ry='1.39438'%20transform='rotate(-12%2063.7775%2046.8684)'%20fill='%23435C71'/%3e%3crect%20x='47.4368'%20y='59.3203'%20width='53.657'%20height='13.2235'%20transform='rotate(-12%2047.4368%2059.3203)'%20fill='url(%23paint2_linear_8481_102191)'/%3e%3crect%20x='51.1907'%20y='76.9824'%20width='53.657'%20height='10.4263'%20transform='rotate(-12%2051.1907%2076.9824)'%20fill='url(%23paint3_linear_8481_102191)'/%3e%3c/g%3e%3cpath%20opacity='0.883952'%20d='M113.939%2051.0679C114.775%2055%20112.265%2058.865%20108.333%2059.7008L107.842%2059.8052C103.639%2060.6986%2099.5073%2058.0155%2098.6139%2053.8123L97.205%2047.1837L105.307%2045.4616C109.239%2044.6259%20113.104%2047.1359%20113.939%2051.0679Z'%20fill='url(%23paint4_linear_8481_102191)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M68.7215%2066.4138C67.1801%2064.8725%2067.6745%2062.2062%2069.587%2061.1603C72.4457%2059.5969%2076.2861%2057.1773%2079.3785%2054.0849C82.4099%2051.0535%2084.752%2047.3461%2086.2775%2044.5465C87.3388%2042.5989%2090.0598%2042.0819%2091.6282%2043.6503C92.4782%2044.5003%2092.758%2045.7623%2092.2604%2046.8566C91.0829%2049.4466%2088.5191%2054.344%2084.4346%2058.4285C80.2853%2062.5778%2074.8639%2065.591%2072.0553%2066.9952C70.9363%2067.5548%2069.6062%2067.2985%2068.7215%2066.4138Z'%20fill='url(%23paint5_linear_8481_102191)'/%3e%3crect%20x='48.7264'%20y='33.7744'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2048.7264%2033.7744)'%20fill='url(%23paint6_linear_8481_102191)'/%3e%3crect%20x='50.0175'%20y='35.8193'%20width='4.0158'%20height='3.84848'%20rx='1.92424'%20transform='rotate(-12%2050.0175%2035.8193)'%20fill='%23435C71'/%3e%3crect%20x='59.2875'%20y='31.5723'%20width='11.2108'%20height='11.2108'%20rx='5.59457'%20transform='rotate(-12%2059.2875%2031.5723)'%20fill='%23FFFEFE'/%3e%3cpath%20opacity='0.883952'%20d='M111.25%2038.5376C110.415%2034.6055%20106.55%2032.0955%20102.618%2032.9313L102.127%2033.0356C97.9234%2033.9291%2095.2403%2038.0607%2096.1337%2042.2639L97.5426%2048.8925L105.644%2047.1705C109.576%2046.3347%20112.086%2042.4696%20111.25%2038.5376Z'%20fill='url(%23paint7_linear_8481_102191)'/%3e%3crect%20x='60.0181'%20y='33.8037'%20width='3.84848'%20height='3.84848'%20rx='1.90724'%20transform='rotate(-12%2060.0181%2033.8037)'%20fill='%23435C71'/%3e%3cpath%20d='M36.9246%2059.1604C36.4487%2060.717%2034.7371%2061.6271%2033.1805%2061.1512C32.3613%2060.9007%2031.7241%2060.3475%2031.3259%2059.5987L25.2059%2046.7983C24.9784%2046.3703%2025.1286%2045.8788%2025.5566%2045.6513L28.338%2044.1724C28.7659%2043.9449%2029.2574%2044.0951%2029.4849%2044.5231L36.6496%2056.8367C37.0728%2057.5036%2037.15%2058.423%2036.9246%2059.1604Z'%20fill='%23FFDF9F'/%3e%3crect%20x='27.9973'%20y='44.333'%20width='2.39869'%20height='3.59807'%20transform='rotate(152%2027.9973%2044.333)'%20fill='%23FF9090'/%3e%3cpath%20d='M26.6628%2044.3769L26.9472%2044.9118L28.0169%2044.343L26.3106%2041.1338L24.171%2042.2714L25.0243%2043.876C25.6661%2043.5347%2026.3215%2043.7351%2026.6628%2044.3769Z'%20fill='%23FFB19F'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M7.26386%2027.248C9.3428%2020.4481%2016.5101%2016.6372%2023.31%2018.7161C30.11%2020.7951%2033.9209%2027.9624%2031.8419%2034.7623C29.763%2041.5622%2022.5956%2045.3731%2015.7958%2043.2942C8.99587%2041.2152%205.18493%2034.0479%207.26386%2027.248ZM9.72157%2027.9983C8.06843%2033.4055%2011.1399%2039.1821%2016.5471%2040.8352C21.9543%2042.4884%2027.7309%2039.4168%2029.384%2034.0096C31.0372%2028.6024%2027.9657%2022.8258%2022.5585%2021.1727C17.1513%2019.5196%2011.3747%2022.5911%209.72157%2027.9983Z'%20fill='%23FFE69F'/%3e%3ccircle%20opacity='0.414016'%20cx='19.5529'%20cy='31.0039'%20r='10.2804'%20transform='rotate(17%2019.5529%2031.0039)'%20fill='%23BBDEFC'/%3e%3cpath%20d='M14.3685%2030.6746C15.7299%2027.6867%2018.9391%2025.9803%2022.1776%2026.5225L22.2595%2026.5475C23.7024%2026.8095%2024.3854%2024.8682%2023.1497%2024.2218C22.3806%2023.8074%2021.5613%2023.557%2020.717%2023.3884C17.3715%2022.9031%2014.0553%2024.6664%2012.6939%2027.6543C12.2796%2028.4235%2012.0859%2029.3497%2012.0244%2030.1372C11.8444%2031.6051%2013.8607%2032.0424%2014.4503%2030.6997C14.3434%2030.7566%2014.3685%2030.6746%2014.3685%2030.6746Z'%20fill='%23F6FBFF'/%3e%3cpath%20d='M10.2904%2029.0679C11.9436%2023.6607%2017.7202%2020.5893%2023.1274%2022.2424C25.6671%2023.0189%2027.5785%2024.6783%2028.9301%2026.704C27.7539%2024.1048%2025.508%2022.0744%2022.5586%2021.1727C17.1514%2019.5196%2011.3748%2022.591%209.72165%2027.9982C8.81993%2030.9476%209.32924%2033.97%2010.7444%2036.3735C9.82081%2034.1203%209.51395%2031.6077%2010.2904%2029.0679Z'%20fill='%23ADCBE7'/%3e%3cpath%20opacity='0.406087'%20d='M36.4864%2056.8021L36.1373%2056.2691C36.3845%2056.8563%2036.428%2057.5516%2036.2372%2058.1754C35.9273%2059.189%2034.5593%2059.1971%2034.0713%2058.2806L28.3787%2047.5877C28.0534%2046.9767%2027.3508%2046.7619%2026.7395%2047.0866L25.7206%2047.6277L31.4395%2059.3516C31.7648%2059.9627%2032.27%2060.5434%2032.8706%2060.8123C33.7054%2061.1528%2034.6593%2061.1034%2035.3726%2060.7247C36.0858%2060.3459%2036.6602%2059.5837%2036.8444%2058.7021C37.0351%2058.0783%2036.8117%2057.4132%2036.4864%2056.8021Z'%20fill='white'/%3e%3cpath%20d='M29.8826%2048.4977C29.8006%2048.4726%2029.6368%2048.4225%2029.5799%2048.3155L28.1579%2045.6411C28.0442%2045.4272%2028.1193%2045.1814%2028.3332%2045.0677C28.5472%2044.9539%2028.7929%2045.0291%2028.9067%2045.243L30.3287%2047.9174C30.4424%2048.1313%2030.3673%2048.3771%2030.1534%2048.4908C30.1284%2048.5728%2029.9645%2048.5227%2029.8826%2048.4977Z'%20fill='%23FFF5EB'/%3e%3cellipse%20cx='29.2637'%20cy='54.631'%20rx='1.50593'%20ry='3.17918'%20transform='rotate(-23%2029.2637%2054.631)'%20fill='%23FFC478'/%3e%3cellipse%20cx='34.0592'%20cy='52.4078'%20rx='0.920288'%20ry='1.67325'%20transform='rotate(106%2034.0592%2052.4078)'%20fill='%23FFC478'/%3e%3cpath%20d='M89.1282%2019.2055L68.2257%2026.8725L45.9197%2028.3898L44.4929%2016.4082C44.3371%2013.798%2047.5283%2011.4502%2050.9859%2011.6309L65.1429%2012.369L67.3969%2012.4869C68.5309%2012.5463%2069.7066%2012.3289%2070.7522%2011.8627L78.6899%208.34726C81.725%206.99992%2085.3012%207.87475%2086.2125%2010.1876L89.1282%2019.2055Z'%20fill='url(%23paint8_linear_8481_102191)'/%3e%3cpath%20opacity='0.479771'%20d='M88.6262%2019.0953L68.3101%2026.5288L65.3314%2012.5149L67.5211%2012.6263C68.6228%2012.6824%2069.7652%2012.471%2070.7816%2012.0192L78.4972%208.61266C81.4474%207.30707%2084.9208%208.14856%2085.8036%2010.3829L88.6262%2019.0953Z'%20fill='%23ADCBE7'/%3e%3cpath%20d='M91.6332%2026.6212L46.9517%2036.1186L46.0387%2028.4438L89.2535%2019.2582L91.6332%2026.6212Z'%20fill='%23717DAD'/%3e%3cpath%20d='M102.961%2024.2033C103.125%2024.9722%20102.371%2025.7829%20101.278%2026.015L37.9675%2039.4722C36.8754%2039.7043%2035.8568%2039.2704%2035.6933%2038.5015C35.5301%2037.7336%2036.284%2036.922%2037.3761%2036.6898L100.687%2023.2327C101.779%2023.0005%20102.798%2023.4354%20102.961%2024.2033Z'%20fill='%239ED1FF'/%3e%3cpath%20d='M102.703%2024.1718C102.838%2024.805%20102.067%2025.5045%20100.983%2025.7349L69.5583%2032.4144L69.0712%2030.123L100.496%2023.4436C101.58%2023.2131%20102.569%2023.5394%20102.703%2024.1718Z'%20fill='%2378AFE1'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_8481_102191'%20x1='32.2665'%20y1='59.6553'%20x2='59.0518'%20y2='60.5906'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_8481_102191'%20x1='67.3434'%20y1='85.966'%20x2='103.216'%20y2='78.3411'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFABC'/%3e%3cstop%20offset='1'%20stop-color='%23FFA650'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_8481_102191'%20x1='51.4347'%20y1='74.8197'%20x2='91.1539'%20y2='74.8197'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint3_linear_8481_102191'%20x1='55.1887'%20y1='89.2031'%20x2='94.9078'%20y2='89.2031'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A3C1FF'/%3e%3cstop%20offset='1'%20stop-color='%234243FF'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint4_linear_8481_102191'%20x1='94.5023'%20y1='53.1799'%20x2='106.762'%20y2='58.7056'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint5_linear_8481_102191'%20x1='74.9906'%20y1='66.9871'%20x2='94.9778'%20y2='46.9999'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FFFDE0'/%3e%3cstop%20offset='1'%20stop-color='%23FFB362'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint6_linear_8481_102191'%20x1='50.5805'%20y1='44.0581'%20x2='59.9372'%20y2='44.0581'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='%23E3EEF3'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint7_linear_8481_102191'%20x1='88.4187'%20y1='43.3906'%20x2='99.3981'%20y2='25.1833'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF9498'/%3e%3cstop%20offset='1'%20stop-color='%23FFD671'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint8_linear_8481_102191'%20x1='56.4985'%20y1='29.5482'%20x2='100.532'%20y2='20.1885'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ECF7FF'/%3e%3cstop%20offset='1'%20stop-color='%23C2E0FF'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",QE=()=>u.jsxs(d.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:$E,width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:xE})]}),UE=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Be),[i,c]=w.useState(null),l=mt(yE,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(v,b)=>{s(A3,{search_keyword:t.label,search_result_label:b,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:v,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},g=()=>{c(null),o(J8())},y=()=>{n(),r(),g()};return e.length?i?u.jsx(qE,{meta:i,onBack:g,onLink:y}):u.jsxs(d.Stack,{gap:"14px",marginTop:"12px",children:[u.jsx(d.Typography,{variant:"body2",children:l}),u.jsx(d.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:v,name:b,description:p})=>u.jsxs(xp,{onClick:()=>f(v,b),direction:"row",children:[u.jsxs(d.Stack,{flexGrow:1,children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:b}),u.jsx(d.Typography,{variant:"caption",color:d.theme.palette.gray.gray3,children:p})]}),u.jsx(d.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:ZE})})]},v))})]}):u.jsx(QE,{})},zc=d.styled(d.Skeleton)`
1290
1290
  display: block;
1291
1291
  margin: ${e=>e.margin?e.margin:0};
1292
- `,QE=()=>u.jsxs(d.Stack,{marginTop:"12px",children:[u.jsx(Yc,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(d.Stack,{gap:"17px",children:u.jsxs(Cp,{gap:"8px",disableHover:!0,children:[u.jsx(Yc,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx(Yc,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let Jc={};const qc=new Set,UE=(e,t)=>{Jc={...Jc,[e]:t},qc.forEach(n=>n())},KE=e=>(qc.add(e),()=>qc.delete(e)),eI=e=>w.useSyncExternalStore(KE,()=>Jc)[e],tI=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await Le({url:ME.replace(":formId",e.toString()),method:je.POST,data:{search_string:t,args:n}});let o=null;return r!=null&&r.data&&"data"in r.data&&(o=r.data.data),o}catch(r){we({message:hn,type:ze}),console.error(r)}},nI=(e,t)=>Yt({mutationFn:tI,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),$c={OPEN_FORM_VIEW:"connector-agent-open-form-view"},rI=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=w.useRef(!1),o=w.useRef(void 0),s=w.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=w.useCallback((c,l="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(l),r.current=!0},n)))},[s,n]),i=w.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return w.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},oI=e=>A.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.86993 0.652446C7.56922 0.248711 8.43078 0.248711 9.13007 0.652446L13.7981 3.34755C14.4974 3.75129 14.9282 4.49742 14.9282 5.30489V10.6951C14.9282 11.5026 14.4974 12.2487 13.7981 12.6524L9.13007 15.3476C8.43078 15.7513 7.56922 15.7513 6.86993 15.3476L2.20187 12.6524C1.50258 12.2487 1.0718 11.5026 1.0718 10.6951V5.30489C1.0718 4.49742 1.50258 3.75129 2.20187 3.34755L6.86993 0.652446Z",fill:"#FFD122"}),A.createElement("g",{filter:"url(#filter0_d_360_39563)"},A.createElement("path",{d:"M5.83154 4.43359V4.43359C6.84296 4.43359 7.66287 5.25351 7.66287 6.26492V11.5179V11.5179C6.65146 11.5179 5.83154 10.698 5.83154 9.68661V4.43359Z",fill:"white"})),A.createElement("g",{filter:"url(#filter1_d_360_39563)"},A.createElement("path",{d:"M8.57812 7.66211V7.66211C9.58954 7.66211 10.4095 8.48202 10.4095 9.49343V11.7103V11.7103C9.39804 11.7103 8.57812 10.8904 8.57812 9.87898V7.66211Z",fill:"white"})),A.createElement("defs",null,A.createElement("filter",{id:"filter0_d_360_39563",x:4.76488,y:3.36693,width:3.96488,height:9.21732,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",null),A.createElement("feGaussianBlur",{stdDeviation:.533333}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),A.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})),A.createElement("filter",{id:"filter1_d_360_39563",x:7.51146,y:6.59544,width:3.96488,height:6.18216,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",null),A.createElement("feGaussianBlur",{stdDeviation:.533333}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),A.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})))),sI="/v1/api/connectors/lookup/bulk",aI="/v1/api/connectors/lookup/bulk",iI=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${sI}?${t.toString()}`,r=await Le({url:n,method:je.GET});return r==null?void 0:r.data},cI=async e=>{const t=await Le({url:aI,method:je.PUT,data:{entries:e}});return t==null?void 0:t.data},lI={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},uI={border:`1px solid ${d.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},xp={flex:1,height:"1px",backgroundColor:d.theme.palette.gray.gray6},dI={flexShrink:0,border:`1px solid ${d.theme.palette.gray.gray6}`,borderRadius:"15px"},fI={border:`1px solid ${d.theme.palette.gray.gray6}`,backgroundColor:d.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},pI=w.memo(function({connector:t,selectedHiverParam:n,onChange:r,sendTrackingEvent:o}){var i;const s=((i=(t.presets??[]).find(c=>c.hiverParam===n))==null?void 0:i.objectParamLabel)??"",a=w.useCallback(c=>{o(D3,{hiver_param:c.target.value,connector_name:t.connectorName,page:"agent_connector_panel"}),r(t.connectorId,c.target.value)},[t.connectorId,t.connectorName,r,o]);return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[u.jsx(d.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:lI,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(g=>g.hiverParam===c))==null?void 0:f.label)??"";return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(oI,{width:18,height:18}),u.jsx("span",{children:l})]})},children:(t.presets??[]).map(c=>u.jsx(d.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),u.jsx(d.Box,{sx:xp}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:dI,children:[t.logo&&u.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),u.jsxs(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),u.jsx(d.Box,{sx:xp}),u.jsx(d.Box,{sx:fI,children:u.jsx(d.Typography,{variant:"body2",fontSize:14,children:s})})]})}),hI=w.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=w.useContext(Be),[a,i]=w.useState({});w.useEffect(()=>{if(t&&r.length>0){const b={};r.filter(p=>{var h;return((h=p.presets)==null?void 0:h.length)>1}).forEach(p=>{b[p.connectorId]=p.hiverParam}),i(b)}},[t,r]);const c=ho(),{mutate:l,isPending:f}=Yt({mutationFn:cI,onSuccess:b=>{const p={};b.results.forEach(({connectorId:h,hiverParam:m})=>{p[h]=m}),c.setQueriesData({queryKey:["lookup","bulk"]},h=>h&&{...h,connectors:h.connectors.map(m=>p[m.connectorId]!==void 0?{...m,hiverParam:p[m.connectorId]}:m)}),s(N3,{page:"agent_connector_panel"}),we({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{we({message:"Failed to save identity mapping",type:"error"})}}),g=w.useCallback(()=>{const b=Object.entries(a).map(([p,h])=>({connector_id:p,hiver_param:h}));l(b)},[a,l]),y=w.useCallback((b,p)=>{i(h=>({...h,[b]:p}))},[]),v=w.useCallback(b=>{b||n()},[n]);return u.jsx(cr,{shown:t,setShown:v,showCloseButton:!1,children:u.jsxs(d.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[u.jsx(d.Typography,{variant:"h2",children:"Customer identity mapping"}),u.jsx(d.Typography,{variant:"body2",children:"Choose how Hiver should identify customers when fetching data from connected apps."}),r.some(b=>{var p;return((p=b.presets)==null?void 0:p.length)>1})&&u.jsx(d.Stack,{gap:"8px",sx:uI,children:r.filter(b=>{var p;return((p=b.presets)==null?void 0:p.length)>1}).map(b=>u.jsx(pI,{connector:b,selectedHiverParam:a[b.connectorId]??b.hiverParam,onChange:y,sendTrackingEvent:s},b.connectorId))}),u.jsxs(d.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[u.jsx(d.Button,{variant:"text",onClick:n,children:"Cancel"}),u.jsx(d.Button,{variant:"contained",onClick:g,disabled:f,children:"Save"})]})]})})}),gI=({enabled:e,...t})=>{const{actionQueue:n}=w.useContext(Be);n&&e&&n.register(t),w.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},mI=({isAdmin:e=!1})=>{var W,U;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s}=w.useContext(Be),a=Vt(),{userGroupId:i,userId:c}=Bt()||{},l=w.useRef(!1),f=w.useRef(null),g=w.useRef(null),y=w.useRef(null),[v,b]=w.useState({}),[p,h]=w.useState(!1),[m,x]=w.useState(!1),[C,I]=w.useState(!1),[E,_]=w.useState(!1),[T,S]=w.useState(),[L,N]=w.useState(!1),[k,D]=w.useState(null),[P,V]=w.useState(),[z,$]=w.useState(null),[Q,X]=w.useState(!1),[q,oe]=w.useState(!1),[ie,B]=w.useState(!1),R=Ce(Sx),G=Ce(Tx),H=Ce(Lx),J=Ce(Ox),re=Ce(kx),se=Ce(Ax),j=Ce(W1),te=Ce(Xx),Ee=Ce(Z1),Z=Ce(X1),Ve=Ce(z1),Ne=Ce(Jv),Je=w.useMemo(()=>R?[...new Set(R.map(Y=>Y.connectorId).filter(Boolean))]:[],[R]),at=et(o,M3),cn=et(o,pd),xt=et(o,H3),Ke=et(o,Z3),Qe=et(o,X3),jn=et(o,z3),zt=(W=Bt())==null?void 0:W.tenantPlatform,Bn=et(o,zt==="HIVERWEB"?`hot-${hd}`:hd),{data:ln,isSuccess:yr}=Er({queryKey:["lookup","bulk",Je.join(",")],queryFn:()=>iI(Je),enabled:Je.length>0&&Bn&&e,refetchOnMount:!1}),Vn=yr&&((ln==null?void 0:ln.connectors)??[]).some(Y=>{var ae;return(((ae=Y.presets)==null?void 0:ae.length)??0)>1});gI({conversationId:s,openCreateForm:()=>I(!0),enabled:G});const fe=w.useMemo(()=>!R||!R.length?null:Mx(R,H,J),[R,H,J]),Ie=c5(H),{data:rt,isLoading:it}=bp({senderEmail:t,conversationId:String(s),enabled:Ke&&!!t}),{emailHeaders:Ot,selectedEmail:Gn}=rt??{},{scrollOnceAfterLoad:Cn,resetScrollState:ro}=rI(g),Oa=se!==ee.LOADING&&(!J||!Object.values(J).some(Y=>Y===ee.LOADING))&&R&&R.length>0;w.useLayoutEffect(()=>{var Y;Q&&!p&&q&&((Y=y==null?void 0:y.current)!=null&&Y.scrollHeight)&&Cn(!!Oa,"smooth")},[Q,p,q,Oa,Cn,(U=y==null?void 0:y.current)==null?void 0:U.scrollHeight,c]);const ll=(Y,ae)=>{r(w3,{search_keyword:Y,sm_ids:n,connector_name:ae,suggestion_type:Ne})},ul=(Y,ae,me)=>{!Array.isArray(ae)||!ae.length?r(_3,{search_keyword:Y,sm_ids:n,connector_name:me,suggestion_type:Ne}):ae.length&&r(S3,{num_of_results:ae.length,search_keyword:Y,sm_ids:n,connector_name:me,suggestion_type:Ne})},{mutate:dl,reset:oo,data:Fa,isPending:Hn,isIdle:Xo}=nI(ll,ul),so=w.useCallback(()=>{oo(),D(null)},[oo,D]),zo=ho(),un=w.useCallback(()=>{t&&n.length&&s&&a(wa({inboxIds:n,conversationId:s}))},[a,t,n,s]),ka=w.useCallback(()=>{zo.invalidateQueries({queryKey:["lookup","bulk"]}),un()},[zo,un]),Da=w.useCallback((Y,ae)=>{Y&&s&&ae&&a(Ia({id:Y,channelType:"email",conversationId:s,externalResourceId:ae,contactEmail:t})).unwrap().catch(()=>{a(Gr(null))})},[a,s,t]);if(w.useEffect(()=>{(async()=>{c&&(X(await fi(c)),oe(await cu(c)))})()},[c]),w.useEffect(()=>{it||V(Gn||t)},[t,Gn,it]),w.useEffect(()=>{P&&s&&UE(String(s),P)},[P,s]),w.useEffect(()=>{q&&c&&lu(c)},[q,c]),w.useEffect(()=>{var Y;if(Z){x(!0);const{externalResourceId:ae}=Z,me=(Y=Z.forms.find(ge=>ge.type==="edit"))==null?void 0:Y.id;Da(me,ae)}else x(!1),a(vx())},[Z,Da,a]),w.useEffect(()=>(un(),ro(),()=>{a(G1.clearConnectorList())}),[a,un,ro]),w.useEffect(()=>{if(re&&R&&R.length&&fe&&!l.current){const{cards_per_app:Y,total_empty_cards:ae,total_cards_with_errors:me}=fe;r(Um,{numOfCards:R.length,total_cards_loaded:R.length,total_empty_cards:ae,total_cards_with_errors:me,cards_per_app:Y,sm_ids:n}),l.current=!0}return()=>{l.current=!1}},[re,R,fe,r,n]),w.useEffect(()=>{s&&n&&n.length&&a(ya({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:jn}))},[a,n,s,jn]),w.useEffect(()=>{const Y=ae=>{var ge;if(!(ae instanceof CustomEvent))return;const me=(ge=ae.detail)==null?void 0:ge.connectorKey;b({connectorKey:me})};return window.addEventListener($c.OPEN_FORM_VIEW,Y),()=>{window.removeEventListener($c.OPEN_FORM_VIEW,Y)}},[]),w.useEffect(()=>{if(!(j!=null&&j.length)||!v.connectorKey)return;const Y=v.connectorKey;b({});const ae=j.find(me=>{var ge;return((ge=me.connectorKey)==null?void 0:ge.toLowerCase())===(Y==null?void 0:Y.toLowerCase())});ae&&($(ae),I(!0))},[j,v]),!t.length||se===ee.LOADING)return u.jsx(Dv,{});const Na=Y=>{r(r3,{connector_name:te,source:Y,sm_ids:n})},Yo=Y=>{I(!0),Na(Y)},fl=()=>{_(!0),r(o3)},Ra=Y=>{r(Y,T),Ve?N(!0):(I(!1),$(null))},Jo=Y=>{if(Z){const{connectorName:ae,title:me}=Z;r(Y,{connector_name:ae,card_title:me,sm_ids:n,ug_id:i})}Ve?N(!0):a(Gr(null))},Ma=()=>{I(!1),a(Gr(null)),S(void 0),N(!1)},Pa=()=>{un(),a(G1.clearConnectorList())},pl=[{label:"Go back",variant:"text",action:Ma},{label:"Stay",variant:"contained",action:()=>N(!1)}],qo=j.length>0,$o=Ee.length>0,O=()=>qo||$o?u.jsx(cE,{haveCreateObjects:qo,haveLinkObjects:$o,onCreateClick:()=>Yo(Sd.MAIN_BUTTON),onLinkClick:()=>_(!0)}):u.jsx(q1,{isAdmin:e,hideHeading:!0});return u.jsxs(Md,{ref:f,"data-testid":Array.isArray(R)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:C||E,children:[u.jsx(ap,{shown:L,setShown:N,title:px,description:hx,buttons:pl}),u.jsx(G5,{onWheel:()=>h(!0),ref:y,children:G?u.jsxs(u.Fragment,{children:[u.jsx(C4,{connectors:Ie,isWriteFlowEnabled:cn,haveCreateObjects:qo,haveLinkObjects:$o,cards:R,handleCreateNewObject:()=>Yo(Sd.ICON),handleLinkNewObject:fl}),xt?u.jsx(GE,{selectedObject:k,setSelectedObject:D,fetchSearchResults:dl,onReset:so,root:f.current}):null,u.jsxs(Hr,{children:[u.jsx(Wr,{condition:xt&&Hn,children:u.jsx(QE,{})},"search"),u.jsx(Wr,{condition:xt&&!!k&&!Xo,children:u.jsx($E,{searchResults:Fa??[],selectedObject:k,onReset:so,fetchCards:un})},"results"),u.jsxs(Wr,{fallback:!0,children:[Ke&&(R!=null&&R.length)?u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(d.Stack,{sx:{flex:1,minWidth:0},children:u.jsx(Wv,{emailHeaders:Ot,selectedEmail:P,root:f.current,isLoading:it,setSelectedEmail:V})}),Bn&&Vn&&e&&u.jsx(d.Tooltip,{title:"Update customer identity mapping",placement:"top",children:u.jsx(d.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(fd,{page:"agent_connector_panel"}),B(!0)},children:u.jsx(d.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!Ke&&Bn&&Vn&&e&&(R!=null&&R.length)?u.jsx(d.Button,{fullWidth:!0,variant:"contained",startIcon:u.jsx(d.icons.SettingsOutlined,{sx:{height:"14px",width:"14px"}}),sx:{backgroundColor:"#edf1f6",color:"#4d596c",borderRadius:"6px",padding:"9px 12px",marginTop:"12px",textTransform:"none",fontWeight:500,fontSize:"14px",lineHeight:"20px",boxShadow:"none","&:hover":{backgroundColor:"#e2e8f0",boxShadow:"none"}},onClick:()=>{r(fd,{page:"agent_connector_panel"}),B(!0)},children:"Customer identity mapping"}):null,at?u.jsx(Nv,{}):null,u.jsxs(Hr,{children:[u.jsxs(Wr,{condition:!!R&&R.length>0,children:[u.jsx(cv,{cards:R,specificCardData:H,email:P??"",specificConnectorApiStatus:J,onCardUnlinking:un}),u.jsx("div",{ref:g,children:Qe?u.jsx(x5,{connectors:Ie,expanded:Q}):null})]},"cards-list"),u.jsx(Wr,{condition:!(R!=null&&R.length)&&cn,children:O()},"create-banner")]})]},"cards")]})]}):u.jsx(q1,{isAdmin:e})}),u.jsx(Zc,{onClose:()=>Jo(b3),isOpen:m,setIsOpen:x,title:e5,portalId:"connector-layover-portal",backButtonTooltip:"Back",children:u.jsx(cp,{isEdit:!0,onClose:()=>Jo(m3),onCreateSuccess:Pa,metaData:T,setMetaData:S,connectors:Ie})}),u.jsx(Zc,{onClose:()=>Ra(u3),portalId:"connector-layover-portal",isOpen:C,setIsOpen:I,children:u.jsx(cp,{onClose:()=>Ra(l3),onCreateSuccess:Pa,metaData:T,setMetaData:S,defaultOption:z,connectors:Ie})}),u.jsx(Zc,{onClose:()=>_(!1),portalId:"connector-layover-portal",isOpen:E,setIsOpen:_,children:u.jsx(rE,{setOpenTaskLinking:_,onLinkingSuccess:un})}),!G&&u.jsx(k5,{}),Bn&&u.jsx(hI,{open:ie,onClose:()=>B(!1),connectors:(ln==null?void 0:ln.connectors)??[],onSaveSuccess:ka})]})},bI=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:g=!1,actionQueue:y})=>{const v=w.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:l,stackingContext:f,actionQueue:y}),[s,n,r,t,o,a,i,c,g,l,f,y]);return u.jsx(Be.Provider,{value:v,children:e})},Qc=({children:e})=>{const[t]=w.useState(()=>new T2);return u.jsx(k2,{client:t,children:e})},yI=Ud({cardList:Hx,write:Ex,common:J8}),Uc=Bb({reducer:yI,devTools:!0}),CI=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c})=>u.jsx($i,{store:Uc,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(Qc,{children:u.jsx(bI,{userEmail:t,availableFeatures:s,sendTrackingEvent:n==null?void 0:n.sendTrackingEvent,contactEmail:r,currentSmIds:n==null?void 0:n.currentSmIds,metaData:n==null?void 0:n.metaData,conversationId:n==null?void 0:n.conversationId,baseUrls:o,connectorFunctions:a,stackingContext:i,actionQueue:c,isAdmin:n==null?void 0:n.isAdmin,children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})}),Kc=d.styled(d.Box)`
1292
+ `,KE=()=>u.jsxs(d.Stack,{marginTop:"12px",children:[u.jsx(zc,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(d.Stack,{gap:"17px",children:u.jsxs(xp,{gap:"8px",disableHover:!0,children:[u.jsx(zc,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx(zc,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let Yc={};const Jc=new Set,eI=(e,t)=>{Yc={...Yc,[e]:t},Jc.forEach(n=>n())},tI=e=>(Jc.add(e),()=>Jc.delete(e)),nI=e=>w.useSyncExternalStore(tI,()=>Yc)[e],rI=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await Se({url:jE.replace(":formId",e.toString()),method:je.POST,data:{search_string:t,args:n}});let o=null;return r!=null&&r.data&&"data"in r.data&&(o=r.data.data),o}catch(r){Ie({message:hn,type:ze}),console.error(r)}},oI=(e,t)=>$t({mutationFn:rI,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),qc={OPEN_FORM_VIEW:"connector-agent-open-form-view"},sI=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=w.useRef(!1),o=w.useRef(void 0),s=w.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=w.useCallback((c,l="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(l),r.current=!0},n)))},[s,n]),i=w.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return w.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},aI=e=>A.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.86993 0.652446C7.56922 0.248711 8.43078 0.248711 9.13007 0.652446L13.7981 3.34755C14.4974 3.75129 14.9282 4.49742 14.9282 5.30489V10.6951C14.9282 11.5026 14.4974 12.2487 13.7981 12.6524L9.13007 15.3476C8.43078 15.7513 7.56922 15.7513 6.86993 15.3476L2.20187 12.6524C1.50258 12.2487 1.0718 11.5026 1.0718 10.6951V5.30489C1.0718 4.49742 1.50258 3.75129 2.20187 3.34755L6.86993 0.652446Z",fill:"#FFD122"}),A.createElement("g",{filter:"url(#filter0_d_360_39563)"},A.createElement("path",{d:"M5.83154 4.43359V4.43359C6.84296 4.43359 7.66287 5.25351 7.66287 6.26492V11.5179V11.5179C6.65146 11.5179 5.83154 10.698 5.83154 9.68661V4.43359Z",fill:"white"})),A.createElement("g",{filter:"url(#filter1_d_360_39563)"},A.createElement("path",{d:"M8.57812 7.66211V7.66211C9.58954 7.66211 10.4095 8.48202 10.4095 9.49343V11.7103V11.7103C9.39804 11.7103 8.57812 10.8904 8.57812 9.87898V7.66211Z",fill:"white"})),A.createElement("defs",null,A.createElement("filter",{id:"filter0_d_360_39563",x:4.76488,y:3.36693,width:3.96488,height:9.21732,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",null),A.createElement("feGaussianBlur",{stdDeviation:.533333}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),A.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})),A.createElement("filter",{id:"filter1_d_360_39563",x:7.51146,y:6.59544,width:3.96488,height:6.18216,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},A.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),A.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),A.createElement("feOffset",null),A.createElement("feGaussianBlur",{stdDeviation:.533333}),A.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.114019 0"}),A.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),A.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})))),iI="/v1/api/connectors/lookup/bulk",cI="/v1/api/connectors/lookup/bulk",lI=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${iI}?${t.toString()}`,r=await Se({url:n,method:je.GET});return r==null?void 0:r.data},uI=async e=>{const t=await Se({url:cI,method:je.PUT,data:{entries:e}});return t==null?void 0:t.data},dI={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},fI={border:`1px solid ${d.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},vp={flex:1,height:"1px",backgroundColor:d.theme.palette.gray.gray6},pI={flexShrink:0,border:`1px solid ${d.theme.palette.gray.gray6}`,borderRadius:"15px"},hI={border:`1px solid ${d.theme.palette.gray.gray6}`,backgroundColor:d.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},gI=w.memo(function({connector:t,selectedHiverParam:n,onChange:r,sendTrackingEvent:o}){var i;const s=((i=(t.presets??[]).find(c=>c.hiverParam===n))==null?void 0:i.objectParamLabel)??"",a=w.useCallback(c=>{o(N3,{hiver_param:c.target.value,connector_name:t.connectorName,page:"agent_connector_panel"}),r(t.connectorId,c.target.value)},[t.connectorId,t.connectorName,r,o]);return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[u.jsx(d.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:dI,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(g=>g.hiverParam===c))==null?void 0:f.label)??"";return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(aI,{width:18,height:18}),u.jsx("span",{children:l})]})},children:(t.presets??[]).map(c=>u.jsx(d.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),u.jsx(d.Box,{sx:vp}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:pI,children:[t.logo&&u.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),u.jsxs(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),u.jsx(d.Box,{sx:vp}),u.jsx(d.Box,{sx:hI,children:u.jsx(d.Typography,{variant:"body2",fontSize:14,children:s})})]})}),mI=w.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=w.useContext(Be),[a,i]=w.useState({});w.useEffect(()=>{if(t&&r.length>0){const b={};r.filter(p=>{var h;return((h=p.presets)==null?void 0:h.length)>1}).forEach(p=>{b[p.connectorId]=p.hiverParam}),i(b)}},[t,r]);const c=fo(),{mutate:l,isPending:f}=$t({mutationFn:uI,onSuccess:b=>{const p={};b.results.forEach(({connectorId:h,hiverParam:m})=>{p[h]=m}),c.setQueriesData({queryKey:["lookup","bulk"]},h=>h&&{...h,connectors:h.connectors.map(m=>p[m.connectorId]!==void 0?{...m,hiverParam:p[m.connectorId]}:m)}),s(R3,{page:"agent_connector_panel"}),Ie({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{Ie({message:"Failed to save identity mapping",type:"error"})}}),g=w.useCallback(()=>{const b=Object.entries(a).map(([p,h])=>({connector_id:p,hiver_param:h}));l(b)},[a,l]),y=w.useCallback((b,p)=>{i(h=>({...h,[b]:p}))},[]),v=w.useCallback(b=>{b||n()},[n]);return u.jsx(sr,{shown:t,setShown:v,showCloseButton:!1,children:u.jsxs(d.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[u.jsx(d.Typography,{variant:"h2",children:"Customer identity mapping"}),u.jsx(d.Typography,{variant:"body2",children:"Choose how Hiver should identify customers when fetching data from connected apps."}),r.some(b=>{var p;return((p=b.presets)==null?void 0:p.length)>1})&&u.jsx(d.Stack,{gap:"8px",sx:fI,children:r.filter(b=>{var p;return((p=b.presets)==null?void 0:p.length)>1}).map(b=>u.jsx(gI,{connector:b,selectedHiverParam:a[b.connectorId]??b.hiverParam,onChange:y,sendTrackingEvent:s},b.connectorId))}),u.jsxs(d.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[u.jsx(d.Button,{variant:"text",onClick:n,children:"Cancel"}),u.jsx(d.Button,{variant:"contained",onClick:g,disabled:f,children:"Save"})]})]})})}),bI=({enabled:e,...t})=>{const{actionQueue:n}=w.useContext(Be);n&&e&&n.register(t),w.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},yI=({isAdmin:e=!1})=>{var Q,pe;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s}=w.useContext(Be),a=Ht(),{userGroupId:i,userId:c}=Gt()||{},l=w.useRef(!1),f=w.useRef(null),g=w.useRef(null),y=w.useRef(null),[v,b]=w.useState({}),[p,h]=w.useState(!1),[m,x]=w.useState(!1),[C,I]=w.useState(!1),[E,_]=w.useState(!1),[T,S]=w.useState(),[L,N]=w.useState(!1),[k,D]=w.useState(null),[M,V]=w.useState(),[z,q]=w.useState(null),[$,X]=w.useState(!1),[J,oe]=w.useState(!1),[ae,B]=w.useState(!1),P=Ce(Ax),G=Ce(Lx),H=Ce(Fx),Y=Ce(kx),re=Ce(Nx),se=Ce(Ox),j=Ce(Z1),te=Ce(Yx),Ee=Ce(X1),Z=Ce(z1),Ve=Ce(Y1),Ne=Ce($v),Ke=et(o,P3),rt=et(o,pd),Jt=et(o,W3),vt=et(o,X3),at=et(o,z3),Je=et(o,Y3),gr=(Q=Gt())==null?void 0:Q.tenantPlatform,ut=et(o,gr==="HIVERWEB"?`hot-${hd}`:hd),{data:no}=Wn({queryKey:["connectors","enabledAuthenticated"],queryFn:Dy,enabled:ut&&e}),mr=w.useMemo(()=>(no??[]).map(ee=>ee.id),[no]),{data:Nt,isSuccess:br}=Wn({queryKey:["lookup","bulk",mr.join(",")],queryFn:()=>lI(mr),enabled:mr.length>0&&ut&&e,refetchOnMount:!1}),fe=br&&((Nt==null?void 0:Nt.connectors)??[]).some(ee=>{var ce;return(((ce=ee.presets)==null?void 0:ce.length)??0)>1});bI({conversationId:s,openCreateForm:()=>I(!0),enabled:G});const we=w.useMemo(()=>!P||!P.length?null:jx(P,H,Y),[P,H,Y]),qe=l5(H),{data:Et,isLoading:dt}=yp({senderEmail:t,conversationId:String(s),enabled:vt&&!!t}),{emailHeaders:yr,selectedEmail:Cn}=Et??{},{scrollOnceAfterLoad:ro,resetScrollState:Fa}=sI(g),ka=se!==K.LOADING&&(!Y||!Object.values(Y).some(ee=>ee===K.LOADING))&&P&&P.length>0;w.useLayoutEffect(()=>{var ee;$&&!p&&J&&((ee=y==null?void 0:y.current)!=null&&ee.scrollHeight)&&ro(!!ka,"smooth")},[$,p,J,ka,ro,(pe=y==null?void 0:y.current)==null?void 0:pe.scrollHeight,c]);const cl=(ee,ce)=>{r(_3,{search_keyword:ee,sm_ids:n,connector_name:ce,suggestion_type:Ne})},ll=(ee,ce,he)=>{!Array.isArray(ce)||!ce.length?r(S3,{search_keyword:ee,sm_ids:n,connector_name:he,suggestion_type:Ne}):ce.length&&r(T3,{num_of_results:ce.length,search_keyword:ee,sm_ids:n,connector_name:he,suggestion_type:Ne})},{mutate:Wo,reset:Zo,data:jn,isPending:Xo,isIdle:zo}=oI(cl,ll),Yo=w.useCallback(()=>{Zo(),D(null)},[Zo,D]),Da=fo(),qt=w.useCallback(()=>{t&&n.length&&s&&a(_a({inboxIds:n,conversationId:s}))},[a,t,n,s]),ul=w.useCallback(()=>{Da.invalidateQueries({queryKey:["lookup","bulk"]}),qt()},[Da,qt]),Jo=w.useCallback((ee,ce)=>{ee&&s&&ce&&a(wa({id:ee,channelType:"email",conversationId:s,externalResourceId:ce,contactEmail:t})).unwrap().catch(()=>{a(Vr(null))})},[a,s,t]);if(w.useEffect(()=>{(async()=>{c&&(X(await di(c)),oe(await cu(c)))})()},[c]),w.useEffect(()=>{dt||V(Cn||t)},[t,Cn,dt]),w.useEffect(()=>{M&&s&&eI(String(s),M)},[M,s]),w.useEffect(()=>{J&&c&&lu(c)},[J,c]),w.useEffect(()=>{var ee;if(Z){x(!0);const{externalResourceId:ce}=Z,he=(ee=Z.forms.find(me=>me.type==="edit"))==null?void 0:ee.id;Jo(he,ce)}else x(!1),a(Ix())},[Z,Jo,a]),w.useEffect(()=>(qt(),Fa(),()=>{a(H1.clearConnectorList())}),[a,qt,Fa]),w.useEffect(()=>{if(re&&P&&P.length&&we&&!l.current){const{cards_per_app:ee,total_empty_cards:ce,total_cards_with_errors:he}=we;r(Km,{numOfCards:P.length,total_cards_loaded:P.length,total_empty_cards:ce,total_cards_with_errors:he,cards_per_app:ee,sm_ids:n}),l.current=!0}return()=>{l.current=!1}},[re,P,we,r,n]),w.useEffect(()=>{s&&n&&n.length&&a(Ca({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:Je}))},[a,n,s,Je]),w.useEffect(()=>{const ee=ce=>{var me;if(!(ce instanceof CustomEvent))return;const he=(me=ce.detail)==null?void 0:me.connectorKey;b({connectorKey:he})};return window.addEventListener(qc.OPEN_FORM_VIEW,ee),()=>{window.removeEventListener(qc.OPEN_FORM_VIEW,ee)}},[]),w.useEffect(()=>{if(!(j!=null&&j.length)||!v.connectorKey)return;const ee=v.connectorKey;b({});const ce=j.find(he=>{var me;return((me=he.connectorKey)==null?void 0:me.toLowerCase())===(ee==null?void 0:ee.toLowerCase())});ce&&(q(ce),I(!0))},[j,v]),!t.length||se===K.LOADING)return u.jsx(Rv,{});const Na=ee=>{r(o3,{connector_name:te,source:ee,sm_ids:n})},Ra=ee=>{I(!0),Na(ee)},dl=()=>{_(!0),r(s3)},qo=ee=>{r(ee,T),Ve?N(!0):(I(!1),q(null))},$o=ee=>{if(Z){const{connectorName:ce,title:he}=Z;r(ee,{connector_name:ce,card_title:he,sm_ids:n,ug_id:i})}Ve?N(!0):a(Vr(null))},fl=()=>{I(!1),a(Vr(null)),S(void 0),N(!1)},Ma=()=>{qt(),a(H1.clearConnectorList())},pl=[{label:"Go back",variant:"text",action:fl},{label:"Stay",variant:"contained",action:()=>N(!1)}],Qo=j.length>0,O=Ee.length>0,W=()=>Qo||O?u.jsx(uE,{haveCreateObjects:Qo,haveLinkObjects:O,onCreateClick:()=>Ra(Sd.MAIN_BUTTON),onLinkClick:()=>_(!0)}):u.jsx($1,{isAdmin:e,hideHeading:!0});return u.jsxs(Md,{ref:f,"data-testid":Array.isArray(P)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:C||E,children:[u.jsx(ip,{shown:L,setShown:N,title:gx,description:mx,buttons:pl}),u.jsx(H5,{onWheel:()=>h(!0),ref:y,children:G?u.jsxs(u.Fragment,{children:[u.jsx(x4,{connectors:qe,isWriteFlowEnabled:rt,haveCreateObjects:Qo,haveLinkObjects:O,cards:P,handleCreateNewObject:()=>Ra(Sd.ICON),handleLinkNewObject:dl}),Jt?u.jsx(WE,{selectedObject:k,setSelectedObject:D,fetchSearchResults:Wo,onReset:Yo,root:f.current}):null,u.jsxs(Gr,{children:[u.jsx(Hr,{condition:Jt&&Xo,children:u.jsx(KE,{})},"search"),u.jsx(Hr,{condition:Jt&&!!k&&!zo,children:u.jsx(UE,{searchResults:jn??[],selectedObject:k,onReset:Yo,fetchCards:qt})},"results"),u.jsxs(Hr,{fallback:!0,children:[vt&&(P!=null&&P.length)?u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(d.Stack,{sx:{flex:1,minWidth:0},children:u.jsx(Xv,{emailHeaders:yr,selectedEmail:M,root:f.current,isLoading:dt,setSelectedEmail:V})}),ut&&fe&&e&&u.jsx(d.Tooltip,{title:"Update customer identity mapping",placement:"top",children:u.jsx(d.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(fd,{page:"agent_connector_panel"}),B(!0)},children:u.jsx(d.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!vt&&ut&&fe&&e&&(P!=null&&P.length)?u.jsx(d.Button,{fullWidth:!0,variant:"contained",startIcon:u.jsx(d.icons.SettingsOutlined,{sx:{height:"14px",width:"14px"}}),sx:{backgroundColor:"#edf1f6",color:"#4d596c",borderRadius:"6px",padding:"9px 12px",marginTop:"12px",textTransform:"none",fontWeight:500,fontSize:"14px",lineHeight:"20px",boxShadow:"none","&:hover":{backgroundColor:"#e2e8f0",boxShadow:"none"}},onClick:()=>{r(fd,{page:"agent_connector_panel"}),B(!0)},children:"Customer identity mapping"}):null,Ke?u.jsx(Mv,{}):null,u.jsxs(Gr,{children:[u.jsxs(Hr,{condition:!!P&&P.length>0,children:[u.jsx(uv,{cards:P,specificCardData:H,email:M??"",specificConnectorApiStatus:Y,onCardUnlinking:qt}),u.jsx("div",{ref:g,children:at?u.jsx(v5,{connectors:qe,expanded:$}):null})]},"cards-list"),u.jsx(Hr,{condition:!(P!=null&&P.length)&&rt,children:W()},"create-banner")]})]},"cards")]})]}):u.jsx($1,{isAdmin:e})}),u.jsx(Wc,{onClose:()=>$o(y3),isOpen:m,setIsOpen:x,title:t5,portalId:"connector-layover-portal",backButtonTooltip:"Back",children:u.jsx(lp,{isEdit:!0,onClose:()=>$o(b3),onCreateSuccess:Ma,metaData:T,setMetaData:S,connectors:qe})}),u.jsx(Wc,{onClose:()=>qo(d3),portalId:"connector-layover-portal",isOpen:C,setIsOpen:I,children:u.jsx(lp,{onClose:()=>qo(u3),onCreateSuccess:Ma,metaData:T,setMetaData:S,defaultOption:z,connectors:qe})}),u.jsx(Wc,{onClose:()=>_(!1),portalId:"connector-layover-portal",isOpen:E,setIsOpen:_,children:u.jsx(sE,{setOpenTaskLinking:_,onLinkingSuccess:qt})}),!G&&u.jsx(D5,{}),ut&&u.jsx(mI,{open:ae,onClose:()=>B(!1),connectors:(Nt==null?void 0:Nt.connectors)??[],onSaveSuccess:ul})]})},CI=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:g=!1,actionQueue:y})=>{const v=w.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:l,stackingContext:f,actionQueue:y}),[s,n,r,t,o,a,i,c,g,l,f,y]);return u.jsx(Be.Provider,{value:v,children:e})},$c=({children:e})=>{const[t]=w.useState(()=>new A2);return u.jsx(D2,{client:t,children:e})},xI=Ud({cardList:Zx,write:wx,common:$8}),Qc=Vb({reducer:xI,devTools:!0}),vI=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c})=>u.jsx(qi,{store:Qc,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx($c,{children:u.jsx(CI,{userEmail:t,availableFeatures:s,sendTrackingEvent:n==null?void 0:n.sendTrackingEvent,contactEmail:r,currentSmIds:n==null?void 0:n.currentSmIds,metaData:n==null?void 0:n.metaData,conversationId:n==null?void 0:n.conversationId,baseUrls:o,connectorFunctions:a,stackingContext:i,actionQueue:c,isAdmin:n==null?void 0:n.isAdmin,children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})}),Uc=d.styled(d.Box)`
1293
1293
  height: inherit;
1294
1294
  .MuiScopedCssBaseline-root {
1295
1295
  height: inherit;
@@ -1397,7 +1397,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
1397
1397
  [hidden] {
1398
1398
  display: none;
1399
1399
  }
1400
- `,xI=d.styled(d.Box)`
1400
+ `,EI=d.styled(d.Box)`
1401
1401
  :root {
1402
1402
  --toastify-color-light: #fff;
1403
1403
  --toastify-color-dark: #121212;
@@ -2128,7 +2128,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2128
2128
  transform: rotate(360deg);
2129
2129
  }
2130
2130
  }
2131
- `,el=d.styled(xI)`
2131
+ `,Kc=d.styled(EI)`
2132
2132
  .Toastify__toast-container {
2133
2133
  min-width: 320px !important;
2134
2134
  font-size: 16px;
@@ -2177,7 +2177,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2177
2177
  align-self: auto !important;
2178
2178
  margin-left: 12px;
2179
2179
  }
2180
- `,vI=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i})=>u.jsx(Kc,{children:u.jsxs(CI,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,children:[u.jsx(mI,{isAdmin:r==null?void 0:r.isAdmin}),Re.createPortal(u.jsx(el,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!a.toastMessage&&{style:{zIndex:a.toastMessage}}})}),document.body),u.jsx("div",{"data-connectorid":"connector-layover-portal"})]})}),vp="/v1/api",EI=`${vp}/connector/conversation/:conversationId/data`,II=`${vp}/connector/feedback/conversation/:conversationId`,wI=async(e,t)=>{try{let n=EI.replace(":conversationId",e)+"?channel_type=email";if(t!=null&&t.length){const o=t.map(s=>`inbox_ids=${encodeURIComponent(s)}`).join("&");n+=`&${o}`}const r=await Le({url:n,method:je.GET});return r!=null&&r.data&&Array.isArray(r.data)?r.data.reduce((s,a)=>{var i,c;return s[(i=a==null?void 0:a.cardData)==null?void 0:i.textToHighlight]||(s[(c=a==null?void 0:a.cardData)==null?void 0:c.textToHighlight]={...a}),s},{}):null}catch(n){return Promise.reject(n)}};function _I(e,t,n){return Er({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await wI(e,n),enabled:!!t&&!!e})}class SI{constructor(t=[],n=null){De(this,"highlightTerms");De(this,"observer");De(this,"isHighlighting");De(this,"debounceTimer");De(this,"debounceDelay");De(this,"onHighlightsUpdated");this.highlightTerms=t,this.observer=null,this.isHighlighting=!1,this.debounceTimer=null,this.debounceDelay=500,this.onHighlightsUpdated=n,this.init()}init(){this.highlightAllEmails(),this.startObserver()}startObserver(){const t=this.findGmailContainer();if(!t){console.warn("Gmail container not found");return}this.observer=new MutationObserver(n=>{if(this.isHighlighting)return;let r=!1;n.forEach(o=>{o.type==="childList"&&Array.from(o.addedNodes).some(i=>{var c,l,f,g;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((l=i.classList)==null?void 0:l.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((g=i.querySelector)==null?void 0:g.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
2180
+ `,II=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i})=>u.jsx(Uc,{children:u.jsxs(vI,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,children:[u.jsx(yI,{isAdmin:r==null?void 0:r.isAdmin}),Re.createPortal(u.jsx(Kc,{id:"toast-message",children:u.jsx(Za,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!a.toastMessage&&{style:{zIndex:a.toastMessage}}})}),document.body),u.jsx("div",{"data-connectorid":"connector-layover-portal"})]})}),Ep="/v1/api",wI=`${Ep}/connector/conversation/:conversationId/data`,_I=`${Ep}/connector/feedback/conversation/:conversationId`,SI=async(e,t)=>{try{let n=wI.replace(":conversationId",e)+"?channel_type=email";if(t!=null&&t.length){const o=t.map(s=>`inbox_ids=${encodeURIComponent(s)}`).join("&");n+=`&${o}`}const r=await Se({url:n,method:je.GET});return r!=null&&r.data&&Array.isArray(r.data)?r.data.reduce((s,a)=>{var i,c;return s[(i=a==null?void 0:a.cardData)==null?void 0:i.textToHighlight]||(s[(c=a==null?void 0:a.cardData)==null?void 0:c.textToHighlight]={...a}),s},{}):null}catch(n){return Promise.reject(n)}};function TI(e,t,n){return Wn({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await SI(e,n),enabled:!!t&&!!e})}class AI{constructor(t=[],n=null){De(this,"highlightTerms");De(this,"observer");De(this,"isHighlighting");De(this,"debounceTimer");De(this,"debounceDelay");De(this,"onHighlightsUpdated");this.highlightTerms=t,this.observer=null,this.isHighlighting=!1,this.debounceTimer=null,this.debounceDelay=500,this.onHighlightsUpdated=n,this.init()}init(){this.highlightAllEmails(),this.startObserver()}startObserver(){const t=this.findGmailContainer();if(!t){console.warn("Gmail container not found");return}this.observer=new MutationObserver(n=>{if(this.isHighlighting)return;let r=!1;n.forEach(o=>{o.type==="childList"&&Array.from(o.addedNodes).some(i=>{var c,l,f,g;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((l=i.classList)==null?void 0:l.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((g=i.querySelector)==null?void 0:g.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
2181
2181
  .gmail-highlight {
2182
2182
  background-color: #ECEFF6 !important;
2183
2183
  color: #2c3e50 !important;
@@ -2207,7 +2207,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2207
2207
  transform: translateY(0) !important;
2208
2208
  box-shadow: none !important;
2209
2209
  }
2210
- `,document.head.appendChild(e)}function TI(){return Yt({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await Le({url:II.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const AI="Everything looks good",LI="Something is not working",OI="Share feedback",FI="Manage Smart Previews",kI="Reach out to your admin to disable this feature",DI="Go to Apps",NI="Disable Feature",RI="Tell us what went wrong",MI="Please provide feedback",PI=[{label:"Data is not accurate",value:"Data is not accurate"},{label:"Data is from the wrong App",value:"Data is from the wrong App"},{label:"Other",value:"other"}],jI="Tell us more (optional)",BI="Enter your feedback",tl=40,VI="Feedback submitted",GI="Failed to submit feedback",nn={OBJECT_HIGHLIGHTED:"app_object_detection_highlighted",OBJECT_HOVERED:"app_object_detection_hovered",PERMALINK_CLICKED:"app_object_detection_permalink_clicked",POSITIVE_FEEDBACK_CLICKED:"app_object_detection_positive_feedback_detected",NEGATIVE_FEEDBACK_CLICKED:"app_object_detection_negative_feedback_clicked",NEGATIVE_FEEDBACK_SUBMITTED:"app_object_detection_negative_feedback_submitted",FEEDBACK_OPTION_CLICKED:"app_object_detection_general_feedback_clicked",FEEDBACK_OPTION_SUBMITTED:"app_object_detection_general_feedback_submitted",DATA_CARD_DURATION:"app_object_detection_data_card_duration",DATA_CARD_SCROLLED:"app_object_detection_data_card_scrolled"},Ep=e=>u.jsx(d.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?u.jsx(d.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),HI=d.styled(d.Box)`
2210
+ `,document.head.appendChild(e)}function LI(){return $t({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await Se({url:_I.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const OI="Everything looks good",FI="Something is not working",kI="Share feedback",DI="Manage Smart Previews",NI="Reach out to your admin to disable this feature",RI="Go to Apps",MI="Disable Feature",PI="Tell us what went wrong",jI="Please provide feedback",BI=[{label:"Data is not accurate",value:"Data is not accurate"},{label:"Data is from the wrong App",value:"Data is from the wrong App"},{label:"Other",value:"other"}],VI="Tell us more (optional)",GI="Enter your feedback",el=40,HI="Feedback submitted",WI="Failed to submit feedback",sn={OBJECT_HIGHLIGHTED:"app_object_detection_highlighted",OBJECT_HOVERED:"app_object_detection_hovered",PERMALINK_CLICKED:"app_object_detection_permalink_clicked",POSITIVE_FEEDBACK_CLICKED:"app_object_detection_positive_feedback_detected",NEGATIVE_FEEDBACK_CLICKED:"app_object_detection_negative_feedback_clicked",NEGATIVE_FEEDBACK_SUBMITTED:"app_object_detection_negative_feedback_submitted",FEEDBACK_OPTION_CLICKED:"app_object_detection_general_feedback_clicked",FEEDBACK_OPTION_SUBMITTED:"app_object_detection_general_feedback_submitted",DATA_CARD_DURATION:"app_object_detection_data_card_duration",DATA_CARD_SCROLLED:"app_object_detection_data_card_scrolled"},Ip=e=>u.jsx(d.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?u.jsx(d.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),ZI=d.styled(d.Box)`
2211
2211
  max-height: 340px;
2212
2212
  width: 440px;
2213
2213
  border-radius: 12px;
@@ -2221,15 +2221,15 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2221
2221
  flex-direction: row;
2222
2222
  margin-bottom: 12px;
2223
2223
  }
2224
- `,WI=d.styled(d.Box)`
2224
+ `,XI=d.styled(d.Box)`
2225
2225
  border-bottom: 1px solid ${d.theme.palette.gray.gray6};
2226
2226
  margin: 12px -16px;
2227
- `,ZI=d.styled(d.Box)`
2227
+ `,zI=d.styled(d.Box)`
2228
2228
  display: flex;
2229
2229
  justify-content: flex-end;
2230
2230
  margin-top: 30px;
2231
2231
  gap: 8px;
2232
- `,Ip=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=w.useState(""),[i,c]=w.useState(""),l=b=>{a(b.target.value)},f=b=>{b.stopPropagation();const{value:p}=(b==null?void 0:b.target)||{};c(p)},g=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},v=r?!s:!i;return u.jsxs(HI,{children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(WI,{}),r?u.jsx(d.FormControl,{children:u.jsx(d.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:l,children:PI.map(b=>u.jsx(d.FormControlLabel,{value:b.value,control:u.jsx(d.Radio,{}),label:b.label},b.value))})}):null,u.jsx(sr,{type:"text",placeholder:r?jI:BI,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:fc()}}),u.jsxs(ZI,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:y,children:"Cancel"}),u.jsx(Ep,{variant:"contained",color:"primary",isLoading:n,disabled:v,label:"Submit",onClick:g})]})]})},XI=d.styled(d.Box)`
2232
+ `,wp=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=w.useState(""),[i,c]=w.useState(""),l=b=>{a(b.target.value)},f=b=>{b.stopPropagation();const{value:p}=(b==null?void 0:b.target)||{};c(p)},g=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},v=r?!s:!i;return u.jsxs(ZI,{children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(XI,{}),r?u.jsx(d.FormControl,{children:u.jsx(d.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:l,children:BI.map(b=>u.jsx(d.FormControlLabel,{value:b.value,control:u.jsx(d.Radio,{}),label:b.label},b.value))})}):null,u.jsx(nr,{type:"text",placeholder:r?VI:GI,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:dc()}}),u.jsxs(zI,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:y,children:"Cancel"}),u.jsx(Ip,{variant:"contained",color:"primary",isLoading:n,disabled:v,label:"Submit",onClick:g})]})]})},YI=d.styled(d.Box)`
2233
2233
  border-radius: 12px;
2234
2234
  max-height: 298px;
2235
2235
  width: 288px;
@@ -2239,29 +2239,29 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2239
2239
  & > * {
2240
2240
  box-sizing: border-box;
2241
2241
  }
2242
- `,zI=d.styled(d.Box)`
2242
+ `,JI=d.styled(d.Box)`
2243
2243
  height: 24px;
2244
2244
  display: flex;
2245
2245
  align-items: center;
2246
2246
  justify-content: space-between;
2247
2247
  padding: 12px 0px;
2248
- `,YI=d.styled(d.Typography)`
2248
+ `,qI=d.styled(d.Typography)`
2249
2249
  white-space: nowrap;
2250
2250
  overflow: hidden;
2251
2251
  text-overflow: ellipsis;
2252
2252
  width: ${e=>e.width||"200px"};
2253
2253
  line-height: 18px;
2254
- `,JI=d.styled(d.Box)`
2254
+ `,$I=d.styled(d.Box)`
2255
2255
  height: 1px;
2256
2256
  background-color: ${d.theme.palette.gray.gray6};
2257
2257
  margin: 0 -16px;
2258
- `,qI=d.styled(d.Box)`
2258
+ `,QI=d.styled(d.Box)`
2259
2259
  padding: 0px 16px;
2260
2260
  border-radius: 12px;
2261
2261
  height: calc(100% - 82px);
2262
2262
  overflow-y: auto;
2263
2263
  scrollbar-width: thin;
2264
- `,$I=d.styled(d.Typography)`
2264
+ `,UI=d.styled(d.Typography)`
2265
2265
  font-size: 12px;
2266
2266
  font-weight: 400;
2267
2267
  color: ${d.theme.palette.gray.gray1};
@@ -2269,7 +2269,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2269
2269
  min-width: 80px;
2270
2270
  margin-right: 12px;
2271
2271
  text-align: left;
2272
- `,QI=d.styled(d.Typography)`
2272
+ `,KI=d.styled(d.Typography)`
2273
2273
  font-size: 12px;
2274
2274
  font-weight: 400;
2275
2275
  color: ${d.theme.palette.gray.black};
@@ -2278,11 +2278,11 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2278
2278
  margin-right: 0px;
2279
2279
  word-break: 'break-word';
2280
2280
  text-align: right;
2281
- `,UI=d.styled(d.Box)`
2281
+ `,ew=d.styled(d.Box)`
2282
2282
  display: flex;
2283
2283
  justify-content: space-between;
2284
2284
  margin-bottom: 20px;
2285
- `,KI=d.styled(d.Box)`
2285
+ `,tw=d.styled(d.Box)`
2286
2286
  display: flex;
2287
2287
  justify-content: space-between;
2288
2288
  align-items: center;
@@ -2290,95 +2290,95 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2290
2290
  width: 100%;
2291
2291
  min-height: 40px;
2292
2292
  background-color: ${d.theme.palette.gray.gray6a};
2293
- `,Vo=d.styled(d.Tooltip)`
2293
+ `,jo=d.styled(d.Tooltip)`
2294
2294
  padding: 6px;
2295
2295
  border-radius: 6px;
2296
- `,ew=d.styled(d.Button)`
2296
+ `,nw=d.styled(d.Button)`
2297
2297
  background-color: #f3f8ff;
2298
2298
  border-radius: 360px;
2299
2299
  color: #196fe0;
2300
2300
  padding: 5px 12px;
2301
2301
  min-width: 100px;
2302
- `,wp=e=>A.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M7.87354 2.73877C7.87354 2.30139 7.53821 1.94227 7.11084 1.90381L5.09229 6.44775C5.06387 6.51167 5.02799 6.57074 4.98975 6.62744V12.3667H10.4722C11.0395 12.3665 11.5225 11.9529 11.6089 11.3921L12.2368 7.30811C12.3437 6.61168 11.8047 5.98395 11.1001 5.98389H9.05615C8.40276 5.98371 7.87354 5.45372 7.87354 4.80029V2.73877ZM2.07275 11.8003C2.07275 12.1133 2.32718 12.3667 2.64014 12.3667H3.78955V7.1499H2.64014C2.32718 7.1499 2.07275 7.40432 2.07275 7.71729V11.8003ZM9.07275 4.78369H11.1001C12.5403 4.78375 13.6412 6.0673 13.4224 7.49072L12.7944 11.5747C12.6179 12.7208 11.6318 13.5667 10.4722 13.5669H2.64014C1.66443 13.5669 0.873535 12.776 0.873535 11.8003V7.71729C0.873535 6.74158 1.66443 5.95068 2.64014 5.95068H3.99951L6.04834 1.34131L6.12256 1.20166C6.31844 0.892431 6.66142 0.700708 7.03467 0.700684C8.16045 0.700684 9.07275 1.61299 9.07275 2.73877V4.78369Z",fill:"#97A3B7"})),_p=e=>A.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M11.8008 3.16651C11.8008 2.83026 11.7996 2.61407 11.7861 2.44972C11.7733 2.29228 11.7516 2.23558 11.7383 2.20948C11.684 2.10311 11.5976 2.0167 11.4912 1.96241C11.4651 1.94911 11.4084 1.92742 11.251 1.91456C11.0866 1.90113 10.8698 1.89991 10.5332 1.89991H10.084V7.11671H10.5332C10.8697 7.11671 11.0866 7.11647 11.251 7.10304C11.4084 7.09017 11.4651 7.06848 11.4912 7.05519C11.5977 7.00085 11.684 6.91369 11.7383 6.80714C11.7516 6.78095 11.7733 6.72473 11.7861 6.56788C11.7996 6.40344 11.8008 6.18671 11.8008 5.85011V3.16651ZM6.00001 11.5288C6.00014 11.9658 6.33491 12.3239 6.76173 12.3628L8.68946 8.02784C8.73905 7.91626 8.79776 7.77463 8.8838 7.6421V1.89991H4.30275C3.86739 1.89991 3.57385 1.9011 3.34571 1.91847C3.12524 1.93527 3.00982 1.96482 2.92677 2.00245C2.72742 2.09281 2.55809 2.23906 2.43849 2.42237C2.38875 2.49873 2.34108 2.60774 2.29103 2.82276C2.23917 3.04561 2.19414 3.33583 2.12794 3.76612L1.82325 5.74952C1.73618 6.31551 1.67724 6.70248 1.65724 7.00245C1.63765 7.29653 1.66125 7.4439 1.69923 7.54347C1.79436 7.79282 1.97309 8.00139 2.20509 8.13331C2.29773 8.18598 2.43978 8.23198 2.73341 8.25733C3.03294 8.28318 3.42441 8.2837 3.99708 8.2837H4.46681C4.62026 8.2837 4.77205 8.28306 4.89943 8.29347C5.00019 8.30172 5.11526 8.31839 5.23439 8.36085L5.3545 8.41261L5.51271 8.51026C5.61292 8.58313 5.70157 8.67078 5.77443 8.77101L5.8711 8.93019L5.92286 9.0503C5.96524 9.1694 5.98202 9.28456 5.99025 9.38526C6.00063 9.51256 6.00001 9.66359 6.00001 9.8169V11.5288ZM13 5.85011C13 6.1669 13.0008 6.44089 12.9824 6.66554C12.9635 6.89709 12.9214 7.12868 12.8076 7.35206C12.6383 7.68439 12.3684 7.95514 12.0361 8.12452C11.8127 8.23838 11.5803 8.2804 11.3486 8.29933C11.124 8.31767 10.8499 8.3169 10.5332 8.3169H10.0899C9.97739 8.31691 9.91771 8.31637 9.87501 8.31886C9.85536 8.35692 9.83103 8.41194 9.78517 8.51515L7.82521 12.9263C7.6519 13.3159 7.26532 13.5669 6.83888 13.5669C5.71318 13.5669 4.80093 12.6545 4.80079 11.5288V9.8169C4.80079 9.64881 4.799 9.55553 4.79396 9.48878C4.72728 9.48383 4.63383 9.4839 4.46681 9.4839H3.99708C3.44579 9.4839 2.99395 9.48395 2.63087 9.45265C2.26202 9.42082 1.92186 9.35223 1.61232 9.17628C1.13824 8.90671 0.772529 8.48073 0.578136 7.9712C0.451217 7.63844 0.43534 7.29185 0.459972 6.92237C0.484222 6.55869 0.552876 6.11195 0.63673 5.5669L0.942394 3.58351C1.00581 3.17132 1.05751 2.82883 1.12208 2.55128C1.18838 2.26634 1.27691 2.00629 1.4336 1.76612C1.67803 1.39152 2.02424 1.0943 2.43165 0.909678C2.69285 0.791323 2.96319 0.743407 3.25489 0.721201C3.53908 0.699573 3.8856 0.700693 4.30275 0.700693H10.5332C10.8499 0.700693 11.124 0.69993 11.3486 0.718272C11.5803 0.737198 11.8127 0.779216 12.0361 0.893076C12.3683 1.06241 12.6383 1.33244 12.8076 1.66456C12.9215 1.88802 12.9635 2.12041 12.9824 2.35206C13.0008 2.57656 13 2.85001 13 3.16651V5.85011Z",fill:"#97A3B7"})),tw=e=>A.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6.02637 0.261719C6.91006 0.100716 7.81654 0.108586 8.69727 0.285156C8.77943 0.301685 8.85737 0.335356 8.92578 0.383789C8.99413 0.432207 9.05187 0.494446 9.09473 0.566406L10.1699 2.37109L12.2686 2.40137C12.3521 2.40267 12.4348 2.42105 12.5107 2.45605C12.5866 2.49114 12.6547 2.5417 12.71 2.60449L12.9268 2.8623C13.4177 3.47393 13.8044 4.1638 14.0703 4.90332H14.0713C14.1006 4.98499 14.1111 5.07276 14.1035 5.15918C14.0958 5.24545 14.0694 5.32914 14.0264 5.4043L13.0107 7.17676L14.0654 8.97949C14.1089 9.05374 14.1349 9.13706 14.1436 9.22266C14.1522 9.30829 14.143 9.39509 14.1152 9.47656C13.8308 10.316 13.3846 11.0919 12.8008 11.7588C12.7442 11.8235 12.6731 11.8748 12.5947 11.9102C12.5163 11.9454 12.4307 11.9644 12.3447 11.9639L10.2559 11.9512L9.22656 13.7188C9.18293 13.7935 9.12263 13.8576 9.05176 13.9072C8.98094 13.9567 8.90045 13.9914 8.81543 14.0068C7.9318 14.1675 7.02506 14.1583 6.14453 13.9814L6.14355 13.9824C6.0797 13.9694 6.01838 13.9446 5.96191 13.9121C5.87332 13.8615 5.7985 13.7897 5.74609 13.7021L4.67188 11.8955L2.56934 11.8682C2.48571 11.8669 2.4031 11.8485 2.32715 11.8135C2.25108 11.7784 2.18323 11.727 2.12793 11.6641C1.60736 11.0751 1.18875 10.4045 0.888672 9.67969L0.767578 9.36621C0.738264 9.28452 0.726773 9.19681 0.734375 9.11035C0.742031 9.02393 0.768379 8.93953 0.811523 8.86426L1.82617 7.0918L0.772461 5.28906C0.729026 5.2148 0.702006 5.1315 0.693359 5.0459C0.684801 4.96052 0.695058 4.87421 0.722656 4.79297C1.00784 3.95289 1.45608 3.17678 2.04102 2.50977C2.09771 2.44503 2.16762 2.39274 2.24609 2.35742C2.32438 2.32222 2.40928 2.30426 2.49512 2.30469L4.58398 2.31543L5.61426 0.549805C5.65789 0.474997 5.71718 0.410066 5.78809 0.360352C5.8591 0.31064 5.94107 0.277156 6.02637 0.261719ZM7.53809 14.0195C7.59898 14.0196 7.65982 14.0181 7.7207 14.0166C7.65982 14.0181 7.59898 14.0196 7.53809 14.0195ZM7.2334 14.0117C7.28581 14.014 7.33818 14.0164 7.39062 14.0176C7.33818 14.0164 7.28581 14.014 7.2334 14.0117ZM7.85742 14.0127C7.89653 14.0109 7.93552 14.0073 7.97461 14.0049C7.93552 14.0073 7.89654 14.0109 7.85742 14.0127ZM6.91113 13.9902C6.97295 13.9958 7.03476 14.0009 7.09668 14.0049C7.03476 14.0009 6.97295 13.9958 6.91113 13.9902ZM6.6543 13.9619C6.6898 13.9665 6.72519 13.9716 6.76074 13.9756C6.72519 13.9716 6.6898 13.9665 6.6543 13.9619ZM5.91016 13.75C5.94027 13.7795 5.97474 13.8051 6.01172 13.8262L5.95898 13.791C5.94197 13.7782 5.92535 13.7649 5.91016 13.75ZM6.58008 12.9414H6.58105H6.58008ZM8.2002 1.41895C7.63858 1.33129 7.06722 1.32543 6.50391 1.40137L5.5127 3.10059C5.45667 3.19686 5.37383 3.27503 5.27539 3.32715C5.21254 3.36088 5.14878 3.39942 5.08594 3.43555L5.08496 3.43457C4.99197 3.48895 4.88605 3.51825 4.77832 3.51758L2.77637 3.50586C2.43354 3.9367 2.15694 4.41647 1.95508 4.92871L2.96875 6.66211H2.96973C3.01013 6.73278 3.03531 6.81132 3.04492 6.8916L3.04883 6.97461C3.04667 7.04613 3.0485 7.11658 3.05078 7.18945C3.0548 7.30124 3.02821 7.41268 2.97266 7.50977L1.99609 9.21289C2.21404 9.7388 2.50744 10.2299 2.86621 10.6719L4.88281 10.7012H4.88379C4.99002 10.7034 5.09368 10.7341 5.18457 10.7891L5.39258 10.9082C5.45916 10.9464 5.51715 10.9978 5.56445 11.0576L5.6084 11.1201L6.6416 12.8486C7.20362 12.9365 7.77513 12.9432 8.33887 12.8672L9.3291 11.1689C9.38528 11.0722 9.46843 10.9926 9.56738 10.9404C9.63017 10.9067 9.69505 10.8701 9.75781 10.834L9.8291 10.7988C9.90336 10.7678 9.98341 10.7514 10.0645 10.752L12.0664 10.7646C12.4092 10.3324 12.6847 9.85062 12.8857 9.33691L11.8711 7.60645L11.8721 7.60547C11.8181 7.51108 11.7903 7.40365 11.792 7.29492L11.791 7.29395C11.7932 7.22206 11.7923 7.15042 11.79 7.07715C11.7862 6.96565 11.8128 6.85466 11.8682 6.75781L12.8438 5.05371C12.6258 4.52811 12.3333 4.03648 11.9746 3.59473L9.95801 3.56641H9.95703C9.85067 3.56414 9.74722 3.53265 9.65625 3.47754V3.47852L9.45898 3.36426L9.39258 3.32129C9.32844 3.27486 9.27351 3.21669 9.23242 3.14844V3.14746L8.2002 1.41895ZM2.4668 11.7559L2.57031 11.7686H2.57129C2.50157 11.7675 2.43246 11.7518 2.36914 11.7227L2.4668 11.7559ZM1.78809 11.082V11.0811V11.082ZM13.0244 11.3203C13.0502 11.2862 13.0774 11.2533 13.1025 11.2188C13.0774 11.2533 13.0502 11.2862 13.0244 11.3203ZM13.2051 11.0713C13.2348 11.0279 13.2643 10.9845 13.293 10.9404C13.2643 10.9845 13.2348 11.0279 13.2051 11.0713ZM9.90918 10.876C9.90231 10.8782 9.89544 10.8803 9.88867 10.8828C9.89545 10.8803 9.90231 10.8782 9.90918 10.876ZM13.3535 10.8447C13.3903 10.7861 13.426 10.7268 13.4609 10.667C13.426 10.7268 13.3903 10.7861 13.3535 10.8447ZM13.5049 10.5928C13.5426 10.5264 13.5789 10.4593 13.6143 10.3916C13.5789 10.4593 13.5426 10.5264 13.5049 10.5928ZM13.6582 10.3066C13.695 10.2337 13.7305 10.1602 13.7646 10.0859C13.7305 10.1602 13.695 10.2337 13.6582 10.3066ZM7.2168 4.04004C7.82858 3.99994 8.43974 4.14269 8.9707 4.44922C9.68176 4.86085 10.2003 5.53844 10.4131 6.33203C10.6256 7.12573 10.5145 7.97155 10.1045 8.68359C9.79803 9.21429 9.34157 9.64291 8.79199 9.91406C8.24214 10.1852 7.62346 10.287 7.01562 10.207C6.40793 10.127 5.83684 9.86895 5.37598 9.46484C4.91529 9.06072 4.58448 8.52844 4.42578 7.93652C4.26721 7.34451 4.28843 6.71808 4.48535 6.1377C4.68236 5.55755 5.04627 5.04792 5.53223 4.6748C6.01845 4.30171 6.60526 4.08027 7.2168 4.04004ZM13.7852 10.041C13.8281 9.94559 13.8697 9.84945 13.9082 9.75195V9.75098C13.8696 9.84876 13.8283 9.94531 13.7852 10.041ZM6.40918 9.95703C6.46044 9.97542 6.51219 9.99222 6.56445 10.0078C6.51219 9.99225 6.46044 9.97539 6.40918 9.95703ZM6.20996 9.87695C6.25096 9.89508 6.2922 9.91244 6.33398 9.92871C6.2922 9.91247 6.25097 9.89505 6.20996 9.87695ZM6.02832 9.79004C6.0678 9.81077 6.10809 9.82969 6.14844 9.84863C6.10808 9.82972 6.06781 9.81074 6.02832 9.79004ZM5.84082 9.68262C5.87596 9.70443 5.9113 9.72578 5.94727 9.74609C5.91128 9.7258 5.87597 9.7044 5.84082 9.68262ZM12.9131 9.53613C12.9421 9.46825 12.9707 9.40012 12.9971 9.33105L12.9961 9.33008C12.9697 9.3993 12.9422 9.46808 12.9131 9.53613ZM5.66602 9.56543C5.7015 9.59105 5.73694 9.61662 5.77344 9.64062C5.73693 9.61664 5.70151 9.59104 5.66602 9.56543ZM1.97461 9.41699C1.99284 9.4575 2.01311 9.49704 2.03223 9.53711C1.98023 9.42813 1.93016 9.31814 1.88477 9.20605L1.97461 9.41699ZM5.59277 9.5127C5.59556 9.51484 5.59877 9.51642 5.60156 9.51855C5.54737 9.47722 5.49386 9.43478 5.44238 9.38965L5.59277 9.5127ZM8.03125 5.33496C7.67547 5.21424 7.29063 5.20159 6.92773 5.29883C6.56509 5.39617 6.23977 5.59952 5.99219 5.88184C5.74452 6.16433 5.58615 6.51424 5.53711 6.88672C5.48824 7.25901 5.54977 7.63783 5.71582 7.97461C5.88202 8.31152 6.14537 8.59145 6.4707 8.7793C6.90703 9.0311 7.42549 9.09913 7.91211 8.96875C8.39876 8.83831 8.81448 8.52031 9.06641 8.08398C9.25414 7.7587 9.3409 7.38453 9.31641 7.00977C9.2918 6.635 9.15631 6.27555 8.92773 5.97754C8.69908 5.67961 8.38685 5.45577 8.03125 5.33496ZM6.17676 8.69922C6.25355 8.76023 6.3343 8.81676 6.41992 8.86621L6.4209 8.86523C6.33525 8.81578 6.2536 8.76024 6.17676 8.69922ZM8.47754 8.83203V8.83105V8.83203ZM5.77637 8.27246C5.83227 8.35318 5.89399 8.4295 5.96094 8.50098L5.86426 8.38965C5.83359 8.35168 5.80422 8.31265 5.77637 8.27246ZM4.52246 7.91113C4.5608 8.0541 4.60948 8.19346 4.66797 8.32812C4.60945 8.19325 4.56083 8.05334 4.52246 7.91016V7.91113ZM9.40039 6.85645C9.40722 6.90519 9.41278 6.95457 9.41602 7.00391C9.41922 7.05311 9.42035 7.1023 9.41992 7.15137C9.42035 7.10204 9.41926 7.05239 9.41602 7.00293C9.41279 6.95379 9.40719 6.90498 9.40039 6.85645ZM11.9004 6.95215C11.8982 6.96247 11.897 6.97295 11.8955 6.9834C11.8971 6.97295 11.8982 6.96247 11.9004 6.95215ZM4.65137 5.97754C4.62849 6.03229 4.60852 6.08831 4.58887 6.14453C4.60851 6.0883 4.6285 6.03229 4.65137 5.97754ZM4.73633 5.79492C4.7241 5.81941 4.71274 5.8443 4.70117 5.86914C4.71273 5.8443 4.72411 5.81941 4.73633 5.79492ZM4.84473 5.59863C4.82627 5.62957 4.80836 5.66078 4.79102 5.69238C4.80835 5.66077 4.82628 5.62957 4.84473 5.59863ZM4.95605 5.42383C4.93113 5.45972 4.90714 5.49624 4.88379 5.5332C4.90712 5.49623 4.93114 5.45973 4.95605 5.42383ZM8.31445 4.27051C8.52443 4.33607 8.72746 4.42504 8.91992 4.53613L8.9209 4.53516C8.72801 4.42379 8.52395 4.33516 8.31348 4.26953L8.31445 4.27051ZM5.09082 5.24609C5.06172 5.28198 5.03326 5.3183 5.00586 5.35547C5.03325 5.31828 5.06173 5.28199 5.09082 5.24609ZM6.63965 5.29199C6.64276 5.29067 6.6463 5.29037 6.64941 5.28906C6.6463 5.29037 6.64276 5.29067 6.63965 5.29199ZM7.9209 5.19824H7.92188H7.9209ZM6.90234 5.20215H6.90332H6.90234ZM5.23145 5.08496C5.19896 5.11965 5.16651 5.15429 5.13574 5.19043C5.1665 5.15428 5.19897 5.11966 5.23145 5.08496ZM13.9766 4.93652V4.9375V4.93652ZM0.922852 4.53613C0.885573 4.63126 0.850299 4.72727 0.817383 4.82422V4.8252C0.850362 4.72803 0.885496 4.63148 0.922852 4.53613ZM2.01855 4.5293H2.01953H2.01855ZM1.04688 4.24316C1.02195 4.29878 0.998013 4.35481 0.974609 4.41113C0.998008 4.35481 1.02196 4.29878 1.04688 4.24316ZM7.22363 4.13965L7.22461 4.14062L7.22363 4.13965ZM7.66699 4.14453L7.66602 4.14355L7.66699 4.14453ZM1.17188 3.97852C1.1445 4.03303 1.11865 4.08828 1.09277 4.14355C1.11864 4.08828 1.14451 4.03304 1.17188 3.97852ZM12.4287 4.0498V4.04883V4.0498ZM12.6348 2.66992V2.6709C12.8546 2.91962 13.0566 3.1828 13.2383 3.45898C13.1171 3.27471 12.987 3.09618 12.8486 2.92383C12.7796 2.83782 12.708 2.75273 12.6348 2.66992ZM1.30859 3.72168C1.28765 3.75921 1.26729 3.79703 1.24707 3.83496C1.26728 3.79703 1.28765 3.75921 1.30859 3.72168ZM2.72656 3.40723V3.4082L4.7793 3.41797V3.41699L2.72656 3.40723ZM12.0234 3.49707C12.0719 3.55591 12.1198 3.61522 12.166 3.67578L12.0234 3.49609L9.95898 3.4668L12.0234 3.49707ZM1.47852 3.43457C1.45114 3.47831 1.42381 3.52205 1.39746 3.56641C1.4238 3.52204 1.45115 3.47831 1.47852 3.43457ZM9.78809 3.43164C9.79329 3.43365 9.79845 3.43566 9.80371 3.4375C9.79845 3.43567 9.79329 3.43365 9.78809 3.43164ZM5.22852 3.23926V3.24023V3.23926ZM1.64746 3.17676C1.61837 3.21879 1.58963 3.26104 1.56152 3.30371C1.58963 3.26104 1.61837 3.21879 1.64746 3.17676ZM2.11523 2.5752H2.11621H2.11523ZM8.94629 0.53418C8.96978 0.559626 8.99096 0.587273 9.00879 0.617188C8.97313 0.557368 8.92497 0.505135 8.86816 0.464844L8.94629 0.53418ZM6.37305 0.307617C6.26302 0.322319 6.15337 0.34041 6.04395 0.360352C6.15337 0.340409 6.26301 0.322304 6.37305 0.307617ZM8.35059 0.325195C8.25055 0.310024 8.15027 0.296933 8.0498 0.286133C8.15027 0.296945 8.25055 0.310026 8.35059 0.325195ZM7.92578 0.275391C7.85971 0.269476 7.79372 0.26282 7.72754 0.258789C7.79372 0.262834 7.85971 0.269466 7.92578 0.275391ZM6.9502 0.255859C6.89287 0.258741 6.83558 0.262311 6.77832 0.266602C6.83559 0.262325 6.89287 0.258726 6.9502 0.255859ZM7.58008 0.25293C7.53418 0.251105 7.4883 0.248968 7.44238 0.248047C7.4883 0.24898 7.53418 0.251094 7.58008 0.25293ZM7.12988 0.249023C7.17448 0.24794 7.21907 0.247302 7.26367 0.24707C7.21907 0.247314 7.17448 0.247928 7.12988 0.249023ZM6.67871 0.274414C6.57668 0.283521 6.47471 0.294033 6.37305 0.307617C6.47471 0.294047 6.57668 0.283499 6.67871 0.274414Z",fill:"#97A3B7"})),nw=e=>A.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_189_1728)"},A.createElement("path",{d:"M2.33317 2.4672H11.6665V9.4672H3.01567L2.33317 10.1497V2.4672ZM2.33317 1.30054C1.6915 1.30054 1.17234 1.82554 1.17234 2.4672L1.1665 12.9672L3.49984 10.6339H11.6665C12.3082 10.6339 12.8332 10.1089 12.8332 9.4672V2.4672C12.8332 1.82554 12.3082 1.30054 11.6665 1.30054H2.33317ZM3.49984 7.13387H8.1665V8.30054H3.49984V7.13387ZM3.49984 5.38387H10.4998V6.55054H3.49984V5.38387ZM3.49984 3.63387H10.4998V4.80054H3.49984V3.63387Z",fill:"#97A3B7"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_189_1728"},A.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),rw=e=>A.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_3803_129233)"},A.createElement("path",{d:"M7.3335 4.66683H8.66683V6.00016H7.3335V4.66683ZM7.3335 7.3335H8.66683V11.3335H7.3335V7.3335ZM8.00016 1.3335C4.32016 1.3335 1.3335 4.32016 1.3335 8.00016C1.3335 11.6802 4.32016 14.6668 8.00016 14.6668C11.6802 14.6668 14.6668 11.6802 14.6668 8.00016C14.6668 4.32016 11.6802 1.3335 8.00016 1.3335ZM8.00016 13.3335C5.06016 13.3335 2.66683 10.9402 2.66683 8.00016C2.66683 5.06016 5.06016 2.66683 8.00016 2.66683C10.9402 2.66683 13.3335 5.06016 13.3335 8.00016C13.3335 10.9402 10.9402 13.3335 8.00016 13.3335Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_3803_129233"},A.createElement("rect",{width:16,height:16,fill:"white"})))),ow=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,f]=w.useState(!1),g=w.useRef(!1),[y,v]=w.useState(!1),[b,p]=w.useState([]),{mutate:h,isPending:m}=TI(),{logoUrl:x,cardTitle:C,id:I,externalResourceId:E,connectorId:_,textToHighlight:T}=e.cardData||{},S=w.useMemo(()=>({key:T,card_id:I,card_title:C,connector_id:_,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[T,I,C,_,E,r,n]);if(w.useEffect(()=>{const X=Date.now();return()=>{c(nn.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),w.useEffect(()=>{var q,oe,ie;const X=(ie=(oe=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:oe.flatDetails)==null?void 0:ie.data;if(X){const B=X.sort((R,G)=>R.priority-G.priority);p(B),c(nn.OBJECT_HOVERED,S)}},[e,c,S]),!b||b.length===0)return null;const L=()=>{f(!0),c(nn.FEEDBACK_OPTION_CLICKED,S)},N=()=>{v(!0),c(nn.NEGATIVE_FEEDBACK_CLICKED,S)},k=X=>{const q={card_id:I,entity_id:E,comment:X.feedbackComment,option:X.feedbackOption,feedback_type:"entity_extraction"};typeof X.isThumbsUp<"u"&&(q.positive_feedback=X.isThumbsUp),h({conversationId:r,feedbackData:q},{onSuccess:()=>{l?c(nn.FEEDBACK_OPTION_SUBMITTED,S):y&&c(nn.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),v(!1),we({message:VI,type:$t})},onError:()=>{we({message:GI,type:ze})}})},D=()=>{k({isThumbsUp:!0}),c(nn.POSITIVE_FEEDBACK_CLICKED,S)},P=X=>{k({...X,isThumbsUp:!1})},V=()=>{s==null||s(_),i()},z=()=>{a==null||a()},$=X=>{c(nn.PERMALINK_CLICKED,{...S,clicked_value:X})},Q=()=>{g.current||(c(nn.DATA_CARD_SCROLLED,S),g.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(XI,{children:[u.jsxs(qI,{onScroll:Q,children:[u.jsxs(zI,{children:[u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[x&&u.jsx("img",{src:x,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(d.Tooltip,{title:C,arrow:!0,placement:"top",children:u.jsx(YI,{variant:"h3",color:d.theme.palette.gray.black,width:o?"100px":"200px",children:C})})]}),o?u.jsx(ew,{variant:"text",size:"small",endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:z,children:DI}):null]}),u.jsx(JI,{}),u.jsx(d.Box,{paddingY:"16px",children:b.map(({key:X,value:q,label:oe,deepLink:ie})=>u.jsxs(UI,{children:[u.jsxs($I,{children:[oe,":"]}),u.jsx(d.Tooltip,{title:(q==null?void 0:q.length)>tl?q:"",arrow:!0,placement:"top",children:ie?u.jsx(d.Link,{href:ie,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:d.theme.palette.primary.main},onClick:()=>$(q),children:Od(q||"N/A",tl)}):u.jsx(QI,{children:Od(q||"N/A",tl)})})]},X))})]}),u.jsxs(KI,{children:[u.jsx(d.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx(Vo,{arrow:!0,title:FI,placement:"top",children:u.jsx(d.IconButton,{onClick:V,children:u.jsx(tw,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:12,children:NI}),u.jsx(Vo,{arrow:!0,title:kI,placement:"top",children:u.jsx(d.IconButton,{size:"small",children:u.jsx(rw,{})})})]})}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx(Vo,{arrow:!0,title:AI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:m,onClick:D,children:u.jsx(wp,{})})}),u.jsx(Vo,{arrow:!0,title:LI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:m,onClick:N,children:u.jsx(_p,{})})}),u.jsx(Vo,{arrow:!0,title:OI,placement:"top",children:u.jsx(d.IconButton,{onClick:L,size:"small",disabled:m,children:u.jsx(nw,{})})})]})]})]}),u.jsx(cr,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:u.jsx(Ip,{onCancel:()=>f(!1),onSubmit:k,isLoading:m,showOptions:!1,title:MI})}),u.jsx(cr,{shown:y,setShown:v,borderRadius:12,sx:{zIndex:15002},children:u.jsx(Ip,{onCancel:()=>v(!1),onSubmit:P,isLoading:m,title:RI})})]})},Sp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,Tp=(e,t=350,n=400)=>{const r=e.getBoundingClientRect(),o=window.innerHeight,s=window.innerWidth,a=r.top,i=o-r.bottom;return i>=t||i>a?r.left<n/2?"bottom-start":s-r.right<n/2?"bottom-end":"bottom":r.left<n/2?"top-start":s-r.right<n/2?"top-end":"top"},sw=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${d.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",maxHeight:"300px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${d.theme.palette.gray.gray6}`,position:"relative"}}));function aw({elements:e,title:t,onKeyChange:n}){const[r,o]=w.useState(!1),[s,a]=w.useState(null),[i,c]=w.useState(""),[l,f]=w.useState("bottom"),[g,y]=w.useState(!1),v=w.useRef(null),b=w.useRef({x:0,y:0}),p=w.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]);w.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,N=L.textContent||"",k=Tp(L);f(k),c(N),n&&n(N),a(L),o(!0)},_=()=>{if(r&&s){const S=Tp(s);f(S)}},T=S=>{if(b.current={x:S.clientX,y:S.clientY},!r||g)return;const L=S.clientX,N=S.clientY;let k=!1;for(const D of e)if(Sp(L,N,D.getBoundingClientRect())){k=!0;break}if(!k){const D=document.querySelector(`.${d.tooltipClasses.tooltip}`);D&&Sp(L,N,D.getBoundingClientRect())&&(k=!0)}k||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",T),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",T),p()}}},[e,n,r,s,g,p]);const h=()=>{y(!0),p()},m=()=>{y(!1),v.current=setTimeout(()=>{o(!1),a(null)},150)},C=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:h,onMouseLeave:m,children:C});return u.jsx(sw,{title:I,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const iw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=w.useState(null),[l,f]=w.useState([]),{data:g,isError:y}=_I(e,t,n);return w.useEffect(()=>{g?c(g):y&&c(null)},[g,y]),w.useEffect(()=>{let v=null;if(i&&Object.keys(i).length&&e){v=new SI(Object.keys(i)||[],f);const b=Object.keys(i).map(p=>{var m;const h=((m=i[p])==null?void 0:m.cardData)||{};return{key:p,card_title:h.cardTitle,connector_id:h.connectorId}});a(nn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:b})}return()=>{v&&v.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(aw,{elements:l,title:(v,b)=>{var p;return!i||!v||!((p=i[v])!=null&&p.cardData)?u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(ow,{smIds:n,conversationId:e||"",analysisData:i[v],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:b,sendTrackingEvent:a})}})})},cw=({children:e})=>u.jsx($i,{store:Uc,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(Qc,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),lw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx(Kc,{children:u.jsxs(cw,{children:[u.jsx(iw,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Re.createPortal(u.jsx(el,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),Ap={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},uw=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class dw{constructor({processDelay:t=1e3}){De(this,"_processDelay");De(this,"initialized",!1);De(this,"_queue",[]);De(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});De(this,"ACTIONS",Ap);this._processDelay=t}register(t){this._queueProps=t,!this.initialized&&(this.initialized=!0,this._delay(this._processDelay).then(()=>this._process()))}add(t){this._queue.push(t),this._process()}_delay(t){return new Promise(n=>setTimeout(n,t))}_process(){if(this.initialized)for(;this._queue.length>0;){const t=this._queue.shift();if(t)switch(t.type){case Ap.OPEN_CREATE_FORM:uw(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var ve=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(ve||{}),_a=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(_a||{});const fw=e=>{const t=[],n={};for(const r of e){const o=n[r.entityType];if(o===void 0){const s={type:r.entityType,entities:[r]};n[r.entityType]=t.length,t.push(s)}else t[o].entities.push(r)}return t},pw=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===_a.UNAUTHENTICATED?ve.UNAUTHENTICATED:n.pending>0?ve.PENDING:n.failed?ve.ERROR:r.length===0?ve.NOT_LOGGED:o?ve.LOGGED:ve.PAUSED},hw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},A.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),nl=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},A.createElement("path",{d:"M6.3335 8.99967H7.66683V10.333H6.3335V8.99967ZM6.3335 3.66634H7.66683V7.66634H6.3335V3.66634ZM6.9935 0.333008C3.3135 0.333008 0.333496 3.31967 0.333496 6.99967C0.333496 10.6797 3.3135 13.6663 6.9935 13.6663C10.6802 13.6663 13.6668 10.6797 13.6668 6.99967C13.6668 3.31967 10.6802 0.333008 6.9935 0.333008ZM7.00016 12.333C4.0535 12.333 1.66683 9.94634 1.66683 6.99967C1.66683 4.05301 4.0535 1.66634 7.00016 1.66634C9.94683 1.66634 12.3335 4.05301 12.3335 6.99967C12.3335 9.94634 9.94683 12.333 7.00016 12.333Z"})),gw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},A.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z",fill:"white"})),mw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},A.createElement("g",{clipPath:"url(#clip0_532_206243)"},A.createElement("path",{d:"M9.94092 3V0.75L6.94092 3.75L9.94092 6.75V4.5C12.4234 4.5 14.4409 6.5175 14.4409 9C14.4409 9.7575 14.2534 10.4775 13.9159 11.1L15.0109 12.195C15.5959 11.2725 15.9409 10.1775 15.9409 9C15.9409 5.685 13.2559 3 9.94092 3ZM9.94092 13.5C7.45842 13.5 5.44092 11.4825 5.44092 9C5.44092 8.2425 5.62842 7.5225 5.96592 6.9L4.87092 5.805C4.28592 6.7275 3.94092 7.8225 3.94092 9C3.94092 12.315 6.62592 15 9.94092 15V17.25L12.9409 14.25L9.94092 11.25V13.5Z"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_532_206243"},A.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),bw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},A.createElement("g",{clipPath:"url(#clip0_1_11813)"},A.createElement("path",{d:"M9.05859 0C4.09059 0 0.0585938 4.032 0.0585938 9C0.0585938 13.968 4.09059 18 9.05859 18C14.0266 18 18.0586 13.968 18.0586 9C18.0586 4.032 14.0266 0 9.05859 0ZM8.15859 12.6H6.35859V5.4H8.15859V12.6ZM11.7586 12.6H9.95859V5.4H11.7586V12.6Z",fill:"#F2A579"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1_11813"},A.createElement("rect",{width:18,height:18,fill:"white"})))),Sa=d.keyframes`
2302
+ `,_p=e=>A.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M7.87354 2.73877C7.87354 2.30139 7.53821 1.94227 7.11084 1.90381L5.09229 6.44775C5.06387 6.51167 5.02799 6.57074 4.98975 6.62744V12.3667H10.4722C11.0395 12.3665 11.5225 11.9529 11.6089 11.3921L12.2368 7.30811C12.3437 6.61168 11.8047 5.98395 11.1001 5.98389H9.05615C8.40276 5.98371 7.87354 5.45372 7.87354 4.80029V2.73877ZM2.07275 11.8003C2.07275 12.1133 2.32718 12.3667 2.64014 12.3667H3.78955V7.1499H2.64014C2.32718 7.1499 2.07275 7.40432 2.07275 7.71729V11.8003ZM9.07275 4.78369H11.1001C12.5403 4.78375 13.6412 6.0673 13.4224 7.49072L12.7944 11.5747C12.6179 12.7208 11.6318 13.5667 10.4722 13.5669H2.64014C1.66443 13.5669 0.873535 12.776 0.873535 11.8003V7.71729C0.873535 6.74158 1.66443 5.95068 2.64014 5.95068H3.99951L6.04834 1.34131L6.12256 1.20166C6.31844 0.892431 6.66142 0.700708 7.03467 0.700684C8.16045 0.700684 9.07275 1.61299 9.07275 2.73877V4.78369Z",fill:"#97A3B7"})),Sp=e=>A.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M11.8008 3.16651C11.8008 2.83026 11.7996 2.61407 11.7861 2.44972C11.7733 2.29228 11.7516 2.23558 11.7383 2.20948C11.684 2.10311 11.5976 2.0167 11.4912 1.96241C11.4651 1.94911 11.4084 1.92742 11.251 1.91456C11.0866 1.90113 10.8698 1.89991 10.5332 1.89991H10.084V7.11671H10.5332C10.8697 7.11671 11.0866 7.11647 11.251 7.10304C11.4084 7.09017 11.4651 7.06848 11.4912 7.05519C11.5977 7.00085 11.684 6.91369 11.7383 6.80714C11.7516 6.78095 11.7733 6.72473 11.7861 6.56788C11.7996 6.40344 11.8008 6.18671 11.8008 5.85011V3.16651ZM6.00001 11.5288C6.00014 11.9658 6.33491 12.3239 6.76173 12.3628L8.68946 8.02784C8.73905 7.91626 8.79776 7.77463 8.8838 7.6421V1.89991H4.30275C3.86739 1.89991 3.57385 1.9011 3.34571 1.91847C3.12524 1.93527 3.00982 1.96482 2.92677 2.00245C2.72742 2.09281 2.55809 2.23906 2.43849 2.42237C2.38875 2.49873 2.34108 2.60774 2.29103 2.82276C2.23917 3.04561 2.19414 3.33583 2.12794 3.76612L1.82325 5.74952C1.73618 6.31551 1.67724 6.70248 1.65724 7.00245C1.63765 7.29653 1.66125 7.4439 1.69923 7.54347C1.79436 7.79282 1.97309 8.00139 2.20509 8.13331C2.29773 8.18598 2.43978 8.23198 2.73341 8.25733C3.03294 8.28318 3.42441 8.2837 3.99708 8.2837H4.46681C4.62026 8.2837 4.77205 8.28306 4.89943 8.29347C5.00019 8.30172 5.11526 8.31839 5.23439 8.36085L5.3545 8.41261L5.51271 8.51026C5.61292 8.58313 5.70157 8.67078 5.77443 8.77101L5.8711 8.93019L5.92286 9.0503C5.96524 9.1694 5.98202 9.28456 5.99025 9.38526C6.00063 9.51256 6.00001 9.66359 6.00001 9.8169V11.5288ZM13 5.85011C13 6.1669 13.0008 6.44089 12.9824 6.66554C12.9635 6.89709 12.9214 7.12868 12.8076 7.35206C12.6383 7.68439 12.3684 7.95514 12.0361 8.12452C11.8127 8.23838 11.5803 8.2804 11.3486 8.29933C11.124 8.31767 10.8499 8.3169 10.5332 8.3169H10.0899C9.97739 8.31691 9.91771 8.31637 9.87501 8.31886C9.85536 8.35692 9.83103 8.41194 9.78517 8.51515L7.82521 12.9263C7.6519 13.3159 7.26532 13.5669 6.83888 13.5669C5.71318 13.5669 4.80093 12.6545 4.80079 11.5288V9.8169C4.80079 9.64881 4.799 9.55553 4.79396 9.48878C4.72728 9.48383 4.63383 9.4839 4.46681 9.4839H3.99708C3.44579 9.4839 2.99395 9.48395 2.63087 9.45265C2.26202 9.42082 1.92186 9.35223 1.61232 9.17628C1.13824 8.90671 0.772529 8.48073 0.578136 7.9712C0.451217 7.63844 0.43534 7.29185 0.459972 6.92237C0.484222 6.55869 0.552876 6.11195 0.63673 5.5669L0.942394 3.58351C1.00581 3.17132 1.05751 2.82883 1.12208 2.55128C1.18838 2.26634 1.27691 2.00629 1.4336 1.76612C1.67803 1.39152 2.02424 1.0943 2.43165 0.909678C2.69285 0.791323 2.96319 0.743407 3.25489 0.721201C3.53908 0.699573 3.8856 0.700693 4.30275 0.700693H10.5332C10.8499 0.700693 11.124 0.69993 11.3486 0.718272C11.5803 0.737198 11.8127 0.779216 12.0361 0.893076C12.3683 1.06241 12.6383 1.33244 12.8076 1.66456C12.9215 1.88802 12.9635 2.12041 12.9824 2.35206C13.0008 2.57656 13 2.85001 13 3.16651V5.85011Z",fill:"#97A3B7"})),rw=e=>A.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6.02637 0.261719C6.91006 0.100716 7.81654 0.108586 8.69727 0.285156C8.77943 0.301685 8.85737 0.335356 8.92578 0.383789C8.99413 0.432207 9.05187 0.494446 9.09473 0.566406L10.1699 2.37109L12.2686 2.40137C12.3521 2.40267 12.4348 2.42105 12.5107 2.45605C12.5866 2.49114 12.6547 2.5417 12.71 2.60449L12.9268 2.8623C13.4177 3.47393 13.8044 4.1638 14.0703 4.90332H14.0713C14.1006 4.98499 14.1111 5.07276 14.1035 5.15918C14.0958 5.24545 14.0694 5.32914 14.0264 5.4043L13.0107 7.17676L14.0654 8.97949C14.1089 9.05374 14.1349 9.13706 14.1436 9.22266C14.1522 9.30829 14.143 9.39509 14.1152 9.47656C13.8308 10.316 13.3846 11.0919 12.8008 11.7588C12.7442 11.8235 12.6731 11.8748 12.5947 11.9102C12.5163 11.9454 12.4307 11.9644 12.3447 11.9639L10.2559 11.9512L9.22656 13.7188C9.18293 13.7935 9.12263 13.8576 9.05176 13.9072C8.98094 13.9567 8.90045 13.9914 8.81543 14.0068C7.9318 14.1675 7.02506 14.1583 6.14453 13.9814L6.14355 13.9824C6.0797 13.9694 6.01838 13.9446 5.96191 13.9121C5.87332 13.8615 5.7985 13.7897 5.74609 13.7021L4.67188 11.8955L2.56934 11.8682C2.48571 11.8669 2.4031 11.8485 2.32715 11.8135C2.25108 11.7784 2.18323 11.727 2.12793 11.6641C1.60736 11.0751 1.18875 10.4045 0.888672 9.67969L0.767578 9.36621C0.738264 9.28452 0.726773 9.19681 0.734375 9.11035C0.742031 9.02393 0.768379 8.93953 0.811523 8.86426L1.82617 7.0918L0.772461 5.28906C0.729026 5.2148 0.702006 5.1315 0.693359 5.0459C0.684801 4.96052 0.695058 4.87421 0.722656 4.79297C1.00784 3.95289 1.45608 3.17678 2.04102 2.50977C2.09771 2.44503 2.16762 2.39274 2.24609 2.35742C2.32438 2.32222 2.40928 2.30426 2.49512 2.30469L4.58398 2.31543L5.61426 0.549805C5.65789 0.474997 5.71718 0.410066 5.78809 0.360352C5.8591 0.31064 5.94107 0.277156 6.02637 0.261719ZM7.53809 14.0195C7.59898 14.0196 7.65982 14.0181 7.7207 14.0166C7.65982 14.0181 7.59898 14.0196 7.53809 14.0195ZM7.2334 14.0117C7.28581 14.014 7.33818 14.0164 7.39062 14.0176C7.33818 14.0164 7.28581 14.014 7.2334 14.0117ZM7.85742 14.0127C7.89653 14.0109 7.93552 14.0073 7.97461 14.0049C7.93552 14.0073 7.89654 14.0109 7.85742 14.0127ZM6.91113 13.9902C6.97295 13.9958 7.03476 14.0009 7.09668 14.0049C7.03476 14.0009 6.97295 13.9958 6.91113 13.9902ZM6.6543 13.9619C6.6898 13.9665 6.72519 13.9716 6.76074 13.9756C6.72519 13.9716 6.6898 13.9665 6.6543 13.9619ZM5.91016 13.75C5.94027 13.7795 5.97474 13.8051 6.01172 13.8262L5.95898 13.791C5.94197 13.7782 5.92535 13.7649 5.91016 13.75ZM6.58008 12.9414H6.58105H6.58008ZM8.2002 1.41895C7.63858 1.33129 7.06722 1.32543 6.50391 1.40137L5.5127 3.10059C5.45667 3.19686 5.37383 3.27503 5.27539 3.32715C5.21254 3.36088 5.14878 3.39942 5.08594 3.43555L5.08496 3.43457C4.99197 3.48895 4.88605 3.51825 4.77832 3.51758L2.77637 3.50586C2.43354 3.9367 2.15694 4.41647 1.95508 4.92871L2.96875 6.66211H2.96973C3.01013 6.73278 3.03531 6.81132 3.04492 6.8916L3.04883 6.97461C3.04667 7.04613 3.0485 7.11658 3.05078 7.18945C3.0548 7.30124 3.02821 7.41268 2.97266 7.50977L1.99609 9.21289C2.21404 9.7388 2.50744 10.2299 2.86621 10.6719L4.88281 10.7012H4.88379C4.99002 10.7034 5.09368 10.7341 5.18457 10.7891L5.39258 10.9082C5.45916 10.9464 5.51715 10.9978 5.56445 11.0576L5.6084 11.1201L6.6416 12.8486C7.20362 12.9365 7.77513 12.9432 8.33887 12.8672L9.3291 11.1689C9.38528 11.0722 9.46843 10.9926 9.56738 10.9404C9.63017 10.9067 9.69505 10.8701 9.75781 10.834L9.8291 10.7988C9.90336 10.7678 9.98341 10.7514 10.0645 10.752L12.0664 10.7646C12.4092 10.3324 12.6847 9.85062 12.8857 9.33691L11.8711 7.60645L11.8721 7.60547C11.8181 7.51108 11.7903 7.40365 11.792 7.29492L11.791 7.29395C11.7932 7.22206 11.7923 7.15042 11.79 7.07715C11.7862 6.96565 11.8128 6.85466 11.8682 6.75781L12.8438 5.05371C12.6258 4.52811 12.3333 4.03648 11.9746 3.59473L9.95801 3.56641H9.95703C9.85067 3.56414 9.74722 3.53265 9.65625 3.47754V3.47852L9.45898 3.36426L9.39258 3.32129C9.32844 3.27486 9.27351 3.21669 9.23242 3.14844V3.14746L8.2002 1.41895ZM2.4668 11.7559L2.57031 11.7686H2.57129C2.50157 11.7675 2.43246 11.7518 2.36914 11.7227L2.4668 11.7559ZM1.78809 11.082V11.0811V11.082ZM13.0244 11.3203C13.0502 11.2862 13.0774 11.2533 13.1025 11.2188C13.0774 11.2533 13.0502 11.2862 13.0244 11.3203ZM13.2051 11.0713C13.2348 11.0279 13.2643 10.9845 13.293 10.9404C13.2643 10.9845 13.2348 11.0279 13.2051 11.0713ZM9.90918 10.876C9.90231 10.8782 9.89544 10.8803 9.88867 10.8828C9.89545 10.8803 9.90231 10.8782 9.90918 10.876ZM13.3535 10.8447C13.3903 10.7861 13.426 10.7268 13.4609 10.667C13.426 10.7268 13.3903 10.7861 13.3535 10.8447ZM13.5049 10.5928C13.5426 10.5264 13.5789 10.4593 13.6143 10.3916C13.5789 10.4593 13.5426 10.5264 13.5049 10.5928ZM13.6582 10.3066C13.695 10.2337 13.7305 10.1602 13.7646 10.0859C13.7305 10.1602 13.695 10.2337 13.6582 10.3066ZM7.2168 4.04004C7.82858 3.99994 8.43974 4.14269 8.9707 4.44922C9.68176 4.86085 10.2003 5.53844 10.4131 6.33203C10.6256 7.12573 10.5145 7.97155 10.1045 8.68359C9.79803 9.21429 9.34157 9.64291 8.79199 9.91406C8.24214 10.1852 7.62346 10.287 7.01562 10.207C6.40793 10.127 5.83684 9.86895 5.37598 9.46484C4.91529 9.06072 4.58448 8.52844 4.42578 7.93652C4.26721 7.34451 4.28843 6.71808 4.48535 6.1377C4.68236 5.55755 5.04627 5.04792 5.53223 4.6748C6.01845 4.30171 6.60526 4.08027 7.2168 4.04004ZM13.7852 10.041C13.8281 9.94559 13.8697 9.84945 13.9082 9.75195V9.75098C13.8696 9.84876 13.8283 9.94531 13.7852 10.041ZM6.40918 9.95703C6.46044 9.97542 6.51219 9.99222 6.56445 10.0078C6.51219 9.99225 6.46044 9.97539 6.40918 9.95703ZM6.20996 9.87695C6.25096 9.89508 6.2922 9.91244 6.33398 9.92871C6.2922 9.91247 6.25097 9.89505 6.20996 9.87695ZM6.02832 9.79004C6.0678 9.81077 6.10809 9.82969 6.14844 9.84863C6.10808 9.82972 6.06781 9.81074 6.02832 9.79004ZM5.84082 9.68262C5.87596 9.70443 5.9113 9.72578 5.94727 9.74609C5.91128 9.7258 5.87597 9.7044 5.84082 9.68262ZM12.9131 9.53613C12.9421 9.46825 12.9707 9.40012 12.9971 9.33105L12.9961 9.33008C12.9697 9.3993 12.9422 9.46808 12.9131 9.53613ZM5.66602 9.56543C5.7015 9.59105 5.73694 9.61662 5.77344 9.64062C5.73693 9.61664 5.70151 9.59104 5.66602 9.56543ZM1.97461 9.41699C1.99284 9.4575 2.01311 9.49704 2.03223 9.53711C1.98023 9.42813 1.93016 9.31814 1.88477 9.20605L1.97461 9.41699ZM5.59277 9.5127C5.59556 9.51484 5.59877 9.51642 5.60156 9.51855C5.54737 9.47722 5.49386 9.43478 5.44238 9.38965L5.59277 9.5127ZM8.03125 5.33496C7.67547 5.21424 7.29063 5.20159 6.92773 5.29883C6.56509 5.39617 6.23977 5.59952 5.99219 5.88184C5.74452 6.16433 5.58615 6.51424 5.53711 6.88672C5.48824 7.25901 5.54977 7.63783 5.71582 7.97461C5.88202 8.31152 6.14537 8.59145 6.4707 8.7793C6.90703 9.0311 7.42549 9.09913 7.91211 8.96875C8.39876 8.83831 8.81448 8.52031 9.06641 8.08398C9.25414 7.7587 9.3409 7.38453 9.31641 7.00977C9.2918 6.635 9.15631 6.27555 8.92773 5.97754C8.69908 5.67961 8.38685 5.45577 8.03125 5.33496ZM6.17676 8.69922C6.25355 8.76023 6.3343 8.81676 6.41992 8.86621L6.4209 8.86523C6.33525 8.81578 6.2536 8.76024 6.17676 8.69922ZM8.47754 8.83203V8.83105V8.83203ZM5.77637 8.27246C5.83227 8.35318 5.89399 8.4295 5.96094 8.50098L5.86426 8.38965C5.83359 8.35168 5.80422 8.31265 5.77637 8.27246ZM4.52246 7.91113C4.5608 8.0541 4.60948 8.19346 4.66797 8.32812C4.60945 8.19325 4.56083 8.05334 4.52246 7.91016V7.91113ZM9.40039 6.85645C9.40722 6.90519 9.41278 6.95457 9.41602 7.00391C9.41922 7.05311 9.42035 7.1023 9.41992 7.15137C9.42035 7.10204 9.41926 7.05239 9.41602 7.00293C9.41279 6.95379 9.40719 6.90498 9.40039 6.85645ZM11.9004 6.95215C11.8982 6.96247 11.897 6.97295 11.8955 6.9834C11.8971 6.97295 11.8982 6.96247 11.9004 6.95215ZM4.65137 5.97754C4.62849 6.03229 4.60852 6.08831 4.58887 6.14453C4.60851 6.0883 4.6285 6.03229 4.65137 5.97754ZM4.73633 5.79492C4.7241 5.81941 4.71274 5.8443 4.70117 5.86914C4.71273 5.8443 4.72411 5.81941 4.73633 5.79492ZM4.84473 5.59863C4.82627 5.62957 4.80836 5.66078 4.79102 5.69238C4.80835 5.66077 4.82628 5.62957 4.84473 5.59863ZM4.95605 5.42383C4.93113 5.45972 4.90714 5.49624 4.88379 5.5332C4.90712 5.49623 4.93114 5.45973 4.95605 5.42383ZM8.31445 4.27051C8.52443 4.33607 8.72746 4.42504 8.91992 4.53613L8.9209 4.53516C8.72801 4.42379 8.52395 4.33516 8.31348 4.26953L8.31445 4.27051ZM5.09082 5.24609C5.06172 5.28198 5.03326 5.3183 5.00586 5.35547C5.03325 5.31828 5.06173 5.28199 5.09082 5.24609ZM6.63965 5.29199C6.64276 5.29067 6.6463 5.29037 6.64941 5.28906C6.6463 5.29037 6.64276 5.29067 6.63965 5.29199ZM7.9209 5.19824H7.92188H7.9209ZM6.90234 5.20215H6.90332H6.90234ZM5.23145 5.08496C5.19896 5.11965 5.16651 5.15429 5.13574 5.19043C5.1665 5.15428 5.19897 5.11966 5.23145 5.08496ZM13.9766 4.93652V4.9375V4.93652ZM0.922852 4.53613C0.885573 4.63126 0.850299 4.72727 0.817383 4.82422V4.8252C0.850362 4.72803 0.885496 4.63148 0.922852 4.53613ZM2.01855 4.5293H2.01953H2.01855ZM1.04688 4.24316C1.02195 4.29878 0.998013 4.35481 0.974609 4.41113C0.998008 4.35481 1.02196 4.29878 1.04688 4.24316ZM7.22363 4.13965L7.22461 4.14062L7.22363 4.13965ZM7.66699 4.14453L7.66602 4.14355L7.66699 4.14453ZM1.17188 3.97852C1.1445 4.03303 1.11865 4.08828 1.09277 4.14355C1.11864 4.08828 1.14451 4.03304 1.17188 3.97852ZM12.4287 4.0498V4.04883V4.0498ZM12.6348 2.66992V2.6709C12.8546 2.91962 13.0566 3.1828 13.2383 3.45898C13.1171 3.27471 12.987 3.09618 12.8486 2.92383C12.7796 2.83782 12.708 2.75273 12.6348 2.66992ZM1.30859 3.72168C1.28765 3.75921 1.26729 3.79703 1.24707 3.83496C1.26728 3.79703 1.28765 3.75921 1.30859 3.72168ZM2.72656 3.40723V3.4082L4.7793 3.41797V3.41699L2.72656 3.40723ZM12.0234 3.49707C12.0719 3.55591 12.1198 3.61522 12.166 3.67578L12.0234 3.49609L9.95898 3.4668L12.0234 3.49707ZM1.47852 3.43457C1.45114 3.47831 1.42381 3.52205 1.39746 3.56641C1.4238 3.52204 1.45115 3.47831 1.47852 3.43457ZM9.78809 3.43164C9.79329 3.43365 9.79845 3.43566 9.80371 3.4375C9.79845 3.43567 9.79329 3.43365 9.78809 3.43164ZM5.22852 3.23926V3.24023V3.23926ZM1.64746 3.17676C1.61837 3.21879 1.58963 3.26104 1.56152 3.30371C1.58963 3.26104 1.61837 3.21879 1.64746 3.17676ZM2.11523 2.5752H2.11621H2.11523ZM8.94629 0.53418C8.96978 0.559626 8.99096 0.587273 9.00879 0.617188C8.97313 0.557368 8.92497 0.505135 8.86816 0.464844L8.94629 0.53418ZM6.37305 0.307617C6.26302 0.322319 6.15337 0.34041 6.04395 0.360352C6.15337 0.340409 6.26301 0.322304 6.37305 0.307617ZM8.35059 0.325195C8.25055 0.310024 8.15027 0.296933 8.0498 0.286133C8.15027 0.296945 8.25055 0.310026 8.35059 0.325195ZM7.92578 0.275391C7.85971 0.269476 7.79372 0.26282 7.72754 0.258789C7.79372 0.262834 7.85971 0.269466 7.92578 0.275391ZM6.9502 0.255859C6.89287 0.258741 6.83558 0.262311 6.77832 0.266602C6.83559 0.262325 6.89287 0.258726 6.9502 0.255859ZM7.58008 0.25293C7.53418 0.251105 7.4883 0.248968 7.44238 0.248047C7.4883 0.24898 7.53418 0.251094 7.58008 0.25293ZM7.12988 0.249023C7.17448 0.24794 7.21907 0.247302 7.26367 0.24707C7.21907 0.247314 7.17448 0.247928 7.12988 0.249023ZM6.67871 0.274414C6.57668 0.283521 6.47471 0.294033 6.37305 0.307617C6.47471 0.294047 6.57668 0.283499 6.67871 0.274414Z",fill:"#97A3B7"})),ow=e=>A.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_189_1728)"},A.createElement("path",{d:"M2.33317 2.4672H11.6665V9.4672H3.01567L2.33317 10.1497V2.4672ZM2.33317 1.30054C1.6915 1.30054 1.17234 1.82554 1.17234 2.4672L1.1665 12.9672L3.49984 10.6339H11.6665C12.3082 10.6339 12.8332 10.1089 12.8332 9.4672V2.4672C12.8332 1.82554 12.3082 1.30054 11.6665 1.30054H2.33317ZM3.49984 7.13387H8.1665V8.30054H3.49984V7.13387ZM3.49984 5.38387H10.4998V6.55054H3.49984V5.38387ZM3.49984 3.63387H10.4998V4.80054H3.49984V3.63387Z",fill:"#97A3B7"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_189_1728"},A.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),sw=e=>A.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_3803_129233)"},A.createElement("path",{d:"M7.3335 4.66683H8.66683V6.00016H7.3335V4.66683ZM7.3335 7.3335H8.66683V11.3335H7.3335V7.3335ZM8.00016 1.3335C4.32016 1.3335 1.3335 4.32016 1.3335 8.00016C1.3335 11.6802 4.32016 14.6668 8.00016 14.6668C11.6802 14.6668 14.6668 11.6802 14.6668 8.00016C14.6668 4.32016 11.6802 1.3335 8.00016 1.3335ZM8.00016 13.3335C5.06016 13.3335 2.66683 10.9402 2.66683 8.00016C2.66683 5.06016 5.06016 2.66683 8.00016 2.66683C10.9402 2.66683 13.3335 5.06016 13.3335 8.00016C13.3335 10.9402 10.9402 13.3335 8.00016 13.3335Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_3803_129233"},A.createElement("rect",{width:16,height:16,fill:"white"})))),aw=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,f]=w.useState(!1),g=w.useRef(!1),[y,v]=w.useState(!1),[b,p]=w.useState([]),{mutate:h,isPending:m}=LI(),{logoUrl:x,cardTitle:C,id:I,externalResourceId:E,connectorId:_,textToHighlight:T}=e.cardData||{},S=w.useMemo(()=>({key:T,card_id:I,card_title:C,connector_id:_,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[T,I,C,_,E,r,n]);if(w.useEffect(()=>{const X=Date.now();return()=>{c(sn.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),w.useEffect(()=>{var J,oe,ae;const X=(ae=(oe=(J=e==null?void 0:e.cardData)==null?void 0:J.data)==null?void 0:oe.flatDetails)==null?void 0:ae.data;if(X){const B=X.sort((P,G)=>P.priority-G.priority);p(B),c(sn.OBJECT_HOVERED,S)}},[e,c,S]),!b||b.length===0)return null;const L=()=>{f(!0),c(sn.FEEDBACK_OPTION_CLICKED,S)},N=()=>{v(!0),c(sn.NEGATIVE_FEEDBACK_CLICKED,S)},k=X=>{const J={card_id:I,entity_id:E,comment:X.feedbackComment,option:X.feedbackOption,feedback_type:"entity_extraction"};typeof X.isThumbsUp<"u"&&(J.positive_feedback=X.isThumbsUp),h({conversationId:r,feedbackData:J},{onSuccess:()=>{l?c(sn.FEEDBACK_OPTION_SUBMITTED,S):y&&c(sn.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),v(!1),Ie({message:HI,type:Kt})},onError:()=>{Ie({message:WI,type:ze})}})},D=()=>{k({isThumbsUp:!0}),c(sn.POSITIVE_FEEDBACK_CLICKED,S)},M=X=>{k({...X,isThumbsUp:!1})},V=()=>{s==null||s(_),i()},z=()=>{a==null||a()},q=X=>{c(sn.PERMALINK_CLICKED,{...S,clicked_value:X})},$=()=>{g.current||(c(sn.DATA_CARD_SCROLLED,S),g.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(YI,{children:[u.jsxs(QI,{onScroll:$,children:[u.jsxs(JI,{children:[u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[x&&u.jsx("img",{src:x,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(d.Tooltip,{title:C,arrow:!0,placement:"top",children:u.jsx(qI,{variant:"h3",color:d.theme.palette.gray.black,width:o?"100px":"200px",children:C})})]}),o?u.jsx(nw,{variant:"text",size:"small",endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:z,children:RI}):null]}),u.jsx($I,{}),u.jsx(d.Box,{paddingY:"16px",children:b.map(({key:X,value:J,label:oe,deepLink:ae})=>u.jsxs(ew,{children:[u.jsxs(UI,{children:[oe,":"]}),u.jsx(d.Tooltip,{title:(J==null?void 0:J.length)>el?J:"",arrow:!0,placement:"top",children:ae?u.jsx(d.Link,{href:ae,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:d.theme.palette.primary.main},onClick:()=>q(J),children:Od(J||"N/A",el)}):u.jsx(KI,{children:Od(J||"N/A",el)})})]},X))})]}),u.jsxs(tw,{children:[u.jsx(d.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx(jo,{arrow:!0,title:DI,placement:"top",children:u.jsx(d.IconButton,{onClick:V,children:u.jsx(rw,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:12,children:MI}),u.jsx(jo,{arrow:!0,title:NI,placement:"top",children:u.jsx(d.IconButton,{size:"small",children:u.jsx(sw,{})})})]})}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx(jo,{arrow:!0,title:OI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:m,onClick:D,children:u.jsx(_p,{})})}),u.jsx(jo,{arrow:!0,title:FI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:m,onClick:N,children:u.jsx(Sp,{})})}),u.jsx(jo,{arrow:!0,title:kI,placement:"top",children:u.jsx(d.IconButton,{onClick:L,size:"small",disabled:m,children:u.jsx(ow,{})})})]})]})]}),u.jsx(sr,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:u.jsx(wp,{onCancel:()=>f(!1),onSubmit:k,isLoading:m,showOptions:!1,title:jI})}),u.jsx(sr,{shown:y,setShown:v,borderRadius:12,sx:{zIndex:15002},children:u.jsx(wp,{onCancel:()=>v(!1),onSubmit:M,isLoading:m,title:PI})})]})},Tp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,Ap=(e,t=350,n=400)=>{const r=e.getBoundingClientRect(),o=window.innerHeight,s=window.innerWidth,a=r.top,i=o-r.bottom;return i>=t||i>a?r.left<n/2?"bottom-start":s-r.right<n/2?"bottom-end":"bottom":r.left<n/2?"top-start":s-r.right<n/2?"top-end":"top"},iw=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${d.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",maxHeight:"300px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${d.theme.palette.gray.gray6}`,position:"relative"}}));function cw({elements:e,title:t,onKeyChange:n}){const[r,o]=w.useState(!1),[s,a]=w.useState(null),[i,c]=w.useState(""),[l,f]=w.useState("bottom"),[g,y]=w.useState(!1),v=w.useRef(null),b=w.useRef({x:0,y:0}),p=w.useCallback(()=>{v.current&&(clearTimeout(v.current),v.current=null)},[]);w.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,N=L.textContent||"",k=Ap(L);f(k),c(N),n&&n(N),a(L),o(!0)},_=()=>{if(r&&s){const S=Ap(s);f(S)}},T=S=>{if(b.current={x:S.clientX,y:S.clientY},!r||g)return;const L=S.clientX,N=S.clientY;let k=!1;for(const D of e)if(Tp(L,N,D.getBoundingClientRect())){k=!0;break}if(!k){const D=document.querySelector(`.${d.tooltipClasses.tooltip}`);D&&Tp(L,N,D.getBoundingClientRect())&&(k=!0)}k||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",T),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",T),p()}}},[e,n,r,s,g,p]);const h=()=>{y(!0),p()},m=()=>{y(!1),v.current=setTimeout(()=>{o(!1),a(null)},150)},C=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:h,onMouseLeave:m,children:C});return u.jsx(iw,{title:I,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const lw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=w.useState(null),[l,f]=w.useState([]),{data:g,isError:y}=TI(e,t,n);return w.useEffect(()=>{g?c(g):y&&c(null)},[g,y]),w.useEffect(()=>{let v=null;if(i&&Object.keys(i).length&&e){v=new AI(Object.keys(i)||[],f);const b=Object.keys(i).map(p=>{var m;const h=((m=i[p])==null?void 0:m.cardData)||{};return{key:p,card_title:h.cardTitle,connector_id:h.connectorId}});a(sn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:b})}return()=>{v&&v.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(cw,{elements:l,title:(v,b)=>{var p;return!i||!v||!((p=i[v])!=null&&p.cardData)?u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(aw,{smIds:n,conversationId:e||"",analysisData:i[v],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:b,sendTrackingEvent:a})}})})},uw=({children:e})=>u.jsx(qi,{store:Qc,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx($c,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),dw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx(Uc,{children:u.jsxs(uw,{children:[u.jsx(lw,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Re.createPortal(u.jsx(Kc,{id:"toast-message",children:u.jsx(Za,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),Lp={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},fw=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class pw{constructor({processDelay:t=1e3}){De(this,"_processDelay");De(this,"initialized",!1);De(this,"_queue",[]);De(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});De(this,"ACTIONS",Lp);this._processDelay=t}register(t){this._queueProps=t,!this.initialized&&(this.initialized=!0,this._delay(this._processDelay).then(()=>this._process()))}add(t){this._queue.push(t),this._process()}_delay(t){return new Promise(n=>setTimeout(n,t))}_process(){if(this.initialized)for(;this._queue.length>0;){const t=this._queue.shift();if(t)switch(t.type){case Lp.OPEN_CREATE_FORM:fw(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var ve=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(ve||{}),Sa=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Sa||{});const hw=e=>{const t=[],n={};for(const r of e){const o=n[r.entityType];if(o===void 0){const s={type:r.entityType,entities:[r]};n[r.entityType]=t.length,t.push(s)}else t[o].entities.push(r)}return t},gw=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Sa.UNAUTHENTICATED?ve.UNAUTHENTICATED:n.pending>0?ve.PENDING:n.failed?ve.ERROR:r.length===0?ve.NOT_LOGGED:o?ve.LOGGED:ve.PAUSED},mw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},A.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),tl=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},A.createElement("path",{d:"M6.3335 8.99967H7.66683V10.333H6.3335V8.99967ZM6.3335 3.66634H7.66683V7.66634H6.3335V3.66634ZM6.9935 0.333008C3.3135 0.333008 0.333496 3.31967 0.333496 6.99967C0.333496 10.6797 3.3135 13.6663 6.9935 13.6663C10.6802 13.6663 13.6668 10.6797 13.6668 6.99967C13.6668 3.31967 10.6802 0.333008 6.9935 0.333008ZM7.00016 12.333C4.0535 12.333 1.66683 9.94634 1.66683 6.99967C1.66683 4.05301 4.0535 1.66634 7.00016 1.66634C9.94683 1.66634 12.3335 4.05301 12.3335 6.99967C12.3335 9.94634 9.94683 12.333 7.00016 12.333Z"})),bw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},A.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z",fill:"white"})),yw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},A.createElement("g",{clipPath:"url(#clip0_532_206243)"},A.createElement("path",{d:"M9.94092 3V0.75L6.94092 3.75L9.94092 6.75V4.5C12.4234 4.5 14.4409 6.5175 14.4409 9C14.4409 9.7575 14.2534 10.4775 13.9159 11.1L15.0109 12.195C15.5959 11.2725 15.9409 10.1775 15.9409 9C15.9409 5.685 13.2559 3 9.94092 3ZM9.94092 13.5C7.45842 13.5 5.44092 11.4825 5.44092 9C5.44092 8.2425 5.62842 7.5225 5.96592 6.9L4.87092 5.805C4.28592 6.7275 3.94092 7.8225 3.94092 9C3.94092 12.315 6.62592 15 9.94092 15V17.25L12.9409 14.25L9.94092 11.25V13.5Z"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_532_206243"},A.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),Cw=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},A.createElement("g",{clipPath:"url(#clip0_1_11813)"},A.createElement("path",{d:"M9.05859 0C4.09059 0 0.0585938 4.032 0.0585938 9C0.0585938 13.968 4.09059 18 9.05859 18C14.0266 18 18.0586 13.968 18.0586 9C18.0586 4.032 14.0266 0 9.05859 0ZM8.15859 12.6H6.35859V5.4H8.15859V12.6ZM11.7586 12.6H9.95859V5.4H11.7586V12.6Z",fill:"#F2A579"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1_11813"},A.createElement("rect",{width:18,height:18,fill:"white"})))),Ta=d.keyframes`
2303
2303
  from {
2304
2304
  transform: rotate(0deg);
2305
2305
  }
2306
2306
  to {
2307
2307
  transform: rotate(360deg);
2308
2308
  }
2309
- `,rl=d.styled(d.Stack)`
2309
+ `,nl=d.styled(d.Stack)`
2310
2310
  width: 16px;
2311
2311
  height: 16px;
2312
2312
  border-radius: 50%;
2313
2313
  justify-content: center;
2314
2314
  align-items: center;
2315
- `,yw=d.styled(rl)`
2315
+ `,xw=d.styled(nl)`
2316
2316
  background-color: #ffe250;
2317
- `,Cw=d.styled(rl)`
2317
+ `,vw=d.styled(nl)`
2318
2318
  background-color: #00bc7e;
2319
- `,xw=d.styled(rl)`
2320
- animation: ${Sa} 1s linear infinite;
2319
+ `,Ew=d.styled(nl)`
2320
+ animation: ${Ta} 1s linear infinite;
2321
2321
  animation-fill-mode: backwards;
2322
2322
  animation-direction: reverse;
2323
- `,vw={[ve.NOT_LOGGED]:u.jsx(yw,{children:u.jsx(hw,{})}),[ve.PENDING]:u.jsx(xw,{children:u.jsx(mw,{})}),[ve.LOGGED]:u.jsx(Cw,{children:u.jsx(gw,{})}),[ve.ERROR]:u.jsx(nl,{}),[ve.UNAUTHENTICATED]:u.jsx(nl,{}),[ve.PAUSED]:u.jsx(bw,{})},Lp=d.styled(d.Typography)`
2323
+ `,Iw={[ve.NOT_LOGGED]:u.jsx(xw,{children:u.jsx(mw,{})}),[ve.PENDING]:u.jsx(Ew,{children:u.jsx(yw,{})}),[ve.LOGGED]:u.jsx(vw,{children:u.jsx(bw,{})}),[ve.ERROR]:u.jsx(tl,{}),[ve.UNAUTHENTICATED]:u.jsx(tl,{}),[ve.PAUSED]:u.jsx(Cw,{})},Op=d.styled(d.Typography)`
2324
2324
  font-size: 12px;
2325
2325
  line-height: 14px;
2326
2326
  font-weight: 500;
2327
2327
  color: #4d596c;
2328
- `,Ew=d.styled(Lp)`
2328
+ `,ww=d.styled(Op)`
2329
2329
  color: #6f7c90;
2330
- `,ol=e=>u.jsx(Lp,{children:e}),sl=e=>u.jsx(Ew,{children:e}),Iw={[ve.NOT_LOGGED]:ol,[ve.PENDING]:sl,[ve.LOGGED]:ol,[ve.PAUSED]:ol,[ve.ERROR]:sl,[ve.UNAUTHENTICATED]:sl},ww={[ve.NOT_LOGGED]:"Sync conversation",[ve.PENDING]:"Syncing in progress",[ve.LOGGED]:"Synced",[ve.PAUSED]:"Synced",[ve.ERROR]:"Syncing failed",[ve.UNAUTHENTICATED]:"Sync conversation"},Wt=w.createContext({}),_w=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${d.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",height:"405px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${d.theme.palette.gray.gray6}`,position:"relative"}})),Sw=d.styled(d.Box)`
2330
+ `,rl=e=>u.jsx(Op,{children:e}),ol=e=>u.jsx(ww,{children:e}),_w={[ve.NOT_LOGGED]:rl,[ve.PENDING]:ol,[ve.LOGGED]:rl,[ve.PAUSED]:rl,[ve.ERROR]:ol,[ve.UNAUTHENTICATED]:ol},Sw={[ve.NOT_LOGGED]:"Sync conversation",[ve.PENDING]:"Syncing in progress",[ve.LOGGED]:"Synced",[ve.PAUSED]:"Synced",[ve.ERROR]:"Syncing failed",[ve.UNAUTHENTICATED]:"Sync conversation"},Xt=w.createContext({}),Tw=d.styled(({className:e,...t})=>u.jsx(d.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${d.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,maxWidth:"288px",width:"288px",height:"405px",overflowY:"auto",borderRadius:"12px",boxShadow:"0px 0px 8px 0px #04060F14",border:`1px solid ${d.theme.palette.gray.gray6}`,position:"relative"}})),Aw=d.styled(d.Box)`
2331
2331
  width: fit-content;
2332
2332
  height: fit-content;
2333
- `,Tw=({children:e,renderTooltip:t,defaultOpen:n})=>{const[r,o]=w.useState(n),s=()=>o(!1),a=()=>o(!0),i=c=>{c.stopPropagation()};return u.jsx(d.ClickAwayListener,{onClickAway:s,children:u.jsx(Sw,{onClick:a,children:u.jsx(_w,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:u.jsx(d.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},Aw="Turn off to stop syncing this conversation.",Lw="Turn on to continue syncing this conversation.",Ow="Authentication failed",Fw="Retry authentication to use this functionality and save in ':connectorName'",kw="Reach out to your admin to reauthenticate :connectorName",Dw="Syncing this conversation to :connectorName. Refresh the page to see updates.",Nw="Something went wrong while syncing this conversation. Please try again.",Rw="No recommendations found",Mw="Already synced email cannot be removed",Pw="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",jw="Log this email thread to your CRM",Bw="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",Op="connector-agent_email-logger_welcomed",Fp="connector-agent_email-logger_welcome_shown",Vw="Tell us how we can improve",Gw="Everything looks good",Hw="Something is not working",Ww="Please provide your feedback",Zw="Feedback submitted",Xw="Failed to submit feedback",kp="email-logging",zw=[{label:"Records are not accurate",value:"not_accurate"},{label:"Search is not working",value:"search_not_working"},{label:"Other",value:"other"}],Lt={email_logging_intro_popup_shown:"email_logging_intro_popup_shown",email_logging_intro_popup_continue_clicked:"email_logging_intro_popup_continue_clicked",email_logging_intro_popup_learn_more_clicked:"email_logging_intro_popup_learn_more_clicked",email_logging_log_config_saved:"email_logging_log_config_saved",email_logging_log_config_canceled:"email_logging_log_config_canceled",email_logging_auto_log_enabled:"email_logging_auto_log_enabled",email_logging_auto_log_disabled:"email_logging_auto_log_disabled",email_logging_search_initiated:"email_logging_search_initiated",email_logging_search_results_found:"email_logging_search_results_found",email_logging_search_result_selected:"email_logging_search_result_selected",email_logging_smart_suggestion_initiated:"email_logging_smart_suggestion_initiated",email_logging_smart_suggestion_selected:"email_logging_smart_suggestion_selected",email_logging_smart_suggestion_not_found:"email_logging_smart_suggestion_not_found",email_logging_failed_clicked:"email_logging_failed_clicked"},Yw={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},Jw={color:"#fff !important"},qw=d.styled(d.Stack)`
2333
+ `,Lw=({children:e,renderTooltip:t,defaultOpen:n})=>{const[r,o]=w.useState(n),s=()=>o(!1),a=()=>o(!0),i=c=>{c.stopPropagation()};return u.jsx(d.ClickAwayListener,{onClickAway:s,children:u.jsx(Aw,{onClick:a,children:u.jsx(Tw,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:u.jsx(d.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},Ow="Turn off to stop syncing this conversation.",Fw="Turn on to continue syncing this conversation.",kw="Authentication failed",Dw="Retry authentication to use this functionality and save in ':connectorName'",Nw="Reach out to your admin to reauthenticate :connectorName",Rw="Syncing this conversation to :connectorName. Refresh the page to see updates.",Mw="Something went wrong while syncing this conversation. Please try again.",Pw="No recommendations found",jw="Already synced email cannot be removed",Bw="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",Vw="Log this email thread to your CRM",Gw="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",Fp="connector-agent_email-logger_welcomed",kp="connector-agent_email-logger_welcome_shown",Hw="Tell us how we can improve",Ww="Everything looks good",Zw="Something is not working",Xw="Please provide your feedback",zw="Feedback submitted",Yw="Failed to submit feedback",Dp="email-logging",Jw=[{label:"Records are not accurate",value:"not_accurate"},{label:"Search is not working",value:"search_not_working"},{label:"Other",value:"other"}],Ft={email_logging_intro_popup_shown:"email_logging_intro_popup_shown",email_logging_intro_popup_continue_clicked:"email_logging_intro_popup_continue_clicked",email_logging_intro_popup_learn_more_clicked:"email_logging_intro_popup_learn_more_clicked",email_logging_log_config_saved:"email_logging_log_config_saved",email_logging_log_config_canceled:"email_logging_log_config_canceled",email_logging_auto_log_enabled:"email_logging_auto_log_enabled",email_logging_auto_log_disabled:"email_logging_auto_log_disabled",email_logging_search_initiated:"email_logging_search_initiated",email_logging_search_results_found:"email_logging_search_results_found",email_logging_search_result_selected:"email_logging_search_result_selected",email_logging_smart_suggestion_initiated:"email_logging_smart_suggestion_initiated",email_logging_smart_suggestion_selected:"email_logging_smart_suggestion_selected",email_logging_smart_suggestion_not_found:"email_logging_smart_suggestion_not_found",email_logging_failed_clicked:"email_logging_failed_clicked"},qw={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},$w={color:"#fff !important"},Qw=d.styled(d.Stack)`
2334
2334
  box-sizing: border-box;
2335
2335
  padding: 16px;
2336
- `,$w=d.styled("img")`
2336
+ `,Uw=d.styled("img")`
2337
2337
  display: block;
2338
2338
  width: 100%;
2339
2339
  aspect-ratio: 3 / 2;
2340
2340
  border-radius: 8px;
2341
2341
  background: #ecedff;
2342
2342
  object-fit: cover;
2343
- `,Qw=d.styled(d.Typography)`
2343
+ `,Kw=d.styled(d.Typography)`
2344
2344
  margin-top: 10px;
2345
2345
  color: #343c45;
2346
2346
  font-size: 14px;
2347
2347
  font-weight: 600;
2348
2348
  line-height: 18px;
2349
2349
  letter-spacing: -0.28px;
2350
- `,Uw=d.styled(d.Typography)`
2350
+ `,e_=d.styled(d.Typography)`
2351
2351
  margin-top: 6px;
2352
2352
  color: #3e4c5a;
2353
2353
  font-size: 13px;
2354
2354
  font-weight: 400;
2355
2355
  line-height: 18px;
2356
2356
  letter-spacing: -0.13px;
2357
- `,Kw=d.styled(d.Stack)`
2357
+ `,t_=d.styled(d.Stack)`
2358
2358
  margin-top: 20px;
2359
2359
  flex-flow: row nowrap;
2360
2360
  justify-content: flex-end;
2361
2361
  column-gap: 8px;
2362
- `,Dp=R0(),e_=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=w.useContext(Wt),r=n==null?void 0:n.sendTrackingEvent;return w.useEffect(()=>{const o=Dp.getItem(Fp);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(Lt.email_logging_intro_popup_shown,{app_name:t}),Dp.setItem(Fp,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),u.jsxs(qw,{children:[u.jsx($w,{src:Pw,alt:"Welcome"}),u.jsx(Qw,{children:jw}),u.jsx(Uw,{children:Bw}),u.jsx(Kw,{children:e?u.jsx(d.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},t_=({children:e,onContinue:t,connectorName:n})=>u.jsx(E1,{title:u.jsx(e_,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:Yw,arrowStyle:Jw,children:e}),n_={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},r_={color:"#fff !important"},o_=d.styled(d.Box)`
2362
+ `,Np=M0(),n_=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=w.useContext(Xt),r=n==null?void 0:n.sendTrackingEvent;return w.useEffect(()=>{const o=Np.getItem(kp);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(Ft.email_logging_intro_popup_shown,{app_name:t}),Np.setItem(kp,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),u.jsxs(Qw,{children:[u.jsx(Uw,{src:Bw,alt:"Welcome"}),u.jsx(Kw,{children:Vw}),u.jsx(e_,{children:Gw}),u.jsx(t_,{children:e?u.jsx(d.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},r_=({children:e,onContinue:t,connectorName:n})=>u.jsx(I1,{title:u.jsx(n_,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:qw,arrowStyle:$w,children:e}),o_={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},s_={color:"#fff !important"},a_=d.styled(d.Box)`
2363
2363
  padding: 16px;
2364
- `,s_=d.styled(d.Typography)`
2364
+ `,i_=d.styled(d.Typography)`
2365
2365
  font-weight: 600;
2366
2366
  font-size: 14px;
2367
2367
  line-height: 130%;
2368
2368
  color: ${d.theme.palette.gray.gray1};
2369
- `,a_=d.styled(d.Typography)`
2369
+ `,c_=d.styled(d.Typography)`
2370
2370
  font-weight: 400;
2371
2371
  font-size: 13px;
2372
2372
  line-height: 135%;
2373
2373
  color: ${d.theme.palette.gray.gray3};
2374
2374
  margin-top: 6px;
2375
- `,i_=d.styled(d.Box)`
2375
+ `,l_=d.styled(d.Box)`
2376
2376
  display: flex;
2377
2377
  justify-content: space-between;
2378
2378
  align-items: center;
2379
2379
  margin-top: 20px;
2380
2380
  width: 100%;
2381
- `,c_=e=>A.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M8.9082 1.37598C10.221 0.614497 11.8414 0.614651 13.1543 1.37598L19.9619 5.32422C21.2668 6.08111 22.0702 7.47589 22.0703 8.98438V16.916C22.0703 18.4247 21.2669 19.8192 19.9619 20.5762L13.1543 24.5244C11.8414 25.2858 10.2211 25.2859 8.9082 24.5244L2.10156 20.5762C0.796567 19.8192 -0.00683594 18.4247 -0.00683594 16.916V8.98438C-0.00668786 7.47589 0.796688 6.08111 2.10156 5.32422L8.9082 1.37598ZM11.9531 15.9727C11.9531 17.5841 13.2597 18.8906 14.8711 18.8906V15.3281C14.871 13.7167 13.5645 12.4102 11.9531 12.4102V15.9727ZM7.57617 15.6641C7.57619 17.2755 8.88271 18.582 10.4941 18.582V10.1592C10.4939 8.54793 9.18748 7.24219 7.57617 7.24219V15.6641Z",fill:"#D0D8E3"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.4643 7.74676V11.8643C27.8476 11.0201 28.9238 10.6646 29.6462 10.6646C31.4006 10.6646 32.4325 11.8199 32.4325 13.7898V17.0335C32.4325 17.4482 32.0935 17.8037 31.6512 17.8037C31.2384 17.8037 30.914 17.4482 30.914 17.0335V13.8787C30.914 12.7975 30.2359 12.1606 29.3808 12.1606C28.511 12.1606 27.4643 12.6493 27.4643 14.012V17.0335C27.4643 17.4482 27.1252 17.8037 26.6829 17.8037C26.2701 17.8037 25.9458 17.4482 25.9458 17.0335V7.74676C25.9458 7.33204 26.2849 6.97656 26.7272 6.97656C27.1399 6.97656 27.4643 7.33204 27.4643 7.74676ZM33.6052 8.01336C33.6052 7.46534 34.0769 7.05062 34.6224 7.05062C35.1826 7.05062 35.6249 7.46534 35.6249 8.01336C35.6249 8.56139 35.1826 8.97611 34.6224 8.97611C34.0769 8.97611 33.6052 8.56139 33.6052 8.01336ZM35.389 17.0335C35.389 17.4482 35.0499 17.8037 34.6077 17.8037C34.1949 17.8037 33.8705 17.4482 33.8705 17.0335V11.5089C33.8705 11.0941 34.1949 10.7387 34.6077 10.7387C35.0499 10.7387 35.389 11.0941 35.389 11.5089V17.0335ZM42.7241 11.7014L40.4685 17.1076C40.2915 17.5371 39.9967 17.8037 39.5544 17.8037H39.466C39.0237 17.8037 38.7141 17.5371 38.5372 17.1076L36.2963 11.7014C36.1341 11.3163 36.3848 10.8275 36.7976 10.7535C37.1956 10.6794 37.5642 10.872 37.7116 11.2571L39.5102 15.7894L41.3088 11.2571C41.4562 10.872 41.8248 10.6794 42.2228 10.7535C42.6356 10.8275 42.8862 11.3163 42.7241 11.7014ZM44.6044 13.701H48.5996C48.4522 12.6197 47.6708 11.9976 46.6388 11.9976C45.5774 11.9976 44.7518 12.6345 44.6044 13.701ZM50.0886 14.1157C50.0886 14.5156 49.7643 14.8118 49.3957 14.8118H44.6044C44.7518 15.8782 45.6069 16.5447 46.7125 16.5447C47.4349 16.5447 47.8477 16.293 48.349 15.8782C48.5996 15.6709 49.0124 15.5672 49.322 15.819C49.6021 16.0412 49.6168 16.5003 49.3515 16.7817C48.6586 17.5075 47.6561 17.8778 46.6388 17.8778C44.6781 17.8778 43.1006 16.4411 43.1006 14.249C43.1006 12.0569 44.6781 10.6646 46.6388 10.6646C48.5554 10.6646 50.0296 11.9976 50.0886 14.1157ZM54.4162 12.1013C53.1188 12.1013 52.5733 13.4047 52.5733 15.2413V17.0335C52.5733 17.4482 52.2343 17.8037 51.792 17.8037C51.3792 17.8037 51.0548 17.4482 51.0548 17.0335V11.5089C51.0548 11.0941 51.3792 10.7387 51.792 10.7387C52.2343 10.7387 52.5733 11.0941 52.5733 11.5089V12.3975C52.9272 11.1682 53.6053 10.6646 54.4604 10.6646C54.6815 10.6646 54.9027 10.6794 55.1091 10.7239C55.4924 10.8127 55.743 11.1978 55.6545 11.5977C55.5218 12.2642 54.8584 12.1013 54.4162 12.1013Z",fill:"#D0D8E3"})),l_=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?Fw:kw,{connectorFunctions:s}=w.useContext(Wt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(o_,{children:[u.jsx(s_,{children:Ow}),u.jsx(a_,{children:gt(o,{connectorName:n})}),u.jsxs(i_,{children:[u.jsx("div",{children:u.jsx(c_,{})}),e?u.jsx(d.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},u_=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=w.useState(!0),i=()=>a(!0),c=()=>a(!1);return u.jsx(E1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(l_,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:n_,arrowStyle:r_,children:o})},d_=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=w.useContext(Wt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=w.useState(()=>localStorage.getItem(Op)==="true"),[f,g]=w.useState(!1),{connectorId:y,connectorName:v,connectorStatus:b}=n??{},p=t||b!==_a.DISABLED,h=b===_a.UNAUTHENTICATED,m=r===ve.PENDING,x=()=>{localStorage.setItem(Op,"true"),l(!0),g(!0),i==null||i(Lt.email_logging_intro_popup_continue_clicked,{app_name:v})};return c?h?u.jsx(u_,{connectorId:y,connectorName:v,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(d.Tooltip,{title:Nw,children:e}):m?u.jsx(d.Tooltip,{title:Dw.replace(":connectorName",v),children:e}):s?u.jsx(Tw,{defaultOpen:f,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(t_,{onContinue:p?x:void 0,connectorName:v,children:e})},f_=e=>A.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.6168 54.7446C28.6931 52.5589 31.0146 51.1102 33.0842 51.8174C35.9985 52.8133 40.0375 53.9024 44.0621 54.043C48.0034 54.1806 51.968 53.4097 54.8762 52.6339C57.0264 52.0602 59.2927 53.6932 59.215 55.9172C59.1742 57.0856 58.4742 58.1269 57.3723 58.5178C54.8051 59.4284 49.7633 60.8927 44.3075 60.7022C38.7694 60.5088 33.1999 58.6241 30.4004 57.5311C29.2637 57.0873 28.5742 55.9641 28.6168 54.7446Z",fill:"url(#paint0_linear_8481_102191)"}),A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"url(#paint1_linear_8481_102191)"}),A.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"white"})),A.createElement("g",{mask:"url(#mask0_8481_102191)"},A.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),A.createElement("rect",{x:47.4368,y:59.3203,width:53.657,height:13.2235,transform:"rotate(-12 47.4368 59.3203)",fill:"url(#paint2_linear_8481_102191)"}),A.createElement("rect",{x:51.1907,y:76.9824,width:53.657,height:10.4263,transform:"rotate(-12 51.1907 76.9824)",fill:"url(#paint3_linear_8481_102191)"})),A.createElement("path",{opacity:.883952,d:"M113.939 51.0679C114.775 55 112.265 58.865 108.333 59.7008L107.842 59.8052C103.639 60.6986 99.5073 58.0155 98.6139 53.8123L97.205 47.1837L105.307 45.4616C109.239 44.6259 113.104 47.1359 113.939 51.0679Z",fill:"url(#paint4_linear_8481_102191)"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M68.7215 66.4138C67.1801 64.8725 67.6745 62.2062 69.587 61.1603C72.4457 59.5969 76.2861 57.1773 79.3785 54.0849C82.4099 51.0535 84.752 47.3461 86.2775 44.5465C87.3388 42.5989 90.0598 42.0819 91.6282 43.6503C92.4782 44.5003 92.758 45.7623 92.2604 46.8566C91.0829 49.4466 88.5191 54.344 84.4346 58.4285C80.2853 62.5778 74.8639 65.591 72.0553 66.9952C70.9363 67.5548 69.6062 67.2985 68.7215 66.4138Z",fill:"url(#paint5_linear_8481_102191)"}),A.createElement("rect",{x:48.7264,y:33.7744,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 48.7264 33.7744)",fill:"url(#paint6_linear_8481_102191)"}),A.createElement("rect",{x:50.0175,y:35.8193,width:4.0158,height:3.84848,rx:1.92424,transform:"rotate(-12 50.0175 35.8193)",fill:"#435C71"}),A.createElement("rect",{x:59.2875,y:31.5723,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 59.2875 31.5723)",fill:"#FFFEFE"}),A.createElement("path",{opacity:.883952,d:"M111.25 38.5376C110.415 34.6055 106.55 32.0955 102.618 32.9313L102.127 33.0356C97.9234 33.9291 95.2403 38.0607 96.1337 42.2639L97.5426 48.8925L105.644 47.1705C109.576 46.3347 112.086 42.4696 111.25 38.5376Z",fill:"url(#paint7_linear_8481_102191)"}),A.createElement("rect",{x:60.0181,y:33.8037,width:3.84848,height:3.84848,rx:1.90724,transform:"rotate(-12 60.0181 33.8037)",fill:"#435C71"}),A.createElement("path",{d:"M36.9246 59.1604C36.4487 60.717 34.7371 61.6271 33.1805 61.1512C32.3613 60.9007 31.7241 60.3475 31.3259 59.5987L25.2059 46.7983C24.9784 46.3703 25.1286 45.8788 25.5566 45.6513L28.338 44.1724C28.7659 43.9449 29.2574 44.0951 29.4849 44.5231L36.6496 56.8367C37.0728 57.5036 37.15 58.423 36.9246 59.1604Z",fill:"#FFDF9F"}),A.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),A.createElement("path",{d:"M26.6628 44.3769L26.9472 44.9118L28.0169 44.343L26.3106 41.1338L24.171 42.2714L25.0243 43.876C25.6661 43.5347 26.3215 43.7351 26.6628 44.3769Z",fill:"#FFB19F"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.26386 27.248C9.3428 20.4481 16.5101 16.6372 23.31 18.7161C30.11 20.7951 33.9209 27.9624 31.8419 34.7623C29.763 41.5622 22.5956 45.3731 15.7958 43.2942C8.99587 41.2152 5.18493 34.0479 7.26386 27.248ZM9.72157 27.9983C8.06843 33.4055 11.1399 39.1821 16.5471 40.8352C21.9543 42.4884 27.7309 39.4168 29.384 34.0096C31.0372 28.6024 27.9657 22.8258 22.5585 21.1727C17.1513 19.5196 11.3747 22.5911 9.72157 27.9983Z",fill:"#FFE69F"}),A.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),A.createElement("path",{d:"M14.3685 30.6746C15.7299 27.6867 18.9391 25.9803 22.1776 26.5225L22.2595 26.5475C23.7024 26.8095 24.3854 24.8682 23.1497 24.2218C22.3806 23.8074 21.5613 23.557 20.717 23.3884C17.3715 22.9031 14.0553 24.6664 12.6939 27.6543C12.2796 28.4235 12.0859 29.3497 12.0244 30.1372C11.8444 31.6051 13.8607 32.0424 14.4503 30.6997C14.3434 30.7566 14.3685 30.6746 14.3685 30.6746Z",fill:"#F6FBFF"}),A.createElement("path",{d:"M10.2904 29.0679C11.9436 23.6607 17.7202 20.5893 23.1274 22.2424C25.6671 23.0189 27.5785 24.6783 28.9301 26.704C27.7539 24.1048 25.508 22.0744 22.5586 21.1727C17.1514 19.5196 11.3748 22.591 9.72165 27.9982C8.81993 30.9476 9.32924 33.97 10.7444 36.3735C9.82081 34.1203 9.51395 31.6077 10.2904 29.0679Z",fill:"#ADCBE7"}),A.createElement("path",{opacity:.406087,d:"M36.4864 56.8021L36.1373 56.2691C36.3845 56.8563 36.428 57.5516 36.2372 58.1754C35.9273 59.189 34.5593 59.1971 34.0713 58.2806L28.3787 47.5877C28.0534 46.9767 27.3508 46.7619 26.7395 47.0866L25.7206 47.6277L31.4395 59.3516C31.7648 59.9627 32.27 60.5434 32.8706 60.8123C33.7054 61.1528 34.6593 61.1034 35.3726 60.7247C36.0858 60.3459 36.6602 59.5837 36.8444 58.7021C37.0351 58.0783 36.8117 57.4132 36.4864 56.8021Z",fill:"white"}),A.createElement("path",{d:"M29.8826 48.4977C29.8006 48.4726 29.6368 48.4225 29.5799 48.3155L28.1579 45.6411C28.0442 45.4272 28.1193 45.1814 28.3332 45.0677C28.5472 44.9539 28.7929 45.0291 28.9067 45.243L30.3287 47.9174C30.4424 48.1313 30.3673 48.3771 30.1534 48.4908C30.1284 48.5728 29.9645 48.5227 29.8826 48.4977Z",fill:"#FFF5EB"}),A.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),A.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),A.createElement("path",{d:"M89.1282 19.2055L68.2257 26.8725L45.9197 28.3898L44.4929 16.4082C44.3371 13.798 47.5283 11.4502 50.9859 11.6309L65.1429 12.369L67.3969 12.4869C68.5309 12.5463 69.7066 12.3289 70.7522 11.8627L78.6899 8.34726C81.725 6.99992 85.3012 7.87475 86.2125 10.1876L89.1282 19.2055Z",fill:"url(#paint8_linear_8481_102191)"}),A.createElement("path",{opacity:.479771,d:"M88.6262 19.0953L68.3101 26.5288L65.3314 12.5149L67.5211 12.6263C68.6228 12.6824 69.7652 12.471 70.7816 12.0192L78.4972 8.61266C81.4474 7.30707 84.9208 8.14856 85.8036 10.3829L88.6262 19.0953Z",fill:"#ADCBE7"}),A.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),A.createElement("path",{d:"M102.961 24.2033C103.125 24.9722 102.371 25.7829 101.278 26.015L37.9675 39.4722C36.8754 39.7043 35.8568 39.2704 35.6933 38.5015C35.5301 37.7336 36.284 36.922 37.3761 36.6898L100.687 23.2327C101.779 23.0005 102.798 23.4354 102.961 24.2033Z",fill:"#9ED1FF"}),A.createElement("path",{d:"M102.703 24.1718C102.838 24.805 102.067 25.5045 100.983 25.7349L69.5583 32.4144L69.0712 30.123L100.496 23.4436C101.58 23.2131 102.569 23.5394 102.703 24.1718Z",fill:"#78AFE1"}),A.createElement("defs",null,A.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFABC"}),A.createElement("stop",{offset:1,stopColor:"#FFA650"})),A.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"white"}),A.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),A.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#ECF7FF"}),A.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),al=({message:e})=>u.jsxs(d.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[u.jsx(f_,{width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:e})]}),An="/v1/api",p_=`${An}/connector/conversation/:conversationId/email_log_status`,h_=`${An}/connector/conversation/:conversationId/entity_recommendations`,g_=`${An}/connector/conversation/:conversationId/retry_emails_log`,m_=`${An}/connector/conversation/:conversationId/validate_entity`,b_=`${An}/connectors/forms/:formId/search`,y_=`${An}/connector/conversation/:conversationId/log_emails`,C_=`${An}/connector/feedback/conversation/:conversationId`,x_=`${An}/connector/conversation/:conversationId/log_emails`,v_=async({payload:e,entity:t,conversationId:n})=>{if("externalResourceId"in t)return t;try{if(!n)throw new Error("Conversation ID is required to validate entity");const r=await Le({url:gt(m_,{conversationId:n}),data:e,method:je.POST}),o=r==null?void 0:r.data;if(!o.valid)throw new Error("Entity validation failed");return{...o,...t}}catch(r){throw console.error(r),r}},E_=({onSuccess:e,onError:t})=>Yt({mutationFn:v_,onSuccess:e,onError:t}),il=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},A.createElement("path",{d:"M6.99967 13.6654C6.08856 13.6654 5.22745 13.4903 4.41634 13.14C3.60523 12.7898 2.89701 12.312 2.29167 11.7067C1.68634 11.1014 1.20856 10.3931 0.858341 9.58203C0.508119 8.77092 0.333008 7.90981 0.333008 6.9987C0.333008 6.07648 0.508119 5.2127 0.858341 4.40736C1.20856 3.60203 1.68634 2.89648 2.29167 2.2907C2.89701 1.68492 3.60523 1.20714 4.41634 0.857365C5.22745 0.507587 6.08856 0.332476 6.99967 0.332031C7.18856 0.332031 7.34701 0.396031 7.47501 0.524031C7.60301 0.652031 7.66679 0.810253 7.66634 0.998698C7.6659 1.18714 7.6019 1.34559 7.47434 1.47403C7.34679 1.60248 7.18856 1.66625 6.99967 1.66536C5.5219 1.66536 4.26345 2.18492 3.22434 3.22403C2.18523 4.26314 1.6659 5.52136 1.66634 6.9987C1.66679 8.47603 2.18634 9.73448 3.22501 10.774C4.26367 11.8136 5.5219 12.3329 6.99967 12.332C8.47745 12.3311 9.7359 11.8118 10.775 10.774C11.8141 9.73625 12.3335 8.47781 12.333 6.9987C12.333 6.80981 12.397 6.65159 12.525 6.52403C12.653 6.39648 12.8112 6.33248 12.9997 6.33203C13.1881 6.33159 13.3466 6.39559 13.475 6.52403C13.6035 6.65248 13.6672 6.8107 13.6663 6.9987C13.6663 7.90981 13.4912 8.77092 13.141 9.58203C12.7908 10.3931 12.313 11.1016 11.7077 11.7074C11.1023 12.3131 10.3968 12.7909 9.59101 13.1407C8.78523 13.4905 7.92145 13.6654 6.99967 13.6654Z"})),I_=d.styled(d.Stack)`
2381
+ `,u_=e=>A.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M8.9082 1.37598C10.221 0.614497 11.8414 0.614651 13.1543 1.37598L19.9619 5.32422C21.2668 6.08111 22.0702 7.47589 22.0703 8.98438V16.916C22.0703 18.4247 21.2669 19.8192 19.9619 20.5762L13.1543 24.5244C11.8414 25.2858 10.2211 25.2859 8.9082 24.5244L2.10156 20.5762C0.796567 19.8192 -0.00683594 18.4247 -0.00683594 16.916V8.98438C-0.00668786 7.47589 0.796688 6.08111 2.10156 5.32422L8.9082 1.37598ZM11.9531 15.9727C11.9531 17.5841 13.2597 18.8906 14.8711 18.8906V15.3281C14.871 13.7167 13.5645 12.4102 11.9531 12.4102V15.9727ZM7.57617 15.6641C7.57619 17.2755 8.88271 18.582 10.4941 18.582V10.1592C10.4939 8.54793 9.18748 7.24219 7.57617 7.24219V15.6641Z",fill:"#D0D8E3"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.4643 7.74676V11.8643C27.8476 11.0201 28.9238 10.6646 29.6462 10.6646C31.4006 10.6646 32.4325 11.8199 32.4325 13.7898V17.0335C32.4325 17.4482 32.0935 17.8037 31.6512 17.8037C31.2384 17.8037 30.914 17.4482 30.914 17.0335V13.8787C30.914 12.7975 30.2359 12.1606 29.3808 12.1606C28.511 12.1606 27.4643 12.6493 27.4643 14.012V17.0335C27.4643 17.4482 27.1252 17.8037 26.6829 17.8037C26.2701 17.8037 25.9458 17.4482 25.9458 17.0335V7.74676C25.9458 7.33204 26.2849 6.97656 26.7272 6.97656C27.1399 6.97656 27.4643 7.33204 27.4643 7.74676ZM33.6052 8.01336C33.6052 7.46534 34.0769 7.05062 34.6224 7.05062C35.1826 7.05062 35.6249 7.46534 35.6249 8.01336C35.6249 8.56139 35.1826 8.97611 34.6224 8.97611C34.0769 8.97611 33.6052 8.56139 33.6052 8.01336ZM35.389 17.0335C35.389 17.4482 35.0499 17.8037 34.6077 17.8037C34.1949 17.8037 33.8705 17.4482 33.8705 17.0335V11.5089C33.8705 11.0941 34.1949 10.7387 34.6077 10.7387C35.0499 10.7387 35.389 11.0941 35.389 11.5089V17.0335ZM42.7241 11.7014L40.4685 17.1076C40.2915 17.5371 39.9967 17.8037 39.5544 17.8037H39.466C39.0237 17.8037 38.7141 17.5371 38.5372 17.1076L36.2963 11.7014C36.1341 11.3163 36.3848 10.8275 36.7976 10.7535C37.1956 10.6794 37.5642 10.872 37.7116 11.2571L39.5102 15.7894L41.3088 11.2571C41.4562 10.872 41.8248 10.6794 42.2228 10.7535C42.6356 10.8275 42.8862 11.3163 42.7241 11.7014ZM44.6044 13.701H48.5996C48.4522 12.6197 47.6708 11.9976 46.6388 11.9976C45.5774 11.9976 44.7518 12.6345 44.6044 13.701ZM50.0886 14.1157C50.0886 14.5156 49.7643 14.8118 49.3957 14.8118H44.6044C44.7518 15.8782 45.6069 16.5447 46.7125 16.5447C47.4349 16.5447 47.8477 16.293 48.349 15.8782C48.5996 15.6709 49.0124 15.5672 49.322 15.819C49.6021 16.0412 49.6168 16.5003 49.3515 16.7817C48.6586 17.5075 47.6561 17.8778 46.6388 17.8778C44.6781 17.8778 43.1006 16.4411 43.1006 14.249C43.1006 12.0569 44.6781 10.6646 46.6388 10.6646C48.5554 10.6646 50.0296 11.9976 50.0886 14.1157ZM54.4162 12.1013C53.1188 12.1013 52.5733 13.4047 52.5733 15.2413V17.0335C52.5733 17.4482 52.2343 17.8037 51.792 17.8037C51.3792 17.8037 51.0548 17.4482 51.0548 17.0335V11.5089C51.0548 11.0941 51.3792 10.7387 51.792 10.7387C52.2343 10.7387 52.5733 11.0941 52.5733 11.5089V12.3975C52.9272 11.1682 53.6053 10.6646 54.4604 10.6646C54.6815 10.6646 54.9027 10.6794 55.1091 10.7239C55.4924 10.8127 55.743 11.1978 55.6545 11.5977C55.5218 12.2642 54.8584 12.1013 54.4162 12.1013Z",fill:"#D0D8E3"})),d_=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?Dw:Nw,{connectorFunctions:s}=w.useContext(Xt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(a_,{children:[u.jsx(i_,{children:kw}),u.jsx(c_,{children:mt(o,{connectorName:n})}),u.jsxs(l_,{children:[u.jsx("div",{children:u.jsx(u_,{})}),e?u.jsx(d.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},f_=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=w.useState(!0),i=()=>a(!0),c=()=>a(!1);return u.jsx(I1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(d_,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:o_,arrowStyle:s_,children:o})},p_=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=w.useContext(Xt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=w.useState(()=>localStorage.getItem(Fp)==="true"),[f,g]=w.useState(!1),{connectorId:y,connectorName:v,connectorStatus:b}=n??{},p=t||b!==Sa.DISABLED,h=b===Sa.UNAUTHENTICATED,m=r===ve.PENDING,x=()=>{localStorage.setItem(Fp,"true"),l(!0),g(!0),i==null||i(Ft.email_logging_intro_popup_continue_clicked,{app_name:v})};return c?h?u.jsx(f_,{connectorId:y,connectorName:v,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(d.Tooltip,{title:Mw,children:e}):m?u.jsx(d.Tooltip,{title:Rw.replace(":connectorName",v),children:e}):s?u.jsx(Lw,{defaultOpen:f,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(r_,{onContinue:p?x:void 0,connectorName:v,children:e})},h_=e=>A.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.6168 54.7446C28.6931 52.5589 31.0146 51.1102 33.0842 51.8174C35.9985 52.8133 40.0375 53.9024 44.0621 54.043C48.0034 54.1806 51.968 53.4097 54.8762 52.6339C57.0264 52.0602 59.2927 53.6932 59.215 55.9172C59.1742 57.0856 58.4742 58.1269 57.3723 58.5178C54.8051 59.4284 49.7633 60.8927 44.3075 60.7022C38.7694 60.5088 33.1999 58.6241 30.4004 57.5311C29.2637 57.0873 28.5742 55.9641 28.6168 54.7446Z",fill:"url(#paint0_linear_8481_102191)"}),A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"url(#paint1_linear_8481_102191)"}),A.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"white"})),A.createElement("g",{mask:"url(#mask0_8481_102191)"},A.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),A.createElement("rect",{x:47.4368,y:59.3203,width:53.657,height:13.2235,transform:"rotate(-12 47.4368 59.3203)",fill:"url(#paint2_linear_8481_102191)"}),A.createElement("rect",{x:51.1907,y:76.9824,width:53.657,height:10.4263,transform:"rotate(-12 51.1907 76.9824)",fill:"url(#paint3_linear_8481_102191)"})),A.createElement("path",{opacity:.883952,d:"M113.939 51.0679C114.775 55 112.265 58.865 108.333 59.7008L107.842 59.8052C103.639 60.6986 99.5073 58.0155 98.6139 53.8123L97.205 47.1837L105.307 45.4616C109.239 44.6259 113.104 47.1359 113.939 51.0679Z",fill:"url(#paint4_linear_8481_102191)"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M68.7215 66.4138C67.1801 64.8725 67.6745 62.2062 69.587 61.1603C72.4457 59.5969 76.2861 57.1773 79.3785 54.0849C82.4099 51.0535 84.752 47.3461 86.2775 44.5465C87.3388 42.5989 90.0598 42.0819 91.6282 43.6503C92.4782 44.5003 92.758 45.7623 92.2604 46.8566C91.0829 49.4466 88.5191 54.344 84.4346 58.4285C80.2853 62.5778 74.8639 65.591 72.0553 66.9952C70.9363 67.5548 69.6062 67.2985 68.7215 66.4138Z",fill:"url(#paint5_linear_8481_102191)"}),A.createElement("rect",{x:48.7264,y:33.7744,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 48.7264 33.7744)",fill:"url(#paint6_linear_8481_102191)"}),A.createElement("rect",{x:50.0175,y:35.8193,width:4.0158,height:3.84848,rx:1.92424,transform:"rotate(-12 50.0175 35.8193)",fill:"#435C71"}),A.createElement("rect",{x:59.2875,y:31.5723,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 59.2875 31.5723)",fill:"#FFFEFE"}),A.createElement("path",{opacity:.883952,d:"M111.25 38.5376C110.415 34.6055 106.55 32.0955 102.618 32.9313L102.127 33.0356C97.9234 33.9291 95.2403 38.0607 96.1337 42.2639L97.5426 48.8925L105.644 47.1705C109.576 46.3347 112.086 42.4696 111.25 38.5376Z",fill:"url(#paint7_linear_8481_102191)"}),A.createElement("rect",{x:60.0181,y:33.8037,width:3.84848,height:3.84848,rx:1.90724,transform:"rotate(-12 60.0181 33.8037)",fill:"#435C71"}),A.createElement("path",{d:"M36.9246 59.1604C36.4487 60.717 34.7371 61.6271 33.1805 61.1512C32.3613 60.9007 31.7241 60.3475 31.3259 59.5987L25.2059 46.7983C24.9784 46.3703 25.1286 45.8788 25.5566 45.6513L28.338 44.1724C28.7659 43.9449 29.2574 44.0951 29.4849 44.5231L36.6496 56.8367C37.0728 57.5036 37.15 58.423 36.9246 59.1604Z",fill:"#FFDF9F"}),A.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),A.createElement("path",{d:"M26.6628 44.3769L26.9472 44.9118L28.0169 44.343L26.3106 41.1338L24.171 42.2714L25.0243 43.876C25.6661 43.5347 26.3215 43.7351 26.6628 44.3769Z",fill:"#FFB19F"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.26386 27.248C9.3428 20.4481 16.5101 16.6372 23.31 18.7161C30.11 20.7951 33.9209 27.9624 31.8419 34.7623C29.763 41.5622 22.5956 45.3731 15.7958 43.2942C8.99587 41.2152 5.18493 34.0479 7.26386 27.248ZM9.72157 27.9983C8.06843 33.4055 11.1399 39.1821 16.5471 40.8352C21.9543 42.4884 27.7309 39.4168 29.384 34.0096C31.0372 28.6024 27.9657 22.8258 22.5585 21.1727C17.1513 19.5196 11.3747 22.5911 9.72157 27.9983Z",fill:"#FFE69F"}),A.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),A.createElement("path",{d:"M14.3685 30.6746C15.7299 27.6867 18.9391 25.9803 22.1776 26.5225L22.2595 26.5475C23.7024 26.8095 24.3854 24.8682 23.1497 24.2218C22.3806 23.8074 21.5613 23.557 20.717 23.3884C17.3715 22.9031 14.0553 24.6664 12.6939 27.6543C12.2796 28.4235 12.0859 29.3497 12.0244 30.1372C11.8444 31.6051 13.8607 32.0424 14.4503 30.6997C14.3434 30.7566 14.3685 30.6746 14.3685 30.6746Z",fill:"#F6FBFF"}),A.createElement("path",{d:"M10.2904 29.0679C11.9436 23.6607 17.7202 20.5893 23.1274 22.2424C25.6671 23.0189 27.5785 24.6783 28.9301 26.704C27.7539 24.1048 25.508 22.0744 22.5586 21.1727C17.1514 19.5196 11.3748 22.591 9.72165 27.9982C8.81993 30.9476 9.32924 33.97 10.7444 36.3735C9.82081 34.1203 9.51395 31.6077 10.2904 29.0679Z",fill:"#ADCBE7"}),A.createElement("path",{opacity:.406087,d:"M36.4864 56.8021L36.1373 56.2691C36.3845 56.8563 36.428 57.5516 36.2372 58.1754C35.9273 59.189 34.5593 59.1971 34.0713 58.2806L28.3787 47.5877C28.0534 46.9767 27.3508 46.7619 26.7395 47.0866L25.7206 47.6277L31.4395 59.3516C31.7648 59.9627 32.27 60.5434 32.8706 60.8123C33.7054 61.1528 34.6593 61.1034 35.3726 60.7247C36.0858 60.3459 36.6602 59.5837 36.8444 58.7021C37.0351 58.0783 36.8117 57.4132 36.4864 56.8021Z",fill:"white"}),A.createElement("path",{d:"M29.8826 48.4977C29.8006 48.4726 29.6368 48.4225 29.5799 48.3155L28.1579 45.6411C28.0442 45.4272 28.1193 45.1814 28.3332 45.0677C28.5472 44.9539 28.7929 45.0291 28.9067 45.243L30.3287 47.9174C30.4424 48.1313 30.3673 48.3771 30.1534 48.4908C30.1284 48.5728 29.9645 48.5227 29.8826 48.4977Z",fill:"#FFF5EB"}),A.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),A.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),A.createElement("path",{d:"M89.1282 19.2055L68.2257 26.8725L45.9197 28.3898L44.4929 16.4082C44.3371 13.798 47.5283 11.4502 50.9859 11.6309L65.1429 12.369L67.3969 12.4869C68.5309 12.5463 69.7066 12.3289 70.7522 11.8627L78.6899 8.34726C81.725 6.99992 85.3012 7.87475 86.2125 10.1876L89.1282 19.2055Z",fill:"url(#paint8_linear_8481_102191)"}),A.createElement("path",{opacity:.479771,d:"M88.6262 19.0953L68.3101 26.5288L65.3314 12.5149L67.5211 12.6263C68.6228 12.6824 69.7652 12.471 70.7816 12.0192L78.4972 8.61266C81.4474 7.30707 84.9208 8.14856 85.8036 10.3829L88.6262 19.0953Z",fill:"#ADCBE7"}),A.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),A.createElement("path",{d:"M102.961 24.2033C103.125 24.9722 102.371 25.7829 101.278 26.015L37.9675 39.4722C36.8754 39.7043 35.8568 39.2704 35.6933 38.5015C35.5301 37.7336 36.284 36.922 37.3761 36.6898L100.687 23.2327C101.779 23.0005 102.798 23.4354 102.961 24.2033Z",fill:"#9ED1FF"}),A.createElement("path",{d:"M102.703 24.1718C102.838 24.805 102.067 25.5045 100.983 25.7349L69.5583 32.4144L69.0712 30.123L100.496 23.4436C101.58 23.2131 102.569 23.5394 102.703 24.1718Z",fill:"#78AFE1"}),A.createElement("defs",null,A.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFABC"}),A.createElement("stop",{offset:1,stopColor:"#FFA650"})),A.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"white"}),A.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),A.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#ECF7FF"}),A.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),sl=({message:e})=>u.jsxs(d.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[u.jsx(h_,{width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:e})]}),An="/v1/api",g_=`${An}/connector/conversation/:conversationId/email_log_status`,m_=`${An}/connector/conversation/:conversationId/entity_recommendations`,b_=`${An}/connector/conversation/:conversationId/retry_emails_log`,y_=`${An}/connector/conversation/:conversationId/validate_entity`,C_=`${An}/connectors/forms/:formId/search`,x_=`${An}/connector/conversation/:conversationId/log_emails`,v_=`${An}/connector/feedback/conversation/:conversationId`,E_=`${An}/connector/conversation/:conversationId/log_emails`,I_=async({payload:e,entity:t,conversationId:n})=>{if("externalResourceId"in t)return t;try{if(!n)throw new Error("Conversation ID is required to validate entity");const r=await Se({url:mt(y_,{conversationId:n}),data:e,method:je.POST}),o=r==null?void 0:r.data;if(!o.valid)throw new Error("Entity validation failed");return{...o,...t}}catch(r){throw console.error(r),r}},w_=({onSuccess:e,onError:t})=>$t({mutationFn:I_,onSuccess:e,onError:t}),al=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},A.createElement("path",{d:"M6.99967 13.6654C6.08856 13.6654 5.22745 13.4903 4.41634 13.14C3.60523 12.7898 2.89701 12.312 2.29167 11.7067C1.68634 11.1014 1.20856 10.3931 0.858341 9.58203C0.508119 8.77092 0.333008 7.90981 0.333008 6.9987C0.333008 6.07648 0.508119 5.2127 0.858341 4.40736C1.20856 3.60203 1.68634 2.89648 2.29167 2.2907C2.89701 1.68492 3.60523 1.20714 4.41634 0.857365C5.22745 0.507587 6.08856 0.332476 6.99967 0.332031C7.18856 0.332031 7.34701 0.396031 7.47501 0.524031C7.60301 0.652031 7.66679 0.810253 7.66634 0.998698C7.6659 1.18714 7.6019 1.34559 7.47434 1.47403C7.34679 1.60248 7.18856 1.66625 6.99967 1.66536C5.5219 1.66536 4.26345 2.18492 3.22434 3.22403C2.18523 4.26314 1.6659 5.52136 1.66634 6.9987C1.66679 8.47603 2.18634 9.73448 3.22501 10.774C4.26367 11.8136 5.5219 12.3329 6.99967 12.332C8.47745 12.3311 9.7359 11.8118 10.775 10.774C11.8141 9.73625 12.3335 8.47781 12.333 6.9987C12.333 6.80981 12.397 6.65159 12.525 6.52403C12.653 6.39648 12.8112 6.33248 12.9997 6.33203C13.1881 6.33159 13.3466 6.39559 13.475 6.52403C13.6035 6.65248 13.6672 6.8107 13.6663 6.9987C13.6663 7.90981 13.4912 8.77092 13.141 9.58203C12.7908 10.3931 12.313 11.1016 11.7077 11.7074C11.1023 12.3131 10.3968 12.7909 9.59101 13.1407C8.78523 13.4905 7.92145 13.6654 6.99967 13.6654Z"})),__=d.styled(d.Stack)`
2382
2382
  display: flex;
2383
2383
  flex-flow: row nowrap;
2384
2384
  justify-content: flex-start;
@@ -2394,7 +2394,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2394
2394
  cursor: not-allowed;
2395
2395
  }
2396
2396
  `:null}
2397
- `,w_=d.styled(d.Checkbox)`
2397
+ `,S_=d.styled(d.Checkbox)`
2398
2398
  padding: 0;
2399
2399
  margin: 0;
2400
2400
  svg {
@@ -2410,20 +2410,20 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2410
2410
  input:checked:disabled ~ svg {
2411
2411
  fill: #d6dde8;
2412
2412
  }
2413
- `,__=d.styled(il)`
2413
+ `,T_=d.styled(al)`
2414
2414
  width: 16px;
2415
2415
  height: 16px;
2416
2416
  fill: #506dff;
2417
- animation: ${Sa} 1s linear infinite;
2418
- `,S_=d.styled(d.Typography)`
2417
+ animation: ${Ta} 1s linear infinite;
2418
+ `,A_=d.styled(d.Typography)`
2419
2419
  font-size: 13px;
2420
2420
  overflow: hidden;
2421
2421
  text-overflow: ellipsis;
2422
2422
  white-space: nowrap;
2423
- `,Np=d.styled(d.Stack)`
2423
+ `,Rp=d.styled(d.Stack)`
2424
2424
  margin-left: auto;
2425
2425
  flex-shrink: 0;
2426
- `,T_=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=w.useContext(Wt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,g=m=>{o==null||o(x=>({...x,[l+c]:m})),i==null||i(Lt.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},y=()=>{i==null||i(Lt.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:v,isPending:b,isError:p}=E_({onSuccess:g,onError:y}),h=()=>{!o||b||r||p||(n?o(m=>{const x={...m};return delete x[l+c],x}):(i==null||i(Lt.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),v({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return u.jsx(d.Tooltip,{title:r?Mw:"",placement:"top",children:u.jsxs(I_,{disabled:b||p,onClick:h,children:[u.jsx(w_,{value:n,checked:n,disabled:r}),u.jsx(d.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:u.jsx(S_,{variant:"body2",children:c})}),b?u.jsx(Np,{children:u.jsx(__,{})}):null,p?u.jsx(d.Tooltip,{title:"Record not found in "+e,children:u.jsx(Np,{children:u.jsx(nl,{})})}):null]})})},A_=d.styled(d.Stack)`
2426
+ `,L_=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=w.useContext(Xt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,g=m=>{o==null||o(x=>({...x,[l+c]:m})),i==null||i(Ft.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},y=()=>{i==null||i(Ft.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:v,isPending:b,isError:p}=w_({onSuccess:g,onError:y}),h=()=>{!o||b||r||p||(n?o(m=>{const x={...m};return delete x[l+c],x}):(i==null||i(Ft.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),v({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return u.jsx(d.Tooltip,{title:r?jw:"",placement:"top",children:u.jsxs(__,{disabled:b||p,onClick:h,children:[u.jsx(S_,{value:n,checked:n,disabled:r}),u.jsx(d.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:u.jsx(A_,{variant:"body2",children:c})}),b?u.jsx(Rp,{children:u.jsx(T_,{})}):null,p?u.jsx(d.Tooltip,{title:"Record not found in "+e,children:u.jsx(Rp,{children:u.jsx(tl,{})})}):null]})})},O_=d.styled(d.Stack)`
2427
2427
  color: #343c45;
2428
2428
  padding: 18px 0;
2429
2429
  box-sizing: border-box;
@@ -2434,7 +2434,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2434
2434
  overflow-y: auto;
2435
2435
  scrollbar-width: thin;
2436
2436
  scrollbar-color: #97a3b7 transparent;
2437
- `;const L_=d.styled(d.Stack)`
2437
+ `;const F_=d.styled(d.Stack)`
2438
2438
  display: grid;
2439
2439
  grid-template-rows: max-content 0fr;
2440
2440
  transition: grid-template-rows 300ms ease-out;
@@ -2447,7 +2447,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2447
2447
  transform: rotate(-90deg);
2448
2448
  }
2449
2449
  }
2450
- `,O_=d.styled(d.Stack)`
2450
+ `,k_=d.styled(d.Stack)`
2451
2451
  cursor: pointer;
2452
2452
  flex-flow: row nowrap;
2453
2453
  justify-content: space-between;
@@ -2460,19 +2460,19 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2460
2460
  transform-origin: center;
2461
2461
  transition: transform 300ms ease-out;
2462
2462
  }
2463
- `,F_=d.styled(d.Typography)`
2463
+ `,D_=d.styled(d.Typography)`
2464
2464
  font-size: 13px;
2465
2465
  line-height: 18px;
2466
2466
  font-weight: 400;
2467
2467
  color: #6f7c90;
2468
2468
  text-transform: capitalize;
2469
- `,k_=d.styled(d.Stack)`
2469
+ `,N_=d.styled(d.Stack)`
2470
2470
  overflow: hidden;
2471
- `,Rp=e=>A.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00483 12.5052C7.73146 12.7786 7.73146 13.2218 8.00483 13.4952C8.2782 13.7685 8.72141 13.7685 8.99478 13.4952L11.9948 10.4952C12.2681 10.2218 12.2681 9.77859 11.9948 9.50522L8.99478 6.50522C8.72141 6.23185 8.2782 6.23185 8.00483 6.50522C7.73146 6.77859 7.73146 7.2218 8.00483 7.49517L10.5099 10.0002L8.00483 12.5052Z"})),Mp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=w.useMemo(()=>fw(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const l=c.parentElement;l&&l.classList.toggle("expanded")};return t!=null&&t.length?u.jsx(A_,{children:s.map(i=>u.jsxs(L_,{className:"expanded",children:[u.jsxs(O_,{onClick:a,children:[u.jsx(F_,{variant:"body2",children:i.type}),u.jsx(Rp,{className:"toggle-arrow-icon"})]}),u.jsx(k_,{children:i.entities.map(c=>u.jsx(T_,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):u.jsx(al,{message:Rw})},D_=d.styled(d.Stack)`
2471
+ `,Mp=e=>A.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00483 12.5052C7.73146 12.7786 7.73146 13.2218 8.00483 13.4952C8.2782 13.7685 8.72141 13.7685 8.99478 13.4952L11.9948 10.4952C12.2681 10.2218 12.2681 9.77859 11.9948 9.50522L8.99478 6.50522C8.72141 6.23185 8.2782 6.23185 8.00483 6.50522C7.73146 6.77859 7.73146 7.2218 8.00483 7.49517L10.5099 10.0002L8.00483 12.5052Z"})),Pp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=w.useMemo(()=>hw(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const l=c.parentElement;l&&l.classList.toggle("expanded")};return t!=null&&t.length?u.jsx(O_,{children:s.map(i=>u.jsxs(F_,{className:"expanded",children:[u.jsxs(k_,{onClick:a,children:[u.jsx(D_,{variant:"body2",children:i.type}),u.jsx(Mp,{className:"toggle-arrow-icon"})]}),u.jsx(N_,{children:i.entities.map(c=>u.jsx(L_,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):u.jsx(sl,{message:Pw})},R_=d.styled(d.Stack)`
2472
2472
  padding: 18px 0;
2473
2473
  row-gap: 12px;
2474
2474
  box-sizing: border-box;
2475
- `,N_=d.styled(d.Stack)`
2475
+ `,M_=d.styled(d.Stack)`
2476
2476
  cursor: pointer;
2477
2477
  position: relative;
2478
2478
  z-index: 1;
@@ -2483,7 +2483,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2483
2483
  background-color: rgba(0, 0, 0, 0.04);
2484
2484
  z-index: -1;
2485
2485
  }
2486
- `,R_=({searchText:e,connectorName:t,formData:n,onClick:r})=>u.jsxs(N_,{onClick:r,children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray1,children:e}),u.jsxs(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:"12px",textTransform:"capitalize",children:[t," - ",n==null?void 0:n.searchObject]})]}),M_=({searchText:e,connectorName:t,options:n,onSearch:r})=>{const o=s=>{r({formId:s.id,searchObject:s.searchObject,searchText:e})};return u.jsx(D_,{children:n.map(s=>u.jsx(R_,{searchText:e,connectorName:t,formData:s,onClick:()=>o(s)},t+(s==null?void 0:s.searchObject)))})},P_=d.styled(d.Stack)`
2486
+ `,P_=({searchText:e,connectorName:t,formData:n,onClick:r})=>u.jsxs(M_,{onClick:r,children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray1,children:e}),u.jsxs(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:"12px",textTransform:"capitalize",children:[t," - ",n==null?void 0:n.searchObject]})]}),j_=({searchText:e,connectorName:t,options:n,onSearch:r})=>{const o=s=>{r({formId:s.id,searchObject:s.searchObject,searchText:e})};return u.jsx(R_,{children:n.map(s=>u.jsx(P_,{searchText:e,connectorName:t,formData:s,onClick:()=>o(s)},t+(s==null?void 0:s.searchObject)))})},B_=d.styled(d.Stack)`
2487
2487
  padding: 12px 12px 12px 11px;
2488
2488
  border: 1px solid ${d.theme.palette.gray.gray5};
2489
2489
  border-radius: 8px;
@@ -2497,26 +2497,26 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2497
2497
  transform: translateX(6px);
2498
2498
  }
2499
2499
  }
2500
- `,j_=d.styled(d.Stack)`
2500
+ `,V_=d.styled(d.Stack)`
2501
2501
  padding: 14px 0;
2502
2502
  row-gap: 12px;
2503
2503
  column-gap: 16px;
2504
2504
  box-sizing: border-box;
2505
- `,B_=d.styled(d.Stack)`
2505
+ `,G_=d.styled(d.Stack)`
2506
2506
  padding: 8px 0;
2507
2507
  row-gap: 12px;
2508
2508
  box-sizing: border-box;
2509
- `,V_=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(P_,{onClick:t,direction:"row",children:[u.jsx(d.Stack,{flexGrow:1,children:u.jsx(d.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),u.jsx(Rp,{})]},n)},G_=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=w.useContext(Wt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return u.jsx(al,{message:"No results found"});const c=l=>{o(l),i==null||i(Lt.email_logging_search_result_selected,{app_name:e,object_name:l.displayValue,object_key:l.entityType})};return u.jsxs(j_,{children:[u.jsxs(d.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),u.jsx(B_,{children:t.map(l=>u.jsx(V_,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},H_=d.styled(d.Stack)`
2509
+ `,H_=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(B_,{onClick:t,direction:"row",children:[u.jsx(d.Stack,{flexGrow:1,children:u.jsx(d.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),u.jsx(Mp,{})]},n)},W_=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=w.useContext(Xt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return u.jsx(sl,{message:"No results found"});const c=l=>{o(l),i==null||i(Ft.email_logging_search_result_selected,{app_name:e,object_name:l.displayValue,object_key:l.entityType})};return u.jsxs(V_,{children:[u.jsxs(d.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),u.jsx(G_,{children:t.map(l=>u.jsx(H_,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},Z_=d.styled(d.Stack)`
2510
2510
  height: 100%;
2511
2511
  row-gap: 8px;
2512
2512
  align-items: center;
2513
2513
  justify-content: center;
2514
- `,W_=d.styled(il)`
2514
+ `,X_=d.styled(al)`
2515
2515
  width: 32px;
2516
2516
  height: 32px;
2517
2517
  fill: #506dff;
2518
- animation: ${Sa} 1s linear infinite;
2519
- `,Z_=({message:e="Fetching details"})=>u.jsxs(H_,{children:[u.jsx(W_,{}),u.jsx(d.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),X_=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await Le({url:gt(p_,{conversationId:e}),method:je.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},z_=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},Ta=({conversationId:e})=>{const t=ho(),{queryKey:n,polledLogsStatus:r}=w.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=mp({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:X_,isSatisfied:z_,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return Er({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},Y_=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await Le({url:gt(y_,{conversationId:t}),data:e,method:je.POST});return n==null?void 0:n.data}catch(n){throw we({message:hn,type:ze}),console.error(n),n}},J_=({onSuccess:e})=>Yt({mutationFn:Y_,onSuccess:e}),q_=d.styled(d.Stack)`
2518
+ animation: ${Ta} 1s linear infinite;
2519
+ `,z_=({message:e="Fetching details"})=>u.jsxs(Z_,{children:[u.jsx(X_,{}),u.jsx(d.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),Y_=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await Se({url:mt(g_,{conversationId:e}),method:je.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},J_=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},Aa=({conversationId:e})=>{const t=fo(),{queryKey:n,polledLogsStatus:r}=w.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=bp({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:Y_,isSatisfied:J_,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return Wn({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},q_=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await Se({url:mt(x_,{conversationId:t}),data:e,method:je.POST});return n==null?void 0:n.data}catch(n){throw Ie({message:hn,type:ze}),console.error(n),n}},$_=({onSuccess:e})=>$t({mutationFn:q_,onSuccess:e}),Q_=d.styled(d.Stack)`
2520
2520
  padding: 12px;
2521
2521
  flex-flow: row nowrap;
2522
2522
  justify-content: flex-end;
@@ -2533,7 +2533,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2533
2533
  padding: 7px 10px;
2534
2534
  }
2535
2535
  }
2536
- `,$_=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=w.useContext(Wt),{refetch:a}=Ta({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const b=Object.values(e),p=b.map(m=>m.displayValue).join(", "),h=Array.from(new Set(b.map(m=>m==null?void 0:m.entityType)));i==null||i(Lt.email_logging_log_config_saved,{app_name:n,num_of_keys_selected:b.length,list_of_keys:p,list_of_objects:h.join(", "),num_of_objects_selected:h.length})},{mutate:l,isPending:f}=J_({onSuccess:c}),g=Object.keys(e).length>0,y=()=>{const b=Object.values(e);l({conversationId:o,payload:{selectedEntities:b,connectorId:r,autoLogEnabled:!0}})},v=()=>{t==null||t(),i==null||i(Lt.email_logging_log_config_canceled,{app_name:n})};return u.jsxs(q_,{children:[u.jsx(d.Button,{variant:"text",size:"small",onClick:v,children:"Cancel"}),u.jsxs(d.Button,{variant:"contained",size:"small",className:"primary-action",disabled:f||!g,onClick:y,children:[f?u.jsx(d.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},Q_="Tell us more (optional)",U_=d.styled(d.Box)`
2536
+ `,U_=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=w.useContext(Xt),{refetch:a}=Aa({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const b=Object.values(e),p=b.map(m=>m.displayValue).join(", "),h=Array.from(new Set(b.map(m=>m==null?void 0:m.entityType)));i==null||i(Ft.email_logging_log_config_saved,{app_name:n,num_of_keys_selected:b.length,list_of_keys:p,list_of_objects:h.join(", "),num_of_objects_selected:h.length})},{mutate:l,isPending:f}=$_({onSuccess:c}),g=Object.keys(e).length>0,y=()=>{const b=Object.values(e);l({conversationId:o,payload:{selectedEntities:b,connectorId:r,autoLogEnabled:!0}})},v=()=>{t==null||t(),i==null||i(Ft.email_logging_log_config_canceled,{app_name:n})};return u.jsxs(Q_,{children:[u.jsx(d.Button,{variant:"text",size:"small",onClick:v,children:"Cancel"}),u.jsxs(d.Button,{variant:"contained",size:"small",className:"primary-action",disabled:f||!g,onClick:y,children:[f?u.jsx(d.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},K_="Tell us more (optional)",eS=d.styled(d.Box)`
2537
2537
  width: ${({width:e})=>e||"440px"};
2538
2538
  border-radius: 12px;
2539
2539
  padding: 16px;
@@ -2546,15 +2546,15 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2546
2546
  flex-direction: row;
2547
2547
  margin-bottom: 12px;
2548
2548
  }
2549
- `,K_=d.styled(d.Box)`
2549
+ `,tS=d.styled(d.Box)`
2550
2550
  border-bottom: 1px solid ${d.theme.palette.gray.gray6};
2551
2551
  margin: 12px -16px;
2552
- `,eS=d.styled(d.Box)`
2552
+ `,nS=d.styled(d.Box)`
2553
2553
  display: flex;
2554
2554
  justify-content: flex-end;
2555
2555
  margin-top: 30px;
2556
2556
  gap: 8px;
2557
- `,tS=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=Q_})=>{const[c,l]=w.useState(""),[f,g]=w.useState(""),y=m=>{l(m.target.value)},v=m=>{m.stopPropagation();const{value:x}=(m==null?void 0:m.target)||{};g(x)},b=()=>{t({feedbackOption:c,feedbackComment:f})},p=()=>{e==null||e()},h=r?!c:!f;return u.jsxs(U_,{width:s,children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(K_,{}),r?u.jsx(d.FormControl,{children:u.jsx(d.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:y,children:a.map(m=>u.jsx(d.FormControlLabel,{value:m.value,control:u.jsx(d.Radio,{}),label:m.label},m.value))})}):null,u.jsx(sr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:v,multiline:!0,rows:5,limit:250,validation:{validate:fc()}}),u.jsxs(eS,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:p,children:"Cancel"}),u.jsx(Ep,{variant:"contained",color:"primary",isLoading:n,disabled:h,label:"Submit",onClick:b})]})]})},nS=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await Le({url:C_.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return we({message:Zw,type:$t}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),we({message:Xw,type:ze}),n}};function rS({onSuccess:e}){return Yt({mutationFn:nS,onSuccess:e})}const oS=d.styled(d.Stack)`
2557
+ `,rS=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=K_})=>{const[c,l]=w.useState(""),[f,g]=w.useState(""),y=m=>{l(m.target.value)},v=m=>{m.stopPropagation();const{value:x}=(m==null?void 0:m.target)||{};g(x)},b=()=>{t({feedbackOption:c,feedbackComment:f})},p=()=>{e==null||e()},h=r?!c:!f;return u.jsxs(eS,{width:s,children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(tS,{}),r?u.jsx(d.FormControl,{children:u.jsx(d.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:y,children:a.map(m=>u.jsx(d.FormControlLabel,{value:m.value,control:u.jsx(d.Radio,{}),label:m.label},m.value))})}):null,u.jsx(nr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:v,multiline:!0,rows:5,limit:250,validation:{validate:dc()}}),u.jsxs(nS,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:p,children:"Cancel"}),u.jsx(Ip,{variant:"contained",color:"primary",isLoading:n,disabled:h,label:"Submit",onClick:b})]})]})},oS=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await Se({url:v_.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return Ie({message:zw,type:Kt}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),Ie({message:Yw,type:ze}),n}};function sS({onSuccess:e}){return $t({mutationFn:oS,onSuccess:e})}const aS=d.styled(d.Stack)`
2558
2558
  flex-flow: row nowrap;
2559
2559
  justify-content: space-between;
2560
2560
  align-items: center;
@@ -2562,64 +2562,64 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2562
2562
  padding: 6px 12px;
2563
2563
  margin-top: auto;
2564
2564
  background-color: #f6f8fc;
2565
- `,Pp=d.styled(d.IconButton)`
2565
+ `,jp=d.styled(d.IconButton)`
2566
2566
  &:disabled {
2567
2567
  opacity: 0.4;
2568
2568
  }
2569
- `,sS=d.styled(d.Typography)`
2569
+ `,iS=d.styled(d.Typography)`
2570
2570
  color: #6f7c90;
2571
2571
  font-size: 11px;
2572
2572
  font-weight: 400;
2573
2573
  line-height: 12px;
2574
2574
  letter-spacing: 0;
2575
- `,jp=d.styled(d.Tooltip)`
2575
+ `,Bp=d.styled(d.Tooltip)`
2576
2576
  padding: 6px;
2577
2577
  border-radius: 6px;
2578
- `,aS=()=>{const{conversationId:e}=w.useContext(Wt),[t,n]=w.useState(!1),r=()=>{n(!1)},{mutate:o,isPending:s}=rS({onSuccess:r}),a=()=>{o({conversationId:e,feedbackData:{feedback_type:kp,positive_feedback:!1}})},i=()=>{n(!0)},c=({feedbackComment:l,feedbackOption:f})=>{o({conversationId:e,feedbackData:{feedback_type:kp,comment:l,option:f,positive_feedback:!1}})};return u.jsxs(oS,{children:[u.jsx(sS,{children:Ww}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"flex-end",children:[u.jsx(jp,{arrow:!0,title:Gw,placement:"top",children:u.jsx(Pp,{className:"feedback-button",size:"small",onClick:a,disabled:s,children:u.jsx(wp,{})})}),u.jsx(jp,{arrow:!0,title:Hw,placement:"top",children:u.jsx(Pp,{className:"feedback-button",size:"small",onClick:i,disabled:s,children:u.jsx(_p,{})})})]}),u.jsx(cr,{shown:t,setShown:n,borderRadius:12,sx:{zIndex:15002},children:u.jsx(tS,{onCancel:()=>n(!1),onSubmit:c,isLoading:s,title:Vw,feedbackOptions:zw,width:"440px"})})]})},iS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await Le({url:gt(h_,{conversationId:e}),method:je.GET}),n=t==null?void 0:t.data;return(n==null?void 0:n.results)??[]}catch(t){throw console.error(t),t}},cS=({conversationId:e,enabled:t=!0})=>Er({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>iS({conversationId:e}),enabled:!!e&&t}),lS=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await Le({url:gt(b_,{formId:e}),data:{search_string:n,args:{}},method:je.POST}),o=r==null?void 0:r.data;if(!o||o.errorMessage)throw new Error(o.errorMessage||"Failed to fetch search entities");return{results:o.data,searchObject:t,formId:e}}catch(r){throw we({message:hn,type:ze}),console.error(r),r}},uS=({onSuccess:e})=>Yt({mutationFn:lS,onSuccess:e}),dS=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await Le({url:gt(x_,{conversationId:t}),data:e,method:je.PATCH});return n==null?void 0:n.data}catch(n){throw we({message:hn,type:ze}),console.error(n),n}},fS=({onSuccess:e})=>Yt({mutationFn:dS,onSuccess:e}),pS=d.styled(d.Stack)`
2578
+ `,cS=()=>{const{conversationId:e}=w.useContext(Xt),[t,n]=w.useState(!1),r=()=>{n(!1)},{mutate:o,isPending:s}=sS({onSuccess:r}),a=()=>{o({conversationId:e,feedbackData:{feedback_type:Dp,positive_feedback:!1}})},i=()=>{n(!0)},c=({feedbackComment:l,feedbackOption:f})=>{o({conversationId:e,feedbackData:{feedback_type:Dp,comment:l,option:f,positive_feedback:!1}})};return u.jsxs(aS,{children:[u.jsx(iS,{children:Xw}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"flex-end",children:[u.jsx(Bp,{arrow:!0,title:Ww,placement:"top",children:u.jsx(jp,{className:"feedback-button",size:"small",onClick:a,disabled:s,children:u.jsx(_p,{})})}),u.jsx(Bp,{arrow:!0,title:Zw,placement:"top",children:u.jsx(jp,{className:"feedback-button",size:"small",onClick:i,disabled:s,children:u.jsx(Sp,{})})})]}),u.jsx(sr,{shown:t,setShown:n,borderRadius:12,sx:{zIndex:15002},children:u.jsx(rS,{onCancel:()=>n(!1),onSubmit:c,isLoading:s,title:Hw,feedbackOptions:Jw,width:"440px"})})]})},lS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await Se({url:mt(m_,{conversationId:e}),method:je.GET}),n=t==null?void 0:t.data;return(n==null?void 0:n.results)??[]}catch(t){throw console.error(t),t}},uS=({conversationId:e,enabled:t=!0})=>Wn({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>lS({conversationId:e}),enabled:!!e&&t}),dS=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await Se({url:mt(C_,{formId:e}),data:{search_string:n,args:{}},method:je.POST}),o=r==null?void 0:r.data;if(!o||o.errorMessage)throw new Error(o.errorMessage||"Failed to fetch search entities");return{results:o.data,searchObject:t,formId:e}}catch(r){throw Ie({message:hn,type:ze}),console.error(r),r}},fS=({onSuccess:e})=>$t({mutationFn:dS,onSuccess:e}),pS=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await Se({url:mt(E_,{conversationId:t}),data:e,method:je.PATCH});return n==null?void 0:n.data}catch(n){throw Ie({message:hn,type:ze}),console.error(n),n}},hS=({onSuccess:e})=>$t({mutationFn:pS,onSuccess:e}),gS=d.styled(d.Stack)`
2579
2579
  color: #343c45;
2580
2580
  height: 100%;
2581
2581
  box-sizing: border-box;
2582
- `,hS=d.styled(d.Stack)`
2582
+ `,mS=d.styled(d.Stack)`
2583
2583
  flex-flow: row nowrap;
2584
2584
  justify-content: space-between;
2585
2585
  align-items: center;
2586
2586
  column-gap: 8px;
2587
2587
  padding: 12px 16px;
2588
2588
  background-color: #f6f8fc;
2589
- `,gS=d.styled(d.Stack)`
2589
+ `,bS=d.styled(d.Stack)`
2590
2590
  flex-flow: row nowrap;
2591
2591
  justify-content: flex-start;
2592
2592
  align-items: center;
2593
2593
  column-gap: 8px;
2594
- `,mS=d.styled(d.Stack)`
2594
+ `,yS=d.styled(d.Stack)`
2595
2595
  flex-flow: row nowrap;
2596
2596
  justify-content: flex-end;
2597
2597
  align-items: center;
2598
2598
  column-gap: 6px;
2599
- `,bS=d.styled(d.Stack)`
2599
+ `,CS=d.styled(d.Stack)`
2600
2600
  padding: 4px;
2601
2601
  background-color: #ffffff;
2602
2602
  border-radius: 50%;
2603
- `,yS=d.styled("img")`
2603
+ `,xS=d.styled("img")`
2604
2604
  width: 16px;
2605
2605
  height: 16px;
2606
- `,CS=d.styled(d.Stack)`
2606
+ `,vS=d.styled(d.Stack)`
2607
2607
  flex-grow: 1;
2608
- `,Bp=d.styled(d.Stack)`
2608
+ `,Vp=d.styled(d.Stack)`
2609
2609
  flex-grow: 1;
2610
2610
  flex-basis: 0;
2611
2611
  min-height: 0;
2612
- `,Vp=d.styled(d.Stack)`
2612
+ `,Gp=d.styled(d.Stack)`
2613
2613
  padding: 0 16px;
2614
2614
  min-height: 100%;
2615
2615
  max-height: 100%;
2616
2616
  overflow-y: auto;
2617
2617
  scrollbar-width: thin;
2618
2618
  scrollbar-color: #97a3b7 transparent;
2619
- `,xS=d.styled(d.Stack)`
2619
+ `,ES=d.styled(d.Stack)`
2620
2620
  padding: 12px 16px 0;
2621
2621
  position: relative;
2622
- `,vS=d.styled(d.OutlinedInput)`
2622
+ `,IS=d.styled(d.OutlinedInput)`
2623
2623
  padding: 0;
2624
2624
  fieldset {
2625
2625
  border-radius: 4px;
@@ -2638,7 +2638,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2638
2638
  border-width: 1px !important;
2639
2639
  }
2640
2640
  }
2641
- `,ES=d.styled(d.Stack)`
2641
+ `,wS=d.styled(d.Stack)`
2642
2642
  padding: 8px 0 8px 12px;
2643
2643
  justify-content: center;
2644
2644
  align-items: center;
@@ -2647,12 +2647,12 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2647
2647
  height: 15px;
2648
2648
  fill: #4d596c;
2649
2649
  }
2650
- `,IS=e=>u.jsx(d.Switch,{disableRipple:!0,...e}),wS=d.styled(IS)(({disabled:e})=>({padding:0,width:"32px",height:"16px","& .MuiSwitch-switchBase":{padding:2,margin:0,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:e?"#d6dde8":"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:e?"#4d596c":"#506DFF"}}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:12,height:12},"& .MuiSwitch-track":{borderRadius:8}})),_S=d.styled(il)`
2650
+ `,_S=e=>u.jsx(d.Switch,{disableRipple:!0,...e}),SS=d.styled(_S)(({disabled:e})=>({padding:0,width:"32px",height:"16px","& .MuiSwitch-switchBase":{padding:2,margin:0,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:e?"#d6dde8":"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:e?"#4d596c":"#506DFF"}}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:12,height:12},"& .MuiSwitch-track":{borderRadius:8}})),TS=d.styled(al)`
2651
2651
  width: 14px;
2652
2652
  height: 14px;
2653
2653
  fill: #4d596c;
2654
- animation: ${Sa} 1s linear infinite;
2655
- `,lr=Hr.CaseView,SS=({emailLogStatus:e,close:t})=>{const{emailLogSettings:n,autoLogEnabled:r,selectedEntities:o,formList:s}=e,{connectorName:a,connectorId:i,logoUrl:c}=n??{},l=(o==null?void 0:o.length)>0,[f,g]=w.useState(""),[y,v]=w.useState([]),[b,p]=w.useState({}),{conversationId:h,connectorFunctions:m}=w.useContext(Wt),x=m==null?void 0:m.sendTrackingEvent,{data:C,isError:I,isLoading:E}=cS({conversationId:h,enabled:!l}),{refetch:_}=Ta({conversationId:h}),T=()=>{x==null||x(Lt.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:N,isIdle:k,reset:D}=uS({onSuccess:T}),{mutate:P,isPending:V}=fS({onSuccess:_}),{results:z=[],...$}=L??{},Q=w.useMemo(()=>{const R={},G=[];for(const H of y){const J=H.entityType+H.displayValue;R[J]||G.push(H),R[J]=H}for(const H of C??[]){const J=H.entityType+H.displayValue;R[J]||G.push(H),R[J]=H}return G},[C,y]),X=R=>{g(R.target.value),k||D()},q=R=>{const{entityType:G,displayValue:H}=R;p(J=>({...J,[G+H]:R})),v(J=>[R,...J]),g(""),D()},oe=()=>{x==null||x(Lt.email_logging_search_initiated,{app_name:a})},ie=()=>{P({payload:{autoLogEnabled:!r},conversationId:h});const R=r?Lt.email_logging_auto_log_disabled:Lt.email_logging_auto_log_enabled;x==null||x(R,{app_name:a})},B=E||N;return u.jsxs(pS,{children:[u.jsxs(hS,{children:[u.jsxs(gS,{children:[u.jsx(bS,{children:u.jsx(yS,{src:c,alt:"connector"})}),u.jsx(d.Typography,{children:"Sync conversation"})]}),u.jsxs(mS,{children:[V?u.jsx(_S,{}):null,l?u.jsx(d.Tooltip,{arrow:!0,title:r?Aw:Lw,children:u.jsx(d.Stack,{children:u.jsx(wS,{checked:r,value:r,onClick:ie,disabled:V})})}):null]})]}),u.jsx(CS,{children:u.jsxs(Hr,{children:[u.jsxs(lr,{condition:l,children:[u.jsx(Bp,{children:u.jsx(Vp,{children:u.jsx(Mp,{connectorName:a,entities:o,disabled:!0})})}),u.jsx(aS,{})]},"disabled-view"),u.jsxs(lr,{fallback:!0,children:[u.jsx(xS,{children:u.jsx(vS,{type:"text",name:"search",value:f,onChange:X,onFocus:oe,startAdornment:u.jsx(ES,{children:u.jsx(hp,{})}),size:"small"})}),u.jsx(Bp,{children:u.jsx(Vp,{children:u.jsxs(Hr,{children:[u.jsx(lr,{condition:B,children:u.jsx(Z_,{message:N?"Searching...":"Loading..."})},"loading"),u.jsx(lr,{condition:f===""&&Q.length>0,children:u.jsx(Mp,{connectorName:a,checkedEntities:b,setCheckedEntities:p,entities:Q??[]})},"entity-suggestions"),u.jsx(lr,{condition:!!f&&k,children:u.jsx(M_,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),u.jsx(lr,{condition:!!f&&!k,children:u.jsx(G_,{connectorName:a,results:z,...$,addEntity:q})},"search-results"),u.jsx(lr,{condition:!Q.length&&I,children:u.jsx(al,{message:hn})},"error")]})})}),f?null:u.jsx($_,{connectorName:a,connectorId:i,checkedEntities:b,close:t})]},"select-logs")]})})]})},TS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await Le({url:gt(g_,{conversationId:e}),method:je.POST});return t==null?void 0:t.data}catch(t){throw we({message:hn,type:ze}),console.error(t),t}},AS=({onSuccess:e})=>Yt({mutationFn:TS,onSuccess:e}),LS=d.styled(d.Stack)`
2654
+ animation: ${Ta} 1s linear infinite;
2655
+ `,ar=Gr.CaseView,AS=({emailLogStatus:e,close:t})=>{const{emailLogSettings:n,autoLogEnabled:r,selectedEntities:o,formList:s}=e,{connectorName:a,connectorId:i,logoUrl:c}=n??{},l=(o==null?void 0:o.length)>0,[f,g]=w.useState(""),[y,v]=w.useState([]),[b,p]=w.useState({}),{conversationId:h,connectorFunctions:m}=w.useContext(Xt),x=m==null?void 0:m.sendTrackingEvent,{data:C,isError:I,isLoading:E}=uS({conversationId:h,enabled:!l}),{refetch:_}=Aa({conversationId:h}),T=()=>{x==null||x(Ft.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:N,isIdle:k,reset:D}=fS({onSuccess:T}),{mutate:M,isPending:V}=hS({onSuccess:_}),{results:z=[],...q}=L??{},$=w.useMemo(()=>{const P={},G=[];for(const H of y){const Y=H.entityType+H.displayValue;P[Y]||G.push(H),P[Y]=H}for(const H of C??[]){const Y=H.entityType+H.displayValue;P[Y]||G.push(H),P[Y]=H}return G},[C,y]),X=P=>{g(P.target.value),k||D()},J=P=>{const{entityType:G,displayValue:H}=P;p(Y=>({...Y,[G+H]:P})),v(Y=>[P,...Y]),g(""),D()},oe=()=>{x==null||x(Ft.email_logging_search_initiated,{app_name:a})},ae=()=>{M({payload:{autoLogEnabled:!r},conversationId:h});const P=r?Ft.email_logging_auto_log_disabled:Ft.email_logging_auto_log_enabled;x==null||x(P,{app_name:a})},B=E||N;return u.jsxs(gS,{children:[u.jsxs(mS,{children:[u.jsxs(bS,{children:[u.jsx(CS,{children:u.jsx(xS,{src:c,alt:"connector"})}),u.jsx(d.Typography,{children:"Sync conversation"})]}),u.jsxs(yS,{children:[V?u.jsx(TS,{}):null,l?u.jsx(d.Tooltip,{arrow:!0,title:r?Ow:Fw,children:u.jsx(d.Stack,{children:u.jsx(SS,{checked:r,value:r,onClick:ae,disabled:V})})}):null]})]}),u.jsx(vS,{children:u.jsxs(Gr,{children:[u.jsxs(ar,{condition:l,children:[u.jsx(Vp,{children:u.jsx(Gp,{children:u.jsx(Pp,{connectorName:a,entities:o,disabled:!0})})}),u.jsx(cS,{})]},"disabled-view"),u.jsxs(ar,{fallback:!0,children:[u.jsx(ES,{children:u.jsx(IS,{type:"text",name:"search",value:f,onChange:X,onFocus:oe,startAdornment:u.jsx(wS,{children:u.jsx(gp,{})}),size:"small"})}),u.jsx(Vp,{children:u.jsx(Gp,{children:u.jsxs(Gr,{children:[u.jsx(ar,{condition:B,children:u.jsx(z_,{message:N?"Searching...":"Loading..."})},"loading"),u.jsx(ar,{condition:f===""&&$.length>0,children:u.jsx(Pp,{connectorName:a,checkedEntities:b,setCheckedEntities:p,entities:$??[]})},"entity-suggestions"),u.jsx(ar,{condition:!!f&&k,children:u.jsx(j_,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),u.jsx(ar,{condition:!!f&&!k,children:u.jsx(W_,{connectorName:a,results:z,...q,addEntity:J})},"search-results"),u.jsx(ar,{condition:!$.length&&I,children:u.jsx(sl,{message:hn})},"error")]})})}),f?null:u.jsx(U_,{connectorName:a,connectorId:i,checkedEntities:b,close:t})]},"select-logs")]})})]})},LS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await Se({url:mt(b_,{conversationId:e}),method:je.POST});return t==null?void 0:t.data}catch(t){throw Ie({message:hn,type:ze}),console.error(t),t}},OS=({onSuccess:e})=>$t({mutationFn:LS,onSuccess:e}),FS=d.styled(d.Stack)`
2656
2656
  border-radius: 100px;
2657
2657
  background: #f6f8fc;
2658
2658
  flex-flow: row nowrap;
@@ -2661,7 +2661,7 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2661
2661
  padding: 8px;
2662
2662
  width: fit-content;
2663
2663
  cursor: pointer;
2664
- `,OS=d.styled(d.Button)`
2664
+ `,kS=d.styled(d.Button)`
2665
2665
  padding: 0;
2666
2666
  background: none;
2667
2667
  border: none;
@@ -2670,4 +2670,4 @@ Do you want to continue?`,gx="Select an object to create",mx="Select an object t
2670
2670
  line-height: 14px;
2671
2671
  color: #506dff;
2672
2672
  margin-left: 6px;
2673
- `,FS=[ve.PENDING,ve.LOGGED,ve.NOT_LOGGED,ve.PAUSED],kS=[ve.LOGGED,ve.PAUSED],DS=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=w.useContext(Wt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=Ta({conversationId:r}),{mutate:i,isPending:c}=AS({onSuccess:a}),l=vw[e],f=ww[e],g=Iw[e],{emailLogSettings:y,messageLogStatus:v}=t,{connectorName:b}=y??{},{logged:p,total:h}=v??{},m=kS.includes(e)&&h?` (${p}/${h})`:"",x=e===ve.ERROR,C=FS.includes(e),I=({close:_})=>u.jsx(SS,{close:_,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Lt.email_logging_failed_clicked,{app_name:b})};return u.jsx(d_,{logSettings:y,status:e,isAdmin:n,retry:x,renderEntities:C?I:void 0,children:u.jsxs(LS,{style:{cursor:C?"pointer":"not-allowed"},children:[l,g?g(`${f} ${m}`):null,x?u.jsx(OS,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},cl=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=pw(e);return Re.createPortal(u.jsx(DS,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},NS=({observer:e})=>{var v;const[t,n]=w.useState({}),[r,o]=w.useState({}),[s,a]=w.useState({}),{conversationId:i}=w.useContext(Wt),{data:c}=Ta({conversationId:i}),l=(v=c==null?void 0:c.emailLogSettings)==null?void 0:v.enabled,f=b=>{n(p=>({...p,...b}))},g=b=>{o(p=>({...p,...b}))},y=b=>{a(b)};return w.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:g,setSubjectButtonContainers:y}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?u.jsxs(u.Fragment,{children:[Object.entries(t).map(([b,p])=>u.jsx(cl,{emailLogStatus:c,containerElement:p.element,messageId:p.messageId,legacyMessageId:p.legacyMessageId},b)),Object.entries(r).map(([b,p])=>u.jsx(cl,{emailLogStatus:c,containerElement:p.element},b)),Object.entries(s).map(([b,p])=>u.jsx(cl,{emailLogStatus:c,containerElement:p.element},b))]}):null},RS=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=w.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return u.jsx(Wt.Provider,{value:o,children:r})},MS=({children:e,...t})=>u.jsx($i,{store:Uc,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(Qc,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:u.jsx(RS,{...t,children:e})})})})}),Aa=".hiver-log-crm-button",La=".hiver-log-crm-compose-button",Gp=".hiver-log-crm-subject-button";class PS{constructor({emailNodeFilter:t,composeNodeFilter:n,emailHeaderTargetSelector:r=".gE.iv.gt .c2",composeHeaderTargetSelector:o=".aoD.hl .bgW",emailMessageContainerSelector:s=".adn.ads",subjectContainer:a=null,disableAutoLogInEmail:i=!1,disableAutoLogInCompose:c=!1,disableAutoLogInSubject:l=!1}={}){De(this,"observer",null);De(this,"setComposeButtonContainers",null);De(this,"setEmailButtonContainers",null);De(this,"setSubjectButtonContainers",null);De(this,"emailNodeFilter");De(this,"composeNodeFilter");De(this,"emailHeaderTargetSelector");De(this,"composeHeaderTargetSelector");De(this,"emailMessageContainerSelector");De(this,"disableAutoLogInEmail");De(this,"disableAutoLogInCompose");De(this,"disableAutoLogInSubject");De(this,"subjectContainer",null);De(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(Aa).forEach(r=>r.remove());const n=document.querySelectorAll(this.emailMessageContainerSelector);n.length&&n.forEach(r=>{var c;const o=r.querySelector(this.emailHeaderTargetSelector),s=r.getAttribute("data-message-id")||null,a=r.getAttribute("data-legacy-message-id")||null;if(o!=null&&o.querySelector(Aa))return;const i=document.createElement("div");i.classList.add(Aa.slice(1)),i.style.display="inline-block",i.style.marginLeft="8px",o==null||o.appendChild(i),(c=this.setEmailButtonContainers)==null||c.call(this,{[s??""]:{element:i,messageId:s,legacyMessageId:a}})})});De(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(La).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(La))return;const s=document.createElement("div");s.classList.add(La.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});De(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(Gp);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(Gp.slice(1)),n.style.display="inline-block",(o=this.subjectContainer)==null||o.appendChild(n),(s=this.setSubjectButtonContainers)==null||s.call(this,{crm_subject:{element:n}})});this.emailNodeFilter=t||this._defaultEmailNodeFilter,this.composeNodeFilter=n||this._defaultComposeNodeFilter,this.emailHeaderTargetSelector=r,this.composeHeaderTargetSelector=o,this.emailMessageContainerSelector=s,this.subjectContainer=a,this.disableAutoLogInEmail=i,this.disableAutoLogInCompose=c,this.disableAutoLogInSubject=l}_defaultEmailNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("a3s")||(r=t.classList)!=null&&r.contains("ii")||typeof t.querySelector=="function"&&t.querySelector(".a3s")))}_defaultComposeNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("hiver-new-email-top-div")||(r=t.classList)!=null&&r.contains("hiver-compose-bar")))}_initMutationObserver(){this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let n=!1,r=!1;t.forEach(o=>{if(o.type==="childList"){const s=Array.from(o.addedNodes);this.disableAutoLogInEmail||s.some(this.emailNodeFilter)&&(n=!0),this.disableAutoLogInCompose||s.some(this.composeNodeFilter)&&(r=!0)}}),n&&setTimeout(()=>this._addLogButtonsOnEmail(),100),r&&setTimeout(()=>this._addLogButtonsOnCompose(),100)}),this.observer.observe(document.body,{childList:!0,subtree:!0})}_init(){this._addLogButtonsOnEmail(),this._addLogButtonsOnCompose(),this._addLogButtonOnSubject()}observe({setComposeButtonContainers:t,setEmailButtonContainers:n,setSubjectButtonContainers:r}){this.setComposeButtonContainers=t,this.setEmailButtonContainers=n,this.setSubjectButtonContainers=r,this._init(),(!this.disableAutoLogInEmail||!this.disableAutoLogInCompose)&&this._initMutationObserver()}destroy(){document.querySelectorAll(Aa).forEach(r=>r.remove()),document.querySelectorAll(La).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const jS=({observer:e,...t})=>u.jsx(Kc,{children:u.jsxs(MS,{...t,children:[u.jsx(NS,{observer:e}),Re.createPortal(u.jsx(el,{id:"toast-message",children:u.jsx(Xa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),BS=e=>Le({url:G8,method:je.POST,data:e});ue.ActionQueue=dw,ue.CONNECTORS_AGENT_EVENTS=$c,ue.ConnectorCardList=vI,ue.EmailLogger=jS,ue.GmailLogObserver=PS,ue.HiverConnectorBifrostAuth=Le,ue.IntegrationSense=lw,ue.addNewConnectors=dh,ue.dismissNotification=lu,ue.fetchAppCfValues=BS,ue.getConnectorsBifrostConfigs=Bt,ue.getMetaData=Fy,ue.initConnectorsBifrost=Pm,ue.setCaptureFeedbackOnDemand=fh,ue.shouldCaptureFeedback=fi,ue.shouldShowNotification=cu,ue.useConnectorSelectedEmail=eI,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});
2673
+ `,DS=[ve.PENDING,ve.LOGGED,ve.NOT_LOGGED,ve.PAUSED],NS=[ve.LOGGED,ve.PAUSED],RS=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=w.useContext(Xt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=Aa({conversationId:r}),{mutate:i,isPending:c}=OS({onSuccess:a}),l=Iw[e],f=Sw[e],g=_w[e],{emailLogSettings:y,messageLogStatus:v}=t,{connectorName:b}=y??{},{logged:p,total:h}=v??{},m=NS.includes(e)&&h?` (${p}/${h})`:"",x=e===ve.ERROR,C=DS.includes(e),I=({close:_})=>u.jsx(AS,{close:_,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Ft.email_logging_failed_clicked,{app_name:b})};return u.jsx(p_,{logSettings:y,status:e,isAdmin:n,retry:x,renderEntities:C?I:void 0,children:u.jsxs(FS,{style:{cursor:C?"pointer":"not-allowed"},children:[l,g?g(`${f} ${m}`):null,x?u.jsx(kS,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},il=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=gw(e);return Re.createPortal(u.jsx(RS,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},MS=({observer:e})=>{var v;const[t,n]=w.useState({}),[r,o]=w.useState({}),[s,a]=w.useState({}),{conversationId:i}=w.useContext(Xt),{data:c}=Aa({conversationId:i}),l=(v=c==null?void 0:c.emailLogSettings)==null?void 0:v.enabled,f=b=>{n(p=>({...p,...b}))},g=b=>{o(p=>({...p,...b}))},y=b=>{a(b)};return w.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:g,setSubjectButtonContainers:y}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?u.jsxs(u.Fragment,{children:[Object.entries(t).map(([b,p])=>u.jsx(il,{emailLogStatus:c,containerElement:p.element,messageId:p.messageId,legacyMessageId:p.legacyMessageId},b)),Object.entries(r).map(([b,p])=>u.jsx(il,{emailLogStatus:c,containerElement:p.element},b)),Object.entries(s).map(([b,p])=>u.jsx(il,{emailLogStatus:c,containerElement:p.element},b))]}):null},PS=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=w.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return u.jsx(Xt.Provider,{value:o,children:r})},jS=({children:e,...t})=>u.jsx(qi,{store:Qc,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx($c,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:u.jsx(PS,{...t,children:e})})})})}),La=".hiver-log-crm-button",Oa=".hiver-log-crm-compose-button",Hp=".hiver-log-crm-subject-button";class BS{constructor({emailNodeFilter:t,composeNodeFilter:n,emailHeaderTargetSelector:r=".gE.iv.gt .c2",composeHeaderTargetSelector:o=".aoD.hl .bgW",emailMessageContainerSelector:s=".adn.ads",subjectContainer:a=null,disableAutoLogInEmail:i=!1,disableAutoLogInCompose:c=!1,disableAutoLogInSubject:l=!1}={}){De(this,"observer",null);De(this,"setComposeButtonContainers",null);De(this,"setEmailButtonContainers",null);De(this,"setSubjectButtonContainers",null);De(this,"emailNodeFilter");De(this,"composeNodeFilter");De(this,"emailHeaderTargetSelector");De(this,"composeHeaderTargetSelector");De(this,"emailMessageContainerSelector");De(this,"disableAutoLogInEmail");De(this,"disableAutoLogInCompose");De(this,"disableAutoLogInSubject");De(this,"subjectContainer",null);De(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(La).forEach(r=>r.remove());const n=document.querySelectorAll(this.emailMessageContainerSelector);n.length&&n.forEach(r=>{var c;const o=r.querySelector(this.emailHeaderTargetSelector),s=r.getAttribute("data-message-id")||null,a=r.getAttribute("data-legacy-message-id")||null;if(o!=null&&o.querySelector(La))return;const i=document.createElement("div");i.classList.add(La.slice(1)),i.style.display="inline-block",i.style.marginLeft="8px",o==null||o.appendChild(i),(c=this.setEmailButtonContainers)==null||c.call(this,{[s??""]:{element:i,messageId:s,legacyMessageId:a}})})});De(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Oa).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Oa))return;const s=document.createElement("div");s.classList.add(Oa.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});De(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(Hp);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(Hp.slice(1)),n.style.display="inline-block",(o=this.subjectContainer)==null||o.appendChild(n),(s=this.setSubjectButtonContainers)==null||s.call(this,{crm_subject:{element:n}})});this.emailNodeFilter=t||this._defaultEmailNodeFilter,this.composeNodeFilter=n||this._defaultComposeNodeFilter,this.emailHeaderTargetSelector=r,this.composeHeaderTargetSelector=o,this.emailMessageContainerSelector=s,this.subjectContainer=a,this.disableAutoLogInEmail=i,this.disableAutoLogInCompose=c,this.disableAutoLogInSubject=l}_defaultEmailNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("a3s")||(r=t.classList)!=null&&r.contains("ii")||typeof t.querySelector=="function"&&t.querySelector(".a3s")))}_defaultComposeNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("hiver-new-email-top-div")||(r=t.classList)!=null&&r.contains("hiver-compose-bar")))}_initMutationObserver(){this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let n=!1,r=!1;t.forEach(o=>{if(o.type==="childList"){const s=Array.from(o.addedNodes);this.disableAutoLogInEmail||s.some(this.emailNodeFilter)&&(n=!0),this.disableAutoLogInCompose||s.some(this.composeNodeFilter)&&(r=!0)}}),n&&setTimeout(()=>this._addLogButtonsOnEmail(),100),r&&setTimeout(()=>this._addLogButtonsOnCompose(),100)}),this.observer.observe(document.body,{childList:!0,subtree:!0})}_init(){this._addLogButtonsOnEmail(),this._addLogButtonsOnCompose(),this._addLogButtonOnSubject()}observe({setComposeButtonContainers:t,setEmailButtonContainers:n,setSubjectButtonContainers:r}){this.setComposeButtonContainers=t,this.setEmailButtonContainers=n,this.setSubjectButtonContainers=r,this._init(),(!this.disableAutoLogInEmail||!this.disableAutoLogInCompose)&&this._initMutationObserver()}destroy(){document.querySelectorAll(La).forEach(r=>r.remove()),document.querySelectorAll(Oa).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const VS=({observer:e,...t})=>u.jsx(Uc,{children:u.jsxs(jS,{...t,children:[u.jsx(MS,{observer:e}),Re.createPortal(u.jsx(Kc,{id:"toast-message",children:u.jsx(Za,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),GS=e=>Se({url:W8,method:je.POST,data:e});ue.ActionQueue=pw,ue.CONNECTORS_AGENT_EVENTS=qc,ue.ConnectorCardList=II,ue.EmailLogger=VS,ue.GmailLogObserver=BS,ue.HiverConnectorBifrostAuth=Se,ue.IntegrationSense=dw,ue.addNewConnectors=fh,ue.dismissNotification=lu,ue.fetchAppCfValues=GS,ue.getConnectorsBifrostConfigs=Gt,ue.getMetaData=Fy,ue.initConnectorsBifrost=jm,ue.setCaptureFeedbackOnDemand=ph,ue.shouldCaptureFeedback=di,ue.shouldShowNotification=cu,ue.useConnectorSelectedEmail=nI,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});