@hiver/connector-agent 4.9.0-splitApps-beta.5 → 4.9.0-splitApps-beta.7

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(ie,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):(ie=typeof globalThis<"u"?globalThis:ie||self,w(ie["@hiver/connector-agent"]={},ie.React,ie.ReactDOM,ie.hiverUiKit))})(this,function(ie,w,Ne,d){"use strict";var tA=Object.defineProperty;var s2=ie=>{throw TypeError(ie)};var nA=(ie,w,Ne)=>w in ie?tA(ie,w,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):ie[w]=Ne;var ke=(ie,w,Ne)=>nA(ie,typeof w!="symbol"?w+"":w,Ne),yl=(ie,w,Ne)=>w.has(ie)||s2("Cannot "+Ne);var F=(ie,w,Ne)=>(yl(ie,w,"read from private field"),Ne?Ne.call(ie):w.get(ie)),le=(ie,w,Ne)=>w.has(ie)?s2("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(ie):w.set(ie,Ne),U=(ie,w,Ne,d)=>(yl(ie,w,"write to private field"),d?d.call(ie,Ne):w.set(ie,Ne),Ne),be=(ie,w,Ne)=>(yl(ie,w,"access private method"),Ne);var Va=(ie,w,Ne,d)=>({set _(Ha){U(ie,w,Ha,Ne)},get _(){return F(ie,w,d)}});var mr,Pn,eo,qp,to,jn,no,$p,br,Qp,ro,oo,Rt,yr,at,Uo,Cr,$t,An,Up,un,Kp,dn,ut,xr,fn,qn,e2,xn,Qt,Ko,t2,Xe,Bn,Vn,so,ao,Gn,io,co,n2,bt,Ce,es,dt,vr,lo,Hn,pn,ts,uo,fo,Er,Ir,Wn,po,De,os,Cl,xl,vl,El,Il,wl,_l,a2,r2,Zn,Xn,yt,vn,En,Ga,Sl,o2;function Ha(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 T=Ha(w);var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Wa={exports:{}},yo={};/**
1
+ (function(ie,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):(ie=typeof globalThis<"u"?globalThis:ie||self,w(ie["@hiver/connector-agent"]={},ie.React,ie.ReactDOM,ie.hiverUiKit))})(this,function(ie,w,Ne,d){"use strict";var tA=Object.defineProperty;var o2=ie=>{throw TypeError(ie)};var nA=(ie,w,Ne)=>w in ie?tA(ie,w,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):ie[w]=Ne;var ke=(ie,w,Ne)=>nA(ie,typeof w!="symbol"?w+"":w,Ne),yl=(ie,w,Ne)=>w.has(ie)||o2("Cannot "+Ne);var F=(ie,w,Ne)=>(yl(ie,w,"read from private field"),Ne?Ne.call(ie):w.get(ie)),le=(ie,w,Ne)=>w.has(ie)?o2("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(ie):w.set(ie,Ne),U=(ie,w,Ne,d)=>(yl(ie,w,"write to private field"),d?d.call(ie,Ne):w.set(ie,Ne),Ne),be=(ie,w,Ne)=>(yl(ie,w,"access private method"),Ne);var Va=(ie,w,Ne,d)=>({set _(Ha){U(ie,w,Ha,Ne)},get _(){return F(ie,w,d)}});var mr,Pn,eo,Jp,to,jn,no,qp,br,$p,ro,oo,Rt,yr,at,Uo,Cr,$t,An,Qp,un,Up,dn,ut,xr,fn,qn,Kp,xn,Qt,Ko,e2,Xe,Bn,Vn,so,ao,Gn,io,co,t2,bt,Ce,es,dt,vr,lo,Hn,pn,ts,uo,fo,Er,Ir,Wn,po,De,os,Cl,xl,vl,El,Il,wl,_l,s2,n2,Zn,Xn,yt,vn,En,Ga,Sl,r2;function Ha(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 T=Ha(w);var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Wa={exports:{}},yo={};/**
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 Al;function i2(){if(Al)return yo;Al=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,m={},y=null,x=null;l!==void 0&&(y=""+l),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(x=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(m[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)m[f]===void 0&&(m[f]=c[f]);return{$$typeof:t,type:i,key:y,ref:x,props:m,_owner:o.current}}return yo.Fragment=n,yo.jsx=a,yo.jsxs=a,yo}var Co={};/**
9
+ */var Al;function a2(){if(Al)return yo;Al=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,b={},y=null,x=null;l!==void 0&&(y=""+l),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(x=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(b[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)b[f]===void 0&&(b[f]=c[f]);return{$$typeof:t,type:i,key:y,ref:x,props:b,_owner:o.current}}return yo.Fragment=n,yo.jsx=a,yo.jsxs=a,yo}var Co={};/**
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 Tl;function c2(){return Tl||(Tl=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"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),b=Symbol.iterator,h="@@iterator";function p(O){if(O===null||typeof O!="object")return null;var Z=b&&O[b]||O[h];return typeof Z=="function"?Z:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(O){{for(var Z=arguments.length,Q=new Array(Z>1?Z-1:0),fe=1;fe<Z;fe++)Q[fe-1]=arguments[fe];v("error",O,Q)}}function v(O,Z,Q){{var fe=g.ReactDebugCurrentFrame,Ie=fe.getStackAddendum();Ie!==""&&(Z+="%s",Q=Q.concat([Ie]));var te=Q.map(function(re){return String(re)});te.unshift("Warning: "+Z),Function.prototype.apply.call(console[O],console,te)}}var I=!1,E=!1,_=!1,A=!1,S=!1,L;L=Symbol.for("react.module.reference");function k(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||A||O===x||I||E||_||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===m||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function D(O,Z,Q){var fe=O.displayName;if(fe)return fe;var Ie=Z.displayName||Z.name||"";return Ie!==""?Q+"("+Ie+")":Q}function N(O){return O.displayName||"Context"}function P(O){if(O==null)return null;if(typeof O.tag=="number"&&C("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 Z=O;return N(Z)+".Consumer";case a:var Q=O;return N(Q._context)+".Provider";case c:return D(O,O.render,"ForwardRef");case m:var fe=O.displayName||null;return fe!==null?fe:P(O.type)||"Memo";case y:{var Ie=O,te=Ie._payload,re=Ie._init;try{return P(re(te))}catch{return null}}}return null}var B=Object.assign,Y=0,$,H,X,q,se,de,V;function W(){}W.__reactDisabledLog=!0;function M(){{if(Y===0){$=console.log,H=console.info,X=console.warn,q=console.error,se=console.group,de=console.groupCollapsed,V=console.groupEnd;var O={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}Y++}}function G(){{if(Y--,Y===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},O,{value:$}),info:B({},O,{value:H}),warn:B({},O,{value:X}),error:B({},O,{value:q}),group:B({},O,{value:se}),groupCollapsed:B({},O,{value:de}),groupEnd:B({},O,{value:V})})}Y<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=g.ReactCurrentDispatcher,ne;function ae(O,Z,Q){{if(ne===void 0)try{throw Error()}catch(Ie){var fe=Ie.stack.trim().match(/\n( *(at )?)/);ne=fe&&fe[1]||""}return`
17
+ */var Tl;function i2(){return Tl||(Tl=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"),b=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function p(O){if(O===null||typeof O!="object")return null;var Z=m&&O[m]||O[h];return typeof Z=="function"?Z:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(O){{for(var Z=arguments.length,Q=new Array(Z>1?Z-1:0),fe=1;fe<Z;fe++)Q[fe-1]=arguments[fe];v("error",O,Q)}}function v(O,Z,Q){{var fe=g.ReactDebugCurrentFrame,Ie=fe.getStackAddendum();Ie!==""&&(Z+="%s",Q=Q.concat([Ie]));var te=Q.map(function(re){return String(re)});te.unshift("Warning: "+Z),Function.prototype.apply.call(console[O],console,te)}}var I=!1,E=!1,_=!1,A=!1,S=!1,L;L=Symbol.for("react.module.reference");function k(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||A||O===x||I||E||_||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===b||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function D(O,Z,Q){var fe=O.displayName;if(fe)return fe;var Ie=Z.displayName||Z.name||"";return Ie!==""?Q+"("+Ie+")":Q}function N(O){return O.displayName||"Context"}function P(O){if(O==null)return null;if(typeof O.tag=="number"&&C("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 Z=O;return N(Z)+".Consumer";case a:var Q=O;return N(Q._context)+".Provider";case c:return D(O,O.render,"ForwardRef");case b:var fe=O.displayName||null;return fe!==null?fe:P(O.type)||"Memo";case y:{var Ie=O,te=Ie._payload,re=Ie._init;try{return P(re(te))}catch{return null}}}return null}var B=Object.assign,Y=0,$,H,X,q,se,de,V;function W(){}W.__reactDisabledLog=!0;function M(){{if(Y===0){$=console.log,H=console.info,X=console.warn,q=console.error,se=console.group,de=console.groupCollapsed,V=console.groupEnd;var O={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}Y++}}function G(){{if(Y--,Y===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},O,{value:$}),info:B({},O,{value:H}),warn:B({},O,{value:X}),error:B({},O,{value:q}),group:B({},O,{value:se}),groupCollapsed:B({},O,{value:de}),groupEnd:B({},O,{value:V})})}Y<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var z=g.ReactCurrentDispatcher,ne;function ae(O,Z,Q){{if(ne===void 0)try{throw Error()}catch(Ie){var fe=Ie.stack.trim().match(/\n( *(at )?)/);ne=fe&&fe[1]||""}return`
18
18
  `+ne+O}}var j=!1,ee;{var ve=typeof WeakMap=="function"?WeakMap:Map;ee=new ve}function J(O,Z){if(!O||j)return"";{var Q=ee.get(O);if(Q!==void 0)return Q}var fe;j=!0;var Ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var te;te=z.current,z.current=null,M();try{if(Z){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(It){fe=It}Reflect.construct(O,[],re)}else{try{re.call()}catch(It){fe=It}O.call(re.prototype)}}else{try{throw Error()}catch(It){fe=It}O()}}catch(It){if(It&&fe&&typeof It.stack=="string"){for(var pe=It.stack.split(`
19
19
  `),He=fe.stack.split(`
20
20
  `),Ye=pe.length-1,Ue=He.length-1;Ye>=1&&Ue>=0&&pe[Ye]!==He[Ue];)Ue--;for(;Ye>=1&&Ue>=0;Ye--,Ue--)if(pe[Ye]!==He[Ue]){if(Ye!==1||Ue!==1)do if(Ye--,Ue--,Ue<0||pe[Ye]!==He[Ue]){var Vt=`
21
- `+pe[Ye].replace(" at new "," at ");return O.displayName&&Vt.includes("<anonymous>")&&(Vt=Vt.replace("<anonymous>",O.displayName)),typeof O=="function"&&ee.set(O,Vt),Vt}while(Ye>=1&&Ue>=0);break}}}finally{j=!1,z.current=te,G(),Error.prepareStackTrace=Ie}var bo=O?O.displayName||O.name:"",Lr=bo?ae(bo):"";return typeof O=="function"&&ee.set(O,Lr),Lr}function Pe(O,Z,Q){return J(O,!1)}function je(O){var Z=O.prototype;return!!(Z&&Z.isReactComponent)}function ze(O,Z,Q){if(O==null)return"";if(typeof O=="function")return J(O,je(O));if(typeof O=="string")return ae(O);switch(O){case l:return ae("Suspense");case f:return ae("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Pe(O.render);case m:return ze(O.type,Z,Q);case y:{var fe=O,Ie=fe._payload,te=fe._init;try{return ze(te(Ie),Z,Q)}catch{}}}return""}var Mt=Object.prototype.hasOwnProperty,In={},Ct=g.ReactDebugCurrentFrame;function Ge(O){if(O){var Z=O._owner,Q=ze(O.type,O._source,Z?Z.type:null);Ct.setExtraStackFrame(Q)}else Ct.setExtraStackFrame(null)}function Qe(O,Z,Q,fe,Ie){{var te=Function.call.bind(Mt);for(var re in O)if(te(O,re)){var pe=void 0;try{if(typeof O[re]!="function"){var He=Error((fe||"React class")+": "+Q+" type `"+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[re]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw He.name="Invariant Violation",He}pe=O[re](Z,re,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ye){pe=Ye}pe&&!(pe instanceof Error)&&(Ge(Ie),C("%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).",fe||"React class",Q,re,typeof pe),Ge(null)),pe instanceof Error&&!(pe.message in In)&&(In[pe.message]=!0,Ge(Ie),C("Failed %s type: %s",Q,pe.message),Ge(null))}}}var wn=Array.isArray;function Pt(O){return wn(O)}function xt(O){{var Z=typeof Symbol=="function"&&Symbol.toStringTag,Q=Z&&O[Symbol.toStringTag]||O.constructor.name||"Object";return Q}}function wr(O){try{return zn(O),!1}catch{return!0}}function zn(O){return""+O}function jt(O){if(wr(O))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xt(O)),zn(O)}var _n=g.ReactCurrentOwner,ho={key:!0,ref:!0,__self:!0,__source:!0},Yn,_r,Sr;Sr={};function Jn(O){if(Mt.call(O,"ref")){var Z=Object.getOwnPropertyDescriptor(O,"ref").get;if(Z&&Z.isReactWarning)return!1}return O.ref!==void 0}function go(O){if(Mt.call(O,"key")){var Z=Object.getOwnPropertyDescriptor(O,"key").get;if(Z&&Z.isReactWarning)return!1}return O.key!==void 0}function he(O,Z){if(typeof O.ref=="string"&&_n.current&&Z&&_n.current.stateNode!==Z){var Q=P(_n.current.type);Sr[Q]||(C('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(_n.current.type),O.ref),Sr[Q]=!0)}}function Ee(O,Z){{var Q=function(){Yn||(Yn=!0,C("%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)",Z))};Q.isReactWarning=!0,Object.defineProperty(O,"key",{get:Q,configurable:!0})}}function et(O,Z){{var Q=function(){_r||(_r=!0,C("%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)",Z))};Q.isReactWarning=!0,Object.defineProperty(O,"ref",{get:Q,configurable:!0})}}var it=function(O,Z,Q,fe,Ie,te,re){var pe={$$typeof:t,type:O,key:Z,ref:Q,props:re,_owner:te};return pe._store={},Object.defineProperty(pe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(pe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(pe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(pe.props),Object.freeze(pe)),pe};function vt(O,Z,Q,fe,Ie){{var te,re={},pe=null,He=null;Q!==void 0&&(jt(Q),pe=""+Q),go(Z)&&(jt(Z.key),pe=""+Z.key),Jn(Z)&&(He=Z.ref,he(Z,Ie));for(te in Z)Mt.call(Z,te)&&!ho.hasOwnProperty(te)&&(re[te]=Z[te]);if(O&&O.defaultProps){var Ye=O.defaultProps;for(te in Ye)re[te]===void 0&&(re[te]=Ye[te])}if(pe||He){var Ue=typeof O=="function"?O.displayName||O.name||"Unknown":O;pe&&Ee(re,Ue),He&&et(re,Ue)}return it(O,pe,He,Ie,fe,_n.current,re)}}var Ut=g.ReactCurrentOwner,Kt=g.ReactDebugCurrentFrame;function Et(O){if(O){var Z=O._owner,Q=ze(O.type,O._source,Z?Z.type:null);Kt.setExtraStackFrame(Q)}else Kt.setExtraStackFrame(null)}var Bt;Bt=!1;function Ar(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function mo(){{if(Ut.current){var O=P(Ut.current.type);if(O)return`
21
+ `+pe[Ye].replace(" at new "," at ");return O.displayName&&Vt.includes("<anonymous>")&&(Vt=Vt.replace("<anonymous>",O.displayName)),typeof O=="function"&&ee.set(O,Vt),Vt}while(Ye>=1&&Ue>=0);break}}}finally{j=!1,z.current=te,G(),Error.prepareStackTrace=Ie}var bo=O?O.displayName||O.name:"",Lr=bo?ae(bo):"";return typeof O=="function"&&ee.set(O,Lr),Lr}function Pe(O,Z,Q){return J(O,!1)}function je(O){var Z=O.prototype;return!!(Z&&Z.isReactComponent)}function ze(O,Z,Q){if(O==null)return"";if(typeof O=="function")return J(O,je(O));if(typeof O=="string")return ae(O);switch(O){case l:return ae("Suspense");case f:return ae("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Pe(O.render);case b:return ze(O.type,Z,Q);case y:{var fe=O,Ie=fe._payload,te=fe._init;try{return ze(te(Ie),Z,Q)}catch{}}}return""}var Mt=Object.prototype.hasOwnProperty,In={},Ct=g.ReactDebugCurrentFrame;function Ge(O){if(O){var Z=O._owner,Q=ze(O.type,O._source,Z?Z.type:null);Ct.setExtraStackFrame(Q)}else Ct.setExtraStackFrame(null)}function Qe(O,Z,Q,fe,Ie){{var te=Function.call.bind(Mt);for(var re in O)if(te(O,re)){var pe=void 0;try{if(typeof O[re]!="function"){var He=Error((fe||"React class")+": "+Q+" type `"+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[re]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw He.name="Invariant Violation",He}pe=O[re](Z,re,fe,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ye){pe=Ye}pe&&!(pe instanceof Error)&&(Ge(Ie),C("%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).",fe||"React class",Q,re,typeof pe),Ge(null)),pe instanceof Error&&!(pe.message in In)&&(In[pe.message]=!0,Ge(Ie),C("Failed %s type: %s",Q,pe.message),Ge(null))}}}var wn=Array.isArray;function Pt(O){return wn(O)}function xt(O){{var Z=typeof Symbol=="function"&&Symbol.toStringTag,Q=Z&&O[Symbol.toStringTag]||O.constructor.name||"Object";return Q}}function wr(O){try{return zn(O),!1}catch{return!0}}function zn(O){return""+O}function jt(O){if(wr(O))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xt(O)),zn(O)}var _n=g.ReactCurrentOwner,ho={key:!0,ref:!0,__self:!0,__source:!0},Yn,_r,Sr;Sr={};function Jn(O){if(Mt.call(O,"ref")){var Z=Object.getOwnPropertyDescriptor(O,"ref").get;if(Z&&Z.isReactWarning)return!1}return O.ref!==void 0}function go(O){if(Mt.call(O,"key")){var Z=Object.getOwnPropertyDescriptor(O,"key").get;if(Z&&Z.isReactWarning)return!1}return O.key!==void 0}function he(O,Z){if(typeof O.ref=="string"&&_n.current&&Z&&_n.current.stateNode!==Z){var Q=P(_n.current.type);Sr[Q]||(C('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(_n.current.type),O.ref),Sr[Q]=!0)}}function Ee(O,Z){{var Q=function(){Yn||(Yn=!0,C("%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)",Z))};Q.isReactWarning=!0,Object.defineProperty(O,"key",{get:Q,configurable:!0})}}function et(O,Z){{var Q=function(){_r||(_r=!0,C("%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)",Z))};Q.isReactWarning=!0,Object.defineProperty(O,"ref",{get:Q,configurable:!0})}}var it=function(O,Z,Q,fe,Ie,te,re){var pe={$$typeof:t,type:O,key:Z,ref:Q,props:re,_owner:te};return pe._store={},Object.defineProperty(pe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(pe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.defineProperty(pe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(pe.props),Object.freeze(pe)),pe};function vt(O,Z,Q,fe,Ie){{var te,re={},pe=null,He=null;Q!==void 0&&(jt(Q),pe=""+Q),go(Z)&&(jt(Z.key),pe=""+Z.key),Jn(Z)&&(He=Z.ref,he(Z,Ie));for(te in Z)Mt.call(Z,te)&&!ho.hasOwnProperty(te)&&(re[te]=Z[te]);if(O&&O.defaultProps){var Ye=O.defaultProps;for(te in Ye)re[te]===void 0&&(re[te]=Ye[te])}if(pe||He){var Ue=typeof O=="function"?O.displayName||O.name||"Unknown":O;pe&&Ee(re,Ue),He&&et(re,Ue)}return it(O,pe,He,Ie,fe,_n.current,re)}}var Ut=g.ReactCurrentOwner,Kt=g.ReactDebugCurrentFrame;function Et(O){if(O){var Z=O._owner,Q=ze(O.type,O._source,Z?Z.type:null);Kt.setExtraStackFrame(Q)}else Kt.setExtraStackFrame(null)}var Bt;Bt=!1;function Ar(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function mo(){{if(Ut.current){var O=P(Ut.current.type);if(O)return`
22
22
 
23
23
  Check the render method of \``+O+"`."}return""}}function Tr(O){return""}var Sn={};function hn(O){{var Z=mo();if(!Z){var Q=typeof O=="string"?O:O.displayName||O.name;Q&&(Z=`
24
24
 
25
- Check the top-level render call using <`+Q+">.")}return Z}}function Ra(O,Z){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=hn(Z);if(Sn[Q])return;Sn[Q]=!0;var fe="";O&&O._owner&&O._owner!==Ut.current&&(fe=" It was passed a child from "+P(O._owner.type)+"."),Et(O),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Et(null)}}function ns(O,Z){{if(typeof O!="object")return;if(Pt(O))for(var Q=0;Q<O.length;Q++){var fe=O[Q];Ar(fe)&&Ra(fe,Z)}else if(Ar(O))O._store&&(O._store.validated=!0);else if(O){var Ie=p(O);if(typeof Ie=="function"&&Ie!==O.entries)for(var te=Ie.call(O),re;!(re=te.next()).done;)Ar(re.value)&&Ra(re.value,Z)}}}function hl(O){{var Z=O.type;if(Z==null||typeof Z=="string")return;var Q;if(typeof Z=="function")Q=Z.propTypes;else if(typeof Z=="object"&&(Z.$$typeof===c||Z.$$typeof===m))Q=Z.propTypes;else return;if(Q){var fe=P(Z);Qe(Q,O.props,"prop",fe,O)}else if(Z.PropTypes!==void 0&&!Bt){Bt=!0;var Ie=P(Z);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof Z.getDefaultProps=="function"&&!Z.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ma(O){{for(var Z=Object.keys(O.props),Q=0;Q<Z.length;Q++){var fe=Z[Q];if(fe!=="children"&&fe!=="key"){Et(O),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Et(null);break}}O.ref!==null&&(Et(O),C("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}var Pa={};function rs(O,Z,Q,fe,Ie,te){{var re=k(O);if(!re){var pe="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(pe+=" 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 He=Tr();He?pe+=He:pe+=mo();var Ye;O===null?Ye="null":Pt(O)?Ye="array":O!==void 0&&O.$$typeof===t?(Ye="<"+(P(O.type)||"Unknown")+" />",pe=" Did you accidentally export a JSX literal instead of a component?"):Ye=typeof O,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ye,pe)}var Ue=vt(O,Z,Q,Ie,te);if(Ue==null)return Ue;if(re){var Vt=Z.children;if(Vt!==void 0)if(fe)if(Pt(Vt)){for(var bo=0;bo<Vt.length;bo++)ns(Vt[bo],O);Object.freeze&&Object.freeze(Vt)}else C("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 ns(Vt,O)}if(Mt.call(Z,"key")){var Lr=P(O),It=Object.keys(Z).filter(function(eA){return eA!=="key"}),bl=It.length>0?"{key: someKey, "+It.join(": ..., ")+": ...}":"{key: someKey}";if(!Pa[Lr+bl]){var KS=It.length>0?"{"+It.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+Q+">.")}return Z}}function Ra(O,Z){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=hn(Z);if(Sn[Q])return;Sn[Q]=!0;var fe="";O&&O._owner&&O._owner!==Ut.current&&(fe=" It was passed a child from "+P(O._owner.type)+"."),Et(O),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,fe),Et(null)}}function ns(O,Z){{if(typeof O!="object")return;if(Pt(O))for(var Q=0;Q<O.length;Q++){var fe=O[Q];Ar(fe)&&Ra(fe,Z)}else if(Ar(O))O._store&&(O._store.validated=!0);else if(O){var Ie=p(O);if(typeof Ie=="function"&&Ie!==O.entries)for(var te=Ie.call(O),re;!(re=te.next()).done;)Ar(re.value)&&Ra(re.value,Z)}}}function hl(O){{var Z=O.type;if(Z==null||typeof Z=="string")return;var Q;if(typeof Z=="function")Q=Z.propTypes;else if(typeof Z=="object"&&(Z.$$typeof===c||Z.$$typeof===b))Q=Z.propTypes;else return;if(Q){var fe=P(Z);Qe(Q,O.props,"prop",fe,O)}else if(Z.PropTypes!==void 0&&!Bt){Bt=!0;var Ie=P(Z);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof Z.getDefaultProps=="function"&&!Z.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ma(O){{for(var Z=Object.keys(O.props),Q=0;Q<Z.length;Q++){var fe=Z[Q];if(fe!=="children"&&fe!=="key"){Et(O),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",fe),Et(null);break}}O.ref!==null&&(Et(O),C("Invalid attribute `ref` supplied to `React.Fragment`."),Et(null))}}var Pa={};function rs(O,Z,Q,fe,Ie,te){{var re=k(O);if(!re){var pe="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(pe+=" 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 He=Tr();He?pe+=He:pe+=mo();var Ye;O===null?Ye="null":Pt(O)?Ye="array":O!==void 0&&O.$$typeof===t?(Ye="<"+(P(O.type)||"Unknown")+" />",pe=" Did you accidentally export a JSX literal instead of a component?"):Ye=typeof O,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ye,pe)}var Ue=vt(O,Z,Q,Ie,te);if(Ue==null)return Ue;if(re){var Vt=Z.children;if(Vt!==void 0)if(fe)if(Pt(Vt)){for(var bo=0;bo<Vt.length;bo++)ns(Vt[bo],O);Object.freeze&&Object.freeze(Vt)}else C("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 ns(Vt,O)}if(Mt.call(Z,"key")){var Lr=P(O),It=Object.keys(Z).filter(function(eA){return eA!=="key"}),bl=It.length>0?"{key: someKey, "+It.join(": ..., ")+": ...}":"{key: someKey}";if(!Pa[Lr+bl]){var KS=It.length>0?"{"+It.join(": ..., ")+": ...}":"{}";C(`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} />`,bl,Lr,KS,Lr),Pa[Lr+bl]=!0}}return O===r?Ma(Ue):hl(Ue),Ue}}function ja(O,Z,Q){return rs(O,Z,Q,!0)}function gl(O,Z,Q){return rs(O,Z,Q,!1)}var Ba=gl,ml=ja;Co.Fragment=r,Co.jsx=Ba,Co.jsxs=ml}()),Co}process.env.NODE_ENV==="production"?Wa.exports=i2():Wa.exports=c2();var u=Wa.exports;function Ll(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=Ll(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Tn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ll(e))&&(r&&(r+=" "),r+=t);return r}const xo=e=>typeof e=="number"&&!isNaN(e),$n=e=>typeof e=="string",wt=e=>typeof e=="function",as=e=>$n(e)||wt(e)?e:null,Za=e=>w.isValidElement(e)||$n(e)||wt(e)||xo(e);function l2(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 is(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:m,isIn:y,playToast:x}=a;const b=r?`${t}--${c}`:t,h=r?`${n}--${c}`:n,p=w.useRef(0);return w.useLayoutEffect(()=>{const g=m.current,C=b.split(" "),v=I=>{I.target===m.current&&(x(),g.removeEventListener("animationend",v),g.removeEventListener("animationcancel",v),p.current===0&&I.type!=="animationcancel"&&g.classList.remove(...C))};g.classList.add(...C),g.addEventListener("animationend",v),g.addEventListener("animationcancel",v)},[]),w.useEffect(()=>{const g=m.current,C=()=>{g.removeEventListener("animationend",C),o?l2(g,f,s):f()};y||(l?C():(p.current=1,g.className+=` ${h}`,g.addEventListener("animationend",C)))},[y]),w.createElement(w.Fragment,null,i)}}function Ol(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 vo=[];const Xa=new Set,u2=e=>Xa.forEach(t=>t(e)),Fl=()=>ct.size>0;function Dl(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 kl(e,t){Za(e)&&(Fl()||vo.push({content:e,options:t}),ct.forEach(n=>{n.buildToast(e,t)}))}function Nl(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 d2(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,m,y){let x=1,b=0,h=[],p=[],g=[],C=m;const v=new Map,I=new Set,E=()=>{g=Array.from(v.values()),I.forEach(S=>S())},_=S=>{p=S==null?[]:p.filter(L=>L!==S),E()},A=S=>{const{toastId:L,onOpen:k,updateId:D,children:N}=S.props,P=D==null;S.staleId&&v.delete(S.staleId),v.set(L,S),p=[...p,S.props.toastId].filter(B=>B!==S.staleId),E(),y(Ol(S,P?"added":"updated")),P&&wt(k)&&k(w.isValidElement(N)&&N.props)};return{id:f,props:C,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{v.forEach(k=>{L!=null&&L!==k.props.toastId||wt(k.toggle)&&k.toggle(S)})},removeToast:_,toasts:v,clearQueue:()=>{b-=h.length,h=[]},buildToast:(S,L)=>{if((V=>{let{containerId:W,toastId:M,updateId:G}=V;const z=W?W!==f:f!==1,ne=v.has(M)&&G==null;return z||ne})(L))return;const{toastId:k,updateId:D,data:N,staleId:P,delay:B}=L,Y=()=>{_(k)},$=D==null;$&&b++;const H={...C,style:C.toastStyle,key:x++,...Object.fromEntries(Object.entries(L).filter(V=>{let[W,M]=V;return M!=null})),toastId:k,updateId:D,data:N,closeToast:Y,isIn:!1,className:as(L.className||C.toastClassName),bodyClassName:as(L.bodyClassName||C.bodyClassName),progressClassName:as(L.progressClassName||C.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,q=C.autoClose,X===!1||xo(X)&&X>0?X:q),deleteToast(){const V=v.get(k),{onClose:W,children:M}=V.props;wt(W)&&W(w.isValidElement(M)&&M.props),y(Ol(V,"removed")),v.delete(k),b--,b<0&&(b=0),h.length>0?A(h.shift()):E()}};var X,q;H.closeButton=C.closeButton,L.closeButton===!1||Za(L.closeButton)?H.closeButton=L.closeButton:L.closeButton===!0&&(H.closeButton=!Za(C.closeButton)||C.closeButton);let se=S;w.isValidElement(S)&&!$n(S.type)?se=w.cloneElement(S,{closeToast:Y,toastProps:H,data:N}):wt(S)&&(se=S({closeToast:Y,toastProps:H,data:N}));const de={content:se,props:H,staleId:P};C.limit&&C.limit>0&&b>C.limit&&$?h.push(de):xo(B)?setTimeout(()=>{A(de)},B):A(de)},setProps(S){C=S},setToggle:(S,L)=>{v.get(S).toggle=L},isToastActive:S=>p.some(L=>L===S),getSnapshot:()=>C.newestOnTop?g.reverse():g}}(a,s,u2);ct.set(a,c);const l=c.observe(i);return vo.forEach(f=>kl(f.content,f.options)),vo=[],()=>{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:Dl,count:o==null?void 0:o.length}}function f2(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:m}=e;var y,x;function b(){n(!0)}function h(){n(!1)}function p(v){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&h(),a.delta=e.draggableDirection==="x"?v.clientX-a.start:v.clientY-a.start,a.start!==v.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 g(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",g);const v=s.current;if(a.canDrag&&a.didMove&&v){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();v.style.transition="transform 0.2s, opacity 0.2s",v.style.removeProperty("transform"),v.style.removeProperty("opacity")}}(x=ct.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||x.setToggle(y.id,y.fn),w.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",b),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",b),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);const C={onPointerDown:function(v){if(e.draggable===!0||e.draggable===v.pointerType){a.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",g);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=v.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=v.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(v){const{top:I,bottom:E,left:_,right:A}=s.current.getBoundingClientRect();v.nativeEvent.type!=="touchend"&&e.pauseOnHover&&v.clientX>=_&&v.clientX<=A&&v.clientY>=I&&v.clientY<=E?h():b()}};return i&&c&&(C.onMouseEnter=h,e.stacked||(C.onMouseLeave=b)),m&&(C.onClick=v=>{f&&f(v),a.canCloseOnClick&&l()}),{playToast:b,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:C}}function p2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:m,theme:y}=e;const x=s||c&&l===0,b={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(b.transform=`scaleX(${l})`);const h=Tn("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}),p=wt(a)?a({rtl:f,type:o,defaultClassName:h}):Tn(h,a),g={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{m&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer",className:p,style:b,...g}))}let h2=1;const Rl=()=>""+h2++;function g2(e){return e&&($n(e.toastId)||xo(e.toastId))?e.toastId:Rl()}function Eo(e,t){return kl(e,t),t.toastId}function cs(e,t){return{...t,type:t&&t.type||e,toastId:g2(t)}}function ls(e){return(t,n)=>Eo(t,cs(e,n))}function Le(e,t){return Eo(e,cs("default",t))}Le.loading=(e,t)=>Eo(e,cs("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=$n(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,m,y)=>{if(m==null)return void Le.dismiss(r);const x={type:f,...i,...n,data:y},b=$n(m)?{render:m}:m;return r?Le.update(r,{...x,...b}):Le(b.render,{...x,...b}),y},l=wt(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},Le.success=ls("success"),Le.info=ls("info"),Le.error=ls("error"),Le.warning=ls("warning"),Le.warn=Le.warning,Le.dark=(e,t)=>Eo(e,cs("default",{theme:"dark",...t})),Le.dismiss=function(e){(function(t){var n;if(Fl()){if(t==null||$n(n=t)||xo(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 vo=vo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Le.clearWaitingQueue=function(e){e===void 0&&(e={}),ct.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Le.isActive=Dl,Le.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:Rl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,Eo(a,s)}},Le.done=e=>{Le.update(e,{progress:1})},Le.onChange=function(e){return Xa.add(e),()=>{Xa.delete(e)}},Le.play=e=>Nl(!0,e),Le.pause=e=>Nl(!1,e);const m2=typeof window<"u"?w.useLayoutEffect:w.useEffect,us=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(us,{...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(us,{...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(us,{...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(us,{...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"})}},b2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=f2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:m,closeToast:y,transition:x,position:b,className:h,style:p,bodyClassName:g,bodyStyle:C,progressClassName:v,progressStyle:I,updateId:E,role:_,progress:A,rtl:S,toastId:L,deleteToast:k,isIn:D,isLoading:N,closeOnClick:P,theme:B}=e,Y=Tn("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":P}),$=wt(h)?h({rtl:S,position:b,type:f,defaultClassName:Y}):Tn(Y,h),H=function(de){let{theme:V,type:W,isLoading:M,icon:G}=de,z=null;const ne={theme:V,type:W};return G===!1||(wt(G)?z=G({...ne,isLoading:M}):w.isValidElement(G)?z=w.cloneElement(G,ne):M?z=za.spinner():(ae=>ae in za)(W)&&(z=za[W](ne))),z}(e),X=!!A||!c,q={closeToast:y,type:f,theme:B};let se=null;return a===!1||(se=wt(a)?a(q):w.isValidElement(a)?w.cloneElement(a,q):function(de){let{closeToast:V,theme:W,ariaLabel:M="close"}=de;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${W}`,type:"button",onClick:G=>{G.stopPropagation(),V(G)},"aria-label":M},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(x,{isIn:D,done:k,position:b,preventExitTransition:n,nodeRef:r,playToast:s},w.createElement("div",{id:L,onClick:l,"data-in":D,className:$,...o,style:p,ref:r},w.createElement("div",{...D&&{role:_},className:wt(g)?g({type:f}):Tn("Toastify__toast-body",g),style:C},H!=null&&w.createElement("div",{className:Tn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},H),w.createElement("div",null,i)),se,w.createElement(p2,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:B,delay:c,isRunning:t,isIn:D,closeToast:y,hide:m,type:f,style:I,className:v,controlledProgress:X,progress:A||0})))},ds=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},y2=is(ds("bounce",!0));is(ds("slide",!0)),is(ds("zoom")),is(ds("flip"));const C2={position:"top-right",transition:y2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Ya(e){let t={...C2,...e};const n=e.stacked,[r,o]=w.useState(!0),s=w.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=d2(t),{className:l,style:f,rtl:m,containerId:y}=t;function x(h){const p=Tn("Toastify__toast-container",`Toastify__toast-container--${h}`,{"Toastify__toast-container--rtl":m});return wt(l)?l({position:h,rtl:m,defaultClassName:p}):Tn(p,as(l))}function b(){n&&(o(!0),Le.play())}return m2(()=>{if(n){var h;const p=s.current.querySelectorAll('[data-in="true"]'),g=12,C=(h=t.position)==null?void 0:h.includes("top");let v=0,I=0;Array.from(p).reverse().forEach((E,_)=>{const A=E;A.classList.add("Toastify__toast--stacked"),_>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=C?"top":"bot");const S=v*(r?.2:1)+(r?0:g*_);A.style.setProperty("--y",`${C?S:-1*S}px`),A.style.setProperty("--g",`${g}`),A.style.setProperty("--s",""+(1-(r?I:0))),v+=A.offsetHeight,I+=.025})}},[r,c,n]),w.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),Le.pause())},onMouseLeave:b},a((h,p)=>{const g=p.length?{...f}:{...f,pointerEvents:"none"};return w.createElement("div",{className:x(h),style:g,key:`container-${h}`},p.map(C=>{let{content:v,props:I}=C;return w.createElement(b2,{...I,stacked:n,collapseAll:b,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},v)}))}))}var Or=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(){}},Qn=typeof window>"u"||"Deno"in globalThis;function Dt(){}function x2(e,t){return typeof e=="function"?e(t):e}function Ja(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ml(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fr(e,t){return typeof e=="function"?e(t):e}function Gt(e,t){return typeof e=="function"?e(t):e}function Pl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==qa(a,t.options))return!1}else if(!Io(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 jl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Un(t.options.mutationKey)!==Un(s))return!1}else if(!Io(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function qa(e,t){return((t==null?void 0:t.queryKeyHashFn)||Un)(e)}function Un(e){return JSON.stringify(e,(t,n)=>Qa(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Io(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Io(e[n],t[n])):!1}function $a(e,t){if(e===t)return e;const n=Bl(e)&&Bl(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]=$a(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function fs(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 Bl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qa(e){if(!Vl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Vl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vl(e){return Object.prototype.toString.call(e)==="[object Object]"}function v2(e){return new Promise(t=>{setTimeout(t,e)})}function Ua(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 $a(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 $a(e,t)}return t}function E2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function I2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ps=Symbol();function Gl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ps&&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===ps?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var w2=(qp=class extends Or{constructor(){super();le(this,mr);le(this,Pn);le(this,eo);U(this,eo,t=>{if(!Qn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Pn)||this.setEventListener(F(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Pn))==null||t.call(this),U(this,Pn,void 0))}setEventListener(t){var n;U(this,eo,t),(n=F(this,Pn))==null||n.call(this),U(this,Pn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,mr)!==t&&(U(this,mr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,mr)=="boolean"?F(this,mr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},mr=new WeakMap,Pn=new WeakMap,eo=new WeakMap,qp),Ka=new w2,_2=($p=class extends Or{constructor(){super();le(this,to,!0);le(this,jn);le(this,no);U(this,no,t=>{if(!Qn&&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,jn)||this.setEventListener(F(this,no))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,jn))==null||t.call(this),U(this,jn,void 0))}setEventListener(t){var n;U(this,no,t),(n=F(this,jn))==null||n.call(this),U(this,jn,t(this.setOnline.bind(this)))}setOnline(t){F(this,to)!==t&&(U(this,to,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,to)}},to=new WeakMap,jn=new WeakMap,no=new WeakMap,$p),hs=new _2;function ei(){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 S2(e){return Math.min(1e3*2**e,3e4)}function Hl(e){return(e??"online")==="online"?hs.isOnline():!0}var Wl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ti(e){return e instanceof Wl}function Zl(e){let t=!1,n=0,r=!1,o;const s=ei(),a=h=>{var p;r||(y(new Wl(h)),(p=e.abort)==null||p.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>Ka.isFocused()&&(e.networkMode==="always"||hs.isOnline())&&e.canRun(),f=()=>Hl(e.networkMode)&&e.canRun(),m=h=>{var p;r||(r=!0,(p=e.onSuccess)==null||p.call(e,h),o==null||o(),s.resolve(h))},y=h=>{var p;r||(r=!0,(p=e.onError)==null||p.call(e,h),o==null||o(),s.reject(h))},x=()=>new Promise(h=>{var p;o=g=>{(r||l())&&h(g)},(p=e.onPause)==null||p.call(e)}).then(()=>{var h;o=void 0,r||(h=e.onContinue)==null||h.call(e)}),b=()=>{if(r)return;let h;const p=n===0?e.initialPromise:void 0;try{h=p??e.fn()}catch(g){h=Promise.reject(g)}Promise.resolve(h).then(m).catch(g=>{var _;if(r)return;const C=e.retry??(Qn?0:3),v=e.retryDelay??S2,I=typeof v=="function"?v(n,g):v,E=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,g);if(t||!E){y(g);return}n++,(_=e.onFail)==null||_.call(e,n,g),v2(I).then(()=>l()?void 0:x()).then(()=>{t?y(g):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?b():x().then(b),s)}}function A2(){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 Ke=A2(),Xl=(Qp=class{constructor(){le(this,br)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ja(this.gcTime)&&U(this,br,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qn?1/0:5*60*1e3))}clearGcTimeout(){F(this,br)&&(clearTimeout(F(this,br)),U(this,br,void 0))}},br=new WeakMap,Qp),T2=(Up=class extends Xl{constructor(t){super();le(this,$t);le(this,ro);le(this,oo);le(this,Rt);le(this,yr);le(this,at);le(this,Uo);le(this,Cr);U(this,Cr,!1),U(this,Uo,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,yr,t.client),U(this,Rt,F(this,yr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,ro,L2(this.options)),this.state=t.state??F(this,ro),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,at))==null?void 0:t.promise}setOptions(t){this.options={...F(this,Uo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Rt).remove(this)}setData(t,n){const r=Ua(this.state.data,t,this.options);return be(this,$t,An).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,$t,An).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,at))==null?void 0:r.promise;return(o=F(this,at))==null||o.cancel(t),n?n.then(Dt).catch(Dt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,ro))}isActive(){return this.observers.some(t=>Gt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ps||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||!Ml(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,at))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,at))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Rt).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,at)&&(F(this,Cr)?F(this,at).cancel({revert:!0}):F(this,at).cancelRetry()),this.scheduleGc()),F(this,Rt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,$t,An).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,at))return F(this,at).continueRetry(),F(this,at).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(y=>y.options.queryFn);m&&this.setOptions(m.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=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(U(this,Cr,!0),r.signal)})},s=()=>{const m=Gl(this.options,n),y={client:F(this,yr),queryKey:this.queryKey,meta:this.meta};return o(y),U(this,Cr,!1),this.options.persister?this.options.persister(m,y,this):m(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,yr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),U(this,oo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&be(this,$t,An).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=m=>{var y,x,b,h;ti(m)&&m.silent||be(this,$t,An).call(this,{type:"error",error:m}),ti(m)||((x=(y=F(this,Rt).config).onError)==null||x.call(y,m,this),(h=(b=F(this,Rt).config).onSettled)==null||h.call(b,this.state.data,m,this)),this.scheduleGc()};return U(this,at,Zl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:m=>{var y,x,b,h;if(m===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(m)}catch(p){i(p);return}(x=(y=F(this,Rt).config).onSuccess)==null||x.call(y,m,this),(h=(b=F(this,Rt).config).onSettled)==null||h.call(b,m,this.state.error,this),this.scheduleGc()},onError:i,onFail:(m,y)=>{be(this,$t,An).call(this,{type:"failed",failureCount:m,error:y})},onPause:()=>{be(this,$t,An).call(this,{type:"pause"})},onContinue:()=>{be(this,$t,An).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,at).start()}},ro=new WeakMap,oo=new WeakMap,Rt=new WeakMap,yr=new WeakMap,at=new WeakMap,Uo=new WeakMap,Cr=new WeakMap,$t=new WeakSet,An=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,...zl(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 ti(o)&&o.revert&&F(this,oo)?{...F(this,oo),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),Ke.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Rt).notify({query:this,type:"updated",action:t})})},Up);function zl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function L2(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 O2=(Kp=class extends Or{constructor(t={}){super();le(this,un);this.config=t,U(this,un,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??qa(o,n);let a=this.get(s);return a||(a=new T2({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,un).has(t.queryHash)||(F(this,un).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,un).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,un).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,un).get(t)}getAll(){return[...F(this,un).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Pl(t,r)):n}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},un=new WeakMap,Kp),F2=(e2=class extends Xl{constructor(t){super();le(this,fn);le(this,dn);le(this,ut);le(this,xr);this.mutationId=t.mutationId,U(this,ut,t.mutationCache),U(this,dn,[]),this.state=t.state||Yl(),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,dn).includes(t)||(F(this,dn).push(t),this.clearGcTimeout(),F(this,ut).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,dn,F(this,dn).filter(n=>n!==t)),this.scheduleGc(),F(this,ut).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,dn).length||(this.state.status==="pending"?this.scheduleGc():F(this,ut).remove(this))}continue(){var t;return((t=F(this,xr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,m,y,x,b,h,p,g,C,v,I,E,_,A;U(this,xr,Zl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{be(this,fn,qn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{be(this,fn,qn).call(this,{type:"pause"})},onContinue:()=>{be(this,fn,qn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ut).canRun(this)}));const n=this.state.status==="pending",r=!F(this,xr).canStart();try{if(!n){be(this,fn,qn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,ut).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,fn,qn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,xr).start();return await((l=(c=F(this,ut).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,S,t,this.state.context)),await((x=(y=F(this,ut).config).onSettled)==null?void 0:x.call(y,S,null,this.state.variables,this.state.context,this)),await((h=(b=this.options).onSettled)==null?void 0:h.call(b,S,null,t,this.state.context)),be(this,fn,qn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((g=(p=F(this,ut).config).onError)==null?void 0:g.call(p,S,t,this.state.context,this)),await((v=(C=this.options).onError)==null?void 0:v.call(C,S,t,this.state.context)),await((E=(I=F(this,ut).config).onSettled)==null?void 0:E.call(I,void 0,S,this.state.variables,this.state.context,this)),await((A=(_=this.options).onSettled)==null?void 0:A.call(_,void 0,S,t,this.state.context)),S}finally{be(this,fn,qn).call(this,{type:"error",error:S})}}finally{F(this,ut).runNext(this)}}},dn=new WeakMap,ut=new WeakMap,xr=new WeakMap,fn=new WeakSet,qn=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),Ke.batch(()=>{F(this,dn).forEach(r=>{r.onMutationUpdate(t)}),F(this,ut).notify({mutation:this,type:"updated",action:t})})},e2);function Yl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var D2=(t2=class extends Or{constructor(t={}){super();le(this,xn);le(this,Qt);le(this,Ko);this.config=t,U(this,xn,new Set),U(this,Qt,new Map),U(this,Ko,0)}build(t,n,r){const o=new F2({mutationCache:this,mutationId:++Va(this,Ko)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,xn).add(t);const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).get(n);r?r.push(t):F(this,Qt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,xn).delete(t)){const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).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,Qt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).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=gs(t);if(typeof n=="string"){const o=(r=F(this,Qt).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(){Ke.batch(()=>{F(this,xn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,xn).clear(),F(this,Qt).clear()})}getAll(){return Array.from(F(this,xn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jl(n,r))}findAll(t={}){return this.getAll().filter(n=>jl(t,n))}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ke.batch(()=>Promise.all(t.map(n=>n.continue().catch(Dt))))}},xn=new WeakMap,Qt=new WeakMap,Ko=new WeakMap,t2);function gs(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Jl(e){return{onFetch:(t,n)=>{var f,m,y,x,b;const r=t.options,o=(y=(m=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:m.fetchMore)==null?void 0:y.direction,s=((x=t.state.data)==null?void 0:x.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let h=!1;const p=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},g=Gl(t.options,t.fetchOptions),C=async(v,I,E)=>{if(h)return Promise.reject();if(I==null&&v.pages.length)return Promise.resolve(v);const _={client:t.client,queryKey:t.queryKey,pageParam:I,direction:E?"backward":"forward",meta:t.options.meta};p(_);const A=await g(_),{maxPages:S}=t.options,L=E?I2:E2;return{pages:L(v.pages,A,S),pageParams:L(v.pageParams,I,S)}};if(o&&s.length){const v=o==="backward",I=v?k2:ql,E={pages:s,pageParams:a},_=I(r,E);i=await C(E,_,v)}else{const v=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:ql(r,i);if(c>0&&I==null)break;i=await C(i,I),c++}while(c<v)}return i};t.options.persister?t.fetchFn=()=>{var h,p;return(p=(h=t.options).persister)==null?void 0:p.call(h,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function ql(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 k2(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 N2=(n2=class{constructor(e={}){le(this,Xe);le(this,Bn);le(this,Vn);le(this,so);le(this,ao);le(this,Gn);le(this,io);le(this,co);U(this,Xe,e.queryCache||new O2),U(this,Bn,e.mutationCache||new D2),U(this,Vn,e.defaultOptions||{}),U(this,so,new Map),U(this,ao,new Map),U(this,Gn,0)}mount(){Va(this,Gn)._++,F(this,Gn)===1&&(U(this,io,Ka.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Xe).onFocus())})),U(this,co,hs.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Xe).onOnline())})))}unmount(){var e,t;Va(this,Gn)._--,F(this,Gn)===0&&((e=F(this,io))==null||e.call(this),U(this,io,void 0),(t=F(this,co))==null||t.call(this),U(this,co,void 0))}isFetching(e){return F(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,Bn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Xe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Xe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Fr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Xe).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,Xe).get(r.queryHash),s=o==null?void 0:o.state.data,a=x2(t,s);if(a!==void 0)return F(this,Xe).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ke.batch(()=>F(this,Xe).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,Xe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Xe);Ke.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Xe);return Ke.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ke.batch(()=>F(this,Xe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Dt).catch(Dt)}invalidateQueries(e,t={}){return Ke.batch(()=>(F(this,Xe).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=Ke.batch(()=>F(this,Xe).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Dt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Dt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Xe).build(this,t);return n.isStaleByTime(Fr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Dt).catch(Dt)}fetchInfiniteQuery(e){return e.behavior=Jl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Dt).catch(Dt)}ensureInfiniteQueryData(e){return e.behavior=Jl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hs.isOnline()?F(this,Bn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Xe)}getMutationCache(){return F(this,Bn)}getDefaultOptions(){return F(this,Vn)}setDefaultOptions(e){U(this,Vn,e)}setQueryDefaults(e,t){F(this,so).set(Un(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,so).values()],n={};return t.forEach(r=>{Io(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,ao).set(Un(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,ao).values()],n={};return t.forEach(r=>{Io(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Vn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qa(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===ps&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Vn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Xe).clear(),F(this,Bn).clear()}},Xe=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,so=new WeakMap,ao=new WeakMap,Gn=new WeakMap,io=new WeakMap,co=new WeakMap,n2),R2=(r2=class extends Or{constructor(t,n){super();le(this,De);le(this,bt);le(this,Ce);le(this,es);le(this,dt);le(this,vr);le(this,lo);le(this,Hn);le(this,pn);le(this,ts);le(this,uo);le(this,fo);le(this,Er);le(this,Ir);le(this,Wn);le(this,po,new Set);this.options=n,U(this,bt,t),U(this,pn,null),U(this,Hn,ei()),this.options.experimental_prefetchInRender||F(this,Hn).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,Ce).addObserver(this),$l(F(this,Ce),this.options)?be(this,De,os).call(this):this.updateResult(),be(this,De,El).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ni(F(this,Ce),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ni(F(this,Ce),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,De,Il).call(this),be(this,De,wl).call(this),F(this,Ce).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,Ce);if(this.options=F(this,bt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gt(this.options.enabled,F(this,Ce))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,De,_l).call(this),F(this,Ce).setOptions(this.options),r._defaulted&&!fs(this.options,r)&&F(this,bt).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,Ce),observer:this});const s=this.hasListeners();s&&Ql(F(this,Ce),o,this.options,r)&&be(this,De,os).call(this),this.updateResult(n),s&&(F(this,Ce)!==o||Gt(this.options.enabled,F(this,Ce))!==Gt(r.enabled,F(this,Ce))||Fr(this.options.staleTime,F(this,Ce))!==Fr(r.staleTime,F(this,Ce)))&&be(this,De,Cl).call(this);const a=be(this,De,xl).call(this);s&&(F(this,Ce)!==o||Gt(this.options.enabled,F(this,Ce))!==Gt(r.enabled,F(this,Ce))||a!==F(this,Wn))&&be(this,De,vl).call(this,a)}getOptimisticResult(t){const n=F(this,bt).getQueryCache().build(F(this,bt),t),r=this.createResult(n,t);return P2(this,r)&&(U(this,dt,r),U(this,lo,this.options),U(this,vr,F(this,Ce).state)),r}getCurrentResult(){return F(this,dt)}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,po).add(t)}getCurrentQuery(){return F(this,Ce)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,bt).defaultQueryOptions(t),r=F(this,bt).getQueryCache().build(F(this,bt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,De,os).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,dt)))}createResult(t,n){var S;const r=F(this,Ce),o=this.options,s=F(this,dt),a=F(this,vr),i=F(this,lo),l=t!==r?t.state:F(this,es),{state:f}=t;let m={...f},y=!1,x;if(n._optimisticResults){const L=this.hasListeners(),k=!L&&$l(t,n),D=L&&Ql(t,r,n,o);(k||D)&&(m={...m,...zl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:b,errorUpdatedAt:h,status:p}=m;if(n.select&&m.data!==void 0)if(s&&m.data===(a==null?void 0:a.data)&&n.select===F(this,ts))x=F(this,uo);else try{U(this,ts,n.select),x=n.select(m.data),x=Ua(s==null?void 0:s.data,x,n),U(this,uo,x),U(this,pn,null)}catch(L){U(this,pn,L)}else x=m.data;if(n.placeholderData!==void 0&&x===void 0&&p==="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,fo))==null?void 0:S.state.data,F(this,fo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),U(this,pn,null)}catch(k){U(this,pn,k)}L!==void 0&&(p="success",x=Ua(s==null?void 0:s.data,L,n),y=!0)}F(this,pn)&&(b=F(this,pn),x=F(this,uo),h=Date.now(),p="error");const g=m.fetchStatus==="fetching",C=p==="pending",v=p==="error",I=C&&g,E=x!==void 0,A={status:p,fetchStatus:m.fetchStatus,isPending:C,isSuccess:p==="success",isError:v,isInitialLoading:I,isLoading:I,data:x,dataUpdatedAt:m.dataUpdatedAt,error:b,errorUpdatedAt:h,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>l.dataUpdateCount||m.errorUpdateCount>l.errorUpdateCount,isFetching:g,isRefetching:g&&!C,isLoadingError:v&&!E,isPaused:m.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:v&&E,isStale:ri(t,n),refetch:this.refetch,promise:F(this,Hn)};if(this.options.experimental_prefetchInRender){const L=N=>{A.status==="error"?N.reject(A.error):A.data!==void 0&&N.resolve(A.data)},k=()=>{const N=U(this,Hn,A.promise=ei());L(N)},D=F(this,Hn);switch(D.status){case"pending":t.queryHash===r.queryHash&&L(D);break;case"fulfilled":(A.status==="error"||A.data!==D.value)&&k();break;case"rejected":(A.status!=="error"||A.error!==D.reason)&&k();break}}return A}updateResult(t){const n=F(this,dt),r=this.createResult(F(this,Ce),this.options);if(U(this,vr,F(this,Ce).state),U(this,lo,this.options),F(this,vr).data!==void 0&&U(this,fo,F(this,Ce)),fs(r,n))return;U(this,dt,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,po).size)return!0;const c=new Set(i??F(this,po));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,dt)).some(l=>{const f=l;return F(this,dt)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),be(this,De,a2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,De,El).call(this)}},bt=new WeakMap,Ce=new WeakMap,es=new WeakMap,dt=new WeakMap,vr=new WeakMap,lo=new WeakMap,Hn=new WeakMap,pn=new WeakMap,ts=new WeakMap,uo=new WeakMap,fo=new WeakMap,Er=new WeakMap,Ir=new WeakMap,Wn=new WeakMap,po=new WeakMap,De=new WeakSet,os=function(t){be(this,De,_l).call(this);let n=F(this,Ce).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Dt)),n},Cl=function(){be(this,De,Il).call(this);const t=Fr(this.options.staleTime,F(this,Ce));if(Qn||F(this,dt).isStale||!Ja(t))return;const r=Ml(F(this,dt).dataUpdatedAt,t)+1;U(this,Er,setTimeout(()=>{F(this,dt).isStale||this.updateResult()},r))},xl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,Ce)):this.options.refetchInterval)??!1},vl=function(t){be(this,De,wl).call(this),U(this,Wn,t),!(Qn||Gt(this.options.enabled,F(this,Ce))===!1||!Ja(F(this,Wn))||F(this,Wn)===0)&&U(this,Ir,setInterval(()=>{(this.options.refetchIntervalInBackground||Ka.isFocused())&&be(this,De,os).call(this)},F(this,Wn)))},El=function(){be(this,De,Cl).call(this),be(this,De,vl).call(this,be(this,De,xl).call(this))},Il=function(){F(this,Er)&&(clearTimeout(F(this,Er)),U(this,Er,void 0))},wl=function(){F(this,Ir)&&(clearInterval(F(this,Ir)),U(this,Ir,void 0))},_l=function(){const t=F(this,bt).getQueryCache().build(F(this,bt),this.options);if(t===F(this,Ce))return;const n=F(this,Ce);U(this,Ce,t),U(this,es,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},a2=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,dt))}),F(this,bt).getQueryCache().notify({query:F(this,Ce),type:"observerResultsUpdated"})})},r2);function M2(e,t){return Gt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $l(e,t){return M2(e,t)||e.state.data!==void 0&&ni(e,t,t.refetchOnMount)}function ni(e,t,n){if(Gt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ri(e,t)}return!1}function Ql(e,t,n,r){return(e!==t||Gt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ri(e,n)}function ri(e,t){return Gt(t.enabled,e)!==!1&&e.isStaleByTime(Fr(t.staleTime,e))}function P2(e,t){return!fs(e.getCurrentResult(),t)}var j2=(o2=class extends Or{constructor(n,r){super();le(this,En);le(this,Zn);le(this,Xn);le(this,yt);le(this,vn);U(this,Zn,n),this.setOptions(r),this.bindMethods(),be(this,En,Ga).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,Zn).defaultMutationOptions(n),fs(this.options,r)||F(this,Zn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,yt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Un(r.mutationKey)!==Un(this.options.mutationKey)?this.reset():((o=F(this,yt))==null?void 0:o.state.status)==="pending"&&F(this,yt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,yt))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,En,Ga).call(this),be(this,En,Sl).call(this,n)}getCurrentResult(){return F(this,Xn)}reset(){var n;(n=F(this,yt))==null||n.removeObserver(this),U(this,yt,void 0),be(this,En,Ga).call(this),be(this,En,Sl).call(this)}mutate(n,r){var o;return U(this,vn,r),(o=F(this,yt))==null||o.removeObserver(this),U(this,yt,F(this,Zn).getMutationCache().build(F(this,Zn),this.options)),F(this,yt).addObserver(this),F(this,yt).execute(n)}},Zn=new WeakMap,Xn=new WeakMap,yt=new WeakMap,vn=new WeakMap,En=new WeakSet,Ga=function(){var r;const n=((r=F(this,yt))==null?void 0:r.state)??Yl();U(this,Xn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Sl=function(n){Ke.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,vn)&&this.hasListeners()){const m=F(this,Xn).variables,y=F(this,Xn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,vn)).onSuccess)==null||o.call(r,n.data,m,y),(a=(s=F(this,vn)).onSettled)==null||a.call(s,n.data,null,m,y)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,vn)).onError)==null||c.call(i,n.error,m,y),(f=(l=F(this,vn)).onSettled)==null||f.call(l,void 0,n.error,m,y))}this.listeners.forEach(m=>{m(F(this,Xn))})})},o2),Ul=T.createContext(void 0),wo=e=>{const t=T.useContext(Ul);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},B2=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Ul.Provider,{value:e,children:t})),Kl=T.createContext(!1),V2=()=>T.useContext(Kl);Kl.Provider;function G2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var H2=T.createContext(G2()),W2=()=>T.useContext(H2);function eu(e,t){return typeof e=="function"?e(...t):!!e}function oi(){}var Z2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},X2=e=>{T.useEffect(()=>{e.clearReset()},[e])},z2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||eu(n,[e.error,r])),Y2=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)))},J2=(e,t)=>e.isLoading&&e.isFetching&&!t,q2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,tu=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $2(e,t,n){var m,y,x,b,h;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=wo(),o=V2(),s=W2(),a=r.defaultQueryOptions(e);(y=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||y.call(m,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",Y2(a),Z2(a,s),X2(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(p=>{const g=f?c.subscribe(Ke.batchCalls(p)):oi;return c.updateResult(),g},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),q2(a,l))throw tu(a,c,s);if(z2({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((b=(x=r.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||b.call(x,a,l),a.experimental_prefetchInRender&&!Qn&&J2(l,o)){const p=i?tu(a,c,s):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;p==null||p.catch(oi).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Ln(e,t){return $2(e,R2)}function en(e,t){const n=wo(),[r]=T.useState(()=>new j2(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Ke.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(oi)},[r]);if(o.error&&eu(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const si=(e,t)=>t.some(n=>e instanceof n);let nu,ru;function Q2(){return nu||(nu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function U2(){return ru||(ru=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ai=new WeakMap,ii=new WeakMap,ms=new WeakMap;function K2(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(Kn(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return ms.set(t,e),t}function eh(e){if(ai.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)});ai.set(e,t)}let ci={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return ai.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Kn(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 ou(e){ci=e(ci)}function th(e){return U2().includes(e)?function(...t){return e.apply(li(this),t),Kn(this.request)}:function(...t){return Kn(e.apply(li(this),t))}}function nh(e){return typeof e=="function"?th(e):(e instanceof IDBTransaction&&eh(e),si(e,Q2())?new Proxy(e,ci):e)}function Kn(e){if(e instanceof IDBRequest)return K2(e);if(ii.has(e))return ii.get(e);const t=nh(e);return t!==e&&(ii.set(e,t),ms.set(t,e)),t}const li=e=>ms.get(e);function rh(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=Kn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Kn(a.result),c.oldVersion,c.newVersion,Kn(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 oh=["get","getKey","getAll","getAllKeys","count"],sh=["put","add","delete","clear"],ui=new Map;function su(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ui.get(t))return ui.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=sh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||oh.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 ui.set(t,s),s}ou(e=>({...e,get:(t,n,r)=>su(t,n)||e.get(t,n,r),has:(t,n)=>!!su(t,n)||e.has(t,n)}));const ah=["continue","continuePrimaryKey","advance"],au={},di=new WeakMap,iu=new WeakMap,ih={get(e,t){if(!ah.includes(t))return e[t];let n=au[t];return n||(n=au[t]=function(...r){di.set(this,iu.get(this)[t](...r))}),n}};async function*ch(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,ih);for(iu.set(n,t),ms.set(n,li(t));t;)yield n,t=await(di.get(n)||t.continue()),di.delete(n)}function cu(e,t){return t===Symbol.asyncIterator&&si(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&si(e,[IDBIndex,IDBObjectStore])}ou(e=>({...e,get(t,n,r){return cu(t,n)?ch:e.get(t,n,r)},has(t,n){return cu(t,n)||e.has(t,n)}}));const lh="connector-db",uh=1,bs={FEEDBACK:"feedback"},_o=`${bs.FEEDBACK}:data`,ys=`${bs.FEEDBACK}:last_submitted`,So=`${bs.FEEDBACK}:capture_on_demand`,Ao=`${bs.FEEDBACK}:show_notification`,dh=12*60*60*1e3,fi=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=dh:!0,lu=(e,t=!1)=>e.captureFeedback&&(fi(e.firstViewed)&&(!e.lastSubmittedFeedback||fi(e.lastSubmittedFeedback))||!!t);let er=null;const On=async()=>{try{er||(er=await rh(lh,uh,{upgrade(e){e.objectStoreNames.contains(_o)||e.createObjectStore(_o),e.objectStoreNames.contains(ys)||e.createObjectStore(ys),e.objectStoreNames.contains(So)||e.createObjectStore(So),e.objectStoreNames.contains(Ao)||e.createObjectStore(Ao)},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."),er&&(er.close(),er=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),er=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return er},pi=async e=>{if(!e)return[];const t=await On();if(!t)return[];try{return await t.get(_o,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},fh=async e=>{if(!e)return null;const t=await On();if(!t)return null;try{return await t.get(ys,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Cs=async e=>{if(!e)return;const t=await On();if(t)try{return await t.get(So,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},ph=async e=>{if(!e)return!1;const t=await On();if(!t)return!1;try{return await t.get(Ao,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},hh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await On();if(n)try{const r=await pi(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(_o,a,e),await n.put(Ao,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},gh=async e=>{if(!e)return;const t=await On();if(t)try{const n=await pi(e),r=await Cs(e),o=new Date,s=n.map(a=>{const i=lu(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(_o,s,e),await t.put(ys,o,e),r&&await t.put(So,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},uu=async(e,t)=>{if(!e)return;const n=await On();if(n)try{await n.put(So,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},mh=async e=>{if(!e)return;const t=await On();if(t)try{await t.put(Ao,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},bh=async e=>{const t=await pi(e),n=await Cs(e);return t.filter(o=>lu(o,n))},hi=async e=>{const t=await fh(e);return t&&!fi(t)?!1:await Cs(e)&&!t?!0:!!(await bh(e)).length},yh=async(e,t)=>{await hh(e,t)},xs=async e=>{e&&await gh(e)},Ch=async(e,t)=>{const n=await Cs(e);t?n!==!1&&await uu(e,t):await uu(e,void 0)},du=async e=>await ph(e)&&await hi(e),fu=async e=>{await mh(e)};var gi={},tr={};function pu(e,t){return function(){return e.apply(t,arguments)}}const{toString:xh}=Object.prototype,{getPrototypeOf:mi}=Object,vs=(e=>t=>{const n=xh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=e=>(e=e.toLowerCase(),t=>vs(t)===e),Es=e=>t=>typeof t===e,{isArray:Dr}=Array,To=Es("undefined");function vh(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&_t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hu=Ht("ArrayBuffer");function Eh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hu(e.buffer),t}const Ih=Es("string"),_t=Es("function"),gu=Es("number"),Is=e=>e!==null&&typeof e=="object",wh=e=>e===!0||e===!1,ws=e=>{if(vs(e)!=="object")return!1;const t=mi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},_h=Ht("Date"),Sh=Ht("File"),Ah=Ht("Blob"),Th=Ht("FileList"),Lh=e=>Is(e)&&_t(e.pipe),Oh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_t(e.append)&&((t=vs(e))==="formdata"||t==="object"&&_t(e.toString)&&e.toString()==="[object FormData]"))},Fh=Ht("URLSearchParams"),[Dh,kh,Nh,Rh]=["ReadableStream","Request","Response","Headers"].map(Ht),Mh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Dr(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 mu(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 nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ge,bu=e=>!To(e)&&e!==nr;function bi(){const{caseless:e}=bu(this)&&this||{},t={},n=(r,o)=>{const s=e&&mu(t,o)||o;ws(t[s])&&ws(r)?t[s]=bi(t[s],r):ws(r)?t[s]=bi({},r):Dr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Lo(arguments[r],n);return t}const Ph=(e,t,n,{allOwnKeys:r}={})=>(Lo(t,(o,s)=>{n&&_t(o)?e[s]=pu(o,n):e[s]=o},{allOwnKeys:r}),e),jh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Bh=(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)},Vh=(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&&mi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Gh=(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},Hh=e=>{if(!e)return null;if(Dr(e))return e;let t=e.length;if(!gu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Wh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mi(Uint8Array)),Zh=(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])}},Xh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zh=Ht("HTMLFormElement"),Yh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),yu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Jh=Ht("RegExp"),Cu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Lo(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},qh=e=>{Cu(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+"'")})}})},$h=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Dr(e)?r(e):r(String(e).split(t)),n},Qh=()=>{},Uh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,yi="abcdefghijklmnopqrstuvwxyz",xu="0123456789",vu={DIGIT:xu,ALPHA:yi,ALPHA_DIGIT:yi+yi.toUpperCase()+xu},Kh=(e=16,t=vu.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function eg(e){return!!(e&&_t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const tg=e=>{const t=new Array(10),n=(r,o)=>{if(Is(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Dr(r)?[]:{};return Lo(r,(a,i)=>{const c=n(a,o+1);!To(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},ng=Ht("AsyncFunction"),rg=e=>e&&(Is(e)||_t(e))&&_t(e.then)&&_t(e.catch),Eu=((e,t)=>e?setImmediate:t?((n,r)=>(nr.addEventListener("message",({source:o,data:s})=>{o===nr&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),nr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_t(nr.postMessage)),og=typeof queueMicrotask<"u"?queueMicrotask.bind(nr):typeof process<"u"&&process.nextTick||Eu;var R={isArray:Dr,isArrayBuffer:hu,isBuffer:vh,isFormData:Oh,isArrayBufferView:Eh,isString:Ih,isNumber:gu,isBoolean:wh,isObject:Is,isPlainObject:ws,isReadableStream:Dh,isRequest:kh,isResponse:Nh,isHeaders:Rh,isUndefined:To,isDate:_h,isFile:Sh,isBlob:Ah,isRegExp:Jh,isFunction:_t,isStream:Lh,isURLSearchParams:Fh,isTypedArray:Wh,isFileList:Th,forEach:Lo,merge:bi,extend:Ph,trim:Mh,stripBOM:jh,inherits:Bh,toFlatObject:Vh,kindOf:vs,kindOfTest:Ht,endsWith:Gh,toArray:Hh,forEachEntry:Zh,matchAll:Xh,isHTMLForm:zh,hasOwnProperty:yu,hasOwnProp:yu,reduceDescriptors:Cu,freezeMethods:qh,toObjectSet:$h,toCamelCase:Yh,noop:Qh,toFiniteNumber:Uh,findKey:mu,global:nr,isContextDefined:bu,ALPHABET:vu,generateString:Kh,isSpecCompliantForm:eg,toJSONObject:tg,isAsyncFn:ng,isThenable:rg,setImmediate:Eu,asap:og};function me(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(me,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 Iu=me.prototype,wu={};["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=>{wu[e]={value:e}}),Object.defineProperties(me,wu),Object.defineProperty(Iu,"isAxiosError",{value:!0}),me.from=(e,t,n,r,o,s)=>{const a=Object.create(Iu);return R.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),me.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var sg=null;function Ci(e){return R.isPlainObject(e)||R.isArray(e)}function _u(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Su(e,t,n){return e?e.concat(t).map(function(o,s){return o=_u(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function ag(e){return R.isArray(e)&&!e.some(Ci)}const ig=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function _s(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(h,p){return!R.isUndefined(p[h])});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 me("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,h,p){let g=b;if(b&&!p&&typeof b=="object"){if(R.endsWith(h,"{}"))h=r?h:h.slice(0,-2),b=JSON.stringify(b);else if(R.isArray(b)&&ag(b)||(R.isFileList(b)||R.endsWith(h,"[]"))&&(g=R.toArray(b)))return h=_u(h),g.forEach(function(v,I){!(R.isUndefined(v)||v===null)&&t.append(a===!0?Su([h],I,s):a===null?h:h+"[]",l(v))}),!1}return Ci(b)?!0:(t.append(Su(p,h,s),l(b)),!1)}const m=[],y=Object.assign(ig,{defaultVisitor:f,convertValue:l,isVisitable:Ci});function x(b,h){if(!R.isUndefined(b)){if(m.indexOf(b)!==-1)throw Error("Circular reference detected in "+h.join("."));m.push(b),R.forEach(b,function(g,C){(!(R.isUndefined(g)||g===null)&&o.call(t,g,R.isString(C)?C.trim():C,h,y))===!0&&x(g,h?h.concat(C):[C])}),m.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return x(e),t}function Au(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xi(e,t){this._pairs=[],e&&_s(e,this,t)}const Tu=xi.prototype;Tu.append=function(t,n){this._pairs.push([t,n])},Tu.toString=function(t){const n=t?function(r){return t.call(this,r,Au)}:Au;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function cg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lu(e,t,n){if(!t)return e;const r=n&&n.encode||cg,o=n&&n.serialize;let s;if(o?s=o(t,n):s=R.isURLSearchParams(t)?t.toString():new xi(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class lg{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 Ou=lg,Fu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ug=typeof URLSearchParams<"u"?URLSearchParams:xi,dg=typeof FormData<"u"?FormData:null,fg=typeof Blob<"u"?Blob:null,pg={isBrowser:!0,classes:{URLSearchParams:ug,FormData:dg,Blob:fg},protocols:["http","https","file","blob","url","data"]};const vi=typeof window<"u"&&typeof document<"u",Ei=typeof navigator=="object"&&navigator||void 0,hg=vi&&(!Ei||["ReactNative","NativeScript","NS"].indexOf(Ei.product)<0),gg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mg=vi&&window.location.href||"http://localhost";var bg=Object.freeze({__proto__:null,hasBrowserEnv:vi,hasStandardBrowserWebWorkerEnv:gg,hasStandardBrowserEnv:hg,navigator:Ei,origin:mg}),ft={...bg,...pg};function yg(e,t){return _s(e,new ft.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ft.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Cg(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xg(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 Du(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]=xg(o[a])),!i)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(Cg(r),o,n,0)}),n}return null}function vg(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 Ii={transitional:Fu,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(Du(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 yg(t,this.formSerializer).toString();if((i=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return _s(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),vg(t)):t}],transformResponse:[function(t){const n=this.transitional||Ii.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"?me.from(i,me.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}}};R.forEach(["delete","get","head","post","put","patch"],e=>{Ii.headers[e]={}});var wi=Ii;const Eg=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 Ig=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]&&Eg[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const ku=Symbol("internals");function Oo(e){return e&&String(e).trim().toLowerCase()}function Ss(e){return e===!1||e==null?e:R.isArray(e)?e.map(Ss):String(e)}function wg(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 _g=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _i(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 Sg(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ag(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 As{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=Oo(c);if(!f)throw new Error("header name must be a non-empty string");const m=R.findKey(o,f);(!m||o[m]===void 0||l===!0||l===void 0&&o[m]!==!1)&&(o[m||c]=Ss(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())&&!_g(t))a(Ig(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=Oo(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return wg(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=Oo(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||_i(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Oo(a),a){const i=R.findKey(r,a);i&&(!n||_i(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||_i(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]=Ss(o),delete n[s];return}const i=t?Sg(s):String(s).trim();i!==s&&delete n[s],n[i]=Ss(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[ku]=this[ku]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Oo(a);r[i]||(Ag(o,a),r[i]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}}As.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(As.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(As);var Wt=As;function Si(e,t){const n=this||wi,r=t||n,o=Wt.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 Nu(e){return!!(e&&e.__CANCEL__)}function kr(e,t,n){me.call(this,e??"canceled",me.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(kr,me,{__CANCEL__:!0});function Ru(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new me("Request failed with status code "+n.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Lg(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 m=s,y=0;for(;m!==o;)y+=n[m++],m=m%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const x=f&&l-f;return x?Math.round(y*1e3/x):void 0}}function Og(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(),m=f-n;m>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-m)))},()=>o&&a(o)]}const Ts=(e,t,n=3)=>{let r=0;const o=Lg(50,250);return Og(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const m={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(m)},n)},Mu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pu=e=>(...t)=>R.asap(()=>e(...t));var Fg=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=R.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Dg=ft.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 kg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ng(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ju(e,t){return e&&!kg(t)?Ng(e,t):t}const Bu=e=>e instanceof Wt?{...e}:e;function rr(e,t){t=t||{};const n={};function r(l,f,m){return R.isPlainObject(l)&&R.isPlainObject(f)?R.merge.call({caseless:m},l,f):R.isPlainObject(f)?R.merge({},f):R.isArray(f)?f.slice():f}function o(l,f,m){if(R.isUndefined(f)){if(!R.isUndefined(l))return r(void 0,l,m)}else return r(l,f,m)}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,m){if(m in t)return r(l,f);if(m 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(Bu(l),Bu(f),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(f){const m=c[f]||o,y=m(e[f],t[f],f);R.isUndefined(y)&&m!==i||(n[f]=y)}),n}var Vu=e=>{const t=rr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Wt.from(a),t.url=Lu(ju(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(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(ft.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&Fg(t.url))){const l=o&&s&&Dg.read(s);l&&a.set(o,l)}return t},Rg=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Vu(e);let s=o.data;const a=Wt.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,m,y,x,b;function h(){x&&x(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function g(){if(!p)return;const v=Wt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:v,config:e,request:p};Ru(function(A){n(A),h()},function(A){r(A),h()},E),p=null}"onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(g)},p.onabort=function(){p&&(r(new me("Request aborted",me.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new me("Network Error",me.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Fu;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new me(I,E.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,p)),p=null},s===void 0&&a.setContentType(null),"setRequestHeader"in p&&R.forEach(a.toJSON(),function(I,E){p.setRequestHeader(E,I)}),R.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),l&&([y,b]=Ts(l,!0),p.addEventListener("progress",y)),c&&p.upload&&([m,x]=Ts(c),p.upload.addEventListener("progress",m),p.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(f=v=>{p&&(r(!v||v.type?new kr(null,e,p):v),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const C=Tg(o.url);if(C&&ft.protocols.indexOf(C)===-1){r(new me("Unsupported protocol "+C+":",me.ERR_BAD_REQUEST,e));return}p.send(s||null)})},Mg=(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 me?f:new kr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new me(`timeout ${t} of ms exceeded`,me.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 Pg=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},jg=async function*(e,t){for await(const n of Bg(e))yield*Pg(n,t)},Bg=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()}},Gu=(e,t,n,r)=>{const o=jg(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 m=f.byteLength;if(n){let y=s+=m;n(y)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Ls=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Hu=Ls&&typeof ReadableStream=="function",Vg=Ls&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Wu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Gg=Hu&&Wu(()=>{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}),Zu=64*1024,Ai=Hu&&Wu(()=>R.isReadableStream(new Response("").body)),Os={stream:Ai&&(e=>e.body)};Ls&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Os[t]&&(Os[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new me(`Response type '${t}' is not supported`,me.ERR_NOT_SUPPORT,r)})})})(new Response);const Hg=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(ft.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 Vg(e)).byteLength},Wg=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??Hg(t)};var Zg=Ls&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:m="same-origin",fetchOptions:y}=Vu(e);l=l?(l+"").toLowerCase():"text";let x=Mg([o,s&&s.toAbortSignal()],a),b;const h=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let p;try{if(c&&Gg&&n!=="get"&&n!=="head"&&(p=await Wg(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[A,S]=Mu(p,Ts(Pu(c)));r=Gu(E.body,Zu,A,S)}}R.isString(m)||(m=m?"include":"omit");const g="credentials"in Request.prototype;b=new Request(t,{...y,signal:x,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:g?m:void 0});let C=await fetch(b);const v=Ai&&(l==="stream"||l==="response");if(Ai&&(i||v&&h)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=C[L]});const _=R.toFiniteNumber(C.headers.get("content-length")),[A,S]=i&&Mu(_,Ts(Pu(i),!0))||[];C=new Response(Gu(C.body,Zu,A,()=>{S&&S(),h&&h()}),E)}l=l||"text";let I=await Os[R.findKey(Os,l)||"text"](C,e);return!v&&h&&h(),await new Promise((E,_)=>{Ru(E,_,{data:I,headers:Wt.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:b})})}catch(g){throw h&&h(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new me("Network Error",me.ERR_NETWORK,e,b),{cause:g.cause||g}):me.from(g,g&&g.code,e,b)}});const Ti={http:sg,xhr:Rg,fetch:Zg};R.forEach(Ti,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xu=e=>`- ${e}`,Xg=e=>R.isFunction(e)||e===null||e===!1;var zu={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,!Xg(n)&&(r=Ti[(a=String(n)).toLowerCase()],r===void 0))throw new me(`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} />`,bl,Lr,KS,Lr),Pa[Lr+bl]=!0}}return O===r?Ma(Ue):hl(Ue),Ue}}function ja(O,Z,Q){return rs(O,Z,Q,!0)}function gl(O,Z,Q){return rs(O,Z,Q,!1)}var Ba=gl,ml=ja;Co.Fragment=r,Co.jsx=Ba,Co.jsxs=ml}()),Co}process.env.NODE_ENV==="production"?Wa.exports=a2():Wa.exports=i2();var u=Wa.exports;function Ll(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=Ll(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Tn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ll(e))&&(r&&(r+=" "),r+=t);return r}const xo=e=>typeof e=="number"&&!isNaN(e),$n=e=>typeof e=="string",wt=e=>typeof e=="function",as=e=>$n(e)||wt(e)?e:null,Za=e=>w.isValidElement(e)||$n(e)||wt(e)||xo(e);function c2(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 is(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:b,isIn:y,playToast:x}=a;const m=r?`${t}--${c}`:t,h=r?`${n}--${c}`:n,p=w.useRef(0);return w.useLayoutEffect(()=>{const g=b.current,C=m.split(" "),v=I=>{I.target===b.current&&(x(),g.removeEventListener("animationend",v),g.removeEventListener("animationcancel",v),p.current===0&&I.type!=="animationcancel"&&g.classList.remove(...C))};g.classList.add(...C),g.addEventListener("animationend",v),g.addEventListener("animationcancel",v)},[]),w.useEffect(()=>{const g=b.current,C=()=>{g.removeEventListener("animationend",C),o?c2(g,f,s):f()};y||(l?C():(p.current=1,g.className+=` ${h}`,g.addEventListener("animationend",C)))},[y]),w.createElement(w.Fragment,null,i)}}function Ol(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 vo=[];const Xa=new Set,l2=e=>Xa.forEach(t=>t(e)),Fl=()=>ct.size>0;function Dl(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 kl(e,t){Za(e)&&(Fl()||vo.push({content:e,options:t}),ct.forEach(n=>{n.buildToast(e,t)}))}function Nl(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 u2(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,b,y){let x=1,m=0,h=[],p=[],g=[],C=b;const v=new Map,I=new Set,E=()=>{g=Array.from(v.values()),I.forEach(S=>S())},_=S=>{p=S==null?[]:p.filter(L=>L!==S),E()},A=S=>{const{toastId:L,onOpen:k,updateId:D,children:N}=S.props,P=D==null;S.staleId&&v.delete(S.staleId),v.set(L,S),p=[...p,S.props.toastId].filter(B=>B!==S.staleId),E(),y(Ol(S,P?"added":"updated")),P&&wt(k)&&k(w.isValidElement(N)&&N.props)};return{id:f,props:C,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{v.forEach(k=>{L!=null&&L!==k.props.toastId||wt(k.toggle)&&k.toggle(S)})},removeToast:_,toasts:v,clearQueue:()=>{m-=h.length,h=[]},buildToast:(S,L)=>{if((V=>{let{containerId:W,toastId:M,updateId:G}=V;const z=W?W!==f:f!==1,ne=v.has(M)&&G==null;return z||ne})(L))return;const{toastId:k,updateId:D,data:N,staleId:P,delay:B}=L,Y=()=>{_(k)},$=D==null;$&&m++;const H={...C,style:C.toastStyle,key:x++,...Object.fromEntries(Object.entries(L).filter(V=>{let[W,M]=V;return M!=null})),toastId:k,updateId:D,data:N,closeToast:Y,isIn:!1,className:as(L.className||C.toastClassName),bodyClassName:as(L.bodyClassName||C.bodyClassName),progressClassName:as(L.progressClassName||C.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,q=C.autoClose,X===!1||xo(X)&&X>0?X:q),deleteToast(){const V=v.get(k),{onClose:W,children:M}=V.props;wt(W)&&W(w.isValidElement(M)&&M.props),y(Ol(V,"removed")),v.delete(k),m--,m<0&&(m=0),h.length>0?A(h.shift()):E()}};var X,q;H.closeButton=C.closeButton,L.closeButton===!1||Za(L.closeButton)?H.closeButton=L.closeButton:L.closeButton===!0&&(H.closeButton=!Za(C.closeButton)||C.closeButton);let se=S;w.isValidElement(S)&&!$n(S.type)?se=w.cloneElement(S,{closeToast:Y,toastProps:H,data:N}):wt(S)&&(se=S({closeToast:Y,toastProps:H,data:N}));const de={content:se,props:H,staleId:P};C.limit&&C.limit>0&&m>C.limit&&$?h.push(de):xo(B)?setTimeout(()=>{A(de)},B):A(de)},setProps(S){C=S},setToggle:(S,L)=>{v.get(S).toggle=L},isToastActive:S=>p.some(L=>L===S),getSnapshot:()=>C.newestOnTop?g.reverse():g}}(a,s,l2);ct.set(a,c);const l=c.observe(i);return vo.forEach(f=>kl(f.content,f.options)),vo=[],()=>{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:Dl,count:o==null?void 0:o.length}}function d2(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:b}=e;var y,x;function m(){n(!0)}function h(){n(!1)}function p(v){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&h(),a.delta=e.draggableDirection==="x"?v.clientX-a.start:v.clientY-a.start,a.start!==v.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 g(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",g);const v=s.current;if(a.canDrag&&a.didMove&&v){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();v.style.transition="transform 0.2s, opacity 0.2s",v.style.removeProperty("transform"),v.style.removeProperty("opacity")}}(x=ct.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||x.setToggle(y.id,y.fn),w.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",m),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);const C={onPointerDown:function(v){if(e.draggable===!0||e.draggable===v.pointerType){a.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",g);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=v.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=v.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(v){const{top:I,bottom:E,left:_,right:A}=s.current.getBoundingClientRect();v.nativeEvent.type!=="touchend"&&e.pauseOnHover&&v.clientX>=_&&v.clientX<=A&&v.clientY>=I&&v.clientY<=E?h():m()}};return i&&c&&(C.onMouseEnter=h,e.stacked||(C.onMouseLeave=m)),b&&(C.onClick=v=>{f&&f(v),a.canCloseOnClick&&l()}),{playToast:m,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:C}}function f2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:b,theme:y}=e;const x=s||c&&l===0,m={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(m.transform=`scaleX(${l})`);const h=Tn("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}),p=wt(a)?a({rtl:f,type:o,defaultClassName:h}):Tn(h,a),g={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{b&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer",className:p,style:m,...g}))}let p2=1;const Rl=()=>""+p2++;function h2(e){return e&&($n(e.toastId)||xo(e.toastId))?e.toastId:Rl()}function Eo(e,t){return kl(e,t),t.toastId}function cs(e,t){return{...t,type:t&&t.type||e,toastId:h2(t)}}function ls(e){return(t,n)=>Eo(t,cs(e,n))}function Le(e,t){return Eo(e,cs("default",t))}Le.loading=(e,t)=>Eo(e,cs("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=$n(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,b,y)=>{if(b==null)return void Le.dismiss(r);const x={type:f,...i,...n,data:y},m=$n(b)?{render:b}:b;return r?Le.update(r,{...x,...m}):Le(m.render,{...x,...m}),y},l=wt(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},Le.success=ls("success"),Le.info=ls("info"),Le.error=ls("error"),Le.warning=ls("warning"),Le.warn=Le.warning,Le.dark=(e,t)=>Eo(e,cs("default",{theme:"dark",...t})),Le.dismiss=function(e){(function(t){var n;if(Fl()){if(t==null||$n(n=t)||xo(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 vo=vo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Le.clearWaitingQueue=function(e){e===void 0&&(e={}),ct.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Le.isActive=Dl,Le.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:Rl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,Eo(a,s)}},Le.done=e=>{Le.update(e,{progress:1})},Le.onChange=function(e){return Xa.add(e),()=>{Xa.delete(e)}},Le.play=e=>Nl(!0,e),Le.pause=e=>Nl(!1,e);const g2=typeof window<"u"?w.useLayoutEffect:w.useEffect,us=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(us,{...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(us,{...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(us,{...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(us,{...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"})}},m2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=d2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:b,closeToast:y,transition:x,position:m,className:h,style:p,bodyClassName:g,bodyStyle:C,progressClassName:v,progressStyle:I,updateId:E,role:_,progress:A,rtl:S,toastId:L,deleteToast:k,isIn:D,isLoading:N,closeOnClick:P,theme:B}=e,Y=Tn("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":P}),$=wt(h)?h({rtl:S,position:m,type:f,defaultClassName:Y}):Tn(Y,h),H=function(de){let{theme:V,type:W,isLoading:M,icon:G}=de,z=null;const ne={theme:V,type:W};return G===!1||(wt(G)?z=G({...ne,isLoading:M}):w.isValidElement(G)?z=w.cloneElement(G,ne):M?z=za.spinner():(ae=>ae in za)(W)&&(z=za[W](ne))),z}(e),X=!!A||!c,q={closeToast:y,type:f,theme:B};let se=null;return a===!1||(se=wt(a)?a(q):w.isValidElement(a)?w.cloneElement(a,q):function(de){let{closeToast:V,theme:W,ariaLabel:M="close"}=de;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${W}`,type:"button",onClick:G=>{G.stopPropagation(),V(G)},"aria-label":M},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(x,{isIn:D,done:k,position:m,preventExitTransition:n,nodeRef:r,playToast:s},w.createElement("div",{id:L,onClick:l,"data-in":D,className:$,...o,style:p,ref:r},w.createElement("div",{...D&&{role:_},className:wt(g)?g({type:f}):Tn("Toastify__toast-body",g),style:C},H!=null&&w.createElement("div",{className:Tn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!N})},H),w.createElement("div",null,i)),se,w.createElement(f2,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:B,delay:c,isRunning:t,isIn:D,closeToast:y,hide:b,type:f,style:I,className:v,controlledProgress:X,progress:A||0})))},ds=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},b2=is(ds("bounce",!0));is(ds("slide",!0)),is(ds("zoom")),is(ds("flip"));const y2={position:"top-right",transition:b2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Ya(e){let t={...y2,...e};const n=e.stacked,[r,o]=w.useState(!0),s=w.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=u2(t),{className:l,style:f,rtl:b,containerId:y}=t;function x(h){const p=Tn("Toastify__toast-container",`Toastify__toast-container--${h}`,{"Toastify__toast-container--rtl":b});return wt(l)?l({position:h,rtl:b,defaultClassName:p}):Tn(p,as(l))}function m(){n&&(o(!0),Le.play())}return g2(()=>{if(n){var h;const p=s.current.querySelectorAll('[data-in="true"]'),g=12,C=(h=t.position)==null?void 0:h.includes("top");let v=0,I=0;Array.from(p).reverse().forEach((E,_)=>{const A=E;A.classList.add("Toastify__toast--stacked"),_>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=C?"top":"bot");const S=v*(r?.2:1)+(r?0:g*_);A.style.setProperty("--y",`${C?S:-1*S}px`),A.style.setProperty("--g",`${g}`),A.style.setProperty("--s",""+(1-(r?I:0))),v+=A.offsetHeight,I+=.025})}},[r,c,n]),w.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),Le.pause())},onMouseLeave:m},a((h,p)=>{const g=p.length?{...f}:{...f,pointerEvents:"none"};return w.createElement("div",{className:x(h),style:g,key:`container-${h}`},p.map(C=>{let{content:v,props:I}=C;return w.createElement(m2,{...I,stacked:n,collapseAll:m,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},v)}))}))}var Or=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(){}},Qn=typeof window>"u"||"Deno"in globalThis;function Dt(){}function C2(e,t){return typeof e=="function"?e(t):e}function Ja(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ml(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fr(e,t){return typeof e=="function"?e(t):e}function Gt(e,t){return typeof e=="function"?e(t):e}function Pl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==qa(a,t.options))return!1}else if(!Io(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 jl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Un(t.options.mutationKey)!==Un(s))return!1}else if(!Io(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function qa(e,t){return((t==null?void 0:t.queryKeyHashFn)||Un)(e)}function Un(e){return JSON.stringify(e,(t,n)=>Qa(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Io(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Io(e[n],t[n])):!1}function $a(e,t){if(e===t)return e;const n=Bl(e)&&Bl(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]=$a(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function fs(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 Bl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qa(e){if(!Vl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Vl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vl(e){return Object.prototype.toString.call(e)==="[object Object]"}function x2(e){return new Promise(t=>{setTimeout(t,e)})}function Ua(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 $a(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 $a(e,t)}return t}function v2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function E2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ps=Symbol();function Gl(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ps&&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===ps?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var I2=(Jp=class extends Or{constructor(){super();le(this,mr);le(this,Pn);le(this,eo);U(this,eo,t=>{if(!Qn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Pn)||this.setEventListener(F(this,eo))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Pn))==null||t.call(this),U(this,Pn,void 0))}setEventListener(t){var n;U(this,eo,t),(n=F(this,Pn))==null||n.call(this),U(this,Pn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,mr)!==t&&(U(this,mr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,mr)=="boolean"?F(this,mr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},mr=new WeakMap,Pn=new WeakMap,eo=new WeakMap,Jp),Ka=new I2,w2=(qp=class extends Or{constructor(){super();le(this,to,!0);le(this,jn);le(this,no);U(this,no,t=>{if(!Qn&&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,jn)||this.setEventListener(F(this,no))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,jn))==null||t.call(this),U(this,jn,void 0))}setEventListener(t){var n;U(this,no,t),(n=F(this,jn))==null||n.call(this),U(this,jn,t(this.setOnline.bind(this)))}setOnline(t){F(this,to)!==t&&(U(this,to,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,to)}},to=new WeakMap,jn=new WeakMap,no=new WeakMap,qp),hs=new w2;function ei(){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 _2(e){return Math.min(1e3*2**e,3e4)}function Hl(e){return(e??"online")==="online"?hs.isOnline():!0}var Wl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ti(e){return e instanceof Wl}function Zl(e){let t=!1,n=0,r=!1,o;const s=ei(),a=h=>{var p;r||(y(new Wl(h)),(p=e.abort)==null||p.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>Ka.isFocused()&&(e.networkMode==="always"||hs.isOnline())&&e.canRun(),f=()=>Hl(e.networkMode)&&e.canRun(),b=h=>{var p;r||(r=!0,(p=e.onSuccess)==null||p.call(e,h),o==null||o(),s.resolve(h))},y=h=>{var p;r||(r=!0,(p=e.onError)==null||p.call(e,h),o==null||o(),s.reject(h))},x=()=>new Promise(h=>{var p;o=g=>{(r||l())&&h(g)},(p=e.onPause)==null||p.call(e)}).then(()=>{var h;o=void 0,r||(h=e.onContinue)==null||h.call(e)}),m=()=>{if(r)return;let h;const p=n===0?e.initialPromise:void 0;try{h=p??e.fn()}catch(g){h=Promise.reject(g)}Promise.resolve(h).then(b).catch(g=>{var _;if(r)return;const C=e.retry??(Qn?0:3),v=e.retryDelay??_2,I=typeof v=="function"?v(n,g):v,E=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,g);if(t||!E){y(g);return}n++,(_=e.onFail)==null||_.call(e,n,g),x2(I).then(()=>l()?void 0:x()).then(()=>{t?y(g):m()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?m():x().then(m),s)}}function S2(){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 Ke=S2(),Xl=($p=class{constructor(){le(this,br)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ja(this.gcTime)&&U(this,br,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qn?1/0:5*60*1e3))}clearGcTimeout(){F(this,br)&&(clearTimeout(F(this,br)),U(this,br,void 0))}},br=new WeakMap,$p),A2=(Qp=class extends Xl{constructor(t){super();le(this,$t);le(this,ro);le(this,oo);le(this,Rt);le(this,yr);le(this,at);le(this,Uo);le(this,Cr);U(this,Cr,!1),U(this,Uo,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,yr,t.client),U(this,Rt,F(this,yr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,ro,T2(this.options)),this.state=t.state??F(this,ro),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,at))==null?void 0:t.promise}setOptions(t){this.options={...F(this,Uo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Rt).remove(this)}setData(t,n){const r=Ua(this.state.data,t,this.options);return be(this,$t,An).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,$t,An).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,at))==null?void 0:r.promise;return(o=F(this,at))==null||o.cancel(t),n?n.then(Dt).catch(Dt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,ro))}isActive(){return this.observers.some(t=>Gt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ps||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||!Ml(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,at))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,at))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Rt).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,at)&&(F(this,Cr)?F(this,at).cancel({revert:!0}):F(this,at).cancelRetry()),this.scheduleGc()),F(this,Rt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,$t,An).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,at))return F(this,at).continueRetry(),F(this,at).promise}if(t&&this.setOptions(t),!this.options.queryFn){const b=this.observers.find(y=>y.options.queryFn);b&&this.setOptions(b.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=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(U(this,Cr,!0),r.signal)})},s=()=>{const b=Gl(this.options,n),y={client:F(this,yr),queryKey:this.queryKey,meta:this.meta};return o(y),U(this,Cr,!1),this.options.persister?this.options.persister(b,y,this):b(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,yr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),U(this,oo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&be(this,$t,An).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=b=>{var y,x,m,h;ti(b)&&b.silent||be(this,$t,An).call(this,{type:"error",error:b}),ti(b)||((x=(y=F(this,Rt).config).onError)==null||x.call(y,b,this),(h=(m=F(this,Rt).config).onSettled)==null||h.call(m,this.state.data,b,this)),this.scheduleGc()};return U(this,at,Zl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:b=>{var y,x,m,h;if(b===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(b)}catch(p){i(p);return}(x=(y=F(this,Rt).config).onSuccess)==null||x.call(y,b,this),(h=(m=F(this,Rt).config).onSettled)==null||h.call(m,b,this.state.error,this),this.scheduleGc()},onError:i,onFail:(b,y)=>{be(this,$t,An).call(this,{type:"failed",failureCount:b,error:y})},onPause:()=>{be(this,$t,An).call(this,{type:"pause"})},onContinue:()=>{be(this,$t,An).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,at).start()}},ro=new WeakMap,oo=new WeakMap,Rt=new WeakMap,yr=new WeakMap,at=new WeakMap,Uo=new WeakMap,Cr=new WeakMap,$t=new WeakSet,An=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,...zl(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 ti(o)&&o.revert&&F(this,oo)?{...F(this,oo),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),Ke.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Rt).notify({query:this,type:"updated",action:t})})},Qp);function zl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function T2(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 L2=(Up=class extends Or{constructor(t={}){super();le(this,un);this.config=t,U(this,un,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??qa(o,n);let a=this.get(s);return a||(a=new A2({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,un).has(t.queryHash)||(F(this,un).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,un).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,un).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,un).get(t)}getAll(){return[...F(this,un).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Pl(t,r)):n}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},un=new WeakMap,Up),O2=(Kp=class extends Xl{constructor(t){super();le(this,fn);le(this,dn);le(this,ut);le(this,xr);this.mutationId=t.mutationId,U(this,ut,t.mutationCache),U(this,dn,[]),this.state=t.state||Yl(),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,dn).includes(t)||(F(this,dn).push(t),this.clearGcTimeout(),F(this,ut).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,dn,F(this,dn).filter(n=>n!==t)),this.scheduleGc(),F(this,ut).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,dn).length||(this.state.status==="pending"?this.scheduleGc():F(this,ut).remove(this))}continue(){var t;return((t=F(this,xr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,b,y,x,m,h,p,g,C,v,I,E,_,A;U(this,xr,Zl({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{be(this,fn,qn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{be(this,fn,qn).call(this,{type:"pause"})},onContinue:()=>{be(this,fn,qn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ut).canRun(this)}));const n=this.state.status==="pending",r=!F(this,xr).canStart();try{if(!n){be(this,fn,qn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,ut).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,fn,qn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,xr).start();return await((l=(c=F(this,ut).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((b=(f=this.options).onSuccess)==null?void 0:b.call(f,S,t,this.state.context)),await((x=(y=F(this,ut).config).onSettled)==null?void 0:x.call(y,S,null,this.state.variables,this.state.context,this)),await((h=(m=this.options).onSettled)==null?void 0:h.call(m,S,null,t,this.state.context)),be(this,fn,qn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((g=(p=F(this,ut).config).onError)==null?void 0:g.call(p,S,t,this.state.context,this)),await((v=(C=this.options).onError)==null?void 0:v.call(C,S,t,this.state.context)),await((E=(I=F(this,ut).config).onSettled)==null?void 0:E.call(I,void 0,S,this.state.variables,this.state.context,this)),await((A=(_=this.options).onSettled)==null?void 0:A.call(_,void 0,S,t,this.state.context)),S}finally{be(this,fn,qn).call(this,{type:"error",error:S})}}finally{F(this,ut).runNext(this)}}},dn=new WeakMap,ut=new WeakMap,xr=new WeakMap,fn=new WeakSet,qn=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),Ke.batch(()=>{F(this,dn).forEach(r=>{r.onMutationUpdate(t)}),F(this,ut).notify({mutation:this,type:"updated",action:t})})},Kp);function Yl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var F2=(e2=class extends Or{constructor(t={}){super();le(this,xn);le(this,Qt);le(this,Ko);this.config=t,U(this,xn,new Set),U(this,Qt,new Map),U(this,Ko,0)}build(t,n,r){const o=new O2({mutationCache:this,mutationId:++Va(this,Ko)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,xn).add(t);const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).get(n);r?r.push(t):F(this,Qt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,xn).delete(t)){const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).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,Qt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=gs(t);if(typeof n=="string"){const r=F(this,Qt).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=gs(t);if(typeof n=="string"){const o=(r=F(this,Qt).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(){Ke.batch(()=>{F(this,xn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,xn).clear(),F(this,Qt).clear()})}getAll(){return Array.from(F(this,xn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jl(n,r))}findAll(t={}){return this.getAll().filter(n=>jl(t,n))}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ke.batch(()=>Promise.all(t.map(n=>n.continue().catch(Dt))))}},xn=new WeakMap,Qt=new WeakMap,Ko=new WeakMap,e2);function gs(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Jl(e){return{onFetch:(t,n)=>{var f,b,y,x,m;const r=t.options,o=(y=(b=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:b.fetchMore)==null?void 0:y.direction,s=((x=t.state.data)==null?void 0:x.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let h=!1;const p=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},g=Gl(t.options,t.fetchOptions),C=async(v,I,E)=>{if(h)return Promise.reject();if(I==null&&v.pages.length)return Promise.resolve(v);const _={client:t.client,queryKey:t.queryKey,pageParam:I,direction:E?"backward":"forward",meta:t.options.meta};p(_);const A=await g(_),{maxPages:S}=t.options,L=E?E2:v2;return{pages:L(v.pages,A,S),pageParams:L(v.pageParams,I,S)}};if(o&&s.length){const v=o==="backward",I=v?D2:ql,E={pages:s,pageParams:a},_=I(r,E);i=await C(E,_,v)}else{const v=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:ql(r,i);if(c>0&&I==null)break;i=await C(i,I),c++}while(c<v)}return i};t.options.persister?t.fetchFn=()=>{var h,p;return(p=(h=t.options).persister)==null?void 0:p.call(h,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function ql(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 D2(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 k2=(t2=class{constructor(e={}){le(this,Xe);le(this,Bn);le(this,Vn);le(this,so);le(this,ao);le(this,Gn);le(this,io);le(this,co);U(this,Xe,e.queryCache||new L2),U(this,Bn,e.mutationCache||new F2),U(this,Vn,e.defaultOptions||{}),U(this,so,new Map),U(this,ao,new Map),U(this,Gn,0)}mount(){Va(this,Gn)._++,F(this,Gn)===1&&(U(this,io,Ka.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Xe).onFocus())})),U(this,co,hs.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Xe).onOnline())})))}unmount(){var e,t;Va(this,Gn)._--,F(this,Gn)===0&&((e=F(this,io))==null||e.call(this),U(this,io,void 0),(t=F(this,co))==null||t.call(this),U(this,co,void 0))}isFetching(e){return F(this,Xe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,Bn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Xe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Xe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Fr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Xe).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,Xe).get(r.queryHash),s=o==null?void 0:o.state.data,a=C2(t,s);if(a!==void 0)return F(this,Xe).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ke.batch(()=>F(this,Xe).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,Xe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Xe);Ke.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Xe);return Ke.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ke.batch(()=>F(this,Xe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Dt).catch(Dt)}invalidateQueries(e,t={}){return Ke.batch(()=>(F(this,Xe).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=Ke.batch(()=>F(this,Xe).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Dt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Dt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Xe).build(this,t);return n.isStaleByTime(Fr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Dt).catch(Dt)}fetchInfiniteQuery(e){return e.behavior=Jl(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Dt).catch(Dt)}ensureInfiniteQueryData(e){return e.behavior=Jl(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hs.isOnline()?F(this,Bn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Xe)}getMutationCache(){return F(this,Bn)}getDefaultOptions(){return F(this,Vn)}setDefaultOptions(e){U(this,Vn,e)}setQueryDefaults(e,t){F(this,so).set(Un(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,so).values()],n={};return t.forEach(r=>{Io(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,ao).set(Un(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,ao).values()],n={};return t.forEach(r=>{Io(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Vn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=qa(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===ps&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Vn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Xe).clear(),F(this,Bn).clear()}},Xe=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,so=new WeakMap,ao=new WeakMap,Gn=new WeakMap,io=new WeakMap,co=new WeakMap,t2),N2=(n2=class extends Or{constructor(t,n){super();le(this,De);le(this,bt);le(this,Ce);le(this,es);le(this,dt);le(this,vr);le(this,lo);le(this,Hn);le(this,pn);le(this,ts);le(this,uo);le(this,fo);le(this,Er);le(this,Ir);le(this,Wn);le(this,po,new Set);this.options=n,U(this,bt,t),U(this,pn,null),U(this,Hn,ei()),this.options.experimental_prefetchInRender||F(this,Hn).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,Ce).addObserver(this),$l(F(this,Ce),this.options)?be(this,De,os).call(this):this.updateResult(),be(this,De,El).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ni(F(this,Ce),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ni(F(this,Ce),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,De,Il).call(this),be(this,De,wl).call(this),F(this,Ce).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,Ce);if(this.options=F(this,bt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gt(this.options.enabled,F(this,Ce))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,De,_l).call(this),F(this,Ce).setOptions(this.options),r._defaulted&&!fs(this.options,r)&&F(this,bt).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,Ce),observer:this});const s=this.hasListeners();s&&Ql(F(this,Ce),o,this.options,r)&&be(this,De,os).call(this),this.updateResult(n),s&&(F(this,Ce)!==o||Gt(this.options.enabled,F(this,Ce))!==Gt(r.enabled,F(this,Ce))||Fr(this.options.staleTime,F(this,Ce))!==Fr(r.staleTime,F(this,Ce)))&&be(this,De,Cl).call(this);const a=be(this,De,xl).call(this);s&&(F(this,Ce)!==o||Gt(this.options.enabled,F(this,Ce))!==Gt(r.enabled,F(this,Ce))||a!==F(this,Wn))&&be(this,De,vl).call(this,a)}getOptimisticResult(t){const n=F(this,bt).getQueryCache().build(F(this,bt),t),r=this.createResult(n,t);return M2(this,r)&&(U(this,dt,r),U(this,lo,this.options),U(this,vr,F(this,Ce).state)),r}getCurrentResult(){return F(this,dt)}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,po).add(t)}getCurrentQuery(){return F(this,Ce)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,bt).defaultQueryOptions(t),r=F(this,bt).getQueryCache().build(F(this,bt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,De,os).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,dt)))}createResult(t,n){var S;const r=F(this,Ce),o=this.options,s=F(this,dt),a=F(this,vr),i=F(this,lo),l=t!==r?t.state:F(this,es),{state:f}=t;let b={...f},y=!1,x;if(n._optimisticResults){const L=this.hasListeners(),k=!L&&$l(t,n),D=L&&Ql(t,r,n,o);(k||D)&&(b={...b,...zl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:m,errorUpdatedAt:h,status:p}=b;if(n.select&&b.data!==void 0)if(s&&b.data===(a==null?void 0:a.data)&&n.select===F(this,ts))x=F(this,uo);else try{U(this,ts,n.select),x=n.select(b.data),x=Ua(s==null?void 0:s.data,x,n),U(this,uo,x),U(this,pn,null)}catch(L){U(this,pn,L)}else x=b.data;if(n.placeholderData!==void 0&&x===void 0&&p==="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,fo))==null?void 0:S.state.data,F(this,fo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),U(this,pn,null)}catch(k){U(this,pn,k)}L!==void 0&&(p="success",x=Ua(s==null?void 0:s.data,L,n),y=!0)}F(this,pn)&&(m=F(this,pn),x=F(this,uo),h=Date.now(),p="error");const g=b.fetchStatus==="fetching",C=p==="pending",v=p==="error",I=C&&g,E=x!==void 0,A={status:p,fetchStatus:b.fetchStatus,isPending:C,isSuccess:p==="success",isError:v,isInitialLoading:I,isLoading:I,data:x,dataUpdatedAt:b.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>l.dataUpdateCount||b.errorUpdateCount>l.errorUpdateCount,isFetching:g,isRefetching:g&&!C,isLoadingError:v&&!E,isPaused:b.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:v&&E,isStale:ri(t,n),refetch:this.refetch,promise:F(this,Hn)};if(this.options.experimental_prefetchInRender){const L=N=>{A.status==="error"?N.reject(A.error):A.data!==void 0&&N.resolve(A.data)},k=()=>{const N=U(this,Hn,A.promise=ei());L(N)},D=F(this,Hn);switch(D.status){case"pending":t.queryHash===r.queryHash&&L(D);break;case"fulfilled":(A.status==="error"||A.data!==D.value)&&k();break;case"rejected":(A.status!=="error"||A.error!==D.reason)&&k();break}}return A}updateResult(t){const n=F(this,dt),r=this.createResult(F(this,Ce),this.options);if(U(this,vr,F(this,Ce).state),U(this,lo,this.options),F(this,vr).data!==void 0&&U(this,fo,F(this,Ce)),fs(r,n))return;U(this,dt,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,po).size)return!0;const c=new Set(i??F(this,po));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,dt)).some(l=>{const f=l;return F(this,dt)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),be(this,De,s2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,De,El).call(this)}},bt=new WeakMap,Ce=new WeakMap,es=new WeakMap,dt=new WeakMap,vr=new WeakMap,lo=new WeakMap,Hn=new WeakMap,pn=new WeakMap,ts=new WeakMap,uo=new WeakMap,fo=new WeakMap,Er=new WeakMap,Ir=new WeakMap,Wn=new WeakMap,po=new WeakMap,De=new WeakSet,os=function(t){be(this,De,_l).call(this);let n=F(this,Ce).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Dt)),n},Cl=function(){be(this,De,Il).call(this);const t=Fr(this.options.staleTime,F(this,Ce));if(Qn||F(this,dt).isStale||!Ja(t))return;const r=Ml(F(this,dt).dataUpdatedAt,t)+1;U(this,Er,setTimeout(()=>{F(this,dt).isStale||this.updateResult()},r))},xl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,Ce)):this.options.refetchInterval)??!1},vl=function(t){be(this,De,wl).call(this),U(this,Wn,t),!(Qn||Gt(this.options.enabled,F(this,Ce))===!1||!Ja(F(this,Wn))||F(this,Wn)===0)&&U(this,Ir,setInterval(()=>{(this.options.refetchIntervalInBackground||Ka.isFocused())&&be(this,De,os).call(this)},F(this,Wn)))},El=function(){be(this,De,Cl).call(this),be(this,De,vl).call(this,be(this,De,xl).call(this))},Il=function(){F(this,Er)&&(clearTimeout(F(this,Er)),U(this,Er,void 0))},wl=function(){F(this,Ir)&&(clearInterval(F(this,Ir)),U(this,Ir,void 0))},_l=function(){const t=F(this,bt).getQueryCache().build(F(this,bt),this.options);if(t===F(this,Ce))return;const n=F(this,Ce);U(this,Ce,t),U(this,es,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},s2=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,dt))}),F(this,bt).getQueryCache().notify({query:F(this,Ce),type:"observerResultsUpdated"})})},n2);function R2(e,t){return Gt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function $l(e,t){return R2(e,t)||e.state.data!==void 0&&ni(e,t,t.refetchOnMount)}function ni(e,t,n){if(Gt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ri(e,t)}return!1}function Ql(e,t,n,r){return(e!==t||Gt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ri(e,n)}function ri(e,t){return Gt(t.enabled,e)!==!1&&e.isStaleByTime(Fr(t.staleTime,e))}function M2(e,t){return!fs(e.getCurrentResult(),t)}var P2=(r2=class extends Or{constructor(n,r){super();le(this,En);le(this,Zn);le(this,Xn);le(this,yt);le(this,vn);U(this,Zn,n),this.setOptions(r),this.bindMethods(),be(this,En,Ga).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,Zn).defaultMutationOptions(n),fs(this.options,r)||F(this,Zn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,yt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Un(r.mutationKey)!==Un(this.options.mutationKey)?this.reset():((o=F(this,yt))==null?void 0:o.state.status)==="pending"&&F(this,yt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,yt))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,En,Ga).call(this),be(this,En,Sl).call(this,n)}getCurrentResult(){return F(this,Xn)}reset(){var n;(n=F(this,yt))==null||n.removeObserver(this),U(this,yt,void 0),be(this,En,Ga).call(this),be(this,En,Sl).call(this)}mutate(n,r){var o;return U(this,vn,r),(o=F(this,yt))==null||o.removeObserver(this),U(this,yt,F(this,Zn).getMutationCache().build(F(this,Zn),this.options)),F(this,yt).addObserver(this),F(this,yt).execute(n)}},Zn=new WeakMap,Xn=new WeakMap,yt=new WeakMap,vn=new WeakMap,En=new WeakSet,Ga=function(){var r;const n=((r=F(this,yt))==null?void 0:r.state)??Yl();U(this,Xn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Sl=function(n){Ke.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,vn)&&this.hasListeners()){const b=F(this,Xn).variables,y=F(this,Xn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,vn)).onSuccess)==null||o.call(r,n.data,b,y),(a=(s=F(this,vn)).onSettled)==null||a.call(s,n.data,null,b,y)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,vn)).onError)==null||c.call(i,n.error,b,y),(f=(l=F(this,vn)).onSettled)==null||f.call(l,void 0,n.error,b,y))}this.listeners.forEach(b=>{b(F(this,Xn))})})},r2),Ul=T.createContext(void 0),wo=e=>{const t=T.useContext(Ul);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},j2=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Ul.Provider,{value:e,children:t})),Kl=T.createContext(!1),B2=()=>T.useContext(Kl);Kl.Provider;function V2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var G2=T.createContext(V2()),H2=()=>T.useContext(G2);function eu(e,t){return typeof e=="function"?e(...t):!!e}function oi(){}var W2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Z2=e=>{T.useEffect(()=>{e.clearReset()},[e])},X2=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||eu(n,[e.error,r])),z2=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)))},Y2=(e,t)=>e.isLoading&&e.isFetching&&!t,J2=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,tu=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function q2(e,t,n){var b,y,x,m,h;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=wo(),o=B2(),s=H2(),a=r.defaultQueryOptions(e);(y=(b=r.getDefaultOptions().queries)==null?void 0:b._experimental_beforeQuery)==null||y.call(b,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",z2(a),W2(a,s),Z2(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(p=>{const g=f?c.subscribe(Ke.batchCalls(p)):oi;return c.updateResult(),g},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),J2(a,l))throw tu(a,c,s);if(X2({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((m=(x=r.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||m.call(x,a,l),a.experimental_prefetchInRender&&!Qn&&Y2(l,o)){const p=i?tu(a,c,s):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;p==null||p.catch(oi).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Ln(e,t){return q2(e,N2)}function en(e,t){const n=wo(),[r]=T.useState(()=>new P2(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Ke.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(oi)},[r]);if(o.error&&eu(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const si=(e,t)=>t.some(n=>e instanceof n);let nu,ru;function $2(){return nu||(nu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Q2(){return ru||(ru=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const ai=new WeakMap,ii=new WeakMap,ms=new WeakMap;function U2(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(Kn(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return ms.set(t,e),t}function K2(e){if(ai.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)});ai.set(e,t)}let ci={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return ai.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Kn(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 ou(e){ci=e(ci)}function eh(e){return Q2().includes(e)?function(...t){return e.apply(li(this),t),Kn(this.request)}:function(...t){return Kn(e.apply(li(this),t))}}function th(e){return typeof e=="function"?eh(e):(e instanceof IDBTransaction&&K2(e),si(e,$2())?new Proxy(e,ci):e)}function Kn(e){if(e instanceof IDBRequest)return U2(e);if(ii.has(e))return ii.get(e);const t=th(e);return t!==e&&(ii.set(e,t),ms.set(t,e)),t}const li=e=>ms.get(e);function nh(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=Kn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(Kn(a.result),c.oldVersion,c.newVersion,Kn(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 rh=["get","getKey","getAll","getAllKeys","count"],oh=["put","add","delete","clear"],ui=new Map;function su(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(ui.get(t))return ui.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=oh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||rh.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 ui.set(t,s),s}ou(e=>({...e,get:(t,n,r)=>su(t,n)||e.get(t,n,r),has:(t,n)=>!!su(t,n)||e.has(t,n)}));const sh=["continue","continuePrimaryKey","advance"],au={},di=new WeakMap,iu=new WeakMap,ah={get(e,t){if(!sh.includes(t))return e[t];let n=au[t];return n||(n=au[t]=function(...r){di.set(this,iu.get(this)[t](...r))}),n}};async function*ih(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,ah);for(iu.set(n,t),ms.set(n,li(t));t;)yield n,t=await(di.get(n)||t.continue()),di.delete(n)}function cu(e,t){return t===Symbol.asyncIterator&&si(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&si(e,[IDBIndex,IDBObjectStore])}ou(e=>({...e,get(t,n,r){return cu(t,n)?ih:e.get(t,n,r)},has(t,n){return cu(t,n)||e.has(t,n)}}));const ch="connector-db",lh=1,bs={FEEDBACK:"feedback"},_o=`${bs.FEEDBACK}:data`,ys=`${bs.FEEDBACK}:last_submitted`,So=`${bs.FEEDBACK}:capture_on_demand`,Ao=`${bs.FEEDBACK}:show_notification`,uh=12*60*60*1e3,fi=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=uh:!0,lu=(e,t=!1)=>e.captureFeedback&&(fi(e.firstViewed)&&(!e.lastSubmittedFeedback||fi(e.lastSubmittedFeedback))||!!t);let er=null;const On=async()=>{try{er||(er=await nh(ch,lh,{upgrade(e){e.objectStoreNames.contains(_o)||e.createObjectStore(_o),e.objectStoreNames.contains(ys)||e.createObjectStore(ys),e.objectStoreNames.contains(So)||e.createObjectStore(So),e.objectStoreNames.contains(Ao)||e.createObjectStore(Ao)},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."),er&&(er.close(),er=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),er=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return er},pi=async e=>{if(!e)return[];const t=await On();if(!t)return[];try{return await t.get(_o,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},dh=async e=>{if(!e)return null;const t=await On();if(!t)return null;try{return await t.get(ys,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Cs=async e=>{if(!e)return;const t=await On();if(t)try{return await t.get(So,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},fh=async e=>{if(!e)return!1;const t=await On();if(!t)return!1;try{return await t.get(Ao,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},ph=async(e,t)=>{if(!e||!t||!t.length)return;const n=await On();if(n)try{const r=await pi(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(_o,a,e),await n.put(Ao,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},hh=async e=>{if(!e)return;const t=await On();if(t)try{const n=await pi(e),r=await Cs(e),o=new Date,s=n.map(a=>{const i=lu(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(_o,s,e),await t.put(ys,o,e),r&&await t.put(So,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},uu=async(e,t)=>{if(!e)return;const n=await On();if(n)try{await n.put(So,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},gh=async e=>{if(!e)return;const t=await On();if(t)try{await t.put(Ao,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},mh=async e=>{const t=await pi(e),n=await Cs(e);return t.filter(o=>lu(o,n))},hi=async e=>{const t=await dh(e);return t&&!fi(t)?!1:await Cs(e)&&!t?!0:!!(await mh(e)).length},bh=async(e,t)=>{await ph(e,t)},xs=async e=>{e&&await hh(e)},yh=async(e,t)=>{const n=await Cs(e);t?n!==!1&&await uu(e,t):await uu(e,void 0)},du=async e=>await fh(e)&&await hi(e),fu=async e=>{await gh(e)};var gi={},tr={};function pu(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ch}=Object.prototype,{getPrototypeOf:mi}=Object,vs=(e=>t=>{const n=Ch.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ht=e=>(e=e.toLowerCase(),t=>vs(t)===e),Es=e=>t=>typeof t===e,{isArray:Dr}=Array,To=Es("undefined");function xh(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&_t(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hu=Ht("ArrayBuffer");function vh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hu(e.buffer),t}const Eh=Es("string"),_t=Es("function"),gu=Es("number"),Is=e=>e!==null&&typeof e=="object",Ih=e=>e===!0||e===!1,ws=e=>{if(vs(e)!=="object")return!1;const t=mi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},wh=Ht("Date"),_h=Ht("File"),Sh=Ht("Blob"),Ah=Ht("FileList"),Th=e=>Is(e)&&_t(e.pipe),Lh=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||_t(e.append)&&((t=vs(e))==="formdata"||t==="object"&&_t(e.toString)&&e.toString()==="[object FormData]"))},Oh=Ht("URLSearchParams"),[Fh,Dh,kh,Nh]=["ReadableStream","Request","Response","Headers"].map(Ht),Rh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Dr(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 mu(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 nr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ge,bu=e=>!To(e)&&e!==nr;function bi(){const{caseless:e}=bu(this)&&this||{},t={},n=(r,o)=>{const s=e&&mu(t,o)||o;ws(t[s])&&ws(r)?t[s]=bi(t[s],r):ws(r)?t[s]=bi({},r):Dr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Lo(arguments[r],n);return t}const Mh=(e,t,n,{allOwnKeys:r}={})=>(Lo(t,(o,s)=>{n&&_t(o)?e[s]=pu(o,n):e[s]=o},{allOwnKeys:r}),e),Ph=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),jh=(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)},Bh=(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&&mi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Vh=(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},Gh=e=>{if(!e)return null;if(Dr(e))return e;let t=e.length;if(!gu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Hh=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mi(Uint8Array)),Wh=(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])}},Zh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Xh=Ht("HTMLFormElement"),zh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),yu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Yh=Ht("RegExp"),Cu=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Lo(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Jh=e=>{Cu(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+"'")})}})},qh=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Dr(e)?r(e):r(String(e).split(t)),n},$h=()=>{},Qh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,yi="abcdefghijklmnopqrstuvwxyz",xu="0123456789",vu={DIGIT:xu,ALPHA:yi,ALPHA_DIGIT:yi+yi.toUpperCase()+xu},Uh=(e=16,t=vu.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Kh(e){return!!(e&&_t(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const eg=e=>{const t=new Array(10),n=(r,o)=>{if(Is(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Dr(r)?[]:{};return Lo(r,(a,i)=>{const c=n(a,o+1);!To(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},tg=Ht("AsyncFunction"),ng=e=>e&&(Is(e)||_t(e))&&_t(e.then)&&_t(e.catch),Eu=((e,t)=>e?setImmediate:t?((n,r)=>(nr.addEventListener("message",({source:o,data:s})=>{o===nr&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),nr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_t(nr.postMessage)),rg=typeof queueMicrotask<"u"?queueMicrotask.bind(nr):typeof process<"u"&&process.nextTick||Eu;var R={isArray:Dr,isArrayBuffer:hu,isBuffer:xh,isFormData:Lh,isArrayBufferView:vh,isString:Eh,isNumber:gu,isBoolean:Ih,isObject:Is,isPlainObject:ws,isReadableStream:Fh,isRequest:Dh,isResponse:kh,isHeaders:Nh,isUndefined:To,isDate:wh,isFile:_h,isBlob:Sh,isRegExp:Yh,isFunction:_t,isStream:Th,isURLSearchParams:Oh,isTypedArray:Hh,isFileList:Ah,forEach:Lo,merge:bi,extend:Mh,trim:Rh,stripBOM:Ph,inherits:jh,toFlatObject:Bh,kindOf:vs,kindOfTest:Ht,endsWith:Vh,toArray:Gh,forEachEntry:Wh,matchAll:Zh,isHTMLForm:Xh,hasOwnProperty:yu,hasOwnProp:yu,reduceDescriptors:Cu,freezeMethods:Jh,toObjectSet:qh,toCamelCase:zh,noop:$h,toFiniteNumber:Qh,findKey:mu,global:nr,isContextDefined:bu,ALPHABET:vu,generateString:Uh,isSpecCompliantForm:Kh,toJSONObject:eg,isAsyncFn:tg,isThenable:ng,setImmediate:Eu,asap:rg};function me(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(me,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 Iu=me.prototype,wu={};["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=>{wu[e]={value:e}}),Object.defineProperties(me,wu),Object.defineProperty(Iu,"isAxiosError",{value:!0}),me.from=(e,t,n,r,o,s)=>{const a=Object.create(Iu);return R.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),me.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var og=null;function Ci(e){return R.isPlainObject(e)||R.isArray(e)}function _u(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Su(e,t,n){return e?e.concat(t).map(function(o,s){return o=_u(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function sg(e){return R.isArray(e)&&!e.some(Ci)}const ag=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function _s(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(h,p){return!R.isUndefined(p[h])});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(m){if(m===null)return"";if(R.isDate(m))return m.toISOString();if(!c&&R.isBlob(m))throw new me("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(m)||R.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,h,p){let g=m;if(m&&!p&&typeof m=="object"){if(R.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(R.isArray(m)&&sg(m)||(R.isFileList(m)||R.endsWith(h,"[]"))&&(g=R.toArray(m)))return h=_u(h),g.forEach(function(v,I){!(R.isUndefined(v)||v===null)&&t.append(a===!0?Su([h],I,s):a===null?h:h+"[]",l(v))}),!1}return Ci(m)?!0:(t.append(Su(p,h,s),l(m)),!1)}const b=[],y=Object.assign(ag,{defaultVisitor:f,convertValue:l,isVisitable:Ci});function x(m,h){if(!R.isUndefined(m)){if(b.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));b.push(m),R.forEach(m,function(g,C){(!(R.isUndefined(g)||g===null)&&o.call(t,g,R.isString(C)?C.trim():C,h,y))===!0&&x(g,h?h.concat(C):[C])}),b.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return x(e),t}function Au(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xi(e,t){this._pairs=[],e&&_s(e,this,t)}const Tu=xi.prototype;Tu.append=function(t,n){this._pairs.push([t,n])},Tu.toString=function(t){const n=t?function(r){return t.call(this,r,Au)}:Au;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function ig(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lu(e,t,n){if(!t)return e;const r=n&&n.encode||ig,o=n&&n.serialize;let s;if(o?s=o(t,n):s=R.isURLSearchParams(t)?t.toString():new xi(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class cg{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 Ou=cg,Fu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},lg=typeof URLSearchParams<"u"?URLSearchParams:xi,ug=typeof FormData<"u"?FormData:null,dg=typeof Blob<"u"?Blob:null,fg={isBrowser:!0,classes:{URLSearchParams:lg,FormData:ug,Blob:dg},protocols:["http","https","file","blob","url","data"]};const vi=typeof window<"u"&&typeof document<"u",Ei=typeof navigator=="object"&&navigator||void 0,pg=vi&&(!Ei||["ReactNative","NativeScript","NS"].indexOf(Ei.product)<0),hg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gg=vi&&window.location.href||"http://localhost";var mg=Object.freeze({__proto__:null,hasBrowserEnv:vi,hasStandardBrowserWebWorkerEnv:hg,hasStandardBrowserEnv:pg,navigator:Ei,origin:gg}),ft={...mg,...fg};function bg(e,t){return _s(e,new ft.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ft.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function yg(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Cg(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 Du(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]=Cg(o[a])),!i)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(yg(r),o,n,0)}),n}return null}function xg(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 Ii={transitional:Fu,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(Du(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 bg(t,this.formSerializer).toString();if((i=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return _s(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),xg(t)):t}],transformResponse:[function(t){const n=this.transitional||Ii.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"?me.from(i,me.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}}};R.forEach(["delete","get","head","post","put","patch"],e=>{Ii.headers[e]={}});var wi=Ii;const vg=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 Eg=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]&&vg[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const ku=Symbol("internals");function Oo(e){return e&&String(e).trim().toLowerCase()}function Ss(e){return e===!1||e==null?e:R.isArray(e)?e.map(Ss):String(e)}function Ig(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 wg=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function _i(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 _g(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Sg(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 As{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=Oo(c);if(!f)throw new Error("header name must be a non-empty string");const b=R.findKey(o,f);(!b||o[b]===void 0||l===!0||l===void 0&&o[b]!==!1)&&(o[b||c]=Ss(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())&&!wg(t))a(Eg(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=Oo(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Ig(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=Oo(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||_i(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Oo(a),a){const i=R.findKey(r,a);i&&(!n||_i(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||_i(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]=Ss(o),delete n[s];return}const i=t?_g(s):String(s).trim();i!==s&&delete n[s],n[i]=Ss(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[ku]=this[ku]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Oo(a);r[i]||(Sg(o,a),r[i]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}}As.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(As.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(As);var Wt=As;function Si(e,t){const n=this||wi,r=t||n,o=Wt.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 Nu(e){return!!(e&&e.__CANCEL__)}function kr(e,t,n){me.call(this,e??"canceled",me.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(kr,me,{__CANCEL__:!0});function Ru(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new me("Request failed with status code "+n.status,[me.ERR_BAD_REQUEST,me.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ag(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Tg(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 b=s,y=0;for(;b!==o;)y+=n[b++],b=b%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const x=f&&l-f;return x?Math.round(y*1e3/x):void 0}}function Lg(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(),b=f-n;b>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-b)))},()=>o&&a(o)]}const Ts=(e,t,n=3)=>{let r=0;const o=Tg(50,250);return Lg(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const b={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(b)},n)},Mu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Pu=e=>(...t)=>R.asap(()=>e(...t));var Og=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=R.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Fg=ft.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 Dg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function kg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ju(e,t){return e&&!Dg(t)?kg(e,t):t}const Bu=e=>e instanceof Wt?{...e}:e;function rr(e,t){t=t||{};const n={};function r(l,f,b){return R.isPlainObject(l)&&R.isPlainObject(f)?R.merge.call({caseless:b},l,f):R.isPlainObject(f)?R.merge({},f):R.isArray(f)?f.slice():f}function o(l,f,b){if(R.isUndefined(f)){if(!R.isUndefined(l))return r(void 0,l,b)}else return r(l,f,b)}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,b){if(b in t)return r(l,f);if(b 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(Bu(l),Bu(f),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(f){const b=c[f]||o,y=b(e[f],t[f],f);R.isUndefined(y)&&b!==i||(n[f]=y)}),n}var Vu=e=>{const t=rr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Wt.from(a),t.url=Lu(ju(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(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(b=>b.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(ft.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&Og(t.url))){const l=o&&s&&Fg.read(s);l&&a.set(o,l)}return t},Ng=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Vu(e);let s=o.data;const a=Wt.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,b,y,x,m;function h(){x&&x(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function g(){if(!p)return;const v=Wt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:v,config:e,request:p};Ru(function(A){n(A),h()},function(A){r(A),h()},E),p=null}"onloadend"in p?p.onloadend=g:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(g)},p.onabort=function(){p&&(r(new me("Request aborted",me.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new me("Network Error",me.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||Fu;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new me(I,E.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,p)),p=null},s===void 0&&a.setContentType(null),"setRequestHeader"in p&&R.forEach(a.toJSON(),function(I,E){p.setRequestHeader(E,I)}),R.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),l&&([y,m]=Ts(l,!0),p.addEventListener("progress",y)),c&&p.upload&&([b,x]=Ts(c),p.upload.addEventListener("progress",b),p.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(f=v=>{p&&(r(!v||v.type?new kr(null,e,p):v),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const C=Ag(o.url);if(C&&ft.protocols.indexOf(C)===-1){r(new me("Unsupported protocol "+C+":",me.ERR_BAD_REQUEST,e));return}p.send(s||null)})},Rg=(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 me?f:new kr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new me(`timeout ${t} of ms exceeded`,me.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 Mg=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},Pg=async function*(e,t){for await(const n of jg(e))yield*Mg(n,t)},jg=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()}},Gu=(e,t,n,r)=>{const o=Pg(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 b=f.byteLength;if(n){let y=s+=b;n(y)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Ls=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Hu=Ls&&typeof ReadableStream=="function",Bg=Ls&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Wu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Vg=Hu&&Wu(()=>{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}),Zu=64*1024,Ai=Hu&&Wu(()=>R.isReadableStream(new Response("").body)),Os={stream:Ai&&(e=>e.body)};Ls&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Os[t]&&(Os[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new me(`Response type '${t}' is not supported`,me.ERR_NOT_SUPPORT,r)})})})(new Response);const Gg=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(ft.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 Bg(e)).byteLength},Hg=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??Gg(t)};var Wg=Ls&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:b="same-origin",fetchOptions:y}=Vu(e);l=l?(l+"").toLowerCase():"text";let x=Rg([o,s&&s.toAbortSignal()],a),m;const h=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let p;try{if(c&&Vg&&n!=="get"&&n!=="head"&&(p=await Hg(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[A,S]=Mu(p,Ts(Pu(c)));r=Gu(E.body,Zu,A,S)}}R.isString(b)||(b=b?"include":"omit");const g="credentials"in Request.prototype;m=new Request(t,{...y,signal:x,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:g?b:void 0});let C=await fetch(m);const v=Ai&&(l==="stream"||l==="response");if(Ai&&(i||v&&h)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=C[L]});const _=R.toFiniteNumber(C.headers.get("content-length")),[A,S]=i&&Mu(_,Ts(Pu(i),!0))||[];C=new Response(Gu(C.body,Zu,A,()=>{S&&S(),h&&h()}),E)}l=l||"text";let I=await Os[R.findKey(Os,l)||"text"](C,e);return!v&&h&&h(),await new Promise((E,_)=>{Ru(E,_,{data:I,headers:Wt.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:m})})}catch(g){throw h&&h(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new me("Network Error",me.ERR_NETWORK,e,m),{cause:g.cause||g}):me.from(g,g&&g.code,e,m)}});const Ti={http:og,xhr:Ng,fetch:Wg};R.forEach(Ti,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Xu=e=>`- ${e}`,Zg=e=>R.isFunction(e)||e===null||e===!1;var zu={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,!Zg(n)&&(r=Ti[(a=String(n)).toLowerCase()],r===void 0))throw new me(`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(Xu).join(`
34
- `):" "+Xu(s[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Ti};function Li(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kr(null,e)}function Yu(e){return Li(e),e.headers=Wt.from(e.headers),e.data=Si.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zu.getAdapter(e.adapter||wi.adapter)(e).then(function(r){return Li(e),r.data=Si.call(e,e.transformResponse,r),r.headers=Wt.from(r.headers),r},function(r){return Nu(r)||(Li(e),r&&r.response&&(r.response.data=Si.call(e,e.transformResponse,r.response),r.response.headers=Wt.from(r.response.headers))),Promise.reject(r)})}const Ju="1.7.7",Oi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Oi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const qu={};Oi.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Ju+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new me(o(a," has been removed"+(n?" in "+n:"")),me.ERR_DEPRECATED);return n&&!qu[a]&&(qu[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 zg(e,t,n){if(typeof e!="object")throw new me("options must be an object",me.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 me("option "+s+" must be "+c,me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new me("Unknown option "+s,me.ERR_BAD_OPTION)}}var Fi={assertOptions:zg,validators:Oi};const Fn=Fi.validators;let Fs=class{constructor(t){this.defaults=t,this.interceptors={request:new Ou,response:new Ou}}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=rr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Fi.assertOptions(r,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Fi.assertOptions(o,{encode:Fn.function,serialize:Fn.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=Wt.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let f,m=0,y;if(!c){const b=[Yu.bind(this),void 0];for(b.unshift.apply(b,i),b.push.apply(b,l),y=b.length,f=Promise.resolve(n);m<y;)f=f.then(b[m++],b[m++]);return f}y=i.length;let x=n;for(m=0;m<y;){const b=i[m++],h=i[m++];try{x=b(x)}catch(p){h.call(this,p);break}}try{f=Yu.call(this,x)}catch(b){return Promise.reject(b)}for(m=0,y=l.length;m<y;)f=f.then(l[m++],l[m++]);return f}getUri(t){t=rr(this.defaults,t);const n=ju(t.baseURL,t.url);return Lu(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){Fs.prototype[t]=function(n,r){return this.request(rr(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(rr(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Fs.prototype[t]=n(),Fs.prototype[t+"Form"]=n(!0)});var Ds=Fs;class Di{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 kr(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 Di(function(o){t=o}),cancel:t}}}var Yg=Di;function Jg(e){return function(n){return e.apply(null,n)}}function qg(e){return R.isObject(e)&&e.isAxiosError===!0}const ki={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(ki).forEach(([e,t])=>{ki[t]=e});var $g=ki;function $u(e){const t=new Ds(e),n=pu(Ds.prototype.request,t);return R.extend(n,Ds.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return $u(rr(e,o))},n}const Je=$u(wi);Je.Axios=Ds,Je.CanceledError=kr,Je.CancelToken=Yg,Je.isCancel=Nu,Je.VERSION=Ju,Je.toFormData=_s,Je.AxiosError=me,Je.Cancel=Je.CanceledError,Je.all=function(t){return Promise.all(t)},Je.spread=Jg,Je.isAxiosError=qg,Je.mergeConfig=rr,Je.AxiosHeaders=Wt,Je.formToJSON=e=>Du(R.isHTMLForm(e)?new FormData(e):e),Je.getAdapter=zu.getAdapter,Je.HttpStatusCode=$g,Je.default=Je;var Qu=Je,Se={},Dn={};(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={}))})(Dn);var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.getProdHqConfig=pt.getProdApiConfig=pt.getSitHqConfig=pt.getSitApiConfig=pt.getDevHqConfig=pt.getDevApiConfig=void 0;var Nr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},Qg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Nr}};pt.getDevApiConfig=Qg;var Ug=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Nr}};pt.getDevHqConfig=Ug;var Kg=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:Nr}};pt.getSitApiConfig=Kg;var em=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:Nr}};pt.getSitHqConfig=em;var tm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Nr}};pt.getProdApiConfig=tm;var nm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Nr}};pt.getProdHqConfig=nm;var tn={},nn={};Object.defineProperty(nn,"__esModule",{value:!0}),nn.removeValue=nn.getValue=nn.setValue=void 0;var Ni={};function rm(e,t){Ni[e]=t}nn.setValue=rm;function om(e){return Ni[e]}nn.getValue=om;function sm(e){delete Ni[e]}nn.removeValue=sm,Object.defineProperty(tn,"__esModule",{value:!0}),tn.removeItemFromStorage=tn.setItemInStorage=tn.getItemFromStorage=void 0;var Rr=Dn,Mr=nn,am=function(e,t){switch(t===void 0&&(t=(0,Mr.getValue)("PLATFORM")),t){case Rr.PLATFORM.WEB:return sessionStorage.getItem(e);case Rr.PLATFORM.MOBILE:return(0,Mr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};tn.getItemFromStorage=am;var im=function(e,t,n){switch(n===void 0&&(n=(0,Mr.getValue)("PLATFORM")),n){case Rr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Rr.PLATFORM.MOBILE:return(0,Mr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};tn.setItemInStorage=im;var cm=function(e,t){switch(t===void 0&&(t=(0,Mr.getValue)("PLATFORM")),t){case Rr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Rr.PLATFORM.MOBILE:(0,Mr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};tn.removeItemFromStorage=cm;var lm=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(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},um=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(Se,"__esModule",{value:!0}),Se.expireToken=Se.invalidateToken=Se.validateToken=Se.validateAccount=Se.getConfig=Se.introduceDelay=Se.isTokenInExpiryWindow=Se.getStoredAuthData=Se.setUserDetails=Se.getRefreshInterval=Se.setTokenAndExpiry=Se.getRandomDelay=Se.hasValidToken=void 0;var gn=Dn,Pr=pt,St=tn,Ri=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Mi=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};Se.validateAccount=Mi;var dm=function(e){var t=Mi(e);return!Uu()&&t};Se.validateToken=dm;var fm=function(e){return e.apiRetry?e.apiRetry>0:!1};Se.invalidateToken=fm;var pm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Se.expireToken=pm;var hm=function(e){var t=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Ri(),o=Mi(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Se.hasValidToken=hm;var gm=function(){return Math.floor(Math.random()*6e4)+6e4};Se.getRandomDelay=gm;var mm=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)};Se.setUserDetails=mm;var bm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,St.setItemInStorage)("hiverAuthToken",e),(0,St.setItemInStorage)("hiverAuthTokenExpiry",t)};Se.setTokenAndExpiry=bm;var ym=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}};Se.getStoredAuthData=ym;var Uu=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Ri(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Se.isTokenInExpiryWindow=Uu;var Cm=function(e){return lm(void 0,void 0,void 0,function(){return um(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Se.introduceDelay=Cm;var xm=function(e,t,n){switch(n===void 0&&(n=!0),t){case gn.TIERS.SIT:case gn.TIERS.QA:return n?(0,Pr.getSitApiConfig)(e):(0,Pr.getSitHqConfig)(e);case gn.TIERS.PRODUCTION:case gn.TIERS.PROD:return n?(0,Pr.getProdApiConfig)():(0,Pr.getProdHqConfig)();case gn.TIERS.DEV:default:return n?(0,Pr.getDevApiConfig)():(0,Pr.getDevHqConfig)()}};Se.getConfig=xm;var vm=function(){try{var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return gn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Ri();return t.getTime()-n.getTime()>gn.TWO_MINUTES_IN_MS?t.getTime()-gn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),gn.REFETCH_CHECK_DELAY}};Se.getRefreshInterval=vm;var Fo={},Zt={},Ku;function ed(){if(Ku)return Zt;Ku=1;var e=ge&&ge.__awaiter||function(b,h,p,g){function C(v){return v instanceof p?v:new p(function(I){I(v)})}return new(p||(p=Promise))(function(v,I){function E(S){try{A(g.next(S))}catch(L){I(L)}}function _(S){try{A(g.throw(S))}catch(L){I(L)}}function A(S){S.done?v(S.value):C(S.value).then(E,_)}A((g=g.apply(b,h||[])).next())})},t=ge&&ge.__generator||function(b,h){var p={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},g,C,v,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(A){return function(S){return _([A,S])}}function _(A){if(g)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(p=0)),p;)try{if(g=1,C&&(v=A[0]&2?C.return:A[0]?C.throw||((v=C.return)&&v.call(C),0):C.next)&&!(v=v.call(C,A[1])).done)return v;switch(C=0,v&&(A=[A[0]&2,v.value]),A[0]){case 0:case 1:v=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,C=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(v=p.trys,!(v=v.length>0&&v[v.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!v||A[1]>v[0]&&A[1]<v[3])){p.label=A[1];break}if(A[0]===6&&p.label<v[1]){p.label=v[1],v=A;break}if(v&&p.label<v[2]){p.label=v[2],p.ops.push(A);break}v[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(b,p)}catch(S){A=[6,S],C=0}finally{g=v=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.logoutFromHeimdall=Zt.getTenantLoginCode=Zt.getLoginToken=Zt.getAccessToken=void 0;var n=Dn,r=sd(),o=Se,s=function(b,h,p,g){var C=(0,o.getStoredAuthData)(),v=p===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":v},data:{user_id:h.userId,usergroup_id:h.usergroupId,access_token:(C==null?void 0:C.token)||"",source:g}}},a=function(b,h,p,g,C){var v=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:h.heimdallUrl,url:h.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},headers:{"x-hiver-tenant":v,"x-hiver-userid":g,"x-hiver-usergroupid":C}}},i=function(b,h){var p=h===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":p}}},c=function(b){return parseInt(b,10)},l=function(b,h,p,g){return{root_url:p===n.TENANT_PLATFORM.HIVERWEB?b.hotUrl:b.v2Url,url:p===n.TENANT_PLATFORM.HIVERWEB?b.apiEndpoints.hotLogin:b.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(h.userId),app:g||n.APP_UI.DEFAULT}}},f=function(b,h,p,g,C){return e(void 0,void 0,void 0,function(){var v,I,E,_,A,S,L;return t(this,function(k){switch(k.label){case 0:console.log("GETTOKEN tenantPlatform -> ",g),k.label=1;case 1:return k.trys.push([1,5,,6]),!(0,o.validateToken)(p)||(0,o.invalidateToken)(p)?(console.log("HEIMDALL: No valid token, fetching token"),v=s(h,p,g,C),[4,(0,r.performAxiosCall)(v)]):[3,3];case 2:return I=k.sent(),[2,{atToken:(_=I==null?void 0:I.data.at)===null||_===void 0?void 0:_.token,expiryTime:(A=I==null?void 0:I.data.at)===null||A===void 0?void 0:A.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=k.sent(),E;case 6:return[2]}})})};Zt.getAccessToken=f;var m=function(b,h,p,g,C,v){return e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k;return t(this,function(D){switch(D.label){case 0:I=a(b,p,g,C,v),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return E=D.sent(),[2,{userId:(A=E==null?void 0:E.data)===null||A===void 0?void 0:A.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:(k=E==null?void 0:E.data.at)===null||k===void 0?void 0:k.expires_at}];case 3:throw _=D.sent(),_;case 4:return[2]}})})};Zt.getLoginToken=m;var y=function(b,h,p,g,C){return e(void 0,void 0,void 0,function(){var v,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",C),v=l(h,p,g,C),[4,(0,r.performAxiosCall)(v)];case 1:return I=_.sent(),[2,I==null?void 0:I.data.code];case 2:throw E=_.sent(),E;case 3:return[2]}})})};Zt.getTenantLoginCode=y;var x=function(b,h,p){return p===void 0&&(p=0),e(void 0,void 0,void 0,function(){var g,C,v;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),g=i(b,h),[4,(0,r.performAxiosCall)(g)];case 1:return C=I.sent(),[2,C==null?void 0:C.status];case 2:return v=I.sent(),p<2?[4,x(b,h,p+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw v;case 5:return[2]}})})};return Zt.logoutFromHeimdall=x,Zt}var ks={},Em=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(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Im=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(ks,"__esModule",{value:!0}),ks.subscribeToOnlineEvent=void 0;var td=Dn,wm=nn,_m=function(e,t){switch(t===void 0&&(t=(0,wm.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case td.PLATFORM.WEB:return window.addEventListener("online",function(){return Em(void 0,void 0,void 0,function(){return Im(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 td.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};ks.subscribeToOnlineEvent=_m;var nd;function rd(){if(nd)return Fo;nd=1;var e=ge&&ge.__awaiter||function(b,h,p,g){function C(v){return v instanceof p?v:new p(function(I){I(v)})}return new(p||(p=Promise))(function(v,I){function E(S){try{A(g.next(S))}catch(L){I(L)}}function _(S){try{A(g.throw(S))}catch(L){I(L)}}function A(S){S.done?v(S.value):C(S.value).then(E,_)}A((g=g.apply(b,h||[])).next())})},t=ge&&ge.__generator||function(b,h){var p={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},g,C,v,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(A){return function(S){return _([A,S])}}function _(A){if(g)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(p=0)),p;)try{if(g=1,C&&(v=A[0]&2?C.return:A[0]?C.throw||((v=C.return)&&v.call(C),0):C.next)&&!(v=v.call(C,A[1])).done)return v;switch(C=0,v&&(A=[A[0]&2,v.value]),A[0]){case 0:case 1:v=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,C=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(v=p.trys,!(v=v.length>0&&v[v.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!v||A[1]>v[0]&&A[1]<v[3])){p.label=A[1];break}if(A[0]===6&&p.label<v[1]){p.label=v[1],v=A;break}if(v&&p.label<v[2]){p.label=v[2],p.ops.push(A);break}v[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(b,p)}catch(S){A=[6,S],C=0}finally{g=v=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.fetchAccessToken=void 0;var n=ed(),r=Dn,o=Se,s=ks,a,i,c,l=function(b,h,p,g,C,v){return v===void 0&&(v=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k,D,N;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:",v,g),E=void 0,C?[4,C()]:[3,3];case 2:return E=P.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,h,g,v)];case 4:E=P.sent(),P.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,b,g,h.userId,h.usergroupId)];case 6:return _=P.sent(),A=_.userId,S=_.userGroupId,L=_.atToken,k=_.expiryTime,(0,o.setTokenAndExpiry)(L,k),(0,o.setUserDetails)(A,S),[3,12];case 7:D=P.sent(),console.log("ERROR debug: in error login:",D,v),N=p,P.label=8;case 8:return N<I?[4,l(b,h,N+1,g,C,v)]:[3,11];case 9:P.sent(),P.label=10;case 10:return N++,[3,8];case 11:throw D;case 12:return[2]}})})},f=function(b,h,p,g,C){return e(void 0,void 0,void 0,function(){var v,I,E,_;return t(this,function(A){switch(A.label){case 0:return h<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,b)})]:[3,3];case 1:return A.sent(),h+=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),v=p.retryDelay,I=p.configs,E=p.apiParams,_=p.appUI,[4,m(v,b,h,I,E,g,C,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},m=function(b,h,p,g,C,v,I,E,_){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var A,S,L,k,D,N,P,B,Y,$,H,X,q,se;return t(this,function(de){switch(de.label){case 0:return de.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,g,C,v,E)];case 1:return A=de.sent(),S=A.atToken,L=A.expiryTime,k=A.userId,D=A.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),k&&D&&(0,o.setUserDetails)(k,D),b=r.INITIAL_RETRY_DELAY,h=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return N=de.sent(),console.log("ERROR: Heimdall fetch token",N),((Y=N.response)===null||Y===void 0?void 0:Y.status)===401||(($=N.request)===null||$===void 0?void 0:$.status)===401?(P=1,[4,l(g,C,P,v,I,_)]):[3,4];case 3:return de.sent(),[3,11];case 4:return((H=N.response)===null||H===void 0?void 0:H.status)===409||((X=N.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),B={retryDelay:b,configs:g,apiParams:C,appUI:_},[4,f(h,p,B,v,I)]):[3,6];case 5:if(de.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw N;return[3,11];case 6:if(!(((q=N.response)===null||q===void 0?void 0:q.status)===422||((se=N.request)===null||se===void 0?void 0:se.status)===422))return[3,7];throw console.log("ERROR: Throwing error",N.response.status),N;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(V){return setTimeout(V,b)})]:[3,10];case 8:return de.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,m(b,h,p,g,C,v,I,_)];case 9:return de.sent(),[3,11];case 10:throw N;case 11:return[3,12];case 12:return[2]}})})},y=function(b,h,p,g,C,v,I,E){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),g===void 0&&(g=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var _,A,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),_=(0,o.isTokenInExpiryWindow)(),_?(A=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(A)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,m(p,g,C,b,h,v,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]}})})},x=function(b,h,p,g,C,v,I){return e(void 0,void 0,void 0,function(){var E,_,A,S,L,k;return t(this,function(D){switch(D.label){case 0:a=b,i=h,E=r.INITIAL_RETRY_DELAY,_=r.INITIAL_RETRY_DELAY,A=0,S=(0,o.getConfig)(a,i),console.log("Instance: Fetch Call"),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,m(E,_,A,S,p,g,C,v,I)];case 2:return D.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return y(S,p,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,g,C,I)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(N){switch(N.label){case 0:return[4,y(S,p,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,g,C,I)];case 1:return N.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return k=D.sent(),console.log("ERROR: Fetching token failed",k),[3,4];case 4:return[2]}})})};return Fo.fetchAccessToken=x,Fo}var od;function sd(){if(od)return tr;od=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(h){for(var p,g=1,C=arguments.length;g<C;g++){p=arguments[g];for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(h[v]=p[v])}return h},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(h,p,g,C){function v(I){return I instanceof g?I:new g(function(E){E(I)})}return new(g||(g=Promise))(function(I,E){function _(L){try{S(C.next(L))}catch(k){E(k)}}function A(L){try{S(C.throw(L))}catch(k){E(k)}}function S(L){L.done?I(L.value):v(L.value).then(_,A)}S((C=C.apply(h,p||[])).next())})},n=ge&&ge.__generator||function(h,p){var g={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},C,v,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 A([S,L])}}function A(S){if(C)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(g=0)),g;)try{if(C=1,v&&(I=S[0]&2?v.return:S[0]?v.throw||((I=v.return)&&I.call(v),0):v.next)&&!(I=I.call(v,S[1])).done)return I;switch(v=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return g.label++,{value:S[1],done:!1};case 5:g.label++,v=S[1],S=[0];continue;case 7:S=g.ops.pop(),g.trys.pop();continue;default:if(I=g.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){g=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){g.label=S[1];break}if(S[0]===6&&g.label<I[1]){g.label=I[1],I=S;break}if(I&&g.label<I[2]){g.label=I[2],g.ops.push(S);break}I[2]&&g.ops.pop(),g.trys.pop();continue}S=p.call(h,g)}catch(L){S=[6,L],v=0}finally{C=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.hiverAxiosCall=tr.performAxiosCall=void 0;var r=Qu,o=Se,s=rd(),a=tn,i=Dn,c,l=2,f=function(h,p){var g=p.fetchCsrfToken();h.formData?h.formData.append("_csrf_token",g):(h.data=h.data||{},h.data._csrf_token=g)},m=function(h,p){var g={};!h.method||h.method.toLowerCase()==="get"?g={params:h.params?h.params:h.data}:g=h.params?{params:h,data:h.data}:{data:h.data};var C=e(e({method:h.method,url:"".concat(h.root_url).concat(h.url),headers:h.headers},g),{withCredentials:p,responseType:(h==null?void 0:h.responseType)||""});return C};function y(h,p){return p===void 0&&(p=!0),t(this,void 0,void 0,function(){var g;return n(this,function(C){return g=m(h,p),[2,(0,r.default)(g).then(function(v){return v}).catch(function(v){throw v})]})})}tr.performAxiosCall=y;function x(h,p,g){return t(this,void 0,void 0,function(){var C,v,I;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),h.authTokenFetchingInProgress?[3,2]:(h.authTokenFetchingInProgress=!0,C=h.appEnv,v=h.tier,[4,(0,s.fetchAccessToken)(C,v,p,h.tenantPlatform,h.getTokenForLogin,g)]);case 1:return E.sent(),h.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,x(h,p,g)];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),h.authTokenFetchingInProgress=!1,[4,x(h,p,g)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function b(h,p,g,C,v){var I,E;return v===void 0&&(v=0),t(this,void 0,void 0,function(){var _,A,S,L,k,D,N;return n(this,function(P){switch(P.label){case 0:if(P.trys.push([0,4,,5]),!(g.getToken&&!(0,o.hasValidToken)(p)))return[3,2];if(_=h.appEnv,A=h.tier,!_||!A)throw Error("appEnv or tier missing : ".concat(_,"/").concat(A));return"userId"in p&&"usergroupId"in p?(S={userId:p.userId,usergroupId:p.usergroupId},[4,x(h,S,C)]):[3,2];case 1:P.sent(),P.label=2;case 2:return h.csrfToken&&f(p,g),L=h.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,p.headers=e(e({},p.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),g.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",p.headers=e(e({},p.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",p),[4,y(p,h.withCredentials)];case 3:return k=P.sent(),p.onSuccess&&p.onSuccess(k),[2,k];case 4:if(D=P.sent(),N=((I=D.response)===null||I===void 0?void 0:I.status)===403||((E=D.request)===null||E===void 0?void 0:E.status)===403,v<l&&N)return(0,o.expireToken)(),[2,b(h,p,g,C,v+1)];if(v>=l&&N||!N)throw p.onFail&&p.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return tr.hiverAxiosCall=b,tr}var Do={},Be={},We={};Object.defineProperty(We,"__esModule",{value:!0}),We.TIERS=We.APP_UI=We.CONFIG_HIVER=We.REFETCH_CHECK_DELAY=We.INITIAL_RETRY_DELAY=We.MAX_BACKOFF_LIMIT=We.MAX_CONFLICT_RETRY_DELAY=We.MAX_RETRY_DELAY=We.GET_METHOD=void 0,We.GET_METHOD="GET",We.MAX_RETRY_DELAY=18e4,We.MAX_CONFLICT_RETRY_DELAY=63e3,We.MAX_BACKOFF_LIMIT=8e3,We.INITIAL_RETRY_DELAY=1e3,We.REFETCH_CHECK_DELAY=168e4,We.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},We.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},We.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 jr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},Sm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:jr}};ht.getDevApiConfig=Sm;var Am=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:jr}};ht.getDevHqConfig=Am;var Tm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:jr}};ht.getSitApiConfig=Tm;var Lm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:jr}};ht.getSitHqConfig=Lm;var Om=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:jr}};ht.getProdApiConfig=Om;var Fm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:jr}};ht.getProdHqConfig=Fm;var Dm=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(m){a(m)}}function c(f){try{l(r.throw(f))}catch(m){a(m)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},km=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(Be,"__esModule",{value:!0}),Be.expireToken=Be.validateToken=Be.validateAccount=Be.getConfig=Be.introduceDelay=Be.isTokenInExpiryWindow=Be.getStoredAuthData=Be.setUserDetails=Be.setTokenAndExpiry=Be.getRandomDelay=Be.hasValidToken=void 0;var Pi=We,or=ht,ad=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},ji=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};Be.validateAccount=ji;var Nm=function(e){var t=ji(e);return!id()&&t};Be.validateToken=Nm;var Rm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Be.expireToken=Rm;var Mm=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=ad(),o=ji(e);return r<n&&o};Be.hasValidToken=Mm;var Pm=function(){return Math.floor(Math.random()*6e4)+6e4};Be.getRandomDelay=Pm;var jm=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)};Be.setUserDetails=jm;var Bm=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Be.setTokenAndExpiry=Bm;var Vm=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}};Be.getStoredAuthData=Vm;var id=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=ad(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Be.isTokenInExpiryWindow=id;var Gm=function(e){return Dm(void 0,void 0,void 0,function(){return km(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Be.introduceDelay=Gm;var Hm=function(e,t,n){switch(t){case Pi.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,or.getSitHqConfig)(e)),n?(0,or.getSitApiConfig)(e):(0,or.getSitHqConfig)(e);case Pi.TIERS.PROD:return n?(0,or.getProdApiConfig)():(0,or.getProdHqConfig)();case Pi.TIERS.DEV:default:return n?(0,or.getDevApiConfig)():(0,or.getDevHqConfig)()}};Be.getConfig=Hm;var ko={},mn={},cd;function Wm(){if(cd)return mn;cd=1;var e=ge&&ge.__awaiter||function(y,x,b,h){function p(g){return g instanceof b?g:new b(function(C){C(g)})}return new(b||(b=Promise))(function(g,C){function v(_){try{E(h.next(_))}catch(A){C(A)}}function I(_){try{E(h.throw(_))}catch(A){C(A)}}function E(_){_.done?g(_.value):p(_.value).then(v,I)}E((h=h.apply(y,x||[])).next())})},t=ge&&ge.__generator||function(y,x){var b={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},h,p,g,C;return C={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function v(E){return function(_){return I([E,_])}}function I(E){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(b=0)),b;)try{if(h=1,p&&(g=E[0]&2?p.return:E[0]?p.throw||((g=p.return)&&g.call(p),0):p.next)&&!(g=g.call(p,E[1])).done)return g;switch(p=0,g&&(E=[E[0]&2,g.value]),E[0]){case 0:case 1:g=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,p=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(g=b.trys,!(g=g.length>0&&g[g.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){b.label=E[1];break}if(E[0]===6&&b.label<g[1]){b.label=g[1],g=E;break}if(g&&b.label<g[2]){b.label=g[2],b.ops.push(E);break}g[2]&&b.ops.pop(),b.trys.pop();continue}E=x.call(y,b)}catch(_){E=[6,_],p=0}finally{h=g=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(mn,"__esModule",{value:!0}),mn.getV2LoginCode=mn.getLoginToken=mn.getAccessToken=void 0;var n=We,r=fd(),o=Be,s=function(y,x,b){var h=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:x.userId,usergroup_id:x.usergroupId,access_token:(h==null?void 0:h.token)||"",source:b},withCredentials:!0}},a=function(y,x){return{root_url:x.heimdallUrl,url:x.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,x){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:x||n.APP_UI.DEFAULT}}},l=function(y,x,b,h){return e(void 0,void 0,void 0,function(){var p,g,C,v,I,E,_;return t(this,function(A){switch(A.label){case 0:return A.trys.push([0,4,,5]),(0,o.validateToken)(b)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),p=s(x,b,h),[4,(0,r.makeAxiosCall)(p,y)]);case 1:return g=A.sent(),[2,{atToken:(v=g==null?void 0:g.data.at)===null||v===void 0?void 0:v.token,expiryTime:(I=g==null?void 0:g.data.at)===null||I===void 0?void 0:I.expires_at,userId:(E=g==null?void 0:g.data)===null||E===void 0?void 0:E.user_id,userGroupId:(_=g==null?void 0:g.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 C=A.sent(),C;case 5:return[2]}})})};mn.getAccessToken=l;var f=function(y,x,b){return e(void 0,void 0,void 0,function(){var h,p,g,C,v,I,E;return t(this,function(_){switch(_.label){case 0:h=a(y,b),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(h,x)];case 2:return p=_.sent(),[2,{userId:(C=p==null?void 0:p.data)===null||C===void 0?void 0:C.user_id,userGroupId:(v=p==null?void 0:p.data)===null||v===void 0?void 0:v.usergroup_id,atToken:(I=p==null?void 0:p.data.at)===null||I===void 0?void 0:I.token,expiryTime:(E=p==null?void 0:p.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw g=_.sent(),g;case 4:return[2]}})})};mn.getLoginToken=f;var m=function(y,x,b){return e(void 0,void 0,void 0,function(){var h,p,g;return t(this,function(C){switch(C.label){case 0:return C.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),h=c(x,b),[4,(0,r.makeAxiosCall)(h,y)];case 1:return p=C.sent(),console.log("DEBUG HEIMDALL: local storage:",p==null?void 0:p.data),[2,p==null?void 0:p.data.code];case 2:throw g=C.sent(),g;case 3:return[2]}})})};return mn.getV2LoginCode=m,mn}var ld;function ud(){if(ld)return ko;ld=1;var e=ge&&ge.__awaiter||function(x,b,h,p){function g(C){return C instanceof h?C:new h(function(v){v(C)})}return new(h||(h=Promise))(function(C,v){function I(A){try{_(p.next(A))}catch(S){v(S)}}function E(A){try{_(p.throw(A))}catch(S){v(S)}}function _(A){A.done?C(A.value):g(A.value).then(I,E)}_((p=p.apply(x,b||[])).next())})},t=ge&&ge.__generator||function(x,b){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},p,g,C,v;return v={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function I(_){return function(A){return E([_,A])}}function E(_){if(p)throw new TypeError("Generator is already executing.");for(;v&&(v=0,_[0]&&(h=0)),h;)try{if(p=1,g&&(C=_[0]&2?g.return:_[0]?g.throw||((C=g.return)&&C.call(g),0):g.next)&&!(C=C.call(g,_[1])).done)return C;switch(g=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,g=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){h.label=_[1];break}if(_[0]===6&&h.label<C[1]){h.label=C[1],C=_;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(_);break}C[2]&&h.ops.pop(),h.trys.pop();continue}_=b.call(x,h)}catch(A){_=[6,A],g=0}finally{p=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(ko,"__esModule",{value:!0}),ko.fetchToken=void 0;var n=Wm(),r=We,o=Be,s,a,i,c=function(x,b,h){return h===void 0&&(h=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var p,g,C,v,I,E,_,A,S;return t(this,function(L){switch(L.label){case 0:p=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",h),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,x,h)];case 2:return g=L.sent(),[4,(0,n.getLoginToken)(g,r.CONFIG_HIVER,x)];case 3:return C=L.sent(),v=C.userId,I=C.userGroupId,E=C.atToken,_=C.expiryTime,(0,o.setTokenAndExpiry)(E,_),(0,o.setUserDetails)(v,I),[3,9];case 4:A=L.sent(),console.log("ERROR debug: in error login:",A,h),S=b,L.label=5;case 5:return S<p?[4,c(x,S+1,h)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},l=function(x,b,h){return e(void 0,void 0,void 0,function(){var p,g,C,v;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,x)})]:[3,3];case 1:return I.sent(),b+=x,x*2<=r.MAX_BACKOFF_LIMIT?x*=2:x=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",x),p=h.retryDelay,g=h.configs,C=h.api_params,v=h.appUI,[4,f(p,x,b,g,C,v)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},f=function(x,b,h,p,g,C,v){return C===void 0&&(C="default"),e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k,D,N,P,B,Y,$,H;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,p,g,C)];case 1:return I=X.sent(),E=I.atToken,_=I.expiryTime,A=I.userId,S=I.userGroupId,E&&_&&(0,o.setTokenAndExpiry)(E,_),A&&S&&(0,o.setUserDetails)(A,S),x=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return L=X.sent(),console.log("ERROR: Heimdall fetch token",L),((N=L.response)===null||N===void 0?void 0:N.status)===401||((P=L.request)===null||P===void 0?void 0:P.status)===401?(k=1,[4,c(p,k,v)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((B=L.response)===null||B===void 0?void 0:B.status)===409||((Y=L.request)===null||Y===void 0?void 0:Y.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:x,configs:p,api_params:g,appUI:v},[4,l(b,h,D)]):[3,6];case 5:if(X.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!((($=L.response)===null||$===void 0?void 0:$.status)===422||((H=L.request)===null||H===void 0?void 0:H.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return x<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,x)})]:[3,10];case 8:return X.sent(),x*=2,console.log("Heimdall: Fetch token post doubling retry delay",x),[4,f(x,b,h,p,g,v)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},m=function(x,b,h,p,g,C){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),p===void 0&&(p=r.INITIAL_RETRY_DELAY),g===void 0&&(g=0),e(void 0,void 0,void 0,function(){var v,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),v=(0,o.isTokenInExpiryWindow)(),v?(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(h,p,g,x,b,C)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw E=_.sent(),E;case 5:return[2]}})})},y=function(x,b,h,p,g,C){return e(void 0,void 0,void 0,function(){var v,I,E,_,A;return t(this,function(S){switch(S.label){case 0:s=x,a=b,v=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,E=0,_=(0,o.getConfig)(s,a,p),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(v,I,E,_,h,g,C)];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 m(_,h)},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,m(_,h)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return ko.fetchToken=y,ko}var dd;function fd(){if(dd)return Do;dd=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(y){for(var x,b=1,h=arguments.length;b<h;b++){x=arguments[b];for(var p in x)Object.prototype.hasOwnProperty.call(x,p)&&(y[p]=x[p])}return y},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(y,x,b,h){function p(g){return g instanceof b?g:new b(function(C){C(g)})}return new(b||(b=Promise))(function(g,C){function v(_){try{E(h.next(_))}catch(A){C(A)}}function I(_){try{E(h.throw(_))}catch(A){C(A)}}function E(_){_.done?g(_.value):p(_.value).then(v,I)}E((h=h.apply(y,x||[])).next())})},n=ge&&ge.__generator||function(y,x){var b={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},h,p,g,C;return C={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function v(E){return function(_){return I([E,_])}}function I(E){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(b=0)),b;)try{if(h=1,p&&(g=E[0]&2?p.return:E[0]?p.throw||((g=p.return)&&g.call(p),0):p.next)&&!(g=g.call(p,E[1])).done)return g;switch(p=0,g&&(E=[E[0]&2,g.value]),E[0]){case 0:case 1:g=E;break;case 4:return b.label++,{value:E[1],done:!1};case 5:b.label++,p=E[1],E=[0];continue;case 7:E=b.ops.pop(),b.trys.pop();continue;default:if(g=b.trys,!(g=g.length>0&&g[g.length-1])&&(E[0]===6||E[0]===2)){b=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){b.label=E[1];break}if(E[0]===6&&b.label<g[1]){b.label=g[1],g=E;break}if(g&&b.label<g[2]){b.label=g[2],b.ops.push(E);break}g[2]&&b.ops.pop(),b.trys.pop();continue}E=x.call(y,b)}catch(_){E=[6,_],p=0}finally{h=g=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Do,"__esModule",{value:!0}),Do.makeAxiosCall=void 0;var r=Qu,o=Be,s=ud(),a,i=2,c=function(y,x){var b=x.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",b):(y.data=y.data||{},y.data._csrf_token=b)},l=function(y){var x=!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},x),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return b};function f(y){return t(this,void 0,void 0,function(){var x;return n(this,function(b){return x=l(y),[2,(0,r.default)(x).then(function(h){return h}).catch(function(h){throw h})]})})}function m(y,x,b,h){var p,g;return h===void 0&&(h=0),t(this,void 0,void 0,function(){var C,v,I,E,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(x.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(C=y.app_env,v=y.tier,!C||!v)throw Error("app_env or tier missing : ".concat(C,"/").concat(v));return"userId"in y&&"usergroupId"in y?(I={userId:y.userId,usergroupId:y.usergroupId},typeof x.isHiverApiDomain!="boolean"&&(x.isHiverApiDomain=!0),[4,(0,s.fetchToken)(C,v,I,x.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,x),x.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(),A=((p=_.response)===null||p===void 0?void 0:p.status)===403||((g=_.request)===null||g===void 0?void 0:g.status)===403,h<i&&A)return(0,o.expireToken)(),[2,m(y,x,b,h+1)];if(h>=i&&A||!A)throw y.onFail&&y.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Do.makeAxiosCall=m,Do}(function(e){var t=ge&&ge.__awaiter||function(x,b,h,p){function g(C){return C instanceof h?C:new h(function(v){v(C)})}return new(h||(h=Promise))(function(C,v){function I(A){try{_(p.next(A))}catch(S){v(S)}}function E(A){try{_(p.throw(A))}catch(S){v(S)}}function _(A){A.done?C(A.value):g(A.value).then(I,E)}_((p=p.apply(x,b||[])).next())})},n=ge&&ge.__generator||function(x,b){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},p,g,C,v;return v={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function I(_){return function(A){return E([_,A])}}function E(_){if(p)throw new TypeError("Generator is already executing.");for(;v&&(v=0,_[0]&&(h=0)),h;)try{if(p=1,g&&(C=_[0]&2?g.return:_[0]?g.throw||((C=g.return)&&C.call(g),0):g.next)&&!(C=C.call(g,_[1])).done)return C;switch(g=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,g=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){h.label=_[1];break}if(_[0]===6&&h.label<C[1]){h.label=C[1],C=_;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(_);break}C[2]&&h.ops.pop(),h.trys.pop();continue}_=b.call(x,h)}catch(A){_=[6,A],g=0}finally{p=C=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=sd(),o=rd(),s=Dn;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=ed(),i=Se,c=tn,l=fd();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=ud();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var m=nn,y=function(){function x(b,h,p,g,C,v){p===void 0&&(p=s.TENANT_PLATFORM.GMAIL),g===void 0&&(g=null),C===void 0&&(C=!0),v===void 0&&(v=!1),this.setEnvironment(),this.appEnv=b,this.tier=h,this.tenantPlatform=p,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=g,this.withCredentials=C,this.csrfToken=v}return x.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,m.setValue)("PLATFORM",s.PLATFORM.WEB):(0,m.setValue)("PLATFORM",s.PLATFORM.MOBILE)},x.prototype.hiverAxios=function(b,h,p,g){return h===void 0&&(h=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var C,v;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),g&&g<2?(C={userId:b.userId,usergroupId:b.usergroupId,apiRetry:g},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,C,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,h,p)];case 3:return[2,I.sent()];case 4:throw v=I.sent(),console.log("ERROR: Axios call failed",v),v;case 5:return[2]}})})},x.prototype.fetchAuthToken=function(b,h,p){return t(this,void 0,void 0,function(){var g;return n(this,function(C){switch(C.label){case 0:return C.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,h,p)]);case 1:return C.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),C.label=3;case 3:return[3,8];case 4:return g=C.sent(),console.log("ERROR: Fetching token failed",g),this.authTokenFetchingInProgress=!1,[4,new Promise(function(v){return setTimeout(v,100)})];case 5:return C.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,h,p)];case 6:return C.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},x.prototype.logout=function(){return t(this,void 0,void 0,function(){var b,h;return n(this,function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),b=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(b,this.tenantPlatform)];case 1:return p.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw h=p.sent(),console.error("Heimdall: Logout failed",h),h;case 3:return[2]}})})},x.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},x}();e.Bifrost=y})(gi);const Xt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},kt=()=>{if(!Xt.isInitiated)return null;if(!Xt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Xt},Zm=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=gi.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Xt.baseUrl=e,Xt.appEnv=t,Xt.tier=n,Xt.userGroupId=o,Xt.userId=r,Xt.tenantPlatform=s,Xt.bifrost=new gi.Bifrost(t,n,s,i,a),Xt.isInitiated=!0},we=(({configHiver:e})=>async n=>{const r=kt();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,m={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(m,{...e,isHiverApiDomain:!0}))}catch(y){throw console.error("API call failed with error: ",y),y}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Xm=e=>T.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1180_840)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1180_840"},T.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),zm=e=>T.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),T.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"}),T.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),Ym=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_825_73646)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_825_73646"},T.createElement("rect",{width:24,height:24,fill:"white"})))),Jm="Rate your experience with Hiver Apps",qm="Share feedback on Apps",$m="Got any feedback?",pd="https://txeep2wshyx.typeform.com/to/RuOwF9SG",Qm="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",Um="https://cdn.hiverhq.com/chat-support/hiver-chat.html",Km="enable_connectors_clicked",e3="learn_more_clicked",t3="connector_card_expand_clicked",n3="connector_card_collapsed_clicked",r3="connector_card_refresh_clicked",o3="connector_cards_loaded",s3="connector_whats_new_card_viewed",a3="connector_whats_new_explore_now_clicked",i3="connector_whats_new_learn_more_clicked",c3="connector_whats_new_dismissed",l3="connector_create_new_object_clicked",u3="connector_link_new_object_clicked",d3="connector_new_object_created_by_form",f3="connector_new_object_linked_by_form",p3="connector_object_unlinked_by_form",h3="connector_link_preview_clicked",g3="connector_create_panel_cancel_clicked",m3="connector_create_panel_back_clicked",b3="card_loaded_on_click",y3="card_loaded",C3="schedule_call_clicked",x3="schedule_call_cross_clicked",hd="CONNECTOR_EDIT_CLICKED",v3="CONNECTOR_EDIT_REQUEST_SEND",E3="CONNECTOR_EDIT_CANCELLED",I3="CONNECTOR_EDIT_BACK_CLICKED",w3="CONNECTOR_EDIT_SUCCESS",_3="connector_video_clicked",S3="connector_card_error",Bi="got_any_feedback_clicked",A3="connector_deeplink_clicked",T3="search_bar_tapped",L3="search_suggestions_selected",O3="search_initiated",F3="no_results_found",D3="search_results_found",k3="search_result_selected",N3="search_result_linked",R3="feedback_closed_clicked",M3="help_btn_clicked",P3="connector_chat_support_clicked",j3="add_custom_field_clicked",B3="add_custom_field_success",V3="update_custom_field_success",gd="clicked_on_lookup_config",G3="clicked_on_lookup_field",H3="saved_lookup_config",W3={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Ve=w.createContext(W3),Ns="hiver_connectors",Vi={NOT_FOUND:404},Z3="ftr-connector-blue-dot",md="ftr-connectors-write-flow",X3="ftr-connectors-enhancements",z3="ftr-connector-schedule-call-agent",Y3="ftr-connectors-edit",J3="enableAllConnectorFtr",q3="ftr-cards-open-state",$3="ftr-connectors-global-search",Q3="ftr-connectors-smart-suggestions",U3="ftr-connectors-email-selection",K3="ftr-connector-agent-feedback",Rs="ftr-connector-unified-view",e5="ftr-connectors-expanded-form",bd="ftr-apps-lookup-revamp",t5="ftr-ci-configurable-fields",yd="Please refresh and try again",n5="No data available",Ms="-",Cd="Refresh",xd="Minimize",Gi="Expand",vd="Connectors",Hi="Apps",r5="Collapse",o5="Close",Ed="Link",s5="Create",a5="Update",Id="Unlink",wd="Edit",Wi="Cancel",_d="Create new object",Sd="Link existing object",i5="Are you sure you want to unlink this object?",c5="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.",l5="Edit card",u5="bullet_list",d5="Expanded",f5="Collapsed",Ad="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Td="UNKNOWN_ERROR",p5="https://help.hiverhq.com/custom-connectors/common-connector-errors",Ld={MAIN_BUTTON:"main_button",ICON:"create_icon"},h5=" Add custom field",Zi=e=>{let t=localStorage.getItem(Ns);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},g5=e=>!!Zi(e),Od=()=>{const{userId:e=""}=kt()||{};return String(e)},m5=(e,t=Od())=>{const n=Zi(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Xi=(e,t=!1,n=!1)=>{const r=Od(),o=Zi(e);if(t||!o){localStorage.removeItem(Ns);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Ns,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(Ns,JSON.stringify(i));return}},tt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[J3])===!0:(e==null?void 0:e[t])===!0,lt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Fd=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?d5:f5,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},Dd=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==Vi.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)!==Vi.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},b5=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)},zi=({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 kd(e,t){return e.length>t?e.substring(0,t)+"...":e}const y5=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1187_180)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1187_180"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),C5=e=>T.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_847_49587)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_847_49587"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),x5=d.keyframes`
34
+ `):" "+Xu(s[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Ti};function Li(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kr(null,e)}function Yu(e){return Li(e),e.headers=Wt.from(e.headers),e.data=Si.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zu.getAdapter(e.adapter||wi.adapter)(e).then(function(r){return Li(e),r.data=Si.call(e,e.transformResponse,r),r.headers=Wt.from(r.headers),r},function(r){return Nu(r)||(Li(e),r&&r.response&&(r.response.data=Si.call(e,e.transformResponse,r.response),r.response.headers=Wt.from(r.response.headers))),Promise.reject(r)})}const Ju="1.7.7",Oi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Oi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const qu={};Oi.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Ju+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new me(o(a," has been removed"+(n?" in "+n:"")),me.ERR_DEPRECATED);return n&&!qu[a]&&(qu[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 Xg(e,t,n){if(typeof e!="object")throw new me("options must be an object",me.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 me("option "+s+" must be "+c,me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new me("Unknown option "+s,me.ERR_BAD_OPTION)}}var Fi={assertOptions:Xg,validators:Oi};const Fn=Fi.validators;let Fs=class{constructor(t){this.defaults=t,this.interceptors={request:new Ou,response:new Ou}}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=rr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Fi.assertOptions(r,{silentJSONParsing:Fn.transitional(Fn.boolean),forcedJSONParsing:Fn.transitional(Fn.boolean),clarifyTimeoutError:Fn.transitional(Fn.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Fi.assertOptions(o,{encode:Fn.function,serialize:Fn.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"],m=>{delete s[m]}),n.headers=Wt.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let f,b=0,y;if(!c){const m=[Yu.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,l),y=m.length,f=Promise.resolve(n);b<y;)f=f.then(m[b++],m[b++]);return f}y=i.length;let x=n;for(b=0;b<y;){const m=i[b++],h=i[b++];try{x=m(x)}catch(p){h.call(this,p);break}}try{f=Yu.call(this,x)}catch(m){return Promise.reject(m)}for(b=0,y=l.length;b<y;)f=f.then(l[b++],l[b++]);return f}getUri(t){t=rr(this.defaults,t);const n=ju(t.baseURL,t.url);return Lu(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){Fs.prototype[t]=function(n,r){return this.request(rr(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(rr(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Fs.prototype[t]=n(),Fs.prototype[t+"Form"]=n(!0)});var Ds=Fs;class Di{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 kr(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 Di(function(o){t=o}),cancel:t}}}var zg=Di;function Yg(e){return function(n){return e.apply(null,n)}}function Jg(e){return R.isObject(e)&&e.isAxiosError===!0}const ki={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(ki).forEach(([e,t])=>{ki[t]=e});var qg=ki;function $u(e){const t=new Ds(e),n=pu(Ds.prototype.request,t);return R.extend(n,Ds.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return $u(rr(e,o))},n}const Je=$u(wi);Je.Axios=Ds,Je.CanceledError=kr,Je.CancelToken=zg,Je.isCancel=Nu,Je.VERSION=Ju,Je.toFormData=_s,Je.AxiosError=me,Je.Cancel=Je.CanceledError,Je.all=function(t){return Promise.all(t)},Je.spread=Yg,Je.isAxiosError=Jg,Je.mergeConfig=rr,Je.AxiosHeaders=Wt,Je.formToJSON=e=>Du(R.isHTMLForm(e)?new FormData(e):e),Je.getAdapter=zu.getAdapter,Je.HttpStatusCode=qg,Je.default=Je;var Qu=Je,Se={},Dn={};(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={}))})(Dn);var pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.getProdHqConfig=pt.getProdApiConfig=pt.getSitHqConfig=pt.getSitApiConfig=pt.getDevHqConfig=pt.getDevApiConfig=void 0;var Nr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},$g=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Nr}};pt.getDevApiConfig=$g;var Qg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Nr}};pt.getDevHqConfig=Qg;var Ug=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:Nr}};pt.getSitApiConfig=Ug;var Kg=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:Nr}};pt.getSitHqConfig=Kg;var em=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Nr}};pt.getProdApiConfig=em;var tm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Nr}};pt.getProdHqConfig=tm;var tn={},nn={};Object.defineProperty(nn,"__esModule",{value:!0}),nn.removeValue=nn.getValue=nn.setValue=void 0;var Ni={};function nm(e,t){Ni[e]=t}nn.setValue=nm;function rm(e){return Ni[e]}nn.getValue=rm;function om(e){delete Ni[e]}nn.removeValue=om,Object.defineProperty(tn,"__esModule",{value:!0}),tn.removeItemFromStorage=tn.setItemInStorage=tn.getItemFromStorage=void 0;var Rr=Dn,Mr=nn,sm=function(e,t){switch(t===void 0&&(t=(0,Mr.getValue)("PLATFORM")),t){case Rr.PLATFORM.WEB:return sessionStorage.getItem(e);case Rr.PLATFORM.MOBILE:return(0,Mr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};tn.getItemFromStorage=sm;var am=function(e,t,n){switch(n===void 0&&(n=(0,Mr.getValue)("PLATFORM")),n){case Rr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Rr.PLATFORM.MOBILE:return(0,Mr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};tn.setItemInStorage=am;var im=function(e,t){switch(t===void 0&&(t=(0,Mr.getValue)("PLATFORM")),t){case Rr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Rr.PLATFORM.MOBILE:(0,Mr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};tn.removeItemFromStorage=im;var cm=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(b){a(b)}}function c(f){try{l(r.throw(f))}catch(b){a(b)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},lm=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(Se,"__esModule",{value:!0}),Se.expireToken=Se.invalidateToken=Se.validateToken=Se.validateAccount=Se.getConfig=Se.introduceDelay=Se.isTokenInExpiryWindow=Se.getStoredAuthData=Se.setUserDetails=Se.getRefreshInterval=Se.setTokenAndExpiry=Se.getRandomDelay=Se.hasValidToken=void 0;var gn=Dn,Pr=pt,St=tn,Ri=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Mi=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};Se.validateAccount=Mi;var um=function(e){var t=Mi(e);return!Uu()&&t};Se.validateToken=um;var dm=function(e){return e.apiRetry?e.apiRetry>0:!1};Se.invalidateToken=dm;var fm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Se.expireToken=fm;var pm=function(e){var t=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Ri(),o=Mi(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Se.hasValidToken=pm;var hm=function(){return Math.floor(Math.random()*6e4)+6e4};Se.getRandomDelay=hm;var gm=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)};Se.setUserDetails=gm;var mm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,St.setItemInStorage)("hiverAuthToken",e),(0,St.setItemInStorage)("hiverAuthTokenExpiry",t)};Se.setTokenAndExpiry=mm;var bm=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}};Se.getStoredAuthData=bm;var Uu=function(){var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Ri(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Se.isTokenInExpiryWindow=Uu;var ym=function(e){return cm(void 0,void 0,void 0,function(){return lm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Se.introduceDelay=ym;var Cm=function(e,t,n){switch(n===void 0&&(n=!0),t){case gn.TIERS.SIT:case gn.TIERS.QA:return n?(0,Pr.getSitApiConfig)(e):(0,Pr.getSitHqConfig)(e);case gn.TIERS.PRODUCTION:case gn.TIERS.PROD:return n?(0,Pr.getProdApiConfig)():(0,Pr.getProdHqConfig)();case gn.TIERS.DEV:default:return n?(0,Pr.getDevApiConfig)():(0,Pr.getDevHqConfig)()}};Se.getConfig=Cm;var xm=function(){try{var e=(0,St.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return gn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Ri();return t.getTime()-n.getTime()>gn.TWO_MINUTES_IN_MS?t.getTime()-gn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),gn.REFETCH_CHECK_DELAY}};Se.getRefreshInterval=xm;var Fo={},Zt={},Ku;function ed(){if(Ku)return Zt;Ku=1;var e=ge&&ge.__awaiter||function(m,h,p,g){function C(v){return v instanceof p?v:new p(function(I){I(v)})}return new(p||(p=Promise))(function(v,I){function E(S){try{A(g.next(S))}catch(L){I(L)}}function _(S){try{A(g.throw(S))}catch(L){I(L)}}function A(S){S.done?v(S.value):C(S.value).then(E,_)}A((g=g.apply(m,h||[])).next())})},t=ge&&ge.__generator||function(m,h){var p={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},g,C,v,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(A){return function(S){return _([A,S])}}function _(A){if(g)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(p=0)),p;)try{if(g=1,C&&(v=A[0]&2?C.return:A[0]?C.throw||((v=C.return)&&v.call(C),0):C.next)&&!(v=v.call(C,A[1])).done)return v;switch(C=0,v&&(A=[A[0]&2,v.value]),A[0]){case 0:case 1:v=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,C=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(v=p.trys,!(v=v.length>0&&v[v.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!v||A[1]>v[0]&&A[1]<v[3])){p.label=A[1];break}if(A[0]===6&&p.label<v[1]){p.label=v[1],v=A;break}if(v&&p.label<v[2]){p.label=v[2],p.ops.push(A);break}v[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(m,p)}catch(S){A=[6,S],C=0}finally{g=v=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.logoutFromHeimdall=Zt.getTenantLoginCode=Zt.getLoginToken=Zt.getAccessToken=void 0;var n=Dn,r=sd(),o=Se,s=function(m,h,p,g){var C=(0,o.getStoredAuthData)(),v=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:m.heimdallUrl,url:m.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":v},data:{user_id:h.userId,usergroup_id:h.usergroupId,access_token:(C==null?void 0:C.token)||"",source:g}}},a=function(m,h,p,g,C){var v=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:h.heimdallUrl,url:h.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:m},headers:{"x-hiver-tenant":v,"x-hiver-userid":g,"x-hiver-usergroupid":C}}},i=function(m,h){var p=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:m.heimdallUrl,url:m.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":p}}},c=function(m){return parseInt(m,10)},l=function(m,h,p,g){return{root_url:p===n.TENANT_PLATFORM.HIVERWEB?m.hotUrl:m.v2Url,url:p===n.TENANT_PLATFORM.HIVERWEB?m.apiEndpoints.hotLogin:m.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(h.userId),app:g||n.APP_UI.DEFAULT}}},f=function(m,h,p,g,C){return e(void 0,void 0,void 0,function(){var v,I,E,_,A,S,L;return t(this,function(k){switch(k.label){case 0:console.log("GETTOKEN tenantPlatform -> ",g),k.label=1;case 1:return k.trys.push([1,5,,6]),!(0,o.validateToken)(p)||(0,o.invalidateToken)(p)?(console.log("HEIMDALL: No valid token, fetching token"),v=s(h,p,g,C),[4,(0,r.performAxiosCall)(v)]):[3,3];case 2:return I=k.sent(),[2,{atToken:(_=I==null?void 0:I.data.at)===null||_===void 0?void 0:_.token,expiryTime:(A=I==null?void 0:I.data.at)===null||A===void 0?void 0:A.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=k.sent(),E;case 6:return[2]}})})};Zt.getAccessToken=f;var b=function(m,h,p,g,C,v){return e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k;return t(this,function(D){switch(D.label){case 0:I=a(m,p,g,C,v),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return E=D.sent(),[2,{userId:(A=E==null?void 0:E.data)===null||A===void 0?void 0:A.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:(k=E==null?void 0:E.data.at)===null||k===void 0?void 0:k.expires_at}];case 3:throw _=D.sent(),_;case 4:return[2]}})})};Zt.getLoginToken=b;var y=function(m,h,p,g,C){return e(void 0,void 0,void 0,function(){var v,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",C),v=l(h,p,g,C),[4,(0,r.performAxiosCall)(v)];case 1:return I=_.sent(),[2,I==null?void 0:I.data.code];case 2:throw E=_.sent(),E;case 3:return[2]}})})};Zt.getTenantLoginCode=y;var x=function(m,h,p){return p===void 0&&(p=0),e(void 0,void 0,void 0,function(){var g,C,v;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),g=i(m,h),[4,(0,r.performAxiosCall)(g)];case 1:return C=I.sent(),[2,C==null?void 0:C.status];case 2:return v=I.sent(),p<2?[4,x(m,h,p+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw v;case 5:return[2]}})})};return Zt.logoutFromHeimdall=x,Zt}var ks={},vm=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(b){a(b)}}function c(f){try{l(r.throw(f))}catch(b){a(b)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Em=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(ks,"__esModule",{value:!0}),ks.subscribeToOnlineEvent=void 0;var td=Dn,Im=nn,wm=function(e,t){switch(t===void 0&&(t=(0,Im.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case td.PLATFORM.WEB:return window.addEventListener("online",function(){return vm(void 0,void 0,void 0,function(){return Em(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 td.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};ks.subscribeToOnlineEvent=wm;var nd;function rd(){if(nd)return Fo;nd=1;var e=ge&&ge.__awaiter||function(m,h,p,g){function C(v){return v instanceof p?v:new p(function(I){I(v)})}return new(p||(p=Promise))(function(v,I){function E(S){try{A(g.next(S))}catch(L){I(L)}}function _(S){try{A(g.throw(S))}catch(L){I(L)}}function A(S){S.done?v(S.value):C(S.value).then(E,_)}A((g=g.apply(m,h||[])).next())})},t=ge&&ge.__generator||function(m,h){var p={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},g,C,v,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(A){return function(S){return _([A,S])}}function _(A){if(g)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(p=0)),p;)try{if(g=1,C&&(v=A[0]&2?C.return:A[0]?C.throw||((v=C.return)&&v.call(C),0):C.next)&&!(v=v.call(C,A[1])).done)return v;switch(C=0,v&&(A=[A[0]&2,v.value]),A[0]){case 0:case 1:v=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,C=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(v=p.trys,!(v=v.length>0&&v[v.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!v||A[1]>v[0]&&A[1]<v[3])){p.label=A[1];break}if(A[0]===6&&p.label<v[1]){p.label=v[1],v=A;break}if(v&&p.label<v[2]){p.label=v[2],p.ops.push(A);break}v[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(m,p)}catch(S){A=[6,S],C=0}finally{g=v=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.fetchAccessToken=void 0;var n=ed(),r=Dn,o=Se,s=ks,a,i,c,l=function(m,h,p,g,C,v){return v===void 0&&(v=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k,D,N;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:",v,g),E=void 0,C?[4,C()]:[3,3];case 2:return E=P.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,m,h,g,v)];case 4:E=P.sent(),P.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,m,g,h.userId,h.usergroupId)];case 6:return _=P.sent(),A=_.userId,S=_.userGroupId,L=_.atToken,k=_.expiryTime,(0,o.setTokenAndExpiry)(L,k),(0,o.setUserDetails)(A,S),[3,12];case 7:D=P.sent(),console.log("ERROR debug: in error login:",D,v),N=p,P.label=8;case 8:return N<I?[4,l(m,h,N+1,g,C,v)]:[3,11];case 9:P.sent(),P.label=10;case 10:return N++,[3,8];case 11:throw D;case 12:return[2]}})})},f=function(m,h,p,g,C){return e(void 0,void 0,void 0,function(){var v,I,E,_;return t(this,function(A){switch(A.label){case 0:return h<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,m)})]:[3,3];case 1:return A.sent(),h+=m,m*2<=r.MAX_BACKOFF_LIMIT?m*=2:m=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",m),v=p.retryDelay,I=p.configs,E=p.apiParams,_=p.appUI,[4,b(v,m,h,I,E,g,C,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},b=function(m,h,p,g,C,v,I,E,_){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var A,S,L,k,D,N,P,B,Y,$,H,X,q,se;return t(this,function(de){switch(de.label){case 0:return de.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,g,C,v,E)];case 1:return A=de.sent(),S=A.atToken,L=A.expiryTime,k=A.userId,D=A.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),k&&D&&(0,o.setUserDetails)(k,D),m=r.INITIAL_RETRY_DELAY,h=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return N=de.sent(),console.log("ERROR: Heimdall fetch token",N),((Y=N.response)===null||Y===void 0?void 0:Y.status)===401||(($=N.request)===null||$===void 0?void 0:$.status)===401?(P=1,[4,l(g,C,P,v,I,_)]):[3,4];case 3:return de.sent(),[3,11];case 4:return((H=N.response)===null||H===void 0?void 0:H.status)===409||((X=N.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),B={retryDelay:m,configs:g,apiParams:C,appUI:_},[4,f(h,p,B,v,I)]):[3,6];case 5:if(de.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw N;return[3,11];case 6:if(!(((q=N.response)===null||q===void 0?void 0:q.status)===422||((se=N.request)===null||se===void 0?void 0:se.status)===422))return[3,7];throw console.log("ERROR: Throwing error",N.response.status),N;case 7:return m<=r.MAX_RETRY_DELAY?[4,new Promise(function(V){return setTimeout(V,m)})]:[3,10];case 8:return de.sent(),m*=2,console.log("Heimdall: Fetch token post doubling retry delay",m),[4,b(m,h,p,g,C,v,I,_)];case 9:return de.sent(),[3,11];case 10:throw N;case 11:return[3,12];case 12:return[2]}})})},y=function(m,h,p,g,C,v,I,E){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),g===void 0&&(g=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var _,A,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),_=(0,o.isTokenInExpiryWindow)(),_?(A=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(A)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,b(p,g,C,m,h,v,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]}})})},x=function(m,h,p,g,C,v,I){return e(void 0,void 0,void 0,function(){var E,_,A,S,L,k;return t(this,function(D){switch(D.label){case 0:a=m,i=h,E=r.INITIAL_RETRY_DELAY,_=r.INITIAL_RETRY_DELAY,A=0,S=(0,o.getConfig)(a,i),console.log("Instance: Fetch Call"),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,b(E,_,A,S,p,g,C,v,I)];case 2:return D.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return y(S,p,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,g,C,I)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(N){switch(N.label){case 0:return[4,y(S,p,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,g,C,I)];case 1:return N.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return k=D.sent(),console.log("ERROR: Fetching token failed",k),[3,4];case 4:return[2]}})})};return Fo.fetchAccessToken=x,Fo}var od;function sd(){if(od)return tr;od=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(h){for(var p,g=1,C=arguments.length;g<C;g++){p=arguments[g];for(var v in p)Object.prototype.hasOwnProperty.call(p,v)&&(h[v]=p[v])}return h},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(h,p,g,C){function v(I){return I instanceof g?I:new g(function(E){E(I)})}return new(g||(g=Promise))(function(I,E){function _(L){try{S(C.next(L))}catch(k){E(k)}}function A(L){try{S(C.throw(L))}catch(k){E(k)}}function S(L){L.done?I(L.value):v(L.value).then(_,A)}S((C=C.apply(h,p||[])).next())})},n=ge&&ge.__generator||function(h,p){var g={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},C,v,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 A([S,L])}}function A(S){if(C)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(g=0)),g;)try{if(C=1,v&&(I=S[0]&2?v.return:S[0]?v.throw||((I=v.return)&&I.call(v),0):v.next)&&!(I=I.call(v,S[1])).done)return I;switch(v=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return g.label++,{value:S[1],done:!1};case 5:g.label++,v=S[1],S=[0];continue;case 7:S=g.ops.pop(),g.trys.pop();continue;default:if(I=g.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){g=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){g.label=S[1];break}if(S[0]===6&&g.label<I[1]){g.label=I[1],I=S;break}if(I&&g.label<I[2]){g.label=I[2],g.ops.push(S);break}I[2]&&g.ops.pop(),g.trys.pop();continue}S=p.call(h,g)}catch(L){S=[6,L],v=0}finally{C=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.hiverAxiosCall=tr.performAxiosCall=void 0;var r=Qu,o=Se,s=rd(),a=tn,i=Dn,c,l=2,f=function(h,p){var g=p.fetchCsrfToken();h.formData?h.formData.append("_csrf_token",g):(h.data=h.data||{},h.data._csrf_token=g)},b=function(h,p){var g={};!h.method||h.method.toLowerCase()==="get"?g={params:h.params?h.params:h.data}:g=h.params?{params:h,data:h.data}:{data:h.data};var C=e(e({method:h.method,url:"".concat(h.root_url).concat(h.url),headers:h.headers},g),{withCredentials:p,responseType:(h==null?void 0:h.responseType)||""});return C};function y(h,p){return p===void 0&&(p=!0),t(this,void 0,void 0,function(){var g;return n(this,function(C){return g=b(h,p),[2,(0,r.default)(g).then(function(v){return v}).catch(function(v){throw v})]})})}tr.performAxiosCall=y;function x(h,p,g){return t(this,void 0,void 0,function(){var C,v,I;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),h.authTokenFetchingInProgress?[3,2]:(h.authTokenFetchingInProgress=!0,C=h.appEnv,v=h.tier,[4,(0,s.fetchAccessToken)(C,v,p,h.tenantPlatform,h.getTokenForLogin,g)]);case 1:return E.sent(),h.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,x(h,p,g)];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),h.authTokenFetchingInProgress=!1,[4,x(h,p,g)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function m(h,p,g,C,v){var I,E;return v===void 0&&(v=0),t(this,void 0,void 0,function(){var _,A,S,L,k,D,N;return n(this,function(P){switch(P.label){case 0:if(P.trys.push([0,4,,5]),!(g.getToken&&!(0,o.hasValidToken)(p)))return[3,2];if(_=h.appEnv,A=h.tier,!_||!A)throw Error("appEnv or tier missing : ".concat(_,"/").concat(A));return"userId"in p&&"usergroupId"in p?(S={userId:p.userId,usergroupId:p.usergroupId},[4,x(h,S,C)]):[3,2];case 1:P.sent(),P.label=2;case 2:return h.csrfToken&&f(p,g),L=h.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,p.headers=e(e({},p.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),g.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",p.headers=e(e({},p.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",p),[4,y(p,h.withCredentials)];case 3:return k=P.sent(),p.onSuccess&&p.onSuccess(k),[2,k];case 4:if(D=P.sent(),N=((I=D.response)===null||I===void 0?void 0:I.status)===403||((E=D.request)===null||E===void 0?void 0:E.status)===403,v<l&&N)return(0,o.expireToken)(),[2,m(h,p,g,C,v+1)];if(v>=l&&N||!N)throw p.onFail&&p.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return tr.hiverAxiosCall=m,tr}var Do={},Be={},We={};Object.defineProperty(We,"__esModule",{value:!0}),We.TIERS=We.APP_UI=We.CONFIG_HIVER=We.REFETCH_CHECK_DELAY=We.INITIAL_RETRY_DELAY=We.MAX_BACKOFF_LIMIT=We.MAX_CONFLICT_RETRY_DELAY=We.MAX_RETRY_DELAY=We.GET_METHOD=void 0,We.GET_METHOD="GET",We.MAX_RETRY_DELAY=18e4,We.MAX_CONFLICT_RETRY_DELAY=63e3,We.MAX_BACKOFF_LIMIT=8e3,We.INITIAL_RETRY_DELAY=1e3,We.REFETCH_CHECK_DELAY=168e4,We.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},We.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},We.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 jr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},_m=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:jr}};ht.getDevApiConfig=_m;var Sm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:jr}};ht.getDevHqConfig=Sm;var Am=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:jr}};ht.getSitApiConfig=Am;var Tm=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:jr}};ht.getSitHqConfig=Tm;var Lm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:jr}};ht.getProdApiConfig=Lm;var Om=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:jr}};ht.getProdHqConfig=Om;var Fm=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(b){a(b)}}function c(f){try{l(r.throw(f))}catch(b){a(b)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Dm=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(Be,"__esModule",{value:!0}),Be.expireToken=Be.validateToken=Be.validateAccount=Be.getConfig=Be.introduceDelay=Be.isTokenInExpiryWindow=Be.getStoredAuthData=Be.setUserDetails=Be.setTokenAndExpiry=Be.getRandomDelay=Be.hasValidToken=void 0;var Pi=We,or=ht,ad=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},ji=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};Be.validateAccount=ji;var km=function(e){var t=ji(e);return!id()&&t};Be.validateToken=km;var Nm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Be.expireToken=Nm;var Rm=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=ad(),o=ji(e);return r<n&&o};Be.hasValidToken=Rm;var Mm=function(){return Math.floor(Math.random()*6e4)+6e4};Be.getRandomDelay=Mm;var Pm=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)};Be.setUserDetails=Pm;var jm=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Be.setTokenAndExpiry=jm;var Bm=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}};Be.getStoredAuthData=Bm;var id=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=ad(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Be.isTokenInExpiryWindow=id;var Vm=function(e){return Fm(void 0,void 0,void 0,function(){return Dm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Be.introduceDelay=Vm;var Gm=function(e,t,n){switch(t){case Pi.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,or.getSitHqConfig)(e)),n?(0,or.getSitApiConfig)(e):(0,or.getSitHqConfig)(e);case Pi.TIERS.PROD:return n?(0,or.getProdApiConfig)():(0,or.getProdHqConfig)();case Pi.TIERS.DEV:default:return n?(0,or.getDevApiConfig)():(0,or.getDevHqConfig)()}};Be.getConfig=Gm;var ko={},mn={},cd;function Hm(){if(cd)return mn;cd=1;var e=ge&&ge.__awaiter||function(y,x,m,h){function p(g){return g instanceof m?g:new m(function(C){C(g)})}return new(m||(m=Promise))(function(g,C){function v(_){try{E(h.next(_))}catch(A){C(A)}}function I(_){try{E(h.throw(_))}catch(A){C(A)}}function E(_){_.done?g(_.value):p(_.value).then(v,I)}E((h=h.apply(y,x||[])).next())})},t=ge&&ge.__generator||function(y,x){var m={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},h,p,g,C;return C={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function v(E){return function(_){return I([E,_])}}function I(E){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(m=0)),m;)try{if(h=1,p&&(g=E[0]&2?p.return:E[0]?p.throw||((g=p.return)&&g.call(p),0):p.next)&&!(g=g.call(p,E[1])).done)return g;switch(p=0,g&&(E=[E[0]&2,g.value]),E[0]){case 0:case 1:g=E;break;case 4:return m.label++,{value:E[1],done:!1};case 5:m.label++,p=E[1],E=[0];continue;case 7:E=m.ops.pop(),m.trys.pop();continue;default:if(g=m.trys,!(g=g.length>0&&g[g.length-1])&&(E[0]===6||E[0]===2)){m=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){m.label=E[1];break}if(E[0]===6&&m.label<g[1]){m.label=g[1],g=E;break}if(g&&m.label<g[2]){m.label=g[2],m.ops.push(E);break}g[2]&&m.ops.pop(),m.trys.pop();continue}E=x.call(y,m)}catch(_){E=[6,_],p=0}finally{h=g=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(mn,"__esModule",{value:!0}),mn.getV2LoginCode=mn.getLoginToken=mn.getAccessToken=void 0;var n=We,r=fd(),o=Be,s=function(y,x,m){var h=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:x.userId,usergroup_id:x.usergroupId,access_token:(h==null?void 0:h.token)||"",source:m},withCredentials:!0}},a=function(y,x){return{root_url:x.heimdallUrl,url:x.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,x){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:x||n.APP_UI.DEFAULT}}},l=function(y,x,m,h){return e(void 0,void 0,void 0,function(){var p,g,C,v,I,E,_;return t(this,function(A){switch(A.label){case 0:return A.trys.push([0,4,,5]),(0,o.validateToken)(m)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),p=s(x,m,h),[4,(0,r.makeAxiosCall)(p,y)]);case 1:return g=A.sent(),[2,{atToken:(v=g==null?void 0:g.data.at)===null||v===void 0?void 0:v.token,expiryTime:(I=g==null?void 0:g.data.at)===null||I===void 0?void 0:I.expires_at,userId:(E=g==null?void 0:g.data)===null||E===void 0?void 0:E.user_id,userGroupId:(_=g==null?void 0:g.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 C=A.sent(),C;case 5:return[2]}})})};mn.getAccessToken=l;var f=function(y,x,m){return e(void 0,void 0,void 0,function(){var h,p,g,C,v,I,E;return t(this,function(_){switch(_.label){case 0:h=a(y,m),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(h,x)];case 2:return p=_.sent(),[2,{userId:(C=p==null?void 0:p.data)===null||C===void 0?void 0:C.user_id,userGroupId:(v=p==null?void 0:p.data)===null||v===void 0?void 0:v.usergroup_id,atToken:(I=p==null?void 0:p.data.at)===null||I===void 0?void 0:I.token,expiryTime:(E=p==null?void 0:p.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw g=_.sent(),g;case 4:return[2]}})})};mn.getLoginToken=f;var b=function(y,x,m){return e(void 0,void 0,void 0,function(){var h,p,g;return t(this,function(C){switch(C.label){case 0:return C.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",m),h=c(x,m),[4,(0,r.makeAxiosCall)(h,y)];case 1:return p=C.sent(),console.log("DEBUG HEIMDALL: local storage:",p==null?void 0:p.data),[2,p==null?void 0:p.data.code];case 2:throw g=C.sent(),g;case 3:return[2]}})})};return mn.getV2LoginCode=b,mn}var ld;function ud(){if(ld)return ko;ld=1;var e=ge&&ge.__awaiter||function(x,m,h,p){function g(C){return C instanceof h?C:new h(function(v){v(C)})}return new(h||(h=Promise))(function(C,v){function I(A){try{_(p.next(A))}catch(S){v(S)}}function E(A){try{_(p.throw(A))}catch(S){v(S)}}function _(A){A.done?C(A.value):g(A.value).then(I,E)}_((p=p.apply(x,m||[])).next())})},t=ge&&ge.__generator||function(x,m){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},p,g,C,v;return v={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function I(_){return function(A){return E([_,A])}}function E(_){if(p)throw new TypeError("Generator is already executing.");for(;v&&(v=0,_[0]&&(h=0)),h;)try{if(p=1,g&&(C=_[0]&2?g.return:_[0]?g.throw||((C=g.return)&&C.call(g),0):g.next)&&!(C=C.call(g,_[1])).done)return C;switch(g=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,g=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){h.label=_[1];break}if(_[0]===6&&h.label<C[1]){h.label=C[1],C=_;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(_);break}C[2]&&h.ops.pop(),h.trys.pop();continue}_=m.call(x,h)}catch(A){_=[6,A],g=0}finally{p=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(ko,"__esModule",{value:!0}),ko.fetchToken=void 0;var n=Hm(),r=We,o=Be,s,a,i,c=function(x,m,h){return h===void 0&&(h=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var p,g,C,v,I,E,_,A,S;return t(this,function(L){switch(L.label){case 0:p=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",h),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,x,h)];case 2:return g=L.sent(),[4,(0,n.getLoginToken)(g,r.CONFIG_HIVER,x)];case 3:return C=L.sent(),v=C.userId,I=C.userGroupId,E=C.atToken,_=C.expiryTime,(0,o.setTokenAndExpiry)(E,_),(0,o.setUserDetails)(v,I),[3,9];case 4:A=L.sent(),console.log("ERROR debug: in error login:",A,h),S=m,L.label=5;case 5:return S<p?[4,c(x,S+1,h)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},l=function(x,m,h){return e(void 0,void 0,void 0,function(){var p,g,C,v;return t(this,function(I){switch(I.label){case 0:return m<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,x)})]:[3,3];case 1:return I.sent(),m+=x,x*2<=r.MAX_BACKOFF_LIMIT?x*=2:x=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",x),p=h.retryDelay,g=h.configs,C=h.api_params,v=h.appUI,[4,f(p,x,m,g,C,v)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},f=function(x,m,h,p,g,C,v){return C===void 0&&(C="default"),e(void 0,void 0,void 0,function(){var I,E,_,A,S,L,k,D,N,P,B,Y,$,H;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,p,g,C)];case 1:return I=X.sent(),E=I.atToken,_=I.expiryTime,A=I.userId,S=I.userGroupId,E&&_&&(0,o.setTokenAndExpiry)(E,_),A&&S&&(0,o.setUserDetails)(A,S),x=r.INITIAL_RETRY_DELAY,m=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return L=X.sent(),console.log("ERROR: Heimdall fetch token",L),((N=L.response)===null||N===void 0?void 0:N.status)===401||((P=L.request)===null||P===void 0?void 0:P.status)===401?(k=1,[4,c(p,k,v)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((B=L.response)===null||B===void 0?void 0:B.status)===409||((Y=L.request)===null||Y===void 0?void 0:Y.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:x,configs:p,api_params:g,appUI:v},[4,l(m,h,D)]):[3,6];case 5:if(X.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!((($=L.response)===null||$===void 0?void 0:$.status)===422||((H=L.request)===null||H===void 0?void 0:H.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return x<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,x)})]:[3,10];case 8:return X.sent(),x*=2,console.log("Heimdall: Fetch token post doubling retry delay",x),[4,f(x,m,h,p,g,v)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},b=function(x,m,h,p,g,C){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),p===void 0&&(p=r.INITIAL_RETRY_DELAY),g===void 0&&(g=0),e(void 0,void 0,void 0,function(){var v,I,E;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),v=(0,o.isTokenInExpiryWindow)(),v?(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(h,p,g,x,m,C)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw E=_.sent(),E;case 5:return[2]}})})},y=function(x,m,h,p,g,C){return e(void 0,void 0,void 0,function(){var v,I,E,_,A;return t(this,function(S){switch(S.label){case 0:s=x,a=m,v=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,E=0,_=(0,o.getConfig)(s,a,p),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(v,I,E,_,h,g,C)];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 b(_,h)},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,b(_,h)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return ko.fetchToken=y,ko}var dd;function fd(){if(dd)return Do;dd=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(y){for(var x,m=1,h=arguments.length;m<h;m++){x=arguments[m];for(var p in x)Object.prototype.hasOwnProperty.call(x,p)&&(y[p]=x[p])}return y},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(y,x,m,h){function p(g){return g instanceof m?g:new m(function(C){C(g)})}return new(m||(m=Promise))(function(g,C){function v(_){try{E(h.next(_))}catch(A){C(A)}}function I(_){try{E(h.throw(_))}catch(A){C(A)}}function E(_){_.done?g(_.value):p(_.value).then(v,I)}E((h=h.apply(y,x||[])).next())})},n=ge&&ge.__generator||function(y,x){var m={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},h,p,g,C;return C={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function v(E){return function(_){return I([E,_])}}function I(E){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,E[0]&&(m=0)),m;)try{if(h=1,p&&(g=E[0]&2?p.return:E[0]?p.throw||((g=p.return)&&g.call(p),0):p.next)&&!(g=g.call(p,E[1])).done)return g;switch(p=0,g&&(E=[E[0]&2,g.value]),E[0]){case 0:case 1:g=E;break;case 4:return m.label++,{value:E[1],done:!1};case 5:m.label++,p=E[1],E=[0];continue;case 7:E=m.ops.pop(),m.trys.pop();continue;default:if(g=m.trys,!(g=g.length>0&&g[g.length-1])&&(E[0]===6||E[0]===2)){m=0;continue}if(E[0]===3&&(!g||E[1]>g[0]&&E[1]<g[3])){m.label=E[1];break}if(E[0]===6&&m.label<g[1]){m.label=g[1],g=E;break}if(g&&m.label<g[2]){m.label=g[2],m.ops.push(E);break}g[2]&&m.ops.pop(),m.trys.pop();continue}E=x.call(y,m)}catch(_){E=[6,_],p=0}finally{h=g=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Do,"__esModule",{value:!0}),Do.makeAxiosCall=void 0;var r=Qu,o=Be,s=ud(),a,i=2,c=function(y,x){var m=x.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",m):(y.data=y.data||{},y.data._csrf_token=m)},l=function(y){var x=!y.method||y.method.toLowerCase()==="get"?{params:y.data}:{data:y.data},m=e(e({method:y.method,url:"".concat(y.root_url).concat(y.url),headers:y.headers},x),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return m};function f(y){return t(this,void 0,void 0,function(){var x;return n(this,function(m){return x=l(y),[2,(0,r.default)(x).then(function(h){return h}).catch(function(h){throw h})]})})}function b(y,x,m,h){var p,g;return h===void 0&&(h=0),t(this,void 0,void 0,function(){var C,v,I,E,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(x.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(C=y.app_env,v=y.tier,!C||!v)throw Error("app_env or tier missing : ".concat(C,"/").concat(v));return"userId"in y&&"usergroupId"in y?(I={userId:y.userId,usergroupId:y.usergroupId},typeof x.isHiverApiDomain!="boolean"&&(x.isHiverApiDomain=!0),[4,(0,s.fetchToken)(C,v,I,x.isHiverApiDomain,m)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,x),x.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(),A=((p=_.response)===null||p===void 0?void 0:p.status)===403||((g=_.request)===null||g===void 0?void 0:g.status)===403,h<i&&A)return(0,o.expireToken)(),[2,b(y,x,m,h+1)];if(h>=i&&A||!A)throw y.onFail&&y.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Do.makeAxiosCall=b,Do}(function(e){var t=ge&&ge.__awaiter||function(x,m,h,p){function g(C){return C instanceof h?C:new h(function(v){v(C)})}return new(h||(h=Promise))(function(C,v){function I(A){try{_(p.next(A))}catch(S){v(S)}}function E(A){try{_(p.throw(A))}catch(S){v(S)}}function _(A){A.done?C(A.value):g(A.value).then(I,E)}_((p=p.apply(x,m||[])).next())})},n=ge&&ge.__generator||function(x,m){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},p,g,C,v;return v={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function I(_){return function(A){return E([_,A])}}function E(_){if(p)throw new TypeError("Generator is already executing.");for(;v&&(v=0,_[0]&&(h=0)),h;)try{if(p=1,g&&(C=_[0]&2?g.return:_[0]?g.throw||((C=g.return)&&C.call(g),0):g.next)&&!(C=C.call(g,_[1])).done)return C;switch(g=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,g=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){h.label=_[1];break}if(_[0]===6&&h.label<C[1]){h.label=C[1],C=_;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(_);break}C[2]&&h.ops.pop(),h.trys.pop();continue}_=m.call(x,h)}catch(A){_=[6,A],g=0}finally{p=C=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=sd(),o=rd(),s=Dn;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=ed(),i=Se,c=tn,l=fd();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=ud();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var b=nn,y=function(){function x(m,h,p,g,C,v){p===void 0&&(p=s.TENANT_PLATFORM.GMAIL),g===void 0&&(g=null),C===void 0&&(C=!0),v===void 0&&(v=!1),this.setEnvironment(),this.appEnv=m,this.tier=h,this.tenantPlatform=p,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=g,this.withCredentials=C,this.csrfToken=v}return x.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,b.setValue)("PLATFORM",s.PLATFORM.WEB):(0,b.setValue)("PLATFORM",s.PLATFORM.MOBILE)},x.prototype.hiverAxios=function(m,h,p,g){return h===void 0&&(h=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var C,v;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),g&&g<2?(C={userId:m.userId,usergroupId:m.usergroupId,apiRetry:g},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,C,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,m,h,p)];case 3:return[2,I.sent()];case 4:throw v=I.sent(),console.log("ERROR: Axios call failed",v),v;case 5:return[2]}})})},x.prototype.fetchAuthToken=function(m,h,p){return t(this,void 0,void 0,function(){var g;return n(this,function(C){switch(C.label){case 0:return C.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,m,this.tenantPlatform,this.getTokenForLogin,h,p)]);case 1:return C.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),C.label=3;case 3:return[3,8];case 4:return g=C.sent(),console.log("ERROR: Fetching token failed",g),this.authTokenFetchingInProgress=!1,[4,new Promise(function(v){return setTimeout(v,100)})];case 5:return C.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(m,h,p)];case 6:return C.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},x.prototype.logout=function(){return t(this,void 0,void 0,function(){var m,h;return n(this,function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),m=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(m,this.tenantPlatform)];case 1:return p.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw h=p.sent(),console.error("Heimdall: Logout failed",h),h;case 3:return[2]}})})},x.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},x}();e.Bifrost=y})(gi);const Xt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},kt=()=>{if(!Xt.isInitiated)return null;if(!Xt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Xt},Wm=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=gi.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Xt.baseUrl=e,Xt.appEnv=t,Xt.tier=n,Xt.userGroupId=o,Xt.userId=r,Xt.tenantPlatform=s,Xt.bifrost=new gi.Bifrost(t,n,s,i,a),Xt.isInitiated=!0},we=(({configHiver:e})=>async n=>{const r=kt();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,b={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(b,{...e,isHiverApiDomain:!0}))}catch(y){throw console.error("API call failed with error: ",y),y}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Zm=e=>T.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1180_840)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1180_840"},T.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Xm=e=>T.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),T.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"}),T.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),T.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),zm=e=>T.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_825_73646)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_825_73646"},T.createElement("rect",{width:24,height:24,fill:"white"})))),Ym="Rate your experience with Hiver Apps",Jm="Share feedback on Apps",qm="Got any feedback?",pd="https://txeep2wshyx.typeform.com/to/RuOwF9SG",$m="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",Qm="https://cdn.hiverhq.com/chat-support/hiver-chat.html",Um="enable_connectors_clicked",Km="learn_more_clicked",e3="connector_card_expand_clicked",t3="connector_card_collapsed_clicked",n3="connector_card_refresh_clicked",r3="connector_cards_loaded",o3="connector_whats_new_card_viewed",s3="connector_whats_new_explore_now_clicked",a3="connector_whats_new_learn_more_clicked",i3="connector_whats_new_dismissed",c3="connector_create_new_object_clicked",l3="connector_link_new_object_clicked",u3="connector_new_object_created_by_form",d3="connector_new_object_linked_by_form",f3="connector_object_unlinked_by_form",p3="connector_link_preview_clicked",h3="connector_create_panel_cancel_clicked",g3="connector_create_panel_back_clicked",m3="card_loaded_on_click",b3="card_loaded",y3="schedule_call_clicked",C3="schedule_call_cross_clicked",hd="CONNECTOR_EDIT_CLICKED",x3="CONNECTOR_EDIT_REQUEST_SEND",v3="CONNECTOR_EDIT_CANCELLED",E3="CONNECTOR_EDIT_BACK_CLICKED",I3="CONNECTOR_EDIT_SUCCESS",w3="connector_video_clicked",_3="connector_card_error",Bi="got_any_feedback_clicked",S3="connector_deeplink_clicked",A3="search_bar_tapped",T3="search_suggestions_selected",L3="search_initiated",O3="no_results_found",F3="search_results_found",D3="search_result_selected",k3="search_result_linked",N3="feedback_closed_clicked",R3="help_btn_clicked",M3="connector_chat_support_clicked",P3="add_custom_field_clicked",j3="add_custom_field_success",B3="update_custom_field_success",gd="clicked_on_lookup_config",V3="clicked_on_lookup_field",G3="saved_lookup_config",H3={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Ve=w.createContext(H3),Ns="hiver_connectors",Vi={NOT_FOUND:404},W3="ftr-connector-blue-dot",md="ftr-connectors-write-flow",Z3="ftr-connectors-enhancements",X3="ftr-connector-schedule-call-agent",z3="ftr-connectors-edit",Y3="enableAllConnectorFtr",J3="ftr-cards-open-state",q3="ftr-connectors-global-search",$3="ftr-connectors-smart-suggestions",Q3="ftr-connectors-email-selection",U3="ftr-connector-agent-feedback",Rs="ftr-connector-unified-view",K3="ftr-connectors-expanded-form",bd="ftr-apps-lookup-revamp",e5="ftr-ci-configurable-fields",yd="Please refresh and try again",t5="No data available",Ms="-",Cd="Refresh",xd="Minimize",Gi="Expand",vd="Connectors",Hi="Apps",n5="Collapse",r5="Close",Ed="Link",o5="Create",s5="Update",Id="Unlink",wd="Edit",Wi="Cancel",_d="Create new object",Sd="Link existing object",a5="Are you sure you want to unlink this object?",i5="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.",c5="Edit card",l5="bullet_list",u5="Expanded",d5="Collapsed",Ad="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Td="UNKNOWN_ERROR",f5="https://help.hiverhq.com/custom-connectors/common-connector-errors",Ld={MAIN_BUTTON:"main_button",ICON:"create_icon"},p5=" Add custom field",Zi=e=>{let t=localStorage.getItem(Ns);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},h5=e=>!!Zi(e),Od=()=>{const{userId:e=""}=kt()||{};return String(e)},g5=(e,t=Od())=>{const n=Zi(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Xi=(e,t=!1,n=!1)=>{const r=Od(),o=Zi(e);if(t||!o){localStorage.removeItem(Ns);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Ns,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(Ns,JSON.stringify(i));return}},tt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[Y3])===!0:(e==null?void 0:e[t])===!0,lt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Fd=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?u5:d5,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},Dd=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==Vi.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)!==Vi.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},m5=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)},zi=({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 kd(e,t){return e.length>t?e.substring(0,t)+"...":e}const b5=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1187_180)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1187_180"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),y5=e=>T.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_847_49587)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_847_49587"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),C5=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
- `,v5=d.keyframes`
52
+ `,x5=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
- `,E5=d.styled(d.Stack)`
65
+ `,v5=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: ${x5} 0.4s ease-in forwards;
96
+ animation: ${C5} 0.4s ease-in forwards;
97
97
  }
98
- `,I5=d.styled(d.Stack)`
98
+ `,E5=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: ${v5} 0.4s ease-in forwards;
115
+ animation: ${x5} 0.4s ease-in forwards;
116
116
  }
117
- `,w5=d.styled(d.IconButton)`
117
+ `,I5=d.styled(d.IconButton)`
118
118
  position: absolute;
119
119
  right: -8px;
120
120
  top: -5px;
121
- `,_5=d.styled(d.Stack)`
121
+ `,w5=d.styled(d.Stack)`
122
122
  margin-top: 8px;
123
123
  flex-direction: row;
124
124
  flex-wrap: wrap;
125
125
  gap: 12px;
126
- `,S5=d.styled(d.Stack)`
126
+ `,_5=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
- `,A5=d.styled(d.Typography)`
150
+ `,S5=d.styled(d.Typography)`
151
151
  letter-spacing: 0.042px;
152
- `,T5=({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(_5,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const m=f<s;return u.jsx(S5,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:u.jsxs("div",{children:[u.jsx(C5,{width:"20px",height:"20px",style:{opacity:m?1:0,zIndex:m?2:1}}),u.jsx(y5,{width:"20px",height:"20px",style:{opacity:m?0:1,zIndex:m?1:2}})]})},f)})})},L5=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=w.useContext(Ve),{userGroupId:s,userId:a}=kt()||{},i=zi({url:pd,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,m]=w.useState(!1),[y,x]=w.useState(0),b=()=>{r(Bi,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),xs(a)},h=C=>{r(Bi,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:C});const v=zi({url:Qm,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(C)}});x(C),window.open(v,"_blank"),l(!1),xs(a)},p=()=>{r(R3,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),m(!0),xs(a)},g=()=>{f&&(l(!1),m(!1))};return u.jsxs(u.Fragment,{children:[u.jsxs(I5,{className:f||!c?"slide-down-out":"",onAnimationEnd:g,children:[u.jsxs(d.Stack,{width:"100%",direction:"row",gap:"8px",children:[u.jsx(zm,{}),u.jsxs(d.Box,{width:"175px",children:[u.jsx(A5,{variant:"h3",children:Jm}),u.jsx(T5,{rating:y,setRating:h})]})]}),u.jsx(d.Box,{position:"relative",children:u.jsx(d.Tooltip,{title:"Close",children:u.jsx(w5,{onClick:p,children:u.jsx(Ym,{width:"16px",height:"16px"})})})})]}),u.jsx(E5,{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(Xm,{}),qm]})})]})},O5="Need setup help?",F5="Expert setup assistance available! Book a 15 min call with our integration specialist.",D5="Schedule call",k5="https://calendar.app.google/V2cJcwKMV4ax9rpk9",Nd="agent_panel",Yi="hiver_schedule_call_close_button_click",N5=d.styled(d.Stack)`
152
+ `,A5=({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(w5,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const b=f<s;return u.jsx(_5,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:u.jsxs("div",{children:[u.jsx(y5,{width:"20px",height:"20px",style:{opacity:b?1:0,zIndex:b?2:1}}),u.jsx(b5,{width:"20px",height:"20px",style:{opacity:b?0:1,zIndex:b?1:2}})]})},f)})})},T5=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=w.useContext(Ve),{userGroupId:s,userId:a}=kt()||{},i=zi({url:pd,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,b]=w.useState(!1),[y,x]=w.useState(0),m=()=>{r(Bi,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),xs(a)},h=C=>{r(Bi,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:C});const v=zi({url:$m,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(C)}});x(C),window.open(v,"_blank"),l(!1),xs(a)},p=()=>{r(N3,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),b(!0),xs(a)},g=()=>{f&&(l(!1),b(!1))};return u.jsxs(u.Fragment,{children:[u.jsxs(E5,{className:f||!c?"slide-down-out":"",onAnimationEnd:g,children:[u.jsxs(d.Stack,{width:"100%",direction:"row",gap:"8px",children:[u.jsx(Xm,{}),u.jsxs(d.Box,{width:"175px",children:[u.jsx(S5,{variant:"h3",children:Ym}),u.jsx(A5,{rating:y,setRating:h})]})]}),u.jsx(d.Box,{position:"relative",children:u.jsx(d.Tooltip,{title:"Close",children:u.jsx(I5,{onClick:p,children:u.jsx(zm,{width:"16px",height:"16px"})})})})]}),u.jsx(v5,{className:f||!c?"fade-in":"",children:u.jsxs(d.Button,{size:"small",variant:"outlined",color:"tertiary",href:i,target:"_blank",onClick:m,children:[u.jsx(Zm,{}),Jm]})})]})},L5="Need setup help?",O5="Expert setup assistance available! Book a 15 min call with our integration specialist.",F5="Schedule call",D5="https://calendar.app.google/V2cJcwKMV4ax9rpk9",Nd="agent_panel",Yi="hiver_schedule_call_close_button_click",k5=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
- `,R5=d.styled(d.Stack)`
160
+ `,N5=d.styled(d.Stack)`
161
161
  width: 100%;
162
162
  gap: 4px;
163
163
  justify-content: space-between;
164
- `,M5=d.styled(d.Button)`
164
+ `,R5=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
- `,P5=d.styled(d.icons.Close)`
178
+ `,M5=d.styled(d.icons.Close)`
179
179
  height: 20px;
180
180
  width: 20px;
181
181
  cursor: pointer;
182
- `,j5=d.styled(d.icons.CalendarTodayOutlinedIcon)`
182
+ `,P5=d.styled(d.icons.CalendarTodayOutlinedIcon)`
183
183
  height: 16px;
184
184
  width: 16px;
185
- `,B5=d.styled(d.Typography)`
185
+ `,j5=d.styled(d.Typography)`
186
186
  color: ${d.theme.palette.gray.black};
187
- `,V5=d.styled(d.Typography)`
187
+ `,B5=d.styled(d.Typography)`
188
188
  color: ${d.theme.palette.gray.gray2};
189
- `,G5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=w.useContext(Ve),[r,o]=w.useState(()=>!(localStorage.getItem(Yi)==="true")&&tt(e,z3));w.useEffect(()=>{localStorage.getItem(Yi)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(Yi,"true"),o(!1),t(x3,{source:Nd})},a=()=>{window.open(k5,"_blank"),t(C3,{source:Nd})};return!r||!n?null:u.jsxs(N5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[u.jsxs(R5,{gap:"4px",children:[u.jsxs(d.Stack,{direction:"row",justifyContent:"space-between",children:[u.jsx(B5,{variant:"body1_medium",children:O5}),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(P5,{})})})})]}),u.jsx(V5,{variant:"body2",children:F5})]}),u.jsx(d.Stack,{onClick:a,direction:"row",alignItems:"center",children:u.jsxs(M5,{variant:"outlined",size:"small",children:[u.jsx(j5,{}),D5]})})]})},H5="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",Rd=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.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"}),T.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"})),W5="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",Z5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1727)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1727"},T.createElement("rect",{width:18,height:18,fill:"white"})))),X5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1720)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1720"},T.createElement("rect",{width:18,height:18,fill:"white"})))),z5="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",Y5=({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))}),Md="connector-header-stuck",J5=d.styled(d.Stack)`
189
+ `,V5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=w.useContext(Ve),[r,o]=w.useState(()=>!(localStorage.getItem(Yi)==="true")&&tt(e,X3));w.useEffect(()=>{localStorage.getItem(Yi)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(Yi,"true"),o(!1),t(C3,{source:Nd})},a=()=>{window.open(D5,"_blank"),t(y3,{source:Nd})};return!r||!n?null:u.jsxs(k5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[u.jsxs(N5,{gap:"4px",children:[u.jsxs(d.Stack,{direction:"row",justifyContent:"space-between",children:[u.jsx(j5,{variant:"body1_medium",children:L5}),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(M5,{})})})})]}),u.jsx(B5,{variant:"body2",children:O5})]}),u.jsx(d.Stack,{onClick:a,direction:"row",alignItems:"center",children:u.jsxs(R5,{variant:"outlined",size:"small",children:[u.jsx(P5,{}),F5]})})]})},G5="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",Rd=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.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"}),T.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"})),H5="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",W5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1727)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1727"},T.createElement("rect",{width:18,height:18,fill:"white"})))),Z5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_1720)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1329_1720"},T.createElement("rect",{width:18,height:18,fill:"white"})))),X5="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",z5=({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))}),Md="connector-header-stuck",Y5=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
  &.${Md} {
204
204
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
205
205
  }
206
- `,q5=d.styled(d.Stack)`
206
+ `,J5=d.styled(d.Stack)`
207
207
  width: 0;
208
208
  height: 0;
209
209
  `,Pd=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
- `,$5=d.styled(d.Box)`
233
+ `,q5=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 Q5=d.styled(d.Box)`
242
+ `;const $5=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
- `,U5=d.styled(d.Stack)`
247
+ `,Q5=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
  `,Vd=d.styled(d.Stack)`
260
260
  flex-direction: row;
261
261
  align-items: stretch;
262
- `,K5=d.styled(d.Stack)`
262
+ `,U5=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
- `,e4=d.styled(d.Typography)`
273
+ `,K5=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
- `,t4=d.styled(d.Box)`
280
+ `,e4=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
- `,n4=d.styled(d.Typography)`
289
+ `,t4=d.styled(d.Typography)`
290
290
  text-transform: uppercase;
291
291
  color: ${d.theme.palette.gray.gray3};
292
292
  `,Gd=d.styled(d.Typography)`
293
293
  color: ${d.theme.palette.gray.gray4};
294
294
  overflow: hidden;
295
295
  word-break: break-word;
296
- `,r4=d.styled(d.Link)`
296
+ `,n4=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
- `,o4=d.styled(d.Typography)`
302
+ `,r4=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
- `,s4=d.styled(d.Typography)`
316
+ `,o4=d.styled(d.Typography)`
317
317
  display: -webkit-box;
318
318
  -webkit-box-orient: vertical;
319
319
  overflow: hidden;
@@ -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
- `,a4=d.styled(d.Stack)`
391
+ `,s4=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
- `,i4=d.styled(d.TableHead)`
405
+ `,a4=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
- `,c4=d.styled(d.TableCell)`
408
+ `,i4=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
- `,l4=d.styled(d.TableRow)`
421
+ `,c4=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
- `,u4=d.styled(d.TableCell)`
438
+ `,l4=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
- `,d4=d.styled(d.TableCell)`
446
+ `,u4=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
- `,f4=d.styled(d.TableCell)`
453
+ `,d4=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
- `,p4=d.styled("img")`
459
+ `,f4=d.styled("img")`
460
460
  transition: transform 0.3s;
461
461
  transform: rotate(${e=>e.transformAngle}deg);
462
- `,h4=d.styled(d.Typography)`
462
+ `,p4=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
- `,g4=d.styled(d.Typography)`
470
+ `,h4=d.styled(d.Typography)`
471
471
  display: flex;
472
472
  align-items: center;
473
473
  line-height: 28px;
474
474
  font-weight: 600;
475
- `,m4=d.styled(d.Box)`
475
+ `,g4=d.styled(d.Box)`
476
476
  margin-top: 12px;
477
477
  border: 1px solid ${d.palette.gray.gray5};
478
478
  border-radius: 4px;
479
- `,b4=d.styled(d.Stack)`
479
+ `,m4=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
- `,y4=d.styled(d.Box)`
487
+ `,b4=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
- `,C4=d.styled(d.Box)`
496
+ `,y4=d.styled(d.Box)`
497
497
  background-color: #f0f3ff99;
498
498
  padding: 14px 12px 8px 12px;
499
499
  box-sizing: border-box;
500
- `,x4=d.styled(d.Box)`
500
+ `,C4=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
- `,v4=d.styled(d.Stack)`
506
+ `,x4=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
- `,E4=d.styled(d.Button)`
518
+ `,v4=d.styled(d.Button)`
519
519
  height: 28px;
520
520
  max-width: 115px;
521
521
  white-space: pre;
522
- `,I4=d.styled(d.Typography)`
522
+ `,E4=d.styled(d.Typography)`
523
523
  font-weight: 500;
524
524
  height: 100%;
525
- `,w4=d.styled(d.Box)`
525
+ `,I4=d.styled(d.Box)`
526
526
  &:last-child {
527
527
  margin-bottom: 16px;
528
528
  }
529
- `,_4=d.styled(d.Typography)`
529
+ `,w4=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
- `,S4=d.styled(d.Stack)`
536
+ `,_4=d.styled(d.Stack)`
537
537
  padding: 8px 16px;
538
538
  color: ${d.theme.palette.gray.black};
539
- `,A4=d.styled(d.Typography)`
539
+ `,S4=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
- `,T4=({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),m=!!l,{availableFeatures:y,sendTrackingEvent:x,currentSmIds:b,userEmail:h}=w.useContext(Ve),{userGroupId:p,userId:g}=kt()||{},C=tt(y,Rs),v=[{id:"rate-experience",label:"Rate your experience",icon:u.jsx(X5,{}),onClick:()=>{f(null);const _=zi({url:pd,params:{email:h,user_id:g,ug_id:p,sm_ids:b.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(_,"_blank"),x(Bi,{sm_ids:b,ug_id:p,connector_names:e,source:"help_drop_down"}),xs(g)}},{id:"instant-chat",label:"Instant chat with support",icon:u.jsx(Z5,{}),onClick:()=>{f(null),window.open(Um,"_blank"),x(P3,{sm_ids:b,ug_id:p,connector_names:e,source:"help_drop_down"})}}],I=w.useCallback(_=>{const A=document.getElementById("connector-agent-container");if(!_||!A)return;c.current&&c.current.disconnect();const S=new IntersectionObserver(L=>{const k=i.current;for(const D of L)k==null||k.classList.toggle(Md,D.intersectionRatio===0)},{root:A});S.observe(_),c.current=S},[]),E=_=>{x(M3,{sm_ids:b,ug_id:p,connector_names:e}),f(_.currentTarget)};return u.jsxs(u.Fragment,{children:[u.jsx(q5,{ref:I}),u.jsx(Y5,{options:v,anchor:l,open:m,onClose:()=>f(null)}),u.jsxs(J5,{ref:i,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[C?u.jsx(Rd,{width:"20px",height:"20px"}):u.jsx(Pd,{}),u.jsx(jd,{variant:"h2",children:C?Hi:vd})]}),u.jsxs(d.Stack,{direction:"row",children:[u.jsx(d.Tooltip,{title:$m,placement:"bottom",children:u.jsx(d.IconButton,{onClick:E,id:"help-button",sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:W5,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?u.jsxs(u.Fragment,{children:[r?u.jsx(d.Tooltip,{title:Sd,placement:"bottom",children:u.jsx(d.IconButton,{onClick:a,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:z5,alt:"Link Task",height:"20px"})})}):null,n?u.jsx(d.Tooltip,{title:_d,placement:"bottom",children:u.jsx(d.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:H5,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var qi={exports:{}},$i={};/**
546
+ `,A4=({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),b=!!l,{availableFeatures:y,sendTrackingEvent:x,currentSmIds:m,userEmail:h}=w.useContext(Ve),{userGroupId:p,userId:g}=kt()||{},C=tt(y,Rs),v=[{id:"rate-experience",label:"Rate your experience",icon:u.jsx(Z5,{}),onClick:()=>{f(null);const _=zi({url:pd,params:{email:h,user_id:g,ug_id:p,sm_ids:m.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(_,"_blank"),x(Bi,{sm_ids:m,ug_id:p,connector_names:e,source:"help_drop_down"}),xs(g)}},{id:"instant-chat",label:"Instant chat with support",icon:u.jsx(W5,{}),onClick:()=>{f(null),window.open(Qm,"_blank"),x(M3,{sm_ids:m,ug_id:p,connector_names:e,source:"help_drop_down"})}}],I=w.useCallback(_=>{const A=document.getElementById("connector-agent-container");if(!_||!A)return;c.current&&c.current.disconnect();const S=new IntersectionObserver(L=>{const k=i.current;for(const D of L)k==null||k.classList.toggle(Md,D.intersectionRatio===0)},{root:A});S.observe(_),c.current=S},[]),E=_=>{x(R3,{sm_ids:m,ug_id:p,connector_names:e}),f(_.currentTarget)};return u.jsxs(u.Fragment,{children:[u.jsx(J5,{ref:I}),u.jsx(z5,{options:v,anchor:l,open:b,onClose:()=>f(null)}),u.jsxs(Y5,{ref:i,children:[u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[C?u.jsx(Rd,{width:"20px",height:"20px"}):u.jsx(Pd,{}),u.jsx(jd,{variant:"h2",children:C?Hi:vd})]}),u.jsxs(d.Stack,{direction:"row",children:[u.jsx(d.Tooltip,{title:qm,placement:"bottom",children:u.jsx(d.IconButton,{onClick:E,id:"help-button",sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:H5,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?u.jsxs(u.Fragment,{children:[r?u.jsx(d.Tooltip,{title:Sd,placement:"bottom",children:u.jsx(d.IconButton,{onClick:a,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:X5,alt:"Link Task",height:"20px"})})}):null,n?u.jsx(d.Tooltip,{title:_d,placement:"bottom",children:u.jsx(d.IconButton,{onClick:s,sx:{height:"36px",width:"36px"},children:u.jsx("img",{src:G5,alt:"Add",height:"20px"})})}):null]}):null]})]})]})};var qi={exports:{}},$i={};/**
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 Wd;function L4(){if(Wd)return $i;Wd=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 $i.useSyncExternalStoreWithSelector=function(c,l,f,m,y){var x=o(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=a(function(){function p(E){if(!g){if(g=!0,C=E,E=m(E),y!==void 0&&b.hasValue){var _=b.value;if(y(_,E))return v=_}return v=E}if(_=v,n(C,E))return _;var A=m(E);return y!==void 0&&y(_,A)?_:(C=E,v=A)}var g=!1,C,v,I=f===void 0?null:f;return[function(){return p(l())},I===null?void 0:function(){return p(I())}]},[l,f,m,y]);var h=r(c,x[0],x[1]);return s(function(){b.hasValue=!0,b.value=h},[h]),i(h),h},$i}var Qi={};/**
554
+ */var Wd;function T4(){if(Wd)return $i;Wd=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 $i.useSyncExternalStoreWithSelector=function(c,l,f,b,y){var x=o(null);if(x.current===null){var m={hasValue:!1,value:null};x.current=m}else m=x.current;x=a(function(){function p(E){if(!g){if(g=!0,C=E,E=b(E),y!==void 0&&m.hasValue){var _=m.value;if(y(_,E))return v=_}return v=E}if(_=v,n(C,E))return _;var A=b(E);return y!==void 0&&y(_,A)?_:(C=E,v=A)}var g=!1,C,v,I=f===void 0?null:f;return[function(){return p(l())},I===null?void 0:function(){return p(I())}]},[l,f,b,y]);var h=r(c,x[0],x[1]);return s(function(){m.hasValue=!0,m.value=h},[h]),i(h),h},$i}var Qi={};/**
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 Zd;function O4(){return Zd||(Zd=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,m,y,x){var b=o(null),h;b.current===null?(h={hasValue:!1,value:null},b.current=h):h=b.current;var p=a(function(){var I=!1,E,_,A=function(D){if(!I){I=!0,E=D;var N=y(D);if(x!==void 0&&h.hasValue){var P=h.value;if(x(P,N))return _=P,P}return _=N,N}var B=E,Y=_;if(n(B,D))return Y;var $=y(D);return x!==void 0&&x(Y,$)?Y:(E=D,_=$,$)},S=m===void 0?null:m,L=function(){return A(f())},k=S===null?void 0:function(){return A(S())};return[L,k]},[f,m,y,x]),g=p[0],C=p[1],v=r(l,g,C);return s(function(){h.hasValue=!0,h.value=v},[v]),i(v),v}Qi.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Qi}process.env.NODE_ENV==="production"?qi.exports=L4():qi.exports=O4();var F4=qi.exports,At="default"in T?T.default:T,Xd=Symbol.for("react-redux-context"),zd=typeof globalThis<"u"?globalThis:{};function D4(){if(!At.createContext)return{};const e=zd[Xd]??(zd[Xd]=new Map);let t=e.get(At.createContext);return t||(t=At.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(At.createContext,t)),t}var Nn=D4(),k4=()=>{throw new Error("uSES not initialized!")};function Ui(e=Nn){return function(){const n=At.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 Yd=Ui(),Jd=k4,N4=e=>{Jd=e},R4=(e,t)=>e===t;function M4(e=Nn){const t=e===Nn?Yd:Ui(e),n=(r,o={})=>{const{equalityFn:s=R4,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:m}=t(),y=At.useRef(!0),x=At.useCallback({[r.name](h){const p=r(h);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:g,stabilityCheck:C}={stabilityCheck:f,identityFunctionCheck:m,...a};if(C==="always"||C==="once"&&y.current){const v=r(h);if(!s(p,v)){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 Zd;function L4(){return Zd||(Zd=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,b,y,x){var m=o(null),h;m.current===null?(h={hasValue:!1,value:null},m.current=h):h=m.current;var p=a(function(){var I=!1,E,_,A=function(D){if(!I){I=!0,E=D;var N=y(D);if(x!==void 0&&h.hasValue){var P=h.value;if(x(P,N))return _=P,P}return _=N,N}var B=E,Y=_;if(n(B,D))return Y;var $=y(D);return x!==void 0&&x(Y,$)?Y:(E=D,_=$,$)},S=b===void 0?null:b,L=function(){return A(f())},k=S===null?void 0:function(){return A(S())};return[L,k]},[f,b,y,x]),g=p[0],C=p[1],v=r(l,g,C);return s(function(){h.hasValue=!0,h.value=v},[v]),i(v),v}Qi.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Qi}process.env.NODE_ENV==="production"?qi.exports=T4():qi.exports=L4();var O4=qi.exports,At="default"in T?T.default:T,Xd=Symbol.for("react-redux-context"),zd=typeof globalThis<"u"?globalThis:{};function F4(){if(!At.createContext)return{};const e=zd[Xd]??(zd[Xd]=new Map);let t=e.get(At.createContext);return t||(t=At.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(At.createContext,t)),t}var Nn=F4(),D4=()=>{throw new Error("uSES not initialized!")};function Ui(e=Nn){return function(){const n=At.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 Yd=Ui(),Jd=D4,k4=e=>{Jd=e},N4=(e,t)=>e===t;function R4(e=Nn){const t=e===Nn?Yd:Ui(e),n=(r,o={})=>{const{equalityFn:s=N4,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:b}=t(),y=At.useRef(!0),x=At.useCallback({[r.name](h){const p=r(h);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:g,stabilityCheck:C}={stabilityCheck:f,identityFunctionCheck:b,...a};if(C==="always"||C==="once"&&y.current){const v=r(h);if(!s(p,v)){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:h,selected:p,selected2:v,stack:I})}}if((g==="always"||g==="once"&&y.current)&&p===h){let v;try{throw new Error}catch(I){({stack:v}=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:v})}y.current&&(y.current=!1)}return p}}[r.name],[r,f,a.stabilityCheck]),b=Jd(c.addNestedSub,i.getState,l||i.getState,x,s);return At.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var P4=M4();function j4(e){e()}function B4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){j4(()=>{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 qd={notify(){},get:()=>[]};function V4(e,t){let n,r=qd,o=0,s=!1;function a(h){f();const p=r.subscribe(h);let g=!1;return()=>{g||(g=!0,p(),m())}}function i(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=B4())}function m(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=qd)}function y(){s||(s=!0,f())}function x(){s&&(s=!1,m())}const b={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:y,tryUnsubscribe:x,getListeners:()=>r};return b}var G4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",H4=typeof navigator<"u"&&navigator.product==="ReactNative",W4=G4||H4?At.useLayoutEffect:At.useEffect;function Z4({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=At.useMemo(()=>{const l=V4(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=At.useMemo(()=>e.getState(),[e]);W4(()=>{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||Nn;return At.createElement(c.Provider,{value:a},n)}var Ki=Z4;function $d(e=Nn){const t=e===Nn?Yd:Ui(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var X4=$d();function z4(e=Nn){const t=e===Nn?X4:$d(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Y4=z4();N4(F4.useSyncExternalStoreWithSelector);const zt=Y4.withTypes(),ye=P4.withTypes(),Re={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},K={IDLE:"idle",LOADING:"loading",FAILED:"failed"},J4="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",Qd="Show more",q4="Show less",$4="Show preview",Q4="Hide preview",U4="Select email";function rt(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 K4=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ud=K4,ec=()=>Math.random().toString(36).substring(7).split("").join("."),eb={INIT:`@@redux/INIT${ec()}`,REPLACE:`@@redux/REPLACE${ec()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ec()}`},sr=eb;function No(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 tb(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(ob(e))return"date";if(rb(e))return"error";const n=nb(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 nb(e){return typeof e.constructor=="function"?e.constructor.name:null}function rb(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function ob(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Rn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=tb(e)),t}function Kd(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?rt(2):`Expected the root reducer to be a function. Instead, received: '${Rn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?rt(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"?rt(1):`Expected the enhancer to be a function. Instead, received: '${Rn(n)}'`);return n(Kd)(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((p,g)=>{a.set(g,p)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?rt(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 m(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?rt(4):`Expected the listener to be a function. Instead, received: '${Rn(p)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?rt(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 g=!0;l();const C=i++;return a.set(C,p),function(){if(g){if(c)throw new Error(process.env.NODE_ENV==="production"?rt(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.");g=!1,l(),a.delete(C),s=null}}}function y(p){if(!No(p))throw new Error(process.env.NODE_ENV==="production"?rt(7):`Actions must be plain objects. Instead, the actual type was: '${Rn(p)}'. 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 p.type>"u")throw new Error(process.env.NODE_ENV==="production"?rt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof p.type!="string")throw new Error(process.env.NODE_ENV==="production"?rt(17):`Action "type" property must be a string. Instead, the actual type was: '${Rn(p.type)}'. Value was: '${p.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?rt(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,p)}finally{c=!1}return(s=a).forEach(C=>{C()}),p}function x(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?rt(10):`Expected the nextReducer to be a function. Instead, received: '${Rn(p)}`);r=p,y({type:sr.REPLACE})}function b(){const p=m;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(process.env.NODE_ENV==="production"?rt(11):`Expected the observer to be an object. Instead, received: '${Rn(g)}'`);function C(){const I=g;I.next&&I.next(f())}return C(),{unsubscribe:p(C)}},[Ud](){return this}}}return y({type:sr.INIT}),{dispatch:y,subscribe:m,getState:f,replaceReducer:x,[Ud]:b}}function e0(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function sb(e,t,n,r){const o=Object.keys(t),s=n&&n.type===sr.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(!No(e))return`The ${s} has unexpected type of "${Rn(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===sr.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 ab(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:sr.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?rt(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:sr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?rt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${sr.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 t0(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"&&e0(`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{ab(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const m=sb(i,n,c,o);m&&e0(m)}let l=!1;const f={};for(let m=0;m<r.length;m++){const y=r[m],x=n[y],b=i[y],h=x(b,c);if(typeof h>"u"){const p=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?rt(14):`When called with an action of type ${p?`"${String(p)}"`:"(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]=h,l=l||h!==b}return l=l||r.length!==Object.keys(i).length,l?f:i}}function Ps(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function ib(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?rt(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=Ps(...i)(o.dispatch),{...o,dispatch:s}}}function n0(e){return No(e)&&"type"in e&&typeof e.type=="string"}var r0=Symbol.for("immer-nothing"),o0=Symbol.for("immer-draftable"),Tt=Symbol.for("immer-state"),cb=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 gt(e,...t){if(process.env.NODE_ENV!=="production"){const n=cb[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 Vr=Object.getPrototypeOf;function ar(e){return!!e&&!!e[Tt]}function bn(e){var t;return e?s0(e)||Array.isArray(e)||!!e[o0]||!!((t=e.constructor)!=null&&t[o0])||Vs(e)||Gs(e):!1}var lb=Object.prototype.constructor.toString();function s0(e){if(!e||typeof e!="object")return!1;const t=Vr(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)===lb}function js(e,t){Bs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Bs(e){const t=e[Tt];return t?t.type_:Array.isArray(e)?1:Vs(e)?2:Gs(e)?3:0}function tc(e,t){return Bs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a0(e,t,n){const r=Bs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function ub(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vs(e){return e instanceof Map}function Gs(e){return e instanceof Set}function ir(e){return e.copy_||e.base_}function nc(e,t){if(Vs(e))return new Map(e);if(Gs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=s0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Tt];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(Vr(e),r)}else{const r=Vr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function rc(e,t=!1){return Hs(e)||ar(e)||!bn(e)||(Bs(e)>1&&(e.set=e.add=e.clear=e.delete=db),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>rc(r,!0))),e}function db(){gt(2)}function Hs(e){return Object.isFrozen(e)}var fb={};function cr(e){const t=fb[e];return t||gt(0,e),t}var Ro;function i0(){return Ro}function pb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function c0(e,t){t&&(cr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function oc(e){sc(e),e.drafts_.forEach(hb),e.drafts_=null}function sc(e){e===Ro&&(Ro=e.parent_)}function l0(e){return Ro=pb(Ro,e)}function hb(e){const t=e[Tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function u0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Tt].modified_&&(oc(t),gt(4)),bn(e)&&(e=Ws(t,e),t.parent_||Zs(t,e)),t.patches_&&cr("Patches").generateReplacementPatches_(n[Tt].base_,e,t.patches_,t.inversePatches_)):e=Ws(t,n,[]),oc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r0?e:void 0}function Ws(e,t,n){if(Hs(t))return t;const r=t[Tt];if(!r)return js(t,(o,s)=>d0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Zs(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),js(s,(i,c)=>d0(e,r,o,i,c,n,a)),Zs(e,o,!1),n&&e.patches_&&cr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function d0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&gt(5),ar(o)){const i=s&&t&&t.type_!==3&&!tc(t.assigned_,r)?s.concat(r):void 0,c=Ws(e,o,i);if(a0(n,r,c),ar(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(bn(o)&&!Hs(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ws(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Zs(e,o)}}function Zs(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rc(t,n)}function gb(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:i0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=ac;n&&(o=[r],s=Mo);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var ac={get(e,t){if(t===Tt)return e;const n=ir(e);if(!tc(n,t))return mb(e,n,t);const r=n[t];return e.finalized_||!bn(r)?r:r===ic(e.base_,t)?(lc(e),e.copy_[t]=uc(r,e)):r},has(e,t){return t in ir(e)},ownKeys(e){return Reflect.ownKeys(ir(e))},set(e,t,n){const r=f0(ir(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=ic(ir(e),t),s=o==null?void 0:o[Tt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(ub(n,o)&&(n!==void 0||tc(e.base_,t)))return!0;lc(e),cc(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 ic(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,lc(e),cc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ir(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){gt(11)},getPrototypeOf(e){return Vr(e.base_)},setPrototypeOf(){gt(12)}},Mo={};js(ac,(e,t)=>{Mo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Mo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&gt(13),Mo.set.call(this,e,t,void 0)},Mo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&gt(14),ac.set.call(this,e[0],t,n,e[0])};function ic(e,t){const n=e[Tt];return(n?ir(n):e)[t]}function mb(e,t,n){var o;const r=f0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function f0(e,t){if(!(t in e))return;let n=Vr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vr(n)}}function cc(e){e.modified_||(e.modified_=!0,e.parent_&&cc(e.parent_))}function lc(e){e.copy_||(e.copy_=nc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var bb=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"&&gt(6),r!==void 0&&typeof r!="function"&&gt(7);let o;if(bn(t)){const s=l0(this),a=uc(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?oc(s):sc(s)}return c0(s,r),u0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===r0&&(o=void 0),this.autoFreeze_&&rc(o,!0),r){const s=[],a=[];cr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else gt(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){bn(e)||gt(8),ar(e)&&(e=yb(e));const t=l0(this),n=uc(e,void 0);return n[Tt].isManual_=!0,sc(t),n}finishDraft(e,t){const n=e&&e[Tt];(!n||!n.isManual_)&&gt(9);const{scope_:r}=n;return c0(r,t),u0(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=cr("Patches").applyPatches_;return ar(e)?r(e,t):this.produce(e,o=>r(o,t))}};function uc(e,t){const n=Vs(e)?cr("MapSet").proxyMap_(e,t):Gs(e)?cr("MapSet").proxySet_(e,t):gb(e,t);return(t?t.scope_:i0()).drafts_.push(n),n}function yb(e){return ar(e)||gt(10,e),p0(e)}function p0(e){if(!bn(e)||Hs(e))return e;const t=e[Tt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=nc(e,t.scope_.immer_.useStrictShallowCopy_)}else n=nc(e,!0);return js(n,(r,o)=>{a0(n,r,p0(o))}),t&&(t.finalized_=!1),n}var Lt=new bb,h0=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 Cb=(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:v})}y.current&&(y.current=!1)}return p}}[r.name],[r,f,a.stabilityCheck]),m=Jd(c.addNestedSub,i.getState,l||i.getState,x,s);return At.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var M4=R4();function P4(e){e()}function j4(){let e=null,t=null;return{clear(){e=null,t=null},notify(){P4(()=>{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 qd={notify(){},get:()=>[]};function B4(e,t){let n,r=qd,o=0,s=!1;function a(h){f();const p=r.subscribe(h);let g=!1;return()=>{g||(g=!0,p(),b())}}function i(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=j4())}function b(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=qd)}function y(){s||(s=!0,f())}function x(){s&&(s=!1,b())}const m={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:y,tryUnsubscribe:x,getListeners:()=>r};return m}var V4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",G4=typeof navigator<"u"&&navigator.product==="ReactNative",H4=V4||G4?At.useLayoutEffect:At.useEffect;function W4({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=At.useMemo(()=>{const l=B4(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=At.useMemo(()=>e.getState(),[e]);H4(()=>{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||Nn;return At.createElement(c.Provider,{value:a},n)}var Ki=W4;function $d(e=Nn){const t=e===Nn?Yd:Ui(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Z4=$d();function X4(e=Nn){const t=e===Nn?Z4:$d(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var z4=X4();k4(O4.useSyncExternalStoreWithSelector);const zt=z4.withTypes(),ye=M4.withTypes(),Re={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},K={IDLE:"idle",LOADING:"loading",FAILED:"failed"},Y4="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",Qd="Show more",J4="Show less",q4="Show preview",$4="Hide preview",Q4="Select email";function rt(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 U4=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ud=U4,ec=()=>Math.random().toString(36).substring(7).split("").join("."),K4={INIT:`@@redux/INIT${ec()}`,REPLACE:`@@redux/REPLACE${ec()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ec()}`},sr=K4;function No(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 eb(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(rb(e))return"date";if(nb(e))return"error";const n=tb(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 tb(e){return typeof e.constructor=="function"?e.constructor.name:null}function nb(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function rb(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Rn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=eb(e)),t}function Kd(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?rt(2):`Expected the root reducer to be a function. Instead, received: '${Rn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?rt(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"?rt(1):`Expected the enhancer to be a function. Instead, received: '${Rn(n)}'`);return n(Kd)(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((p,g)=>{a.set(g,p)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?rt(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 b(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?rt(4):`Expected the listener to be a function. Instead, received: '${Rn(p)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?rt(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 g=!0;l();const C=i++;return a.set(C,p),function(){if(g){if(c)throw new Error(process.env.NODE_ENV==="production"?rt(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.");g=!1,l(),a.delete(C),s=null}}}function y(p){if(!No(p))throw new Error(process.env.NODE_ENV==="production"?rt(7):`Actions must be plain objects. Instead, the actual type was: '${Rn(p)}'. 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 p.type>"u")throw new Error(process.env.NODE_ENV==="production"?rt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof p.type!="string")throw new Error(process.env.NODE_ENV==="production"?rt(17):`Action "type" property must be a string. Instead, the actual type was: '${Rn(p.type)}'. Value was: '${p.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?rt(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,p)}finally{c=!1}return(s=a).forEach(C=>{C()}),p}function x(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?rt(10):`Expected the nextReducer to be a function. Instead, received: '${Rn(p)}`);r=p,y({type:sr.REPLACE})}function m(){const p=b;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(process.env.NODE_ENV==="production"?rt(11):`Expected the observer to be an object. Instead, received: '${Rn(g)}'`);function C(){const I=g;I.next&&I.next(f())}return C(),{unsubscribe:p(C)}},[Ud](){return this}}}return y({type:sr.INIT}),{dispatch:y,subscribe:b,getState:f,replaceReducer:x,[Ud]:m}}function e0(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function ob(e,t,n,r){const o=Object.keys(t),s=n&&n.type===sr.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(!No(e))return`The ${s} has unexpected type of "${Rn(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===sr.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 sb(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:sr.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?rt(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:sr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?rt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${sr.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 t0(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"&&e0(`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{sb(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const b=ob(i,n,c,o);b&&e0(b)}let l=!1;const f={};for(let b=0;b<r.length;b++){const y=r[b],x=n[y],m=i[y],h=x(m,c);if(typeof h>"u"){const p=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?rt(14):`When called with an action of type ${p?`"${String(p)}"`:"(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]=h,l=l||h!==m}return l=l||r.length!==Object.keys(i).length,l?f:i}}function Ps(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function ab(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?rt(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=Ps(...i)(o.dispatch),{...o,dispatch:s}}}function n0(e){return No(e)&&"type"in e&&typeof e.type=="string"}var r0=Symbol.for("immer-nothing"),o0=Symbol.for("immer-draftable"),Tt=Symbol.for("immer-state"),ib=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 gt(e,...t){if(process.env.NODE_ENV!=="production"){const n=ib[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 Vr=Object.getPrototypeOf;function ar(e){return!!e&&!!e[Tt]}function bn(e){var t;return e?s0(e)||Array.isArray(e)||!!e[o0]||!!((t=e.constructor)!=null&&t[o0])||Vs(e)||Gs(e):!1}var cb=Object.prototype.constructor.toString();function s0(e){if(!e||typeof e!="object")return!1;const t=Vr(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)===cb}function js(e,t){Bs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Bs(e){const t=e[Tt];return t?t.type_:Array.isArray(e)?1:Vs(e)?2:Gs(e)?3:0}function tc(e,t){return Bs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a0(e,t,n){const r=Bs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function lb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vs(e){return e instanceof Map}function Gs(e){return e instanceof Set}function ir(e){return e.copy_||e.base_}function nc(e,t){if(Vs(e))return new Map(e);if(Gs(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=s0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Tt];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(Vr(e),r)}else{const r=Vr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function rc(e,t=!1){return Hs(e)||ar(e)||!bn(e)||(Bs(e)>1&&(e.set=e.add=e.clear=e.delete=ub),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>rc(r,!0))),e}function ub(){gt(2)}function Hs(e){return Object.isFrozen(e)}var db={};function cr(e){const t=db[e];return t||gt(0,e),t}var Ro;function i0(){return Ro}function fb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function c0(e,t){t&&(cr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function oc(e){sc(e),e.drafts_.forEach(pb),e.drafts_=null}function sc(e){e===Ro&&(Ro=e.parent_)}function l0(e){return Ro=fb(Ro,e)}function pb(e){const t=e[Tt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function u0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Tt].modified_&&(oc(t),gt(4)),bn(e)&&(e=Ws(t,e),t.parent_||Zs(t,e)),t.patches_&&cr("Patches").generateReplacementPatches_(n[Tt].base_,e,t.patches_,t.inversePatches_)):e=Ws(t,n,[]),oc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==r0?e:void 0}function Ws(e,t,n){if(Hs(t))return t;const r=t[Tt];if(!r)return js(t,(o,s)=>d0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Zs(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),js(s,(i,c)=>d0(e,r,o,i,c,n,a)),Zs(e,o,!1),n&&e.patches_&&cr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function d0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&gt(5),ar(o)){const i=s&&t&&t.type_!==3&&!tc(t.assigned_,r)?s.concat(r):void 0,c=Ws(e,o,i);if(a0(n,r,c),ar(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(bn(o)&&!Hs(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ws(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Zs(e,o)}}function Zs(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rc(t,n)}function hb(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:i0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=ac;n&&(o=[r],s=Mo);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var ac={get(e,t){if(t===Tt)return e;const n=ir(e);if(!tc(n,t))return gb(e,n,t);const r=n[t];return e.finalized_||!bn(r)?r:r===ic(e.base_,t)?(lc(e),e.copy_[t]=uc(r,e)):r},has(e,t){return t in ir(e)},ownKeys(e){return Reflect.ownKeys(ir(e))},set(e,t,n){const r=f0(ir(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=ic(ir(e),t),s=o==null?void 0:o[Tt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(lb(n,o)&&(n!==void 0||tc(e.base_,t)))return!0;lc(e),cc(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 ic(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,lc(e),cc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ir(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){gt(11)},getPrototypeOf(e){return Vr(e.base_)},setPrototypeOf(){gt(12)}},Mo={};js(ac,(e,t)=>{Mo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Mo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&gt(13),Mo.set.call(this,e,t,void 0)},Mo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&gt(14),ac.set.call(this,e[0],t,n,e[0])};function ic(e,t){const n=e[Tt];return(n?ir(n):e)[t]}function gb(e,t,n){var o;const r=f0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function f0(e,t){if(!(t in e))return;let n=Vr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Vr(n)}}function cc(e){e.modified_||(e.modified_=!0,e.parent_&&cc(e.parent_))}function lc(e){e.copy_||(e.copy_=nc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var mb=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"&&gt(6),r!==void 0&&typeof r!="function"&&gt(7);let o;if(bn(t)){const s=l0(this),a=uc(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?oc(s):sc(s)}return c0(s,r),u0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===r0&&(o=void 0),this.autoFreeze_&&rc(o,!0),r){const s=[],a=[];cr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else gt(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){bn(e)||gt(8),ar(e)&&(e=bb(e));const t=l0(this),n=uc(e,void 0);return n[Tt].isManual_=!0,sc(t),n}finishDraft(e,t){const n=e&&e[Tt];(!n||!n.isManual_)&&gt(9);const{scope_:r}=n;return c0(r,t),u0(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=cr("Patches").applyPatches_;return ar(e)?r(e,t):this.produce(e,o=>r(o,t))}};function uc(e,t){const n=Vs(e)?cr("MapSet").proxyMap_(e,t):Gs(e)?cr("MapSet").proxySet_(e,t):hb(e,t);return(t?t.scope_:i0()).drafts_.push(n),n}function bb(e){return ar(e)||gt(10,e),p0(e)}function p0(e){if(!bn(e)||Hs(e))return e;const t=e[Tt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=nc(e,t.scope_.immer_.useStrictShallowCopy_)}else n=nc(e,!0);return js(n,(r,o)=>{a0(n,r,p0(o))}),t&&(t.finalized_=!1),n}var Lt=new mb,h0=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 yb=(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})}}},xb=(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})}}},Cb=(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})}},vb={inputStabilityCheck:"once",identityFunctionCheck:"once"};function Eb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Ib(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function wb(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 g0=e=>Array.isArray(e)?e:[e];function _b(e){const t=Array.isArray(e[0])?e[0]:e;return wb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function m0(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Sb=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...vb,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Cb},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:xb}}},Ab=class{constructor(e){this.value=e}deref(){return this.value}},Tb=typeof WeakRef<"u"?WeakRef:Ab,Lb=0,b0=1;function Xs(){return{s:Lb,v:void 0,o:null,p:null}}function y0(e,t={}){let n=Xs();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var m;let i=n;const{length:c}=arguments;for(let y=0,x=c;y<x;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let h=i.o;h===null&&(i.o=h=new WeakMap);const p=h.get(b);p===void 0?(i=Xs(),h.set(b,i)):i=p}else{let h=i.p;h===null&&(i.p=h=new Map);const p=h.get(b);p===void 0?(i=Xs(),h.set(b,i)):i=p}}const l=i;let f;if(i.s===b0)f=i.v;else if(f=e.apply(null,arguments),s++,r){const y=((m=o==null?void 0:o.deref)==null?void 0:m.call(o))??o;y!=null&&r(y,f)&&(f=y,s!==0&&s--),o=typeof f=="object"&&f!==null||typeof f=="function"?new Tb(f):f}return l.s=b0,l.v=f,f}return a.clearCache=()=>{n=Xs(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Ob(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()),Eb(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const f={...n,...c},{memoize:m,memoizeOptions:y=[],argsMemoize:x=y0,argsMemoizeOptions:b=[],devModeChecks:h={}}=f,p=g0(y),g=g0(b),C=_b(o),v=m(function(){return s++,l.apply(null,arguments)},...p);let I=!0;const E=x(function(){a++;const A=m0(C,arguments);if(i=v.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=Sb(I,h);if(S.shouldRun&&S.run(l,A,i),L.shouldRun){const k=m0(C,arguments);L.run({inputSelectorResults:A,inputSelectorResultsCopy:k},{memoize:m,memoizeOptions:p},arguments)}I&&(I=!1)}return i},...g);return Object.assign(E,{resultFunc:l,memoizedResultFunc:v,dependencies:C,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:m,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var Fb=Ob(y0),Db=Object.assign((e,t=Fb)=>{Ib(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:()=>Db});function C0(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var kb=C0(),Nb=C0,Rb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ps:Ps.apply(null,arguments)},x0=e=>e&&typeof e.match=="function";function Po(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=>n0(r)&&r.type===e,n}function Mb(e){return typeof e=="function"&&"type"in e&&x0(e)}function Pb(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 jb(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Mb}=e;return()=>n=>r=>(t(r)&&console.warn(Pb(r.type)),n(r))}function v0(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})}},xb={inputStabilityCheck:"once",identityFunctionCheck:"once"};function vb(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Eb(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Ib(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 g0=e=>Array.isArray(e)?e:[e];function wb(e){const t=Array.isArray(e[0])?e[0]:e;return Ib(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function m0(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var _b=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...xb,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:yb},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:Cb}}},Sb=class{constructor(e){this.value=e}deref(){return this.value}},Ab=typeof WeakRef<"u"?WeakRef:Sb,Tb=0,b0=1;function Xs(){return{s:Tb,v:void 0,o:null,p:null}}function y0(e,t={}){let n=Xs();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var b;let i=n;const{length:c}=arguments;for(let y=0,x=c;y<x;y++){const m=arguments[y];if(typeof m=="function"||typeof m=="object"&&m!==null){let h=i.o;h===null&&(i.o=h=new WeakMap);const p=h.get(m);p===void 0?(i=Xs(),h.set(m,i)):i=p}else{let h=i.p;h===null&&(i.p=h=new Map);const p=h.get(m);p===void 0?(i=Xs(),h.set(m,i)):i=p}}const l=i;let f;if(i.s===b0)f=i.v;else if(f=e.apply(null,arguments),s++,r){const y=((b=o==null?void 0:o.deref)==null?void 0:b.call(o))??o;y!=null&&r(y,f)&&(f=y,s!==0&&s--),o=typeof f=="object"&&f!==null||typeof f=="function"?new Ab(f):f}return l.s=b0,l.v=f,f}return a.clearCache=()=>{n=Xs(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function Lb(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()),vb(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const f={...n,...c},{memoize:b,memoizeOptions:y=[],argsMemoize:x=y0,argsMemoizeOptions:m=[],devModeChecks:h={}}=f,p=g0(y),g=g0(m),C=wb(o),v=b(function(){return s++,l.apply(null,arguments)},...p);let I=!0;const E=x(function(){a++;const A=m0(C,arguments);if(i=v.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=_b(I,h);if(S.shouldRun&&S.run(l,A,i),L.shouldRun){const k=m0(C,arguments);L.run({inputSelectorResults:A,inputSelectorResultsCopy:k},{memoize:b,memoizeOptions:p},arguments)}I&&(I=!1)}return i},...g);return Object.assign(E,{resultFunc:l,memoizedResultFunc:v,dependencies:C,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:b,argsMemoize:x})};return Object.assign(r,{withTypes:()=>r}),r}var Ob=Lb(y0),Fb=Object.assign((e,t=Ob)=>{Eb(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:()=>Fb});function C0(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var Db=C0(),kb=C0,Nb=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ps:Ps.apply(null,arguments)},x0=e=>e&&typeof e.match=="function";function Po(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=>n0(r)&&r.type===e,n}function Rb(e){return typeof e=="function"&&"type"in e&&x0(e)}function Mb(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 Pb(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Rb}=e;return()=>n=>r=>(t(r)&&console.warn(Mb(r.type)),n(r))}function v0(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 E0=class ss extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ss.prototype)}static get[Symbol.species](){return ss}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ss(...t[0].concat(this)):new ss(...t.concat(this))}};function I0(e){return bn(e)?h0(e,()=>{}):e}function w0(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 Bb(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Vb(e,t,n){const r=_0(e,t,n);return{detectMutations(){return S0(e,t,r,n)}}}function _0(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]=_0(e,t,n[a],i))}}return s}function S0(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 m=s?s+"."+f:f;if(l&&t.some(b=>b instanceof RegExp?b.test(m):m===b))continue;const y=S0(e,t,n.children[f],r[f],i,m);if(y.wasMutated)return y}return{wasMutated:!1}}function Gb(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(m,y){return l[0]===y?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(y)).join(".")+"]"}),function(m,y){if(l.length>0){var x=l.indexOf(this);~x?l.splice(x+1):l.push(this),~x?f.splice(x,1/0,m):f.push(m),~l.indexOf(y)&&(y=c.call(this,m,y))}else l.push(y);return i==null?y:i.call(this,m,y)}},{isImmutable:r=Bb,ignoredPaths:o,warnAfter:s=32}=e;const a=Vb.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return m=>y=>{const x=v0(s,"ImmutableStateInvariantMiddleware");x.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=m(y);return x.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)`)}),x.warnIfExceeded(),b}}}}function A0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||No(e)}function dc(e,t="",n=A0,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 m=t?t+"."+l:l;if(!(c&&o.some(x=>x instanceof RegExp?x.test(m):m===x))){if(!n(f))return{keyPath:m,value:f};if(typeof f=="object"&&(a=dc(f,m,n,r,o,s),a))return a}}return s&&T0(e)&&s.add(e),!1}function T0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!T0(t))return!1;return!0}function Hb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=A0,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 m=>y=>x=>{if(!n0(x))return y(x);const b=y(x),h=v0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(x.type)!==-1)&&h.measureTime(()=>{const p=dc(x,"",t,n,o,f);if(p){const{keyPath:g,value:C}=p;console.error(`A non-serializable value was detected in an action, in the path: \`${g}\`. Value:`,C,`
573
+ It is disabled in production builds, so you don't need to worry about that.`)}}}var E0=class ss extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ss.prototype)}static get[Symbol.species](){return ss}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ss(...t[0].concat(this)):new ss(...t.concat(this))}};function I0(e){return bn(e)?h0(e,()=>{}):e}function w0(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 jb(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Bb(e,t,n){const r=_0(e,t,n);return{detectMutations(){return S0(e,t,r,n)}}}function _0(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]=_0(e,t,n[a],i))}}return s}function S0(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 b=s?s+"."+f:f;if(l&&t.some(m=>m instanceof RegExp?m.test(b):b===m))continue;const y=S0(e,t,n.children[f],r[f],i,b);if(y.wasMutated)return y}return{wasMutated:!1}}function Vb(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(b,y){return l[0]===y?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(y)).join(".")+"]"}),function(b,y){if(l.length>0){var x=l.indexOf(this);~x?l.splice(x+1):l.push(this),~x?f.splice(x,1/0,b):f.push(b),~l.indexOf(y)&&(y=c.call(this,b,y))}else l.push(y);return i==null?y:i.call(this,b,y)}},{isImmutable:r=jb,ignoredPaths:o,warnAfter:s=32}=e;const a=Bb.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return b=>y=>{const x=v0(s,"ImmutableStateInvariantMiddleware");x.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 m=b(y);return x.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)`)}),x.warnIfExceeded(),m}}}}function A0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||No(e)}function dc(e,t="",n=A0,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 b=t?t+"."+l:l;if(!(c&&o.some(x=>x instanceof RegExp?x.test(b):b===x))){if(!n(f))return{keyPath:b,value:f};if(typeof f=="object"&&(a=dc(f,b,n,r,o,s),a))return a}}return s&&T0(e)&&s.add(e),!1}function T0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!T0(t))return!1;return!0}function Gb(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=A0,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 b=>y=>x=>{if(!n0(x))return y(x);const m=y(x),h=v0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(x.type)!==-1)&&h.measureTime(()=>{const p=dc(x,"",t,n,o,f);if(p){const{keyPath:g,value:C}=p;console.error(`A non-serializable value was detected in an action, in the path: \`${g}\`. Value:`,C,`
574
574
  Take a look at the logic that dispatched this action: `,x,`
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||(h.measureTime(()=>{const p=m.getState(),g=dc(p,"",t,n,s,f);if(g){const{keyPath:C,value:v}=g;console.error(`A non-serializable value was detected in the state, in the path: \`${C}\`. Value:`,v,`
576
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),i||(h.measureTime(()=>{const p=b.getState(),g=dc(p,"",t,n,s,f);if(g){const{keyPath:C,value:v}=g;console.error(`A non-serializable value was detected in the state, in the path: \`${C}\`. Value:`,v,`
577
577
  Take a look at the reducer(s) handling this action type: ${x.type}.
578
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),b}}}function zs(e){return typeof e=="boolean"}var Wb=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new E0;if(n&&(zs(n)?a.push(kb):a.push(Nb(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};zs(r)||(i=r),a.unshift(Gb(i))}if(o){let i={};zs(o)||(i=o),a.push(Hb(i))}if(s){let i={};zs(s)||(i=s),a.unshift(jb(i))}}return a},Zb="RTK_autoBatch",L0=e=>t=>{setTimeout(t,e)},Xb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:L0(10),zb=(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"?Xb:e.type==="callback"?e.queueNotification:L0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const m=()=>o&&f(),y=r.subscribe(m);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var m;try{return o=!((m=f==null?void 0:f.meta)!=null&&m[Zb]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},Yb=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new E0(e);return r&&o.push(zb(typeof r=="object"?r:void 0)),o};function Jb(e){const t=Wb(),{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(No(n))i=t0(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=Ps;o&&(l=Rb({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=ib(...c),m=Yb(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(m):m();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 x=l(...y);return Kd(i,s,x)}function O0(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 qb(e){return typeof e=="function"}function $b(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]=O0(t),s;if(qb(e))s=()=>I0(e());else{const i=I0(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,m)=>{if(m)if(ar(f)){const x=m(f,c);return x===void 0?f:x}else{if(bn(f))return h0(f,y=>m(y,c));{const y=m(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 Qb=(e,t)=>x0(e)?e.match(t):e(t);function Ub(...e){return t=>e.some(n=>Qb(n,t))}var Kb="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ey=(e=21)=>{let t="",n=e;for(;n--;)t+=Kb[Math.random()*64|0];return t},ty=["name","message","stack","code"],fc=class{constructor(e,t){ke(this,"_type");this.payload=e,this.meta=t}},F0=class{constructor(e,t){ke(this,"_type");this.payload=e,this.meta=t}},ny=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of ty)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Yt=(()=>{function e(t,n,r){const o=Po(t+"/fulfilled",(c,l,f,m)=>({payload:c,meta:{...m||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=Po(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=Po(t+"/rejected",(c,l,f,m,y)=>({payload:m,error:(r&&r.serializeError||ny)(c||"Rejected"),meta:{...y||{},arg:f,requestId:l,rejectedWithValue:!!m,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,m)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):ey(),x=new AbortController;let b,h;function p(C){h=C,x.abort()}const g=async function(){var I,E;let C;try{let _=(I=r==null?void 0:r.condition)==null?void 0:I.call(r,c,{getState:f,extra:m});if(oy(_)&&(_=await _),_===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,L)=>{b=()=>{L({name:"AbortError",message:h||"Aborted"})},x.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:m}))),C=await Promise.race([A,Promise.resolve(n(c,{dispatch:l,getState:f,extra:m,requestId:y,signal:x.signal,abort:p,rejectWithValue:(S,L)=>new fc(S,L),fulfillWithValue:(S,L)=>new F0(S,L)})).then(S=>{if(S instanceof fc)throw S;return S instanceof F0?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){C=_ instanceof fc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{b&&x.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&a.match(C)&&C.meta.condition||l(C),C}();return Object.assign(g,{abort:p,requestId:y,arg:c,unwrap(){return g.then(ry)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Ub(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function ry(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function oy(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var sy=Symbol.for("rtk-slice-createasyncthunk");function ay(e,t){return`${e}/${t}`}function iy({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[sy];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(ly()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(v,I){const E=typeof v=="string"?v:v.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(v,I){return l.sliceMatchers.push({matcher:v,reducer:I}),f},exposeAction(v,I){return l.actionCreators[v]=I,f},exposeCaseReducer(v,I){return l.sliceCaseReducersByName[v]=I,f}};c.forEach(v=>{const I=i[v],E={reducerName:v,type:ay(s,v),createNotation:typeof o.reducers=="function"};dy(I)?py(E,I,f,t):uy(E,I,f)});function m(){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[v={},I=[],E=void 0]=typeof o.extraReducers=="function"?O0(o.extraReducers):[o.extraReducers],_={...v,...l.sliceCaseReducersByType};return $b(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of l.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of I)A.addMatcher(S.matcher,S.reducer);E&&A.addDefaultCase(E)})}const y=v=>v,x=new Map;let b;function h(v,I){return b||(b=m()),b(v,I)}function p(){return b||(b=m()),b.getInitialState()}function g(v,I=!1){function E(A){let S=A[v];if(typeof S>"u"){if(I)S=p();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 _(A=y){const S=w0(x,I,{insert:()=>new WeakMap});return w0(S,A,{insert:()=>{const L={};for(const[k,D]of Object.entries(o.selectors??{}))L[k]=cy(D,A,p,I);return L}})}return{reducerPath:v,getSelectors:_,get selectors(){return _(E)},selectSlice:E}}const C={name:s,reducer:h,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:p,...g(a),injectInto(v,{reducerPath:I,...E}={}){const _=I??a;return v.inject({reducerPath:_,reducer:h},E),{...C,...g(_,!0)}}};return C}}function cy(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 pc=iy();function ly(){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 uy({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!fy(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?Po(e,a):Po(e))}function dy(e){return e._reducerDefinitionType==="asyncThunk"}function fy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function py({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,m=o(e,s,f);r.exposeAction(t,m),a&&r.addCase(m.fulfilled,a),i&&r.addCase(m.pending,i),c&&r.addCase(m.rejected,c),l&&r.addMatcher(m.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Ys,pending:i||Ys,rejected:c||Ys,settled:l||Ys})}function Ys(){}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 rn="success",qe="error",D0="Some error occured. Please contact support@hiverhq.com",k0="Card refreshed successfully",hy="Card linked successfully",gy="Error in linking the card",my="Card unlinked successfully",by="Failed to unlink the card",yn="Something went wrong",yy="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",Cy=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)`)}}),h.warnIfExceeded()),m}}}function zs(e){return typeof e=="boolean"}var Hb=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new E0;if(n&&(zs(n)?a.push(Db):a.push(kb(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};zs(r)||(i=r),a.unshift(Vb(i))}if(o){let i={};zs(o)||(i=o),a.push(Gb(i))}if(s){let i={};zs(s)||(i=s),a.unshift(Pb(i))}}return a},Wb="RTK_autoBatch",L0=e=>t=>{setTimeout(t,e)},Zb=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:L0(10),Xb=(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"?Zb:e.type==="callback"?e.queueNotification:L0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const b=()=>o&&f(),y=r.subscribe(b);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var b;try{return o=!((b=f==null?void 0:f.meta)!=null&&b[Wb]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},zb=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new E0(e);return r&&o.push(Xb(typeof r=="object"?r:void 0)),o};function Yb(e){const t=Hb(),{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(No(n))i=t0(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(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?Me(4):"each middleware provided to configureStore must be a function");let l=Ps;o&&(l=Nb({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=ab(...c),b=zb(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(b):b();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(m=>typeof m!="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 x=l(...y);return Kd(i,s,x)}function O0(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 Jb(e){return typeof e=="function"}function qb(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]=O0(t),s;if(Jb(e))s=()=>I0(e());else{const i=I0(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,b)=>{if(b)if(ar(f)){const x=b(f,c);return x===void 0?f:x}else{if(bn(f))return h0(f,y=>b(y,c));{const y=b(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 $b=(e,t)=>x0(e)?e.match(t):e(t);function Qb(...e){return t=>e.some(n=>$b(n,t))}var Ub="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Kb=(e=21)=>{let t="",n=e;for(;n--;)t+=Ub[Math.random()*64|0];return t},ey=["name","message","stack","code"],fc=class{constructor(e,t){ke(this,"_type");this.payload=e,this.meta=t}},F0=class{constructor(e,t){ke(this,"_type");this.payload=e,this.meta=t}},ty=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of ey)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Yt=(()=>{function e(t,n,r){const o=Po(t+"/fulfilled",(c,l,f,b)=>({payload:c,meta:{...b||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=Po(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=Po(t+"/rejected",(c,l,f,b,y)=>({payload:b,error:(r&&r.serializeError||ty)(c||"Rejected"),meta:{...y||{},arg:f,requestId:l,rejectedWithValue:!!b,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,b)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):Kb(),x=new AbortController;let m,h;function p(C){h=C,x.abort()}const g=async function(){var I,E;let C;try{let _=(I=r==null?void 0:r.condition)==null?void 0:I.call(r,c,{getState:f,extra:b});if(ry(_)&&(_=await _),_===!1||x.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,L)=>{m=()=>{L({name:"AbortError",message:h||"Aborted"})},x.signal.addEventListener("abort",m)});l(s(y,c,(E=r==null?void 0:r.getPendingMeta)==null?void 0:E.call(r,{requestId:y,arg:c},{getState:f,extra:b}))),C=await Promise.race([A,Promise.resolve(n(c,{dispatch:l,getState:f,extra:b,requestId:y,signal:x.signal,abort:p,rejectWithValue:(S,L)=>new fc(S,L),fulfillWithValue:(S,L)=>new F0(S,L)})).then(S=>{if(S instanceof fc)throw S;return S instanceof F0?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){C=_ instanceof fc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{m&&x.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(C)&&C.meta.condition||l(C),C}();return Object.assign(g,{abort:p,requestId:y,arg:c,unwrap(){return g.then(ny)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Qb(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function ny(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ry(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var oy=Symbol.for("rtk-slice-createasyncthunk");function sy(e,t){return`${e}/${t}`}function ay({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[oy];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(cy()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(v,I){const E=typeof v=="string"?v:v.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(v,I){return l.sliceMatchers.push({matcher:v,reducer:I}),f},exposeAction(v,I){return l.actionCreators[v]=I,f},exposeCaseReducer(v,I){return l.sliceCaseReducersByName[v]=I,f}};c.forEach(v=>{const I=i[v],E={reducerName:v,type:sy(s,v),createNotation:typeof o.reducers=="function"};uy(I)?fy(E,I,f,t):ly(E,I,f)});function b(){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[v={},I=[],E=void 0]=typeof o.extraReducers=="function"?O0(o.extraReducers):[o.extraReducers],_={...v,...l.sliceCaseReducersByType};return qb(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of l.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of I)A.addMatcher(S.matcher,S.reducer);E&&A.addDefaultCase(E)})}const y=v=>v,x=new Map;let m;function h(v,I){return m||(m=b()),m(v,I)}function p(){return m||(m=b()),m.getInitialState()}function g(v,I=!1){function E(A){let S=A[v];if(typeof S>"u"){if(I)S=p();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 _(A=y){const S=w0(x,I,{insert:()=>new WeakMap});return w0(S,A,{insert:()=>{const L={};for(const[k,D]of Object.entries(o.selectors??{}))L[k]=iy(D,A,p,I);return L}})}return{reducerPath:v,getSelectors:_,get selectors(){return _(E)},selectSlice:E}}const C={name:s,reducer:h,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:p,...g(a),injectInto(v,{reducerPath:I,...E}={}){const _=I??a;return v.inject({reducerPath:_,reducer:h},E),{...C,...g(_,!0)}}};return C}}function iy(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 pc=ay();function cy(){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 ly({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!dy(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?Po(e,a):Po(e))}function uy(e){return e._reducerDefinitionType==="asyncThunk"}function dy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function fy({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,b=o(e,s,f);r.exposeAction(t,b),a&&r.addCase(b.fulfilled,a),i&&r.addCase(b.pending,i),c&&r.addCase(b.rejected,c),l&&r.addMatcher(b.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Ys,pending:i||Ys,rejected:c||Ys,settled:l||Ys})}function Ys(){}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 rn="success",qe="error",D0="Some error occured. Please contact support@hiverhq.com",k0="Card refreshed successfully",py="Card linked successfully",hy="Error in linking the card",gy="Card unlinked successfully",my="Failed to unlink the card",yn="Something went wrong",by="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",yy=d.styled(d.Box)`
579
579
  display: flex;
580
580
  flex-direction: row;
581
581
  align-items: center;
582
- `,xy=d.styled(d.Box)`
582
+ `,Cy=d.styled(d.Box)`
583
583
  padding: 5px 8px;
584
584
  color: white;
585
- `,vy=d.styled(d.brandIcons.Logo)(()=>({height:"26px",width:"26px",color:"#FFFFFF",marginRight:"4px"})),Ey=d.styled(d.Stack)`
585
+ `,xy=d.styled(d.brandIcons.Logo)(()=>({height:"26px",width:"26px",color:"#FFFFFF",marginRight:"4px"})),vy=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: ${x.type}.
592
592
  fill: #ffffff;
593
593
  width: 10px;
594
594
  }
595
- `,Iy=(e,{closeToast:t})=>u.jsx(Ey,{children:u.jsx("img",{src:yy,onClick:t})}),Js=({message:e})=>u.jsxs(Cy,{children:[u.jsx(vy,{}),u.jsx(xy,{children:e})]});function _e(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:u.jsx(Iy,{}),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(Js,{message:t}),{...o,icon:!1});break}case"error":{s=Le.error(u.jsx(Js,{message:t}),{...o,icon:!1});break}case"info-dark":{s=Le.info(u.jsx(Js,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=Le.info(u.jsx(Js,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{wy(s)},r&&!isNaN(r)?Number(r):5e3),s}function wy(e){Le.dismiss(e)}const N0={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},_y="/v1/api"+"/templates/metadata",R0={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},Sy="Required Field",Ay="Invalid date",M0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Ty=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,P0="Please enter a valid URL",Ly="Please enter valid ID",Oy="Please enter valid input",Fy="URL must start with https://",Dy="URL should not end with a slash",ky="Invalid email address",Ny="Email must be a string",j0="Invalid date",Ry="Date cannot be in the past",My="Date cannot be in the future",Py="Invalid number",jy="Invalid text",By=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)}),we({url:`${_y}?${t.toString()}`,method:R0.GET})},Vy="/v1/api/connectors/ug?onlyEnabledAuthenticated=true&minimal=true",B0=async e=>{const t=new URLSearchParams;for(const[s,a]of Object.entries(e||{}))if(Array.isArray(a))a.forEach(i=>{i&&t.append(s,String(i))});else{if(!a)continue;t.append(s,a)}let n=Vy;e&&(n+=`?${t.toString()}`);const r=await we({url:n,method:R0.GET}),o=r==null?void 0:r.data;return Array.isArray(o)?o.map(({id:s,name:a,logo:i,connectorType:c})=>({id:s,name:a,logo:i,connectorType:c})).filter(({logo:s})=>!!s):[]};let Gr={};const Gy={get length(){return Object.keys(Gr).length},getItem(e){return Gr[e]??null},setItem(e,t){Gr[e]=t},removeItem(e){delete Gr[e]},clear(){Gr={}},key(e){return Object.keys(Gr)[e]}},Hy={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},V0=(e="LOCAL")=>Hy[e]??Gy,G0=(e="LOCAL")=>{const t=V0(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 hc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(hc||{});const Wy={[hc.ADD]:(e,t)=>e+t,[hc.MULTIPLY]:(e,t)=>e*t},Zy=e=>e,H0=()=>{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}`},W0=(e,t)=>{let n;const r=Wy[t]??Zy;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},Z0=(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},gc=Symbol("root"),Xy="connectors-store",zy=e=>{const{name:t,initialState:n,persist:r,persistKey:o=`${Xy}-${t}`}=e,s=G0("LOCAL"),a={...n},i=r?s.getItem(o)??a:a,c=new Map,l=new Map;l.set(gc,new Set);const f=(b,h,p=!0)=>{var v;const g=Symbol("callback");c.set(g,b);const C=h||gc;if(l.has(C)||l.set(C,new Set),(v=l.get(C))==null||v.add(g),p){const I=h?i[h]:i;b(I)}return()=>{var I;c.delete(g),(I=l.get(C))==null||I.delete(g)}},m=(b,h)=>{h?i[h]=b:Object.assign(i,b),x();const p=h||gc,g=l.get(p);if(g)for(const C of g){const v=c.get(C);v==null||v(h?i[h]:i)}},y=b=>b?i[b]:{...i},x=()=>{r&&s.setItem(o,i)};return{subscribe:f,setData:m,getData:y}},Yy=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?Dy:M0.test(n)?!0:e||P0:Fy}return!1},Jy=e=>t=>t&&typeof t=="string"?Ty.test(t)?!0:e||ky:Ny,qy=e=>t=>t==null||t===""?e||Sy:!0,$y=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Ay)return j0;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||Ry:i&&o>s?e||My:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:j0},Qy=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||Py},mc=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||jy},Uy=e=>t=>typeof t=="string"?t.startsWith("https:")?M0.test(t)?!0:e||P0:t.trim().length>0?!0:e||Ly:e||Oy;function lr(e){"@babel/helpers - typeof";return lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lr(e)}function Ky(e,t){if(lr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(lr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X0(e){var t=Ky(e,"string");return lr(t)=="symbol"?t:t+""}function Hr(e,t,n){return(t=X0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z0(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 oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z0(Object(n),!0).forEach(function(r){Hr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function e9(e){if(Array.isArray(e))return e}function t9(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 bc(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 Y0(e,t){if(e){if(typeof e=="string")return bc(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)?bc(e,t):void 0}}function n9(){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 nt(e,t){return e9(e)||t9(e,t)||Y0(e,t)||n9()}function r9(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 Jt(e,t){if(e==null)return{};var n,r,o=r9(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 o9=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function yc(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,m=e.onMenuClose,y=e.onMenuOpen,x=e.value,b=Jt(e,o9),h=w.useState(i!==void 0?i:n),p=nt(h,2),g=p[0],C=p[1],v=w.useState(c!==void 0?c:o),I=nt(v,2),E=I[0],_=I[1],A=w.useState(x!==void 0?x:a),S=nt(A,2),L=S[0],k=S[1],D=w.useCallback(function(X,q){typeof l=="function"&&l(X,q),k(X)},[l]),N=w.useCallback(function(X,q){var se;typeof f=="function"&&(se=f(X,q)),C(se!==void 0?se:X)},[f]),P=w.useCallback(function(){typeof y=="function"&&y(),_(!0)},[y]),B=w.useCallback(function(){typeof m=="function"&&m(),_(!1)},[m]),Y=i!==void 0?i:g,$=c!==void 0?c:E,H=x!==void 0?x:L;return oe(oe({},b),{},{inputValue:Y,menuIsOpen:$,onChange:D,onInputChange:N,onMenuClose:B,onMenuOpen:P,value:H})}function ue(){return ue=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},ue.apply(null,arguments)}function s9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J0(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,X0(r.key),r)}}function a9(e,t,n){return t&&J0(e.prototype,t),n&&J0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cc(e,t){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Cc(e,t)}function i9(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&&Cc(e,t)}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qs(e)}function q0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q0=function(){return!!e})()}function c9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l9(e,t){if(t&&(lr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return c9(e)}function u9(e){var t=q0();return function(){var n,r=qs(e);if(t){var o=qs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l9(this,n)}}function d9(e){if(Array.isArray(e))return bc(e)}function f9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function p9(){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 Wr(e){return d9(e)||f9(e)||Y0(e)||p9()}var h9=!1;function g9(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 m9(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 b9=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?!h9: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(m9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=g9(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}(),st="-ms-",$s="-moz-",Ae="-webkit-",$0="comm",xc="rule",vc="decl",y9="@import",Q0="@keyframes",C9="@layer",x9=Math.abs,Qs=String.fromCharCode,v9=Object.assign;function E9(e,t){return ot(e,0)^45?(((t<<2^ot(e,0))<<2^ot(e,1))<<2^ot(e,2))<<2^ot(e,3):0}function U0(e){return e.trim()}function I9(e,t){return(e=t.exec(e))?e[0]:e}function Te(e,t,n){return e.replace(t,n)}function Ec(e,t){return e.indexOf(t)}function ot(e,t){return e.charCodeAt(t)|0}function jo(e,t,n){return e.slice(t,n)}function on(e){return e.length}function Ic(e){return e.length}function Us(e,t){return t.push(e),e}function w9(e,t){return e.map(t).join("")}var Ks=1,Zr=1,K0=0,mt=0,$e=0,Xr="";function ea(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Ks,column:Zr,length:a,return:""}}function Bo(e,t){return v9(ea("",null,null,"",null,null,0),e,{length:-e.length},t)}function _9(){return $e}function S9(){return $e=mt>0?ot(Xr,--mt):0,Zr--,$e===10&&(Zr=1,Ks--),$e}function Ot(){return $e=mt<K0?ot(Xr,mt++):0,Zr++,$e===10&&(Zr=1,Ks++),$e}function sn(){return ot(Xr,mt)}function ta(){return mt}function Vo(e,t){return jo(Xr,e,t)}function Go(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 ef(e){return Ks=Zr=1,K0=on(Xr=e),mt=0,[]}function tf(e){return Xr="",e}function na(e){return U0(Vo(mt-1,wc(e===91?e+2:e===40?e+1:e)))}function A9(e){for(;($e=sn())&&$e<33;)Ot();return Go(e)>2||Go($e)>3?"":" "}function T9(e,t){for(;--t&&Ot()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return Vo(e,ta()+(t<6&&sn()==32&&Ot()==32))}function wc(e){for(;Ot();)switch($e){case e:return mt;case 34:case 39:e!==34&&e!==39&&wc($e);break;case 40:e===41&&wc(e);break;case 92:Ot();break}return mt}function L9(e,t){for(;Ot()&&e+$e!==57;)if(e+$e===84&&sn()===47)break;return"/*"+Vo(t,mt-1)+"*"+Qs(e===47?e:Ot())}function O9(e){for(;!Go(sn());)Ot();return Vo(e,mt)}function F9(e){return tf(ra("",null,null,null,[""],e=ef(e),0,[0],e))}function ra(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,m=a,y=0,x=0,b=0,h=1,p=1,g=1,C=0,v="",I=o,E=s,_=r,A=v;p;)switch(b=C,C=Ot()){case 40:if(b!=108&&ot(A,m-1)==58){Ec(A+=Te(na(C),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:A+=na(C);break;case 9:case 10:case 13:case 32:A+=A9(b);break;case 92:A+=T9(ta()-1,7);continue;case 47:switch(sn()){case 42:case 47:Us(D9(L9(Ot(),ta()),t,n),c);break;default:A+="/"}break;case 123*h:i[l++]=on(A)*g;case 125*h:case 59:case 0:switch(C){case 0:case 125:p=0;case 59+f:g==-1&&(A=Te(A,/\f/g,"")),x>0&&on(A)-m&&Us(x>32?rf(A+";",r,n,m-1):rf(Te(A," ","")+";",r,n,m-2),c);break;case 59:A+=";";default:if(Us(_=nf(A,t,n,l,f,o,i,v,I=[],E=[],m),s),C===123)if(f===0)ra(A,t,_,_,I,s,m,i,E);else switch(y===99&&ot(A,3)===110?100:y){case 100:case 108:case 109:case 115:ra(e,_,_,r&&Us(nf(e,_,_,0,0,o,i,v,o,I=[],m),E),o,E,m,i,r?I:E);break;default:ra(A,_,_,_,[""],E,0,i,E)}}l=f=x=0,h=g=1,v=A="",m=a;break;case 58:m=1+on(A),x=b;default:if(h<1){if(C==123)--h;else if(C==125&&h++==0&&S9()==125)continue}switch(A+=Qs(C),C*h){case 38:g=f>0?1:(A+="\f",-1);break;case 44:i[l++]=(on(A)-1)*g,g=1;break;case 64:sn()===45&&(A+=na(Ot())),y=sn(),f=m=on(v=A+=O9(ta())),C++;break;case 45:b===45&&on(A)==2&&(h=0)}}return s}function nf(e,t,n,r,o,s,a,i,c,l,f){for(var m=o-1,y=o===0?s:[""],x=Ic(y),b=0,h=0,p=0;b<r;++b)for(var g=0,C=jo(e,m+1,m=x9(h=a[b])),v=e;g<x;++g)(v=U0(h>0?y[g]+" "+C:Te(C,/&\f/g,y[g])))&&(c[p++]=v);return ea(e,t,n,o===0?xc:i,c,l,f)}function D9(e,t,n){return ea(e,t,n,$0,Qs(_9()),jo(e,2,-2),0)}function rf(e,t,n,r){return ea(e,t,n,vc,jo(e,0,r),jo(e,r+1,-1),r)}function zr(e,t){for(var n="",r=Ic(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function k9(e,t,n,r){switch(e.type){case C9:if(e.children.length)break;case y9:case vc:return e.return=e.return||e.value;case $0:return"";case Q0:return e.return=e.value+"{"+zr(e.children,r)+"}";case xc:e.value=e.props.join(",")}return on(n=zr(e.children,r))?e.return=e.value+"{"+n+"}":""}function N9(e){var t=Ic(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 R9(e){return function(t){t.root||(t=t.return)&&e(t)}}function M9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var P9=function(t,n,r){for(var o=0,s=0;o=s,s=sn(),o===38&&s===12&&(n[r]=1),!Go(s);)Ot();return Vo(t,mt)},j9=function(t,n){var r=-1,o=44;do switch(Go(o)){case 0:o===38&&sn()===12&&(n[r]=1),t[r]+=P9(mt-1,n,r);break;case 2:t[r]+=na(o);break;case 4:if(o===44){t[++r]=sn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Qs(o)}while(o=Ot());return t},B9=function(t,n){return tf(j9(ef(t),n))},of=new WeakMap,V9=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&&!of.get(r))&&!o){of.set(t,!0);for(var s=[],a=B9(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]}}},G9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function sf(e,t){switch(E9(e,t)){case 5103:return Ae+"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 Ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ae+e+$s+e+st+e+e;case 6828:case 4268:return Ae+e+st+e+e;case 6165:return Ae+e+st+"flex-"+e+e;case 5187:return Ae+e+Te(e,/(\w+).+(:[^]+)/,Ae+"box-$1$2"+st+"flex-$1$2")+e;case 5443:return Ae+e+st+"flex-item-"+Te(e,/flex-|-self/,"")+e;case 4675:return Ae+e+st+"flex-line-pack"+Te(e,/align-content|flex-|-self/,"")+e;case 5548:return Ae+e+st+Te(e,"shrink","negative")+e;case 5292:return Ae+e+st+Te(e,"basis","preferred-size")+e;case 6060:return Ae+"box-"+Te(e,"-grow","")+Ae+e+st+Te(e,"grow","positive")+e;case 4554:return Ae+Te(e,/([^-])(transform)/g,"$1"+Ae+"$2")+e;case 6187:return Te(Te(Te(e,/(zoom-|grab)/,Ae+"$1"),/(image-set)/,Ae+"$1"),e,"")+e;case 5495:case 3959:return Te(e,/(image-set\([^]*)/,Ae+"$1$`$1");case 4968:return Te(Te(e,/(.+:)(flex-)?(.*)/,Ae+"box-pack:$3"+st+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ae+e+e;case 4095:case 3583:case 4068:case 2532:return Te(e,/(.+)-inline(.+)/,Ae+"$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(on(e)-1-t>6)switch(ot(e,t+1)){case 109:if(ot(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Ae+"$2-$3$1"+$s+(ot(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ec(e,"stretch")?sf(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ot(e,t+1)!==115)break;case 6444:switch(ot(e,on(e)-3-(~Ec(e,"!important")&&10))){case 107:return Te(e,":",":"+Ae)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ae+(ot(e,14)===45?"inline-":"")+"box$3$1"+Ae+"$2$3$1"+st+"$2box$3")+e}break;case 5936:switch(ot(e,t+11)){case 114:return Ae+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ae+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ae+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ae+e+st+e+e}return e}var H9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case vc:t.return=sf(t.value,t.length);break;case Q0:return zr([Bo(t,{value:Te(t.value,"@","@"+Ae)})],o);case xc:if(t.length)return w9(t.props,function(s){switch(I9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zr([Bo(t,{props:[Te(s,/:(read-\w+)/,":"+$s+"$1")]})],o);case"::placeholder":return zr([Bo(t,{props:[Te(s,/:(plac\w+)/,":"+Ae+"input-$1")]}),Bo(t,{props:[Te(s,/:(plac\w+)/,":"+$s+"$1")]}),Bo(t,{props:[Te(s,/:(plac\w+)/,st+"input-$1")]})],o)}return""})}},W9=[H9],Z9=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(h){var p=h.getAttribute("data-emotion");p.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||W9,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var p=h.getAttribute("data-emotion").split(" "),g=1;g<p.length;g++)s[p[g]]=!0;i.push(h)});var c,l=[V9,G9];{var f,m=[k9,R9(function(h){f.insert(h)})],y=N9(l.concat(o,m)),x=function(p){return zr(F9(p),y)};c=function(p,g,C,v){f=C,x(p?p+"{"+g.styles+"}":g.styles),v&&(b.inserted[g.name]=!0)}}var b={key:n,sheet:new b9({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},_c={exports:{}},Oe={};/** @license React v16.13.1
595
+ `,Ey=(e,{closeToast:t})=>u.jsx(vy,{children:u.jsx("img",{src:by,onClick:t})}),Js=({message:e})=>u.jsxs(yy,{children:[u.jsx(xy,{}),u.jsx(Cy,{children:e})]});function _e(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:u.jsx(Ey,{}),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(Js,{message:t}),{...o,icon:!1});break}case"error":{s=Le.error(u.jsx(Js,{message:t}),{...o,icon:!1});break}case"info-dark":{s=Le.info(u.jsx(Js,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=Le.info(u.jsx(Js,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Iy(s)},r&&!isNaN(r)?Number(r):5e3),s}function Iy(e){Le.dismiss(e)}const N0={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},wy="/v1/api"+"/templates/metadata",R0={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},_y="Required Field",Sy="Invalid date",M0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Ay=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,P0="Please enter a valid URL",Ty="Please enter valid ID",Ly="Please enter valid input",Oy="URL must start with https://",Fy="URL should not end with a slash",Dy="Invalid email address",ky="Email must be a string",j0="Invalid date",Ny="Date cannot be in the past",Ry="Date cannot be in the future",My="Invalid number",Py="Invalid text",jy=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)}),we({url:`${wy}?${t.toString()}`,method:R0.GET})},By="/v1/api/connectors/ug",B0=async e=>{const t=new URLSearchParams;for(const[s,a]of Object.entries(e||{}))if(Array.isArray(a))a.forEach(i=>{i&&t.append(s,String(i))});else{if(!a)continue;t.append(s,a)}t.append("onlyEnabledAuthenticated","true"),t.append("minimal","true");const n=By+`?${t.toString()}`,r=await we({url:n,method:R0.GET}),o=r==null?void 0:r.data;return Array.isArray(o)?o.map(({id:s,name:a,logo:i,connectorType:c})=>({id:s,name:a,logo:i,connectorType:c})).filter(({logo:s})=>!!s):[]};let Gr={};const Vy={get length(){return Object.keys(Gr).length},getItem(e){return Gr[e]??null},setItem(e,t){Gr[e]=t},removeItem(e){delete Gr[e]},clear(){Gr={}},key(e){return Object.keys(Gr)[e]}},Gy={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},V0=(e="LOCAL")=>Gy[e]??Vy,G0=(e="LOCAL")=>{const t=V0(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 hc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(hc||{});const Hy={[hc.ADD]:(e,t)=>e+t,[hc.MULTIPLY]:(e,t)=>e*t},Wy=e=>e,H0=()=>{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}`},W0=(e,t)=>{let n;const r=Hy[t]??Wy;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},Z0=(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},gc=Symbol("root"),Zy="connectors-store",Xy=e=>{const{name:t,initialState:n,persist:r,persistKey:o=`${Zy}-${t}`}=e,s=G0("LOCAL"),a={...n},i=r?s.getItem(o)??a:a,c=new Map,l=new Map;l.set(gc,new Set);const f=(m,h,p=!0)=>{var v;const g=Symbol("callback");c.set(g,m);const C=h||gc;if(l.has(C)||l.set(C,new Set),(v=l.get(C))==null||v.add(g),p){const I=h?i[h]:i;m(I)}return()=>{var I;c.delete(g),(I=l.get(C))==null||I.delete(g)}},b=(m,h)=>{h?i[h]=m:Object.assign(i,m),x();const p=h||gc,g=l.get(p);if(g)for(const C of g){const v=c.get(C);v==null||v(h?i[h]:i)}},y=m=>m?i[m]:{...i},x=()=>{r&&s.setItem(o,i)};return{subscribe:f,setData:b,getData:y}},zy=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?Fy:M0.test(n)?!0:e||P0:Oy}return!1},Yy=e=>t=>t&&typeof t=="string"?Ay.test(t)?!0:e||Dy:ky,Jy=e=>t=>t==null||t===""?e||_y:!0,qy=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Sy)return j0;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||Ny:i&&o>s?e||Ry:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:j0},$y=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||My},mc=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||Py},Qy=e=>t=>typeof t=="string"?t.startsWith("https:")?M0.test(t)?!0:e||P0:t.trim().length>0?!0:e||Ty:e||Ly;function lr(e){"@babel/helpers - typeof";return lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lr(e)}function Uy(e,t){if(lr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(lr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function X0(e){var t=Uy(e,"string");return lr(t)=="symbol"?t:t+""}function Hr(e,t,n){return(t=X0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z0(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 oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z0(Object(n),!0).forEach(function(r){Hr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ky(e){if(Array.isArray(e))return e}function e9(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 bc(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 Y0(e,t){if(e){if(typeof e=="string")return bc(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)?bc(e,t):void 0}}function t9(){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 nt(e,t){return Ky(e)||e9(e,t)||Y0(e,t)||t9()}function n9(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 Jt(e,t){if(e==null)return{};var n,r,o=n9(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 r9=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function yc(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,b=e.onMenuClose,y=e.onMenuOpen,x=e.value,m=Jt(e,r9),h=w.useState(i!==void 0?i:n),p=nt(h,2),g=p[0],C=p[1],v=w.useState(c!==void 0?c:o),I=nt(v,2),E=I[0],_=I[1],A=w.useState(x!==void 0?x:a),S=nt(A,2),L=S[0],k=S[1],D=w.useCallback(function(X,q){typeof l=="function"&&l(X,q),k(X)},[l]),N=w.useCallback(function(X,q){var se;typeof f=="function"&&(se=f(X,q)),C(se!==void 0?se:X)},[f]),P=w.useCallback(function(){typeof y=="function"&&y(),_(!0)},[y]),B=w.useCallback(function(){typeof b=="function"&&b(),_(!1)},[b]),Y=i!==void 0?i:g,$=c!==void 0?c:E,H=x!==void 0?x:L;return oe(oe({},m),{},{inputValue:Y,menuIsOpen:$,onChange:D,onInputChange:N,onMenuClose:B,onMenuOpen:P,value:H})}function ue(){return ue=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},ue.apply(null,arguments)}function o9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J0(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,X0(r.key),r)}}function s9(e,t,n){return t&&J0(e.prototype,t),n&&J0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cc(e,t){return Cc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Cc(e,t)}function a9(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&&Cc(e,t)}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qs(e)}function q0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q0=function(){return!!e})()}function i9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c9(e,t){if(t&&(lr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return i9(e)}function l9(e){var t=q0();return function(){var n,r=qs(e);if(t){var o=qs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c9(this,n)}}function u9(e){if(Array.isArray(e))return bc(e)}function d9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function f9(){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 Wr(e){return u9(e)||d9(e)||Y0(e)||f9()}var p9=!1;function h9(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 g9(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 m9=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?!p9: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(g9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=h9(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}(),st="-ms-",$s="-moz-",Ae="-webkit-",$0="comm",xc="rule",vc="decl",b9="@import",Q0="@keyframes",y9="@layer",C9=Math.abs,Qs=String.fromCharCode,x9=Object.assign;function v9(e,t){return ot(e,0)^45?(((t<<2^ot(e,0))<<2^ot(e,1))<<2^ot(e,2))<<2^ot(e,3):0}function U0(e){return e.trim()}function E9(e,t){return(e=t.exec(e))?e[0]:e}function Te(e,t,n){return e.replace(t,n)}function Ec(e,t){return e.indexOf(t)}function ot(e,t){return e.charCodeAt(t)|0}function jo(e,t,n){return e.slice(t,n)}function on(e){return e.length}function Ic(e){return e.length}function Us(e,t){return t.push(e),e}function I9(e,t){return e.map(t).join("")}var Ks=1,Zr=1,K0=0,mt=0,$e=0,Xr="";function ea(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Ks,column:Zr,length:a,return:""}}function Bo(e,t){return x9(ea("",null,null,"",null,null,0),e,{length:-e.length},t)}function w9(){return $e}function _9(){return $e=mt>0?ot(Xr,--mt):0,Zr--,$e===10&&(Zr=1,Ks--),$e}function Ot(){return $e=mt<K0?ot(Xr,mt++):0,Zr++,$e===10&&(Zr=1,Ks++),$e}function sn(){return ot(Xr,mt)}function ta(){return mt}function Vo(e,t){return jo(Xr,e,t)}function Go(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 ef(e){return Ks=Zr=1,K0=on(Xr=e),mt=0,[]}function tf(e){return Xr="",e}function na(e){return U0(Vo(mt-1,wc(e===91?e+2:e===40?e+1:e)))}function S9(e){for(;($e=sn())&&$e<33;)Ot();return Go(e)>2||Go($e)>3?"":" "}function A9(e,t){for(;--t&&Ot()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return Vo(e,ta()+(t<6&&sn()==32&&Ot()==32))}function wc(e){for(;Ot();)switch($e){case e:return mt;case 34:case 39:e!==34&&e!==39&&wc($e);break;case 40:e===41&&wc(e);break;case 92:Ot();break}return mt}function T9(e,t){for(;Ot()&&e+$e!==57;)if(e+$e===84&&sn()===47)break;return"/*"+Vo(t,mt-1)+"*"+Qs(e===47?e:Ot())}function L9(e){for(;!Go(sn());)Ot();return Vo(e,mt)}function O9(e){return tf(ra("",null,null,null,[""],e=ef(e),0,[0],e))}function ra(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,b=a,y=0,x=0,m=0,h=1,p=1,g=1,C=0,v="",I=o,E=s,_=r,A=v;p;)switch(m=C,C=Ot()){case 40:if(m!=108&&ot(A,b-1)==58){Ec(A+=Te(na(C),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:A+=na(C);break;case 9:case 10:case 13:case 32:A+=S9(m);break;case 92:A+=A9(ta()-1,7);continue;case 47:switch(sn()){case 42:case 47:Us(F9(T9(Ot(),ta()),t,n),c);break;default:A+="/"}break;case 123*h:i[l++]=on(A)*g;case 125*h:case 59:case 0:switch(C){case 0:case 125:p=0;case 59+f:g==-1&&(A=Te(A,/\f/g,"")),x>0&&on(A)-b&&Us(x>32?rf(A+";",r,n,b-1):rf(Te(A," ","")+";",r,n,b-2),c);break;case 59:A+=";";default:if(Us(_=nf(A,t,n,l,f,o,i,v,I=[],E=[],b),s),C===123)if(f===0)ra(A,t,_,_,I,s,b,i,E);else switch(y===99&&ot(A,3)===110?100:y){case 100:case 108:case 109:case 115:ra(e,_,_,r&&Us(nf(e,_,_,0,0,o,i,v,o,I=[],b),E),o,E,b,i,r?I:E);break;default:ra(A,_,_,_,[""],E,0,i,E)}}l=f=x=0,h=g=1,v=A="",b=a;break;case 58:b=1+on(A),x=m;default:if(h<1){if(C==123)--h;else if(C==125&&h++==0&&_9()==125)continue}switch(A+=Qs(C),C*h){case 38:g=f>0?1:(A+="\f",-1);break;case 44:i[l++]=(on(A)-1)*g,g=1;break;case 64:sn()===45&&(A+=na(Ot())),y=sn(),f=b=on(v=A+=L9(ta())),C++;break;case 45:m===45&&on(A)==2&&(h=0)}}return s}function nf(e,t,n,r,o,s,a,i,c,l,f){for(var b=o-1,y=o===0?s:[""],x=Ic(y),m=0,h=0,p=0;m<r;++m)for(var g=0,C=jo(e,b+1,b=C9(h=a[m])),v=e;g<x;++g)(v=U0(h>0?y[g]+" "+C:Te(C,/&\f/g,y[g])))&&(c[p++]=v);return ea(e,t,n,o===0?xc:i,c,l,f)}function F9(e,t,n){return ea(e,t,n,$0,Qs(w9()),jo(e,2,-2),0)}function rf(e,t,n,r){return ea(e,t,n,vc,jo(e,0,r),jo(e,r+1,-1),r)}function zr(e,t){for(var n="",r=Ic(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function D9(e,t,n,r){switch(e.type){case y9:if(e.children.length)break;case b9:case vc:return e.return=e.return||e.value;case $0:return"";case Q0:return e.return=e.value+"{"+zr(e.children,r)+"}";case xc:e.value=e.props.join(",")}return on(n=zr(e.children,r))?e.return=e.value+"{"+n+"}":""}function k9(e){var t=Ic(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 N9(e){return function(t){t.root||(t=t.return)&&e(t)}}function R9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var M9=function(t,n,r){for(var o=0,s=0;o=s,s=sn(),o===38&&s===12&&(n[r]=1),!Go(s);)Ot();return Vo(t,mt)},P9=function(t,n){var r=-1,o=44;do switch(Go(o)){case 0:o===38&&sn()===12&&(n[r]=1),t[r]+=M9(mt-1,n,r);break;case 2:t[r]+=na(o);break;case 4:if(o===44){t[++r]=sn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Qs(o)}while(o=Ot());return t},j9=function(t,n){return tf(P9(ef(t),n))},of=new WeakMap,B9=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&&!of.get(r))&&!o){of.set(t,!0);for(var s=[],a=j9(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]}}},V9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function sf(e,t){switch(v9(e,t)){case 5103:return Ae+"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 Ae+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ae+e+$s+e+st+e+e;case 6828:case 4268:return Ae+e+st+e+e;case 6165:return Ae+e+st+"flex-"+e+e;case 5187:return Ae+e+Te(e,/(\w+).+(:[^]+)/,Ae+"box-$1$2"+st+"flex-$1$2")+e;case 5443:return Ae+e+st+"flex-item-"+Te(e,/flex-|-self/,"")+e;case 4675:return Ae+e+st+"flex-line-pack"+Te(e,/align-content|flex-|-self/,"")+e;case 5548:return Ae+e+st+Te(e,"shrink","negative")+e;case 5292:return Ae+e+st+Te(e,"basis","preferred-size")+e;case 6060:return Ae+"box-"+Te(e,"-grow","")+Ae+e+st+Te(e,"grow","positive")+e;case 4554:return Ae+Te(e,/([^-])(transform)/g,"$1"+Ae+"$2")+e;case 6187:return Te(Te(Te(e,/(zoom-|grab)/,Ae+"$1"),/(image-set)/,Ae+"$1"),e,"")+e;case 5495:case 3959:return Te(e,/(image-set\([^]*)/,Ae+"$1$`$1");case 4968:return Te(Te(e,/(.+:)(flex-)?(.*)/,Ae+"box-pack:$3"+st+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ae+e+e;case 4095:case 3583:case 4068:case 2532:return Te(e,/(.+)-inline(.+)/,Ae+"$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(on(e)-1-t>6)switch(ot(e,t+1)){case 109:if(ot(e,t+4)!==45)break;case 102:return Te(e,/(.+:)(.+)-([^]+)/,"$1"+Ae+"$2-$3$1"+$s+(ot(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ec(e,"stretch")?sf(Te(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ot(e,t+1)!==115)break;case 6444:switch(ot(e,on(e)-3-(~Ec(e,"!important")&&10))){case 107:return Te(e,":",":"+Ae)+e;case 101:return Te(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ae+(ot(e,14)===45?"inline-":"")+"box$3$1"+Ae+"$2$3$1"+st+"$2box$3")+e}break;case 5936:switch(ot(e,t+11)){case 114:return Ae+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ae+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ae+e+st+Te(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ae+e+st+e+e}return e}var G9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case vc:t.return=sf(t.value,t.length);break;case Q0:return zr([Bo(t,{value:Te(t.value,"@","@"+Ae)})],o);case xc:if(t.length)return I9(t.props,function(s){switch(E9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return zr([Bo(t,{props:[Te(s,/:(read-\w+)/,":"+$s+"$1")]})],o);case"::placeholder":return zr([Bo(t,{props:[Te(s,/:(plac\w+)/,":"+Ae+"input-$1")]}),Bo(t,{props:[Te(s,/:(plac\w+)/,":"+$s+"$1")]}),Bo(t,{props:[Te(s,/:(plac\w+)/,st+"input-$1")]})],o)}return""})}},H9=[G9],W9=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(h){var p=h.getAttribute("data-emotion");p.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||H9,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var p=h.getAttribute("data-emotion").split(" "),g=1;g<p.length;g++)s[p[g]]=!0;i.push(h)});var c,l=[B9,V9];{var f,b=[D9,N9(function(h){f.insert(h)})],y=k9(l.concat(o,b)),x=function(p){return zr(O9(p),y)};c=function(p,g,C,v){f=C,x(p?p+"{"+g.styles+"}":g.styles),v&&(m.inserted[g.name]=!0)}}var m={key:n,sheet:new m9({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 m.sheet.hydrate(i),m},_c={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 af;function X9(){if(af)return Oe;af=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,m=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function v(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 m:return E;default:switch(E=E&&E.$$typeof,E){case i:case f:case b:case x:case a:return E;default:return _}}case n:return _}}}function I(E){return v(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=x,Oe.Portal=n,Oe.Profiler=s,Oe.StrictMode=o,Oe.Suspense=m,Oe.isAsyncMode=function(E){return I(E)||v(E)===c},Oe.isConcurrentMode=I,Oe.isContextConsumer=function(E){return v(E)===i},Oe.isContextProvider=function(E){return v(E)===a},Oe.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},Oe.isForwardRef=function(E){return v(E)===f},Oe.isFragment=function(E){return v(E)===r},Oe.isLazy=function(E){return v(E)===b},Oe.isMemo=function(E){return v(E)===x},Oe.isPortal=function(E){return v(E)===n},Oe.isProfiler=function(E){return v(E)===s},Oe.isStrictMode=function(E){return v(E)===o},Oe.isSuspense=function(E){return v(E)===m},Oe.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===s||E===o||E===m||E===y||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===x||E.$$typeof===a||E.$$typeof===i||E.$$typeof===f||E.$$typeof===p||E.$$typeof===g||E.$$typeof===C||E.$$typeof===h)},Oe.typeOf=v,Oe}var Fe={};/** @license React v16.13.1
604
+ */var af;function Z9(){if(af)return Oe;af=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,b=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function v(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 b:return E;default:switch(E=E&&E.$$typeof,E){case i:case f:case m:case x:case a:return E;default:return _}}case n:return _}}}function I(E){return v(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=m,Oe.Memo=x,Oe.Portal=n,Oe.Profiler=s,Oe.StrictMode=o,Oe.Suspense=b,Oe.isAsyncMode=function(E){return I(E)||v(E)===c},Oe.isConcurrentMode=I,Oe.isContextConsumer=function(E){return v(E)===i},Oe.isContextProvider=function(E){return v(E)===a},Oe.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},Oe.isForwardRef=function(E){return v(E)===f},Oe.isFragment=function(E){return v(E)===r},Oe.isLazy=function(E){return v(E)===m},Oe.isMemo=function(E){return v(E)===x},Oe.isPortal=function(E){return v(E)===n},Oe.isProfiler=function(E){return v(E)===s},Oe.isStrictMode=function(E){return v(E)===o},Oe.isSuspense=function(E){return v(E)===b},Oe.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===l||E===s||E===o||E===b||E===y||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===x||E.$$typeof===a||E.$$typeof===i||E.$$typeof===f||E.$$typeof===p||E.$$typeof===g||E.$$typeof===C||E.$$typeof===h)},Oe.typeOf=v,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 cf;function z9(){return cf||(cf=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,m=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function v(J){return typeof J=="string"||typeof J=="function"||J===r||J===l||J===s||J===o||J===m||J===y||typeof J=="object"&&J!==null&&(J.$$typeof===b||J.$$typeof===x||J.$$typeof===a||J.$$typeof===i||J.$$typeof===f||J.$$typeof===p||J.$$typeof===g||J.$$typeof===C||J.$$typeof===h)}function I(J){if(typeof J=="object"&&J!==null){var Pe=J.$$typeof;switch(Pe){case t:var je=J.type;switch(je){case c:case l:case r:case s:case o:case m:return je;default:var ze=je&&je.$$typeof;switch(ze){case i:case f:case b:case x:case a:return ze;default:return Pe}}case n:return Pe}}}var E=c,_=l,A=i,S=a,L=t,k=f,D=r,N=b,P=x,B=n,Y=s,$=o,H=m,X=!1;function q(J){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.")),se(J)||I(J)===c}function se(J){return I(J)===l}function de(J){return I(J)===i}function V(J){return I(J)===a}function W(J){return typeof J=="object"&&J!==null&&J.$$typeof===t}function M(J){return I(J)===f}function G(J){return I(J)===r}function z(J){return I(J)===b}function ne(J){return I(J)===x}function ae(J){return I(J)===n}function j(J){return I(J)===s}function ee(J){return I(J)===o}function ve(J){return I(J)===m}Fe.AsyncMode=E,Fe.ConcurrentMode=_,Fe.ContextConsumer=A,Fe.ContextProvider=S,Fe.Element=L,Fe.ForwardRef=k,Fe.Fragment=D,Fe.Lazy=N,Fe.Memo=P,Fe.Portal=B,Fe.Profiler=Y,Fe.StrictMode=$,Fe.Suspense=H,Fe.isAsyncMode=q,Fe.isConcurrentMode=se,Fe.isContextConsumer=de,Fe.isContextProvider=V,Fe.isElement=W,Fe.isForwardRef=M,Fe.isFragment=G,Fe.isLazy=z,Fe.isMemo=ne,Fe.isPortal=ae,Fe.isProfiler=j,Fe.isStrictMode=ee,Fe.isSuspense=ve,Fe.isValidElementType=v,Fe.typeOf=I}()),Fe}process.env.NODE_ENV==="production"?_c.exports=X9():_c.exports=z9();var Y9=_c.exports,lf=Y9,J9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},q9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uf={};uf[lf.ForwardRef]=J9,uf[lf.Memo]=q9;var $9=!0;function Q9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var df=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||$9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},U9=function(t,n,r){df(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 K9(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 e6={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},t6=!1,n6=/[A-Z]|^ms/g,r6=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ff=function(t){return t.charCodeAt(1)===45},pf=function(t){return t!=null&&typeof t!="boolean"},Sc=M9(function(e){return ff(e)?e:e.replace(n6,"-$&").toLowerCase()}),hf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(r6,function(r,o,s){return an={name:o,styles:s,next:an},o})}return e6[t]!==1&&!ff(t)&&typeof n=="number"&&n!==0?n+"px":n},o6="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ho(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 an={name:o.name,styles:o.styles,next:an},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)an={name:a.name,styles:a.styles,next:an},a=a.next;var i=s.styles+";";return i}return s6(e,t,n)}case"function":{if(e!==void 0){var c=an,l=n(e);return an=c,Ho(e,t,l)}break}}var f=n;return f}function s6(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ho(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;pf(i)&&(r+=Sc(s)+":"+hf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&t6)throw new Error(o6);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)pf(a[c])&&(r+=Sc(s)+":"+hf(s,a[c])+";");else{var l=Ho(e,t,a);switch(s){case"animation":case"animationName":{r+=Sc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var gf=/label:\s*([^\s;{]+)\s*(;|$)/g,an;function mf(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="";an=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Ho(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Ho(n,t,e[i]),r){var c=s;o+=c[i]}gf.lastIndex=0;for(var l="",f;(f=gf.exec(o))!==null;)l+="-"+f[1];var m=K9(o)+l;return{name:m,styles:o,next:an}}var a6=function(t){return t()},i6=T.useInsertionEffect?T.useInsertionEffect:!1,c6=i6||a6,l6=!1,bf=T.createContext(typeof HTMLElement<"u"?Z9({key:"css"}):null);bf.Provider;var u6=function(t){return w.forwardRef(function(n,r){var o=w.useContext(bf);return t(n,o,r)})},d6=T.createContext({}),Ac={}.hasOwnProperty,Tc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",f6=function(t,n){var r={};for(var o in n)Ac.call(n,o)&&(r[o]=n[o]);return r[Tc]=t,r},p6=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return df(n,r,o),c6(function(){return U9(n,r,o)}),null},h6=u6(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Tc],s=[r],a="";typeof e.className=="string"?a=Q9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=mf(s,void 0,T.useContext(d6));a+=t.key+"-"+i.name;var c={};for(var l in e)Ac.call(e,l)&&l!=="css"&&l!==Tc&&!l6&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement(p6,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),g6=h6,ce=function(t,n){var r=arguments;if(n==null||!Ac.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=g6,s[1]=f6(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function Lc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return mf(t)}var m6=function(){var t=Lc.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 b6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const y6=Math.min,C6=Math.max,oa=Math.round,sa=Math.floor,aa=e=>({x:e,y:e});function x6(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 ia(){return typeof window<"u"}function yf(e){return xf(e)?(e.nodeName||"").toLowerCase():"#document"}function Cn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cf(e){var t;return(t=(xf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xf(e){return ia()?e instanceof Node||e instanceof Cn(e).Node:!1}function v6(e){return ia()?e instanceof Element||e instanceof Cn(e).Element:!1}function Oc(e){return ia()?e instanceof HTMLElement||e instanceof Cn(e).HTMLElement:!1}function vf(e){return!ia()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cn(e).ShadowRoot}function Ef(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function E6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function I6(e){return["html","body","#document"].includes(yf(e))}function Fc(e){return Cn(e).getComputedStyle(e)}function w6(e){if(yf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vf(e)&&e.host||Cf(e);return vf(t)?t.host:t}function If(e){const t=w6(e);return I6(t)?e.ownerDocument?e.ownerDocument.body:e.body:Oc(t)&&Ef(t)?t:If(t)}function ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=If(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Cn(o);if(s){const i=Dc(a);return t.concat(a,a.visualViewport||[],Ef(o)?o:[],i&&n?ca(i):[])}return t.concat(o,ca(o,[],n))}function Dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _6(e){const t=Fc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Oc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=oa(n)!==s||oa(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function kc(e){return v6(e)?e:e.contextElement}function wf(e){const t=kc(e);if(!Oc(t))return aa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=_6(t);let a=(s?oa(n.width):n.width)/r,i=(s?oa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const S6=aa(0);function A6(e){const t=Cn(e);return!E6()||!t.visualViewport?S6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function T6(e,t,n){return!1}function _f(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=kc(e);let a=aa(1);t&&(a=wf(e));const i=T6()?A6(s):aa(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,m=o.height/a.y;if(s){const y=Cn(s),x=r;let b=y,h=Dc(b);for(;h&&r&&x!==b;){const p=wf(h),g=h.getBoundingClientRect(),C=Fc(h),v=g.left+(h.clientLeft+parseFloat(C.paddingLeft))*p.x,I=g.top+(h.clientTop+parseFloat(C.paddingTop))*p.y;c*=p.x,l*=p.y,f*=p.x,m*=p.y,c+=v,l+=I,b=Cn(h),h=Dc(b)}}return x6({width:f,height:m,x:c,y:l})}function L6(e,t){let n=null,r;const o=Cf(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:m,height:y}=e.getBoundingClientRect();if(i||t(),!m||!y)return;const x=sa(f),b=sa(o.clientWidth-(l+m)),h=sa(o.clientHeight-(f+y)),p=sa(l),C={rootMargin:-x+"px "+-b+"px "+-h+"px "+-p+"px",threshold:C6(0,y6(1,c))||1};let v=!0;function I(E){const _=E[0].intersectionRatio;if(_!==c){if(!v)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(I,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,C)}n.observe(e)}return a(!0),s}function O6(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=kc(e),f=o||s?[...l?ca(l):[],...ca(t)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const m=l&&i?L6(l,n):null;let y=-1,x=null;a&&(x=new ResizeObserver(g=>{let[C]=g;C&&C.target===l&&x&&(x.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var v;(v=x)==null||v.observe(t)})),n()}),l&&!c&&x.observe(l),x.observe(t));let b,h=c?_f(e):null;c&&p();function p(){const g=_f(e);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&n(),h=g,b=requestAnimationFrame(p)}return n(),()=>{var g;f.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),m==null||m(),(g=x)==null||g.disconnect(),x=null,c&&cancelAnimationFrame(b)}}var Nc=w.useLayoutEffect,F6=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],la=function(){};function D6(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function k6(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(D6(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var ua=function(t){return W6(t)?t.filter(Boolean):lr(t)==="object"&&t!==null?[t]:[]},Sf=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=Jt(t,F6);return oe({},n)},Ze=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 N6(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function da(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function R6(e){return da(e)?window.innerHeight:e.clientHeight}function Af(e){return da(e)?window.pageYOffset:e.scrollTop}function fa(e,t){if(da(e)){window.scrollTo(0,t);return}e.scrollTop=t}function M6(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 P6(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function pa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:la,o=Af(e),s=t-o,a=10,i=0;function c(){i+=a;var l=P6(i,o,s,n);fa(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Tf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?fa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&fa(e,Math.max(t.offsetTop-o,0))}function j6(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 Lf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function B6(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Of=!1,V6={get passive(){return Of=!0}},ha=typeof window<"u"?window:{};ha.addEventListener&&ha.removeEventListener&&(ha.addEventListener("p",la,V6),ha.removeEventListener("p",la,!1));var G6=Of;function H6(e){return e!=null}function W6(e){return Array.isArray(e)}function Wo(e,t,n){return e?t:n}function iA(e){return e}function cA(e){return e}var Z6=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=nt(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=nt(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},X6=["children","innerProps"],z6=["children","innerProps"];function Y6(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=M6(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),m=f.height,y=n.getBoundingClientRect(),x=y.bottom,b=y.height,h=y.top,p=n.offsetParent.getBoundingClientRect(),g=p.top,C=a?window.innerHeight:R6(c),v=Af(c),I=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),_=g-E,A=C-h,S=_+v,L=m-v-h,k=x-C+v+I,D=v+h-E,N=160;switch(o){case"auto":case"bottom":if(A>=b)return{placement:"bottom",maxHeight:t};if(L>=b&&!a)return s&&pa(c,k,N),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&pa(c,k,N);var P=a?A-I:L-I;return{placement:"bottom",maxHeight:P}}if(o==="auto"||a){var B=t,Y=a?_:S;return Y>=r&&(B=Math.min(Y-I-i,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return s&&fa(c,k),{placement:"bottom",maxHeight:t};break;case"top":if(_>=b)return{placement:"top",maxHeight:t};if(S>=b&&!a)return s&&pa(c,D,N),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var $=t;return(!a&&S>=r||a&&_>=r)&&($=a?_-E:S-E),s&&pa(c,D,N),{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 Ff=function(t){return t==="auto"?"bottom":t},q6=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return oe((r={label:"menu"},Hr(r,J6(o),"100%"),Hr(r,"position","absolute"),Hr(r,"width","100%"),Hr(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})},Df=w.createContext(null),$6=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(Df)||{},f=l.setPortalPlacement,m=w.useRef(null),y=w.useState(o),x=nt(y,2),b=x[0],h=x[1],p=w.useState(null),g=nt(p,2),C=g[0],v=g[1],I=c.spacing.controlHeight;return Nc(function(){var E=m.current;if(E){var _=a==="fixed",A=i&&!_,S=Y6({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:I});h(S.maxHeight),v(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,I]),n({ref:m,placerProps:oe(oe({},t),{},{placement:C||Ff(s),maxHeight:b})})},Q6=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ce("div",ue({},Ze(t,"menu",{menu:!0}),{ref:r},o),n)},U6=Q6,K6=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return oe({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},eC=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ce("div",ue({},Ze(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},kf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return oe({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},tC=kf,nC=kf,rC=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Jt(t,X6);return ce("div",ue({},Ze(oe(oe({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},oC=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Jt(t,z6);return ce("div",ue({},Ze(oe(oe({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},sC=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}},aC=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(Ff(a)),m=nt(f,2),y=m[0],x=m[1],b=w.useMemo(function(){return{setPortalPlacement:x}},[]),h=w.useState(null),p=nt(h,2),g=p[0],C=p[1],v=w.useCallback(function(){if(o){var A=j6(o),S=i==="fixed"?0:window.pageYOffset,L=A[y]+S;(L!==(g==null?void 0:g.offset)||A.left!==(g==null?void 0:g.rect.left)||A.width!==(g==null?void 0:g.rect.width))&&C({offset:L,rect:A})}},[o,i,y,g==null?void 0:g.offset,g==null?void 0:g.rect.left,g==null?void 0:g.rect.width]);Nc(function(){v()},[v]);var I=w.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=O6(o,c.current,v,{elementResize:"ResizeObserver"in window}))},[o,v]);Nc(function(){I()},[I]);var E=w.useCallback(function(A){c.current=A,I()},[I]);if(!n&&i!=="fixed"||!g)return null;var _=ce("div",ue({ref:E},Ze(oe(oe({},t),{},{offset:g.offset,position:i,rect:g.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ce(Df.Provider,{value:b},n?Ne.createPortal(_,n):_)},iC=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},cC=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ce("div",ue({},Ze(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},lC=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return oe({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")})},uC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ce("div",ue({},Ze(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},dC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},fC=function(t){var n=t.children,r=t.innerProps;return ce("div",ue({},Ze(t,"indicatorsContainer",{indicators:!0}),r),n)},Nf,pC=["size"],hC=["innerProps","isRtl","size"];function gC(){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 mC=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:gC},Rf=function(t){var n=t.size,r=Jt(t,pC);return ce("svg",ue({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:mC},r))},Rc=function(t){return ce(Rf,ue({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"}))},Mf=function(t){return ce(Rf,ue({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"}))},Pf=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return oe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},bC=Pf,yC=function(t){var n=t.children,r=t.innerProps;return ce("div",ue({},Ze(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ce(Mf,null))},CC=Pf,xC=function(t){var n=t.children,r=t.innerProps;return ce("div",ue({},Ze(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ce(Rc,null))},vC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return oe({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},EC=function(t){var n=t.innerProps;return ce("span",ue({},n,Ze(t,"indicatorSeparator",{"indicator-separator":!0})))},IC=m6(Nf||(Nf=b6([`
611
+ */var cf;function X9(){return cf||(cf=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,b=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function v(J){return typeof J=="string"||typeof J=="function"||J===r||J===l||J===s||J===o||J===b||J===y||typeof J=="object"&&J!==null&&(J.$$typeof===m||J.$$typeof===x||J.$$typeof===a||J.$$typeof===i||J.$$typeof===f||J.$$typeof===p||J.$$typeof===g||J.$$typeof===C||J.$$typeof===h)}function I(J){if(typeof J=="object"&&J!==null){var Pe=J.$$typeof;switch(Pe){case t:var je=J.type;switch(je){case c:case l:case r:case s:case o:case b:return je;default:var ze=je&&je.$$typeof;switch(ze){case i:case f:case m:case x:case a:return ze;default:return Pe}}case n:return Pe}}}var E=c,_=l,A=i,S=a,L=t,k=f,D=r,N=m,P=x,B=n,Y=s,$=o,H=b,X=!1;function q(J){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.")),se(J)||I(J)===c}function se(J){return I(J)===l}function de(J){return I(J)===i}function V(J){return I(J)===a}function W(J){return typeof J=="object"&&J!==null&&J.$$typeof===t}function M(J){return I(J)===f}function G(J){return I(J)===r}function z(J){return I(J)===m}function ne(J){return I(J)===x}function ae(J){return I(J)===n}function j(J){return I(J)===s}function ee(J){return I(J)===o}function ve(J){return I(J)===b}Fe.AsyncMode=E,Fe.ConcurrentMode=_,Fe.ContextConsumer=A,Fe.ContextProvider=S,Fe.Element=L,Fe.ForwardRef=k,Fe.Fragment=D,Fe.Lazy=N,Fe.Memo=P,Fe.Portal=B,Fe.Profiler=Y,Fe.StrictMode=$,Fe.Suspense=H,Fe.isAsyncMode=q,Fe.isConcurrentMode=se,Fe.isContextConsumer=de,Fe.isContextProvider=V,Fe.isElement=W,Fe.isForwardRef=M,Fe.isFragment=G,Fe.isLazy=z,Fe.isMemo=ne,Fe.isPortal=ae,Fe.isProfiler=j,Fe.isStrictMode=ee,Fe.isSuspense=ve,Fe.isValidElementType=v,Fe.typeOf=I}()),Fe}process.env.NODE_ENV==="production"?_c.exports=Z9():_c.exports=X9();var z9=_c.exports,lf=z9,Y9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},J9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uf={};uf[lf.ForwardRef]=Y9,uf[lf.Memo]=J9;var q9=!0;function $9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var df=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||q9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},Q9=function(t,n,r){df(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 U9(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 K9={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},e6=!1,t6=/[A-Z]|^ms/g,n6=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ff=function(t){return t.charCodeAt(1)===45},pf=function(t){return t!=null&&typeof t!="boolean"},Sc=R9(function(e){return ff(e)?e:e.replace(t6,"-$&").toLowerCase()}),hf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(n6,function(r,o,s){return an={name:o,styles:s,next:an},o})}return K9[t]!==1&&!ff(t)&&typeof n=="number"&&n!==0?n+"px":n},r6="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ho(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 an={name:o.name,styles:o.styles,next:an},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)an={name:a.name,styles:a.styles,next:an},a=a.next;var i=s.styles+";";return i}return o6(e,t,n)}case"function":{if(e!==void 0){var c=an,l=n(e);return an=c,Ho(e,t,l)}break}}var f=n;return f}function o6(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ho(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;pf(i)&&(r+=Sc(s)+":"+hf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&e6)throw new Error(r6);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)pf(a[c])&&(r+=Sc(s)+":"+hf(s,a[c])+";");else{var l=Ho(e,t,a);switch(s){case"animation":case"animationName":{r+=Sc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var gf=/label:\s*([^\s;{]+)\s*(;|$)/g,an;function mf(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="";an=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Ho(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Ho(n,t,e[i]),r){var c=s;o+=c[i]}gf.lastIndex=0;for(var l="",f;(f=gf.exec(o))!==null;)l+="-"+f[1];var b=U9(o)+l;return{name:b,styles:o,next:an}}var s6=function(t){return t()},a6=T.useInsertionEffect?T.useInsertionEffect:!1,i6=a6||s6,c6=!1,bf=T.createContext(typeof HTMLElement<"u"?W9({key:"css"}):null);bf.Provider;var l6=function(t){return w.forwardRef(function(n,r){var o=w.useContext(bf);return t(n,o,r)})},u6=T.createContext({}),Ac={}.hasOwnProperty,Tc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",d6=function(t,n){var r={};for(var o in n)Ac.call(n,o)&&(r[o]=n[o]);return r[Tc]=t,r},f6=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return df(n,r,o),i6(function(){return Q9(n,r,o)}),null},p6=l6(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Tc],s=[r],a="";typeof e.className=="string"?a=$9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=mf(s,void 0,T.useContext(u6));a+=t.key+"-"+i.name;var c={};for(var l in e)Ac.call(e,l)&&l!=="css"&&l!==Tc&&!c6&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement(f6,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),h6=p6,ce=function(t,n){var r=arguments;if(n==null||!Ac.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=h6,s[1]=d6(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function Lc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return mf(t)}var g6=function(){var t=Lc.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 m6(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const b6=Math.min,y6=Math.max,oa=Math.round,sa=Math.floor,aa=e=>({x:e,y:e});function C6(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 ia(){return typeof window<"u"}function yf(e){return xf(e)?(e.nodeName||"").toLowerCase():"#document"}function Cn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cf(e){var t;return(t=(xf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xf(e){return ia()?e instanceof Node||e instanceof Cn(e).Node:!1}function x6(e){return ia()?e instanceof Element||e instanceof Cn(e).Element:!1}function Oc(e){return ia()?e instanceof HTMLElement||e instanceof Cn(e).HTMLElement:!1}function vf(e){return!ia()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cn(e).ShadowRoot}function Ef(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function v6(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function E6(e){return["html","body","#document"].includes(yf(e))}function Fc(e){return Cn(e).getComputedStyle(e)}function I6(e){if(yf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vf(e)&&e.host||Cf(e);return vf(t)?t.host:t}function If(e){const t=I6(e);return E6(t)?e.ownerDocument?e.ownerDocument.body:e.body:Oc(t)&&Ef(t)?t:If(t)}function ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=If(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Cn(o);if(s){const i=Dc(a);return t.concat(a,a.visualViewport||[],Ef(o)?o:[],i&&n?ca(i):[])}return t.concat(o,ca(o,[],n))}function Dc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function w6(e){const t=Fc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Oc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=oa(n)!==s||oa(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function kc(e){return x6(e)?e:e.contextElement}function wf(e){const t=kc(e);if(!Oc(t))return aa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=w6(t);let a=(s?oa(n.width):n.width)/r,i=(s?oa(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const _6=aa(0);function S6(e){const t=Cn(e);return!v6()||!t.visualViewport?_6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function A6(e,t,n){return!1}function _f(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=kc(e);let a=aa(1);t&&(a=wf(e));const i=A6()?S6(s):aa(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,b=o.height/a.y;if(s){const y=Cn(s),x=r;let m=y,h=Dc(m);for(;h&&r&&x!==m;){const p=wf(h),g=h.getBoundingClientRect(),C=Fc(h),v=g.left+(h.clientLeft+parseFloat(C.paddingLeft))*p.x,I=g.top+(h.clientTop+parseFloat(C.paddingTop))*p.y;c*=p.x,l*=p.y,f*=p.x,b*=p.y,c+=v,l+=I,m=Cn(h),h=Dc(m)}}return C6({width:f,height:b,x:c,y:l})}function T6(e,t){let n=null,r;const o=Cf(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:b,height:y}=e.getBoundingClientRect();if(i||t(),!b||!y)return;const x=sa(f),m=sa(o.clientWidth-(l+b)),h=sa(o.clientHeight-(f+y)),p=sa(l),C={rootMargin:-x+"px "+-m+"px "+-h+"px "+-p+"px",threshold:y6(0,b6(1,c))||1};let v=!0;function I(E){const _=E[0].intersectionRatio;if(_!==c){if(!v)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}v=!1}try{n=new IntersectionObserver(I,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,C)}n.observe(e)}return a(!0),s}function L6(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=kc(e),f=o||s?[...l?ca(l):[],...ca(t)]:[];f.forEach(g=>{o&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const b=l&&i?T6(l,n):null;let y=-1,x=null;a&&(x=new ResizeObserver(g=>{let[C]=g;C&&C.target===l&&x&&(x.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var v;(v=x)==null||v.observe(t)})),n()}),l&&!c&&x.observe(l),x.observe(t));let m,h=c?_f(e):null;c&&p();function p(){const g=_f(e);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&n(),h=g,m=requestAnimationFrame(p)}return n(),()=>{var g;f.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),b==null||b(),(g=x)==null||g.disconnect(),x=null,c&&cancelAnimationFrame(m)}}var Nc=w.useLayoutEffect,O6=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],la=function(){};function F6(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function D6(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(F6(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var ua=function(t){return H6(t)?t.filter(Boolean):lr(t)==="object"&&t!==null?[t]:[]},Sf=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=Jt(t,O6);return oe({},n)},Ze=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 k6(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function da(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function N6(e){return da(e)?window.innerHeight:e.clientHeight}function Af(e){return da(e)?window.pageYOffset:e.scrollTop}function fa(e,t){if(da(e)){window.scrollTo(0,t);return}e.scrollTop=t}function R6(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 M6(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function pa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:la,o=Af(e),s=t-o,a=10,i=0;function c(){i+=a;var l=M6(i,o,s,n);fa(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Tf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?fa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&fa(e,Math.max(t.offsetTop-o,0))}function P6(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 Lf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function j6(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Of=!1,B6={get passive(){return Of=!0}},ha=typeof window<"u"?window:{};ha.addEventListener&&ha.removeEventListener&&(ha.addEventListener("p",la,B6),ha.removeEventListener("p",la,!1));var V6=Of;function G6(e){return e!=null}function H6(e){return Array.isArray(e)}function Wo(e,t,n){return e?t:n}function iA(e){return e}function cA(e){return e}var W6=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=nt(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=nt(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},Z6=["children","innerProps"],X6=["children","innerProps"];function z6(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=R6(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),b=f.height,y=n.getBoundingClientRect(),x=y.bottom,m=y.height,h=y.top,p=n.offsetParent.getBoundingClientRect(),g=p.top,C=a?window.innerHeight:N6(c),v=Af(c),I=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),_=g-E,A=C-h,S=_+v,L=b-v-h,k=x-C+v+I,D=v+h-E,N=160;switch(o){case"auto":case"bottom":if(A>=m)return{placement:"bottom",maxHeight:t};if(L>=m&&!a)return s&&pa(c,k,N),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&pa(c,k,N);var P=a?A-I:L-I;return{placement:"bottom",maxHeight:P}}if(o==="auto"||a){var B=t,Y=a?_:S;return Y>=r&&(B=Math.min(Y-I-i,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return s&&fa(c,k),{placement:"bottom",maxHeight:t};break;case"top":if(_>=m)return{placement:"top",maxHeight:t};if(S>=m&&!a)return s&&pa(c,D,N),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var $=t;return(!a&&S>=r||a&&_>=r)&&($=a?_-E:S-E),s&&pa(c,D,N),{placement:"top",maxHeight:$}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function Y6(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Ff=function(t){return t==="auto"?"bottom":t},J6=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return oe((r={label:"menu"},Hr(r,Y6(o),"100%"),Hr(r,"position","absolute"),Hr(r,"width","100%"),Hr(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})},Df=w.createContext(null),q6=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(Df)||{},f=l.setPortalPlacement,b=w.useRef(null),y=w.useState(o),x=nt(y,2),m=x[0],h=x[1],p=w.useState(null),g=nt(p,2),C=g[0],v=g[1],I=c.spacing.controlHeight;return Nc(function(){var E=b.current;if(E){var _=a==="fixed",A=i&&!_,S=z6({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:I});h(S.maxHeight),v(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,I]),n({ref:b,placerProps:oe(oe({},t),{},{placement:C||Ff(s),maxHeight:m})})},$6=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ce("div",ue({},Ze(t,"menu",{menu:!0}),{ref:r},o),n)},Q6=$6,U6=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return oe({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},K6=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ce("div",ue({},Ze(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},kf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return oe({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},eC=kf,tC=kf,nC=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Jt(t,Z6);return ce("div",ue({},Ze(oe(oe({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},rC=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Jt(t,X6);return ce("div",ue({},Ze(oe(oe({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},oC=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}},sC=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(Ff(a)),b=nt(f,2),y=b[0],x=b[1],m=w.useMemo(function(){return{setPortalPlacement:x}},[]),h=w.useState(null),p=nt(h,2),g=p[0],C=p[1],v=w.useCallback(function(){if(o){var A=P6(o),S=i==="fixed"?0:window.pageYOffset,L=A[y]+S;(L!==(g==null?void 0:g.offset)||A.left!==(g==null?void 0:g.rect.left)||A.width!==(g==null?void 0:g.rect.width))&&C({offset:L,rect:A})}},[o,i,y,g==null?void 0:g.offset,g==null?void 0:g.rect.left,g==null?void 0:g.rect.width]);Nc(function(){v()},[v]);var I=w.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=L6(o,c.current,v,{elementResize:"ResizeObserver"in window}))},[o,v]);Nc(function(){I()},[I]);var E=w.useCallback(function(A){c.current=A,I()},[I]);if(!n&&i!=="fixed"||!g)return null;var _=ce("div",ue({ref:E},Ze(oe(oe({},t),{},{offset:g.offset,position:i,rect:g.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ce(Df.Provider,{value:m},n?Ne.createPortal(_,n):_)},aC=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},iC=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ce("div",ue({},Ze(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},cC=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return oe({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")})},lC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ce("div",ue({},Ze(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},uC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},dC=function(t){var n=t.children,r=t.innerProps;return ce("div",ue({},Ze(t,"indicatorsContainer",{indicators:!0}),r),n)},Nf,fC=["size"],pC=["innerProps","isRtl","size"];function hC(){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 gC=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:hC},Rf=function(t){var n=t.size,r=Jt(t,fC);return ce("svg",ue({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:gC},r))},Rc=function(t){return ce(Rf,ue({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"}))},Mf=function(t){return ce(Rf,ue({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"}))},Pf=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return oe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},mC=Pf,bC=function(t){var n=t.children,r=t.innerProps;return ce("div",ue({},Ze(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ce(Mf,null))},yC=Pf,CC=function(t){var n=t.children,r=t.innerProps;return ce("div",ue({},Ze(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ce(Rc,null))},xC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return oe({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},vC=function(t){var n=t.innerProps;return ce("span",ue({},n,Ze(t,"indicatorSeparator",{"indicator-separator":!0})))},EC=g6(Nf||(Nf=m6([`
612
612
  0%, 80%, 100% { opacity: 0; }
613
613
  40% { opacity: 1; }
614
- `]))),wC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return oe({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})},Mc=function(t){var n=t.delay,r=t.offset;return ce("span",{css:Lc({animation:"".concat(IC," 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 */")})},_C=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Jt(t,hC);return ce("div",ue({},Ze(oe(oe({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ce(Mc,{delay:0,offset:r}),ce(Mc,{delay:160,offset:!0}),ce(Mc,{delay:320,offset:!r}))},SC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return oe({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}})},AC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ce("div",ue({ref:s},Ze(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},TC=AC,LC=["data"],OC=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},FC=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,m=t.selectProps;return ce("div",ue({},Ze(t,"group",{group:!0}),c),ce(a,ue({},i,{selectProps:m,theme:f,getStyles:o,getClassNames:s,cx:r}),l),ce("div",null,n))},DC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return oe({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"})},kC=function(t){var n=Sf(t);n.data;var r=Jt(n,LC);return ce("div",ue({},Ze(t,"groupHeading",{"group-heading":!0}),r))},NC=FC,RC=["innerRef","isDisabled","isHidden","inputClassName"],MC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return oe(oe({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},PC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},jf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},PC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":oe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},jf)},jC=function(t){return oe({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},jf)},BC=function(t){var n=t.cx,r=t.value,o=Sf(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Jt(o,RC);return ce("div",ue({},Ze(t,"input",{"input-container":!0}),{"data-value":r||""}),ce("input",ue({className:n({input:!0},c),ref:s,style:jC(i),disabled:a},l)))},VC=BC,GC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return oe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},HC=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return oe({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})},WC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return oe({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}})},Bf=function(t){var n=t.children,r=t.innerProps;return ce("div",r,n)},ZC=Bf,XC=Bf;function zC(e){var t=e.children,n=e.innerProps;return ce("div",ue({role:"button"},n),t||ce(Rc,{size:14}))}var YC=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,m=r.Remove;return ce(l,{data:o,innerProps:oe(oe({},Ze(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ce(f,{data:o,innerProps:oe({},Ze(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ce(m,{data:o,innerProps:oe(oe({},Ze(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},JC=YC,qC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return oe({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}})},$C=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ce("div",ue({},Ze(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},QC=$C,UC=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return oe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},KC=function(t){var n=t.children,r=t.innerProps;return ce("div",ue({},Ze(t,"placeholder",{placeholder:!0}),r),n)},e7=KC,t7=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return oe({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})},n7=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ce("div",ue({},Ze(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},r7=n7,cn={ClearIndicator:xC,Control:TC,DropdownIndicator:yC,DownChevron:Mf,CrossIcon:Rc,Group:NC,GroupHeading:kC,IndicatorsContainer:fC,IndicatorSeparator:EC,Input:VC,LoadingIndicator:_C,Menu:U6,MenuList:eC,MenuPortal:aC,LoadingMessage:oC,NoOptionsMessage:rC,MultiValue:JC,MultiValueContainer:ZC,MultiValueLabel:XC,MultiValueRemove:zC,Option:QC,Placeholder:e7,SelectContainer:cC,SingleValue:r7,ValueContainer:uC},o7=function(t){return oe(oe({},cn),t.components)},Vf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function s7(e,t){return!!(e===t||Vf(e)&&Vf(t))}function a7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!s7(e[n],t[n]))return!1;return!0}function i7(e,t){t===void 0&&(t=a7);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 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)."}for(var l7=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:c7},u7=function(t){return ce("span",ue({css:l7},t))},Gf=u7,d7={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,m=function(h,p){return h&&h.length?"".concat(h.indexOf(p)+1," of ").concat(h.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(m(i,r),".");if(n==="menu"&&f){var y=c?" disabled":"",x="".concat(l?" selected":"").concat(y);return"".concat(a).concat(x,", ").concat(m(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},f7=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,m=c.ariaLiveMessages,y=c.getOptionLabel,x=c.inputValue,b=c.isMulti,h=c.isOptionDisabled,p=c.isSearchable,g=c.menuIsOpen,C=c.options,v=c.screenReaderStatus,I=c.tabSelectsValue,E=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=w.useMemo(function(){return oe(oe({},d7),m||{})},[m]),L=w.useMemo(function(){var Y="";if(n&&S.onChange){var $=n.option,H=n.options,X=n.removedValue,q=n.removedValues,se=n.value,de=function(ae){return Array.isArray(ae)?null:ae},V=X||$||de(se),W=V?y(V):"",M=H||q||void 0,G=M?M.map(y):[],z=oe({isDisabled:V&&h(V,i),label:W,labels:G},n);Y=S.onChange(z)}return Y},[n,S,h,i,y]),k=w.useMemo(function(){var Y="",$=r||o,H=!!(r&&i&&i.includes(r));if($&&S.onFocus){var X={focused:$,label:y($),isDisabled:h($,i),isSelected:H,options:s,context:$===r?"menu":"value",selectValue:i,isAppleDevice:f};Y=S.onFocus(X)}return Y},[r,o,y,h,S,s,i,f]),D=w.useMemo(function(){var Y="";if(g&&C.length&&!E&&S.onFilter){var $=v({count:s.length});Y=S.onFilter({inputValue:x,resultsMessage:$})}return Y},[s,x,g,S,C,v,E]),N=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var Y="";if(S.guidance){var $=o?"value":g?"menu":"input";Y=S.guidance({"aria-label":_,context:$,isDisabled:r&&h(r,i),isMulti:b,isSearchable:p,tabSelectsValue:I,isInitialFocus:N})}return Y},[_,r,o,b,h,p,g,S,i,I,N]),B=ce(w.Fragment,null,ce("span",{id:"aria-selection"},L),ce("span",{id:"aria-focused"},k),ce("span",{id:"aria-results"},D),ce("span",{id:"aria-guidance"},P));return ce(w.Fragment,null,ce(Gf,{id:l},N&&B),ce(Gf,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!N&&B))},p7=f7,Pc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],h7=new RegExp("["+Pc.map(function(e){return e.letters}).join("")+"]","g"),Hf={},jc=0;jc<Pc.length;jc++)for(var Bc=Pc[jc],Vc=0;Vc<Bc.letters.length;Vc++)Hf[Bc.letters[Vc]]=Bc.base;var Wf=function(t){return t.replace(h7,function(n){return Hf[n]})},g7=i7(Wf),Zf=function(t){return t.replace(/^\s+|\s+$/g,"")},m7=function(t){return"".concat(t.label," ").concat(t.value)},b7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=oe({ignoreCase:!0,ignoreAccents:!0,stringify:m7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?Zf(r):r,m=c?Zf(i(n)):i(n);return s&&(f=f.toLowerCase(),m=m.toLowerCase()),a&&(f=g7(f),m=Wf(m)),l==="start"?m.substr(0,f.length)===f:m.indexOf(f)>-1}},y7=["innerRef"];function C7(e){var t=e.innerRef,n=Jt(e,y7),r=Z6(n,"onExited","in","enter","exit","appear");return ce("input",ue({ref:t},r,{css:Lc({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 x7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function v7(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(p,g){if(l.current!==null){var C=l.current,v=C.scrollTop,I=C.scrollHeight,E=C.clientHeight,_=l.current,A=g>0,S=I-E-v,L=!1;S>g&&a.current&&(r&&r(p),a.current=!1),A&&i.current&&(s&&s(p),i.current=!1),A&&g>S?(n&&!a.current&&n(p),_.scrollTop=I,L=!0,a.current=!0):!A&&-g>v&&(o&&!i.current&&o(p),_.scrollTop=0,L=!0,i.current=!0),L&&x7(p)}},[n,r,o,s]),m=w.useCallback(function(p){f(p,p.deltaY)},[f]),y=w.useCallback(function(p){c.current=p.changedTouches[0].clientY},[]),x=w.useCallback(function(p){var g=c.current-p.changedTouches[0].clientY;f(p,g)},[f]),b=w.useCallback(function(p){if(p){var g=G6?{passive:!1}:!1;p.addEventListener("wheel",m,g),p.addEventListener("touchstart",y,g),p.addEventListener("touchmove",x,g)}},[x,y,m]),h=w.useCallback(function(p){p&&(p.removeEventListener("wheel",m,!1),p.removeEventListener("touchstart",y,!1),p.removeEventListener("touchmove",x,!1))},[x,y,m]);return w.useEffect(function(){if(t){var p=l.current;return b(p),function(){h(p)}}},[t,b,h]),function(p){l.current=p}}var Xf=["boxSizing","height","overflow","paddingRight","position"],zf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Yf(e){e.preventDefault()}function Jf(e){e.stopPropagation()}function qf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function $f(){return"ontouchstart"in window||navigator.maxTouchPoints}var Qf=!!(typeof window<"u"&&window.document&&window.document.createElement),Zo=0,Yr={capture:!1,passive:!1};function E7(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(Qf){var l=document.body,f=l&&l.style;if(r&&Xf.forEach(function(b){var h=f&&f[b];o.current[b]=h}),r&&Zo<1){var m=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,x=window.innerWidth-y+m||0;Object.keys(zf).forEach(function(b){var h=zf[b];f&&(f[b]=h)}),f&&(f.paddingRight="".concat(x,"px"))}l&&$f()&&(l.addEventListener("touchmove",Yf,Yr),c&&(c.addEventListener("touchstart",qf,Yr),c.addEventListener("touchmove",Jf,Yr))),Zo+=1}},[r]),i=w.useCallback(function(c){if(Qf){var l=document.body,f=l&&l.style;Zo=Math.max(Zo-1,0),r&&Zo<1&&Xf.forEach(function(m){var y=o.current[m];f&&(f[m]=y)}),l&&$f()&&(l.removeEventListener("touchmove",Yf,Yr),c&&(c.removeEventListener("touchstart",qf,Yr),c.removeEventListener("touchmove",Jf,Yr)))}},[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 I7(){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 w7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},_7=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:I7};function S7(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=v7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=E7({isEnabled:n}),m=function(x){l(x),f(x)};return ce(w.Fragment,null,n&&ce("div",{onClick:w7,css:_7}),t(m))}function A7(){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 T7=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:A7},L7=function(t){var n=t.name,r=t.onFocus;return ce("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:T7,value:"",onChange:function(){}})},O7=L7;function Gc(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 F7(){return Gc(/^iPhone/i)}function Uf(){return Gc(/^Mac/i)}function D7(){return Gc(/^iPad/i)||Uf()&&navigator.maxTouchPoints>1}function k7(){return F7()||D7()}function N7(){return Uf()||k7()}var R7=function(t){return t.label},Kf=function(t){return t.label},e1=function(t){return t.value},M7=function(t){return!!t.isDisabled},P7={clearIndicator:CC,container:iC,control:SC,dropdownIndicator:bC,group:OC,groupHeading:DC,indicatorsContainer:dC,indicatorSeparator:vC,input:MC,loadingIndicator:wC,loadingMessage:nC,menu:q6,menuList:K6,menuPortal:sC,multiValue:GC,multiValueLabel:HC,multiValueRemove:WC,noOptionsMessage:tC,option:qC,placeholder:UC,singleValue:t7,valueContainer:lC},j7={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%)"},B7=4,t1=4,V7=38,G7=t1*2,H7={baseUnit:t1,controlHeight:V7,menuGutter:G7},Hc={borderRadius:B7,colors:j7,spacing:H7},W7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Lf(),captureMenuScroll:!Lf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:b7(),formatGroupLabel:R7,getOptionLabel:Kf,getOptionValue:e1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:M7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!B6(),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 n1(e,t,n,r){var o=i1(e,t,n),s=c1(e,t,n),a=a1(e,t),i=ma(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function ga(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return n1(e,a,t,i)}).filter(function(a){return s1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=n1(e,n,t,r);return s1(e,s)?s:void 0}).filter(H6)}function r1(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Wr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function o1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Wr(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 Z7(e,t){return r1(ga(e,t))}function s1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!u1(e)||!s)&&l1(e,{label:a,value:i,data:o},r)}function X7(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 z7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Wc=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},a1=function(t,n){return t.getOptionLabel(n)},ma=function(t,n){return t.getOptionValue(n)};function i1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function c1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ma(e,t);return n.some(function(o){return ma(e,o)===r})}function l1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var u1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Y7=1,ba=function(e){i9(n,e);var t=u9(n);function n(r){var o;if(s9(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=N7(),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,m=f.onChange,y=f.name;l.name=y,o.ariaOnChange(c,l),m(c,l)},o.setValue=function(c,l,f){var m=o.props,y=m.closeMenuOnSelect,x=m.isMulti,b=m.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),y&&(o.setState({inputIsHiddenAfterUpdate:!x}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,m=l.isMulti,y=l.name,x=o.state.selectValue,b=m&&o.isOptionSelected(c,x),h=o.isOptionDisabled(c,x);if(b){var p=o.getOptionValue(c);o.setValue(x.filter(function(g){return o.getOptionValue(g)!==p}),"deselect-option",c)}else if(!h)m?o.setValue([].concat(Wr(x),[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,m=o.getOptionValue(c),y=f.filter(function(b){return o.getOptionValue(b)!==m}),x=Wo(l,y,y[0]||null);o.onChange(x,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Wo(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],m=l.slice(0,l.length-1),y=Wo(c,m,m[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return Wc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return o1(ga(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 k6.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return a1(o.props,c)},o.getOptionValue=function(c){return ma(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,m=P7[c](l,f);m.boxSizing="border-box";var y=o.props.styles[c];return y?y(m,l):m},o.getClassNames=function(c,l){var f,m;return(f=(m=o.props.classNames)[c])===null||f===void 0?void 0:f.call(m,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return o7(o.props)},o.buildCategorizedOptions=function(){return ga(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return r1(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:oe({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,m=l.menuIsOpen;o.focusInput(),m?(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&&da(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 m=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),x=5;o.userIsDragging=m>x||y>x}},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 u1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,m=l.backspaceRemovesValue,y=l.escapeClearsValue,x=l.inputValue,b=l.isClearable,h=l.isDisabled,p=l.menuIsOpen,g=l.onKeyDown,C=l.tabSelectsValue,v=l.openMenuOnFocus,I=o.state,E=I.focusedOption,_=I.focusedValue,A=I.selectValue;if(!h&&!(typeof g=="function"&&(g(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||x)return;o.focusValue("previous");break;case"ArrowRight":if(!f||x)return;o.focusValue("next");break;case"Delete":case"Backspace":if(x)return;if(_)o.removeValue(_);else{if(!m)return;f?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!p||!C||!E||v&&o.isOptionSelected(E,A))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(p){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":p?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:x}),o.onMenuClose()):b&&y&&o.clearValue();break;case" ":if(x)return;if(!p){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":p?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":p?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!p)return;o.focusOption("pageup");break;case"PageDown":if(!p)return;o.focusOption("pagedown");break;case"Home":if(!p)return;o.focusOption("first");break;case"End":if(!p)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++Y7),o.state.selectValue=ua(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=Wc(s,a[i])}return o}return a9(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&&Tf(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&&(Tf(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 m=l.indexOf(i[0]);m>-1&&(f=m)}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(Hc):oe(oe({},Hc),this.props.theme):Hc}},{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,m=this.props,y=m.isMulti,x=m.isRtl,b=m.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:h,isMulti:y,isRtl:x,options:b,selectOption:l,selectProps:m,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 i1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return c1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return l1(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,m=o.menuIsOpen,y=o.required,x=this.getComponents(),b=x.Input,h=this.state,p=h.inputIsHidden,g=h.ariaSelection,C=this.commonProps,v=i||this.getElementId("input"),I=oe(oe(oe({"aria-autocomplete":"list","aria-expanded":m,"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||""},m&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(g==null?void 0:g.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(b,ue({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:s,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},I)):T.createElement(C7,ue({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:la,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,m=s.Placeholder,y=this.commonProps,x=this.props,b=x.controlShouldRenderValue,h=x.isDisabled,p=x.isMulti,g=x.inputValue,C=x.placeholder,v=this.state,I=v.selectValue,E=v.focusedValue,_=v.isFocused;if(!this.hasValue()||!b)return g?null:T.createElement(m,ue({},y,{key:"placeholder",isDisabled:h,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),C);if(p)return I.map(function(S,L){var k=S===E,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,ue({},y,{components:{Container:i,Label:c,Remove:l},isFocused:k,isDisabled:h,key:D,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(g)return null;var A=I[0];return T.createElement(f,ue({},y,{data:A,isDisabled:h}),this.formatOptionLabel(A,"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 m={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:m,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 m={"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:m,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 T.createElement(a,ue({},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 T.createElement(s,ue({},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,m=s.LoadingMessage,y=s.NoOptionsMessage,x=s.Option,b=this.commonProps,h=this.state.focusedOption,p=this.props,g=p.captureMenuScroll,C=p.inputValue,v=p.isLoading,I=p.loadingMessage,E=p.minMenuHeight,_=p.maxMenuHeight,A=p.menuIsOpen,S=p.menuPlacement,L=p.menuPosition,k=p.menuPortalTarget,D=p.menuShouldBlockScroll,N=p.menuShouldScrollIntoView,P=p.noOptionsMessage,B=p.onMenuScrollToTop,Y=p.onMenuScrollToBottom;if(!A)return null;var $=function(W,M){var G=W.type,z=W.data,ne=W.isDisabled,ae=W.isSelected,j=W.label,ee=W.value,ve=h===z,J=ne?void 0:function(){return o.onOptionHover(z)},Pe=ne?void 0:function(){return o.selectOption(z)},je="".concat(o.getElementId("option"),"-").concat(M),ze={id:je,onClick:Pe,onMouseMove:J,onMouseOver:J,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ae};return T.createElement(x,ue({},b,{innerProps:ze,data:z,isDisabled:ne,isSelected:ae,key:je,label:j,type:G,value:ee,isFocused:ve,innerRef:ve?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(W.data,"menu"))},H;if(this.hasOptions())H=this.getCategorizedOptions().map(function(V){if(V.type==="group"){var W=V.data,M=V.options,G=V.index,z="".concat(o.getElementId("group"),"-").concat(G),ne="".concat(z,"-heading");return T.createElement(a,ue({},b,{key:z,data:W,options:M,Heading:i,headingProps:{id:ne,data:V.data},label:o.formatGroupLabel(V.data)}),V.options.map(function(ae){return $(ae,"".concat(G,"-").concat(ae.index))}))}else if(V.type==="option")return $(V,"".concat(V.index))});else if(v){var X=I({inputValue:C});if(X===null)return null;H=T.createElement(m,b,X)}else{var q=P({inputValue:C});if(q===null)return null;H=T.createElement(y,b,q)}var se={minMenuHeight:E,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:N},de=T.createElement($6,ue({},b,se),function(V){var W=V.ref,M=V.placerProps,G=M.placement,z=M.maxHeight;return T.createElement(c,ue({},b,se,{innerRef:W,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:v,placement:G}),T.createElement(S7,{captureEnabled:g,onTopArrive:B,onBottomArrive:Y,lockEnabled:D},function(ne){return T.createElement(l,ue({},b,{innerRef:function(j){o.getMenuListRef(j),ne(j)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:v,maxHeight:z,focusedOption:h}),H)}))});return k||L==="fixed"?T.createElement(f,ue({},b,{appendTo:k,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),de):de}},{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,m=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(O7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var y=m.map(function(h){return o.getOptionValue(h)}).join(a);return T.createElement("input",{name:l,type:"hidden",value:y})}else{var x=m.length>0?m.map(function(h,p){return T.createElement("input",{key:"i-".concat(p),name:l,type:"hidden",value:o.getOptionValue(h)})}):T.createElement("input",{name:l,type:"hidden",value:""});return T.createElement("div",null,x)}else{var b=m[0]?this.getOptionValue(m[0]):"";return T.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,m=this.getFocusableOptions();return T.createElement(p7,ue({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:m,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,m=l.id,y=l.isDisabled,x=l.menuIsOpen,b=this.state.isFocused,h=this.commonProps=this.getCommonProps();return T.createElement(i,ue({},h,{className:f,innerProps:{id:m,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:b}),this.renderLiveRegion(),T.createElement(s,ue({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:b,menuIsOpen:x}),T.createElement(c,ue({},h,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,ue({},h,{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,m=s.prevWasFocused,y=s.instancePrefix,x=o.options,b=o.value,h=o.menuIsOpen,p=o.inputValue,g=o.isMulti,C=ua(b),v={};if(a&&(b!==a.value||x!==a.options||h!==a.menuIsOpen||p!==a.inputValue)){var I=h?Z7(o,C):[],E=h?o1(ga(o,C),"".concat(y,"-option")):[],_=i?X7(s,C):null,A=z7(s,I),S=Wc(E,A);v={selectValue:C,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},k=l,D=f&&m;return f&&!D&&(k={value:Wo(g,C,C[0]||null),options:C,action:"initial-input-focus"},D=!m),(l==null?void 0:l.action)==="initial-input-focus"&&(k=null),oe(oe(oe({},v),L),{},{prevProps:o,ariaSelection:k,prevWasFocused:D})}}]),n}(w.Component);ba.defaultProps=W7;var J7=w.forwardRef(function(e,t){var n=yc(e);return T.createElement(ba,ue({ref:t},n))}),q7=J7;const $7=d.styled(d.Box)`
614
+ `]))),IC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return oe({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})},Mc=function(t){var n=t.delay,r=t.offset;return ce("span",{css:Lc({animation:"".concat(EC," 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 */")})},wC=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Jt(t,pC);return ce("div",ue({},Ze(oe(oe({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ce(Mc,{delay:0,offset:r}),ce(Mc,{delay:160,offset:!0}),ce(Mc,{delay:320,offset:!r}))},_C=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return oe({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}})},SC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ce("div",ue({ref:s},Ze(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},AC=SC,TC=["data"],LC=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},OC=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,b=t.selectProps;return ce("div",ue({},Ze(t,"group",{group:!0}),c),ce(a,ue({},i,{selectProps:b,theme:f,getStyles:o,getClassNames:s,cx:r}),l),ce("div",null,n))},FC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return oe({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"})},DC=function(t){var n=Sf(t);n.data;var r=Jt(n,TC);return ce("div",ue({},Ze(t,"groupHeading",{"group-heading":!0}),r))},kC=OC,NC=["innerRef","isDisabled","isHidden","inputClassName"],RC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return oe(oe({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},MC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},jf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},MC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":oe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},jf)},PC=function(t){return oe({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},jf)},jC=function(t){var n=t.cx,r=t.value,o=Sf(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Jt(o,NC);return ce("div",ue({},Ze(t,"input",{"input-container":!0}),{"data-value":r||""}),ce("input",ue({className:n({input:!0},c),ref:s,style:PC(i),disabled:a},l)))},BC=jC,VC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return oe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},GC=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return oe({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})},HC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return oe({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}})},Bf=function(t){var n=t.children,r=t.innerProps;return ce("div",r,n)},WC=Bf,ZC=Bf;function XC(e){var t=e.children,n=e.innerProps;return ce("div",ue({role:"button"},n),t||ce(Rc,{size:14}))}var zC=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,b=r.Remove;return ce(l,{data:o,innerProps:oe(oe({},Ze(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ce(f,{data:o,innerProps:oe({},Ze(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ce(b,{data:o,innerProps:oe(oe({},Ze(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},YC=zC,JC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return oe({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}})},qC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ce("div",ue({},Ze(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},$C=qC,QC=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return oe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},UC=function(t){var n=t.children,r=t.innerProps;return ce("div",ue({},Ze(t,"placeholder",{placeholder:!0}),r),n)},KC=UC,e7=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return oe({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})},t7=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ce("div",ue({},Ze(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},n7=t7,cn={ClearIndicator:CC,Control:AC,DropdownIndicator:bC,DownChevron:Mf,CrossIcon:Rc,Group:kC,GroupHeading:DC,IndicatorsContainer:dC,IndicatorSeparator:vC,Input:BC,LoadingIndicator:wC,Menu:Q6,MenuList:K6,MenuPortal:sC,LoadingMessage:rC,NoOptionsMessage:nC,MultiValue:YC,MultiValueContainer:WC,MultiValueLabel:ZC,MultiValueRemove:XC,Option:$C,Placeholder:KC,SelectContainer:iC,SingleValue:n7,ValueContainer:lC},r7=function(t){return oe(oe({},cn),t.components)},Vf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function o7(e,t){return!!(e===t||Vf(e)&&Vf(t))}function s7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!o7(e[n],t[n]))return!1;return!0}function a7(e,t){t===void 0&&(t=s7);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 i7(){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 c7=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:i7},l7=function(t){return ce("span",ue({css:c7},t))},Gf=l7,u7={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,b=function(h,p){return h&&h.length?"".concat(h.indexOf(p)+1," of ").concat(h.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(b(i,r),".");if(n==="menu"&&f){var y=c?" disabled":"",x="".concat(l?" selected":"").concat(y);return"".concat(a).concat(x,", ").concat(b(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},d7=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,b=c.ariaLiveMessages,y=c.getOptionLabel,x=c.inputValue,m=c.isMulti,h=c.isOptionDisabled,p=c.isSearchable,g=c.menuIsOpen,C=c.options,v=c.screenReaderStatus,I=c.tabSelectsValue,E=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=w.useMemo(function(){return oe(oe({},u7),b||{})},[b]),L=w.useMemo(function(){var Y="";if(n&&S.onChange){var $=n.option,H=n.options,X=n.removedValue,q=n.removedValues,se=n.value,de=function(ae){return Array.isArray(ae)?null:ae},V=X||$||de(se),W=V?y(V):"",M=H||q||void 0,G=M?M.map(y):[],z=oe({isDisabled:V&&h(V,i),label:W,labels:G},n);Y=S.onChange(z)}return Y},[n,S,h,i,y]),k=w.useMemo(function(){var Y="",$=r||o,H=!!(r&&i&&i.includes(r));if($&&S.onFocus){var X={focused:$,label:y($),isDisabled:h($,i),isSelected:H,options:s,context:$===r?"menu":"value",selectValue:i,isAppleDevice:f};Y=S.onFocus(X)}return Y},[r,o,y,h,S,s,i,f]),D=w.useMemo(function(){var Y="";if(g&&C.length&&!E&&S.onFilter){var $=v({count:s.length});Y=S.onFilter({inputValue:x,resultsMessage:$})}return Y},[s,x,g,S,C,v,E]),N=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var Y="";if(S.guidance){var $=o?"value":g?"menu":"input";Y=S.guidance({"aria-label":_,context:$,isDisabled:r&&h(r,i),isMulti:m,isSearchable:p,tabSelectsValue:I,isInitialFocus:N})}return Y},[_,r,o,m,h,p,g,S,i,I,N]),B=ce(w.Fragment,null,ce("span",{id:"aria-selection"},L),ce("span",{id:"aria-focused"},k),ce("span",{id:"aria-results"},D),ce("span",{id:"aria-guidance"},P));return ce(w.Fragment,null,ce(Gf,{id:l},N&&B),ce(Gf,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!N&&B))},f7=d7,Pc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],p7=new RegExp("["+Pc.map(function(e){return e.letters}).join("")+"]","g"),Hf={},jc=0;jc<Pc.length;jc++)for(var Bc=Pc[jc],Vc=0;Vc<Bc.letters.length;Vc++)Hf[Bc.letters[Vc]]=Bc.base;var Wf=function(t){return t.replace(p7,function(n){return Hf[n]})},h7=a7(Wf),Zf=function(t){return t.replace(/^\s+|\s+$/g,"")},g7=function(t){return"".concat(t.label," ").concat(t.value)},m7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=oe({ignoreCase:!0,ignoreAccents:!0,stringify:g7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?Zf(r):r,b=c?Zf(i(n)):i(n);return s&&(f=f.toLowerCase(),b=b.toLowerCase()),a&&(f=h7(f),b=Wf(b)),l==="start"?b.substr(0,f.length)===f:b.indexOf(f)>-1}},b7=["innerRef"];function y7(e){var t=e.innerRef,n=Jt(e,b7),r=W6(n,"onExited","in","enter","exit","appear");return ce("input",ue({ref:t},r,{css:Lc({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 C7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function x7(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(p,g){if(l.current!==null){var C=l.current,v=C.scrollTop,I=C.scrollHeight,E=C.clientHeight,_=l.current,A=g>0,S=I-E-v,L=!1;S>g&&a.current&&(r&&r(p),a.current=!1),A&&i.current&&(s&&s(p),i.current=!1),A&&g>S?(n&&!a.current&&n(p),_.scrollTop=I,L=!0,a.current=!0):!A&&-g>v&&(o&&!i.current&&o(p),_.scrollTop=0,L=!0,i.current=!0),L&&C7(p)}},[n,r,o,s]),b=w.useCallback(function(p){f(p,p.deltaY)},[f]),y=w.useCallback(function(p){c.current=p.changedTouches[0].clientY},[]),x=w.useCallback(function(p){var g=c.current-p.changedTouches[0].clientY;f(p,g)},[f]),m=w.useCallback(function(p){if(p){var g=V6?{passive:!1}:!1;p.addEventListener("wheel",b,g),p.addEventListener("touchstart",y,g),p.addEventListener("touchmove",x,g)}},[x,y,b]),h=w.useCallback(function(p){p&&(p.removeEventListener("wheel",b,!1),p.removeEventListener("touchstart",y,!1),p.removeEventListener("touchmove",x,!1))},[x,y,b]);return w.useEffect(function(){if(t){var p=l.current;return m(p),function(){h(p)}}},[t,m,h]),function(p){l.current=p}}var Xf=["boxSizing","height","overflow","paddingRight","position"],zf={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Yf(e){e.preventDefault()}function Jf(e){e.stopPropagation()}function qf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function $f(){return"ontouchstart"in window||navigator.maxTouchPoints}var Qf=!!(typeof window<"u"&&window.document&&window.document.createElement),Zo=0,Yr={capture:!1,passive:!1};function v7(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(Qf){var l=document.body,f=l&&l.style;if(r&&Xf.forEach(function(m){var h=f&&f[m];o.current[m]=h}),r&&Zo<1){var b=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,x=window.innerWidth-y+b||0;Object.keys(zf).forEach(function(m){var h=zf[m];f&&(f[m]=h)}),f&&(f.paddingRight="".concat(x,"px"))}l&&$f()&&(l.addEventListener("touchmove",Yf,Yr),c&&(c.addEventListener("touchstart",qf,Yr),c.addEventListener("touchmove",Jf,Yr))),Zo+=1}},[r]),i=w.useCallback(function(c){if(Qf){var l=document.body,f=l&&l.style;Zo=Math.max(Zo-1,0),r&&Zo<1&&Xf.forEach(function(b){var y=o.current[b];f&&(f[b]=y)}),l&&$f()&&(l.removeEventListener("touchmove",Yf,Yr),c&&(c.removeEventListener("touchstart",qf,Yr),c.removeEventListener("touchmove",Jf,Yr)))}},[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 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)."}var I7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},w7=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:E7};function _7(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=x7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=v7({isEnabled:n}),b=function(x){l(x),f(x)};return ce(w.Fragment,null,n&&ce("div",{onClick:I7,css:w7}),t(b))}function S7(){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 A7=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:S7},T7=function(t){var n=t.name,r=t.onFocus;return ce("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:A7,value:"",onChange:function(){}})},L7=T7;function Gc(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 O7(){return Gc(/^iPhone/i)}function Uf(){return Gc(/^Mac/i)}function F7(){return Gc(/^iPad/i)||Uf()&&navigator.maxTouchPoints>1}function D7(){return O7()||F7()}function k7(){return Uf()||D7()}var N7=function(t){return t.label},Kf=function(t){return t.label},e1=function(t){return t.value},R7=function(t){return!!t.isDisabled},M7={clearIndicator:yC,container:aC,control:_C,dropdownIndicator:mC,group:LC,groupHeading:FC,indicatorsContainer:uC,indicatorSeparator:xC,input:RC,loadingIndicator:IC,loadingMessage:tC,menu:J6,menuList:U6,menuPortal:oC,multiValue:VC,multiValueLabel:GC,multiValueRemove:HC,noOptionsMessage:eC,option:JC,placeholder:QC,singleValue:e7,valueContainer:cC},P7={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%)"},j7=4,t1=4,B7=38,V7=t1*2,G7={baseUnit:t1,controlHeight:B7,menuGutter:V7},Hc={borderRadius:j7,colors:P7,spacing:G7},H7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Lf(),captureMenuScroll:!Lf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:m7(),formatGroupLabel:N7,getOptionLabel:Kf,getOptionValue:e1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:R7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!j6(),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 n1(e,t,n,r){var o=i1(e,t,n),s=c1(e,t,n),a=a1(e,t),i=ma(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function ga(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return n1(e,a,t,i)}).filter(function(a){return s1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=n1(e,n,t,r);return s1(e,s)?s:void 0}).filter(G6)}function r1(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Wr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function o1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Wr(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 W7(e,t){return r1(ga(e,t))}function s1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!u1(e)||!s)&&l1(e,{label:a,value:i,data:o},r)}function Z7(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 X7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Wc=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},a1=function(t,n){return t.getOptionLabel(n)},ma=function(t,n){return t.getOptionValue(n)};function i1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function c1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ma(e,t);return n.some(function(o){return ma(e,o)===r})}function l1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var u1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},z7=1,ba=function(e){a9(n,e);var t=l9(n);function n(r){var o;if(o9(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=k7(),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,b=f.onChange,y=f.name;l.name=y,o.ariaOnChange(c,l),b(c,l)},o.setValue=function(c,l,f){var b=o.props,y=b.closeMenuOnSelect,x=b.isMulti,m=b.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:m}),y&&(o.setState({inputIsHiddenAfterUpdate:!x}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,b=l.isMulti,y=l.name,x=o.state.selectValue,m=b&&o.isOptionSelected(c,x),h=o.isOptionDisabled(c,x);if(m){var p=o.getOptionValue(c);o.setValue(x.filter(function(g){return o.getOptionValue(g)!==p}),"deselect-option",c)}else if(!h)b?o.setValue([].concat(Wr(x),[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,b=o.getOptionValue(c),y=f.filter(function(m){return o.getOptionValue(m)!==b}),x=Wo(l,y,y[0]||null);o.onChange(x,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Wo(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],b=l.slice(0,l.length-1),y=Wo(c,b,b[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return Wc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return o1(ga(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 D6.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return a1(o.props,c)},o.getOptionValue=function(c){return ma(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,b=M7[c](l,f);b.boxSizing="border-box";var y=o.props.styles[c];return y?y(b,l):b},o.getClassNames=function(c,l){var f,b;return(f=(b=o.props.classNames)[c])===null||f===void 0?void 0:f.call(b,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return r7(o.props)},o.buildCategorizedOptions=function(){return ga(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return r1(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:oe({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,b=l.menuIsOpen;o.focusInput(),b?(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&&da(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 b=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),x=5;o.userIsDragging=b>x||y>x}},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 u1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,b=l.backspaceRemovesValue,y=l.escapeClearsValue,x=l.inputValue,m=l.isClearable,h=l.isDisabled,p=l.menuIsOpen,g=l.onKeyDown,C=l.tabSelectsValue,v=l.openMenuOnFocus,I=o.state,E=I.focusedOption,_=I.focusedValue,A=I.selectValue;if(!h&&!(typeof g=="function"&&(g(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||x)return;o.focusValue("previous");break;case"ArrowRight":if(!f||x)return;o.focusValue("next");break;case"Delete":case"Backspace":if(x)return;if(_)o.removeValue(_);else{if(!b)return;f?o.popValue():m&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!p||!C||!E||v&&o.isOptionSelected(E,A))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(p){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":p?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:x}),o.onMenuClose()):m&&y&&o.clearValue();break;case" ":if(x)return;if(!p){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":p?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":p?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!p)return;o.focusOption("pageup");break;case"PageDown":if(!p)return;o.focusOption("pagedown");break;case"Home":if(!p)return;o.focusOption("first");break;case"End":if(!p)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++z7),o.state.selectValue=ua(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=Wc(s,a[i])}return o}return s9(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&&Tf(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&&(Tf(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 b=l.indexOf(i[0]);b>-1&&(f=b)}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(Hc):oe(oe({},Hc),this.props.theme):Hc}},{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,b=this.props,y=b.isMulti,x=b.isRtl,m=b.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:h,isMulti:y,isRtl:x,options:m,selectOption:l,selectProps:b,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 i1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return c1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return l1(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,b=o.menuIsOpen,y=o.required,x=this.getComponents(),m=x.Input,h=this.state,p=h.inputIsHidden,g=h.ariaSelection,C=this.commonProps,v=i||this.getElementId("input"),I=oe(oe(oe({"aria-autocomplete":"list","aria-expanded":b,"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||""},b&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(g==null?void 0:g.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(m,ue({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:s,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},I)):T.createElement(y7,ue({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:la,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,b=s.Placeholder,y=this.commonProps,x=this.props,m=x.controlShouldRenderValue,h=x.isDisabled,p=x.isMulti,g=x.inputValue,C=x.placeholder,v=this.state,I=v.selectValue,E=v.focusedValue,_=v.isFocused;if(!this.hasValue()||!m)return g?null:T.createElement(b,ue({},y,{key:"placeholder",isDisabled:h,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),C);if(p)return I.map(function(S,L){var k=S===E,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,ue({},y,{components:{Container:i,Label:c,Remove:l},isFocused:k,isDisabled:h,key:D,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(g)return null;var A=I[0];return T.createElement(f,ue({},y,{data:A,isDisabled:h}),this.formatOptionLabel(A,"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 b={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:b,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 b={"aria-hidden":"true"};return T.createElement(s,ue({},a,{innerProps:b,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 T.createElement(a,ue({},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 T.createElement(s,ue({},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,b=s.LoadingMessage,y=s.NoOptionsMessage,x=s.Option,m=this.commonProps,h=this.state.focusedOption,p=this.props,g=p.captureMenuScroll,C=p.inputValue,v=p.isLoading,I=p.loadingMessage,E=p.minMenuHeight,_=p.maxMenuHeight,A=p.menuIsOpen,S=p.menuPlacement,L=p.menuPosition,k=p.menuPortalTarget,D=p.menuShouldBlockScroll,N=p.menuShouldScrollIntoView,P=p.noOptionsMessage,B=p.onMenuScrollToTop,Y=p.onMenuScrollToBottom;if(!A)return null;var $=function(W,M){var G=W.type,z=W.data,ne=W.isDisabled,ae=W.isSelected,j=W.label,ee=W.value,ve=h===z,J=ne?void 0:function(){return o.onOptionHover(z)},Pe=ne?void 0:function(){return o.selectOption(z)},je="".concat(o.getElementId("option"),"-").concat(M),ze={id:je,onClick:Pe,onMouseMove:J,onMouseOver:J,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ae};return T.createElement(x,ue({},m,{innerProps:ze,data:z,isDisabled:ne,isSelected:ae,key:je,label:j,type:G,value:ee,isFocused:ve,innerRef:ve?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(W.data,"menu"))},H;if(this.hasOptions())H=this.getCategorizedOptions().map(function(V){if(V.type==="group"){var W=V.data,M=V.options,G=V.index,z="".concat(o.getElementId("group"),"-").concat(G),ne="".concat(z,"-heading");return T.createElement(a,ue({},m,{key:z,data:W,options:M,Heading:i,headingProps:{id:ne,data:V.data},label:o.formatGroupLabel(V.data)}),V.options.map(function(ae){return $(ae,"".concat(G,"-").concat(ae.index))}))}else if(V.type==="option")return $(V,"".concat(V.index))});else if(v){var X=I({inputValue:C});if(X===null)return null;H=T.createElement(b,m,X)}else{var q=P({inputValue:C});if(q===null)return null;H=T.createElement(y,m,q)}var se={minMenuHeight:E,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:N},de=T.createElement(q6,ue({},m,se),function(V){var W=V.ref,M=V.placerProps,G=M.placement,z=M.maxHeight;return T.createElement(c,ue({},m,se,{innerRef:W,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:v,placement:G}),T.createElement(_7,{captureEnabled:g,onTopArrive:B,onBottomArrive:Y,lockEnabled:D},function(ne){return T.createElement(l,ue({},m,{innerRef:function(j){o.getMenuListRef(j),ne(j)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:o.getElementId("listbox")},isLoading:v,maxHeight:z,focusedOption:h}),H)}))});return k||L==="fixed"?T.createElement(f,ue({},m,{appendTo:k,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),de):de}},{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,b=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(L7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var y=b.map(function(h){return o.getOptionValue(h)}).join(a);return T.createElement("input",{name:l,type:"hidden",value:y})}else{var x=b.length>0?b.map(function(h,p){return T.createElement("input",{key:"i-".concat(p),name:l,type:"hidden",value:o.getOptionValue(h)})}):T.createElement("input",{name:l,type:"hidden",value:""});return T.createElement("div",null,x)}else{var m=b[0]?this.getOptionValue(b[0]):"";return T.createElement("input",{name:l,type:"hidden",value:m})}}},{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,b=this.getFocusableOptions();return T.createElement(f7,ue({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:b,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,b=l.id,y=l.isDisabled,x=l.menuIsOpen,m=this.state.isFocused,h=this.commonProps=this.getCommonProps();return T.createElement(i,ue({},h,{className:f,innerProps:{id:b,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:m}),this.renderLiveRegion(),T.createElement(s,ue({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:m,menuIsOpen:x}),T.createElement(c,ue({},h,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,ue({},h,{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,b=s.prevWasFocused,y=s.instancePrefix,x=o.options,m=o.value,h=o.menuIsOpen,p=o.inputValue,g=o.isMulti,C=ua(m),v={};if(a&&(m!==a.value||x!==a.options||h!==a.menuIsOpen||p!==a.inputValue)){var I=h?W7(o,C):[],E=h?o1(ga(o,C),"".concat(y,"-option")):[],_=i?Z7(s,C):null,A=X7(s,I),S=Wc(E,A);v={selectValue:C,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},k=l,D=f&&b;return f&&!D&&(k={value:Wo(g,C,C[0]||null),options:C,action:"initial-input-focus"},D=!b),(l==null?void 0:l.action)==="initial-input-focus"&&(k=null),oe(oe(oe({},v),L),{},{prevProps:o,ariaSelection:k,prevWasFocused:D})}}]),n}(w.Component);ba.defaultProps=H7;var Y7=w.forwardRef(function(e,t){var n=yc(e);return T.createElement(ba,ue({ref:t},n))}),J7=Y7;const q7=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
- `,Q7=d.styled("img")`
625
+ `,$7=d.styled("img")`
626
626
  width: 24px;
627
627
  height: 24px;
628
628
  border-radius: 50%;
629
629
  margin-right: 12px;
630
- `;function d1(e){const{data:t}=e;return u.jsx(cn.Option,{...e,children:u.jsxs($7,{children:[t.avatarUrl?u.jsx(Q7,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,u.jsx("span",{children:e.children})]})})}const U7=d.styled(d.Box)`
630
+ `;function d1(e){const{data:t}=e;return u.jsx(cn.Option,{...e,children:u.jsxs(q7,{children:[t.avatarUrl?u.jsx($7,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,u.jsx("span",{children:e.children})]})})}const Q7=d.styled(d.Box)`
631
631
  height: 24px;
632
632
  width: 24px;
633
633
  border-radius: 50%;
@@ -652,27 +652,27 @@ 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
- `,f1=e=>u.jsx(cn.ClearIndicator,{...e,children:u.jsx(U7,{})}),p1=(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}),K7=d.styled(d.Stack)`
655
+ `,f1=e=>u.jsx(cn.ClearIndicator,{...e,children:u.jsx(Q7,{})}),p1=(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}),U7=d.styled(d.Stack)`
656
656
  width: 0;
657
657
  height: 0;
658
- `,e8=({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(K7,{ref:o})},h1=({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}},t8=e=>u.jsx(cn.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})}),g1=()=>({ClearIndicator:f1,DropdownIndicator:t8,IndicatorSeparator:()=>null,Option:d1}),Xo=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=w.useState(!1),c=w.useCallback(m=>{i(!m.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=h1({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(e8,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(q7,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:p1(n.styles,e),components:n.components?n.components:g1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};Xo.getDefaultComponents=g1;const m1="Required Field",n8="Validation Failed";var b1=(e=>(e.DATE="DD/MM/YYYY",e))(b1||{}),r8=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function y1(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,m=Jt(e,r8),y=m.inputValue,x=w.useRef(void 0),b=w.useRef(!1),h=w.useState(Array.isArray(n)?n:void 0),p=nt(h,2),g=p[0],C=p[1],v=w.useState(typeof y<"u"?y:""),I=nt(v,2),E=I[0],_=I[1],A=w.useState(n===!0),S=nt(A,2),L=S[0],k=S[1],D=w.useState(void 0),N=nt(D,2),P=N[0],B=N[1],Y=w.useState([]),$=nt(Y,2),H=$[0],X=$[1],q=w.useState(!1),se=nt(q,2),de=se[0],V=se[1],W=w.useState({}),M=nt(W,2),G=M[0],z=M[1],ne=w.useState(void 0),ae=nt(ne,2),j=ae[0],ee=ae[1],ve=w.useState(void 0),J=nt(ve,2),Pe=J[0],je=J[1];o!==Pe&&(z({}),je(o)),n!==j&&(C(Array.isArray(n)?n:void 0),ee(n)),w.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var ze=w.useCallback(function(Ct,Ge){if(!s)return Ge();var Qe=s(Ct,Ge);Qe&&typeof Qe.then=="function"&&Qe.then(Ge,function(){return Ge()})},[s]);w.useEffect(function(){n===!0&&ze(E,function(Ct){b.current&&(C(Ct||[]),k(!!x.current))})},[]);var Mt=w.useCallback(function(Ct,Ge){var Qe=N6(Ct,Ge,c);if(!Qe){x.current=void 0,_(""),B(""),X([]),k(!1),V(!1);return}if(o&&G[Qe])_(Qe),B(Qe),X(G[Qe]),k(!1),V(!1);else{var wn=x.current={};_(Qe),k(!0),V(!P),ze(Qe,function(Pt){b&&wn===x.current&&(x.current=void 0,k(!1),B(Qe),X(Pt||[]),V(!1),z(Pt?oe(oe({},G),{},Hr({},Qe,Pt)):G))})}},[o,ze,P,G,c]),In=de?[]:E&&P?H:g||[];return oe(oe({},m),{},{options:In,isLoading:L||i,onInputChange:Mt,filterOption:f})}var o8=w.forwardRef(function(e,t){var n=y1(e),r=yc(n);return T.createElement(ba,ue({ref:t},r))}),s8=o8,a8=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],C1=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},Zc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return C1(t,s,o)})||r.some(function(s){return C1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function i8(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?Zc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Zc.isValidNewOption:i,l=e.getNewOptionData,f=l===void 0?Zc.getNewOptionData:l,m=e.onCreateOption,y=e.options,x=y===void 0?[]:y,b=e.onChange,h=Jt(e,a8),p=h.getOptionValue,g=p===void 0?e1:p,C=h.getOptionLabel,v=C===void 0?Kf:C,I=h.inputValue,E=h.isLoading,_=h.isMulti,A=h.value,S=h.name,L=w.useMemo(function(){return c(I,ua(A),x,{getOptionValue:g,getOptionLabel:v})?f(I,a(I)):void 0},[a,f,v,g,I,c,x,A]),k=w.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat(Wr(x)):[].concat(Wr(x),[L]):x},[n,o,E,L,x]),D=w.useCallback(function(N,P){if(P.action!=="select-option")return b(N,P);var B=Array.isArray(N)?N:[N];if(B[B.length-1]===L){if(m)m(I);else{var Y=f(I,I),$={action:"create-option",name:S,option:Y};b(Wo(_,[].concat(Wr(ua(A)),[Y]),Y),$)}return}b(N,P)},[f,I,_,S,L,m,b,A]);return oe(oe({},h),{},{options:k,onChange:D})}var c8=w.forwardRef(function(e,t){var n=y1(e),r=yc(n),o=i8(r);return T.createElement(ba,ue({ref:t},o))}),l8=c8;const u8=d.styled(d.Typography)`
658
+ `,K7=({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(U7,{ref:o})},h1=({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}},e8=e=>u.jsx(cn.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})}),g1=()=>({ClearIndicator:f1,DropdownIndicator:e8,IndicatorSeparator:()=>null,Option:d1}),Xo=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=w.useState(!1),c=w.useCallback(b=>{i(!b.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=h1({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(K7,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(J7,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:p1(n.styles,e),components:n.components?n.components:g1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};Xo.getDefaultComponents=g1;const m1="Required Field",t8="Validation Failed";var b1=(e=>(e.DATE="DD/MM/YYYY",e))(b1||{}),n8=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function y1(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,b=Jt(e,n8),y=b.inputValue,x=w.useRef(void 0),m=w.useRef(!1),h=w.useState(Array.isArray(n)?n:void 0),p=nt(h,2),g=p[0],C=p[1],v=w.useState(typeof y<"u"?y:""),I=nt(v,2),E=I[0],_=I[1],A=w.useState(n===!0),S=nt(A,2),L=S[0],k=S[1],D=w.useState(void 0),N=nt(D,2),P=N[0],B=N[1],Y=w.useState([]),$=nt(Y,2),H=$[0],X=$[1],q=w.useState(!1),se=nt(q,2),de=se[0],V=se[1],W=w.useState({}),M=nt(W,2),G=M[0],z=M[1],ne=w.useState(void 0),ae=nt(ne,2),j=ae[0],ee=ae[1],ve=w.useState(void 0),J=nt(ve,2),Pe=J[0],je=J[1];o!==Pe&&(z({}),je(o)),n!==j&&(C(Array.isArray(n)?n:void 0),ee(n)),w.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var ze=w.useCallback(function(Ct,Ge){if(!s)return Ge();var Qe=s(Ct,Ge);Qe&&typeof Qe.then=="function"&&Qe.then(Ge,function(){return Ge()})},[s]);w.useEffect(function(){n===!0&&ze(E,function(Ct){m.current&&(C(Ct||[]),k(!!x.current))})},[]);var Mt=w.useCallback(function(Ct,Ge){var Qe=k6(Ct,Ge,c);if(!Qe){x.current=void 0,_(""),B(""),X([]),k(!1),V(!1);return}if(o&&G[Qe])_(Qe),B(Qe),X(G[Qe]),k(!1),V(!1);else{var wn=x.current={};_(Qe),k(!0),V(!P),ze(Qe,function(Pt){m&&wn===x.current&&(x.current=void 0,k(!1),B(Qe),X(Pt||[]),V(!1),z(Pt?oe(oe({},G),{},Hr({},Qe,Pt)):G))})}},[o,ze,P,G,c]),In=de?[]:E&&P?H:g||[];return oe(oe({},b),{},{options:In,isLoading:L||i,onInputChange:Mt,filterOption:f})}var r8=w.forwardRef(function(e,t){var n=y1(e),r=yc(n);return T.createElement(ba,ue({ref:t},r))}),o8=r8,s8=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],C1=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},Zc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return C1(t,s,o)})||r.some(function(s){return C1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function a8(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?Zc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Zc.isValidNewOption:i,l=e.getNewOptionData,f=l===void 0?Zc.getNewOptionData:l,b=e.onCreateOption,y=e.options,x=y===void 0?[]:y,m=e.onChange,h=Jt(e,s8),p=h.getOptionValue,g=p===void 0?e1:p,C=h.getOptionLabel,v=C===void 0?Kf:C,I=h.inputValue,E=h.isLoading,_=h.isMulti,A=h.value,S=h.name,L=w.useMemo(function(){return c(I,ua(A),x,{getOptionValue:g,getOptionLabel:v})?f(I,a(I)):void 0},[a,f,v,g,I,c,x,A]),k=w.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat(Wr(x)):[].concat(Wr(x),[L]):x},[n,o,E,L,x]),D=w.useCallback(function(N,P){if(P.action!=="select-option")return m(N,P);var B=Array.isArray(N)?N:[N];if(B[B.length-1]===L){if(b)b(I);else{var Y=f(I,I),$={action:"create-option",name:S,option:Y};m(Wo(_,[].concat(Wr(ua(A)),[Y]),Y),$)}return}m(N,P)},[f,I,_,S,L,b,m,A]);return oe(oe({},h),{},{options:k,onChange:D})}var i8=w.forwardRef(function(e,t){var n=y1(e),r=yc(n),o=a8(r);return T.createElement(ba,ue({ref:t},o))}),c8=i8;const l8=d.styled(d.Typography)`
659
659
  display: block;
660
660
  white-space: nowrap;
661
661
  overflow: hidden;
662
662
  text-overflow: ellipsis;
663
- `,d8=(e,t)=>{const n=w.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},x1=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function f8(e){return u.jsx(cn.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})})}const p8=e=>u.jsxs(d.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[u.jsx(d.Stack,{flexShrink:0,children:u.jsx(x1,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),u.jsxs(u8,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function h8({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:m,loadOptions:y,isApiSearchEnabled:x=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:h=!1}=n,{getValue:p,closeMenuOnScroll:g}=h1({options:r,isMulti:f,isScrollTarget:t}),C=(P,B,Y)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,y==null?void 0:y(P,B,Y,l.current)),v=d8((P,B)=>{if(a(P),r.length>0&&!x){const $=r.filter(H=>H&&typeof H=="object"&&"label"in H&&typeof H.label=="string"?H.label.toLowerCase().includes(P.toLowerCase()):!1);B($);return}const Y=$=>{B($),o($)};C==null||C(P,Y,!1)},300),I=(P,B)=>{c(!1),!(B&&"isError"in B&&B.isError)&&o(P)},E=P=>{var B;(B=n.onMenuScrollToBottom)==null||B.call(n,P),b&&y&&!i&&(c(!0),C(s,I,!0))},_=(P,B)=>{var Y;(Y=n.onInputChange)==null||Y.call(n,P,B),B.action==="input-change"&&x&&(a(P),o([]),P||(c(!0),v(P,I)))},A=P=>{var B;a(""),(B=n.onBlur)==null||B.call(n,P)},S=P=>{var B;(B=n.onFocus)==null||B.call(n,P),!i&&h&&(o([]),c(!0),C==null||C(s,I,!1))},L=P=>B=>{var $;const Y=B.find(H=>H.label===P);!n.isMulti&&Y&&(($=n.onChange)==null||$.call(n,Y,{action:"select-option",name:n.name,option:Y})),o(B),c(!1)},k=P=>{c(!0),m==null||m(P,L(P))},D=()=>{c(!0),C==null||C(s,I,!1)},N=m?l8:s8;return u.jsx(N,{...n,menuShouldScrollIntoView:!1,value:n.value?p(n.value):null,isDisabled:n.disabled,loadOptions:v,onMenuScrollToBottom:E,onInputChange:_,onBlur:A,onFocus:S,onMenuOpen:D,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:p1(n.styles,e),components:{ClearIndicator:f1,DropdownIndicator:f8,IndicatorSeparator:()=>null,Option:d1},closeMenuOnScroll:g,...m?{formatCreateLabel:p8,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:k,options:r}:null})}const Jr="table-cell-form-field",ya="60px",Ca="24px",g8=d.styled(d.Box)`
663
+ `,u8=(e,t)=>{const n=w.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},x1=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function d8(e){return u.jsx(cn.DropdownIndicator,{...e,children:u.jsx(d.Icon,{children:e.selectProps.menuIsOpen?u.jsx(d.icons.ArrowDropUp,{}):u.jsx(d.icons.ArrowDropDown,{})})})}const f8=e=>u.jsxs(d.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[u.jsx(d.Stack,{flexShrink:0,children:u.jsx(x1,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),u.jsxs(l8,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function p8({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:b,loadOptions:y,isApiSearchEnabled:x=!1,isInfiniteScrollable:m=!1,loadOptionsOnFocus:h=!1}=n,{getValue:p,closeMenuOnScroll:g}=h1({options:r,isMulti:f,isScrollTarget:t}),C=(P,B,Y)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,y==null?void 0:y(P,B,Y,l.current)),v=u8((P,B)=>{if(a(P),r.length>0&&!x){const $=r.filter(H=>H&&typeof H=="object"&&"label"in H&&typeof H.label=="string"?H.label.toLowerCase().includes(P.toLowerCase()):!1);B($);return}const Y=$=>{B($),o($)};C==null||C(P,Y,!1)},300),I=(P,B)=>{c(!1),!(B&&"isError"in B&&B.isError)&&o(P)},E=P=>{var B;(B=n.onMenuScrollToBottom)==null||B.call(n,P),m&&y&&!i&&(c(!0),C(s,I,!0))},_=(P,B)=>{var Y;(Y=n.onInputChange)==null||Y.call(n,P,B),B.action==="input-change"&&x&&(a(P),o([]),P||(c(!0),v(P,I)))},A=P=>{var B;a(""),(B=n.onBlur)==null||B.call(n,P)},S=P=>{var B;(B=n.onFocus)==null||B.call(n,P),!i&&h&&(o([]),c(!0),C==null||C(s,I,!1))},L=P=>B=>{var $;const Y=B.find(H=>H.label===P);!n.isMulti&&Y&&(($=n.onChange)==null||$.call(n,Y,{action:"select-option",name:n.name,option:Y})),o(B),c(!1)},k=P=>{c(!0),b==null||b(P,L(P))},D=()=>{c(!0),C==null||C(s,I,!1)},N=b?c8:o8;return u.jsx(N,{...n,menuShouldScrollIntoView:!1,value:n.value?p(n.value):null,isDisabled:n.disabled,loadOptions:v,onMenuScrollToBottom:E,onInputChange:_,onBlur:A,onFocus:S,onMenuOpen:D,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:p1(n.styles,e),components:{ClearIndicator:f1,DropdownIndicator:d8,IndicatorSeparator:()=>null,Option:d1},closeMenuOnScroll:g,...b?{formatCreateLabel:f8,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:k,options:r}:null})}const Jr="table-cell-form-field",ya="60px",Ca="24px",h8=d.styled(d.Box)`
664
664
  width: 100%;
665
- `,m8=d.styled(d.Box)`
665
+ `,g8=d.styled(d.Box)`
666
666
  width: 100%;
667
667
  overflow-x: auto;
668
- `,b8=d.styled(d.Box)`
668
+ `,m8=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
- `,y8=d.styled(d.Stack)`
675
+ `,b8=d.styled(d.Stack)`
676
676
  margin-top: 16px;
677
677
  flex-direction: row;
678
678
  justify-content: space-between;
@@ -688,7 +688,7 @@ 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
- `,C8=d.styled(v1)`
691
+ `,y8=d.styled(v1)`
692
692
  --cell-padding: 10px ${Ca};
693
693
  border-bottom: 1px solid var(--border-color);
694
694
  `,Xc=d.styled(d.Box)`
@@ -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
- `,x8=d.styled(E1)`
721
+ `,C8=d.styled(E1)`
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
- `,v8=d.styled(d.Box)`
743
+ `,x8=d.styled(d.Box)`
744
744
  margin-left: auto;
745
- `,E8=d.styled(d.Stack)`
745
+ `,v8=d.styled(d.Stack)`
746
746
  box-sizing: content-box;
747
747
  padding: 4px 0;
748
748
  flex-direction: row;
@@ -752,25 +752,25 @@ 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
- `,I8=d.styled(d.DatePicker)`
755
+ `,E8=d.styled(d.DatePicker)`
756
756
  &.${Jr} .MuiInputBase-root {
757
757
  height: ${ya};
758
758
  border: 0;
759
759
  padding-left: ${Ca};
760
760
  }
761
- `;function w8(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(I8,{inputFormat:e.inputFormat?e.inputFormat:b1.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 _8=d.styled(d.Checkbox)`
761
+ `;function I8(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(E8,{inputFormat:e.inputFormat?e.inputFormat:b1.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 w8=d.styled(d.Checkbox)`
762
762
  &.${Jr} {
763
763
  --v-margin: calc((${ya} - 36px) / 2);
764
764
  --h-margin: calc((100% - 36px) / 2);
765
765
  margin: var(--v-margin) var(--h-margin);
766
766
  }
767
- `,S8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(_8,{onChange:o,onFocus:t,onBlur:n,...r})},I1=({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,A8=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),w1=250,ur="__id",zo={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:w1,arithmeticOperation:[]},xa=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=zo.defaultNumberOfRows,fixedRows:a=zo.fixedRows,cellWidth:i=zo.cellWidth,arithmeticOperation:c=zo.arithmeticOperation}=zo,fetchConfig:l={},createConfig:f={},stackIndex:m,onChange:y=()=>{},onFocus:x,onValidationError:b})=>{const h=t??[],p=(o==null?void 0:o.validations)??{},g=w.useRef(),C=w.useRef({}),[v,I]=w.useState({}),{colsLength:E,colsTemplate:_,colWidth:A}=w.useMemo(()=>{let V=0,W="";for(const M of r){let G=M.cols?Number(M.cols):1;isNaN(G)&&(G=1),V+=G,W+=`${M.cols??G}fr `}return a||(V+=.5,W+="0.5fr"),{colsLength:V,colsTemplate:W.trim(),colWidth:`${isNaN(i)?w1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=w.useMemo(()=>{const V={},W={};for(const M of r){if(!M.valueConfig)continue;W[M.name]=M.valueConfig;const G=M.valueConfig.columnNames;for(const z of G)V[z]||(V[z]=[]),V[z].push(M.name)}return{fieldDependency:V,fieldConfigs:W}},[r]);w.useEffect(()=>{if(t)return;const V=[];for(let W=0;W<s;W++){const M=H0();V.push({[ur]:M})}y(V)},[t,y,s]);const k=()=>{const V=Object.entries(C.current).filter(W=>!!W[1])[0];return(V==null?void 0:V[1])??""},D=()=>{const V={[ur]:H0()};y([...h,V])},N=V=>{const W=h.filter(M=>M[ur]!==V);y(W),I(M=>({...M,[V]:{}}));for(const M in C.current)M.startsWith(`${V}.`)&&delete C.current[M];b==null||b(e,k())},P=(V,{columnNames:W=[],operationType:M})=>{const G=W.map(z=>V[z]);return""+W0(G,M)},B=(V,W)=>{const M=h.map(G=>V!==G[ur]?G:{...G,...W});y(M)},Y=(V,W)=>{const M=h.map(G=>{if(V!==G[ur])return G;const z={...G};for(const ne of W)delete z[ne];return z});y(M)},$=(V,W,M,G)=>{var ae;const z=((ae=G==null?void 0:G.target)==null?void 0:ae.value)??"",ne={...M,[W]:z};if(S[W])for(const j of S[W]){const ee=P(ne,L[j]);ne[j]=ee}B(V,ne)},H=(V,W,M)=>{B(V,{[W]:M})},X=(V,W,M,G)=>{if(M&&typeof M=="object"&&"value"in M&&typeof M.value=="string"&&typeof G.name<"u"){const z="prefillValues"in M&&M.prefillValues,ne={...W,[G.name]:M.value,...z};for(const ae in ne)if(S[ae])for(const j of S[ae]){const ee=P(ne,L[j]);ne[j]=ee}B(V,ne)}(G==null?void 0:G.action)==="clear"&&G.name&&Y(V,[G.name])},q=(V,W,M)=>{B(V,{[W]:(M==null?void 0:M.toISOString())??""})},se=(V,W,M,G)=>{G&&I(z=>{const ne=z[V]??{};return{...z,[V]:{...ne,[W]:M}}}),C.current={...C.current,[`${V}.${W}`]:typeof M=="string"?M:""},b==null||b(e,k())},de=V=>g.current===V;return u.jsxs(g8,{children:[u.jsx(m8,{ref:g,children:u.jsxs(b8,{gridColumns:_,minWidth:`calc( ${E} * ${A} )`,children:[u.jsx(C8,{children:r.map(({name:V,label:W,isRequired:M})=>u.jsx(Xc,{children:u.jsx(I1,{label:W,isRequired:M})},V))}),h.map(({[ur]:V,...W})=>u.jsxs(v1,{children:[r.map(({name:M,key:G,...z})=>{var ne;return u.jsx(Xc,{hasError:!!((ne=v==null?void 0:v[V])!=null&&ne[M]),children:u.jsx(dr,{name:M,value:W[M],...z,className:Jr,label:"",hideHelperText:!0,validation:p==null?void 0:p[M],onFocus:x,inputChangeHandler:ae=>$(V,M,W,ae),checkboxChangeHandler:(...ae)=>H(V,M,ae[1]),selectChangeHandler:(...ae)=>X(V,W,...ae),dateChangeHandler:(ae,j)=>q(V,ae,j),onValidationError:(...ae)=>se(V,...ae),fetchConfig:l==null?void 0:l[M],createConfig:f==null?void 0:f[M],isScrollTarget:de,...m?{menuPortalTarget:document.body,stackIndex:m}:null})},M??G)}),a?null:u.jsx(Xc,{children:u.jsx(d.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:u.jsx(E1,{onClick:()=>N(V),children:u.jsx(A8,{})})})})]},V))]})}),u.jsxs(y8,{children:[a?null:u.jsxs(x8,{onClick:D,children:[u.jsx(x1,{}),u.jsx(d.Typography,{children:"Add Line"})]}),c.length?u.jsx(v8,{children:c.map(({label:V,columnName:W,operationType:M,prefix:G="",prefixKey:z,suffix:ne="",suffixKey:ae})=>u.jsxs(E8,{children:[u.jsx(d.Typography,{fontWeight:500,children:V}),u.jsxs(d.Typography,{children:[u.jsxs("span",{children:[n[z]??G," "]}),u.jsx("span",{children:W0(h.map(j=>j[W]),M)}),u.jsx("span",{children:n[ae]??ne})]})]},V))}):null]})]})};xa.ROW_ID=ur;const T8=d.styled(d.Box)`
767
+ `,_8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(w8,{onChange:o,onFocus:t,onBlur:n,...r})},I1=({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,S8=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),w1=250,ur="__id",zo={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:w1,arithmeticOperation:[]},xa=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=zo.defaultNumberOfRows,fixedRows:a=zo.fixedRows,cellWidth:i=zo.cellWidth,arithmeticOperation:c=zo.arithmeticOperation}=zo,fetchConfig:l={},createConfig:f={},stackIndex:b,onChange:y=()=>{},onFocus:x,onValidationError:m})=>{const h=t??[],p=(o==null?void 0:o.validations)??{},g=w.useRef(),C=w.useRef({}),[v,I]=w.useState({}),{colsLength:E,colsTemplate:_,colWidth:A}=w.useMemo(()=>{let V=0,W="";for(const M of r){let G=M.cols?Number(M.cols):1;isNaN(G)&&(G=1),V+=G,W+=`${M.cols??G}fr `}return a||(V+=.5,W+="0.5fr"),{colsLength:V,colsTemplate:W.trim(),colWidth:`${isNaN(i)?w1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=w.useMemo(()=>{const V={},W={};for(const M of r){if(!M.valueConfig)continue;W[M.name]=M.valueConfig;const G=M.valueConfig.columnNames;for(const z of G)V[z]||(V[z]=[]),V[z].push(M.name)}return{fieldDependency:V,fieldConfigs:W}},[r]);w.useEffect(()=>{if(t)return;const V=[];for(let W=0;W<s;W++){const M=H0();V.push({[ur]:M})}y(V)},[t,y,s]);const k=()=>{const V=Object.entries(C.current).filter(W=>!!W[1])[0];return(V==null?void 0:V[1])??""},D=()=>{const V={[ur]:H0()};y([...h,V])},N=V=>{const W=h.filter(M=>M[ur]!==V);y(W),I(M=>({...M,[V]:{}}));for(const M in C.current)M.startsWith(`${V}.`)&&delete C.current[M];m==null||m(e,k())},P=(V,{columnNames:W=[],operationType:M})=>{const G=W.map(z=>V[z]);return""+W0(G,M)},B=(V,W)=>{const M=h.map(G=>V!==G[ur]?G:{...G,...W});y(M)},Y=(V,W)=>{const M=h.map(G=>{if(V!==G[ur])return G;const z={...G};for(const ne of W)delete z[ne];return z});y(M)},$=(V,W,M,G)=>{var ae;const z=((ae=G==null?void 0:G.target)==null?void 0:ae.value)??"",ne={...M,[W]:z};if(S[W])for(const j of S[W]){const ee=P(ne,L[j]);ne[j]=ee}B(V,ne)},H=(V,W,M)=>{B(V,{[W]:M})},X=(V,W,M,G)=>{if(M&&typeof M=="object"&&"value"in M&&typeof M.value=="string"&&typeof G.name<"u"){const z="prefillValues"in M&&M.prefillValues,ne={...W,[G.name]:M.value,...z};for(const ae in ne)if(S[ae])for(const j of S[ae]){const ee=P(ne,L[j]);ne[j]=ee}B(V,ne)}(G==null?void 0:G.action)==="clear"&&G.name&&Y(V,[G.name])},q=(V,W,M)=>{B(V,{[W]:(M==null?void 0:M.toISOString())??""})},se=(V,W,M,G)=>{G&&I(z=>{const ne=z[V]??{};return{...z,[V]:{...ne,[W]:M}}}),C.current={...C.current,[`${V}.${W}`]:typeof M=="string"?M:""},m==null||m(e,k())},de=V=>g.current===V;return u.jsxs(h8,{children:[u.jsx(g8,{ref:g,children:u.jsxs(m8,{gridColumns:_,minWidth:`calc( ${E} * ${A} )`,children:[u.jsx(y8,{children:r.map(({name:V,label:W,isRequired:M})=>u.jsx(Xc,{children:u.jsx(I1,{label:W,isRequired:M})},V))}),h.map(({[ur]:V,...W})=>u.jsxs(v1,{children:[r.map(({name:M,key:G,...z})=>{var ne;return u.jsx(Xc,{hasError:!!((ne=v==null?void 0:v[V])!=null&&ne[M]),children:u.jsx(dr,{name:M,value:W[M],...z,className:Jr,label:"",hideHelperText:!0,validation:p==null?void 0:p[M],onFocus:x,inputChangeHandler:ae=>$(V,M,W,ae),checkboxChangeHandler:(...ae)=>H(V,M,ae[1]),selectChangeHandler:(...ae)=>X(V,W,...ae),dateChangeHandler:(ae,j)=>q(V,ae,j),onValidationError:(...ae)=>se(V,...ae),fetchConfig:l==null?void 0:l[M],createConfig:f==null?void 0:f[M],isScrollTarget:de,...b?{menuPortalTarget:document.body,stackIndex:b}:null})},M??G)}),a?null:u.jsx(Xc,{children:u.jsx(d.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:u.jsx(E1,{onClick:()=>N(V),children:u.jsx(S8,{})})})})]},V))]})}),u.jsxs(b8,{children:[a?null:u.jsxs(C8,{onClick:D,children:[u.jsx(x1,{}),u.jsx(d.Typography,{children:"Add Line"})]}),c.length?u.jsx(x8,{children:c.map(({label:V,columnName:W,operationType:M,prefix:G="",prefixKey:z,suffix:ne="",suffixKey:ae})=>u.jsxs(v8,{children:[u.jsx(d.Typography,{fontWeight:500,children:V}),u.jsxs(d.Typography,{children:[u.jsxs("span",{children:[n[z]??G," "]}),u.jsx("span",{children:W0(h.map(j=>j[W]),M)}),u.jsx("span",{children:n[ae]??ne})]})]},V))}):null]})]})};xa.ROW_ID=ur;const A8=d.styled(d.Box)`
768
768
  box-sizing: border-box;
769
769
  &:not(:has(.${Jr})) {
770
770
  transform: translate(0, 5px);
771
771
  padding-bottom: 5px;
772
772
  }
773
- `,L8=d.styled(d.TextField)`
773
+ `,T8=d.styled(d.TextField)`
774
774
  &.${Jr} {
775
775
  height: ${ya};
776
776
  position: relative;
@@ -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
- `,O8=({inputProps:e,...t})=>{const n=r=>{r.currentTarget&&r.currentTarget.blur(),r.stopPropagation()};return u.jsx(T8,{children:u.jsx(L8,{...t,inputProps:{onWheel:n,...e}})})},F8=d.styled(O8)`
793
+ `,L8=({inputProps:e,...t})=>{const n=r=>{r.currentTarget&&r.currentTarget.blur(),r.stopPropagation()};return u.jsx(A8,{children:u.jsx(T8,{...t,inputProps:{onWheel:n,...e}})})},O8=d.styled(L8)`
794
794
  & .MuiFormHelperText-root {
795
795
  position: absolute;
796
796
  bottom: -24px;
@@ -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
- `,D8=d.styled(d.Box)`
932
+ `,F8=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
- `,k8=d.styled(d.Box)`
946
+ `,D8=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
- `,N8=d.styled(d.Stack)`
958
+ `,k8=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
- `,R8=d.styled(d.IconButton)`
989
+ `,N8=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
- `,M8=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),dr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:a,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:f,checkboxChangeHandler:m,...y})=>{const{validation:x,helperText:b,id:h,label:p,name:g,type:C,validateOnBlur:v=!0,validateOnChange:I=!0,isRequired:E,labelSpacing:_=1,showGlobalLoader:A=!1,hideHelperText:S=!1,meta:{isExpandable:L=C==="table",isExpanded:k=!0}={}}=y,[D,N]=w.useState(!1),[P,B]=w.useState(""),[Y,$]=w.useState(k);w.useEffect(()=>{D||X(y.value,!1)},[D,y.value]);const H=j=>{var ee;j&&!D&&N(!0),(ee=y.onFocus)==null||ee.call(y,j)};function X(j,ee=!0,ve){let J="";if((x!=null&&x.isRequired||E)&&(J=j?"":m1,!j&&typeof(x==null?void 0:x.isRequired)=="function")){const je=x.isRequired(j);je&&typeof je=="boolean"?J=m1:je&&(J=je)}let Pe={id:h,name:g,label:p};if(y.type==="date"?Pe={...Pe,disableFuture:y.disableFuture,disablePast:y.disablePast}:y.type==="number"?Pe={...Pe,min:y.min,max:y.max}:y.type==="text"&&y.multiline&&(Pe={...Pe,maxCharacters:y.maxCharacters}),j&&!J&&(x!=null&&x.validate)){const je=x.validate(j,{...Pe,...ve});typeof je=="boolean"&&je===!1?J=n8:typeof je=="string"&&(J=je)}ee&&B(J),a==null||a(g,J,ee)}const q=j=>{var ee;D||N(!0),(ee=y.onBlur)==null||ee.call(y,j),D&&v&&X(y.value)},se=()=>S?null:y.helperText?u.jsx(S1,{children:b}):D&&P?u.jsx(S1,{className:"helper--error",children:P}):null,de=j=>{j&&!D&&N(!0),i==null||i(j),D&&I&&X(j.target.value)},V=(j,ee)=>{j&&!D&&N(!0),m==null||m(j,ee),D&&I&&X(ee)},W=(j,ee)=>{c==null||c(j,ee),j&&!D&&N(!0),j&&typeof j=="object"&&"value"in j&&D&&I&&X(j.value)},M=(j,ee)=>{l==null||l(g,j,ee),j&&!D&&N(!0),D&&I&&X(j)},G=j=>{f==null||f(g,j)},z=(j,ee)=>{D&&(a==null||a(j,ee),B(typeof ee=="string"?ee:""))},ne=j=>{$(ee=>!ee)},ae=j=>{if(A)return u.jsx(d.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(j.type){case"select":return u.jsx(_1,{children:u.jsx(Xo,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${P&&D?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:W,onFocus:H,menuPortalTarget:n})});case"async-select":return u.jsx(_1,{children:u.jsx(h8,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${P&&D?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:W,onFocus:H,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return u.jsx(w8,{...j,label:void 0,onBlur:q,onFocus:H,onChange:M,error:!!(P&&D)});case"table":return u.jsx(xa,{...j,value:j.value,onChange:G,onFocus:H,onValidationError:z,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return u.jsx(S8,{...j,onChange:V,onFocus:H,onBlur:q});default:return u.jsx(F8,{variant:"outlined",fullWidth:!0,id:h,...j,value:j.value,label:void 0,onBlur:q,onChange:de,onFocus:H,error:!!(P&&D),inputProps:{type:j.type,min:j.min,max:j.max,...j.inputProps}})}};return u.jsxs(N8,{spacing:_,useFlexGap:!0,...L&&{className:`expandable ${Y?"open":"close"}`},children:[u.jsx(I1,{label:p,htmlFor:h,isRequired:!!(x!=null&&x.isRequired)||E,prefixNode:L?u.jsx(k8,{children:u.jsx(M8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>ne()}}),u.jsxs(D8,{className:"input-wrapper",children:[u.jsx(d.Tooltip,{title:y.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:ae(y)}),r!=null&&r.icon?u.jsx(d.Tooltip,{title:r.toolTipText,placement:"bottom",children:u.jsx(R8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),se()]})},P8=d.styled(d.Stack)`
996
+ `,R8=e=>T.createElement("svg",{width:"8px",height:"8px",viewBox:"8.59 6 7.41 12",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"})),dr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:a,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:f,checkboxChangeHandler:b,...y})=>{const{validation:x,helperText:m,id:h,label:p,name:g,type:C,validateOnBlur:v=!0,validateOnChange:I=!0,isRequired:E,labelSpacing:_=1,showGlobalLoader:A=!1,hideHelperText:S=!1,meta:{isExpandable:L=C==="table",isExpanded:k=!0}={}}=y,[D,N]=w.useState(!1),[P,B]=w.useState(""),[Y,$]=w.useState(k);w.useEffect(()=>{D||X(y.value,!1)},[D,y.value]);const H=j=>{var ee;j&&!D&&N(!0),(ee=y.onFocus)==null||ee.call(y,j)};function X(j,ee=!0,ve){let J="";if((x!=null&&x.isRequired||E)&&(J=j?"":m1,!j&&typeof(x==null?void 0:x.isRequired)=="function")){const je=x.isRequired(j);je&&typeof je=="boolean"?J=m1:je&&(J=je)}let Pe={id:h,name:g,label:p};if(y.type==="date"?Pe={...Pe,disableFuture:y.disableFuture,disablePast:y.disablePast}:y.type==="number"?Pe={...Pe,min:y.min,max:y.max}:y.type==="text"&&y.multiline&&(Pe={...Pe,maxCharacters:y.maxCharacters}),j&&!J&&(x!=null&&x.validate)){const je=x.validate(j,{...Pe,...ve});typeof je=="boolean"&&je===!1?J=t8:typeof je=="string"&&(J=je)}ee&&B(J),a==null||a(g,J,ee)}const q=j=>{var ee;D||N(!0),(ee=y.onBlur)==null||ee.call(y,j),D&&v&&X(y.value)},se=()=>S?null:y.helperText?u.jsx(S1,{children:m}):D&&P?u.jsx(S1,{className:"helper--error",children:P}):null,de=j=>{j&&!D&&N(!0),i==null||i(j),D&&I&&X(j.target.value)},V=(j,ee)=>{j&&!D&&N(!0),b==null||b(j,ee),D&&I&&X(ee)},W=(j,ee)=>{c==null||c(j,ee),j&&!D&&N(!0),j&&typeof j=="object"&&"value"in j&&D&&I&&X(j.value)},M=(j,ee)=>{l==null||l(g,j,ee),j&&!D&&N(!0),D&&I&&X(j)},G=j=>{f==null||f(g,j)},z=(j,ee)=>{D&&(a==null||a(j,ee),B(typeof ee=="string"?ee:""))},ne=j=>{$(ee=>!ee)},ae=j=>{if(A)return u.jsx(d.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(j.type){case"select":return u.jsx(_1,{children:u.jsx(Xo,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${P&&D?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:W,onFocus:H,menuPortalTarget:n})});case"async-select":return u.jsx(_1,{children:u.jsx(p8,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${P&&D?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:W,onFocus:H,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return u.jsx(I8,{...j,label:void 0,onBlur:q,onFocus:H,onChange:M,error:!!(P&&D)});case"table":return u.jsx(xa,{...j,value:j.value,onChange:G,onFocus:H,onValidationError:z,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return u.jsx(_8,{...j,onChange:V,onFocus:H,onBlur:q});default:return u.jsx(O8,{variant:"outlined",fullWidth:!0,id:h,...j,value:j.value,label:void 0,onBlur:q,onChange:de,onFocus:H,error:!!(P&&D),inputProps:{type:j.type,min:j.min,max:j.max,...j.inputProps}})}};return u.jsxs(k8,{spacing:_,useFlexGap:!0,...L&&{className:`expandable ${Y?"open":"close"}`},children:[u.jsx(I1,{label:p,htmlFor:h,isRequired:!!(x!=null&&x.isRequired)||E,prefixNode:L?u.jsx(D8,{children:u.jsx(R8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>ne()}}),u.jsxs(F8,{className:"input-wrapper",children:[u.jsx(d.Tooltip,{title:y.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:ae(y)}),r!=null&&r.icon?u.jsx(d.Tooltip,{title:r.toolTipText,placement:"bottom",children:u.jsx(N8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),se()]})},M8=d.styled(d.Stack)`
997
997
  & .authform__section-title {
998
998
  margin-top: 32px;
999
999
  margin-bottom: -12px;
1000
1000
  }
1001
- `,j8=d.styled(d.Stack)`
1001
+ `,P8=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
- `,B8=d.styled(d.Box)`
1009
+ `,j8=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
- `,A1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:l,onValidationError:f,stackIndex:m,sectionSpacing:y=3,fieldsSpacing:x=3,labelSpacing:b=1,fetchConfig:h,createConfig:p,showGlobalLoader:g=!1,cols:C=1})=>{const v=I=>(E,_)=>{n==null||n(E,_,I)};return u.jsx(P8,{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(j8,{useFlexGap:!0,spacing:x,cols:C,children:_.map(S=>{var L;return i&&typeof i=="object"&&S.name in i&&i[S.name]===!1||S.hideInUI?null:u.jsx(B8,{cols:S.cols??1,children:u.jsx(dr,{value:c==null?void 0:c[S.name],data:c,...S,stackIndex:m,selectChangeHandler:v(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:h==null?void 0:h[S.name],createConfig:p==null?void 0:p[S.name],showGlobalLoader:g})},((L=h==null?void 0:h[S.name])==null?void 0:L.key)||S.name)})})]},I))})},V8=d.styled(d.Box)`
1015
+ `,A1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:l,onValidationError:f,stackIndex:b,sectionSpacing:y=3,fieldsSpacing:x=3,labelSpacing:m=1,fetchConfig:h,createConfig:p,showGlobalLoader:g=!1,cols:C=1})=>{const v=I=>(E,_)=>{n==null||n(E,_,I)};return u.jsx(M8,{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(P8,{useFlexGap:!0,spacing:x,cols:C,children:_.map(S=>{var L;return i&&typeof i=="object"&&S.name in i&&i[S.name]===!1||S.hideInUI?null:u.jsx(j8,{cols:S.cols??1,children:u.jsx(dr,{value:c==null?void 0:c[S.name],data:c,...S,stackIndex:b,selectChangeHandler:v(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:m,fetchConfig:h==null?void 0:h[S.name],createConfig:p==null?void 0:p[S.name],showGlobalLoader:g})},((L=h==null?void 0:h[S.name])==null?void 0:L.key)||S.name)})})]},I))})},B8=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
- `,G8=e=>T.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),T.createElement("g",{clipPath:"url(#clip0_7787_114457)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_7787_114457"},T.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),H8=({aspectRatio:e="auto",...t})=>{const[n,r]=w.useState(!1);return n?null:u.jsxs(V8,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(G8,{className:"play-icon"})]})},T1=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}})),zc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},W8=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],Yo=(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}},{}):{},Yc=({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=qy(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=$y(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=Qy();return}if(n.type==="text"&&n.limit){t[n.name].validate=mc();return}if(n.type==="table"){const l=Yc({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=Yy(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},va={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[xa.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},Jo=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return va.isMultiSelect(o)?s=o.map(a=>a.value):va.isTable(o)?s=o.map(({...i})=>(delete i[xa.ROW_ID],i)).filter(i=>Object.keys(i).length>0):va.isSelect(o)?s=o.value:va.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),Z8=(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]}))},L1=(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=L1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},fr="/v1/api",X8=`${fr}/connectors/conversation/:conversationId/metadata`,z8=`${fr}/connectors/forms/:formId/field/:fieldName/data`,Y8=`${fr}/connectors/form/:formId`,J8=`${fr}/connectors/forms/:id/link`,q8=`${fr}/connectors/forms/:id/preview`,$8=`${fr}/connectors/conversation/:conversationId/selected-email`,Q8=`${fr}/connectors/app-cf-values`,U8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:lt(`${z8}?${r.toString()}`,e),method:Re.POST,data:t})},K8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:lt(`${Y8}?${r.toString()}`,e),method:Re.POST,data:t})},ex=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:`${q8.replace(":id",e)}?${r.toString()}`,method:Re.POST,data:{args:t}})},tx="https://avatars.githubusercontent.com/u/62397590",O1={optionsMap:null,createOptionApi:K.IDLE,dropdownOptionsApis:K.IDLE,previewCardData:null,previewCardApiStatus:K.IDLE,selectedSuggestionType:"basic"},F1=pc({name:"commonSlice",initialState:O1,reducers:{resetState:()=>O1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=K.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(Ea.pending,t=>{t.createOptionApi=K.LOADING}).addCase(Ea.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(Ea.rejected,t=>{t.createOptionApi=K.FAILED}).addCase(pr.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(pr.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(pr.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(qr.pending,t=>{t.previewCardApiStatus=K.LOADING}).addCase(qr.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=K.IDLE}).addCase(qr.rejected,t=>{t.previewCardApiStatus=K.FAILED})}}),Ea=Yt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var h,p,g;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,m=zc(c||{},s,r),{common:y}=t(),{options:x=[],...b}=((h=y.optionsMap)==null?void 0:h[m])||{};try{const C=await K8({fieldName:r,formId:a},{args:l,conversation_id:i});if(!C||!("data"in C)||!("output_variables"in C.data)||!("external_resource_id"in C.data.output_variables))throw C;const v=C.data.output_variables,{external_resource_id:I,...E}=v,A=[{label:o,value:I,prefillValues:E},...x],S=Z0(A,L=>L.value);return f==null||f(S),{optionsList:S,key:m,...b}}catch(C){f==null||f(x);const v=C,I=(p=v==null?void 0:v.response)==null?void 0:p.data,E=typeof I=="string"?I:(I==null?void 0:I.message)||yn;return _e({message:E,type:qe}),n((g=v==null?void 0:v.response)==null?void 0:g.status)}}),pr=Yt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:m}=e,y=zc(c||{},o,r),{common:x}=t();let b=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(b=a.meta.showAvatar);const h=((A=x.optionsMap)==null?void 0:A[y])||{},p=!e.isScrollToBottomEvent&&(!h||s!==h.searchTerm),g=p?[]:h.options||[],C=p?!0:h.hasMore??!0,v=p?0:h.currentPage??0,{enabled:I,limit:E}=f,_=E||10;try{let k;const D=m==null?void 0:m.signal,N=I?{pageNumber:v+1,searchTerm:s,limit:_,enabled:I}:null;if(C&&(k=await U8({fieldName:r,formId:o},{pagination:N||{},args:c,interfaceId:l})),D!=null&&D.aborted)throw D.reason;if(!k||!k.data||!("data"in k.data)||!Array.isArray(k.data.data)||!k.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 B=k.data.data.map(X=>b?{...X,avatarUrl:X.avatarUrl||tx}:(delete X.avatarUrl,X)),Y=[...g,...B],$=I?B.length>=_:!1,H=Z0(Y,X=>X.value);return i==null||i(H),{optionsList:H,fieldName:r,formId:o,searchTerm:s,currentPage:v+1,hasMore:$,key:y}}catch(k){const{common:D}=t(),N=((L=D.optionsMap)==null?void 0:L[y])||{};return i==null||i(N.options??[]),n(k)}},{condition:(e,{getState:t})=>{var m;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=zc(a||{},r,n),{common:c}=t(),l=(m=c.optionsMap)==null?void 0:m[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}}),qr=Yt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await ex(e,t,n),i=a==null?void 0:a.data;return i?(r&&_e({message:k0,type:rn}),{data:Dd(i)}):(r&&_e({message:D0,type:qe}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:lA,resetPreviewCardData:nx,setSelectedSuggestionType:rx}=F1.actions,ox=F1.reducer,$r="/v1/api",sx=`${$r}/connectors/forms/list`,ax=`${$r}/connectors/cards/:id/unlink`,ix=`${$r}/connectors/forms/:id/link`,cx=`${$r}/connectors/form/:formId`,lx=`${$r}/connectors/forms/:formId/data`,ux=`${$r}/connectors/forms/:formId/get_forms_custom_fields`,dx=({inboxIds:e,channelType:t,conversationId:n,connectorId:r})=>{const o=new URLSearchParams;return e.forEach(s=>o.append("inbox_ids",s)),o.append("channel_type",t),o.append("conversation_id",String(n)),r&&o.append("connector_id",String(r)),we({url:`${sx}?${o.toString()}`,method:Re.GET})},D1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:lt(`${cx}?${r.toString()}`,e),method:Re.POST,data:t})},fx=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),we({url:`${ax.replace(":id",e)}?${o.toString()}`,method:Re.POST,data:{externalResourceId:n,conversationId:r}})},px=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),we({url:`${ix.replace(":id",e)}?${s.toString()}`,method:Re.POST,data:{externalResourceId:t,conversationId:r}})},hx=(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),we({url:`${lx.replace(":formId",e)}?${s.toString()}`,method:Re.GET})},gx="Error in previewing the card",k1="Link format isn't recognized. Please check that you've entered a valid URL",mx="Item already linked",bx="Card linked successfully",yx="Error in linking the card",Cx="New card created",xx="Card creation failed",vx="Create and link objects from different apps to this conversation",Ex="Are you sure you want to change the primary object?",Ix="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",wx="Are you sure you want to leave?",_x=`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?`,Sx="Select an object to create",Ax="Select an object to link",N1="Select object",Tx="Paste URL or ID",Lx="Object ID/Link",Ox="Card updated",Fx="Card updation failed",R1=3,Jc=(e,t)=>{var r,o,s,a,i,c,l,f,m,y,x,b,h;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=(m=e.validations)==null?void 0:m.range)==null?void 0:y.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((x=e.validations)==null?void 0:x.maxRows)||5,limit:(b=e.validations)==null?void 0:b.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(h=e.validations)==null?void 0:h.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},M1=pc({name:"writeCapability",initialState:N0,reducers:{resetState:()=>N0,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(Ia.pending,t=>{t.objectListApiStatus=K.LOADING}).addCase(Ia.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(Ia.rejected,t=>{t.objectListApiStatus=K.FAILED}).addCase(pr.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(pr.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(pr.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(wa.pending,t=>{t.createFormApiStatus=K.LOADING}).addCase(wa.fulfilled,t=>{t.createFormApiStatus=K.IDLE}).addCase(wa.rejected,t=>{t.createFormApiStatus=K.FAILED}).addCase(Aa.pending,t=>{t.linkCardApiStatus=K.LOADING}).addCase(Aa.fulfilled,t=>{t.linkCardApiStatus=K.IDLE}).addCase(Aa.rejected,t=>{t.linkCardApiStatus=K.FAILED}).addCase(Sa.pending,t=>{t.unlinkCardApiStatus=K.LOADING}).addCase(Sa.fulfilled,t=>{t.unlinkCardApiStatus=K.IDLE}).addCase(Sa.rejected,t=>{t.unlinkCardApiStatus=K.FAILED}).addCase(_a.pending,t=>{t.updateFormApiStatus=K.LOADING}).addCase(_a.fulfilled,t=>{t.updateFormApiStatus=K.IDLE}).addCase(_a.rejected,t=>{t.updateFormApiStatus=K.FAILED}).addCase(Ta.pending,t=>{t.currentResourceDetailsApiStatus=K.LOADING}).addCase(Ta.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=K.IDLE}).addCase(Ta.rejected,t=>{t.currentResourceDetailsApiStatus=K.FAILED})}}),Ia=Yt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o,connectorId:s}=e,a=await dx({inboxIds:t,channelType:n,conversationId:r,connectorId:s});if(!a||!a.data||!("formsList"in a.data)||!Array.isArray(a.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const i=a.data.formsList,c={},l=[],f=[],m=[],y=[],x=[],b={},h={};return i==null||i.forEach(p=>{var C,v;if(p.expandedView&&!o)return;const g={...p};"fieldList"in g&&delete g.fieldList,h[p.id]=g,c[p.id]||(c[p.id]={}),b[p.id]||(b[p.id]=[]),p.type==="create"&&p.authenticated?(l.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!f.includes(p.connectorName)&&f.push(p.connectorName)):p.type==="link"&&p.authenticated?m.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?y.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&x.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(C=p.fieldList)==null||C.sort((I,E)=>I.priority-E.priority),(v=p.fieldList)==null||v.forEach(I=>{const E=Jc(I);if(E.columns&&(E.columns=E.columns.map(_=>Jc(_,{loadOptionsOnFocus:!0,defaultOptions:!1}))),b[p.id]=[...b[p.id],E],I.interfaceDetails&&(I.interfaceDetails.args||I.interfaceDetails.optionalArgs)){const _={...I.interfaceDetails.args,...I.interfaceDetails.optionalArgs};Object.values(_).forEach(A=>{c[p.id][A]?c[p.id][A]=[...c[p.id][A],I.name]:c[p.id][A]=[I.name]})}})}),{createObjectList:l,createObjectConnectorNamesList:f,linkObjectList:m,editObjectList:y,searchObjectList:x,formFields:b,objectDict:h,dependentFieldsMap:c}}),wa=Yt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await D1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),_e({message:Cx,type:rn})}catch(l){const f=l,m=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(m==null?void 0:m.message)??xx;return o==null||o(l),_e({message:y,type:qe}),t(l)}}),_a=Yt("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 D1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),_e({message:Ox,type:rn})}catch(f){return o==null||o(f),_e({message:Fx,type:qe}),t(f)}}),Sa=Yt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await fx(e,t,n,r)}),Aa=Yt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await px(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Ta=Yt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await hx(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(([m,y])=>{"label"in y&&(y.type&&y.type==="date"?f.values[m]=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[m]=[{value:y.value,label:y.label}]:y.value?f.values[m]={value:y.value,label:y.label}:f.values[m]=y.label)}),{data:f,status:l}}catch(i){return _e({message:yn,type:qe}),t(i)}}),{resetState:uA,setCurrentCardInEdit:Qr,resetCurrentResourceDetails:Dx,setHasUnsavedChanges:P1}=M1.actions,kx=M1.reducer,Nx=()=>{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 m=f.target,y=Number(e.dataset.prevScrollLeft)||0,x=Number(e.dataset.prevScrollTop)||0,b=m.scrollLeft,h=m.scrollTop,p=b-y,g=h-x,C=Math.abs(g)>Math.abs(p),v=Math.abs(p)>Math.abs(g);r({isVertical:C,isHorizontal:v,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(h),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(m=>({...m,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]},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='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",Mx=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Ve),{userGroupId:i}=kt()||{},[c,l]=Nx(),{isScrolling:f,isVertical:m}=c,y=f&&m,x=w.useMemo(()=>(e==null?void 0:e[0].data.map(g=>g.label))||[],[e]),b=w.useMemo(()=>e.map(g=>{const C={cells:{},externalResourceId:g.externalResourceId};return g.data.forEach((v,I)=>{if(x[I]){let E=v.value?v.value:Ms;E&&v.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),C.cells[x[I]]={label:E,deepLink:v==null?void 0:v.deepLink}}}),C}),[e,x]),h=(g,C)=>u.jsx(u4,{align:"left",children:g.deepLink?u.jsx(d.Link,{target:"_blank",underline:"none",href:g.deepLink,children:g.label}):u.jsx(d.Typography,{variant:"body2",color:"gray.black",children:g.label})},`${C}_${g.label}`),p=g=>{!g||!n||(r(!1),s(hd,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(Qr({...n,externalResourceId:g})))};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(i4,{children:u.jsxs(d.TableRow,{children:[x.map(g=>u.jsx(c4,{sx:{whiteSpace:"nowrap"},children:u.jsx(d.Typography,{variant:"overline",color:"gray.gray3",children:g})},g)),u.jsx(f4,{})]})}),u.jsx(d.TableBody,{children:b.map((g,C)=>u.jsxs(l4,{children:[Object.values(g.cells).map((v,I)=>h(v,I)),u.jsx(d4,{children:!y&&g.externalResourceId&&u.jsx(d.Tooltip,{title:wd,placement:"bottom",children:u.jsx(d.IconButton,{className:"row-edit",onClick:()=>p(g.externalResourceId),children:u.jsx("img",{src:Rx})})})})]},`id_${C}`))})]})})]})},Px=e=>e.cardList.connectorCards,jx=e=>e.cardList.connectorsEnabled,Bx=e=>e.cardList.connectorApiStatus,Vx=e=>e.cardList.cardSpecificData,Gx=e=>e.cardList.specificConnectorApiStatus,Hx=e=>e.cardList.specificConnectorErrorCode,Wx=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)},Zx="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",j1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,B1=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}},Xx=(e,t)=>`${Ad} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),zx=(e,t,n)=>{var l,f,m,y,x;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&&((x=(y=(m=a==null?void 0:a.listItems)==null?void 0:m.fields)==null?void 0:y[0])!=null&&x.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&j1.test(c)?!0:!V1(e,t,n)&&!i.length},V1=(e,t,n)=>{var f,m;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"||(m=(f=o.data)==null?void 0:f.listItems)==null?void 0:m.errorMessage,i=(n==null?void 0:n[r])===K.FAILED,c=o.cardErrorMessage,l=c&&j1.test(c);return i||a||c&&!l};function Yx(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],m=(f==null?void 0:f.connectorNames)??[];for(const y of m)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),zx(c,t,n)&&(o[y].empty_cards+=1,s+=1),V1(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 G1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:m,cardId:y,isCardLevelError:x,fieldName:b,showErrorIcon:h}=e,p=w.useRef(null),g=w.useRef(null),{email:C,currentSmIds:v,conversationId:I,sendTrackingEvent:E,connectorFunctions:_}=w.useContext(Ve),A=ye(Hx),S=A==null?void 0:A[y],[L,k]=w.useState(!1),D=w.useMemo(()=>{if(n&&x){const{error_message:q}=B1(n);return q}return c?Ad.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):yd},[n,c,l,x]),N=w.useCallback(()=>{const q=n||Xx(S,l),{error_code:se,error_message:de}=B1(q);E==null||E(S3,{sm_ids:v,frontend_req_params:{email:C,conversationId:I,externalResourceId:m==null?void 0:m.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:se,error_message:de})},[n,S,E,v,C,I,f,l,m==null?void 0:m.externalResourceId]);w.useEffect(()=>{(n&&x||c&&S)&&N()},[N,S,c,n,x]),w.useEffect(()=>{const q=r?g.current:p.current;if(q){const se=q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth;k(se)}},[t,r]);const P=o==Vi.NOT_FOUND;let B=P?Ms:t;a==="date"&&B&&!P&&(B=new Date(parseInt(B)).toLocaleDateString(navigator.language));const Y=!!n||c,$=()=>{i?_==null||_.redirectToAdmin():window.open(p5,"_blank")},H=()=>{E==null||E(A3,{sm_ids:v,card_title:f,field_name:b})},X=q=>{const se=/<>(.*?)<>/g,de=q.split(se);return u.jsx(w.Fragment,{children:de.map((V,W)=>W%2===1?u.jsx(r4,{variant:"body2",onClick:$,children:V},W):V)})};return s?u.jsx(kn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):Y?u.jsxs(Vd,{gap:"7px",children:[h?u.jsx(d.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:Zx,width:"18px",height:"18px"})}):null,u.jsx(Gd,{variant:"body2",children:D?X(D):yd})]}):u.jsx(d.Tooltip,{title:L?B:null,placement:"bottom",children:r?u.jsx(Hd,{ref:g,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:H,children:B||Ms}):u.jsx(s4,{ref:p,variant:"body2",children:B||Ms})})},H1="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",hr=({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:H1})})})}),n]})}),W1=e=>{var V,W,M;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:m,data:y,cardErrorMessage:x,redirectToAdminTab:b,connectorNames:h}=(r==null?void 0:r[t])||{},p=m==="flat",[g,C]=w.useState(!1),[v,I]=w.useState(!1),[E,_]=w.useState(!1),[A,S]=w.useState(!1),L=((V=y==null?void 0:y.listItems)==null?void 0:V.statusCode)!==401,k=w.useMemo(()=>{var G,z,ne,ae;return p&&((G=y==null?void 0:y.flatDisplay)!=null&&G.data)?y.flatDisplay.data:!p&&((ae=(ne=(z=y==null?void 0:y.listItems)==null?void 0:z.fields)==null?void 0:ne[0])!=null&&ae.data)?y.listItems.fields[0].data:[]},[p,y]),D=w.useMemo(()=>k==null?void 0:k.slice(0,5),[k]),[N,P]=w.useState([]),B=w.useRef(null),[Y,$]=w.useState(0),H=g?-180:0,X=p?!1:!!((W=y==null?void 0:y.listItems)!=null&&W.errorMessage),q=X||f||x,se=c&&!X&&s&&(E||v);w.useLayoutEffect(()=>{var G;(G=B.current)!=null&&G.scrollHeight&&$(B.current.scrollHeight+i)},[o==null?void 0:o[t],N,B]),w.useEffect(()=>{var ae,j;const G=((k==null?void 0:k.length)||0)>5,z=!p&&(((j=(ae=y==null?void 0:y.listItems)==null?void 0:ae.fields)==null?void 0:j.length)||0)>1;_(G&&!z),I(z)},[y,p,k==null?void 0:k.length]),w.useEffect(()=>{P(g?k:D)},[y,g,D,k]);const de=()=>{E?C(G=>!G):S(G=>!G)};return u.jsxs(u.Fragment,{children:[u.jsx(hr,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(Mx,{data:((M=y==null?void 0:y.listItems)==null?void 0:M.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx(t4,{className:s?"":"slideUp",height:Y,children:u.jsx(d.Stack,{ref:B,gap:1,margin:"12px",children:l&&!(N!=null&&N.length)?u.jsxs(u.Fragment,{children:[u.jsx(kn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:q?u.jsx(d.Box,{margin:"8px 0",children:u.jsx(G1,{error:x,isLoading:l,redirectToAdminTab:b,isFailed:f,showErrorIcon:!L,connectorNames:h,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):N!=null&&N.length?N==null?void 0:N.map(G=>{const{value:z,label:ne,deepLink:ae,type:j}=G,ee="errorMessage"in G?G.errorMessage:null,ve="statusCode"in G?G.statusCode:null;return u.jsxs("div",{children:[u.jsx(n4,{variant:"overline",children:ne}),u.jsx(G1,{value:z,error:ee,deepLink:ae,statusCode:ve,isLoading:l,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:ne})]},ne)}):u.jsx(d.Box,{margin:"8px 0",children:u.jsx(Gd,{children:n5})})})})}),!x&&se&&u.jsx(h4,{variant:"body2_medium",onClick:de,children:E?u.jsxs(u.Fragment,{children:[g?q4:Qd,u.jsx(p4,{src:J4,transformAngle:H})]}):Qd})]})},Jx={connectorCards:null,cardSpecificData:null,connectorApiStatus:K.IDLE,conversationMetaDataApiStatus:K.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},Z1="/v1/api",qx=`${Z1}/connectors/cards`,$x=`${Z1}/connectors/cards/:id/data`,Qx=({inboxIds:e,conversationId:t,channelType:n="email",connectorId:r})=>{const o=new URLSearchParams;return e.forEach(s=>o.append("inbox_ids",s)),o.append("channel_type",n),o.append("conversation_id",String(t||"")),r&&o.append("connector_id",String(r)),we({url:`${qx}?${o.toString()}`,method:Re.GET})},Ux=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),we({url:`${$x.replace(":id",e)}?${o.toString()}`,method:Re.GET})},X1=pc({name:"connectorCardLibrary",initialState:Jx,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(La.pending,t=>{t.connectorApiStatus=K.LOADING}).addCase(La.fulfilled,(t,n)=>{t.connectorApiStatus=K.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(La.rejected,t=>{t.connectorApiStatus=K.FAILED}).addCase(qo.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(qo.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(qo.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):Td;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),La=Yt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n,connectorId:r})=>{var c;const o=await Qx({inboxIds:e,channelType:t,conversationId:n,connectorId:r});if(!Array.isArray((c=o==null?void 0:o.data)==null?void 0:c.cards))return{cards:[],connectorsEnabled:!1};const{cards:s,connectorsEnabled:a=!1}=o.data;return{cards:s.sort((l,f)=>(l==null?void 0:l.priority)-(f==null?void 0:f.priority)),connectorsEnabled:a}}),qo=Yt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Ux(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&_e({message:k0,type:rn}),{data:Dd(i),status:c}):(r&&_e({message:D0,type:qe}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Td})}}),Kx=X1.reducer,z1=X1.actions,Y1="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",ev="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",tv="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",J1=e=>e.write.createObjectList,nv=e=>e.write.createObjectConnectorNamesList,q1=e=>e.write.linkObjectList,rv=e=>e.write.editObjectList,ov=e=>e.write.objectDict,sv=e=>e.write.formFields,av=e=>e.write.linkCardApiStatus,iv=e=>e.write.unlinkCardApiStatus,cv=e=>e.write.dependentFieldsMap,lv=e=>e.write.createFormApiStatus,uv=e=>e.write.updateFormApiStatus,dv=e=>e.write.currentResourceDetails,fv=e=>e.write.currentResourceDetailsApiStatus,$1=e=>e.write.currentCardInEdit,Q1=e=>e.write.hasUnsavedChanges,pv=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,U1=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)&&pv(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),hv=e=>c5.replace("{{connectorName}}",e),gv=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=zt(),{sendTrackingEvent:c}=w.useContext(Ve),f=ye(iv)===K.LOADING,m=()=>{s&&o&&i(Sa({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(p3,{connector_name:a,conversation_id:s}),t(!1),r(),_e({message:my,type:rn})}).catch(()=>{_e({message:by,type:rn})})};return u.jsx(hr,{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:i5}),u.jsx(d.Typography,{variant:"body2",children:hv(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:Wi}),u.jsx(d.Button,{disabled:f,color:"error",onClick:m,children:Id})]})]})})},mv=({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(a4,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:m})=>u.jsx(d.Tooltip,{title:l,placement:"bottom",children:u.jsx(Br,{onClick:m,disabled:c,children:u.jsx("img",{src:f})})},i))}),o&&u.jsx(d.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(Br,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},bv=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=zt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:m}=w.useContext(Ve),{userGroupId:y}=kt()||{},[x,b]=w.useState(!!s),[h,p]=w.useState(!1),[g,C]=w.useState(!1),[v,I]=w.useState(!1),{id:E,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let k=E;A&&(k=`${k}_${A}`);const{data:D,cardType:N,cardErrorMessage:P,connectorNames:B}=(n==null?void 0:n[k])??{},Y=(B==null?void 0:B[0])||"",$=(o==null?void 0:o[k])===K.LOADING,H=(o==null?void 0:o[k])===K.FAILED,X=!!(tt(c,md)&&A),q=w.useMemo(()=>{var j,ee;if(P||H||!(tt(c,Y3)&&S.some(ve=>ve.type==="edit")))return!1;switch(N){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((j=D==null?void 0:D.listItems)==null?void 0:j.fields.length)===1?(ee=D==null?void 0:D.listItems)==null?void 0:ee.fields.some(ve=>ve.externalResourceId):!1;default:return!1}},[D,N,c,S,t,P,H]),se=w.useCallback((j=!1)=>{const ee=j?y3:b3;r&&E&&f&&i(qo({id:E,email:r,conversationId:f,externalResourceId:A})).unwrap().then(ve=>{const J={...Fd(ve,_,j,!0),sm_ids:m};l(ee,J)}).catch(ve=>{const J={...Fd(ve,_,j,!1),sm_ids:m};l(ee,J)})},[i,r,E,_,l,f,A,m]);w.useEffect(()=>{x&&se(!0)},[x,se]);const de=(j,ee)=>{var J;j==null||j.stopPropagation(),i(qo({id:ee,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{l(r3,{id:ee})});const ve=j.target.tagName==="BUTTON"?(J=j.target)==null?void 0:J.firstChild:j.target;ve.className&&(ve.className=""),setTimeout(()=>ve.className="selected",1)},V=(j,ee)=>{j.stopPropagation(),!(n!=null&&n[ee])&&!$&&se(),l(x?n3:t3,{id:ee}),b(ve=>!ve)},W=j=>{j.stopPropagation();const ee=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;p(!!ee)},M=j=>{var ve,J;j.stopPropagation(),l(hd,{card_title:_,connector_name:Y,ug_id:y,sm_ids:m});let ee;N==="flat"?ee=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:N==="flat_with_list"&&(ee=(J=(ve=D==null?void 0:D.listItems)==null?void 0:ve.fields[0])==null?void 0:J.externalResourceId),ee?i(Qr({...t,externalResourceId:ee})):_e({message:yn,type:qe})},G=j=>{j.stopPropagation(),C(!0)},z=()=>{I(!0)},ne=()=>{I(!1)},ae=[{id:"unlink",label:Id,disabled:$,shown:X,iconSrc:ev,action:j=>G(j)},{id:"refresh",label:Cd,disabled:$,shown:!0,iconSrc:Y1,action:j=>de(j,E)},{id:"edit",label:wd,disabled:$,shown:q,iconSrc:tv,action:j=>M(j)}];return u.jsxs(Q5,{"data-testid":`test_${E}`,onMouseEnter:z,onMouseLeave:ne,children:[u.jsxs(U5,{className:x?"hiver-card-expanded":"",onClick:j=>V(j,k),children:[u.jsxs(K5,{children:[L&&u.jsx("img",{src:L,alt:_}),u.jsx(d.Tooltip,{title:h?_:"",placement:"bottom",children:u.jsx(e4,{variant:"h4",onMouseOver:j=>W(j),onMouseLeave:j=>W(j),children:_})})]}),u.jsxs(Vd,{children:[u.jsx(mv,{actions:ae,isHovered:v}),u.jsx(d.Tooltip,{title:x?xd:Gi,placement:"bottom",children:u.jsx(Br,{onClick:j=>V(j,k),children:u.jsx(Ji,{className:x?"":"hiver-up"})})})]})]}),u.jsx(W1,{id:k,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:x}),u.jsx(gv,{showUnlinkModal:g,setShowUnlinkModal:C,cardId:E,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:Y})]})},yv=Number.MAX_SAFE_INTEGER,Cv=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=w.useContext(Ve),i=tt(s,q3)?yv:1;return u.jsx(d.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:m}=c;let y=f;return m&&(y=`${y}_${m}`),u.jsx("div",{children:u.jsx(bv,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},y)})})},Ur=({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 Kr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}Ur.CaseView=Kr;const xv="Bring your favourite tools into Hiver",vv="Plugin image",Ev="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",Iv="Enable Connectors",wv="Enable Apps",_v="Learn more",Sv="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",Av="Contact your admin to enable this",Tv="https://youtu.be/ODcJnzZLb50",Lv="connectors-module/assets/connectors-images/connector-mainpage.png",Ov="connectors-module/assets/connectors-images/connector-mainpage-apps.png",Fv="Explore connectors",Dv="Connectors",kv=d.styled(d.Box)`
1039
+ `,V8=e=>T.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),T.createElement("g",{clipPath:"url(#clip0_7787_114457)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_7787_114457"},T.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),G8=({aspectRatio:e="auto",...t})=>{const[n,r]=w.useState(!1);return n?null:u.jsxs(B8,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(V8,{className:"play-icon"})]})},T1=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}})),zc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},H8=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],Yo=(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}},{}):{},Yc=({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=Jy(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=qy(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=$y();return}if(n.type==="text"&&n.limit){t[n.name].validate=mc();return}if(n.type==="table"){const l=Yc({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=zy(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=Yy(l)}}),t},va={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[xa.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},Jo=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return va.isMultiSelect(o)?s=o.map(a=>a.value):va.isTable(o)?s=o.map(({...i})=>(delete i[xa.ROW_ID],i)).filter(i=>Object.keys(i).length>0):va.isSelect(o)?s=o.value:va.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),W8=(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]}))},L1=(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=L1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},fr="/v1/api",Z8=`${fr}/connectors/conversation/:conversationId/metadata`,X8=`${fr}/connectors/forms/:formId/field/:fieldName/data`,z8=`${fr}/connectors/form/:formId`,Y8=`${fr}/connectors/forms/:id/link`,J8=`${fr}/connectors/forms/:id/preview`,q8=`${fr}/connectors/conversation/:conversationId/selected-email`,$8=`${fr}/connectors/app-cf-values`,Q8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:lt(`${X8}?${r.toString()}`,e),method:Re.POST,data:t})},U8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:lt(`${z8}?${r.toString()}`,e),method:Re.POST,data:t})},K8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:`${J8.replace(":id",e)}?${r.toString()}`,method:Re.POST,data:{args:t}})},ex="https://avatars.githubusercontent.com/u/62397590",O1={optionsMap:null,createOptionApi:K.IDLE,dropdownOptionsApis:K.IDLE,previewCardData:null,previewCardApiStatus:K.IDLE,selectedSuggestionType:"basic"},F1=pc({name:"commonSlice",initialState:O1,reducers:{resetState:()=>O1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=K.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(Ea.pending,t=>{t.createOptionApi=K.LOADING}).addCase(Ea.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(Ea.rejected,t=>{t.createOptionApi=K.FAILED}).addCase(pr.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(pr.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(pr.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(qr.pending,t=>{t.previewCardApiStatus=K.LOADING}).addCase(qr.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=K.IDLE}).addCase(qr.rejected,t=>{t.previewCardApiStatus=K.FAILED})}}),Ea=Yt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var h,p,g;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,b=zc(c||{},s,r),{common:y}=t(),{options:x=[],...m}=((h=y.optionsMap)==null?void 0:h[b])||{};try{const C=await U8({fieldName:r,formId:a},{args:l,conversation_id:i});if(!C||!("data"in C)||!("output_variables"in C.data)||!("external_resource_id"in C.data.output_variables))throw C;const v=C.data.output_variables,{external_resource_id:I,...E}=v,A=[{label:o,value:I,prefillValues:E},...x],S=Z0(A,L=>L.value);return f==null||f(S),{optionsList:S,key:b,...m}}catch(C){f==null||f(x);const v=C,I=(p=v==null?void 0:v.response)==null?void 0:p.data,E=typeof I=="string"?I:(I==null?void 0:I.message)||yn;return _e({message:E,type:qe}),n((g=v==null?void 0:v.response)==null?void 0:g.status)}}),pr=Yt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:b}=e,y=zc(c||{},o,r),{common:x}=t();let m=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(m=a.meta.showAvatar);const h=((A=x.optionsMap)==null?void 0:A[y])||{},p=!e.isScrollToBottomEvent&&(!h||s!==h.searchTerm),g=p?[]:h.options||[],C=p?!0:h.hasMore??!0,v=p?0:h.currentPage??0,{enabled:I,limit:E}=f,_=E||10;try{let k;const D=b==null?void 0:b.signal,N=I?{pageNumber:v+1,searchTerm:s,limit:_,enabled:I}:null;if(C&&(k=await Q8({fieldName:r,formId:o},{pagination:N||{},args:c,interfaceId:l})),D!=null&&D.aborted)throw D.reason;if(!k||!k.data||!("data"in k.data)||!Array.isArray(k.data.data)||!k.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 B=k.data.data.map(X=>m?{...X,avatarUrl:X.avatarUrl||ex}:(delete X.avatarUrl,X)),Y=[...g,...B],$=I?B.length>=_:!1,H=Z0(Y,X=>X.value);return i==null||i(H),{optionsList:H,fieldName:r,formId:o,searchTerm:s,currentPage:v+1,hasMore:$,key:y}}catch(k){const{common:D}=t(),N=((L=D.optionsMap)==null?void 0:L[y])||{};return i==null||i(N.options??[]),n(k)}},{condition:(e,{getState:t})=>{var b;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=zc(a||{},r,n),{common:c}=t(),l=(b=c.optionsMap)==null?void 0:b[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}}),qr=Yt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await K8(e,t,n),i=a==null?void 0:a.data;return i?(r&&_e({message:k0,type:rn}),{data:Dd(i)}):(r&&_e({message:D0,type:qe}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:lA,resetPreviewCardData:tx,setSelectedSuggestionType:nx}=F1.actions,rx=F1.reducer,$r="/v1/api",ox=`${$r}/connectors/forms/list`,sx=`${$r}/connectors/cards/:id/unlink`,ax=`${$r}/connectors/forms/:id/link`,ix=`${$r}/connectors/form/:formId`,cx=`${$r}/connectors/forms/:formId/data`,lx=`${$r}/connectors/forms/:formId/get_forms_custom_fields`,ux=({inboxIds:e,channelType:t,conversationId:n,connectorId:r})=>{const o=new URLSearchParams;return e.forEach(s=>o.append("inbox_ids",s)),o.append("channel_type",t),o.append("conversation_id",String(n)),r&&o.append("connector_id",String(r)),we({url:`${ox}?${o.toString()}`,method:Re.GET})},D1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),we({url:lt(`${ix}?${r.toString()}`,e),method:Re.POST,data:t})},dx=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),we({url:`${sx.replace(":id",e)}?${o.toString()}`,method:Re.POST,data:{externalResourceId:n,conversationId:r}})},fx=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),we({url:`${ax.replace(":id",e)}?${s.toString()}`,method:Re.POST,data:{externalResourceId:t,conversationId:r}})},px=(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),we({url:`${cx.replace(":formId",e)}?${s.toString()}`,method:Re.GET})},hx="Error in previewing the card",k1="Link format isn't recognized. Please check that you've entered a valid URL",gx="Item already linked",mx="Card linked successfully",bx="Error in linking the card",yx="New card created",Cx="Card creation failed",xx="Create and link objects from different apps to this conversation",vx="Are you sure you want to change the primary object?",Ex="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",Ix="Are you sure you want to leave?",wx=`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?`,_x="Select an object to create",Sx="Select an object to link",N1="Select object",Ax="Paste URL or ID",Tx="Object ID/Link",Lx="Card updated",Ox="Card updation failed",R1=3,Jc=(e,t)=>{var r,o,s,a,i,c,l,f,b,y,x,m,h;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=(b=e.validations)==null?void 0:b.range)==null?void 0:y.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((x=e.validations)==null?void 0:x.maxRows)||5,limit:(m=e.validations)==null?void 0:m.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(h=e.validations)==null?void 0:h.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},M1=pc({name:"writeCapability",initialState:N0,reducers:{resetState:()=>N0,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(Ia.pending,t=>{t.objectListApiStatus=K.LOADING}).addCase(Ia.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(Ia.rejected,t=>{t.objectListApiStatus=K.FAILED}).addCase(pr.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(pr.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(pr.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(wa.pending,t=>{t.createFormApiStatus=K.LOADING}).addCase(wa.fulfilled,t=>{t.createFormApiStatus=K.IDLE}).addCase(wa.rejected,t=>{t.createFormApiStatus=K.FAILED}).addCase(Aa.pending,t=>{t.linkCardApiStatus=K.LOADING}).addCase(Aa.fulfilled,t=>{t.linkCardApiStatus=K.IDLE}).addCase(Aa.rejected,t=>{t.linkCardApiStatus=K.FAILED}).addCase(Sa.pending,t=>{t.unlinkCardApiStatus=K.LOADING}).addCase(Sa.fulfilled,t=>{t.unlinkCardApiStatus=K.IDLE}).addCase(Sa.rejected,t=>{t.unlinkCardApiStatus=K.FAILED}).addCase(_a.pending,t=>{t.updateFormApiStatus=K.LOADING}).addCase(_a.fulfilled,t=>{t.updateFormApiStatus=K.IDLE}).addCase(_a.rejected,t=>{t.updateFormApiStatus=K.FAILED}).addCase(Ta.pending,t=>{t.currentResourceDetailsApiStatus=K.LOADING}).addCase(Ta.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=K.IDLE}).addCase(Ta.rejected,t=>{t.currentResourceDetailsApiStatus=K.FAILED})}}),Ia=Yt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o,connectorId:s}=e,a=await ux({inboxIds:t,channelType:n,conversationId:r,connectorId:s});if(!a||!a.data||!("formsList"in a.data)||!Array.isArray(a.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const i=a.data.formsList,c={},l=[],f=[],b=[],y=[],x=[],m={},h={};return i==null||i.forEach(p=>{var C,v;if(p.expandedView&&!o)return;const g={...p};"fieldList"in g&&delete g.fieldList,h[p.id]=g,c[p.id]||(c[p.id]={}),m[p.id]||(m[p.id]=[]),p.type==="create"&&p.authenticated?(l.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!f.includes(p.connectorName)&&f.push(p.connectorName)):p.type==="link"&&p.authenticated?b.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?y.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&x.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(C=p.fieldList)==null||C.sort((I,E)=>I.priority-E.priority),(v=p.fieldList)==null||v.forEach(I=>{const E=Jc(I);if(E.columns&&(E.columns=E.columns.map(_=>Jc(_,{loadOptionsOnFocus:!0,defaultOptions:!1}))),m[p.id]=[...m[p.id],E],I.interfaceDetails&&(I.interfaceDetails.args||I.interfaceDetails.optionalArgs)){const _={...I.interfaceDetails.args,...I.interfaceDetails.optionalArgs};Object.values(_).forEach(A=>{c[p.id][A]?c[p.id][A]=[...c[p.id][A],I.name]:c[p.id][A]=[I.name]})}})}),{createObjectList:l,createObjectConnectorNamesList:f,linkObjectList:b,editObjectList:y,searchObjectList:x,formFields:m,objectDict:h,dependentFieldsMap:c}}),wa=Yt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await D1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),_e({message:yx,type:rn})}catch(l){const f=l,b=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(b==null?void 0:b.message)??Cx;return o==null||o(l),_e({message:y,type:qe}),t(l)}}),_a=Yt("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 D1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),_e({message:Lx,type:rn})}catch(f){return o==null||o(f),_e({message:Ox,type:qe}),t(f)}}),Sa=Yt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await dx(e,t,n,r)}),Aa=Yt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await fx(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Ta=Yt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await px(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(([b,y])=>{"label"in y&&(y.type&&y.type==="date"?f.values[b]=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[b]=[{value:y.value,label:y.label}]:y.value?f.values[b]={value:y.value,label:y.label}:f.values[b]=y.label)}),{data:f,status:l}}catch(i){return _e({message:yn,type:qe}),t(i)}}),{resetState:uA,setCurrentCardInEdit:Qr,resetCurrentResourceDetails:Fx,setHasUnsavedChanges:P1}=M1.actions,Dx=M1.reducer,kx=()=>{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 b=f.target,y=Number(e.dataset.prevScrollLeft)||0,x=Number(e.dataset.prevScrollTop)||0,m=b.scrollLeft,h=b.scrollTop,p=m-y,g=h-x,C=Math.abs(g)>Math.abs(p),v=Math.abs(p)>Math.abs(g);r({isVertical:C,isHorizontal:v,isScrolling:!0}),e.dataset.prevScrollLeft=String(m),e.dataset.prevScrollTop=String(h),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(b=>({...b,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]},Nx="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",Rx=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Ve),{userGroupId:i}=kt()||{},[c,l]=kx(),{isScrolling:f,isVertical:b}=c,y=f&&b,x=w.useMemo(()=>(e==null?void 0:e[0].data.map(g=>g.label))||[],[e]),m=w.useMemo(()=>e.map(g=>{const C={cells:{},externalResourceId:g.externalResourceId};return g.data.forEach((v,I)=>{if(x[I]){let E=v.value?v.value:Ms;E&&v.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),C.cells[x[I]]={label:E,deepLink:v==null?void 0:v.deepLink}}}),C}),[e,x]),h=(g,C)=>u.jsx(l4,{align:"left",children:g.deepLink?u.jsx(d.Link,{target:"_blank",underline:"none",href:g.deepLink,children:g.label}):u.jsx(d.Typography,{variant:"body2",color:"gray.black",children:g.label})},`${C}_${g.label}`),p=g=>{!g||!n||(r(!1),s(hd,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(Qr({...n,externalResourceId:g})))};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(a4,{children:u.jsxs(d.TableRow,{children:[x.map(g=>u.jsx(i4,{sx:{whiteSpace:"nowrap"},children:u.jsx(d.Typography,{variant:"overline",color:"gray.gray3",children:g})},g)),u.jsx(d4,{})]})}),u.jsx(d.TableBody,{children:m.map((g,C)=>u.jsxs(c4,{children:[Object.values(g.cells).map((v,I)=>h(v,I)),u.jsx(u4,{children:!y&&g.externalResourceId&&u.jsx(d.Tooltip,{title:wd,placement:"bottom",children:u.jsx(d.IconButton,{className:"row-edit",onClick:()=>p(g.externalResourceId),children:u.jsx("img",{src:Nx})})})})]},`id_${C}`))})]})})]})},Mx=e=>e.cardList.connectorCards,Px=e=>e.cardList.connectorsEnabled,jx=e=>e.cardList.connectorApiStatus,Bx=e=>e.cardList.cardSpecificData,Vx=e=>e.cardList.specificConnectorApiStatus,Gx=e=>e.cardList.specificConnectorErrorCode,Hx=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)},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='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",j1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,B1=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}},Zx=(e,t)=>`${Ad} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),Xx=(e,t,n)=>{var l,f,b,y,x;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&&((x=(y=(b=a==null?void 0:a.listItems)==null?void 0:b.fields)==null?void 0:y[0])!=null&&x.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&j1.test(c)?!0:!V1(e,t,n)&&!i.length},V1=(e,t,n)=>{var f,b;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"||(b=(f=o.data)==null?void 0:f.listItems)==null?void 0:b.errorMessage,i=(n==null?void 0:n[r])===K.FAILED,c=o.cardErrorMessage,l=c&&j1.test(c);return i||a||c&&!l};function zx(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],b=(f==null?void 0:f.connectorNames)??[];for(const y of b)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),Xx(c,t,n)&&(o[y].empty_cards+=1,s+=1),V1(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 G1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:b,cardId:y,isCardLevelError:x,fieldName:m,showErrorIcon:h}=e,p=w.useRef(null),g=w.useRef(null),{email:C,currentSmIds:v,conversationId:I,sendTrackingEvent:E,connectorFunctions:_}=w.useContext(Ve),A=ye(Gx),S=A==null?void 0:A[y],[L,k]=w.useState(!1),D=w.useMemo(()=>{if(n&&x){const{error_message:q}=B1(n);return q}return c?Ad.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):yd},[n,c,l,x]),N=w.useCallback(()=>{const q=n||Zx(S,l),{error_code:se,error_message:de}=B1(q);E==null||E(_3,{sm_ids:v,frontend_req_params:{email:C,conversationId:I,externalResourceId:b==null?void 0:b.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:se,error_message:de})},[n,S,E,v,C,I,f,l,b==null?void 0:b.externalResourceId]);w.useEffect(()=>{(n&&x||c&&S)&&N()},[N,S,c,n,x]),w.useEffect(()=>{const q=r?g.current:p.current;if(q){const se=q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth;k(se)}},[t,r]);const P=o==Vi.NOT_FOUND;let B=P?Ms:t;a==="date"&&B&&!P&&(B=new Date(parseInt(B)).toLocaleDateString(navigator.language));const Y=!!n||c,$=()=>{i?_==null||_.redirectToAdmin():window.open(f5,"_blank")},H=()=>{E==null||E(S3,{sm_ids:v,card_title:f,field_name:m})},X=q=>{const se=/<>(.*?)<>/g,de=q.split(se);return u.jsx(w.Fragment,{children:de.map((V,W)=>W%2===1?u.jsx(n4,{variant:"body2",onClick:$,children:V},W):V)})};return s?u.jsx(kn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):Y?u.jsxs(Vd,{gap:"7px",children:[h?u.jsx(d.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:Wx,width:"18px",height:"18px"})}):null,u.jsx(Gd,{variant:"body2",children:D?X(D):yd})]}):u.jsx(d.Tooltip,{title:L?B:null,placement:"bottom",children:r?u.jsx(Hd,{ref:g,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:H,children:B||Ms}):u.jsx(o4,{ref:p,variant:"body2",children:B||Ms})})},H1="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",hr=({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:H1})})})}),n]})}),W1=e=>{var V,W,M;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:b,data:y,cardErrorMessage:x,redirectToAdminTab:m,connectorNames:h}=(r==null?void 0:r[t])||{},p=b==="flat",[g,C]=w.useState(!1),[v,I]=w.useState(!1),[E,_]=w.useState(!1),[A,S]=w.useState(!1),L=((V=y==null?void 0:y.listItems)==null?void 0:V.statusCode)!==401,k=w.useMemo(()=>{var G,z,ne,ae;return p&&((G=y==null?void 0:y.flatDisplay)!=null&&G.data)?y.flatDisplay.data:!p&&((ae=(ne=(z=y==null?void 0:y.listItems)==null?void 0:z.fields)==null?void 0:ne[0])!=null&&ae.data)?y.listItems.fields[0].data:[]},[p,y]),D=w.useMemo(()=>k==null?void 0:k.slice(0,5),[k]),[N,P]=w.useState([]),B=w.useRef(null),[Y,$]=w.useState(0),H=g?-180:0,X=p?!1:!!((W=y==null?void 0:y.listItems)!=null&&W.errorMessage),q=X||f||x,se=c&&!X&&s&&(E||v);w.useLayoutEffect(()=>{var G;(G=B.current)!=null&&G.scrollHeight&&$(B.current.scrollHeight+i)},[o==null?void 0:o[t],N,B]),w.useEffect(()=>{var ae,j;const G=((k==null?void 0:k.length)||0)>5,z=!p&&(((j=(ae=y==null?void 0:y.listItems)==null?void 0:ae.fields)==null?void 0:j.length)||0)>1;_(G&&!z),I(z)},[y,p,k==null?void 0:k.length]),w.useEffect(()=>{P(g?k:D)},[y,g,D,k]);const de=()=>{E?C(G=>!G):S(G=>!G)};return u.jsxs(u.Fragment,{children:[u.jsx(hr,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(Rx,{data:((M=y==null?void 0:y.listItems)==null?void 0:M.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx(e4,{className:s?"":"slideUp",height:Y,children:u.jsx(d.Stack,{ref:B,gap:1,margin:"12px",children:l&&!(N!=null&&N.length)?u.jsxs(u.Fragment,{children:[u.jsx(kn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:q?u.jsx(d.Box,{margin:"8px 0",children:u.jsx(G1,{error:x,isLoading:l,redirectToAdminTab:m,isFailed:f,showErrorIcon:!L,connectorNames:h,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):N!=null&&N.length?N==null?void 0:N.map(G=>{const{value:z,label:ne,deepLink:ae,type:j}=G,ee="errorMessage"in G?G.errorMessage:null,ve="statusCode"in G?G.statusCode:null;return u.jsxs("div",{children:[u.jsx(t4,{variant:"overline",children:ne}),u.jsx(G1,{value:z,error:ee,deepLink:ae,statusCode:ve,isLoading:l,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:ne})]},ne)}):u.jsx(d.Box,{margin:"8px 0",children:u.jsx(Gd,{children:t5})})})})}),!x&&se&&u.jsx(p4,{variant:"body2_medium",onClick:de,children:E?u.jsxs(u.Fragment,{children:[g?J4:Qd,u.jsx(f4,{src:Y4,transformAngle:H})]}):Qd})]})},Yx={connectorCards:null,cardSpecificData:null,connectorApiStatus:K.IDLE,conversationMetaDataApiStatus:K.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},Z1="/v1/api",Jx=`${Z1}/connectors/cards`,qx=`${Z1}/connectors/cards/:id/data`,$x=({inboxIds:e,conversationId:t,channelType:n="email",connectorId:r})=>{const o=new URLSearchParams;return e.forEach(s=>o.append("inbox_ids",s)),o.append("channel_type",n),o.append("conversation_id",String(t||"")),r&&o.append("connector_id",String(r)),we({url:`${Jx}?${o.toString()}`,method:Re.GET})},Qx=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),we({url:`${qx.replace(":id",e)}?${o.toString()}`,method:Re.GET})},X1=pc({name:"connectorCardLibrary",initialState:Yx,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(La.pending,t=>{t.connectorApiStatus=K.LOADING}).addCase(La.fulfilled,(t,n)=>{t.connectorApiStatus=K.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(La.rejected,t=>{t.connectorApiStatus=K.FAILED}).addCase(qo.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(qo.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(qo.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):Td;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),La=Yt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n,connectorId:r})=>{var c;const o=await $x({inboxIds:e,channelType:t,conversationId:n,connectorId:r});if(!Array.isArray((c=o==null?void 0:o.data)==null?void 0:c.cards))return{cards:[],connectorsEnabled:!1};const{cards:s,connectorsEnabled:a=!1}=o.data;return{cards:s.sort((l,f)=>(l==null?void 0:l.priority)-(f==null?void 0:f.priority)),connectorsEnabled:a}}),qo=Yt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Qx(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&_e({message:k0,type:rn}),{data:Dd(i),status:c}):(r&&_e({message:D0,type:qe}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Td})}}),Ux=X1.reducer,z1=X1.actions,Y1="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",Kx="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",ev="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",J1=e=>e.write.createObjectList,tv=e=>e.write.createObjectConnectorNamesList,q1=e=>e.write.linkObjectList,nv=e=>e.write.editObjectList,rv=e=>e.write.objectDict,ov=e=>e.write.formFields,sv=e=>e.write.linkCardApiStatus,av=e=>e.write.unlinkCardApiStatus,iv=e=>e.write.dependentFieldsMap,cv=e=>e.write.createFormApiStatus,lv=e=>e.write.updateFormApiStatus,uv=e=>e.write.currentResourceDetails,dv=e=>e.write.currentResourceDetailsApiStatus,$1=e=>e.write.currentCardInEdit,Q1=e=>e.write.hasUnsavedChanges,fv=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,U1=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)&&fv(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),pv=e=>i5.replace("{{connectorName}}",e),hv=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=zt(),{sendTrackingEvent:c}=w.useContext(Ve),f=ye(av)===K.LOADING,b=()=>{s&&o&&i(Sa({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(f3,{connector_name:a,conversation_id:s}),t(!1),r(),_e({message:gy,type:rn})}).catch(()=>{_e({message:my,type:rn})})};return u.jsx(hr,{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:a5}),u.jsx(d.Typography,{variant:"body2",children:pv(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:Wi}),u.jsx(d.Button,{disabled:f,color:"error",onClick:b,children:Id})]})]})})},gv=({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(s4,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:b})=>u.jsx(d.Tooltip,{title:l,placement:"bottom",children:u.jsx(Br,{onClick:b,disabled:c,children:u.jsx("img",{src:f})})},i))}),o&&u.jsx(d.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(Br,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},mv=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=zt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:b}=w.useContext(Ve),{userGroupId:y}=kt()||{},[x,m]=w.useState(!!s),[h,p]=w.useState(!1),[g,C]=w.useState(!1),[v,I]=w.useState(!1),{id:E,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let k=E;A&&(k=`${k}_${A}`);const{data:D,cardType:N,cardErrorMessage:P,connectorNames:B}=(n==null?void 0:n[k])??{},Y=(B==null?void 0:B[0])||"",$=(o==null?void 0:o[k])===K.LOADING,H=(o==null?void 0:o[k])===K.FAILED,X=!!(tt(c,md)&&A),q=w.useMemo(()=>{var j,ee;if(P||H||!(tt(c,z3)&&S.some(ve=>ve.type==="edit")))return!1;switch(N){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((j=D==null?void 0:D.listItems)==null?void 0:j.fields.length)===1?(ee=D==null?void 0:D.listItems)==null?void 0:ee.fields.some(ve=>ve.externalResourceId):!1;default:return!1}},[D,N,c,S,t,P,H]),se=w.useCallback((j=!1)=>{const ee=j?b3:m3;r&&E&&f&&i(qo({id:E,email:r,conversationId:f,externalResourceId:A})).unwrap().then(ve=>{const J={...Fd(ve,_,j,!0),sm_ids:b};l(ee,J)}).catch(ve=>{const J={...Fd(ve,_,j,!1),sm_ids:b};l(ee,J)})},[i,r,E,_,l,f,A,b]);w.useEffect(()=>{x&&se(!0)},[x,se]);const de=(j,ee)=>{var J;j==null||j.stopPropagation(),i(qo({id:ee,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{l(n3,{id:ee})});const ve=j.target.tagName==="BUTTON"?(J=j.target)==null?void 0:J.firstChild:j.target;ve.className&&(ve.className=""),setTimeout(()=>ve.className="selected",1)},V=(j,ee)=>{j.stopPropagation(),!(n!=null&&n[ee])&&!$&&se(),l(x?t3:e3,{id:ee}),m(ve=>!ve)},W=j=>{j.stopPropagation();const ee=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;p(!!ee)},M=j=>{var ve,J;j.stopPropagation(),l(hd,{card_title:_,connector_name:Y,ug_id:y,sm_ids:b});let ee;N==="flat"?ee=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:N==="flat_with_list"&&(ee=(J=(ve=D==null?void 0:D.listItems)==null?void 0:ve.fields[0])==null?void 0:J.externalResourceId),ee?i(Qr({...t,externalResourceId:ee})):_e({message:yn,type:qe})},G=j=>{j.stopPropagation(),C(!0)},z=()=>{I(!0)},ne=()=>{I(!1)},ae=[{id:"unlink",label:Id,disabled:$,shown:X,iconSrc:Kx,action:j=>G(j)},{id:"refresh",label:Cd,disabled:$,shown:!0,iconSrc:Y1,action:j=>de(j,E)},{id:"edit",label:wd,disabled:$,shown:q,iconSrc:ev,action:j=>M(j)}];return u.jsxs($5,{"data-testid":`test_${E}`,onMouseEnter:z,onMouseLeave:ne,children:[u.jsxs(Q5,{className:x?"hiver-card-expanded":"",onClick:j=>V(j,k),children:[u.jsxs(U5,{children:[L&&u.jsx("img",{src:L,alt:_}),u.jsx(d.Tooltip,{title:h?_:"",placement:"bottom",children:u.jsx(K5,{variant:"h4",onMouseOver:j=>W(j),onMouseLeave:j=>W(j),children:_})})]}),u.jsxs(Vd,{children:[u.jsx(gv,{actions:ae,isHovered:v}),u.jsx(d.Tooltip,{title:x?xd:Gi,placement:"bottom",children:u.jsx(Br,{onClick:j=>V(j,k),children:u.jsx(Ji,{className:x?"":"hiver-up"})})})]})]}),u.jsx(W1,{id:k,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:x}),u.jsx(hv,{showUnlinkModal:g,setShowUnlinkModal:C,cardId:E,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:Y})]})},bv=Number.MAX_SAFE_INTEGER,yv=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=w.useContext(Ve),i=tt(s,J3)?bv:1;return u.jsx(d.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:b}=c;let y=f;return b&&(y=`${y}_${b}`),u.jsx("div",{children:u.jsx(mv,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},y)})})},Ur=({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 Kr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}Ur.CaseView=Kr;const Cv="Bring your favourite tools into Hiver",xv="Plugin image",vv="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",Ev="Enable Connectors",Iv="Enable Apps",wv="Learn more",_v="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",Sv="Contact your admin to enable this",Av="https://youtu.be/ODcJnzZLb50",Tv="connectors-module/assets/connectors-images/connector-mainpage.png",Lv="connectors-module/assets/connectors-images/connector-mainpage-apps.png",Ov="Explore connectors",Fv="Connectors",Dv=d.styled(d.Box)`
1041
1041
  padding-top: 20px;
1042
- `,Nv=d.styled(d.Stack)`
1042
+ `,kv=d.styled(d.Stack)`
1043
1043
  width: 100%;
1044
1044
  height: 97px;
1045
1045
  background-color: ${d.theme.palette.purple.light};
@@ -1055,17 +1055,17 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1055
1055
  height: 56px;
1056
1056
  width: 102px;
1057
1057
  }
1058
- `,Rv=d.styled(d.Typography)`
1058
+ `,Nv=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
- `,Mv=d.styled(d.Link)`
1063
+ `,Rv=d.styled(d.Link)`
1064
1064
  display: block;
1065
1065
  width: 100%;
1066
1066
  margin-bottom: 20px;
1067
1067
  margin-top: 12px;
1068
- `,Pv=d.styled(d.Typography)`
1068
+ `,Mv=d.styled(d.Typography)`
1069
1069
  color: ${d.theme.palette.gray.gray1};
1070
1070
  font-size: 13px;
1071
1071
  margin-bottom: 24px;
@@ -1079,17 +1079,17 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1079
1079
  background-color: #e3dfff;
1080
1080
  border: 1px solid ${d.theme.palette.purple.primary};
1081
1081
  }
1082
- `,jv=d.styled(d.Stack)`
1082
+ `,Pv=d.styled(d.Stack)`
1083
1083
  margin-top: 16px;
1084
1084
  justify-content: center;
1085
1085
  align-items: center;
1086
1086
  gap: 8px;
1087
- `,Bv=d.styled(d.icons.InfoOutlined)`
1087
+ `,jv=d.styled(d.icons.InfoOutlined)`
1088
1088
  width: 18px;
1089
1089
  color: ${d.theme.palette.gray.gray3};
1090
- `,Vv=d.styled(d.Typography)`
1090
+ `,Bv=d.styled(d.Typography)`
1091
1091
  color: ${d.theme.palette.gray.gray3};
1092
- `,Gv="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",Hv={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:Wv}=Hv,ep=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=w.useContext(Ve),s=tt(r,X3),a=tt(r,Rs),i=m=>{m.stopPropagation(),n(Km),o==null||o.redirectToAdmin()},c=m=>{m.stopPropagation(),n(e3),window.open(Sv,"_blank")},l=()=>{n(_3,{source:"main_tab"})},f=a?Ov:Lv;return u.jsxs(kv,{"data-testid":"noConnectors",children:[s?u.jsxs(u.Fragment,{children:[t?null:u.jsx(d.Typography,{variant:"h2",children:a?Hi:Dv}),u.jsx(Mv,{onClick:l,href:Tv,target:"_blank",children:u.jsx(H8,{src:Wv+f,alt:Fv,aspectRatio:"1000/783"})})]}):u.jsxs(Nv,{children:[u.jsx(Rv,{variant:"body1_medium",children:xv}),u.jsx("img",{src:Gv,alt:vv})]}),u.jsx(Pv,{variant:"body2",children:Ev}),e?u.jsx(K1,{endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?wv:Iv}):u.jsxs(u.Fragment,{children:[u.jsx(K1,{onClick:c,children:_v}),u.jsxs(jv,{direction:"row",children:[u.jsx(Bv,{}),u.jsx(Vv,{variant:"caption",children:Av})]})]})]})},Zv=()=>{const{availableFeatures:e}=w.useContext(Ve),t=tt(e,Rs);return u.jsxs(Bd,{children:[u.jsxs(d.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?u.jsx(Rd,{width:"20px",height:"20px"}):u.jsx(Pd,{}),u.jsx(jd,{variant:"h2",children:t?Hi:vd})]}),u.jsxs(d.Stack,{gap:"12px",children:[u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},Xv=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=w.useContext(Ve),[o,s]=w.useState(!1),a=w.useRef(null),[i,c]=w.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:m=[],title:y}=l||{},{version:x=""}=l||{},b=m5(x),h=w.useMemo(()=>g5(x),[x]),p=w.useMemo(()=>(m==null?void 0:m.filter(({isAdminPanelLink:I})=>!(!n&&I)))??[],[m,n]);if(w.useEffect(()=>{!h&&l&&Xi(x,!0)},[h,x,l]),w.useLayoutEffect(()=>{var I;(I=a.current)!=null&&I.scrollHeight&&c(a.current.scrollHeight)},[a]),w.useEffect(()=>{l&&!b&&t(s3,{update_version_id:x})},[]),!l||b)return null;const g=I=>{var E;I.stopPropagation(),s(_=>!_),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Xi(x,!1,!0)},C=(I,E="",_=!1,A=!1)=>{var S;if(I.stopPropagation(),_&&A?t(a3,{update_version_id:x}):A&&t(i3,{update_version_id:x}),!_&&E){(S=window.open(E,"_blank"))==null||S.focus();return}v(I,!1),r==null||r.redirectToAdmin()},v=(I,E=!0)=>{I.stopPropagation(),Xi(x,!1),s(!1),E&&t(c3,{update_version_id:x})};return u.jsxs(m4,{children:[u.jsxs(b4,{children:[u.jsx(g4,{variant:"h3",children:y}),u.jsxs(d.Box,{children:[o?u.jsx(d.Tooltip,{title:o5,placement:"bottom",children:u.jsx(d.IconButton,{onClick:v,children:u.jsx(d.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,u.jsx(d.Tooltip,{title:o?r5:Gi,placement:"bottom",children:u.jsx(Br,{onClick:g,children:u.jsx(Ji,{className:o?"":"hiver-up"})})})]})]}),u.jsx(y4,{className:o?"slideDown":"slideUp",ref:a,height:i,children:u.jsxs(C4,{children:[f.map(({title:I,items:E,type:_})=>u.jsxs(w4,{children:[u.jsx(d.Typography,{variant:"body2_medium",children:I}),E.map(A=>{const S=_===u5,{deeplink:L,textHtml:k,imageUrl:D}=A,N=()=>u.jsx(o4,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:k}});return u.jsx(x4,{component:"ul",children:u.jsxs(v4,{component:S?"li":"div",marginLeft:D?"0":"14px",children:[D?u.jsx("img",{src:D}):null,L?u.jsx(Hd,{target:"_blank",underline:"none",onClick:P=>C(P,L),fontSize:"13px",children:N()}):N()]})},k)})]},I)),u.jsx(d.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:p.map(({text:I,link:E,isAdminPanelLink:_})=>u.jsx(E4,{variant:_?"contained":"text",children:u.jsx(I4,{variant:"caption",onClick:A=>C(A,E,_,!0),children:I})},I))})]})})]})},zv=({selectedEmail:e,conversationId:t})=>we({url:$8.replace(":conversationId",""+t),method:Re.PATCH,data:{selectedEmail:e}}),Yv="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",tp=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}},Jv=e=>{const{textRef:t,isOverflow:n}=tp(e.data.label);return u.jsx(d.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:u.jsx(_4,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},qv=e=>u.jsxs(cn.MenuList,{...e,children:[u.jsx(S4,{children:u.jsx(d.Typography,{variant:"body2_medium",children:U4})}),e.children]}),$v=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=tp(e.data.label);return u.jsx(cn.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(A4,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?u.jsx("img",{src:Yv,width:"14px",height:"14px"}):null]})})},Qv=e=>u.jsx(cn.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})]})}),Uv=e=>u.jsx(cn.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}})}),Kv={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"})},eE=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=w.useContext(Ve),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&&zv({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(Xo,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...Xo.getDefaultComponents(),MenuList:qv,Option:$v,SingleValue:Jv,DropdownIndicator:Uv,ValueContainer:Qv},root:n,styles:Kv,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})},tE=d.styled(d.Paper)`
1092
+ `,Vv="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",Gv={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:Hv}=Gv,ep=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=w.useContext(Ve),s=tt(r,Z3),a=tt(r,Rs),i=b=>{b.stopPropagation(),n(Um),o==null||o.redirectToAdmin()},c=b=>{b.stopPropagation(),n(Km),window.open(_v,"_blank")},l=()=>{n(w3,{source:"main_tab"})},f=a?Lv:Tv;return u.jsxs(Dv,{"data-testid":"noConnectors",children:[s?u.jsxs(u.Fragment,{children:[t?null:u.jsx(d.Typography,{variant:"h2",children:a?Hi:Fv}),u.jsx(Rv,{onClick:l,href:Av,target:"_blank",children:u.jsx(G8,{src:Hv+f,alt:Ov,aspectRatio:"1000/783"})})]}):u.jsxs(kv,{children:[u.jsx(Nv,{variant:"body1_medium",children:Cv}),u.jsx("img",{src:Vv,alt:xv})]}),u.jsx(Mv,{variant:"body2",children:vv}),e?u.jsx(K1,{endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?Iv:Ev}):u.jsxs(u.Fragment,{children:[u.jsx(K1,{onClick:c,children:wv}),u.jsxs(Pv,{direction:"row",children:[u.jsx(jv,{}),u.jsx(Bv,{variant:"caption",children:Sv})]})]})]})},Wv=()=>{const{availableFeatures:e}=w.useContext(Ve),t=tt(e,Rs);return u.jsxs(Bd,{children:[u.jsxs(d.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?u.jsx(Rd,{width:"20px",height:"20px"}):u.jsx(Pd,{}),u.jsx(jd,{variant:"h2",children:t?Hi:vd})]}),u.jsxs(d.Stack,{gap:"12px",children:[u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(kn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},Zv=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=w.useContext(Ve),[o,s]=w.useState(!1),a=w.useRef(null),[i,c]=w.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:b=[],title:y}=l||{},{version:x=""}=l||{},m=g5(x),h=w.useMemo(()=>h5(x),[x]),p=w.useMemo(()=>(b==null?void 0:b.filter(({isAdminPanelLink:I})=>!(!n&&I)))??[],[b,n]);if(w.useEffect(()=>{!h&&l&&Xi(x,!0)},[h,x,l]),w.useLayoutEffect(()=>{var I;(I=a.current)!=null&&I.scrollHeight&&c(a.current.scrollHeight)},[a]),w.useEffect(()=>{l&&!m&&t(o3,{update_version_id:x})},[]),!l||m)return null;const g=I=>{var E;I.stopPropagation(),s(_=>!_),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Xi(x,!1,!0)},C=(I,E="",_=!1,A=!1)=>{var S;if(I.stopPropagation(),_&&A?t(s3,{update_version_id:x}):A&&t(a3,{update_version_id:x}),!_&&E){(S=window.open(E,"_blank"))==null||S.focus();return}v(I,!1),r==null||r.redirectToAdmin()},v=(I,E=!0)=>{I.stopPropagation(),Xi(x,!1),s(!1),E&&t(i3,{update_version_id:x})};return u.jsxs(g4,{children:[u.jsxs(m4,{children:[u.jsx(h4,{variant:"h3",children:y}),u.jsxs(d.Box,{children:[o?u.jsx(d.Tooltip,{title:r5,placement:"bottom",children:u.jsx(d.IconButton,{onClick:v,children:u.jsx(d.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,u.jsx(d.Tooltip,{title:o?n5:Gi,placement:"bottom",children:u.jsx(Br,{onClick:g,children:u.jsx(Ji,{className:o?"":"hiver-up"})})})]})]}),u.jsx(b4,{className:o?"slideDown":"slideUp",ref:a,height:i,children:u.jsxs(y4,{children:[f.map(({title:I,items:E,type:_})=>u.jsxs(I4,{children:[u.jsx(d.Typography,{variant:"body2_medium",children:I}),E.map(A=>{const S=_===l5,{deeplink:L,textHtml:k,imageUrl:D}=A,N=()=>u.jsx(r4,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:k}});return u.jsx(C4,{component:"ul",children:u.jsxs(x4,{component:S?"li":"div",marginLeft:D?"0":"14px",children:[D?u.jsx("img",{src:D}):null,L?u.jsx(Hd,{target:"_blank",underline:"none",onClick:P=>C(P,L),fontSize:"13px",children:N()}):N()]})},k)})]},I)),u.jsx(d.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:p.map(({text:I,link:E,isAdminPanelLink:_})=>u.jsx(v4,{variant:_?"contained":"text",children:u.jsx(E4,{variant:"caption",onClick:A=>C(A,E,_,!0),children:I})},I))})]})})]})},Xv=({selectedEmail:e,conversationId:t})=>we({url:q8.replace(":conversationId",""+t),method:Re.PATCH,data:{selectedEmail:e}}),zv="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",tp=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}},Yv=e=>{const{textRef:t,isOverflow:n}=tp(e.data.label);return u.jsx(d.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:u.jsx(w4,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},Jv=e=>u.jsxs(cn.MenuList,{...e,children:[u.jsx(_4,{children:u.jsx(d.Typography,{variant:"body2_medium",children:Q4})}),e.children]}),qv=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=tp(e.data.label);return u.jsx(cn.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(S4,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?u.jsx("img",{src:zv,width:"14px",height:"14px"}):null]})})},$v=e=>u.jsx(cn.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})]})}),Qv=e=>u.jsx(cn.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}})}),Uv={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"})},Kv=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=w.useContext(Ve),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&&Xv({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(Xo,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...Xo.getDefaultComponents(),MenuList:Jv,Option:qv,SingleValue:Yv,DropdownIndicator:Qv,ValueContainer:$v},root:n,styles:Uv,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})},eE=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?`,Sx="Select an object to create",Ax="Select an object t
1099
1099
  padding: 20px 14px;
1100
1100
  box-sizing: border-box;
1101
1101
  overflow: hidden;
1102
- `,nE=d.styled("img")`
1102
+ `,tE=d.styled("img")`
1103
1103
  height: 16px;
1104
1104
  width: 16px;
1105
- `,rE=d.styled(d.Box)`
1105
+ `,nE=d.styled(d.Box)`
1106
1106
  margin-top: 12px;
1107
1107
  height: 100%;
1108
- `,oE="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",qc=({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&&Ne.createPortal(u.jsxs(tE,{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(nE,{src:oE})})}),u.jsx(d.Typography,{children:o})]}),u.jsx(rE,{children:e})]}),i.current)},np=e=>e.common.previewCardData,rp=e=>e.common.previewCardApiStatus,sE=e=>e.common.selectedSuggestionType,aE=d.styled(d.Stack)`
1108
+ `,rE="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",qc=({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&&Ne.createPortal(u.jsxs(eE,{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(tE,{src:rE})})}),u.jsx(d.Typography,{children:o})]}),u.jsx(nE,{children:e})]}),i.current)},np=e=>e.common.previewCardData,rp=e=>e.common.previewCardApiStatus,oE=e=>e.common.selectedSuggestionType,sE=d.styled(d.Stack)`
1109
1109
  width: 100%;
1110
1110
  border-radius: 8px;
1111
1111
  border: 1px solid ${d.theme.palette.gray.gray5};
1112
- `,iE=d.styled(d.Stack)`
1112
+ `,aE=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?`,Sx="Select an object to create",Ax="Select an object t
1119
1119
  white-space: nowrap;
1120
1120
  overflow: hidden;
1121
1121
  }
1122
- `,cE=d.styled(d.Button)`
1122
+ `,iE=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?`,Sx="Select an object to create",Ax="Select an object t
1127
1127
  }
1128
1128
  margin-top: 10px;
1129
1129
  display: block;
1130
- `,lE=d.styled(d.Stack)`
1130
+ `,cE=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?`,Sx="Select an object to create",Ax="Select an object t
1138
1138
  height: 20px;
1139
1139
  flex-shrink: 0;
1140
1140
  }
1141
- `,op=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=zt(),[s,a]=w.useState(!1),[i,c]=w.useState(!0),{id:l="",cardTitle:f="",logoUrl:m}=e||{},y=t===K.LOADING,x=h=>{h.stopPropagation();const p=h.currentTarget.offsetWidth<h.currentTarget.scrollWidth;a(!!p)},b=h=>{var g;o(qr({id:n,args:r,isRefresh:!0}));const p=h.target.tagName==="BUTTON"?(g=h.target)==null?void 0:g.firstChild:h.target;p.className&&(p.className=""),setTimeout(()=>p.className="selected",1)};return u.jsxs(aE,{children:[u.jsxs(iE,{direction:"row",justifyContent:"space-between",children:[y?u.jsxs(d.Stack,{gap:"6px",direction:"row",children:[u.jsx(kn,{width:"16px",height:"24px"}),u.jsx(kn,{width:"100px",height:"24px"})]}):u.jsxs(lE,{children:[m&&u.jsx("img",{src:m,alt:f}),u.jsx(d.Tooltip,{title:s?f:"",children:u.jsx(d.Typography,{variant:"h4",onMouseOver:h=>x(h),onMouseLeave:h=>x(h),children:f})})]}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",children:[i?u.jsx(d.Tooltip,{title:Cd,placement:"bottom",children:u.jsx(Br,{onClick:h=>b(h),children:u.jsx("img",{src:Y1})})}):null,u.jsx(d.Tooltip,{title:i?xd:Gi,placement:"bottom",children:u.jsx(Br,{onClick:()=>c(h=>!h),children:u.jsx(Ji,{className:i?"":"hiver-up"})})})]})]}),u.jsx(W1,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},sp={values:{},errors:{}},Nt={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"},uE=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Nt.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 Nt.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 Nt.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case Nt.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case Nt.CLEAR_FIELDS:{const{fieldNames:o}=r??{};if(!Array.isArray(o))return e;const s={...e.values},a={...e.errors};for(const i of o)delete s[i],delete a[i];return{...e,values:s,errors:a}}case Nt.RESET_STATE:return sp}return e},ap=()=>w.useReducer(uE,sp),ip=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(y,x)=>{t({type:Nt.SET_FIELD_VALUE,payload:{value:{value:x,name:y}}})},a=w.useCallback(()=>Object.keys(o).filter(x=>!!o[x]).length>0,[o]),i=y=>{y.stopPropagation();const{name:x,value:b}=(y==null?void 0:y.target)||{};s(x,b)},c=(y,x)=>{y.stopPropagation();const{name:b}=(y==null?void 0:y.target)||{};s(b,x)},l=(y,x)=>{s(y,x||"")},f=(y,x)=>{e.errors[y]!==x&&t({type:Nt.SET_FIELD_ERROR,payload:{value:{name:y,value:x}}})},m=(y,x)=>{if(x){const b=x[y];b==null||b.forEach(h=>{var p;s(h,""),x[h]&&m(h,x),(p=n[h])!=null&&p.isRequired&&f(h,!0)})}};return w.useEffect(()=>{if(Array.isArray(r))return()=>{const y=r.map(x=>x.name);t({type:Nt.CLEAR_FIELDS,payload:{fieldNames:y}})}},[r,t]),{setValue:s,isErrorInValidations:a,inputChangeHandler:i,checkboxChangeHandler:c,dateChangeHandler:l,handleValidationError:f,clearDependentFields:m}},cp=({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,m)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const x=W8(n,y==null?void 0:y.args),b=Object.values((y==null?void 0:y.args)||{});if(x.length===b.length){r(pr({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:{...Yo(n,y==null?void 0:y.args),...Yo(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:m}));return}return l([])}};return{...o,[s.name]:i}},{}),lp=({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 m,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(Ea({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...Yo(n,(m=a==null?void 0:a.interfaceDetails)==null?void 0:m.args),...Yo(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...Yo(f,i.args)}}))}}}},{}),up=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=zt(),s=w.useMemo(()=>{if(e&&e.length){const i=cp({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const m=f.columns;if(!m)return l;const y=cp({formFields:m,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=w.useMemo(()=>{const i=lp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const m=f.columns;if(!m)return l;const y=lp({formFields:m,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}},dE=async({formId:e,args:t})=>{try{const n=await we({url:lt(ux,{formId:e}),data:{args:t},method:Re.POST});return(n==null?void 0:n.data).fieldList.map(o=>Jc(o))}catch(n){throw console.error(n),n}},fE=({formId:e,args:t,enabled:n,delay:r=500})=>{const[o,s]=w.useState(t);return w.useEffect(()=>{const a=setTimeout(()=>s(t),r);return()=>clearTimeout(a)},[t,r]),Ln({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>dE({formId:e,args:t}),refetchOnMount:!1,enabled:n})},dp=({setShown:e,shown:t,title:n,description:r,buttons:o})=>u.jsx(hr,{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()))})]})}),fp="connector-agent-expanded-write-form",pp=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s})=>{var go;const{userGroupId:a}=kt()||{},[i,c]=w.useState(null),[l,f]=w.useState(!1),m=w.useRef(null),{conversationId:y,availableFeatures:x,sendTrackingEvent:b,currentSmIds:h,connectorFunctions:{redirectToAdmin:p,getFormElement:g,toggleFormElement:C},stackingContext:v,isAdmin:I}=w.useContext(Ve),[E,_]=ap(),A=ye($1),S=ye(t?rv:J1),L=ye(sv),k=ye(ov),D=ye(cv),N=ye(lv),P=ye(uv),B=ye(dv),Y=ye(fv),$=ye(Q1),H=k==null?void 0:k[(i==null?void 0:i.value)??""],X=tt(x,t5),q=(H==null?void 0:H.hasCustomFields)??!1,{customFieldsArgsPresent:se,customFieldsArgs:de}=w.useMemo(()=>{if(!q)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const he=Object.values((H==null?void 0:H.customFieldsArgs)??{}).every(it=>!!E.values[it]);if(!he)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const Ee=(H==null?void 0:H.customFieldsArgs)??{},et=Jo(E,Ee);return{customFieldsArgsPresent:he,customFieldsArgs:et}},[q,E,H==null?void 0:H.customFieldsArgs]),V=q&&se&&X,{data:W}=fE({formId:String(i==null?void 0:i.value),args:de,enabled:V}),M=w.useMemo(()=>V?W??[]:[],[V,W]),G=H==null?void 0:H.expandedView,{formConfigs:z,formViewConfigs:ne}=w.useMemo(()=>{if(i&&"value"in i&&L&&L[i.value]&&Array.isArray(L[i.value])){const Ee=[...L[i.value],...M],et=[{id:i.value,formFields:Ee}];return{formConfigs:et,formViewConfigs:G?Z8(Ee,R1):et}}const he=[{id:"emptyFormId",formFields:[]}];return{formConfigs:he,formViewConfigs:he}},[L,M,i,G]),ae=w.useMemo(()=>{var Ee;const he=((Ee=z==null?void 0:z[0])==null?void 0:Ee.formFields)||[];return Yc({formFields:he})},[z]),{setValue:j,inputChangeHandler:ee,checkboxChangeHandler:ve,dateChangeHandler:J,clearDependentFields:Pe,handleValidationError:je,isErrorInValidations:ze}=ip({state:E,dispatch:_,validations:ae,dynamicFields:M}),{userGroupId:Mt}=kt()||{},{fetchConfig:In,createConfig:Ct}=up({formFields:z[0].formFields,formId:z[0].id,formState:E,conversationId:y}),Ge=(go=A==null?void 0:A.forms.find(he=>he.type==="edit"))==null?void 0:go.id,{externalResourceId:Qe}=A??{},wn=[N,P,Y].includes(K.LOADING),Pt=w.useMemo(()=>!G||!g?null:g(),[G,g]),xt=zt();w.useEffect(()=>(G&&C&&C(!0),()=>{G&&C&&C(!1)}),[G,C]),w.useEffect(()=>{xt(P1(t?!(B&&"values"in B&&"values"in E&&JSON.stringify(U1(E.values))===JSON.stringify(U1(B.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,B,E,xt]),w.useEffect(()=>(t&&B&&_({type:Nt.SET_FIELDS,payload:B}),()=>{_({type:Nt.SET_FIELDS,payload:{values:{}}})}),[t,_,B]),w.useEffect(()=>{i!==null&&s(he=>({...he,object_type:i.label}))},[i,s]),w.useEffect(()=>{if(E.values){const he=L1(z[0].formFields,E.values);s(Ee=>({...Ee,fields_filled:he}))}},[E,z,s]),w.useEffect(()=>{if(n&&!t)return c(n);S&&S.length&&c(t&&Ge?S.find(he=>he.value===Ge)??null:he=>he||!k?he:S.length===1?S[0]:S.find(et=>!k[et.value].expandedView)??null)},[S,k,t,Ge,n]);const wr=()=>{c(m.current),f(!1),_({type:Nt.RESET_STATE})},zn=(he,Ee)=>{j(he,Ee)},jt=(he,Ee,et)=>{if(Ee.action==="clear"&&Ee.name&&(j(Ee.name,""),i!=null&&i.value&&Pe(Ee.name,D==null?void 0:D[i.value]),ae[Ee.name].isRequired&&je(Ee.name,!0)),he&&typeof he=="object"&&"label"in he&&typeof he.label=="string"&&"value"in he&&(typeof he.value=="string"||typeof he.value=="number")&&typeof Ee.name<"u")if(Ee.name==="form-object")m.current={value:he.value,label:he.label},E.values&&he.value!==(i==null?void 0:i.value)&&(Object.values(E.values).filter(vt=>vt!=="").length>0?f(!0):wr());else{let it=!1;et&&(it=et.isMultiSelect||!1);const vt=!it&&"prefillValues"in he&&he.prefillValues,Ut=it?[{value:he.value,label:he.label}]:{value:he.value,label:he.label};if(j(Ee.name,Ut),vt)for(const Kt in vt)j(Kt,vt[Kt]);i!=null&&i.value&&Pe(Ee.name,D==null?void 0:D[i.value])}},_n=()=>{if(!ze()&&Ge&&(k!=null&&k[Ge])&&y&&Qe){const{connectorName:he,title:Ee}=A;b(v3,{connector_name:he,card_title:Ee,sm_ids:h,ug_id:Mt});const et=k[Ge].interfaceDetails;if(!et||!B)return;const{id:it,args:vt={},previousArgs:Ut={}}=et,Kt=Jo(B,Ut),Et=Jo(E,vt);xt(_a({formId:String(Ge),conversationId:y,args:Et,previousArgs:Kt,externalResourceId:Qe,interfaceId:it,successCallback:()=>{o()}})).unwrap().then(()=>{var Tr;b(w3,{connector_name:he,card_title:Ee,sm_ids:h,ug_id:Mt});const Bt=((Tr=z[0].formFields)==null?void 0:Tr.filter(Sn=>Sn.isCustomField))??[],Ar=Bt.length>0,mo=Bt.some(Sn=>E.values[Sn.name]);b(V3,{sm_ids:h,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name,object_type:i==null?void 0:i.label,has_custom_fields:Ar,custom_fields_used:mo})}).finally(()=>{xt(Qr(null))})}},ho=()=>{if(!ze()&&i&&(k!=null&&k[i.value])&&y){const he=k==null?void 0:k[i.value].interfaceDetails;if(!he)return;const{id:Ee,args:et={}}=he,it=Jo(E,et);xt(wa({formId:String(i.value),conversationId:y,args:it,interfaceId:Ee,successCallback:()=>{o()}})).unwrap().then(()=>{var Et;b(d3,{object_type:i});const vt=((Et=z[0].formFields)==null?void 0:Et.filter(Bt=>Bt.isCustomField))??[],Ut=vt.length>0,Kt=vt.some(Bt=>E.values[Bt.name]);b(B3,{sm_ids:h,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name,object_type:i==null?void 0:i.label,has_custom_fields:Ut,custom_fields_used:Kt})})}},Yn=[{label:"Cancel",action:()=>f(!1),variant:"text"},{label:"Continue",action:wr}],_r=()=>{p(H==null?void 0:H.connectorId,{isEdit:!0,tabIndex:2,editCard:(H==null?void 0:H.cardId)??""}),b(j3,{sm_ids:h,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name})},Sr=I&&X&&(H==null?void 0:H.cardAccessMode)==="read_write",Jn=u.jsxs(bp,{className:G?fp:"",children:[u.jsx(dp,{shown:l,setShown:f,title:Ex,description:Ix,buttons:Yn}),G?u.jsxs(pE,{children:[u.jsxs(d.Typography,{children:[t?"Edit":"Add"," to ",H.connectorName]}),u.jsx(d.Tooltip,{title:"Close Popup",placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(hE,{src:H1})})})]}):null,u.jsxs(mp,{spacing:3,children:[!t&&!G?u.jsx(dr,{type:"select",placeholder:N1,options:S,value:i,name:"form-object",selectChangeHandler:jt,label:Sx,labelSpacing:.5,validation:{isRequired:!0}}):null,u.jsx(A1,{showGlobalLoader:Y===K.LOADING,formConfig:ne,selectChangeHandler:jt,inputChangeHandler:ee,checkboxChangeHandler:ve,dateChangeHandler:J,tableChangeHandler:zn,onValidationError:je,fieldsSpacing:3,labelSpacing:.5,fetchConfig:In,createConfig:Ct,values:E.values,validations:ae,...G?{cols:R1,stackIndex:v.expandedForm}:null}),Sr?u.jsx(d.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:u.jsx(d.Button,{variant:"text",startIcon:u.jsx(gE,{}),onClick:_r,size:"small",children:h5})}):null]}),u.jsxs(gp,{children:[u.jsx(d.Button,{disabled:ze()||wn||!$,onClick:t?_n:ho,size:"small",...G?{style:{order:2}}:null,children:t?a5:s5}),u.jsx(yp,{variant:"outlined",color:"tertiary",size:"small",onClick:r,disabled:wn,children:Wi})]})]});return G&&Pt?Ne.createPortal(Jn,Pt):Jn},hp=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},T.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),gp=d.styled(d.Box)`
1141
+ `,op=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=zt(),[s,a]=w.useState(!1),[i,c]=w.useState(!0),{id:l="",cardTitle:f="",logoUrl:b}=e||{},y=t===K.LOADING,x=h=>{h.stopPropagation();const p=h.currentTarget.offsetWidth<h.currentTarget.scrollWidth;a(!!p)},m=h=>{var g;o(qr({id:n,args:r,isRefresh:!0}));const p=h.target.tagName==="BUTTON"?(g=h.target)==null?void 0:g.firstChild:h.target;p.className&&(p.className=""),setTimeout(()=>p.className="selected",1)};return u.jsxs(sE,{children:[u.jsxs(aE,{direction:"row",justifyContent:"space-between",children:[y?u.jsxs(d.Stack,{gap:"6px",direction:"row",children:[u.jsx(kn,{width:"16px",height:"24px"}),u.jsx(kn,{width:"100px",height:"24px"})]}):u.jsxs(cE,{children:[b&&u.jsx("img",{src:b,alt:f}),u.jsx(d.Tooltip,{title:s?f:"",children:u.jsx(d.Typography,{variant:"h4",onMouseOver:h=>x(h),onMouseLeave:h=>x(h),children:f})})]}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",children:[i?u.jsx(d.Tooltip,{title:Cd,placement:"bottom",children:u.jsx(Br,{onClick:h=>m(h),children:u.jsx("img",{src:Y1})})}):null,u.jsx(d.Tooltip,{title:i?xd:Gi,placement:"bottom",children:u.jsx(Br,{onClick:()=>c(h=>!h),children:u.jsx(Ji,{className:i?"":"hiver-up"})})})]})]}),u.jsx(W1,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},sp={values:{},errors:{}},Nt={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"},lE=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Nt.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 Nt.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 Nt.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case Nt.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case Nt.CLEAR_FIELDS:{const{fieldNames:o}=r??{};if(!Array.isArray(o))return e;const s={...e.values},a={...e.errors};for(const i of o)delete s[i],delete a[i];return{...e,values:s,errors:a}}case Nt.RESET_STATE:return sp}return e},ap=()=>w.useReducer(lE,sp),ip=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(y,x)=>{t({type:Nt.SET_FIELD_VALUE,payload:{value:{value:x,name:y}}})},a=w.useCallback(()=>Object.keys(o).filter(x=>!!o[x]).length>0,[o]),i=y=>{y.stopPropagation();const{name:x,value:m}=(y==null?void 0:y.target)||{};s(x,m)},c=(y,x)=>{y.stopPropagation();const{name:m}=(y==null?void 0:y.target)||{};s(m,x)},l=(y,x)=>{s(y,x||"")},f=(y,x)=>{e.errors[y]!==x&&t({type:Nt.SET_FIELD_ERROR,payload:{value:{name:y,value:x}}})},b=(y,x)=>{if(x){const m=x[y];m==null||m.forEach(h=>{var p;s(h,""),x[h]&&b(h,x),(p=n[h])!=null&&p.isRequired&&f(h,!0)})}};return w.useEffect(()=>{if(Array.isArray(r))return()=>{const y=r.map(x=>x.name);t({type:Nt.CLEAR_FIELDS,payload:{fieldNames:y}})}},[r,t]),{setValue:s,isErrorInValidations:a,inputChangeHandler:i,checkboxChangeHandler:c,dateChangeHandler:l,handleValidationError:f,clearDependentFields:b}},cp=({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,b)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const x=H8(n,y==null?void 0:y.args),m=Object.values((y==null?void 0:y.args)||{});if(x.length===m.length){r(pr({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:{...Yo(n,y==null?void 0:y.args),...Yo(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:b}));return}return l([])}};return{...o,[s.name]:i}},{}),lp=({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 b,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(Ea({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...Yo(n,(b=a==null?void 0:a.interfaceDetails)==null?void 0:b.args),...Yo(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...Yo(f,i.args)}}))}}}},{}),up=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=zt(),s=w.useMemo(()=>{if(e&&e.length){const i=cp({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const b=f.columns;if(!b)return l;const y=cp({formFields:b,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=w.useMemo(()=>{const i=lp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const b=f.columns;if(!b)return l;const y=lp({formFields:b,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}},uE=async({formId:e,args:t})=>{try{const n=await we({url:lt(lx,{formId:e}),data:{args:t},method:Re.POST});return(n==null?void 0:n.data).fieldList.map(o=>Jc(o))}catch(n){throw console.error(n),n}},dE=({formId:e,args:t,enabled:n,delay:r=500})=>{const[o,s]=w.useState(t);return w.useEffect(()=>{const a=setTimeout(()=>s(t),r);return()=>clearTimeout(a)},[t,r]),Ln({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>uE({formId:e,args:t}),refetchOnMount:!1,enabled:n})},dp=({setShown:e,shown:t,title:n,description:r,buttons:o})=>u.jsx(hr,{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()))})]})}),fp="connector-agent-expanded-write-form",pp=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s})=>{var go;const{userGroupId:a}=kt()||{},[i,c]=w.useState(null),[l,f]=w.useState(!1),b=w.useRef(null),{conversationId:y,availableFeatures:x,sendTrackingEvent:m,currentSmIds:h,connectorFunctions:{redirectToAdmin:p,getFormElement:g,toggleFormElement:C},stackingContext:v,isAdmin:I}=w.useContext(Ve),[E,_]=ap(),A=ye($1),S=ye(t?nv:J1),L=ye(ov),k=ye(rv),D=ye(iv),N=ye(cv),P=ye(lv),B=ye(uv),Y=ye(dv),$=ye(Q1),H=k==null?void 0:k[(i==null?void 0:i.value)??""],X=tt(x,e5),q=(H==null?void 0:H.hasCustomFields)??!1,{customFieldsArgsPresent:se,customFieldsArgs:de}=w.useMemo(()=>{if(!q)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const he=Object.values((H==null?void 0:H.customFieldsArgs)??{}).every(it=>!!E.values[it]);if(!he)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const Ee=(H==null?void 0:H.customFieldsArgs)??{},et=Jo(E,Ee);return{customFieldsArgsPresent:he,customFieldsArgs:et}},[q,E,H==null?void 0:H.customFieldsArgs]),V=q&&se&&X,{data:W}=dE({formId:String(i==null?void 0:i.value),args:de,enabled:V}),M=w.useMemo(()=>V?W??[]:[],[V,W]),G=H==null?void 0:H.expandedView,{formConfigs:z,formViewConfigs:ne}=w.useMemo(()=>{if(i&&"value"in i&&L&&L[i.value]&&Array.isArray(L[i.value])){const Ee=[...L[i.value],...M],et=[{id:i.value,formFields:Ee}];return{formConfigs:et,formViewConfigs:G?W8(Ee,R1):et}}const he=[{id:"emptyFormId",formFields:[]}];return{formConfigs:he,formViewConfigs:he}},[L,M,i,G]),ae=w.useMemo(()=>{var Ee;const he=((Ee=z==null?void 0:z[0])==null?void 0:Ee.formFields)||[];return Yc({formFields:he})},[z]),{setValue:j,inputChangeHandler:ee,checkboxChangeHandler:ve,dateChangeHandler:J,clearDependentFields:Pe,handleValidationError:je,isErrorInValidations:ze}=ip({state:E,dispatch:_,validations:ae,dynamicFields:M}),{userGroupId:Mt}=kt()||{},{fetchConfig:In,createConfig:Ct}=up({formFields:z[0].formFields,formId:z[0].id,formState:E,conversationId:y}),Ge=(go=A==null?void 0:A.forms.find(he=>he.type==="edit"))==null?void 0:go.id,{externalResourceId:Qe}=A??{},wn=[N,P,Y].includes(K.LOADING),Pt=w.useMemo(()=>!G||!g?null:g(),[G,g]),xt=zt();w.useEffect(()=>(G&&C&&C(!0),()=>{G&&C&&C(!1)}),[G,C]),w.useEffect(()=>{xt(P1(t?!(B&&"values"in B&&"values"in E&&JSON.stringify(U1(E.values))===JSON.stringify(U1(B.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,B,E,xt]),w.useEffect(()=>(t&&B&&_({type:Nt.SET_FIELDS,payload:B}),()=>{_({type:Nt.SET_FIELDS,payload:{values:{}}})}),[t,_,B]),w.useEffect(()=>{i!==null&&s(he=>({...he,object_type:i.label}))},[i,s]),w.useEffect(()=>{if(E.values){const he=L1(z[0].formFields,E.values);s(Ee=>({...Ee,fields_filled:he}))}},[E,z,s]),w.useEffect(()=>{if(n&&!t)return c(n);S&&S.length&&c(t&&Ge?S.find(he=>he.value===Ge)??null:he=>he||!k?he:S.length===1?S[0]:S.find(et=>!k[et.value].expandedView)??null)},[S,k,t,Ge,n]);const wr=()=>{c(b.current),f(!1),_({type:Nt.RESET_STATE})},zn=(he,Ee)=>{j(he,Ee)},jt=(he,Ee,et)=>{if(Ee.action==="clear"&&Ee.name&&(j(Ee.name,""),i!=null&&i.value&&Pe(Ee.name,D==null?void 0:D[i.value]),ae[Ee.name].isRequired&&je(Ee.name,!0)),he&&typeof he=="object"&&"label"in he&&typeof he.label=="string"&&"value"in he&&(typeof he.value=="string"||typeof he.value=="number")&&typeof Ee.name<"u")if(Ee.name==="form-object")b.current={value:he.value,label:he.label},E.values&&he.value!==(i==null?void 0:i.value)&&(Object.values(E.values).filter(vt=>vt!=="").length>0?f(!0):wr());else{let it=!1;et&&(it=et.isMultiSelect||!1);const vt=!it&&"prefillValues"in he&&he.prefillValues,Ut=it?[{value:he.value,label:he.label}]:{value:he.value,label:he.label};if(j(Ee.name,Ut),vt)for(const Kt in vt)j(Kt,vt[Kt]);i!=null&&i.value&&Pe(Ee.name,D==null?void 0:D[i.value])}},_n=()=>{if(!ze()&&Ge&&(k!=null&&k[Ge])&&y&&Qe){const{connectorName:he,title:Ee}=A;m(x3,{connector_name:he,card_title:Ee,sm_ids:h,ug_id:Mt});const et=k[Ge].interfaceDetails;if(!et||!B)return;const{id:it,args:vt={},previousArgs:Ut={}}=et,Kt=Jo(B,Ut),Et=Jo(E,vt);xt(_a({formId:String(Ge),conversationId:y,args:Et,previousArgs:Kt,externalResourceId:Qe,interfaceId:it,successCallback:()=>{o()}})).unwrap().then(()=>{var Tr;m(I3,{connector_name:he,card_title:Ee,sm_ids:h,ug_id:Mt});const Bt=((Tr=z[0].formFields)==null?void 0:Tr.filter(Sn=>Sn.isCustomField))??[],Ar=Bt.length>0,mo=Bt.some(Sn=>E.values[Sn.name]);m(B3,{sm_ids:h,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name,object_type:i==null?void 0:i.label,has_custom_fields:Ar,custom_fields_used:mo})}).finally(()=>{xt(Qr(null))})}},ho=()=>{if(!ze()&&i&&(k!=null&&k[i.value])&&y){const he=k==null?void 0:k[i.value].interfaceDetails;if(!he)return;const{id:Ee,args:et={}}=he,it=Jo(E,et);xt(wa({formId:String(i.value),conversationId:y,args:it,interfaceId:Ee,successCallback:()=>{o()}})).unwrap().then(()=>{var Et;m(u3,{object_type:i});const vt=((Et=z[0].formFields)==null?void 0:Et.filter(Bt=>Bt.isCustomField))??[],Ut=vt.length>0,Kt=vt.some(Bt=>E.values[Bt.name]);m(j3,{sm_ids:h,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name,object_type:i==null?void 0:i.label,has_custom_fields:Ut,custom_fields_used:Kt})})}},Yn=[{label:"Cancel",action:()=>f(!1),variant:"text"},{label:"Continue",action:wr}],_r=()=>{p(H==null?void 0:H.connectorId,{isEdit:!0,tabIndex:2,editCard:(H==null?void 0:H.cardId)??""}),m(P3,{sm_ids:h,ug_id:a,connector_name:H==null?void 0:H.connectorName,form_object:H==null?void 0:H.name})},Sr=I&&X&&(H==null?void 0:H.cardAccessMode)==="read_write",Jn=u.jsxs(bp,{className:G?fp:"",children:[u.jsx(dp,{shown:l,setShown:f,title:vx,description:Ex,buttons:Yn}),G?u.jsxs(fE,{children:[u.jsxs(d.Typography,{children:[t?"Edit":"Add"," to ",H.connectorName]}),u.jsx(d.Tooltip,{title:"Close Popup",placement:"bottom",children:u.jsx(d.IconButton,{onClick:r,children:u.jsx(pE,{src:H1})})})]}):null,u.jsxs(mp,{spacing:3,children:[!t&&!G?u.jsx(dr,{type:"select",placeholder:N1,options:S,value:i,name:"form-object",selectChangeHandler:jt,label:_x,labelSpacing:.5,validation:{isRequired:!0}}):null,u.jsx(A1,{showGlobalLoader:Y===K.LOADING,formConfig:ne,selectChangeHandler:jt,inputChangeHandler:ee,checkboxChangeHandler:ve,dateChangeHandler:J,tableChangeHandler:zn,onValidationError:je,fieldsSpacing:3,labelSpacing:.5,fetchConfig:In,createConfig:Ct,values:E.values,validations:ae,...G?{cols:R1,stackIndex:v.expandedForm}:null}),Sr?u.jsx(d.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:u.jsx(d.Button,{variant:"text",startIcon:u.jsx(hE,{}),onClick:_r,size:"small",children:p5})}):null]}),u.jsxs(gp,{children:[u.jsx(d.Button,{disabled:ze()||wn||!$,onClick:t?_n:ho,size:"small",...G?{style:{order:2}}:null,children:t?s5:o5}),u.jsx(yp,{variant:"outlined",color:"tertiary",size:"small",onClick:r,disabled:wn,children:Wi})]})]});return G&&Pt?Ne.createPortal(Jn,Pt):Jn},hp=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},T.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),gp=d.styled(d.Box)`
1143
1143
  box-sizing: border-box;
1144
1144
  height: 52px;
1145
1145
  background-color: var(--form-background-color, inherit);
@@ -1186,7 +1186,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1186
1186
  color: ${d.theme.palette.purple.primary} !important;
1187
1187
  border: 1px solid ${d.theme.palette.purple.primary} !important;
1188
1188
  }
1189
- `,pE=d.styled(d.Stack)`
1189
+ `,fE=d.styled(d.Stack)`
1190
1190
  box-sizing: border-box;
1191
1191
  flex-flow: row nowrap;
1192
1192
  justify-content: space-between;
@@ -1198,7 +1198,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1198
1198
  background-color: var(--form-background-color, inherit);
1199
1199
  padding-top: 20px;
1200
1200
  padding-bottom: 10px;
1201
- `,hE=d.styled("img")`
1201
+ `,pE=d.styled("img")`
1202
1202
  height: 16px;
1203
1203
  width: 16px;
1204
1204
  `;d.styled(d.Button)`
@@ -1206,12 +1206,12 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1206
1206
  &:hover {
1207
1207
  color: ${d.theme.palette.purple.primary};
1208
1208
  }
1209
- `;const gE=d.styled(hp)`
1209
+ `;const hE=d.styled(hp)`
1210
1210
  fill: ${d.theme.palette.purple.primary};
1211
1211
  path {
1212
1212
  fill: ${d.theme.palette.purple.primary} !important;
1213
1213
  }
1214
- `,mE=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=zt(),r=ye(np),o=ye(rp),s=ye(av),a=ye(q1),[i,c]=w.useState(!1),[l,f]=w.useState(null),[m,y]=w.useState(""),[x,b]=w.useState({}),{conversationId:h,sendTrackingEvent:p,email:g}=w.useContext(Ve);w.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const C={externalResourceId:m},v=o===K.LOADING,I=s===K.LOADING,E=()=>{!i&&l&&"value"in l&&(p(h3,{object_type:l.label}),n(qr({id:String(l==null?void 0:l.value),args:C})).unwrap().catch(N=>{(N==null?void 0:N.status)===400?_e({message:k1,type:qe}):_e({message:gx,type:qe})})),c(N=>!N)},_=()=>{l&&"value"in l&&h&&n(Aa({id:String(l.value),externalResourceId:m,conversationId:h,email:g})).unwrap().then(()=>{p(f3,{object_type:l.label,input_type:m}),_e({message:bx,type:rn}),e(!1),t()}).catch(N=>{(N==null?void 0:N.status)===400?_e({message:k1,type:qe}):(N==null?void 0:N.status)===409?_e({message:mx,type:qe}):_e({message:yx,type:qe})})},A=()=>{e(!1),c(!1)},S=(N,P)=>{N&&typeof N=="object"&&"label"in N&&typeof N.label=="string"&&"value"in N&&(typeof N.value=="string"||typeof N.value=="number")&&typeof P.name<"u"&&(f({value:N.value,label:N.label}),y(""))},L=N=>{N.stopPropagation();const{value:P}=(N==null?void 0:N.target)||{};y(P),c(!1)},k=(N,P)=>{b(B=>({...B,[N]:!!P}))},D=()=>Object.keys(x).filter(P=>x[P]).length>0;return u.jsxs(bp,{children:[u.jsxs(mp,{spacing:3,children:[u.jsx(dr,{type:"select",placeholder:N1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:Ax,labelSpacing:.5,validation:{isRequired:!0},onValidationError:k}),u.jsx(dr,{type:"text",placeholder:Tx,value:m,name:"resourceId",inputChangeHandler:L,label:Lx,labelSpacing:.5,validation:{isRequired:!0,validate:Uy()},onValidationError:k}),i?u.jsx(op,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:C}):null,u.jsx(cE,{fullWidth:!0,disabled:D()||v,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?Q4:$4})]}),u.jsxs(gp,{children:[u.jsx(d.Button,{onClick:_,disabled:D()||I,size:"small",children:Ed}),u.jsx(yp,{color:"tertiary",variant:"outlined",onClick:A,disabled:I,size:"small",children:Wi})]})]})},bE=d.styled(d.Button)`
1214
+ `,gE=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=zt(),r=ye(np),o=ye(rp),s=ye(sv),a=ye(q1),[i,c]=w.useState(!1),[l,f]=w.useState(null),[b,y]=w.useState(""),[x,m]=w.useState({}),{conversationId:h,sendTrackingEvent:p,email:g}=w.useContext(Ve);w.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const C={externalResourceId:b},v=o===K.LOADING,I=s===K.LOADING,E=()=>{!i&&l&&"value"in l&&(p(p3,{object_type:l.label}),n(qr({id:String(l==null?void 0:l.value),args:C})).unwrap().catch(N=>{(N==null?void 0:N.status)===400?_e({message:k1,type:qe}):_e({message:hx,type:qe})})),c(N=>!N)},_=()=>{l&&"value"in l&&h&&n(Aa({id:String(l.value),externalResourceId:b,conversationId:h,email:g})).unwrap().then(()=>{p(d3,{object_type:l.label,input_type:b}),_e({message:mx,type:rn}),e(!1),t()}).catch(N=>{(N==null?void 0:N.status)===400?_e({message:k1,type:qe}):(N==null?void 0:N.status)===409?_e({message:gx,type:qe}):_e({message:bx,type:qe})})},A=()=>{e(!1),c(!1)},S=(N,P)=>{N&&typeof N=="object"&&"label"in N&&typeof N.label=="string"&&"value"in N&&(typeof N.value=="string"||typeof N.value=="number")&&typeof P.name<"u"&&(f({value:N.value,label:N.label}),y(""))},L=N=>{N.stopPropagation();const{value:P}=(N==null?void 0:N.target)||{};y(P),c(!1)},k=(N,P)=>{m(B=>({...B,[N]:!!P}))},D=()=>Object.keys(x).filter(P=>x[P]).length>0;return u.jsxs(bp,{children:[u.jsxs(mp,{spacing:3,children:[u.jsx(dr,{type:"select",placeholder:N1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:Sx,labelSpacing:.5,validation:{isRequired:!0},onValidationError:k}),u.jsx(dr,{type:"text",placeholder:Ax,value:b,name:"resourceId",inputChangeHandler:L,label:Tx,labelSpacing:.5,validation:{isRequired:!0,validate:Qy()},onValidationError:k}),i?u.jsx(op,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:C}):null,u.jsx(iE,{fullWidth:!0,disabled:D()||v,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?$4:q4})]}),u.jsxs(gp,{children:[u.jsx(d.Button,{onClick:_,disabled:D()||I,size:"small",children:Ed}),u.jsx(yp,{color:"tertiary",variant:"outlined",onClick:A,disabled:I,size:"small",children:Wi})]})]})},mE=d.styled(d.Button)`
1215
1215
  &:hover {
1216
1216
  background-color: #e3e9ff !important;
1217
1217
  color: ${d.theme.palette.purple.primary} !important;
@@ -1225,14 +1225,14 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1225
1225
  & .content__btn {
1226
1226
  margin-left: 8px;
1227
1227
  }
1228
- `,yE=d.styled(d.Button)`
1228
+ `,bE=d.styled(d.Button)`
1229
1229
  & path {
1230
1230
  fill: #fff;
1231
1231
  }
1232
1232
  & .content__btn {
1233
1233
  margin-left: 8px;
1234
1234
  }
1235
- `,CE=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},T.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),T.createElement("g",{mask:"url(#mask0_4649_80352)"},T.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"}))),xE=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.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"})),vE=({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:vx}),u.jsxs(d.Stack,{gap:"12px",children:[n?u.jsxs(yE,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(CE,{}),u.jsx("span",{className:"content__btn",children:_d})]}):null,r?u.jsxs(bE,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(xE,{}),u.jsx("span",{className:"content__btn",children:Sd})]}):null]})]}),EE=e=>e.write.searchObjectList,Cp=e=>e.write.objectDict,IE=e=>e.write.formFields,wE=e=>e.write.dependentFieldsMap,_E="Search in Connectors",SE="Search in Apps",AE="Start typing to search..",TE="Smart search suggestions",LE=":count result:countSuffix found for :searchObject in :connectorName",OE="Back to search results",FE="No search results found",xp=e=>T.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{id:"icons/Actions/Search"},T.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"}))),DE=d.styled(d.Stack)`
1235
+ `,yE=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},T.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),T.createElement("g",{mask:"url(#mask0_4649_80352)"},T.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"}))),CE=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.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"})),xE=({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:xx}),u.jsxs(d.Stack,{gap:"12px",children:[n?u.jsxs(bE,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(yE,{}),u.jsx("span",{className:"content__btn",children:_d})]}):null,r?u.jsxs(mE,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(CE,{}),u.jsx("span",{className:"content__btn",children:Sd})]}):null]})]}),vE=e=>e.write.searchObjectList,Cp=e=>e.write.objectDict,EE=e=>e.write.formFields,IE=e=>e.write.dependentFieldsMap,wE="Search in Connectors",_E="Search in Apps",SE="Start typing to search..",AE="Smart search suggestions",TE=":count result:countSuffix found for :searchObject in :connectorName",LE="Back to search results",OE="No search results found",xp=e=>T.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{id:"icons/Actions/Search"},T.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"}))),FE=d.styled(d.Stack)`
1236
1236
  flex-flow: row nowrap;
1237
1237
  align-items: center;
1238
1238
  column-gap: 12px;
@@ -1242,28 +1242,28 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1242
1242
  &:hover {
1243
1243
  background-color: ${({isSelected:e})=>e?"rgb(80, 109, 255, 0.12)":"rgba(0, 0, 0, 0.04)"};
1244
1244
  }
1245
- `,kE=d.styled("img")`
1245
+ `,DE=d.styled("img")`
1246
1246
  flex-shrink: 0;
1247
1247
  display: block;
1248
1248
  width: 24px;
1249
1249
  height: 24px;
1250
1250
  border-radius: 50%;
1251
- `,vp=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Ve),{label:i,description:c,avatarUrl:l,connectorName:f}=e,m=()=>{s(L3,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:f}),r(e,t),o(rx(t))};return u.jsxs(DE,{isSelected:n,onClick:m,children:[u.jsx(kE,{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})]})]})},NE=d.styled(d.Stack)`
1251
+ `,vp=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Ve),{label:i,description:c,avatarUrl:l,connectorName:f}=e,b=()=>{s(T3,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:f}),r(e,t),o(nx(t))};return u.jsxs(FE,{isSelected:n,onClick:b,children:[u.jsx(DE,{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})]})]})},kE=d.styled(d.Stack)`
1252
1252
  padding: 10px 0 10px 10px;
1253
- `,{Control:RE}=cn,ME=({children:e,...t})=>u.jsxs(RE,{...t,children:[u.jsx(NE,{children:u.jsx(xp,{})}),e]}),PE=e=>{const{data:t,isSelected:n,selectOption:r}=e;return u.jsx(vp,{data:t,isSelected:n,onSelect:r})},jE={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})},BE=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:f,currentSmIds:m}=w.useContext(Ve),y=tt(l,Rs),x=(p,{action:g})=>{g==="input-change"&&(s(p),p||a())},b=p=>{o(p),p||(s(""),a())},h=()=>{const p=[...new Set(e.map(g=>g.connectorName))];f(T3,{connector_names:p,sm_ids:m})};return u.jsx(Xo,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:y?SE:_E,isSearchable:!0,filterOption:null,styles:jE,onInputChange:x,onChange:b,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:h,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:PE,Control:ME,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},VE=d.styled(d.Stack)`
1253
+ `,{Control:NE}=cn,RE=({children:e,...t})=>u.jsxs(NE,{...t,children:[u.jsx(kE,{children:u.jsx(xp,{})}),e]}),ME=e=>{const{data:t,isSelected:n,selectOption:r}=e;return u.jsx(vp,{data:t,isSelected:n,onSelect:r})},PE={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})},jE=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:f,currentSmIds:b}=w.useContext(Ve),y=tt(l,Rs),x=(p,{action:g})=>{g==="input-change"&&(s(p),p||a())},m=p=>{o(p),p||(s(""),a())},h=()=>{const p=[...new Set(e.map(g=>g.connectorName))];f(A3,{connector_names:p,sm_ids:b})};return u.jsx(Xo,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:y?_E:wE,isSearchable:!0,filterOption:null,styles:PE,onInputChange:x,onChange:m,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:h,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:ME,Control:RE,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},BE=d.styled(d.Stack)`
1254
1254
  margin: ${({isEmpty:e})=>e?"0":"12px 0"};
1255
- `,GE=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=ap(),s=w.useRef(null),a=ye(Cp),i=ye(IE),c=ye(wE),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 Yc({formFields:E})},[l]),{setValue:m,inputChangeHandler:y,dateChangeHandler:x,clearDependentFields:b,handleValidationError:h,isErrorInValidations:p}=ip({state:r,dispatch:o,validations:f}),{fetchConfig:g}=up({formState:r,formFields:l.formFields,formId:l.id}),C=w.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);w.useEffect(()=>{const E=r.values,_=l.id,A=l.formFields;if(Object.values(E).filter(B=>!!B).length<A.length||!a||p()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:k,args:D={}}=S,N=Jo(r,D);C({id:_,interfaceId:k,searchString:t,connectorName:L,args:N})},[r,l,a,e,t,p,C]),w.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const v=(E,_,A)=>{if(_.action==="clear"&&_.name&&(m(_.name,""),b(_.name,c[e]),f[_.name].isRequired&&h(_.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;A&&(S=A.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};m(_.name,L),b(_.name,c[e])}};return u.jsx(VE,{isEmpty:((I=l.formFields)==null?void 0:I.length)===0,children:u.jsx(A1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:v,inputChangeHandler:y,dateChangeHandler:x,onValidationError:h,labelSpacing:.5,fetchConfig:g,values:r.values,validations:f})})},$c="@connector-agent-global-search-priority",Qc=G0(),HE=({objectList:e})=>({sortedObjectList:w.useMemo(()=>{const r=Qc.getItem($c);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=Qc.getItem($c)??{};o[r]||(o[r]=0),o[r]++,Qc.setItem($c,o)}}),WE=d.styled(d.Stack)`
1255
+ `,VE=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=ap(),s=w.useRef(null),a=ye(Cp),i=ye(EE),c=ye(IE),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 Yc({formFields:E})},[l]),{setValue:b,inputChangeHandler:y,dateChangeHandler:x,clearDependentFields:m,handleValidationError:h,isErrorInValidations:p}=ip({state:r,dispatch:o,validations:f}),{fetchConfig:g}=up({formState:r,formFields:l.formFields,formId:l.id}),C=w.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);w.useEffect(()=>{const E=r.values,_=l.id,A=l.formFields;if(Object.values(E).filter(B=>!!B).length<A.length||!a||p()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:k,args:D={}}=S,N=Jo(r,D);C({id:_,interfaceId:k,searchString:t,connectorName:L,args:N})},[r,l,a,e,t,p,C]),w.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const v=(E,_,A)=>{if(_.action==="clear"&&_.name&&(b(_.name,""),m(_.name,c[e]),f[_.name].isRequired&&h(_.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;A&&(S=A.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};b(_.name,L),m(_.name,c[e])}};return u.jsx(BE,{isEmpty:((I=l.formFields)==null?void 0:I.length)===0,children:u.jsx(A1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:v,inputChangeHandler:y,dateChangeHandler:x,onValidationError:h,labelSpacing:.5,fetchConfig:g,values:r.values,validations:f})})},$c="@connector-agent-global-search-priority",Qc=G0(),GE=({objectList:e})=>({sortedObjectList:w.useMemo(()=>{const r=Qc.getItem($c);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=Qc.getItem($c)??{};o[r]||(o[r]=0),o[r]++,Qc.setItem($c,o)}}),HE=d.styled(d.Stack)`
1256
1256
  padding: 8px 0;
1257
- `,ZE=d.styled(d.Typography)`
1257
+ `,WE=d.styled(d.Typography)`
1258
1258
  padding: 6px 16px;
1259
1259
  color: ${d.theme.palette.gray.gray4};
1260
1260
  font-size: 13px;
1261
- `,XE=d.styled(d.Typography)`
1261
+ `,ZE=d.styled(d.Typography)`
1262
1262
  padding: 6px 16px;
1263
1263
  color: ${d.theme.palette.gray.gray3};
1264
1264
  font-size: 11px;
1265
1265
  text-transform: uppercase;
1266
- `,zE=({onSelect:e,selectedOption:t,options:n})=>n.length?u.jsxs(WE,{children:[u.jsx(ZE,{children:AE}),u.jsx(XE,{children:TE}),n.map(r=>u.jsx(vp,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null,YE=e=>new Promise(t=>setTimeout(t,e)),Ep=({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,YE(t).then(()=>c(l))};return c()},JE=async({conversationId:e,senderEmail:t})=>{try{const n=await we({url:lt(X8,{conversationId:e}),params:{senderEmail:t},method:Re.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},Ip=({conversationId:e,senderEmail:t,enabled:n})=>Ln({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>JE({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),wp="/v1/api",qE=`${wp}/connectors/forms/:formId/search`,$E=`${wp}/connectors/conversation/:conversationId/smart-suggestions`,QE=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}},UE=Ep({apiFn:async({conversationId:e})=>{try{const t=await we({url:lt($E,{conversationId:e}),method:Re.GET}),n=t==null?void 0:t.data;return QE(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),KE=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=Ip({conversationId:e,senderEmail:t,enabled:n});return Ln({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>UE({conversationId:e}),enabled:n&&r})},eI=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=w.useState(""),{conversationId:i,email:c,availableFeatures:l}=w.useContext(Ve),f=ye(EE),m=ye(Cp),y=tt(l,Q3),{sortedObjectList:x,updatePriority:b}=HE({objectList:f}),{data:h}=KE({enabled:y&&!!i,conversationId:String(i),senderEmail:c}),p=(h==null?void 0:h.suggestedOptions)??[],g=w.useMemo(()=>!m||!x.length?[]:x.map(({value:v})=>{const I=m[v];return I?{description:`${I.connectorName??""} - ${I.searchObject}`,avatarUrl:I.logoUrl,label:"",value:v,connectorName:I.connectorName,objectName:I.searchObject}:null}).filter(v=>!!v),[x,m]),C=v=>{n(v),v&&b(""+v.value)};return g.length?u.jsxs(d.Stack,{children:[u.jsx(BE,{value:e,options:g.map(v=>({...v,label:s})),inputValue:s,root:t,onInputChange:a,onChange:C,onReset:o,NoOptionsMessage:({selectOption:v})=>u.jsx(zE,{selectedOption:e,onSelect:v,options:p}),menuOpen:!s&&!p.length?!1:void 0}),e?u.jsx(GE,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},tI="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",nI=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 we({url:`${J8.replace(":id",e)}?${s.toString()}`,method:Re.POST,data:{externalResourceId:t,conversationId:n}})},rI=({onSuccess:e})=>en({mutationFn:nI,onSuccess:()=>{_e({message:hy,type:rn}),e==null||e()},onError:()=>{_e({message:gy,type:qe})}}),oI="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",sI=d.styled(d.Stack)`
1266
+ `,XE=({onSelect:e,selectedOption:t,options:n})=>n.length?u.jsxs(HE,{children:[u.jsx(WE,{children:SE}),u.jsx(ZE,{children:AE}),n.map(r=>u.jsx(vp,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null,zE=e=>new Promise(t=>setTimeout(t,e)),Ep=({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,zE(t).then(()=>c(l))};return c()},YE=async({conversationId:e,senderEmail:t})=>{try{const n=await we({url:lt(Z8,{conversationId:e}),params:{senderEmail:t},method:Re.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},Ip=({conversationId:e,senderEmail:t,enabled:n})=>Ln({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>YE({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),wp="/v1/api",JE=`${wp}/connectors/forms/:formId/search`,qE=`${wp}/connectors/conversation/:conversationId/smart-suggestions`,$E=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}},QE=Ep({apiFn:async({conversationId:e})=>{try{const t=await we({url:lt(qE,{conversationId:e}),method:Re.GET}),n=t==null?void 0:t.data;return $E(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),UE=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=Ip({conversationId:e,senderEmail:t,enabled:n});return Ln({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>QE({conversationId:e}),enabled:n&&r})},KE=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=w.useState(""),{conversationId:i,email:c,availableFeatures:l}=w.useContext(Ve),f=ye(vE),b=ye(Cp),y=tt(l,$3),{sortedObjectList:x,updatePriority:m}=GE({objectList:f}),{data:h}=UE({enabled:y&&!!i,conversationId:String(i),senderEmail:c}),p=(h==null?void 0:h.suggestedOptions)??[],g=w.useMemo(()=>!b||!x.length?[]:x.map(({value:v})=>{const I=b[v];return I?{description:`${I.connectorName??""} - ${I.searchObject}`,avatarUrl:I.logoUrl,label:"",value:v,connectorName:I.connectorName,objectName:I.searchObject}:null}).filter(v=>!!v),[x,b]),C=v=>{n(v),v&&m(""+v.value)};return g.length?u.jsxs(d.Stack,{children:[u.jsx(jE,{value:e,options:g.map(v=>({...v,label:s})),inputValue:s,root:t,onInputChange:a,onChange:C,onReset:o,NoOptionsMessage:({selectOption:v})=>u.jsx(XE,{selectedOption:e,onSelect:v,options:p}),menuOpen:!s&&!p.length?!1:void 0}),e?u.jsx(VE,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},eI="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",tI=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 we({url:`${Y8.replace(":id",e)}?${s.toString()}`,method:Re.POST,data:{externalResourceId:t,conversationId:n}})},nI=({onSuccess:e})=>en({mutationFn:tI,onSuccess:()=>{_e({message:py,type:rn}),e==null||e()},onError:()=>{_e({message:hy,type:qe})}}),rI="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",oI=d.styled(d.Stack)`
1267
1267
  width: fit-content;
1268
1268
  cursor: pointer;
1269
1269
  gap: 8px;
@@ -1275,7 +1275,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1275
1275
  letter-spacing: 0.4px;
1276
1276
  text-align: center;
1277
1277
  vertical-align: middle;
1278
- `,aI=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=zt(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=w.useContext(Ve),m=ye(np),y=ye(rp),{mutate:x,isPending:b}=rI({onSuccess:s}),h=y===K.LOADING,p={externalResourceId:e};w.useEffect(()=>{a(qr({id:t,args:{externalResourceId:e}}))},[e,t,a]);const g=()=>{l(N3,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:m==null?void 0:m.cardTitle,connector_names:m==null?void 0:m.connectorNames}),x({id:t,externalResourceId:e,conversationId:i,email:f})};return u.jsxs(d.Stack,{gap:"12px",marginTop:"12px",children:[u.jsxs(sI,{onClick:o,children:[u.jsx("img",{src:oI,width:"16px",height:"16px"}),u.jsx(d.Typography,{children:OE})]}),u.jsxs(d.Stack,{gap:"24px",children:[u.jsx(op,{cardData:m,cardDataApiStatus:y,objectToLink:t,args:p}),u.jsx(d.Stack,{alignItems:"flex-end",children:u.jsx(d.Button,{size:"small",disabled:h||b,onClick:g,children:Ed})})]})]})},_p=d.styled(d.Stack)`
1278
+ `,sI=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=zt(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=w.useContext(Ve),b=ye(np),y=ye(rp),{mutate:x,isPending:m}=nI({onSuccess:s}),h=y===K.LOADING,p={externalResourceId:e};w.useEffect(()=>{a(qr({id:t,args:{externalResourceId:e}}))},[e,t,a]);const g=()=>{l(k3,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:b==null?void 0:b.cardTitle,connector_names:b==null?void 0:b.connectorNames}),x({id:t,externalResourceId:e,conversationId:i,email:f})};return u.jsxs(d.Stack,{gap:"12px",marginTop:"12px",children:[u.jsxs(oI,{onClick:o,children:[u.jsx("img",{src:rI,width:"16px",height:"16px"}),u.jsx(d.Typography,{children:LE})]}),u.jsxs(d.Stack,{gap:"24px",children:[u.jsx(op,{cardData:b,cardDataApiStatus:y,objectToLink:t,args:p}),u.jsx(d.Stack,{alignItems:"flex-end",children:u.jsx(d.Button,{size:"small",disabled:h||m,onClick:g,children:Ed})})]})]})},_p=d.styled(d.Stack)`
1279
1279
  padding: 12px 12px 12px 11px;
1280
1280
  border: 1px solid ${d.theme.palette.gray.gray5};
1281
1281
  border-radius: 8px;
@@ -1291,10 +1291,10 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1291
1291
  }
1292
1292
  }
1293
1293
  `};
1294
- `,iI="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",cI=()=>u.jsxs(d.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:iI,width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:FE})]}),lI=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Ve),[i,c]=w.useState(null),l=lt(LE,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(x,b)=>{s(k3,{search_keyword:t.label,search_result_label:b,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:x,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},m=()=>{c(null),o(nx())},y=()=>{n(),r(),m()};return e.length?i?u.jsx(aI,{meta:i,onBack:m,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:x,name:b,description:h})=>u.jsxs(_p,{onClick:()=>f(x,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:h})]}),u.jsx(d.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:tI})})]},x))})]}):u.jsx(cI,{})},Uc=d.styled(d.Skeleton)`
1294
+ `,aI="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",iI=()=>u.jsxs(d.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:aI,width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:OE})]}),cI=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=zt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Ve),[i,c]=w.useState(null),l=lt(TE,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(x,m)=>{s(D3,{search_keyword:t.label,search_result_label:m,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:x,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:m})},b=()=>{c(null),o(tx())},y=()=>{n(),r(),b()};return e.length?i?u.jsx(sI,{meta:i,onBack:b,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:x,name:m,description:h})=>u.jsxs(_p,{onClick:()=>f(x,m),direction:"row",children:[u.jsxs(d.Stack,{flexGrow:1,children:[u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray1,children:m}),u.jsx(d.Typography,{variant:"caption",color:d.theme.palette.gray.gray3,children:h})]}),u.jsx(d.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:eI})})]},x))})]}):u.jsx(iI,{})},Uc=d.styled(d.Skeleton)`
1295
1295
  display: block;
1296
1296
  margin: ${e=>e.margin?e.margin:0};
1297
- `,uI=()=>u.jsxs(d.Stack,{marginTop:"12px",children:[u.jsx(Uc,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(d.Stack,{gap:"17px",children:u.jsxs(_p,{gap:"8px",disableHover:!0,children:[u.jsx(Uc,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx(Uc,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let Kc={};const el=new Set,dI=(e,t)=>{Kc={...Kc,[e]:t},el.forEach(n=>n())},fI=e=>(el.add(e),()=>el.delete(e)),pI=e=>w.useSyncExternalStore(fI,()=>Kc)[e],hI=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await we({url:qE.replace(":formId",e.toString()),method:Re.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){_e({message:yn,type:qe}),console.error(r)}},gI=(e,t)=>en({mutationFn:hI,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),tl={OPEN_FORM_VIEW:"connector-agent-open-form-view"},mI=(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}},bI=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.createElement("g",{filter:"url(#filter0_d_360_39563)"},T.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"})),T.createElement("g",{filter:"url(#filter1_d_360_39563)"},T.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"})),T.createElement("defs",null,T.createElement("filter",{id:"filter0_d_360_39563",x:4.76488,y:3.36693,width:3.96488,height:9.21732,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.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"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.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"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})),T.createElement("filter",{id:"filter1_d_360_39563",x:7.51146,y:6.59544,width:3.96488,height:6.18216,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.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"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.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"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})))),yI="/v1/api/connectors/lookup/bulk",CI="/v1/api/connectors/lookup/bulk",xI=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${yI}?${t.toString()}`,r=await we({url:n,method:Re.GET});return r==null?void 0:r.data},vI=async e=>{const t=await we({url:CI,method:Re.PUT,data:{entries:e}});return t==null?void 0:t.data},EI={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},II={border:`1px solid ${d.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},Sp={flex:1,height:"1px",backgroundColor:d.theme.palette.gray.gray6},wI={flexShrink:0,border:`1px solid ${d.theme.palette.gray.gray6}`,borderRadius:"15px"},_I={border:`1px solid ${d.theme.palette.gray.gray6}`,backgroundColor:d.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},SI=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(G3,{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:EI,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(m=>m.hiverParam===c))==null?void 0:f.label)??"";return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(bI,{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:Sp}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:wI,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:Sp}),u.jsx(d.Box,{sx:_I,children:u.jsx(d.Typography,{variant:"body2",fontSize:14,children:s})})]})}),AI=w.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=w.useContext(Ve),[a,i]=w.useState({});w.useEffect(()=>{if(t&&r.length>0){const b={};r.filter(h=>{var p;return((p=h.presets)==null?void 0:p.length)>1}).forEach(h=>{b[h.connectorId]=h.hiverParam}),i(b)}},[t,r]);const c=wo(),{mutate:l,isPending:f}=en({mutationFn:vI,onSuccess:b=>{const h={};b.results.forEach(({connectorId:p,hiverParam:g})=>{h[p]=g}),c.setQueriesData({queryKey:["lookup","bulk"]},p=>p&&{...p,connectors:p.connectors.map(g=>h[g.connectorId]!==void 0?{...g,hiverParam:h[g.connectorId]}:g)}),s(H3,{page:"agent_connector_panel"}),_e({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{_e({message:"Failed to save identity mapping",type:"error"})}}),m=w.useCallback(()=>{const b=Object.entries(a).map(([h,p])=>({connector_id:h,hiver_param:p}));l(b)},[a,l]),y=w.useCallback((b,h)=>{i(p=>({...p,[b]:h}))},[]),x=w.useCallback(b=>{b||n()},[n]);return u.jsx(hr,{shown:t,setShown:x,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 h;return((h=b.presets)==null?void 0:h.length)>1})&&u.jsx(d.Stack,{gap:"8px",sx:II,children:r.filter(b=>{var h;return((h=b.presets)==null?void 0:h.length)>1}).map(b=>u.jsx(SI,{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:m,disabled:f,children:"Save"})]})]})})}),TI=({enabled:e,...t})=>{const{actionQueue:n}=w.useContext(Ve);n&&e&&n.register(t),w.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},LI=({isAdmin:e=!1})=>{var fe,Ie;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s,connectorId:a}=w.useContext(Ve),i=zt(),{userGroupId:c,userId:l}=kt()||{},f=w.useRef(!1),m=w.useRef(null),y=w.useRef(null),x=w.useRef(null),[b,h]=w.useState({}),[p,g]=w.useState(!1),[C,v]=w.useState(!1),[I,E]=w.useState(!1),[_,A]=w.useState(!1),[S,L]=w.useState(),[k,D]=w.useState(!1),[N,P]=w.useState(null),[B,Y]=w.useState(),[$,H]=w.useState(null),[X,q]=w.useState(!1),[se,de]=w.useState(!1),[V,W]=w.useState(!1),M=ye(Px),G=ye(jx),z=ye(Vx),ne=ye(Gx),ae=ye(Wx),j=ye(Bx),ee=ye(J1),ve=ye(nv),J=ye(q1),Pe=ye($1),je=ye(Q1),ze=ye(sE),Mt=tt(o,Z3),In=tt(o,md),Ct=tt(o,$3),Ge=tt(o,U3),Qe=tt(o,K3),wn=tt(o,e5),Pt=(fe=kt())==null?void 0:fe.tenantPlatform,xt=tt(o,Pt==="HIVERWEB"?`hot-${bd}`:bd),{data:wr}=Ln({queryKey:["connectors","enabledAuthenticated"],queryFn:()=>B0(),enabled:xt&&e}),zn=w.useMemo(()=>(wr??[]).map(te=>te.id),[wr]),{data:jt,isSuccess:_n}=Ln({queryKey:["lookup","bulk",zn.join(",")],queryFn:()=>xI(zn),enabled:zn.length>0&&xt&&e,refetchOnMount:!1}),ho=_n&&((jt==null?void 0:jt.connectors)??[]).some(te=>{var re;return(((re=te.presets)==null?void 0:re.length)??0)>1});TI({conversationId:s,openCreateForm:()=>E(!0),enabled:G});const Yn=w.useMemo(()=>!M||!M.length?null:Yx(M,z,ne),[M,z,ne]),_r=b5(z),{data:Sr,isLoading:Jn}=Ip({senderEmail:t,conversationId:String(s),enabled:Ge&&!!t}),{emailHeaders:go,selectedEmail:he}=Sr??{},{scrollOnceAfterLoad:Ee,resetScrollState:et}=mI(y),it=j!==K.LOADING&&(!ne||!Object.values(ne).some(te=>te===K.LOADING))&&M&&M.length>0;w.useLayoutEffect(()=>{var te;X&&!p&&se&&((te=x==null?void 0:x.current)!=null&&te.scrollHeight)&&Ee(!!it,"smooth")},[X,p,se,it,Ee,(Ie=x==null?void 0:x.current)==null?void 0:Ie.scrollHeight,l]);const vt=(te,re)=>{r(O3,{search_keyword:te,sm_ids:n,connector_name:re,suggestion_type:ze})},Ut=(te,re,pe)=>{!Array.isArray(re)||!re.length?r(F3,{search_keyword:te,sm_ids:n,connector_name:pe,suggestion_type:ze}):re.length&&r(D3,{num_of_results:re.length,search_keyword:te,sm_ids:n,connector_name:pe,suggestion_type:ze})},{mutate:Kt,reset:Et,data:Bt,isPending:Ar,isIdle:mo}=gI(vt,Ut),Tr=w.useCallback(()=>{Et(),P(null)},[Et,P]),Sn=wo(),hn=w.useCallback(()=>{t&&n.length&&s&&i(La({inboxIds:n,conversationId:s,connectorId:a}))},[i,t,n,s,a]),Ra=w.useCallback(()=>{Sn.invalidateQueries({queryKey:["lookup","bulk"]}),hn()},[Sn,hn]),ns=w.useCallback((te,re)=>{te&&s&&re&&i(Ta({id:te,channelType:"email",conversationId:s,externalResourceId:re,contactEmail:t})).unwrap().catch(()=>{i(Qr(null))})},[i,s,t]);if(w.useEffect(()=>{(async()=>{l&&(q(await hi(l)),de(await du(l)))})()},[l]),w.useEffect(()=>{Jn||Y(he||t)},[t,he,Jn]),w.useEffect(()=>{B&&s&&dI(String(s),B)},[B,s]),w.useEffect(()=>{se&&l&&fu(l)},[se,l]),w.useEffect(()=>{var te;if(Pe){v(!0);const{externalResourceId:re}=Pe,pe=(te=Pe.forms.find(He=>He.type==="edit"))==null?void 0:te.id;ns(pe,re)}else v(!1),i(Dx())},[Pe,ns,i]),w.useEffect(()=>(hn(),et(),()=>{i(z1.clearConnectorList())}),[i,hn,et]),w.useEffect(()=>{if(ae&&M&&M.length&&Yn&&!f.current){const{cards_per_app:te,total_empty_cards:re,total_cards_with_errors:pe}=Yn;r(o3,{numOfCards:M.length,total_cards_loaded:M.length,total_empty_cards:re,total_cards_with_errors:pe,cards_per_app:te,sm_ids:n}),f.current=!0}return()=>{f.current=!1}},[ae,M,Yn,r,n]),w.useEffect(()=>{s&&n&&n.length&&i(Ia({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:wn,connectorId:a}))},[i,n,s,wn,a]),w.useEffect(()=>{const te=re=>{var He;if(!(re instanceof CustomEvent))return;const pe=(He=re.detail)==null?void 0:He.connectorKey;h({connectorKey:pe})};return window.addEventListener(tl.OPEN_FORM_VIEW,te),()=>{window.removeEventListener(tl.OPEN_FORM_VIEW,te)}},[]),w.useEffect(()=>{if(!(ee!=null&&ee.length)||!b.connectorKey)return;const te=b.connectorKey;h({});const re=ee.find(pe=>{var He;return((He=pe.connectorKey)==null?void 0:He.toLowerCase())===(te==null?void 0:te.toLowerCase())});re&&(H(re),E(!0))},[ee,b]),!t.length||j===K.LOADING)return u.jsx(Zv,{});const hl=te=>{r(l3,{connector_name:ve,source:te,sm_ids:n})},Ma=te=>{E(!0),hl(te)},Pa=()=>{A(!0),r(u3)},rs=te=>{r(te,S),je?D(!0):(E(!1),H(null))},ja=te=>{if(Pe){const{connectorName:re,title:pe}=Pe;r(te,{connector_name:re,card_title:pe,sm_ids:n,ug_id:c})}je?D(!0):i(Qr(null))},gl=()=>{E(!1),i(Qr(null)),L(void 0),D(!1)},Ba=()=>{hn(),i(z1.clearConnectorList())},ml=[{label:"Go back",variant:"text",action:gl},{label:"Stay",variant:"contained",action:()=>D(!1)}],O=ee.length>0,Z=J.length>0,Q=()=>O||Z?u.jsx(vE,{haveCreateObjects:O,haveLinkObjects:Z,onCreateClick:()=>Ma(Ld.MAIN_BUTTON),onLinkClick:()=>A(!0)}):u.jsx(ep,{isAdmin:e,hideHeading:!0});return u.jsxs(Bd,{ref:m,"data-testid":Array.isArray(M)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:I||_,children:[u.jsx(dp,{shown:k,setShown:D,title:wx,description:_x,buttons:ml}),u.jsx($5,{onWheel:()=>g(!0),ref:x,children:G?u.jsxs(u.Fragment,{children:[u.jsx(T4,{connectors:_r,isWriteFlowEnabled:In,haveCreateObjects:O,haveLinkObjects:Z,cards:M,handleCreateNewObject:()=>Ma(Ld.ICON),handleLinkNewObject:Pa}),Ct?u.jsx(eI,{selectedObject:N,setSelectedObject:P,fetchSearchResults:Kt,onReset:Tr,root:m.current}):null,u.jsxs(Ur,{children:[u.jsx(Kr,{condition:Ct&&Ar,children:u.jsx(uI,{})},"search"),u.jsx(Kr,{condition:Ct&&!!N&&!mo,children:u.jsx(lI,{searchResults:Bt??[],selectedObject:N,onReset:Tr,fetchCards:hn})},"results"),u.jsxs(Kr,{fallback:!0,children:[Ge&&(M!=null&&M.length)?u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(d.Stack,{sx:{flex:1,minWidth:0},children:u.jsx(eE,{emailHeaders:go,selectedEmail:B,root:m.current,isLoading:Jn,setSelectedEmail:Y})}),xt&&ho&&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(gd,{page:"agent_connector_panel"}),W(!0)},children:u.jsx(d.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!Ge&&xt&&ho&&e&&(M!=null&&M.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(gd,{page:"agent_connector_panel"}),W(!0)},children:"Customer identity mapping"}):null,Mt?u.jsx(Xv,{}):null,u.jsxs(Ur,{children:[u.jsxs(Kr,{condition:!!M&&M.length>0,children:[u.jsx(Cv,{cards:M,specificCardData:z,email:B??"",specificConnectorApiStatus:ne,onCardUnlinking:hn}),u.jsx("div",{ref:y,children:Qe?u.jsx(L5,{connectors:_r,expanded:X}):null})]},"cards-list"),u.jsx(Kr,{condition:!(M!=null&&M.length)&&In,children:Q()},"create-banner")]})]},"cards")]})]}):u.jsx(ep,{isAdmin:e})}),u.jsx(qc,{onClose:()=>ja(I3),isOpen:C,setIsOpen:v,title:l5,portalId:"connector-layover-portal",backButtonTooltip:"Back",children:u.jsx(pp,{isEdit:!0,onClose:()=>ja(E3),onCreateSuccess:Ba,metaData:S,setMetaData:L})}),u.jsx(qc,{onClose:()=>rs(m3),portalId:"connector-layover-portal",isOpen:I,setIsOpen:E,children:u.jsx(pp,{onClose:()=>rs(g3),onCreateSuccess:Ba,metaData:S,setMetaData:L,defaultOption:$})}),u.jsx(qc,{onClose:()=>A(!1),portalId:"connector-layover-portal",isOpen:_,setIsOpen:A,children:u.jsx(mE,{setOpenTaskLinking:A,onLinkingSuccess:hn})}),!G&&u.jsx(G5,{}),xt&&u.jsx(AI,{open:V,onClose:()=>W(!1),connectors:(jt==null?void 0:jt.connectors)??[],onSaveSuccess:Ra})]})},OI=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:m=!1,actionQueue:y,store:x})=>{const[b,h]=w.useState(void 0);w.useEffect(()=>{if(!x)return;const g=x.subscribe(C=>{h(C)},"connectorId");return()=>g()},[x]);const p=w.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:m,connectorFunctions:l,stackingContext:f,actionQueue:y,store:x,connectorId:b}),[s,n,r,t,o,a,i,c,m,l,f,y,x,b]);return u.jsx(Ve.Provider,{value:p,children:e})},nl=({children:e})=>{const[t]=w.useState(()=>new N2);return u.jsx(B2,{client:t,children:e})},FI=t0({cardList:Kx,write:kx,common:ox}),rl=Jb({reducer:FI,devTools:!0}),DI=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c,store:l})=>u.jsx(Ki,{store:rl,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(nl,{children:u.jsx(OI,{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,store:l,children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})}),ol=d.styled(d.Box)`
1297
+ `,lI=()=>u.jsxs(d.Stack,{marginTop:"12px",children:[u.jsx(Uc,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(d.Stack,{gap:"17px",children:u.jsxs(_p,{gap:"8px",disableHover:!0,children:[u.jsx(Uc,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx(Uc,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let Kc={};const el=new Set,uI=(e,t)=>{Kc={...Kc,[e]:t},el.forEach(n=>n())},dI=e=>(el.add(e),()=>el.delete(e)),fI=e=>w.useSyncExternalStore(dI,()=>Kc)[e],pI=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await we({url:JE.replace(":formId",e.toString()),method:Re.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){_e({message:yn,type:qe}),console.error(r)}},hI=(e,t)=>en({mutationFn:pI,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),tl={OPEN_FORM_VIEW:"connector-agent-open-form-view"},gI=(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}},mI=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.createElement("g",{filter:"url(#filter0_d_360_39563)"},T.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"})),T.createElement("g",{filter:"url(#filter1_d_360_39563)"},T.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"})),T.createElement("defs",null,T.createElement("filter",{id:"filter0_d_360_39563",x:4.76488,y:3.36693,width:3.96488,height:9.21732,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.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"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.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"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})),T.createElement("filter",{id:"filter1_d_360_39563",x:7.51146,y:6.59544,width:3.96488,height:6.18216,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},T.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),T.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"}),T.createElement("feOffset",null),T.createElement("feGaussianBlur",{stdDeviation:.533333}),T.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"}),T.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_360_39563"}),T.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_360_39563",result:"shape"})))),bI="/v1/api/connectors/lookup/bulk",yI="/v1/api/connectors/lookup/bulk",CI=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${bI}?${t.toString()}`,r=await we({url:n,method:Re.GET});return r==null?void 0:r.data},xI=async e=>{const t=await we({url:yI,method:Re.PUT,data:{entries:e}});return t==null?void 0:t.data},vI={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},EI={border:`1px solid ${d.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},Sp={flex:1,height:"1px",backgroundColor:d.theme.palette.gray.gray6},II={flexShrink:0,border:`1px solid ${d.theme.palette.gray.gray6}`,borderRadius:"15px"},wI={border:`1px solid ${d.theme.palette.gray.gray6}`,backgroundColor:d.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},_I=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(V3,{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:vI,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(b=>b.hiverParam===c))==null?void 0:f.label)??"";return u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(mI,{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:Sp}),u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:II,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:Sp}),u.jsx(d.Box,{sx:wI,children:u.jsx(d.Typography,{variant:"body2",fontSize:14,children:s})})]})}),SI=w.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=w.useContext(Ve),[a,i]=w.useState({});w.useEffect(()=>{if(t&&r.length>0){const m={};r.filter(h=>{var p;return((p=h.presets)==null?void 0:p.length)>1}).forEach(h=>{m[h.connectorId]=h.hiverParam}),i(m)}},[t,r]);const c=wo(),{mutate:l,isPending:f}=en({mutationFn:xI,onSuccess:m=>{const h={};m.results.forEach(({connectorId:p,hiverParam:g})=>{h[p]=g}),c.setQueriesData({queryKey:["lookup","bulk"]},p=>p&&{...p,connectors:p.connectors.map(g=>h[g.connectorId]!==void 0?{...g,hiverParam:h[g.connectorId]}:g)}),s(G3,{page:"agent_connector_panel"}),_e({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{_e({message:"Failed to save identity mapping",type:"error"})}}),b=w.useCallback(()=>{const m=Object.entries(a).map(([h,p])=>({connector_id:h,hiver_param:p}));l(m)},[a,l]),y=w.useCallback((m,h)=>{i(p=>({...p,[m]:h}))},[]),x=w.useCallback(m=>{m||n()},[n]);return u.jsx(hr,{shown:t,setShown:x,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(m=>{var h;return((h=m.presets)==null?void 0:h.length)>1})&&u.jsx(d.Stack,{gap:"8px",sx:EI,children:r.filter(m=>{var h;return((h=m.presets)==null?void 0:h.length)>1}).map(m=>u.jsx(_I,{connector:m,selectedHiverParam:a[m.connectorId]??m.hiverParam,onChange:y,sendTrackingEvent:s},m.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:b,disabled:f,children:"Save"})]})]})})}),AI=({enabled:e,...t})=>{const{actionQueue:n}=w.useContext(Ve);n&&e&&n.register(t),w.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},TI=({isAdmin:e=!1})=>{var fe,Ie;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s,connectorId:a}=w.useContext(Ve),i=zt(),{userGroupId:c,userId:l}=kt()||{},f=w.useRef(!1),b=w.useRef(null),y=w.useRef(null),x=w.useRef(null),[m,h]=w.useState({}),[p,g]=w.useState(!1),[C,v]=w.useState(!1),[I,E]=w.useState(!1),[_,A]=w.useState(!1),[S,L]=w.useState(),[k,D]=w.useState(!1),[N,P]=w.useState(null),[B,Y]=w.useState(),[$,H]=w.useState(null),[X,q]=w.useState(!1),[se,de]=w.useState(!1),[V,W]=w.useState(!1),M=ye(Mx),G=ye(Px),z=ye(Bx),ne=ye(Vx),ae=ye(Hx),j=ye(jx),ee=ye(J1),ve=ye(tv),J=ye(q1),Pe=ye($1),je=ye(Q1),ze=ye(oE),Mt=tt(o,W3),In=tt(o,md),Ct=tt(o,q3),Ge=tt(o,Q3),Qe=tt(o,U3),wn=tt(o,K3),Pt=(fe=kt())==null?void 0:fe.tenantPlatform,xt=tt(o,Pt==="HIVERWEB"?`hot-${bd}`:bd),{data:wr}=Ln({queryKey:["connectors","enabledAuthenticated"],queryFn:()=>B0(),enabled:xt&&e}),zn=w.useMemo(()=>(wr??[]).map(te=>te.id),[wr]),{data:jt,isSuccess:_n}=Ln({queryKey:["lookup","bulk",zn.join(",")],queryFn:()=>CI(zn),enabled:zn.length>0&&xt&&e,refetchOnMount:!1}),ho=_n&&((jt==null?void 0:jt.connectors)??[]).some(te=>{var re;return(((re=te.presets)==null?void 0:re.length)??0)>1});AI({conversationId:s,openCreateForm:()=>E(!0),enabled:G});const Yn=w.useMemo(()=>!M||!M.length?null:zx(M,z,ne),[M,z,ne]),_r=m5(z),{data:Sr,isLoading:Jn}=Ip({senderEmail:t,conversationId:String(s),enabled:Ge&&!!t}),{emailHeaders:go,selectedEmail:he}=Sr??{},{scrollOnceAfterLoad:Ee,resetScrollState:et}=gI(y),it=j!==K.LOADING&&(!ne||!Object.values(ne).some(te=>te===K.LOADING))&&M&&M.length>0;w.useLayoutEffect(()=>{var te;X&&!p&&se&&((te=x==null?void 0:x.current)!=null&&te.scrollHeight)&&Ee(!!it,"smooth")},[X,p,se,it,Ee,(Ie=x==null?void 0:x.current)==null?void 0:Ie.scrollHeight,l]);const vt=(te,re)=>{r(L3,{search_keyword:te,sm_ids:n,connector_name:re,suggestion_type:ze})},Ut=(te,re,pe)=>{!Array.isArray(re)||!re.length?r(O3,{search_keyword:te,sm_ids:n,connector_name:pe,suggestion_type:ze}):re.length&&r(F3,{num_of_results:re.length,search_keyword:te,sm_ids:n,connector_name:pe,suggestion_type:ze})},{mutate:Kt,reset:Et,data:Bt,isPending:Ar,isIdle:mo}=hI(vt,Ut),Tr=w.useCallback(()=>{Et(),P(null)},[Et,P]),Sn=wo(),hn=w.useCallback(()=>{t&&n.length&&s&&i(La({inboxIds:n,conversationId:s,connectorId:a}))},[i,t,n,s,a]),Ra=w.useCallback(()=>{Sn.invalidateQueries({queryKey:["lookup","bulk"]}),hn()},[Sn,hn]),ns=w.useCallback((te,re)=>{te&&s&&re&&i(Ta({id:te,channelType:"email",conversationId:s,externalResourceId:re,contactEmail:t})).unwrap().catch(()=>{i(Qr(null))})},[i,s,t]);if(w.useEffect(()=>{(async()=>{l&&(q(await hi(l)),de(await du(l)))})()},[l]),w.useEffect(()=>{Jn||Y(he||t)},[t,he,Jn]),w.useEffect(()=>{B&&s&&uI(String(s),B)},[B,s]),w.useEffect(()=>{se&&l&&fu(l)},[se,l]),w.useEffect(()=>{var te;if(Pe){v(!0);const{externalResourceId:re}=Pe,pe=(te=Pe.forms.find(He=>He.type==="edit"))==null?void 0:te.id;ns(pe,re)}else v(!1),i(Fx())},[Pe,ns,i]),w.useEffect(()=>(hn(),et(),()=>{i(z1.clearConnectorList())}),[i,hn,et]),w.useEffect(()=>{if(ae&&M&&M.length&&Yn&&!f.current){const{cards_per_app:te,total_empty_cards:re,total_cards_with_errors:pe}=Yn;r(r3,{numOfCards:M.length,total_cards_loaded:M.length,total_empty_cards:re,total_cards_with_errors:pe,cards_per_app:te,sm_ids:n}),f.current=!0}return()=>{f.current=!1}},[ae,M,Yn,r,n]),w.useEffect(()=>{s&&n&&n.length&&i(Ia({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:wn,connectorId:a}))},[i,n,s,wn,a]),w.useEffect(()=>{const te=re=>{var He;if(!(re instanceof CustomEvent))return;const pe=(He=re.detail)==null?void 0:He.connectorKey;h({connectorKey:pe})};return window.addEventListener(tl.OPEN_FORM_VIEW,te),()=>{window.removeEventListener(tl.OPEN_FORM_VIEW,te)}},[]),w.useEffect(()=>{if(!(ee!=null&&ee.length)||!m.connectorKey)return;const te=m.connectorKey;h({});const re=ee.find(pe=>{var He;return((He=pe.connectorKey)==null?void 0:He.toLowerCase())===(te==null?void 0:te.toLowerCase())});re&&(H(re),E(!0))},[ee,m]),!t.length||j===K.LOADING)return u.jsx(Wv,{});const hl=te=>{r(c3,{connector_name:ve,source:te,sm_ids:n})},Ma=te=>{E(!0),hl(te)},Pa=()=>{A(!0),r(l3)},rs=te=>{r(te,S),je?D(!0):(E(!1),H(null))},ja=te=>{if(Pe){const{connectorName:re,title:pe}=Pe;r(te,{connector_name:re,card_title:pe,sm_ids:n,ug_id:c})}je?D(!0):i(Qr(null))},gl=()=>{E(!1),i(Qr(null)),L(void 0),D(!1)},Ba=()=>{hn(),i(z1.clearConnectorList())},ml=[{label:"Go back",variant:"text",action:gl},{label:"Stay",variant:"contained",action:()=>D(!1)}],O=ee.length>0,Z=J.length>0,Q=()=>O||Z?u.jsx(xE,{haveCreateObjects:O,haveLinkObjects:Z,onCreateClick:()=>Ma(Ld.MAIN_BUTTON),onLinkClick:()=>A(!0)}):u.jsx(ep,{isAdmin:e,hideHeading:!0});return u.jsxs(Bd,{ref:b,"data-testid":Array.isArray(M)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:I||_,children:[u.jsx(dp,{shown:k,setShown:D,title:Ix,description:wx,buttons:ml}),u.jsx(q5,{onWheel:()=>g(!0),ref:x,children:G?u.jsxs(u.Fragment,{children:[u.jsx(A4,{connectors:_r,isWriteFlowEnabled:In,haveCreateObjects:O,haveLinkObjects:Z,cards:M,handleCreateNewObject:()=>Ma(Ld.ICON),handleLinkNewObject:Pa}),Ct?u.jsx(KE,{selectedObject:N,setSelectedObject:P,fetchSearchResults:Kt,onReset:Tr,root:b.current}):null,u.jsxs(Ur,{children:[u.jsx(Kr,{condition:Ct&&Ar,children:u.jsx(lI,{})},"search"),u.jsx(Kr,{condition:Ct&&!!N&&!mo,children:u.jsx(cI,{searchResults:Bt??[],selectedObject:N,onReset:Tr,fetchCards:hn})},"results"),u.jsxs(Kr,{fallback:!0,children:[Ge&&(M!=null&&M.length)?u.jsxs(d.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(d.Stack,{sx:{flex:1,minWidth:0},children:u.jsx(Kv,{emailHeaders:go,selectedEmail:B,root:b.current,isLoading:Jn,setSelectedEmail:Y})}),xt&&ho&&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(gd,{page:"agent_connector_panel"}),W(!0)},children:u.jsx(d.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!Ge&&xt&&ho&&e&&(M!=null&&M.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(gd,{page:"agent_connector_panel"}),W(!0)},children:"Customer identity mapping"}):null,Mt?u.jsx(Zv,{}):null,u.jsxs(Ur,{children:[u.jsxs(Kr,{condition:!!M&&M.length>0,children:[u.jsx(yv,{cards:M,specificCardData:z,email:B??"",specificConnectorApiStatus:ne,onCardUnlinking:hn}),u.jsx("div",{ref:y,children:Qe?u.jsx(T5,{connectors:_r,expanded:X}):null})]},"cards-list"),u.jsx(Kr,{condition:!(M!=null&&M.length)&&In,children:Q()},"create-banner")]})]},"cards")]})]}):u.jsx(ep,{isAdmin:e})}),u.jsx(qc,{onClose:()=>ja(E3),isOpen:C,setIsOpen:v,title:c5,portalId:"connector-layover-portal",backButtonTooltip:"Back",children:u.jsx(pp,{isEdit:!0,onClose:()=>ja(v3),onCreateSuccess:Ba,metaData:S,setMetaData:L})}),u.jsx(qc,{onClose:()=>rs(g3),portalId:"connector-layover-portal",isOpen:I,setIsOpen:E,children:u.jsx(pp,{onClose:()=>rs(h3),onCreateSuccess:Ba,metaData:S,setMetaData:L,defaultOption:$})}),u.jsx(qc,{onClose:()=>A(!1),portalId:"connector-layover-portal",isOpen:_,setIsOpen:A,children:u.jsx(gE,{setOpenTaskLinking:A,onLinkingSuccess:hn})}),!G&&u.jsx(V5,{}),xt&&u.jsx(SI,{open:V,onClose:()=>W(!1),connectors:(jt==null?void 0:jt.connectors)??[],onSaveSuccess:Ra})]})},LI=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:b=!1,actionQueue:y,store:x})=>{const[m,h]=w.useState(void 0);w.useEffect(()=>{if(!x)return;const g=x.subscribe(C=>{h(C)},"connectorId");return()=>g()},[x]);const p=w.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:b,connectorFunctions:l,stackingContext:f,actionQueue:y,store:x,connectorId:m}),[s,n,r,t,o,a,i,c,b,l,f,y,x,m]);return u.jsx(Ve.Provider,{value:p,children:e})},nl=({children:e})=>{const[t]=w.useState(()=>new k2);return u.jsx(j2,{client:t,children:e})},OI=t0({cardList:Ux,write:Dx,common:rx}),rl=Yb({reducer:OI,devTools:!0}),FI=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c,store:l})=>u.jsx(Ki,{store:rl,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(nl,{children:u.jsx(LI,{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,store:l,children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})}),ol=d.styled(d.Box)`
1298
1298
  height: inherit;
1299
1299
  .MuiScopedCssBaseline-root {
1300
1300
  height: inherit;
@@ -1402,7 +1402,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
1402
1402
  [hidden] {
1403
1403
  display: none;
1404
1404
  }
1405
- `,kI=d.styled(d.Box)`
1405
+ `,DI=d.styled(d.Box)`
1406
1406
  :root {
1407
1407
  --toastify-color-light: #fff;
1408
1408
  --toastify-color-dark: #121212;
@@ -2133,7 +2133,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2133
2133
  transform: rotate(360deg);
2134
2134
  }
2135
2135
  }
2136
- `,sl=d.styled(kI)`
2136
+ `,sl=d.styled(DI)`
2137
2137
  .Toastify__toast-container {
2138
2138
  min-width: 320px !important;
2139
2139
  font-size: 16px;
@@ -2182,7 +2182,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2182
2182
  align-self: auto !important;
2183
2183
  margin-left: 12px;
2184
2184
  }
2185
- `,NI=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i,store:c})=>u.jsx(ol,{children:u.jsxs(DI,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,store:c,children:[u.jsx(LI,{isAdmin:r==null?void 0:r.isAdmin}),Ne.createPortal(u.jsx(sl,{id:"toast-message",children:u.jsx(Ya,{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"})]})}),Ap="/v1/api",RI=`${Ap}/connector/conversation/:conversationId/data`,MI=`${Ap}/connector/feedback/conversation/:conversationId`,PI=async(e,t)=>{try{let n=RI.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 we({url:n,method:Re.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 jI(e,t,n){return Ln({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await PI(e,n),enabled:!!t&&!!e})}class BI{constructor(t=[],n=null){ke(this,"highlightTerms");ke(this,"observer");ke(this,"isHighlighting");ke(this,"debounceTimer");ke(this,"debounceDelay");ke(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,m;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"))||((m=i.querySelector)==null?void 0:m.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=`
2185
+ `,kI=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i,store:c})=>u.jsx(ol,{children:u.jsxs(FI,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,store:c,children:[u.jsx(TI,{isAdmin:r==null?void 0:r.isAdmin}),Ne.createPortal(u.jsx(sl,{id:"toast-message",children:u.jsx(Ya,{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"})]})}),Ap="/v1/api",NI=`${Ap}/connector/conversation/:conversationId/data`,RI=`${Ap}/connector/feedback/conversation/:conversationId`,MI=async(e,t)=>{try{let n=NI.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 we({url:n,method:Re.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 PI(e,t,n){return Ln({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await MI(e,n),enabled:!!t&&!!e})}class jI{constructor(t=[],n=null){ke(this,"highlightTerms");ke(this,"observer");ke(this,"isHighlighting");ke(this,"debounceTimer");ke(this,"debounceDelay");ke(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,b;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"))||((b=i.querySelector)==null?void 0:b.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=`
2186
2186
  .gmail-highlight {
2187
2187
  background-color: #ECEFF6 !important;
2188
2188
  color: #2c3e50 !important;
@@ -2212,7 +2212,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2212
2212
  transform: translateY(0) !important;
2213
2213
  box-shadow: none !important;
2214
2214
  }
2215
- `,document.head.appendChild(e)}function VI(){return en({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await we({url:MI.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const GI="Everything looks good",HI="Something is not working",WI="Share feedback",ZI="Manage Smart Previews",XI="Reach out to your admin to disable this feature",zI="Go to Apps",YI="Disable Feature",JI="Tell us what went wrong",qI="Please provide feedback",$I=[{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"}],QI="Tell us more (optional)",UI="Enter your feedback",al=40,KI="Feedback submitted",ew="Failed to submit feedback",ln={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"},Tp=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}),tw=d.styled(d.Box)`
2215
+ `,document.head.appendChild(e)}function BI(){return en({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await we({url:RI.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const VI="Everything looks good",GI="Something is not working",HI="Share feedback",WI="Manage Smart Previews",ZI="Reach out to your admin to disable this feature",XI="Go to Apps",zI="Disable Feature",YI="Tell us what went wrong",JI="Please provide feedback",qI=[{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"}],$I="Tell us more (optional)",QI="Enter your feedback",al=40,UI="Feedback submitted",KI="Failed to submit feedback",ln={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"},Tp=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}),ew=d.styled(d.Box)`
2216
2216
  max-height: 340px;
2217
2217
  width: 440px;
2218
2218
  border-radius: 12px;
@@ -2226,15 +2226,15 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2226
2226
  flex-direction: row;
2227
2227
  margin-bottom: 12px;
2228
2228
  }
2229
- `,nw=d.styled(d.Box)`
2229
+ `,tw=d.styled(d.Box)`
2230
2230
  border-bottom: 1px solid ${d.theme.palette.gray.gray6};
2231
2231
  margin: 12px -16px;
2232
- `,rw=d.styled(d.Box)`
2232
+ `,nw=d.styled(d.Box)`
2233
2233
  display: flex;
2234
2234
  justify-content: flex-end;
2235
2235
  margin-top: 30px;
2236
2236
  gap: 8px;
2237
- `,Lp=({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:h}=(b==null?void 0:b.target)||{};c(h)},m=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},x=r?!s:!i;return u.jsxs(tw,{children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(nw,{}),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:$I.map(b=>u.jsx(d.FormControlLabel,{value:b.value,control:u.jsx(d.Radio,{}),label:b.label},b.value))})}):null,u.jsx(dr,{type:"text",placeholder:r?QI:UI,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:mc()}}),u.jsxs(rw,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:y,children:"Cancel"}),u.jsx(Tp,{variant:"contained",color:"primary",isLoading:n,disabled:x,label:"Submit",onClick:m})]})]})},ow=d.styled(d.Box)`
2237
+ `,Lp=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=w.useState(""),[i,c]=w.useState(""),l=m=>{a(m.target.value)},f=m=>{m.stopPropagation();const{value:h}=(m==null?void 0:m.target)||{};c(h)},b=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},x=r?!s:!i;return u.jsxs(ew,{children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(tw,{}),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:qI.map(m=>u.jsx(d.FormControlLabel,{value:m.value,control:u.jsx(d.Radio,{}),label:m.label},m.value))})}):null,u.jsx(dr,{type:"text",placeholder:r?$I:QI,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:mc()}}),u.jsxs(nw,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:y,children:"Cancel"}),u.jsx(Tp,{variant:"contained",color:"primary",isLoading:n,disabled:x,label:"Submit",onClick:b})]})]})},rw=d.styled(d.Box)`
2238
2238
  border-radius: 12px;
2239
2239
  max-height: 298px;
2240
2240
  width: 288px;
@@ -2244,29 +2244,29 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2244
2244
  & > * {
2245
2245
  box-sizing: border-box;
2246
2246
  }
2247
- `,sw=d.styled(d.Box)`
2247
+ `,ow=d.styled(d.Box)`
2248
2248
  height: 24px;
2249
2249
  display: flex;
2250
2250
  align-items: center;
2251
2251
  justify-content: space-between;
2252
2252
  padding: 12px 0px;
2253
- `,aw=d.styled(d.Typography)`
2253
+ `,sw=d.styled(d.Typography)`
2254
2254
  white-space: nowrap;
2255
2255
  overflow: hidden;
2256
2256
  text-overflow: ellipsis;
2257
2257
  width: ${e=>e.width||"200px"};
2258
2258
  line-height: 18px;
2259
- `,iw=d.styled(d.Box)`
2259
+ `,aw=d.styled(d.Box)`
2260
2260
  height: 1px;
2261
2261
  background-color: ${d.theme.palette.gray.gray6};
2262
2262
  margin: 0 -16px;
2263
- `,cw=d.styled(d.Box)`
2263
+ `,iw=d.styled(d.Box)`
2264
2264
  padding: 0px 16px;
2265
2265
  border-radius: 12px;
2266
2266
  height: calc(100% - 82px);
2267
2267
  overflow-y: auto;
2268
2268
  scrollbar-width: thin;
2269
- `,lw=d.styled(d.Typography)`
2269
+ `,cw=d.styled(d.Typography)`
2270
2270
  font-size: 12px;
2271
2271
  font-weight: 400;
2272
2272
  color: ${d.theme.palette.gray.gray1};
@@ -2274,7 +2274,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2274
2274
  min-width: 80px;
2275
2275
  margin-right: 12px;
2276
2276
  text-align: left;
2277
- `,uw=d.styled(d.Typography)`
2277
+ `,lw=d.styled(d.Typography)`
2278
2278
  font-size: 12px;
2279
2279
  font-weight: 400;
2280
2280
  color: ${d.theme.palette.gray.black};
@@ -2283,11 +2283,11 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2283
2283
  margin-right: 0px;
2284
2284
  word-break: 'break-word';
2285
2285
  text-align: right;
2286
- `,dw=d.styled(d.Box)`
2286
+ `,uw=d.styled(d.Box)`
2287
2287
  display: flex;
2288
2288
  justify-content: space-between;
2289
2289
  margin-bottom: 20px;
2290
- `,fw=d.styled(d.Box)`
2290
+ `,dw=d.styled(d.Box)`
2291
2291
  display: flex;
2292
2292
  justify-content: space-between;
2293
2293
  align-items: center;
@@ -2298,13 +2298,13 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2298
2298
  `,$o=d.styled(d.Tooltip)`
2299
2299
  padding: 6px;
2300
2300
  border-radius: 6px;
2301
- `,pw=d.styled(d.Button)`
2301
+ `,fw=d.styled(d.Button)`
2302
2302
  background-color: #f3f8ff;
2303
2303
  border-radius: 360px;
2304
2304
  color: #196fe0;
2305
2305
  padding: 5px 12px;
2306
2306
  min-width: 100px;
2307
- `,Op=e=>T.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),Fp=e=>T.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),hw=e=>T.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),gw=e=>T.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_189_1728)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_189_1728"},T.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),mw=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_3803_129233)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_3803_129233"},T.createElement("rect",{width:16,height:16,fill:"white"})))),bw=({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),m=w.useRef(!1),[y,x]=w.useState(!1),[b,h]=w.useState([]),{mutate:p,isPending:g}=VI(),{logoUrl:C,cardTitle:v,id:I,externalResourceId:E,connectorId:_,textToHighlight:A}=e.cardData||{},S=w.useMemo(()=>({key:A,card_id:I,card_title:v,connector_id:_,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,I,v,_,E,r,n]);if(w.useEffect(()=>{const X=Date.now();return()=>{c(ln.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),w.useEffect(()=>{var q,se,de;const X=(de=(se=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:se.flatDetails)==null?void 0:de.data;if(X){const V=X.sort((W,M)=>W.priority-M.priority);h(V),c(ln.OBJECT_HOVERED,S)}},[e,c,S]),!b||b.length===0)return null;const L=()=>{f(!0),c(ln.FEEDBACK_OPTION_CLICKED,S)},k=()=>{x(!0),c(ln.NEGATIVE_FEEDBACK_CLICKED,S)},D=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),p({conversationId:r,feedbackData:q},{onSuccess:()=>{l?c(ln.FEEDBACK_OPTION_SUBMITTED,S):y&&c(ln.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),x(!1),_e({message:KI,type:rn})},onError:()=>{_e({message:ew,type:qe})}})},N=()=>{D({isThumbsUp:!0}),c(ln.POSITIVE_FEEDBACK_CLICKED,S)},P=X=>{D({...X,isThumbsUp:!1})},B=()=>{s==null||s(_),i()},Y=()=>{a==null||a()},$=X=>{c(ln.PERMALINK_CLICKED,{...S,clicked_value:X})},H=()=>{m.current||(c(ln.DATA_CARD_SCROLLED,S),m.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(ow,{children:[u.jsxs(cw,{onScroll:H,children:[u.jsxs(sw,{children:[u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[C&&u.jsx("img",{src:C,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(d.Tooltip,{title:v,arrow:!0,placement:"top",children:u.jsx(aw,{variant:"h3",color:d.theme.palette.gray.black,width:o?"100px":"200px",children:v})})]}),o?u.jsx(pw,{variant:"text",size:"small",endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:Y,children:zI}):null]}),u.jsx(iw,{}),u.jsx(d.Box,{paddingY:"16px",children:b.map(({key:X,value:q,label:se,deepLink:de})=>u.jsxs(dw,{children:[u.jsxs(lw,{children:[se,":"]}),u.jsx(d.Tooltip,{title:(q==null?void 0:q.length)>al?q:"",arrow:!0,placement:"top",children:de?u.jsx(d.Link,{href:de,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:d.theme.palette.primary.main},onClick:()=>$(q),children:kd(q||"N/A",al)}):u.jsx(uw,{children:kd(q||"N/A",al)})})]},X))})]}),u.jsxs(fw,{children:[u.jsx(d.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx($o,{arrow:!0,title:ZI,placement:"top",children:u.jsx(d.IconButton,{onClick:B,children:u.jsx(hw,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:12,children:YI}),u.jsx($o,{arrow:!0,title:XI,placement:"top",children:u.jsx(d.IconButton,{size:"small",children:u.jsx(mw,{})})})]})}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx($o,{arrow:!0,title:GI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:g,onClick:N,children:u.jsx(Op,{})})}),u.jsx($o,{arrow:!0,title:HI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:g,onClick:k,children:u.jsx(Fp,{})})}),u.jsx($o,{arrow:!0,title:WI,placement:"top",children:u.jsx(d.IconButton,{onClick:L,size:"small",disabled:g,children:u.jsx(gw,{})})})]})]})]}),u.jsx(hr,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:u.jsx(Lp,{onCancel:()=>f(!1),onSubmit:D,isLoading:g,showOptions:!1,title:qI})}),u.jsx(hr,{shown:y,setShown:x,borderRadius:12,sx:{zIndex:15002},children:u.jsx(Lp,{onCancel:()=>x(!1),onSubmit:P,isLoading:g,title:JI})})]})},Dp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,kp=(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"},yw=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"),[m,y]=w.useState(!1),x=w.useRef(null),b=w.useRef({x:0,y:0}),h=w.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]);w.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,k=L.textContent||"",D=kp(L);f(D),c(k),n&&n(k),a(L),o(!0)},_=()=>{if(r&&s){const S=kp(s);f(S)}},A=S=>{if(b.current={x:S.clientX,y:S.clientY},!r||m)return;const L=S.clientX,k=S.clientY;let D=!1;for(const N of e)if(Dp(L,k,N.getBoundingClientRect())){D=!0;break}if(!D){const N=document.querySelector(`.${d.tooltipClasses.tooltip}`);N&&Dp(L,k,N.getBoundingClientRect())&&(D=!0)}D||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",A),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",A),h()}}},[e,n,r,s,m,h]);const p=()=>{y(!0),h()},g=()=>{y(!1),x.current=setTimeout(()=>{o(!1),a(null)},150)},v=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:p,onMouseLeave:g,children:v});return u.jsx(yw,{title:I,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const xw=({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:m,isError:y}=jI(e,t,n);return w.useEffect(()=>{m?c(m):y&&c(null)},[m,y]),w.useEffect(()=>{let x=null;if(i&&Object.keys(i).length&&e){x=new BI(Object.keys(i)||[],f);const b=Object.keys(i).map(h=>{var g;const p=((g=i[h])==null?void 0:g.cardData)||{};return{key:h,card_title:p.cardTitle,connector_id:p.connectorId}});a(ln.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:b})}return()=>{x&&x.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(Cw,{elements:l,title:(x,b)=>{var h;return!i||!x||!((h=i[x])!=null&&h.cardData)?u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(bw,{smIds:n,conversationId:e||"",analysisData:i[x],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:b,sendTrackingEvent:a})}})})},vw=({children:e})=>u.jsx(Ki,{store:rl,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(nl,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),Ew=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx(ol,{children:u.jsxs(vw,{children:[u.jsx(xw,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Ne.createPortal(u.jsx(sl,{id:"toast-message",children:u.jsx(Ya,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),Np={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},Iw=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class ww{constructor({processDelay:t=1e3}){ke(this,"_processDelay");ke(this,"initialized",!1);ke(this,"_queue",[]);ke(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});ke(this,"ACTIONS",Np);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 Np.OPEN_CREATE_FORM:Iw(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var xe=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(xe||{}),Oa=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Oa||{});const _w=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},Sw=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Oa.UNAUTHENTICATED?xe.UNAUTHENTICATED:n.pending>0?xe.PENDING:n.failed?xe.ERROR:r.length===0?xe.NOT_LOGGED:o?xe.LOGGED:xe.PAUSED},il=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},T.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"})),Aw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},T.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"})),Tw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},T.createElement("g",{clipPath:"url(#clip0_532_206243)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_532_206243"},T.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),Lw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},T.createElement("g",{clipPath:"url(#clip0_1_11813)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1_11813"},T.createElement("rect",{width:18,height:18,fill:"white"})))),Fa=d.keyframes`
2307
+ `,Op=e=>T.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),Fp=e=>T.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),pw=e=>T.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),hw=e=>T.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_189_1728)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_189_1728"},T.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),gw=e=>T.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_3803_129233)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_3803_129233"},T.createElement("rect",{width:16,height:16,fill:"white"})))),mw=({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),b=w.useRef(!1),[y,x]=w.useState(!1),[m,h]=w.useState([]),{mutate:p,isPending:g}=BI(),{logoUrl:C,cardTitle:v,id:I,externalResourceId:E,connectorId:_,textToHighlight:A}=e.cardData||{},S=w.useMemo(()=>({key:A,card_id:I,card_title:v,connector_id:_,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,I,v,_,E,r,n]);if(w.useEffect(()=>{const X=Date.now();return()=>{c(ln.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),w.useEffect(()=>{var q,se,de;const X=(de=(se=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:se.flatDetails)==null?void 0:de.data;if(X){const V=X.sort((W,M)=>W.priority-M.priority);h(V),c(ln.OBJECT_HOVERED,S)}},[e,c,S]),!m||m.length===0)return null;const L=()=>{f(!0),c(ln.FEEDBACK_OPTION_CLICKED,S)},k=()=>{x(!0),c(ln.NEGATIVE_FEEDBACK_CLICKED,S)},D=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),p({conversationId:r,feedbackData:q},{onSuccess:()=>{l?c(ln.FEEDBACK_OPTION_SUBMITTED,S):y&&c(ln.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),x(!1),_e({message:UI,type:rn})},onError:()=>{_e({message:KI,type:qe})}})},N=()=>{D({isThumbsUp:!0}),c(ln.POSITIVE_FEEDBACK_CLICKED,S)},P=X=>{D({...X,isThumbsUp:!1})},B=()=>{s==null||s(_),i()},Y=()=>{a==null||a()},$=X=>{c(ln.PERMALINK_CLICKED,{...S,clicked_value:X})},H=()=>{b.current||(c(ln.DATA_CARD_SCROLLED,S),b.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(rw,{children:[u.jsxs(iw,{onScroll:H,children:[u.jsxs(ow,{children:[u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[C&&u.jsx("img",{src:C,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(d.Tooltip,{title:v,arrow:!0,placement:"top",children:u.jsx(sw,{variant:"h3",color:d.theme.palette.gray.black,width:o?"100px":"200px",children:v})})]}),o?u.jsx(fw,{variant:"text",size:"small",endIcon:u.jsx(d.icons.ArrowForward,{}),onClick:Y,children:XI}):null]}),u.jsx(aw,{}),u.jsx(d.Box,{paddingY:"16px",children:m.map(({key:X,value:q,label:se,deepLink:de})=>u.jsxs(uw,{children:[u.jsxs(cw,{children:[se,":"]}),u.jsx(d.Tooltip,{title:(q==null?void 0:q.length)>al?q:"",arrow:!0,placement:"top",children:de?u.jsx(d.Link,{href:de,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:d.theme.palette.primary.main},onClick:()=>$(q),children:kd(q||"N/A",al)}):u.jsx(lw,{children:kd(q||"N/A",al)})})]},X))})]}),u.jsxs(dw,{children:[u.jsx(d.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx($o,{arrow:!0,title:WI,placement:"top",children:u.jsx(d.IconButton,{onClick:B,children:u.jsx(pw,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(d.Typography,{color:d.theme.palette.gray.gray3,fontSize:12,children:zI}),u.jsx($o,{arrow:!0,title:ZI,placement:"top",children:u.jsx(d.IconButton,{size:"small",children:u.jsx(gw,{})})})]})}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx($o,{arrow:!0,title:VI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:g,onClick:N,children:u.jsx(Op,{})})}),u.jsx($o,{arrow:!0,title:GI,placement:"top",children:u.jsx(d.IconButton,{size:"small",disabled:g,onClick:k,children:u.jsx(Fp,{})})}),u.jsx($o,{arrow:!0,title:HI,placement:"top",children:u.jsx(d.IconButton,{onClick:L,size:"small",disabled:g,children:u.jsx(hw,{})})})]})]})]}),u.jsx(hr,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:u.jsx(Lp,{onCancel:()=>f(!1),onSubmit:D,isLoading:g,showOptions:!1,title:JI})}),u.jsx(hr,{shown:y,setShown:x,borderRadius:12,sx:{zIndex:15002},children:u.jsx(Lp,{onCancel:()=>x(!1),onSubmit:P,isLoading:g,title:YI})})]})},Dp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,kp=(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"},bw=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 yw({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"),[b,y]=w.useState(!1),x=w.useRef(null),m=w.useRef({x:0,y:0}),h=w.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]);w.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,k=L.textContent||"",D=kp(L);f(D),c(k),n&&n(k),a(L),o(!0)},_=()=>{if(r&&s){const S=kp(s);f(S)}},A=S=>{if(m.current={x:S.clientX,y:S.clientY},!r||b)return;const L=S.clientX,k=S.clientY;let D=!1;for(const N of e)if(Dp(L,k,N.getBoundingClientRect())){D=!0;break}if(!D){const N=document.querySelector(`.${d.tooltipClasses.tooltip}`);N&&Dp(L,k,N.getBoundingClientRect())&&(D=!0)}D||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",A),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",A),h()}}},[e,n,r,s,b,h]);const p=()=>{y(!0),h()},g=()=>{y(!1),x.current=setTimeout(()=>{o(!1),a(null)},150)},v=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:p,onMouseLeave:g,children:v});return u.jsx(bw,{title:I,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const Cw=({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:b,isError:y}=PI(e,t,n);return w.useEffect(()=>{b?c(b):y&&c(null)},[b,y]),w.useEffect(()=>{let x=null;if(i&&Object.keys(i).length&&e){x=new jI(Object.keys(i)||[],f);const m=Object.keys(i).map(h=>{var g;const p=((g=i[h])==null?void 0:g.cardData)||{};return{key:h,card_title:p.cardTitle,connector_id:p.connectorId}});a(ln.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:m})}return()=>{x&&x.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(yw,{elements:l,title:(x,m)=>{var h;return!i||!x||!((h=i[x])!=null&&h.cardData)?u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(mw,{smIds:n,conversationId:e||"",analysisData:i[x],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:m,sendTrackingEvent:a})}})})},xw=({children:e})=>u.jsx(Ki,{store:rl,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(nl,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),vw=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx(ol,{children:u.jsxs(xw,{children:[u.jsx(Cw,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Ne.createPortal(u.jsx(sl,{id:"toast-message",children:u.jsx(Ya,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),Np={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},Ew=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class Iw{constructor({processDelay:t=1e3}){ke(this,"_processDelay");ke(this,"initialized",!1);ke(this,"_queue",[]);ke(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});ke(this,"ACTIONS",Np);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 Np.OPEN_CREATE_FORM:Ew(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var xe=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(xe||{}),Oa=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Oa||{});const ww=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},_w=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Oa.UNAUTHENTICATED?xe.UNAUTHENTICATED:n.pending>0?xe.PENDING:n.failed?xe.ERROR:r.length===0?xe.NOT_LOGGED:o?xe.LOGGED:xe.PAUSED},il=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},T.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"})),Sw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},T.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"})),Aw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},T.createElement("g",{clipPath:"url(#clip0_532_206243)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_532_206243"},T.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),Tw=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},T.createElement("g",{clipPath:"url(#clip0_1_11813)"},T.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"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1_11813"},T.createElement("rect",{width:18,height:18,fill:"white"})))),Fa=d.keyframes`
2308
2308
  from {
2309
2309
  transform: rotate(0deg);
2310
2310
  }
@@ -2317,73 +2317,73 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2317
2317
  border-radius: 50%;
2318
2318
  justify-content: center;
2319
2319
  align-items: center;
2320
- `,Ow=d.styled(cl)`
2320
+ `,Lw=d.styled(cl)`
2321
2321
  background-color: #ffe250;
2322
- `,Fw=d.styled(cl)`
2322
+ `,Ow=d.styled(cl)`
2323
2323
  background-color: #00bc7e;
2324
- `,Dw=d.styled(cl)`
2324
+ `,Fw=d.styled(cl)`
2325
2325
  animation: ${Fa} 1s linear infinite;
2326
2326
  animation-fill-mode: backwards;
2327
2327
  animation-direction: reverse;
2328
- `,kw={[xe.NOT_LOGGED]:u.jsx(Ow,{children:u.jsx(hp,{})}),[xe.PENDING]:u.jsx(Dw,{children:u.jsx(Tw,{})}),[xe.LOGGED]:u.jsx(Fw,{children:u.jsx(Aw,{})}),[xe.ERROR]:u.jsx(il,{}),[xe.UNAUTHENTICATED]:u.jsx(il,{}),[xe.PAUSED]:u.jsx(Lw,{})},Rp=d.styled(d.Typography)`
2328
+ `,Dw={[xe.NOT_LOGGED]:u.jsx(Lw,{children:u.jsx(hp,{})}),[xe.PENDING]:u.jsx(Fw,{children:u.jsx(Aw,{})}),[xe.LOGGED]:u.jsx(Ow,{children:u.jsx(Sw,{})}),[xe.ERROR]:u.jsx(il,{}),[xe.UNAUTHENTICATED]:u.jsx(il,{}),[xe.PAUSED]:u.jsx(Tw,{})},Rp=d.styled(d.Typography)`
2329
2329
  font-size: 12px;
2330
2330
  line-height: 14px;
2331
2331
  font-weight: 500;
2332
2332
  color: #4d596c;
2333
- `,Nw=d.styled(Rp)`
2333
+ `,kw=d.styled(Rp)`
2334
2334
  color: #6f7c90;
2335
- `,ll=e=>u.jsx(Rp,{children:e}),ul=e=>u.jsx(Nw,{children:e}),Rw={[xe.NOT_LOGGED]:ll,[xe.PENDING]:ul,[xe.LOGGED]:ll,[xe.PAUSED]:ll,[xe.ERROR]:ul,[xe.UNAUTHENTICATED]:ul},Mw={[xe.NOT_LOGGED]:"Sync conversation",[xe.PENDING]:"Syncing in progress",[xe.LOGGED]:"Synced",[xe.PAUSED]:"Synced",[xe.ERROR]:"Syncing failed",[xe.UNAUTHENTICATED]:"Sync conversation"},qt=w.createContext({}),Pw=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"}})),jw=d.styled(d.Box)`
2335
+ `,ll=e=>u.jsx(Rp,{children:e}),ul=e=>u.jsx(kw,{children:e}),Nw={[xe.NOT_LOGGED]:ll,[xe.PENDING]:ul,[xe.LOGGED]:ll,[xe.PAUSED]:ll,[xe.ERROR]:ul,[xe.UNAUTHENTICATED]:ul},Rw={[xe.NOT_LOGGED]:"Sync conversation",[xe.PENDING]:"Syncing in progress",[xe.LOGGED]:"Synced",[xe.PAUSED]:"Synced",[xe.ERROR]:"Syncing failed",[xe.UNAUTHENTICATED]:"Sync conversation"},qt=w.createContext({}),Mw=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"}})),Pw=d.styled(d.Box)`
2336
2336
  width: fit-content;
2337
2337
  height: fit-content;
2338
- `,Bw=({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(jw,{onClick:a,children:u.jsx(Pw,{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})})})},Vw="Turn off to stop syncing this conversation.",Gw="Turn on to continue syncing this conversation.",Hw="Authentication failed",Ww="Retry authentication to use this functionality and save in ':connectorName'",Zw="Reach out to your admin to reauthenticate :connectorName",Xw="Syncing this conversation to :connectorName. Refresh the page to see updates.",zw="Something went wrong while syncing this conversation. Please try again.",Yw="No recommendations found",Jw="Already synced email cannot be removed",qw="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",$w="Log this email thread to your CRM",Qw="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",Mp="connector-agent_email-logger_welcomed",Pp="connector-agent_email-logger_welcome_shown",Uw="Tell us how we can improve",Kw="Everything looks good",e_="Something is not working",t_="Please provide your feedback",n_="Feedback submitted",r_="Failed to submit feedback",jp="email-logging",o_=[{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"},s_={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},a_={color:"#fff !important"},i_=d.styled(d.Stack)`
2338
+ `,jw=({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(Pw,{onClick:a,children:u.jsx(Mw,{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})})})},Bw="Turn off to stop syncing this conversation.",Vw="Turn on to continue syncing this conversation.",Gw="Authentication failed",Hw="Retry authentication to use this functionality and save in ':connectorName'",Ww="Reach out to your admin to reauthenticate :connectorName",Zw="Syncing this conversation to :connectorName. Refresh the page to see updates.",Xw="Something went wrong while syncing this conversation. Please try again.",zw="No recommendations found",Yw="Already synced email cannot be removed",Jw="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",qw="Log this email thread to your CRM",$w="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",Mp="connector-agent_email-logger_welcomed",Pp="connector-agent_email-logger_welcome_shown",Qw="Tell us how we can improve",Uw="Everything looks good",Kw="Something is not working",e_="Please provide your feedback",t_="Feedback submitted",n_="Failed to submit feedback",jp="email-logging",r_=[{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"},o_={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},s_={color:"#fff !important"},a_=d.styled(d.Stack)`
2339
2339
  box-sizing: border-box;
2340
2340
  padding: 16px;
2341
- `,c_=d.styled("img")`
2341
+ `,i_=d.styled("img")`
2342
2342
  display: block;
2343
2343
  width: 100%;
2344
2344
  aspect-ratio: 3 / 2;
2345
2345
  border-radius: 8px;
2346
2346
  background: #ecedff;
2347
2347
  object-fit: cover;
2348
- `,l_=d.styled(d.Typography)`
2348
+ `,c_=d.styled(d.Typography)`
2349
2349
  margin-top: 10px;
2350
2350
  color: #343c45;
2351
2351
  font-size: 14px;
2352
2352
  font-weight: 600;
2353
2353
  line-height: 18px;
2354
2354
  letter-spacing: -0.28px;
2355
- `,u_=d.styled(d.Typography)`
2355
+ `,l_=d.styled(d.Typography)`
2356
2356
  margin-top: 6px;
2357
2357
  color: #3e4c5a;
2358
2358
  font-size: 13px;
2359
2359
  font-weight: 400;
2360
2360
  line-height: 18px;
2361
2361
  letter-spacing: -0.13px;
2362
- `,d_=d.styled(d.Stack)`
2362
+ `,u_=d.styled(d.Stack)`
2363
2363
  margin-top: 20px;
2364
2364
  flex-flow: row nowrap;
2365
2365
  justify-content: flex-end;
2366
2366
  column-gap: 8px;
2367
- `,Bp=V0(),f_=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=w.useContext(qt),r=n==null?void 0:n.sendTrackingEvent;return w.useEffect(()=>{const o=Bp.getItem(Pp);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(Ft.email_logging_intro_popup_shown,{app_name:t}),Bp.setItem(Pp,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),u.jsxs(i_,{children:[u.jsx(c_,{src:qw,alt:"Welcome"}),u.jsx(l_,{children:$w}),u.jsx(u_,{children:Qw}),u.jsx(d_,{children:e?u.jsx(d.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},p_=({children:e,onContinue:t,connectorName:n})=>u.jsx(T1,{title:u.jsx(f_,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:s_,arrowStyle:a_,children:e}),h_={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},g_={color:"#fff !important"},m_=d.styled(d.Box)`
2367
+ `,Bp=V0(),d_=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=w.useContext(qt),r=n==null?void 0:n.sendTrackingEvent;return w.useEffect(()=>{const o=Bp.getItem(Pp);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(Ft.email_logging_intro_popup_shown,{app_name:t}),Bp.setItem(Pp,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),u.jsxs(a_,{children:[u.jsx(i_,{src:Jw,alt:"Welcome"}),u.jsx(c_,{children:qw}),u.jsx(l_,{children:$w}),u.jsx(u_,{children:e?u.jsx(d.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},f_=({children:e,onContinue:t,connectorName:n})=>u.jsx(T1,{title:u.jsx(d_,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:o_,arrowStyle:s_,children:e}),p_={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:d.theme.palette.gray.gray3,padding:"0px"},h_={color:"#fff !important"},g_=d.styled(d.Box)`
2368
2368
  padding: 16px;
2369
- `,b_=d.styled(d.Typography)`
2369
+ `,m_=d.styled(d.Typography)`
2370
2370
  font-weight: 600;
2371
2371
  font-size: 14px;
2372
2372
  line-height: 130%;
2373
2373
  color: ${d.theme.palette.gray.gray1};
2374
- `,y_=d.styled(d.Typography)`
2374
+ `,b_=d.styled(d.Typography)`
2375
2375
  font-weight: 400;
2376
2376
  font-size: 13px;
2377
2377
  line-height: 135%;
2378
2378
  color: ${d.theme.palette.gray.gray3};
2379
2379
  margin-top: 6px;
2380
- `,C_=d.styled(d.Box)`
2380
+ `,y_=d.styled(d.Box)`
2381
2381
  display: flex;
2382
2382
  justify-content: space-between;
2383
2383
  align-items: center;
2384
2384
  margin-top: 20px;
2385
2385
  width: 100%;
2386
- `,x_=e=>T.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.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"})),v_=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?Ww:Zw,{connectorFunctions:s}=w.useContext(qt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(m_,{children:[u.jsx(b_,{children:Hw}),u.jsx(y_,{children:lt(o,{connectorName:n})}),u.jsxs(C_,{children:[u.jsx("div",{children:u.jsx(x_,{})}),e?u.jsx(d.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},E_=({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(T1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(v_,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:h_,arrowStyle:g_,children:o})},I_=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=w.useState(()=>localStorage.getItem(Mp)==="true"),[f,m]=w.useState(!1),{connectorId:y,connectorName:x,connectorStatus:b}=n??{},h=t||b!==Oa.DISABLED,p=b===Oa.UNAUTHENTICATED,g=r===xe.PENDING,C=()=>{localStorage.setItem(Mp,"true"),l(!0),m(!0),i==null||i(Ft.email_logging_intro_popup_continue_clicked,{app_name:x})};return c?p?u.jsx(E_,{connectorId:y,connectorName:x,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(d.Tooltip,{title:zw,children:e}):g?u.jsx(d.Tooltip,{title:Xw.replace(":connectorName",x),children:e}):s?u.jsx(Bw,{defaultOpen:f,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(p_,{onContinue:h?C:void 0,connectorName:x,children:e})},w_=e=>T.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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)"}),T.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)"}),T.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},T.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"})),T.createElement("g",{mask:"url(#mask0_8481_102191)"},T.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),T.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)"}),T.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)"})),T.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)"}),T.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)"}),T.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)"}),T.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"}),T.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"}),T.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)"}),T.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"}),T.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"}),T.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),T.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"}),T.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"}),T.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),T.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"}),T.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"}),T.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"}),T.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"}),T.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),T.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),T.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)"}),T.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"}),T.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),T.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"}),T.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"}),T.createElement("defs",null,T.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFABC"}),T.createElement("stop",{offset:1,stopColor:"#FFA650"})),T.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"white"}),T.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),T.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#ECF7FF"}),T.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),dl=({message:e})=>u.jsxs(d.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[u.jsx(w_,{width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:e})]}),Mn="/v1/api",__=`${Mn}/connector/conversation/:conversationId/email_log_status`,S_=`${Mn}/connector/conversation/:conversationId/entity_recommendations`,A_=`${Mn}/connector/conversation/:conversationId/retry_emails_log`,T_=`${Mn}/connector/conversation/:conversationId/validate_entity`,L_=`${Mn}/connectors/forms/:formId/search`,O_=`${Mn}/connector/conversation/:conversationId/log_emails`,F_=`${Mn}/connector/feedback/conversation/:conversationId`,D_=`${Mn}/connector/conversation/:conversationId/log_emails`,k_=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 we({url:lt(T_,{conversationId:n}),data:e,method:Re.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}},N_=({onSuccess:e,onError:t})=>en({mutationFn:k_,onSuccess:e,onError:t}),fl=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},T.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"})),R_=d.styled(d.Stack)`
2386
+ `,C_=e=>T.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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"}),T.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"})),x_=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?Hw:Ww,{connectorFunctions:s}=w.useContext(qt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(g_,{children:[u.jsx(m_,{children:Gw}),u.jsx(b_,{children:lt(o,{connectorName:n})}),u.jsxs(y_,{children:[u.jsx("div",{children:u.jsx(C_,{})}),e?u.jsx(d.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},v_=({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(T1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(x_,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:p_,arrowStyle:h_,children:o})},E_=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=w.useState(()=>localStorage.getItem(Mp)==="true"),[f,b]=w.useState(!1),{connectorId:y,connectorName:x,connectorStatus:m}=n??{},h=t||m!==Oa.DISABLED,p=m===Oa.UNAUTHENTICATED,g=r===xe.PENDING,C=()=>{localStorage.setItem(Mp,"true"),l(!0),b(!0),i==null||i(Ft.email_logging_intro_popup_continue_clicked,{app_name:x})};return c?p?u.jsx(v_,{connectorId:y,connectorName:x,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(d.Tooltip,{title:Xw,children:e}):g?u.jsx(d.Tooltip,{title:Zw.replace(":connectorName",x),children:e}):s?u.jsx(jw,{defaultOpen:f,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(f_,{onContinue:h?C:void 0,connectorName:x,children:e})},I_=e=>T.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.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)"}),T.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)"}),T.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},T.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"})),T.createElement("g",{mask:"url(#mask0_8481_102191)"},T.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),T.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)"}),T.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)"})),T.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)"}),T.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)"}),T.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)"}),T.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"}),T.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"}),T.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)"}),T.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"}),T.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"}),T.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),T.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"}),T.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"}),T.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),T.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"}),T.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"}),T.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"}),T.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"}),T.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),T.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),T.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)"}),T.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"}),T.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),T.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"}),T.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"}),T.createElement("defs",null,T.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFABC"}),T.createElement("stop",{offset:1,stopColor:"#FFA650"})),T.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#A3C1FF"}),T.createElement("stop",{offset:1,stopColor:"#4243FF"})),T.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FFFDE0"}),T.createElement("stop",{offset:1,stopColor:"#FFB362"})),T.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"white"}),T.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),T.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#FF9498"}),T.createElement("stop",{offset:1,stopColor:"#FFD671"})),T.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},T.createElement("stop",{stopColor:"#ECF7FF"}),T.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),dl=({message:e})=>u.jsxs(d.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[u.jsx(I_,{width:124,height:107}),u.jsx(d.Typography,{variant:"body2",color:d.theme.palette.gray.gray3,children:e})]}),Mn="/v1/api",w_=`${Mn}/connector/conversation/:conversationId/email_log_status`,__=`${Mn}/connector/conversation/:conversationId/entity_recommendations`,S_=`${Mn}/connector/conversation/:conversationId/retry_emails_log`,A_=`${Mn}/connector/conversation/:conversationId/validate_entity`,T_=`${Mn}/connectors/forms/:formId/search`,L_=`${Mn}/connector/conversation/:conversationId/log_emails`,O_=`${Mn}/connector/feedback/conversation/:conversationId`,F_=`${Mn}/connector/conversation/:conversationId/log_emails`,D_=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 we({url:lt(A_,{conversationId:n}),data:e,method:Re.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}},k_=({onSuccess:e,onError:t})=>en({mutationFn:D_,onSuccess:e,onError:t}),fl=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},T.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"})),N_=d.styled(d.Stack)`
2387
2387
  display: flex;
2388
2388
  flex-flow: row nowrap;
2389
2389
  justify-content: flex-start;
@@ -2399,7 +2399,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2399
2399
  cursor: not-allowed;
2400
2400
  }
2401
2401
  `:null}
2402
- `,M_=d.styled(d.Checkbox)`
2402
+ `,R_=d.styled(d.Checkbox)`
2403
2403
  padding: 0;
2404
2404
  margin: 0;
2405
2405
  svg {
@@ -2415,12 +2415,12 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2415
2415
  input:checked:disabled ~ svg {
2416
2416
  fill: #d6dde8;
2417
2417
  }
2418
- `,P_=d.styled(fl)`
2418
+ `,M_=d.styled(fl)`
2419
2419
  width: 16px;
2420
2420
  height: 16px;
2421
2421
  fill: #506dff;
2422
2422
  animation: ${Fa} 1s linear infinite;
2423
- `,j_=d.styled(d.Typography)`
2423
+ `,P_=d.styled(d.Typography)`
2424
2424
  font-size: 13px;
2425
2425
  overflow: hidden;
2426
2426
  text-overflow: ellipsis;
@@ -2428,7 +2428,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2428
2428
  `,Vp=d.styled(d.Stack)`
2429
2429
  margin-left: auto;
2430
2430
  flex-shrink: 0;
2431
- `,B_=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,m=g=>{o==null||o(C=>({...C,[l+c]:g})),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:x,isPending:b,isError:h}=N_({onSuccess:m,onError:y}),p=()=>{!o||b||r||h||(n?o(g=>{const C={...g};return delete C[l+c],C}):(i==null||i(Ft.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),x({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return u.jsx(d.Tooltip,{title:r?Jw:"",placement:"top",children:u.jsxs(R_,{disabled:b||h,onClick:p,children:[u.jsx(M_,{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(j_,{variant:"body2",children:c})}),b?u.jsx(Vp,{children:u.jsx(P_,{})}):null,h?u.jsx(d.Tooltip,{title:"Record not found in "+e,children:u.jsx(Vp,{children:u.jsx(il,{})})}):null]})})},V_=d.styled(d.Stack)`
2431
+ `,j_=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,b=g=>{o==null||o(C=>({...C,[l+c]:g})),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:x,isPending:m,isError:h}=k_({onSuccess:b,onError:y}),p=()=>{!o||m||r||h||(n?o(g=>{const C={...g};return delete C[l+c],C}):(i==null||i(Ft.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),x({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return u.jsx(d.Tooltip,{title:r?Yw:"",placement:"top",children:u.jsxs(N_,{disabled:m||h,onClick:p,children:[u.jsx(R_,{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(P_,{variant:"body2",children:c})}),m?u.jsx(Vp,{children:u.jsx(M_,{})}):null,h?u.jsx(d.Tooltip,{title:"Record not found in "+e,children:u.jsx(Vp,{children:u.jsx(il,{})})}):null]})})},B_=d.styled(d.Stack)`
2432
2432
  color: #343c45;
2433
2433
  padding: 18px 0;
2434
2434
  box-sizing: border-box;
@@ -2439,7 +2439,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2439
2439
  overflow-y: auto;
2440
2440
  scrollbar-width: thin;
2441
2441
  scrollbar-color: #97a3b7 transparent;
2442
- `;const G_=d.styled(d.Stack)`
2442
+ `;const V_=d.styled(d.Stack)`
2443
2443
  display: grid;
2444
2444
  grid-template-rows: max-content 0fr;
2445
2445
  transition: grid-template-rows 300ms ease-out;
@@ -2452,7 +2452,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2452
2452
  transform: rotate(-90deg);
2453
2453
  }
2454
2454
  }
2455
- `,H_=d.styled(d.Stack)`
2455
+ `,G_=d.styled(d.Stack)`
2456
2456
  cursor: pointer;
2457
2457
  flex-flow: row nowrap;
2458
2458
  justify-content: space-between;
@@ -2465,19 +2465,19 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2465
2465
  transform-origin: center;
2466
2466
  transition: transform 300ms ease-out;
2467
2467
  }
2468
- `,W_=d.styled(d.Typography)`
2468
+ `,H_=d.styled(d.Typography)`
2469
2469
  font-size: 13px;
2470
2470
  line-height: 18px;
2471
2471
  font-weight: 400;
2472
2472
  color: #6f7c90;
2473
2473
  text-transform: capitalize;
2474
- `,Z_=d.styled(d.Stack)`
2474
+ `,W_=d.styled(d.Stack)`
2475
2475
  overflow: hidden;
2476
- `,Gp=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),Hp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=w.useMemo(()=>_w(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(V_,{children:s.map(i=>u.jsxs(G_,{className:"expanded",children:[u.jsxs(H_,{onClick:a,children:[u.jsx(W_,{variant:"body2",children:i.type}),u.jsx(Gp,{className:"toggle-arrow-icon"})]}),u.jsx(Z_,{children:i.entities.map(c=>u.jsx(B_,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):u.jsx(dl,{message:Yw})},X_=d.styled(d.Stack)`
2476
+ `,Gp=e=>T.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},T.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"})),Hp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=w.useMemo(()=>ww(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(B_,{children:s.map(i=>u.jsxs(V_,{className:"expanded",children:[u.jsxs(G_,{onClick:a,children:[u.jsx(H_,{variant:"body2",children:i.type}),u.jsx(Gp,{className:"toggle-arrow-icon"})]}),u.jsx(W_,{children:i.entities.map(c=>u.jsx(j_,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):u.jsx(dl,{message:zw})},Z_=d.styled(d.Stack)`
2477
2477
  padding: 18px 0;
2478
2478
  row-gap: 12px;
2479
2479
  box-sizing: border-box;
2480
- `,z_=d.styled(d.Stack)`
2480
+ `,X_=d.styled(d.Stack)`
2481
2481
  cursor: pointer;
2482
2482
  position: relative;
2483
2483
  z-index: 1;
@@ -2488,7 +2488,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2488
2488
  background-color: rgba(0, 0, 0, 0.04);
2489
2489
  z-index: -1;
2490
2490
  }
2491
- `,Y_=({searchText:e,connectorName:t,formData:n,onClick:r})=>u.jsxs(z_,{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(X_,{children:n.map(s=>u.jsx(Y_,{searchText:e,connectorName:t,formData:s,onClick:()=>o(s)},t+(s==null?void 0:s.searchObject)))})},q_=d.styled(d.Stack)`
2491
+ `,z_=({searchText:e,connectorName:t,formData:n,onClick:r})=>u.jsxs(X_,{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]})]}),Y_=({searchText:e,connectorName:t,options:n,onSearch:r})=>{const o=s=>{r({formId:s.id,searchObject:s.searchObject,searchText:e})};return u.jsx(Z_,{children:n.map(s=>u.jsx(z_,{searchText:e,connectorName:t,formData:s,onClick:()=>o(s)},t+(s==null?void 0:s.searchObject)))})},J_=d.styled(d.Stack)`
2492
2492
  padding: 12px 12px 12px 11px;
2493
2493
  border: 1px solid ${d.theme.palette.gray.gray5};
2494
2494
  border-radius: 8px;
@@ -2502,26 +2502,26 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2502
2502
  transform: translateX(6px);
2503
2503
  }
2504
2504
  }
2505
- `,$_=d.styled(d.Stack)`
2505
+ `,q_=d.styled(d.Stack)`
2506
2506
  padding: 14px 0;
2507
2507
  row-gap: 12px;
2508
2508
  column-gap: 16px;
2509
2509
  box-sizing: border-box;
2510
- `,Q_=d.styled(d.Stack)`
2510
+ `,$_=d.styled(d.Stack)`
2511
2511
  padding: 8px 0;
2512
2512
  row-gap: 12px;
2513
2513
  box-sizing: border-box;
2514
- `,U_=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(q_,{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(Gp,{})]},n)},K_=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return u.jsx(dl,{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($_,{children:[u.jsxs(d.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),u.jsx(Q_,{children:t.map(l=>u.jsx(U_,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},eS=d.styled(d.Stack)`
2514
+ `,Q_=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(J_,{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(Gp,{})]},n)},U_=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=w.useContext(qt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return u.jsx(dl,{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(q_,{children:[u.jsxs(d.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),u.jsx($_,{children:t.map(l=>u.jsx(Q_,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},K_=d.styled(d.Stack)`
2515
2515
  height: 100%;
2516
2516
  row-gap: 8px;
2517
2517
  align-items: center;
2518
2518
  justify-content: center;
2519
- `,tS=d.styled(fl)`
2519
+ `,eS=d.styled(fl)`
2520
2520
  width: 32px;
2521
2521
  height: 32px;
2522
2522
  fill: #506dff;
2523
2523
  animation: ${Fa} 1s linear infinite;
2524
- `,nS=({message:e="Fetching details"})=>u.jsxs(eS,{children:[u.jsx(tS,{}),u.jsx(d.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),rS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await we({url:lt(__,{conversationId:e}),method:Re.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},oS=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},Da=({conversationId:e})=>{const t=wo(),{queryKey:n,polledLogsStatus:r}=w.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=Ep({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:rS,isSatisfied:oS,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return Ln({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},sS=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await we({url:lt(O_,{conversationId:t}),data:e,method:Re.POST});return n==null?void 0:n.data}catch(n){throw _e({message:yn,type:qe}),console.error(n),n}},aS=({onSuccess:e})=>en({mutationFn:sS,onSuccess:e}),iS=d.styled(d.Stack)`
2524
+ `,tS=({message:e="Fetching details"})=>u.jsxs(K_,{children:[u.jsx(eS,{}),u.jsx(d.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),nS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await we({url:lt(w_,{conversationId:e}),method:Re.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},rS=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},Da=({conversationId:e})=>{const t=wo(),{queryKey:n,polledLogsStatus:r}=w.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=Ep({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:nS,isSatisfied:rS,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return Ln({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},oS=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await we({url:lt(L_,{conversationId:t}),data:e,method:Re.POST});return n==null?void 0:n.data}catch(n){throw _e({message:yn,type:qe}),console.error(n),n}},sS=({onSuccess:e})=>en({mutationFn:oS,onSuccess:e}),aS=d.styled(d.Stack)`
2525
2525
  padding: 12px;
2526
2526
  flex-flow: row nowrap;
2527
2527
  justify-content: flex-end;
@@ -2538,7 +2538,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2538
2538
  padding: 7px 10px;
2539
2539
  }
2540
2540
  }
2541
- `,cS=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=w.useContext(qt),{refetch:a}=Da({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const b=Object.values(e),h=b.map(g=>g.displayValue).join(", "),p=Array.from(new Set(b.map(g=>g==null?void 0:g.entityType)));i==null||i(Ft.email_logging_log_config_saved,{app_name:n,num_of_keys_selected:b.length,list_of_keys:h,list_of_objects:p.join(", "),num_of_objects_selected:p.length})},{mutate:l,isPending:f}=aS({onSuccess:c}),m=Object.keys(e).length>0,y=()=>{const b=Object.values(e);l({conversationId:o,payload:{selectedEntities:b,connectorId:r,autoLogEnabled:!0}})},x=()=>{t==null||t(),i==null||i(Ft.email_logging_log_config_canceled,{app_name:n})};return u.jsxs(iS,{children:[u.jsx(d.Button,{variant:"text",size:"small",onClick:x,children:"Cancel"}),u.jsxs(d.Button,{variant:"contained",size:"small",className:"primary-action",disabled:f||!m,onClick:y,children:[f?u.jsx(d.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},lS="Tell us more (optional)",uS=d.styled(d.Box)`
2541
+ `,iS=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=w.useContext(qt),{refetch:a}=Da({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const m=Object.values(e),h=m.map(g=>g.displayValue).join(", "),p=Array.from(new Set(m.map(g=>g==null?void 0:g.entityType)));i==null||i(Ft.email_logging_log_config_saved,{app_name:n,num_of_keys_selected:m.length,list_of_keys:h,list_of_objects:p.join(", "),num_of_objects_selected:p.length})},{mutate:l,isPending:f}=sS({onSuccess:c}),b=Object.keys(e).length>0,y=()=>{const m=Object.values(e);l({conversationId:o,payload:{selectedEntities:m,connectorId:r,autoLogEnabled:!0}})},x=()=>{t==null||t(),i==null||i(Ft.email_logging_log_config_canceled,{app_name:n})};return u.jsxs(aS,{children:[u.jsx(d.Button,{variant:"text",size:"small",onClick:x,children:"Cancel"}),u.jsxs(d.Button,{variant:"contained",size:"small",className:"primary-action",disabled:f||!b,onClick:y,children:[f?u.jsx(d.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},cS="Tell us more (optional)",lS=d.styled(d.Box)`
2542
2542
  width: ${({width:e})=>e||"440px"};
2543
2543
  border-radius: 12px;
2544
2544
  padding: 16px;
@@ -2551,15 +2551,15 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2551
2551
  flex-direction: row;
2552
2552
  margin-bottom: 12px;
2553
2553
  }
2554
- `,dS=d.styled(d.Box)`
2554
+ `,uS=d.styled(d.Box)`
2555
2555
  border-bottom: 1px solid ${d.theme.palette.gray.gray6};
2556
2556
  margin: 12px -16px;
2557
- `,fS=d.styled(d.Box)`
2557
+ `,dS=d.styled(d.Box)`
2558
2558
  display: flex;
2559
2559
  justify-content: flex-end;
2560
2560
  margin-top: 30px;
2561
2561
  gap: 8px;
2562
- `,pS=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=lS})=>{const[c,l]=w.useState(""),[f,m]=w.useState(""),y=g=>{l(g.target.value)},x=g=>{g.stopPropagation();const{value:C}=(g==null?void 0:g.target)||{};m(C)},b=()=>{t({feedbackOption:c,feedbackComment:f})},h=()=>{e==null||e()},p=r?!c:!f;return u.jsxs(uS,{width:s,children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(dS,{}),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(g=>u.jsx(d.FormControlLabel,{value:g.value,control:u.jsx(d.Radio,{}),label:g.label},g.value))})}):null,u.jsx(dr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:x,multiline:!0,rows:5,limit:250,validation:{validate:mc()}}),u.jsxs(fS,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:h,children:"Cancel"}),u.jsx(Tp,{variant:"contained",color:"primary",isLoading:n,disabled:p,label:"Submit",onClick:b})]})]})},hS=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await we({url:F_.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return _e({message:n_,type:rn}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),_e({message:r_,type:qe}),n}};function gS({onSuccess:e}){return en({mutationFn:hS,onSuccess:e})}const mS=d.styled(d.Stack)`
2562
+ `,fS=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=cS})=>{const[c,l]=w.useState(""),[f,b]=w.useState(""),y=g=>{l(g.target.value)},x=g=>{g.stopPropagation();const{value:C}=(g==null?void 0:g.target)||{};b(C)},m=()=>{t({feedbackOption:c,feedbackComment:f})},h=()=>{e==null||e()},p=r?!c:!f;return u.jsxs(lS,{width:s,children:[u.jsx(d.Typography,{variant:"h3",children:o}),u.jsx(uS,{}),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(g=>u.jsx(d.FormControlLabel,{value:g.value,control:u.jsx(d.Radio,{}),label:g.label},g.value))})}):null,u.jsx(dr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:x,multiline:!0,rows:5,limit:250,validation:{validate:mc()}}),u.jsxs(dS,{children:[u.jsx(d.Button,{variant:"text",color:"primary",style:{color:d.theme.palette.gray.gray3},disabled:n,onClick:h,children:"Cancel"}),u.jsx(Tp,{variant:"contained",color:"primary",isLoading:n,disabled:p,label:"Submit",onClick:m})]})]})},pS=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await we({url:O_.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return _e({message:t_,type:rn}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),_e({message:n_,type:qe}),n}};function hS({onSuccess:e}){return en({mutationFn:pS,onSuccess:e})}const gS=d.styled(d.Stack)`
2563
2563
  flex-flow: row nowrap;
2564
2564
  justify-content: space-between;
2565
2565
  align-items: center;
@@ -2571,7 +2571,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2571
2571
  &:disabled {
2572
2572
  opacity: 0.4;
2573
2573
  }
2574
- `,bS=d.styled(d.Typography)`
2574
+ `,mS=d.styled(d.Typography)`
2575
2575
  color: #6f7c90;
2576
2576
  font-size: 11px;
2577
2577
  font-weight: 400;
@@ -2580,35 +2580,35 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2580
2580
  `,Zp=d.styled(d.Tooltip)`
2581
2581
  padding: 6px;
2582
2582
  border-radius: 6px;
2583
- `,yS=()=>{const{conversationId:e}=w.useContext(qt),[t,n]=w.useState(!1),r=()=>{n(!1)},{mutate:o,isPending:s}=gS({onSuccess:r}),a=()=>{o({conversationId:e,feedbackData:{feedback_type:jp,positive_feedback:!1}})},i=()=>{n(!0)},c=({feedbackComment:l,feedbackOption:f})=>{o({conversationId:e,feedbackData:{feedback_type:jp,comment:l,option:f,positive_feedback:!1}})};return u.jsxs(mS,{children:[u.jsx(bS,{children:t_}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"flex-end",children:[u.jsx(Zp,{arrow:!0,title:Kw,placement:"top",children:u.jsx(Wp,{className:"feedback-button",size:"small",onClick:a,disabled:s,children:u.jsx(Op,{})})}),u.jsx(Zp,{arrow:!0,title:e_,placement:"top",children:u.jsx(Wp,{className:"feedback-button",size:"small",onClick:i,disabled:s,children:u.jsx(Fp,{})})})]}),u.jsx(hr,{shown:t,setShown:n,borderRadius:12,sx:{zIndex:15002},children:u.jsx(pS,{onCancel:()=>n(!1),onSubmit:c,isLoading:s,title:Uw,feedbackOptions:o_,width:"440px"})})]})},CS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await we({url:lt(S_,{conversationId:e}),method:Re.GET}),n=t==null?void 0:t.data;return(n==null?void 0:n.results)??[]}catch(t){throw console.error(t),t}},xS=({conversationId:e,enabled:t=!0})=>Ln({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>CS({conversationId:e}),enabled:!!e&&t}),vS=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await we({url:lt(L_,{formId:e}),data:{search_string:n,args:{}},method:Re.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 _e({message:yn,type:qe}),console.error(r),r}},ES=({onSuccess:e})=>en({mutationFn:vS,onSuccess:e}),IS=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await we({url:lt(D_,{conversationId:t}),data:e,method:Re.PATCH});return n==null?void 0:n.data}catch(n){throw _e({message:yn,type:qe}),console.error(n),n}},wS=({onSuccess:e})=>en({mutationFn:IS,onSuccess:e}),_S=d.styled(d.Stack)`
2583
+ `,bS=()=>{const{conversationId:e}=w.useContext(qt),[t,n]=w.useState(!1),r=()=>{n(!1)},{mutate:o,isPending:s}=hS({onSuccess:r}),a=()=>{o({conversationId:e,feedbackData:{feedback_type:jp,positive_feedback:!1}})},i=()=>{n(!0)},c=({feedbackComment:l,feedbackOption:f})=>{o({conversationId:e,feedbackData:{feedback_type:jp,comment:l,option:f,positive_feedback:!1}})};return u.jsxs(gS,{children:[u.jsx(mS,{children:e_}),u.jsxs(d.Stack,{flexDirection:"row",alignItems:"flex-end",children:[u.jsx(Zp,{arrow:!0,title:Uw,placement:"top",children:u.jsx(Wp,{className:"feedback-button",size:"small",onClick:a,disabled:s,children:u.jsx(Op,{})})}),u.jsx(Zp,{arrow:!0,title:Kw,placement:"top",children:u.jsx(Wp,{className:"feedback-button",size:"small",onClick:i,disabled:s,children:u.jsx(Fp,{})})})]}),u.jsx(hr,{shown:t,setShown:n,borderRadius:12,sx:{zIndex:15002},children:u.jsx(fS,{onCancel:()=>n(!1),onSubmit:c,isLoading:s,title:Qw,feedbackOptions:r_,width:"440px"})})]})},yS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await we({url:lt(__,{conversationId:e}),method:Re.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})=>Ln({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>yS({conversationId:e}),enabled:!!e&&t}),xS=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await we({url:lt(T_,{formId:e}),data:{search_string:n,args:{}},method:Re.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 _e({message:yn,type:qe}),console.error(r),r}},vS=({onSuccess:e})=>en({mutationFn:xS,onSuccess:e}),ES=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await we({url:lt(F_,{conversationId:t}),data:e,method:Re.PATCH});return n==null?void 0:n.data}catch(n){throw _e({message:yn,type:qe}),console.error(n),n}},IS=({onSuccess:e})=>en({mutationFn:ES,onSuccess:e}),wS=d.styled(d.Stack)`
2584
2584
  color: #343c45;
2585
2585
  height: 100%;
2586
2586
  box-sizing: border-box;
2587
- `,SS=d.styled(d.Stack)`
2587
+ `,_S=d.styled(d.Stack)`
2588
2588
  flex-flow: row nowrap;
2589
2589
  justify-content: space-between;
2590
2590
  align-items: center;
2591
2591
  column-gap: 8px;
2592
2592
  padding: 12px 16px;
2593
2593
  background-color: #f6f8fc;
2594
- `,AS=d.styled(d.Stack)`
2594
+ `,SS=d.styled(d.Stack)`
2595
2595
  flex-flow: row nowrap;
2596
2596
  justify-content: flex-start;
2597
2597
  align-items: center;
2598
2598
  column-gap: 8px;
2599
- `,TS=d.styled(d.Stack)`
2599
+ `,AS=d.styled(d.Stack)`
2600
2600
  flex-flow: row nowrap;
2601
2601
  justify-content: flex-end;
2602
2602
  align-items: center;
2603
2603
  column-gap: 6px;
2604
- `,LS=d.styled(d.Stack)`
2604
+ `,TS=d.styled(d.Stack)`
2605
2605
  padding: 4px;
2606
2606
  background-color: #ffffff;
2607
2607
  border-radius: 50%;
2608
- `,OS=d.styled("img")`
2608
+ `,LS=d.styled("img")`
2609
2609
  width: 16px;
2610
2610
  height: 16px;
2611
- `,FS=d.styled(d.Stack)`
2611
+ `,OS=d.styled(d.Stack)`
2612
2612
  flex-grow: 1;
2613
2613
  `,Xp=d.styled(d.Stack)`
2614
2614
  flex-grow: 1;
@@ -2621,10 +2621,10 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2621
2621
  overflow-y: auto;
2622
2622
  scrollbar-width: thin;
2623
2623
  scrollbar-color: #97a3b7 transparent;
2624
- `,DS=d.styled(d.Stack)`
2624
+ `,FS=d.styled(d.Stack)`
2625
2625
  padding: 12px 16px 0;
2626
2626
  position: relative;
2627
- `,kS=d.styled(d.OutlinedInput)`
2627
+ `,DS=d.styled(d.OutlinedInput)`
2628
2628
  padding: 0;
2629
2629
  fieldset {
2630
2630
  border-radius: 4px;
@@ -2643,7 +2643,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2643
2643
  border-width: 1px !important;
2644
2644
  }
2645
2645
  }
2646
- `,NS=d.styled(d.Stack)`
2646
+ `,kS=d.styled(d.Stack)`
2647
2647
  padding: 8px 0 8px 12px;
2648
2648
  justify-content: center;
2649
2649
  align-items: center;
@@ -2652,12 +2652,12 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2652
2652
  height: 15px;
2653
2653
  fill: #4d596c;
2654
2654
  }
2655
- `,RS=e=>u.jsx(d.Switch,{disableRipple:!0,...e}),MS=d.styled(RS)(({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}})),PS=d.styled(fl)`
2655
+ `,NS=e=>u.jsx(d.Switch,{disableRipple:!0,...e}),RS=d.styled(NS)(({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}})),MS=d.styled(fl)`
2656
2656
  width: 14px;
2657
2657
  height: 14px;
2658
2658
  fill: #4d596c;
2659
2659
  animation: ${Fa} 1s linear infinite;
2660
- `,gr=Ur.CaseView,jS=({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,m]=w.useState(""),[y,x]=w.useState([]),[b,h]=w.useState({}),{conversationId:p,connectorFunctions:g}=w.useContext(qt),C=g==null?void 0:g.sendTrackingEvent,{data:v,isError:I,isLoading:E}=xS({conversationId:p,enabled:!l}),{refetch:_}=Da({conversationId:p}),A=()=>{C==null||C(Ft.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:k,isIdle:D,reset:N}=ES({onSuccess:A}),{mutate:P,isPending:B}=wS({onSuccess:_}),{results:Y=[],...$}=L??{},H=w.useMemo(()=>{const W={},M=[];for(const G of y){const z=G.entityType+G.displayValue;W[z]||M.push(G),W[z]=G}for(const G of v??[]){const z=G.entityType+G.displayValue;W[z]||M.push(G),W[z]=G}return M},[v,y]),X=W=>{m(W.target.value),D||N()},q=W=>{const{entityType:M,displayValue:G}=W;h(z=>({...z,[M+G]:W})),x(z=>[W,...z]),m(""),N()},se=()=>{C==null||C(Ft.email_logging_search_initiated,{app_name:a})},de=()=>{P({payload:{autoLogEnabled:!r},conversationId:p});const W=r?Ft.email_logging_auto_log_disabled:Ft.email_logging_auto_log_enabled;C==null||C(W,{app_name:a})},V=E||k;return u.jsxs(_S,{children:[u.jsxs(SS,{children:[u.jsxs(AS,{children:[u.jsx(LS,{children:u.jsx(OS,{src:c,alt:"connector"})}),u.jsx(d.Typography,{children:"Sync conversation"})]}),u.jsxs(TS,{children:[B?u.jsx(PS,{}):null,l?u.jsx(d.Tooltip,{arrow:!0,title:r?Vw:Gw,children:u.jsx(d.Stack,{children:u.jsx(MS,{checked:r,value:r,onClick:de,disabled:B})})}):null]})]}),u.jsx(FS,{children:u.jsxs(Ur,{children:[u.jsxs(gr,{condition:l,children:[u.jsx(Xp,{children:u.jsx(zp,{children:u.jsx(Hp,{connectorName:a,entities:o,disabled:!0})})}),u.jsx(yS,{})]},"disabled-view"),u.jsxs(gr,{fallback:!0,children:[u.jsx(DS,{children:u.jsx(kS,{type:"text",name:"search",value:f,onChange:X,onFocus:se,startAdornment:u.jsx(NS,{children:u.jsx(xp,{})}),size:"small"})}),u.jsx(Xp,{children:u.jsx(zp,{children:u.jsxs(Ur,{children:[u.jsx(gr,{condition:V,children:u.jsx(nS,{message:k?"Searching...":"Loading..."})},"loading"),u.jsx(gr,{condition:f===""&&H.length>0,children:u.jsx(Hp,{connectorName:a,checkedEntities:b,setCheckedEntities:h,entities:H??[]})},"entity-suggestions"),u.jsx(gr,{condition:!!f&&D,children:u.jsx(J_,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),u.jsx(gr,{condition:!!f&&!D,children:u.jsx(K_,{connectorName:a,results:Y,...$,addEntity:q})},"search-results"),u.jsx(gr,{condition:!H.length&&I,children:u.jsx(dl,{message:yn})},"error")]})})}),f?null:u.jsx(cS,{connectorName:a,connectorId:i,checkedEntities:b,close:t})]},"select-logs")]})})]})},BS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await we({url:lt(A_,{conversationId:e}),method:Re.POST});return t==null?void 0:t.data}catch(t){throw _e({message:yn,type:qe}),console.error(t),t}},VS=({onSuccess:e})=>en({mutationFn:BS,onSuccess:e}),GS=d.styled(d.Stack)`
2660
+ `,gr=Ur.CaseView,PS=({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,b]=w.useState(""),[y,x]=w.useState([]),[m,h]=w.useState({}),{conversationId:p,connectorFunctions:g}=w.useContext(qt),C=g==null?void 0:g.sendTrackingEvent,{data:v,isError:I,isLoading:E}=CS({conversationId:p,enabled:!l}),{refetch:_}=Da({conversationId:p}),A=()=>{C==null||C(Ft.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:k,isIdle:D,reset:N}=vS({onSuccess:A}),{mutate:P,isPending:B}=IS({onSuccess:_}),{results:Y=[],...$}=L??{},H=w.useMemo(()=>{const W={},M=[];for(const G of y){const z=G.entityType+G.displayValue;W[z]||M.push(G),W[z]=G}for(const G of v??[]){const z=G.entityType+G.displayValue;W[z]||M.push(G),W[z]=G}return M},[v,y]),X=W=>{b(W.target.value),D||N()},q=W=>{const{entityType:M,displayValue:G}=W;h(z=>({...z,[M+G]:W})),x(z=>[W,...z]),b(""),N()},se=()=>{C==null||C(Ft.email_logging_search_initiated,{app_name:a})},de=()=>{P({payload:{autoLogEnabled:!r},conversationId:p});const W=r?Ft.email_logging_auto_log_disabled:Ft.email_logging_auto_log_enabled;C==null||C(W,{app_name:a})},V=E||k;return u.jsxs(wS,{children:[u.jsxs(_S,{children:[u.jsxs(SS,{children:[u.jsx(TS,{children:u.jsx(LS,{src:c,alt:"connector"})}),u.jsx(d.Typography,{children:"Sync conversation"})]}),u.jsxs(AS,{children:[B?u.jsx(MS,{}):null,l?u.jsx(d.Tooltip,{arrow:!0,title:r?Bw:Vw,children:u.jsx(d.Stack,{children:u.jsx(RS,{checked:r,value:r,onClick:de,disabled:B})})}):null]})]}),u.jsx(OS,{children:u.jsxs(Ur,{children:[u.jsxs(gr,{condition:l,children:[u.jsx(Xp,{children:u.jsx(zp,{children:u.jsx(Hp,{connectorName:a,entities:o,disabled:!0})})}),u.jsx(bS,{})]},"disabled-view"),u.jsxs(gr,{fallback:!0,children:[u.jsx(FS,{children:u.jsx(DS,{type:"text",name:"search",value:f,onChange:X,onFocus:se,startAdornment:u.jsx(kS,{children:u.jsx(xp,{})}),size:"small"})}),u.jsx(Xp,{children:u.jsx(zp,{children:u.jsxs(Ur,{children:[u.jsx(gr,{condition:V,children:u.jsx(tS,{message:k?"Searching...":"Loading..."})},"loading"),u.jsx(gr,{condition:f===""&&H.length>0,children:u.jsx(Hp,{connectorName:a,checkedEntities:m,setCheckedEntities:h,entities:H??[]})},"entity-suggestions"),u.jsx(gr,{condition:!!f&&D,children:u.jsx(Y_,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),u.jsx(gr,{condition:!!f&&!D,children:u.jsx(U_,{connectorName:a,results:Y,...$,addEntity:q})},"search-results"),u.jsx(gr,{condition:!H.length&&I,children:u.jsx(dl,{message:yn})},"error")]})})}),f?null:u.jsx(iS,{connectorName:a,connectorId:i,checkedEntities:m,close:t})]},"select-logs")]})})]})},jS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await we({url:lt(S_,{conversationId:e}),method:Re.POST});return t==null?void 0:t.data}catch(t){throw _e({message:yn,type:qe}),console.error(t),t}},BS=({onSuccess:e})=>en({mutationFn:jS,onSuccess:e}),VS=d.styled(d.Stack)`
2661
2661
  border-radius: 100px;
2662
2662
  background: #f6f8fc;
2663
2663
  flex-flow: row nowrap;
@@ -2666,7 +2666,7 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2666
2666
  padding: 8px;
2667
2667
  width: fit-content;
2668
2668
  cursor: pointer;
2669
- `,HS=d.styled(d.Button)`
2669
+ `,GS=d.styled(d.Button)`
2670
2670
  padding: 0;
2671
2671
  background: none;
2672
2672
  border: none;
@@ -2675,4 +2675,4 @@ Do you want to continue?`,Sx="Select an object to create",Ax="Select an object t
2675
2675
  line-height: 14px;
2676
2676
  color: #506dff;
2677
2677
  margin-left: 6px;
2678
- `,WS=[xe.PENDING,xe.LOGGED,xe.NOT_LOGGED,xe.PAUSED],ZS=[xe.LOGGED,xe.PAUSED],XS=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=w.useContext(qt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=Da({conversationId:r}),{mutate:i,isPending:c}=VS({onSuccess:a}),l=kw[e],f=Mw[e],m=Rw[e],{emailLogSettings:y,messageLogStatus:x}=t,{connectorName:b}=y??{},{logged:h,total:p}=x??{},g=ZS.includes(e)&&p?` (${h}/${p})`:"",C=e===xe.ERROR,v=WS.includes(e),I=({close:_})=>u.jsx(jS,{close:_,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Ft.email_logging_failed_clicked,{app_name:b})};return u.jsx(I_,{logSettings:y,status:e,isAdmin:n,retry:C,renderEntities:v?I:void 0,children:u.jsxs(GS,{style:{cursor:v?"pointer":"not-allowed"},children:[l,m?m(`${f} ${g}`):null,C?u.jsx(HS,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},pl=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=Sw(e);return Ne.createPortal(u.jsx(XS,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},zS=({observer:e})=>{var x;const[t,n]=w.useState({}),[r,o]=w.useState({}),[s,a]=w.useState({}),{conversationId:i}=w.useContext(qt),{data:c}=Da({conversationId:i}),l=(x=c==null?void 0:c.emailLogSettings)==null?void 0:x.enabled,f=b=>{n(h=>({...h,...b}))},m=b=>{o(h=>({...h,...b}))},y=b=>{a(b)};return w.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:m,setSubjectButtonContainers:y}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?u.jsxs(u.Fragment,{children:[Object.entries(t).map(([b,h])=>u.jsx(pl,{emailLogStatus:c,containerElement:h.element,messageId:h.messageId,legacyMessageId:h.legacyMessageId},b)),Object.entries(r).map(([b,h])=>u.jsx(pl,{emailLogStatus:c,containerElement:h.element},b)),Object.entries(s).map(([b,h])=>u.jsx(pl,{emailLogStatus:c,containerElement:h.element},b))]}):null},YS=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=w.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return u.jsx(qt.Provider,{value:o,children:r})},JS=({children:e,...t})=>u.jsx(Ki,{store:rl,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(nl,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:u.jsx(YS,{...t,children:e})})})})}),ka=".hiver-log-crm-button",Na=".hiver-log-crm-compose-button",Yp=".hiver-log-crm-subject-button";class qS{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}={}){ke(this,"observer",null);ke(this,"setComposeButtonContainers",null);ke(this,"setEmailButtonContainers",null);ke(this,"setSubjectButtonContainers",null);ke(this,"emailNodeFilter");ke(this,"composeNodeFilter");ke(this,"emailHeaderTargetSelector");ke(this,"composeHeaderTargetSelector");ke(this,"emailMessageContainerSelector");ke(this,"disableAutoLogInEmail");ke(this,"disableAutoLogInCompose");ke(this,"disableAutoLogInSubject");ke(this,"subjectContainer",null);ke(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(ka).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(ka))return;const i=document.createElement("div");i.classList.add(ka.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}})})});ke(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Na).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Na))return;const s=document.createElement("div");s.classList.add(Na.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});ke(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(Yp);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(Yp.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(ka).forEach(r=>r.remove()),document.querySelectorAll(Na).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const $S=({observer:e,...t})=>u.jsx(ol,{children:u.jsxs(JS,{...t,children:[u.jsx(zS,{observer:e}),Ne.createPortal(u.jsx(sl,{id:"toast-message",children:u.jsx(Ya,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),QS=e=>we({url:Q8,method:Re.POST,data:e}),Qo=(...e)=>{console.log("CONNECTOR_STORE_DEBUG",...e)},Jp=async(e,t=0)=>{try{return Qo("getConnectorsList",t),await B0(e)}catch(n){return t>2?(console.error("Failed to get connectors list after 3 tries",n),[]):Jp(e,t+1)}},US=e=>{const{connectorTabSelector:t,sideBarDropdownSize:n}=e,r={connectorApiPending:!1};if(!kt())throw new Error("Please initiate bifrost by calling initConnectorsBifrost function before creating app store");const s=zy({name:"app-store",initialState:{}}),a=()=>{const f=s.getData("inboxIds");if(r.connectorApiPending||!Array.isArray(f))return;r.connectorApiPending=!0,Jp({channel_type:"email",inbox_id:f}).then(y=>{r.connectorApiPending=!1,Qo("setConnectors",y),!(!Array.isArray(y)||!y.length)&&s.setData(y,"connectors")})},i=f=>{(!Array.isArray(f)||!f.length)&&(f=s.getData("connectors")||[]);const m=s.getData("sideBarTabs")||0,y=[...f].sort((x,b)=>{const h=x.lastAccessed??0,p=b.lastAccessed??0;return h===p?0:h>p?-1:1}).map((x,b)=>({...x,sidebarView:b<m}));s.setData(y,"connectorTabs")},c=()=>{const f=s.getData("connectors"),m=s.getData("tabElement");if(Qo("calculateTabPositions",f,m),!Array.isArray(f)||!f.length)return a();if(!m)return;const y=m.querySelector(`:scope > ${t}`);if(!y){let A=null;A=new MutationObserver(()=>{A==null||A.disconnect(),c()}),A.observe(m,{childList:!0,subtree:!0});return}const x=y.previousElementSibling;if(!x)return;const b=y.getBoundingClientRect().left,h=x.getBoundingClientRect().right,p=m.getBoundingClientRect().right,g=b-h,C=g+y.clientWidth,v=p-h,I=Math.floor(v/C),E=Math.floor((v-n)/C),_=f.length>I?E:I;s.setData(_,"sideBarTabs"),Qo("calculations",{connectorTabLeft:b,nonConnectorRight:h,tabElementRight:p,gap:g,tabSpace:C,spaceAvailable:v,tabsAvailable:I,tabsAvailableWithDropdown:E})},l=f=>{if(!f)return;const m=s.getData("connectorTabs"),y=m==null?void 0:m.find(b=>b.id===f);if(!y||y.sidebarView)return;const x=new Date().getTime();y.lastAccessed=x,i(m)};return s.subscribe(c,"connectors"),s.subscribe(c,"tabElement",!1),s.subscribe(()=>i(),"sideBarTabs",!1),s.subscribe(l,"connectorId",!1),s.subscribe(a,"inboxIds",!1),Qo("appStore created",s),s};ie.ActionQueue=ww,ie.CONNECTORS_AGENT_EVENTS=tl,ie.ConnectorCardList=NI,ie.EmailLogger=$S,ie.GmailLogObserver=qS,ie.HiverConnectorBifrostAuth=we,ie.IntegrationSense=Ew,ie.addNewConnectors=yh,ie.createAppStore=US,ie.dismissNotification=fu,ie.fetchAppCfValues=QS,ie.getConnectorsBifrostConfigs=kt,ie.getMetaData=By,ie.initConnectorsBifrost=Zm,ie.setCaptureFeedbackOnDemand=Ch,ie.shouldCaptureFeedback=hi,ie.shouldShowNotification=du,ie.useConnectorSelectedEmail=pI,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
2678
+ `,HS=[xe.PENDING,xe.LOGGED,xe.NOT_LOGGED,xe.PAUSED],WS=[xe.LOGGED,xe.PAUSED],ZS=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=w.useContext(qt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=Da({conversationId:r}),{mutate:i,isPending:c}=BS({onSuccess:a}),l=Dw[e],f=Rw[e],b=Nw[e],{emailLogSettings:y,messageLogStatus:x}=t,{connectorName:m}=y??{},{logged:h,total:p}=x??{},g=WS.includes(e)&&p?` (${h}/${p})`:"",C=e===xe.ERROR,v=HS.includes(e),I=({close:_})=>u.jsx(PS,{close:_,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Ft.email_logging_failed_clicked,{app_name:m})};return u.jsx(E_,{logSettings:y,status:e,isAdmin:n,retry:C,renderEntities:v?I:void 0,children:u.jsxs(VS,{style:{cursor:v?"pointer":"not-allowed"},children:[l,b?b(`${f} ${g}`):null,C?u.jsx(GS,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},pl=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=_w(e);return Ne.createPortal(u.jsx(ZS,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},XS=({observer:e})=>{var x;const[t,n]=w.useState({}),[r,o]=w.useState({}),[s,a]=w.useState({}),{conversationId:i}=w.useContext(qt),{data:c}=Da({conversationId:i}),l=(x=c==null?void 0:c.emailLogSettings)==null?void 0:x.enabled,f=m=>{n(h=>({...h,...m}))},b=m=>{o(h=>({...h,...m}))},y=m=>{a(m)};return w.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:b,setSubjectButtonContainers:y}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?u.jsxs(u.Fragment,{children:[Object.entries(t).map(([m,h])=>u.jsx(pl,{emailLogStatus:c,containerElement:h.element,messageId:h.messageId,legacyMessageId:h.legacyMessageId},m)),Object.entries(r).map(([m,h])=>u.jsx(pl,{emailLogStatus:c,containerElement:h.element},m)),Object.entries(s).map(([m,h])=>u.jsx(pl,{emailLogStatus:c,containerElement:h.element},m))]}):null},zS=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=w.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return u.jsx(qt.Provider,{value:o,children:r})},YS=({children:e,...t})=>u.jsx(Ki,{store:rl,children:u.jsx(d.HiverProvider,{custom:!0,children:u.jsx(nl,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:u.jsx(zS,{...t,children:e})})})})}),ka=".hiver-log-crm-button",Na=".hiver-log-crm-compose-button",Yp=".hiver-log-crm-subject-button";class JS{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}={}){ke(this,"observer",null);ke(this,"setComposeButtonContainers",null);ke(this,"setEmailButtonContainers",null);ke(this,"setSubjectButtonContainers",null);ke(this,"emailNodeFilter");ke(this,"composeNodeFilter");ke(this,"emailHeaderTargetSelector");ke(this,"composeHeaderTargetSelector");ke(this,"emailMessageContainerSelector");ke(this,"disableAutoLogInEmail");ke(this,"disableAutoLogInCompose");ke(this,"disableAutoLogInSubject");ke(this,"subjectContainer",null);ke(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(ka).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(ka))return;const i=document.createElement("div");i.classList.add(ka.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}})})});ke(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Na).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Na))return;const s=document.createElement("div");s.classList.add(Na.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});ke(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(Yp);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(Yp.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(ka).forEach(r=>r.remove()),document.querySelectorAll(Na).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const qS=({observer:e,...t})=>u.jsx(ol,{children:u.jsxs(YS,{...t,children:[u.jsx(XS,{observer:e}),Ne.createPortal(u.jsx(sl,{id:"toast-message",children:u.jsx(Ya,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),$S=e=>we({url:$8,method:Re.POST,data:e}),Qo=(...e)=>{console.log("CONNECTOR_STORE_DEBUG",...e)},QS=e=>{const t=new AbortController,n=async(r=0)=>{try{Qo("getConnectorsList",r);const o=await B0(e);if(t.signal.aborted)throw new Error("Fetch aborted");return o}catch(o){if(t.signal.aborted)throw new Error("Fetch aborted");return r>2?(console.error("Failed to get connectors list after 3 tries",o),[]):n(r+1)}};return{fetchConnectors:n,abort:t.abort.bind(t)}},US=e=>{const{connectorTabSelector:t,sideBarDropdownSize:n}=e,r={connectorApiPending:!1,connectorApiAbort:null};if(!kt())throw new Error("Please initiate bifrost by calling initConnectorsBifrost function before creating app store");const s=Xy({name:"app-store",initialState:{}}),a=()=>{const f=s.getData("inboxIds");if(!Array.isArray(f))return;r.connectorApiAbort&&r.connectorApiAbort(),r.connectorApiPending=!0;const b={channel_type:"email",inbox_id:f},{fetchConnectors:y,abort:x}=QS(b);r.connectorApiAbort=x,y().then(m=>{r.connectorApiPending=!1,Qo("setConnectors",m),!(!Array.isArray(m)||!m.length)&&s.setData(m,"connectors")}).catch(m=>{console.warn("Failed to fetch connectors",m)})},i=f=>{(!Array.isArray(f)||!f.length)&&(f=s.getData("connectors")||[]);const b=s.getData("sideBarTabs")||0,y=[...f].sort((x,m)=>{const h=x.lastAccessed??0,p=m.lastAccessed??0;return h===p?0:h>p?-1:1}).map((x,m)=>({...x,sidebarView:m<b}));s.setData(y,"connectorTabs")},c=()=>{const f=s.getData("connectors"),b=s.getData("tabElement");if(Qo("calculateTabPositions",f,b),!Array.isArray(f)||!f.length)return a();if(!b){typeof s.getData("sideBarTabs")=="number"&&i();return}const y=b.querySelector(`:scope > ${t}`);if(!y){let A=null;A=new MutationObserver(()=>{A==null||A.disconnect(),c()}),A.observe(b,{childList:!0,subtree:!0});return}const x=y.previousElementSibling;if(!x)return;const m=y.getBoundingClientRect().left,h=x.getBoundingClientRect().right,p=b.getBoundingClientRect().right,g=m-h,C=g+y.clientWidth,v=p-h,I=Math.floor(v/C),E=Math.floor((v-n)/C),_=f.length>I?E:I;s.setData(_,"sideBarTabs"),Qo("calculations",{connectorTabLeft:m,nonConnectorRight:h,tabElementRight:p,gap:g,tabSpace:C,spaceAvailable:v,tabsAvailable:I,tabsAvailableWithDropdown:E})},l=f=>{if(!f)return;const b=s.getData("connectorTabs"),y=b==null?void 0:b.find(m=>m.id===f);if(!y||y.sidebarView)return;const x=new Date().getTime();y.lastAccessed=x,i(b)};return s.subscribe(c,"connectors"),s.subscribe(c,"tabElement",!1),s.subscribe(()=>i(),"sideBarTabs",!1),s.subscribe(l,"connectorId",!1),s.subscribe(a,"inboxIds",!1),Qo("appStore created",s),s};ie.ActionQueue=Iw,ie.CONNECTORS_AGENT_EVENTS=tl,ie.ConnectorCardList=kI,ie.EmailLogger=qS,ie.GmailLogObserver=JS,ie.HiverConnectorBifrostAuth=we,ie.IntegrationSense=vw,ie.addNewConnectors=bh,ie.createAppStore=US,ie.dismissNotification=fu,ie.fetchAppCfValues=$S,ie.getConnectorsBifrostConfigs=kt,ie.getMetaData=jy,ie.initConnectorsBifrost=Wm,ie.setCaptureFeedbackOnDemand=yh,ie.shouldCaptureFeedback=hi,ie.shouldShowNotification=du,ie.useConnectorSelectedEmail=fI,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});