@hiver/connector-agent 4.15.0 → 4.15.1-checkboxFix-beta.2
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/features/write-form/components/write-form/index.d.ts.map +1 -1
- package/features/write-form/utils/response.d.ts.map +1 -1
- package/index.es.js +3202 -3167
- package/index.umd.js +182 -182
- package/package.json +1 -1
- package/testing/mocks/handlers/fetch-cards.d.ts.map +1 -1
- package/testing/mocks/handlers/write-capability.d.ts.map +1 -1
- package/types/form.d.ts +3 -3
- package/types/form.d.ts.map +1 -1
- package/utils/form.d.ts.map +1 -1
package/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ce,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("@hiver/hiver-ui-kit"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@hiver/hiver-ui-kit","react-dom"],w):(ce=typeof globalThis<"u"?globalThis:ce||self,w(ce["@hiver/connector-agent"]={},ce.React,ce.hiverUiKit,ce.ReactDOM))})(this,function(ce,w,l,$t){"use strict";var Yk=Object.defineProperty;var
|
|
1
|
+
(function(ce,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react"),require("@hiver/hiver-ui-kit"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@hiver/hiver-ui-kit","react-dom"],w):(ce=typeof globalThis<"u"?globalThis:ce||self,w(ce["@hiver/connector-agent"]={},ce.React,ce.hiverUiKit,ce.ReactDOM))})(this,function(ce,w,l,$t){"use strict";var Yk=Object.defineProperty;var tg=ce=>{throw TypeError(ce)};var Jk=(ce,w,l)=>w in ce?Yk(ce,w,{enumerable:!0,configurable:!0,writable:!0,value:l}):ce[w]=l;var je=(ce,w,l)=>Jk(ce,typeof w!="symbol"?w+"":w,l),nu=(ce,w,l)=>w.has(ce)||tg("Cannot "+l);var O=(ce,w,l)=>(nu(ce,w,"read from private field"),l?l.call(ce):w.get(ce)),se=(ce,w,l)=>w.has(ce)?tg("Cannot add the same private member more than once"):w instanceof WeakSet?w.add(ce):w.set(ce,l),$=(ce,w,l,$t)=>(nu(ce,w,"write to private field"),$t?$t.call(ce,l):w.set(ce,l),l),he=(ce,w,l)=>(nu(ce,w,"access private method"),l);var wi=(ce,w,l,$t)=>({set _(_i){$(ce,w,_i,l)},get _(){return O(ce,w,$t)}});var Lr,qn,xo,Mh,Co,Qn,Eo,jh,Or,Ph,vo,wo,Yt,kr,ft,Ss,Fr,cn,Pn,Bh,yn,Vh,xn,mt,Dr,Cn,lr,Gh,kn,ln,As,Hh,Qe,$n,Un,Io,_o,Kn,So,Ao,Wh,St,Ae,Ts,bt,Nr,To,er,En,Ls,Lo,Oo,Rr,Mr,tr,ko,Me,Ns,ru,ou,su,au,iu,cu,lu,ng,Zh,jr,Jt,Fo,Do,qt,nr,Os,ks,Fs,ct,uu,du,fu,pu,hu,zh,rr,or,At,Fn,Dn,Ii,gu,Xh,Yh,Jh,qh,Qh,$h,Uh;function _i(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=_i(w);var ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Si={exports:{}},Go={};/**
|
|
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 mu;function
|
|
9
|
+
*/var mu;function rg(){if(mu)return Go;mu=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,d){var f,g={},y=null,C=null;d!==void 0&&(y=""+d),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(C=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(g[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)g[f]===void 0&&(g[f]=c[f]);return{$$typeof:t,type:i,key:y,ref:C,props:g,_owner:o.current}}return Go.Fragment=n,Go.jsx=a,Go.jsxs=a,Go}var Ho={};/**
|
|
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 bu;function
|
|
18
|
-
`+ne+k}}var j=!1,oe;{var
|
|
19
|
-
`),
|
|
20
|
-
`),
|
|
21
|
-
`+
|
|
17
|
+
*/var bu;function og(){return bu||(bu=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"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),b=Symbol.iterator,h="@@iterator";function p(k){if(k===null||typeof k!="object")return null;var Z=b&&k[b]||k[h];return typeof Z=="function"?Z:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(k){{for(var Z=arguments.length,U=new Array(Z>1?Z-1:0),ue=1;ue<Z;ue++)U[ue-1]=arguments[ue];E("error",k,U)}}function E(k,Z,U){{var ue=m.ReactDebugCurrentFrame,Se=ue.getStackAddendum();Se!==""&&(Z+="%s",U=U.concat([Se]));var we=U.map(function(xe){return String(xe)});we.unshift("Warning: "+Z),Function.prototype.apply.call(console[k],console,we)}}var I=!1,v=!1,_=!1,A=!1,S=!1,L;L=Symbol.for("react.module.reference");function N(k){return!!(typeof k=="string"||typeof k=="function"||k===r||k===s||S||k===o||k===d||k===f||A||k===C||I||v||_||typeof k=="object"&&k!==null&&(k.$$typeof===y||k.$$typeof===g||k.$$typeof===a||k.$$typeof===i||k.$$typeof===c||k.$$typeof===L||k.getModuleId!==void 0))}function D(k,Z,U){var ue=k.displayName;if(ue)return ue;var Se=Z.displayName||Z.name||"";return Se!==""?U+"("+Se+")":U}function F(k){return k.displayName||"Context"}function M(k){if(k==null)return null;if(typeof k.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof k=="function")return k.displayName||k.name||null;if(typeof k=="string")return k;switch(k){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case f:return"SuspenseList"}if(typeof k=="object")switch(k.$$typeof){case i:var Z=k;return F(Z)+".Consumer";case a:var U=k;return F(U._context)+".Provider";case c:return D(k,k.render,"ForwardRef");case g:var ue=k.displayName||null;return ue!==null?ue:M(k.type)||"Memo";case y:{var Se=k,we=Se._payload,xe=Se._init;try{return M(xe(we))}catch{return null}}}return null}var B=Object.assign,V=0,Y,W,H,q,Q,ee,G;function J(){}J.__reactDisabledLog=!0;function R(){{if(V===0){Y=console.log,W=console.info,H=console.warn,q=console.error,Q=console.group,ee=console.groupCollapsed,G=console.groupEnd;var k={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:k,log:k,warn:k,error:k,group:k,groupCollapsed:k,groupEnd:k})}V++}}function X(){{if(V--,V===0){var k={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},k,{value:Y}),info:B({},k,{value:W}),warn:B({},k,{value:H}),error:B({},k,{value:q}),group:B({},k,{value:Q}),groupCollapsed:B({},k,{value:ee}),groupEnd:B({},k,{value:G})})}V<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var K=m.ReactCurrentDispatcher,ne;function le(k,Z,U){{if(ne===void 0)try{throw Error()}catch(Se){var ue=Se.stack.trim().match(/\n( *(at )?)/);ne=ue&&ue[1]||""}return`
|
|
18
|
+
`+ne+k}}var j=!1,oe;{var _e=typeof WeakMap=="function"?WeakMap:Map;oe=new _e}function z(k,Z){if(!k||j)return"";{var U=oe.get(k);if(U!==void 0)return U}var ue;j=!0;var Se=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var we;we=K.current,K.current=null,R();try{if(Z){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(ut){ue=ut}Reflect.construct(k,[],xe)}else{try{xe.call()}catch(ut){ue=ut}k.call(xe.prototype)}}else{try{throw Error()}catch(ut){ue=ut}k()}}catch(ut){if(ut&&ue&&typeof ut.stack=="string"){for(var me=ut.stack.split(`
|
|
19
|
+
`),lt=ue.stack.split(`
|
|
20
|
+
`),Xe=me.length-1,$e=lt.length-1;Xe>=1&&$e>=0&&me[Xe]!==lt[$e];)$e--;for(;Xe>=1&&$e>=0;Xe--,$e--)if(me[Xe]!==lt[$e]){if(Xe!==1||$e!==1)do if(Xe--,$e--,$e<0||me[Xe]!==lt[$e]){var pt=`
|
|
21
|
+
`+me[Xe].replace(" at new "," at ");return k.displayName&&pt.includes("<anonymous>")&&(pt=pt.replace("<anonymous>",k.displayName)),typeof k=="function"&&oe.set(k,pt),pt}while(Xe>=1&&$e>=0);break}}}finally{j=!1,K.current=we,X(),Error.prepareStackTrace=Se}var In=k?k.displayName||k.name:"",Mn=In?le(In):"";return typeof k=="function"&&oe.set(k,Mn),Mn}function Pe(k,Z,U){return z(k,!1)}function We(k){var Z=k.prototype;return!!(Z&&Z.isReactComponent)}function Ee(k,Z,U){if(k==null)return"";if(typeof k=="function")return z(k,We(k));if(typeof k=="string")return le(k);switch(k){case d:return le("Suspense");case f:return le("SuspenseList")}if(typeof k=="object")switch(k.$$typeof){case c:return Pe(k.render);case g:return Ee(k.type,Z,U);case y:{var ue=k,Se=ue._payload,we=ue._init;try{return Ee(we(Se),Z,U)}catch{}}}return""}var Gt=Object.prototype.hasOwnProperty,sr={},nt=m.ReactDebugCurrentFrame;function tt(k){if(k){var Z=k._owner,U=Ee(k.type,k._source,Z?Z.type:null);nt.setExtraStackFrame(U)}else nt.setExtraStackFrame(null)}function Ze(k,Z,U,ue,Se){{var we=Function.call.bind(Gt);for(var xe in k)if(we(k,xe)){var me=void 0;try{if(typeof k[xe]!="function"){var lt=Error((ue||"React class")+": "+U+" type `"+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof k[xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw lt.name="Invariant Violation",lt}me=k[xe](Z,xe,ue,U,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Xe){me=Xe}me&&!(me instanceof Error)&&(tt(Se),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ue||"React class",U,xe,typeof me),tt(null)),me instanceof Error&&!(me.message in sr)&&(sr[me.message]=!0,tt(Se),x("Failed %s type: %s",U,me.message),tt(null))}}}var Pr=Array.isArray;function Qt(k){return Pr(k)}function Br(k){{var Z=typeof Symbol=="function"&&Symbol.toStringTag,U=Z&&k[Symbol.toStringTag]||k.constructor.name||"Object";return U}}function Nn(k){try{return Vr(k),!1}catch{return!0}}function Vr(k){return""+k}function Rn(k){if(Nn(k))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Br(k)),Vr(k)}var Tt=m.ReactCurrentOwner,yt={key:!0,ref:!0,__self:!0,__source:!0},Gr,ar,Ht;Ht={};function No(k){if(Gt.call(k,"ref")){var Z=Object.getOwnPropertyDescriptor(k,"ref").get;if(Z&&Z.isReactWarning)return!1}return k.ref!==void 0}function Ro(k){if(Gt.call(k,"key")){var Z=Object.getOwnPropertyDescriptor(k,"key").get;if(Z&&Z.isReactWarning)return!1}return k.key!==void 0}function Hr(k,Z){if(typeof k.ref=="string"&&Tt.current&&Z&&Tt.current.stateNode!==Z){var U=M(Tt.current.type);Ht[U]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(Tt.current.type),k.ref),Ht[U]=!0)}}function Lt(k,Z){{var U=function(){Gr||(Gr=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Z))};U.isReactWarning=!0,Object.defineProperty(k,"key",{get:U,configurable:!0})}}function ir(k,Z){{var U=function(){ar||(ar=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Z))};U.isReactWarning=!0,Object.defineProperty(k,"ref",{get:U,configurable:!0})}}var cr=function(k,Z,U,ue,Se,we,xe){var me={$$typeof:t,type:k,key:Z,ref:U,props:xe,_owner:we};return me._store={},Object.defineProperty(me._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(me,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ue}),Object.defineProperty(me,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Se}),Object.freeze&&(Object.freeze(me.props),Object.freeze(me)),me};function Wr(k,Z,U,ue,Se){{var we,xe={},me=null,lt=null;U!==void 0&&(Rn(U),me=""+U),Ro(Z)&&(Rn(Z.key),me=""+Z.key),No(Z)&&(lt=Z.ref,Hr(Z,Se));for(we in Z)Gt.call(Z,we)&&!yt.hasOwnProperty(we)&&(xe[we]=Z[we]);if(k&&k.defaultProps){var Xe=k.defaultProps;for(we in Xe)xe[we]===void 0&&(xe[we]=Xe[we])}if(me||lt){var $e=typeof k=="function"?k.displayName||k.name||"Unknown":k;me&&Lt(xe,$e),lt&&ir(xe,$e)}return cr(k,me,lt,Se,ue,Tt.current,xe)}}var Wt=m.ReactCurrentOwner,Zr=m.ReactDebugCurrentFrame;function vn(k){if(k){var Z=k._owner,U=Ee(k.type,k._source,Z?Z.type:null);Zr.setExtraStackFrame(U)}else Zr.setExtraStackFrame(null)}var wn;wn=!1;function zr(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function Xr(){{if(Wt.current){var k=M(Wt.current.type);if(k)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+k+"`."}return""}}function Mo(k){return""}var Yr={};function jo(k){{var Z=Xr();if(!Z){var U=typeof k=="string"?k:k.displayName||k.name;U&&(Z=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+U+">.")}return Z}}function Po(k,Z){{if(!k._store||k._store.validated||k.key!=null)return;k._store.validated=!0;var U=jo(Z);if(Yr[U])return;Yr[U]=!0;var
|
|
25
|
+
Check the top-level render call using <`+U+">.")}return Z}}function Po(k,Z){{if(!k._store||k._store.validated||k.key!=null)return;k._store.validated=!0;var U=jo(Z);if(Yr[U])return;Yr[U]=!0;var ue="";k&&k._owner&&k._owner!==Wt.current&&(ue=" It was passed a child from "+M(k._owner.type)+"."),vn(k),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',U,ue),vn(null)}}function Bo(k,Z){{if(typeof k!="object")return;if(Qt(k))for(var U=0;U<k.length;U++){var ue=k[U];zr(ue)&&Po(ue,Z)}else if(zr(k))k._store&&(k._store.validated=!0);else if(k){var Se=p(k);if(typeof Se=="function"&&Se!==k.entries)for(var we=Se.call(k),xe;!(xe=we.next()).done;)zr(xe.value)&&Po(xe.value,Z)}}}function Vo(k){{var Z=k.type;if(Z==null||typeof Z=="string")return;var U;if(typeof Z=="function")U=Z.propTypes;else if(typeof Z=="object"&&(Z.$$typeof===c||Z.$$typeof===g))U=Z.propTypes;else return;if(U){var ue=M(Z);Ze(U,k.props,"prop",ue,k)}else if(Z.PropTypes!==void 0&&!wn){wn=!0;var Se=M(Z);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Se||"Unknown")}typeof Z.getDefaultProps=="function"&&!Z.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Jr(k){{for(var Z=Object.keys(k.props),U=0;U<Z.length;U++){var ue=Z[U];if(ue!=="children"&&ue!=="key"){vn(k),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ue),vn(null);break}}k.ref!==null&&(vn(k),x("Invalid attribute `ref` supplied to `React.Fragment`."),vn(null))}}var qr={};function ae(k,Z,U,ue,Se,we){{var xe=N(k);if(!xe){var me="";(k===void 0||typeof k=="object"&&k!==null&&Object.keys(k).length===0)&&(me+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var lt=Mo();lt?me+=lt:me+=Xr();var Xe;k===null?Xe="null":Qt(k)?Xe="array":k!==void 0&&k.$$typeof===t?(Xe="<"+(M(k.type)||"Unknown")+" />",me=" Did you accidentally export a JSX literal instead of a component?"):Xe=typeof k,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Xe,me)}var $e=Wr(k,Z,U,Se,we);if($e==null)return $e;if(xe){var pt=Z.children;if(pt!==void 0)if(ue)if(Qt(pt)){for(var In=0;In<pt.length;In++)Bo(pt[In],k);Object.freeze&&Object.freeze(pt)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Bo(pt,k)}if(Gt.call(Z,"key")){var Mn=M(k),ut=Object.keys(Z).filter(function(vi){return vi!=="key"}),Ds=ut.length>0?"{key: someKey, "+ut.join(": ..., ")+": ...}":"{key: someKey}";if(!qr[Mn+Ds]){var tu=ut.length>0?"{"+ut.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Fs,Pn,tu,Pn),ie[Pn+Fs]=!0}}return k===r?qr($e):Bo($e),$e}}function Qe(k,Z,U){return Ce(k,Z,U,!0)}function Qt(k,Z,U){return Ce(k,Z,U,!1)}var at=Qt,We=Qe;Go.Fragment=r,Go.jsx=at,Go.jsxs=We}()),Go}process.env.NODE_ENV==="production"?Si.exports=ng():Si.exports=rg();var u=Si.exports,pr=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(){}},hr=typeof window>"u"||"Deno"in globalThis;function Ht(){}function og(e,t){return typeof e=="function"?e(t):e}function Ai(e){return typeof e=="number"&&e>=0&&e!==1/0}function yu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qr(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){return typeof e=="function"?e(t):e}function xu(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ti(a,t.options))return!1}else if(!Ho(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 Cu(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(gr(t.options.mutationKey)!==gr(s))return!1}else if(!Ho(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ti(e,t){return((t==null?void 0:t.queryKeyHashFn)||gr)(e)}function gr(e){return JSON.stringify(e,(t,n)=>Li(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Ho(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ho(e[n],t[n])):!1}function Rs(e,t){if(e===t)return e;const n=Eu(e)&&Eu(t);if(n||Li(e)&&Li(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 d=0;d<a;d++){const f=n?d:s[d];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=Rs(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function Ms(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 Eu(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Li(e){if(!vu(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!vu(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vu(e){return Object.prototype.toString.call(e)==="[object Object]"}function sg(e){return new Promise(t=>{setTimeout(t,e)})}function Oi(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 Rs(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 Rs(e,t)}return t}function ag(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ig(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var js=Symbol();function wu(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===js&&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===js?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var cg=(Rh=class extends pr{constructor(){super();se(this,Fr);se(this,$n);se(this,xo);$(this,xo,t=>{if(!hr&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,$n)||this.setEventListener(O(this,xo))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,$n))==null||t.call(this),$(this,$n,void 0))}setEventListener(t){var n;$(this,xo,t),(n=O(this,$n))==null||n.call(this),$(this,$n,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){O(this,Fr)!==t&&($(this,Fr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof O(this,Fr)=="boolean"?O(this,Fr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Fr=new WeakMap,$n=new WeakMap,xo=new WeakMap,Rh),ki=new cg,lg=(Mh=class extends pr{constructor(){super();se(this,Co,!0);se(this,Un);se(this,Eo);$(this,Eo,t=>{if(!hr&&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(){O(this,Un)||this.setEventListener(O(this,Eo))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Un))==null||t.call(this),$(this,Un,void 0))}setEventListener(t){var n;$(this,Eo,t),(n=O(this,Un))==null||n.call(this),$(this,Un,t(this.setOnline.bind(this)))}setOnline(t){O(this,Co)!==t&&($(this,Co,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return O(this,Co)}},Co=new WeakMap,Un=new WeakMap,Eo=new WeakMap,Mh),Ps=new lg;function Fi(){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 ug(e){return Math.min(1e3*2**e,3e4)}function Iu(e){return(e??"online")==="online"?Ps.isOnline():!0}var _u=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Di(e){return e instanceof _u}function Su(e){let t=!1,n=0,r=!1,o;const s=Fi(),a=h=>{var p;r||(y(new _u(h)),(p=e.abort)==null||p.call(e))},i=()=>{t=!0},c=()=>{t=!1},d=()=>ki.isFocused()&&(e.networkMode==="always"||Ps.isOnline())&&e.canRun(),f=()=>Iu(e.networkMode)&&e.canRun(),g=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))},C=()=>new Promise(h=>{var p;o=m=>{(r||d())&&h(m)},(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(m){h=Promise.reject(m)}Promise.resolve(h).then(g).catch(m=>{var _;if(r)return;const x=e.retry??(hr?0:3),E=e.retryDelay??ug,I=typeof E=="function"?E(n,m):E,v=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,m);if(t||!v){y(m);return}n++,(_=e.onFail)==null||_.call(e,n,m),sg(I).then(()=>d()?void 0:C()).then(()=>{t?y(m):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?b():C().then(b),s)}}function dg(){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 ze=dg(),Au=(jh=class{constructor(){se(this,Dr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ai(this.gcTime)&&$(this,Dr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hr?1/0:5*60*1e3))}clearGcTimeout(){O(this,Dr)&&(clearTimeout(O(this,Dr)),$(this,Dr,void 0))}},Dr=new WeakMap,jh),fg=(Ph=class extends Au{constructor(t){super();se(this,cn);se(this,vo);se(this,wo);se(this,zt);se(this,Nr);se(this,pt);se(this,Is);se(this,Rr);$(this,Rr,!1),$(this,Is,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,Nr,t.client),$(this,zt,O(this,Nr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,vo,pg(this.options)),this.state=t.state??O(this,vo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,pt))==null?void 0:t.promise}setOptions(t){this.options={...O(this,Is),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,zt).remove(this)}setData(t,n){const r=Oi(this.state.data,t,this.options);return he(this,cn,Vn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){he(this,cn,Vn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=O(this,pt))==null?void 0:r.promise;return(o=O(this,pt))==null||o.cancel(t),n?n.then(Ht).catch(Ht):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,vo))}isActive(){return this.observers.some(t=>Ut(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===js||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||!yu(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,pt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,pt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,zt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(O(this,pt)&&(O(this,Rr)?O(this,pt).cancel({revert:!0}):O(this,pt).cancelRetry()),this.scheduleGc()),O(this,zt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,cn,Vn).call(this,{type:"invalidate"})}fetch(t,n){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,pt))return O(this,pt).continueRetry(),O(this,pt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>($(this,Rr,!0),r.signal)})},s=()=>{const g=wu(this.options,n),y={client:O(this,Nr),queryKey:this.queryKey,meta:this.meta};return o(y),$(this,Rr,!1),this.options.persister?this.options.persister(g,y,this):g(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,Nr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),$(this,wo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&he(this,cn,Vn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=g=>{var y,C,b,h;Di(g)&&g.silent||he(this,cn,Vn).call(this,{type:"error",error:g}),Di(g)||((C=(y=O(this,zt).config).onError)==null||C.call(y,g,this),(h=(b=O(this,zt).config).onSettled)==null||h.call(b,this.state.data,g,this)),this.scheduleGc()};return $(this,pt,Su({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var y,C,b,h;if(g===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(p){i(p);return}(C=(y=O(this,zt).config).onSuccess)==null||C.call(y,g,this),(h=(b=O(this,zt).config).onSettled)==null||h.call(b,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,y)=>{he(this,cn,Vn).call(this,{type:"failed",failureCount:g,error:y})},onPause:()=>{he(this,cn,Vn).call(this,{type:"pause"})},onContinue:()=>{he(this,cn,Vn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),O(this,pt).start()}},vo=new WeakMap,wo=new WeakMap,zt=new WeakMap,Nr=new WeakMap,pt=new WeakMap,Is=new WeakMap,Rr=new WeakMap,cn=new WeakSet,Vn=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,...Tu(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 Di(o)&&o.revert&&O(this,wo)?{...O(this,wo),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),ze.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),O(this,zt).notify({query:this,type:"updated",action:t})})},Ph);function Tu(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Iu(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function pg(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 hg=(Bh=class extends pr{constructor(t={}){super();se(this,xn);this.config=t,$(this,xn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ti(o,n);let a=this.get(s);return a||(a=new fg({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){O(this,xn).has(t.queryHash)||(O(this,xn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=O(this,xn).get(t.queryHash);n&&(t.destroy(),n===t&&O(this,xn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,xn).get(t)}getAll(){return[...O(this,xn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>xu(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>xu(t,r)):n}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},xn=new WeakMap,Bh),gg=(Vh=class extends Au{constructor(t){super();se(this,En);se(this,Cn);se(this,bt);se(this,Mr);this.mutationId=t.mutationId,$(this,bt,t.mutationCache),$(this,Cn,[]),this.state=t.state||Lu(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,Cn).includes(t)||(O(this,Cn).push(t),this.clearGcTimeout(),O(this,bt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,Cn,O(this,Cn).filter(n=>n!==t)),this.scheduleGc(),O(this,bt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,Cn).length||(this.state.status==="pending"?this.scheduleGc():O(this,bt).remove(this))}continue(){var t;return((t=O(this,Mr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,d,f,g,y,C,b,h,p,m,x,E,I,v,_,A;$(this,Mr,Su({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{he(this,En,fr).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{he(this,En,fr).call(this,{type:"pause"})},onContinue:()=>{he(this,En,fr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,bt).canRun(this)}));const n=this.state.status==="pending",r=!O(this,Mr).canStart();try{if(!n){he(this,En,fr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=O(this,bt).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&&he(this,En,fr).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await O(this,Mr).start();return await((d=(c=O(this,bt).config).onSuccess)==null?void 0:d.call(c,S,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,S,t,this.state.context)),await((C=(y=O(this,bt).config).onSettled)==null?void 0:C.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)),he(this,En,fr).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(p=O(this,bt).config).onError)==null?void 0:m.call(p,S,t,this.state.context,this)),await((E=(x=this.options).onError)==null?void 0:E.call(x,S,t,this.state.context)),await((v=(I=O(this,bt).config).onSettled)==null?void 0:v.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{he(this,En,fr).call(this,{type:"error",error:S})}}finally{O(this,bt).runNext(this)}}},Cn=new WeakMap,bt=new WeakMap,Mr=new WeakMap,En=new WeakSet,fr=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),ze.batch(()=>{O(this,Cn).forEach(r=>{r.onMutationUpdate(t)}),O(this,bt).notify({mutation:this,type:"updated",action:t})})},Vh);function Lu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var mg=(Gh=class extends pr{constructor(t={}){super();se(this,kn);se(this,ln);se(this,_s);this.config=t,$(this,kn,new Set),$(this,ln,new Map),$(this,_s,0)}build(t,n,r){const o=new gg({mutationCache:this,mutationId:++wi(this,_s)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){O(this,kn).add(t);const n=Bs(t);if(typeof n=="string"){const r=O(this,ln).get(n);r?r.push(t):O(this,ln).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,kn).delete(t)){const n=Bs(t);if(typeof n=="string"){const r=O(this,ln).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&O(this,ln).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Bs(t);if(typeof n=="string"){const r=O(this,ln).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=Bs(t);if(typeof n=="string"){const o=(r=O(this,ln).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(){ze.batch(()=>{O(this,kn).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,kn).clear(),O(this,ln).clear()})}getAll(){return Array.from(O(this,kn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Cu(n,r))}findAll(t={}){return this.getAll().filter(n=>Cu(t,n))}notify(t){ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ze.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ht))))}},kn=new WeakMap,ln=new WeakMap,_s=new WeakMap,Gh);function Bs(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Vs(e){return{onFetch:(t,n)=>{var f,g,y,C,b;const r=t.options,o=(y=(g=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:y.direction,s=((C=t.state.data)==null?void 0:C.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const d=async()=>{let h=!1;const p=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},m=wu(t.options,t.fetchOptions),x=async(E,I,v)=>{if(h)return Promise.reject();if(I==null&&E.pages.length)return Promise.resolve(E);const _={client:t.client,queryKey:t.queryKey,pageParam:I,direction:v?"backward":"forward",meta:t.options.meta};p(_);const A=await m(_),{maxPages:S}=t.options,L=v?ig:ag;return{pages:L(E.pages,A,S),pageParams:L(E.pageParams,I,S)}};if(o&&s.length){const E=o==="backward",I=E?Ou:Ni,v={pages:s,pageParams:a},_=I(r,v);i=await x(v,_,E)}else{const E=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:Ni(r,i);if(c>0&&I==null)break;i=await x(i,I),c++}while(c<E)}return i};t.options.persister?t.fetchFn=()=>{var h,p;return(p=(h=t.options).persister)==null?void 0:p.call(h,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function Ni(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 Ou(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}function bg(e,t){return t?Ni(e,t)!=null:!1}function yg(e,t){return!t||!e.getPreviousPageParam?!1:Ou(e,t)!=null}var xg=(Hh=class{constructor(e={}){se(this,Je);se(this,Kn);se(this,er);se(this,Io);se(this,_o);se(this,tr);se(this,So);se(this,Ao);$(this,Je,e.queryCache||new hg),$(this,Kn,e.mutationCache||new mg),$(this,er,e.defaultOptions||{}),$(this,Io,new Map),$(this,_o,new Map),$(this,tr,0)}mount(){wi(this,tr)._++,O(this,tr)===1&&($(this,So,ki.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Je).onFocus())})),$(this,Ao,Ps.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Je).onOnline())})))}unmount(){var e,t;wi(this,tr)._--,O(this,tr)===0&&((e=O(this,So))==null||e.call(this),$(this,So,void 0),(t=O(this,Ao))==null||t.call(this),$(this,Ao,void 0))}isFetching(e){return O(this,Je).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Kn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,Je).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=O(this,Je).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Qr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return O(this,Je).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=O(this,Je).get(r.queryHash),s=o==null?void 0:o.state.data,a=og(t,s);if(a!==void 0)return O(this,Je).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ze.batch(()=>O(this,Je).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,Je).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=O(this,Je);ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=O(this,Je);return ze.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ze.batch(()=>O(this,Je).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ht).catch(Ht)}invalidateQueries(e,t={}){return ze.batch(()=>(O(this,Je).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=ze.batch(()=>O(this,Je).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Ht)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ht)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=O(this,Je).build(this,t);return n.isStaleByTime(Qr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ht).catch(Ht)}fetchInfiniteQuery(e){return e.behavior=Vs(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ht).catch(Ht)}ensureInfiniteQueryData(e){return e.behavior=Vs(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ps.isOnline()?O(this,Kn).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Je)}getMutationCache(){return O(this,Kn)}getDefaultOptions(){return O(this,er)}setDefaultOptions(e){$(this,er,e)}setQueryDefaults(e,t){O(this,Io).set(gr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,Io).values()],n={};return t.forEach(r=>{Ho(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){O(this,_o).set(gr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,_o).values()],n={};return t.forEach(r=>{Ho(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,er).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ti(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===js&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,er).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Je).clear(),O(this,Kn).clear()}},Je=new WeakMap,Kn=new WeakMap,er=new WeakMap,Io=new WeakMap,_o=new WeakMap,tr=new WeakMap,So=new WeakMap,Ao=new WeakMap,Hh),Gs=(Wh=class extends pr{constructor(t,n){super();se(this,Me);se(this,At);se(this,_e);se(this,Ss);se(this,yt);se(this,jr);se(this,To);se(this,nr);se(this,vn);se(this,As);se(this,Lo);se(this,Oo);se(this,Pr);se(this,Br);se(this,rr);se(this,ko,new Set);this.options=n,$(this,At,t),$(this,vn,null),$(this,nr,Fi()),this.options.experimental_prefetchInRender||O(this,nr).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&&(O(this,_e).addObserver(this),ku(O(this,_e),this.options)?he(this,Me,Ds).call(this):this.updateResult(),he(this,Me,au).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ri(O(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ri(O(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,Me,iu).call(this),he(this,Me,cu).call(this),O(this,_e).removeObserver(this)}setOptions(t,n){const r=this.options,o=O(this,_e);if(this.options=O(this,At).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ut(this.options.enabled,O(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,Me,lu).call(this),O(this,_e).setOptions(this.options),r._defaulted&&!Ms(this.options,r)&&O(this,At).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,_e),observer:this});const s=this.hasListeners();s&&Fu(O(this,_e),o,this.options,r)&&he(this,Me,Ds).call(this),this.updateResult(n),s&&(O(this,_e)!==o||Ut(this.options.enabled,O(this,_e))!==Ut(r.enabled,O(this,_e))||Qr(this.options.staleTime,O(this,_e))!==Qr(r.staleTime,O(this,_e)))&&he(this,Me,ru).call(this);const a=he(this,Me,ou).call(this);s&&(O(this,_e)!==o||Ut(this.options.enabled,O(this,_e))!==Ut(r.enabled,O(this,_e))||a!==O(this,rr))&&he(this,Me,su).call(this,a)}getOptimisticResult(t){const n=O(this,At).getQueryCache().build(O(this,At),t),r=this.createResult(n,t);return Eg(this,r)&&($(this,yt,r),$(this,To,this.options),$(this,jr,O(this,_e).state)),r}getCurrentResult(){return O(this,yt)}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){O(this,ko).add(t)}getCurrentQuery(){return O(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=O(this,At).defaultQueryOptions(t),r=O(this,At).getQueryCache().build(O(this,At),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return he(this,Me,Ds).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,yt)))}createResult(t,n){var S;const r=O(this,_e),o=this.options,s=O(this,yt),a=O(this,jr),i=O(this,To),d=t!==r?t.state:O(this,Ss),{state:f}=t;let g={...f},y=!1,C;if(n._optimisticResults){const L=this.hasListeners(),N=!L&&ku(t,n),D=L&&Fu(t,r,n,o);(N||D)&&(g={...g,...Tu(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:h,status:p}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===O(this,As))C=O(this,Lo);else try{$(this,As,n.select),C=n.select(g.data),C=Oi(s==null?void 0:s.data,C,n),$(this,Lo,C),$(this,vn,null)}catch(L){$(this,vn,L)}else C=g.data;if(n.placeholderData!==void 0&&C===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=O(this,Oo))==null?void 0:S.state.data,O(this,Oo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),$(this,vn,null)}catch(N){$(this,vn,N)}L!==void 0&&(p="success",C=Oi(s==null?void 0:s.data,L,n),y=!0)}O(this,vn)&&(b=O(this,vn),C=O(this,Lo),h=Date.now(),p="error");const m=g.fetchStatus==="fetching",x=p==="pending",E=p==="error",I=x&&m,v=C!==void 0,A={status:p,fetchStatus:g.fetchStatus,isPending:x,isSuccess:p==="success",isError:E,isInitialLoading:I,isLoading:I,data:C,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:h,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:m,isRefetching:m&&!x,isLoadingError:E&&!v,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:E&&v,isStale:Mi(t,n),refetch:this.refetch,promise:O(this,nr)};if(this.options.experimental_prefetchInRender){const L=F=>{A.status==="error"?F.reject(A.error):A.data!==void 0&&F.resolve(A.data)},N=()=>{const F=$(this,nr,A.promise=Fi());L(F)},D=O(this,nr);switch(D.status){case"pending":t.queryHash===r.queryHash&&L(D);break;case"fulfilled":(A.status==="error"||A.data!==D.value)&&N();break;case"rejected":(A.status!=="error"||A.error!==D.reason)&&N();break}}return A}updateResult(t){const n=O(this,yt),r=this.createResult(O(this,_e),this.options);if($(this,jr,O(this,_e).state),$(this,To,this.options),O(this,jr).data!==void 0&&$(this,Oo,O(this,_e)),Ms(r,n))return;$(this,yt,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!O(this,ko).size)return!0;const c=new Set(i??O(this,ko));return this.options.throwOnError&&c.add("error"),Object.keys(O(this,yt)).some(d=>{const f=d;return O(this,yt)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),he(this,Me,tg).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,Me,au).call(this)}},At=new WeakMap,_e=new WeakMap,Ss=new WeakMap,yt=new WeakMap,jr=new WeakMap,To=new WeakMap,nr=new WeakMap,vn=new WeakMap,As=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,Pr=new WeakMap,Br=new WeakMap,rr=new WeakMap,ko=new WeakMap,Me=new WeakSet,Ds=function(t){he(this,Me,lu).call(this);let n=O(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ht)),n},ru=function(){he(this,Me,iu).call(this);const t=Qr(this.options.staleTime,O(this,_e));if(hr||O(this,yt).isStale||!Ai(t))return;const r=yu(O(this,yt).dataUpdatedAt,t)+1;$(this,Pr,setTimeout(()=>{O(this,yt).isStale||this.updateResult()},r))},ou=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,_e)):this.options.refetchInterval)??!1},su=function(t){he(this,Me,cu).call(this),$(this,rr,t),!(hr||Ut(this.options.enabled,O(this,_e))===!1||!Ai(O(this,rr))||O(this,rr)===0)&&$(this,Br,setInterval(()=>{(this.options.refetchIntervalInBackground||ki.isFocused())&&he(this,Me,Ds).call(this)},O(this,rr)))},au=function(){he(this,Me,ru).call(this),he(this,Me,su).call(this,he(this,Me,ou).call(this))},iu=function(){O(this,Pr)&&(clearTimeout(O(this,Pr)),$(this,Pr,void 0))},cu=function(){O(this,Br)&&(clearInterval(O(this,Br)),$(this,Br,void 0))},lu=function(){const t=O(this,At).getQueryCache().build(O(this,At),this.options);if(t===O(this,_e))return;const n=O(this,_e);$(this,_e,t),$(this,Ss,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},tg=function(t){ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(O(this,yt))}),O(this,At).getQueryCache().notify({query:O(this,_e),type:"observerResultsUpdated"})})},Wh);function Cg(e,t){return Ut(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ku(e,t){return Cg(e,t)||e.state.data!==void 0&&Ri(e,t,t.refetchOnMount)}function Ri(e,t,n){if(Ut(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Mi(e,t)}return!1}function Fu(e,t,n,r){return(e!==t||Ut(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Mi(e,n)}function Mi(e,t){return Ut(t.enabled,e)!==!1&&e.isStaleByTime(Qr(t.staleTime,e))}function Eg(e,t){return!Ms(e.getCurrentResult(),t)}function Du(e,t){return e.filter(n=>!t.includes(n))}function vg(e,t,n){const r=e.slice(0);return r[t]=n,r}var wg=(Zh=class extends pr{constructor(t,n,r){super();se(this,lt);se(this,Vr);se(this,Xt);se(this,Fo);se(this,Do);se(this,Yt);se(this,or);se(this,Ts);se(this,Ls);se(this,Os,[]);$(this,Vr,t),$(this,Do,r),$(this,Fo,[]),$(this,Yt,[]),$(this,Xt,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&O(this,Yt).forEach(t=>{t.subscribe(n=>{he(this,lt,pu).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,O(this,Yt).forEach(t=>{t.destroy()})}setQueries(t,n,r){if($(this,Fo,t),$(this,Do,n),process.env.NODE_ENV!=="production"){const o=t.map(s=>O(this,Vr).defaultQueryOptions(s).queryHash);new Set(o).size!==o.length&&console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.")}ze.batch(()=>{const o=O(this,Yt),s=he(this,lt,fu).call(this,O(this,Fo));$(this,Os,s),s.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions,r));const a=s.map(d=>d.observer),i=a.map(d=>d.getCurrentResult()),c=a.some((d,f)=>d!==o[f]);o.length===a.length&&!c||($(this,Yt,a),$(this,Xt,i),this.hasListeners()&&(Du(o,a).forEach(d=>{d.destroy()}),Du(a,o).forEach(d=>{d.subscribe(f=>{he(this,lt,pu).call(this,d,f)})}),he(this,lt,hu).call(this)))})}getCurrentResult(){return O(this,Xt)}getQueries(){return O(this,Yt).map(t=>t.getCurrentQuery())}getObservers(){return O(this,Yt)}getOptimisticResult(t,n){const r=he(this,lt,fu).call(this,t),o=r.map(s=>s.observer.getOptimisticResult(s.defaultedQueryOptions));return[o,s=>he(this,lt,du).call(this,s??o,n),()=>he(this,lt,uu).call(this,o,r)]}},Vr=new WeakMap,Xt=new WeakMap,Fo=new WeakMap,Do=new WeakMap,Yt=new WeakMap,or=new WeakMap,Ts=new WeakMap,Ls=new WeakMap,Os=new WeakMap,lt=new WeakSet,uu=function(t,n){return n.map((r,o)=>{const s=t[o];return r.defaultedQueryOptions.notifyOnChangeProps?s:r.observer.trackResult(s,a=>{n.forEach(i=>{i.observer.trackProp(a)})})})},du=function(t,n){return n?((!O(this,or)||O(this,Xt)!==O(this,Ls)||n!==O(this,Ts))&&($(this,Ts,n),$(this,Ls,O(this,Xt)),$(this,or,Rs(O(this,or),n(t)))),O(this,or)):t},fu=function(t){const n=new Map(O(this,Yt).map(o=>[o.options.queryHash,o])),r=[];return t.forEach(o=>{const s=O(this,Vr).defaultQueryOptions(o),a=n.get(s.queryHash);a?r.push({defaultedQueryOptions:s,observer:a}):r.push({defaultedQueryOptions:s,observer:new Gs(O(this,Vr),s)})}),r},pu=function(t,n){const r=O(this,Yt).indexOf(t);r!==-1&&($(this,Xt,vg(O(this,Xt),r,n)),he(this,lt,hu).call(this))},hu=function(){var t;if(this.hasListeners()){const n=O(this,or),r=he(this,lt,uu).call(this,O(this,Xt),O(this,Os)),o=he(this,lt,du).call(this,r,(t=O(this,Do))==null?void 0:t.combine);n!==o&&ze.batch(()=>{this.listeners.forEach(s=>{s(O(this,Xt))})})}},Zh),Ig=class extends Gs{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:Vs()},t)}getOptimisticResult(e){return e.behavior=Vs(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,h;const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:a,isRefetchError:i}=r,c=(h=(b=n.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:h.direction,d=a&&c==="forward",f=o&&c==="forward",g=a&&c==="backward",y=o&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:bg(t,n.data),hasPreviousPage:yg(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:i&&!d&&!g,isRefetching:s&&!f&&!y}}},_g=(zh=class extends pr{constructor(n,r){super();se(this,Dn);se(this,sr);se(this,ar);se(this,Tt);se(this,Fn);$(this,sr,n),this.setOptions(r),this.bindMethods(),he(this,Dn,Ii).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=O(this,sr).defaultMutationOptions(n),Ms(this.options,r)||O(this,sr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:O(this,Tt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&gr(r.mutationKey)!==gr(this.options.mutationKey)?this.reset():((o=O(this,Tt))==null?void 0:o.state.status)==="pending"&&O(this,Tt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=O(this,Tt))==null||n.removeObserver(this)}onMutationUpdate(n){he(this,Dn,Ii).call(this),he(this,Dn,gu).call(this,n)}getCurrentResult(){return O(this,ar)}reset(){var n;(n=O(this,Tt))==null||n.removeObserver(this),$(this,Tt,void 0),he(this,Dn,Ii).call(this),he(this,Dn,gu).call(this)}mutate(n,r){var o;return $(this,Fn,r),(o=O(this,Tt))==null||o.removeObserver(this),$(this,Tt,O(this,sr).getMutationCache().build(O(this,sr),this.options)),O(this,Tt).addObserver(this),O(this,Tt).execute(n)}},sr=new WeakMap,ar=new WeakMap,Tt=new WeakMap,Fn=new WeakMap,Dn=new WeakSet,Ii=function(){var r;const n=((r=O(this,Tt))==null?void 0:r.state)??Lu();$(this,ar,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},gu=function(n){ze.batch(()=>{var r,o,s,a,i,c,d,f;if(O(this,Fn)&&this.hasListeners()){const g=O(this,ar).variables,y=O(this,ar).context;(n==null?void 0:n.type)==="success"?((o=(r=O(this,Fn)).onSuccess)==null||o.call(r,n.data,g,y),(a=(s=O(this,Fn)).onSettled)==null||a.call(s,n.data,null,g,y)):(n==null?void 0:n.type)==="error"&&((c=(i=O(this,Fn)).onError)==null||c.call(i,n.error,g,y),(f=(d=O(this,Fn)).onSettled)==null||f.call(d,void 0,n.error,g,y))}this.listeners.forEach(g=>{g(O(this,ar))})})},zh),Nu=T.createContext(void 0),dn=e=>{const t=T.useContext(Nu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Sg=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Nu.Provider,{value:e,children:t})),Ru=T.createContext(!1),Mu=()=>T.useContext(Ru);Ru.Provider;function Ag(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Tg=T.createContext(Ag()),ju=()=>T.useContext(Tg);function Pu(e,t){return typeof e=="function"?e(...t):!!e}function Hs(){}var Bu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Vu=e=>{T.useEffect(()=>{e.clearReset()},[e])},Gu=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Pu(n,[e.error,r])),Hu=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)))},Wu=(e,t)=>e.isLoading&&e.isFetching&&!t,ji=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ws=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Lg({queries:e,...t},n){const r=dn(),o=Mu(),s=ju(),a=T.useMemo(()=>e.map(h=>{const p=r.defaultQueryOptions(h);return p._optimisticResults=o?"isRestoring":"optimistic",p}),[e,r,o]);a.forEach(h=>{Hu(h),Bu(h,s)}),Vu(s);const[i]=T.useState(()=>new wg(r,a,t)),[c,d,f]=i.getOptimisticResult(a,t.combine),g=!o&&t.subscribed!==!1;T.useSyncExternalStore(T.useCallback(h=>g?i.subscribe(ze.batchCalls(h)):Hs,[i,g]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),T.useEffect(()=>{i.setQueries(a,t,{listeners:!1})},[a,t,i]);const C=c.some((h,p)=>ji(a[p],h))?c.flatMap((h,p)=>{const m=a[p];if(m){const x=new Gs(r,m);if(ji(m,h))return Ws(m,x,s);Wu(h,o)&&Ws(m,x,s)}return[]}):[];if(C.length>0)throw Promise.all(C);const b=c.find((h,p)=>{const m=a[p];return m&&Gu({result:h,errorResetBoundary:s,throwOnError:m.throwOnError,query:r.getQueryCache().get(m.queryHash),suspense:m.suspense})});if(b!=null&&b.error)throw b.error;return d(f())}function Zu(e,t,n){var g,y,C,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=dn(),o=Mu(),s=ju(),a=r.defaultQueryOptions(e);(y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",Hu(a),Bu(a,s),Vu(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),d=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(p=>{const m=f?c.subscribe(ze.batchCalls(p)):Hs;return c.updateResult(),m},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),ji(a,d))throw Ws(a,c,s);if(Gu({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw d.error;if((b=(C=r.getDefaultOptions().queries)==null?void 0:C._experimental_afterQuery)==null||b.call(C,a,d),a.experimental_prefetchInRender&&!hr&&Wu(d,o)){const p=i?Ws(a,c,s):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;p==null||p.catch(Hs).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?d:c.trackResult(d)}function Ot(e,t){return Zu(e,Gs)}function Kt(e,t){const n=dn(),[r]=T.useState(()=>new _g(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(ze.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(Hs)},[r]);if(o.error&&Pu(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function Og(e,t){return Zu(e,Ig)}const Pi=(e,t)=>t.some(n=>e instanceof n);let zu,Xu;function kg(){return zu||(zu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Fg(){return Xu||(Xu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Bi=new WeakMap,Vi=new WeakMap,Zs=new WeakMap;function Dg(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(mr(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return Zs.set(t,e),t}function Ng(e){if(Bi.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)});Bi.set(e,t)}let Gi={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return mr(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 Yu(e){Gi=e(Gi)}function Rg(e){return Fg().includes(e)?function(...t){return e.apply(Hi(this),t),mr(this.request)}:function(...t){return mr(e.apply(Hi(this),t))}}function Mg(e){return typeof e=="function"?Rg(e):(e instanceof IDBTransaction&&Ng(e),Pi(e,kg())?new Proxy(e,Gi):e)}function mr(e){if(e instanceof IDBRequest)return Dg(e);if(Vi.has(e))return Vi.get(e);const t=Mg(e);return t!==e&&(Vi.set(e,t),Zs.set(t,e)),t}const Hi=e=>Zs.get(e);function jg(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=mr(a);return r&&a.addEventListener("upgradeneeded",c=>{r(mr(a.result),c.oldVersion,c.newVersion,mr(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",d=>o(d.oldVersion,d.newVersion,d))}).catch(()=>{}),i}const Pg=["get","getKey","getAll","getAllKeys","count"],Bg=["put","add","delete","clear"],Wi=new Map;function Ju(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Wi.get(t))return Wi.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Bg.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||Pg.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let d=c.store;return r&&(d=d.index(i.shift())),(await Promise.all([d[n](...i),o&&c.done]))[0]};return Wi.set(t,s),s}Yu(e=>({...e,get:(t,n,r)=>Ju(t,n)||e.get(t,n,r),has:(t,n)=>!!Ju(t,n)||e.has(t,n)}));const Vg=["continue","continuePrimaryKey","advance"],qu={},Zi=new WeakMap,Qu=new WeakMap,Gg={get(e,t){if(!Vg.includes(t))return e[t];let n=qu[t];return n||(n=qu[t]=function(...r){Zi.set(this,Qu.get(this)[t](...r))}),n}};async function*Hg(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,Gg);for(Qu.set(n,t),Zs.set(n,Hi(t));t;)yield n,t=await(Zi.get(n)||t.continue()),Zi.delete(n)}function $u(e,t){return t===Symbol.asyncIterator&&Pi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Pi(e,[IDBIndex,IDBObjectStore])}Yu(e=>({...e,get(t,n,r){return $u(t,n)?Hg:e.get(t,n,r)},has(t,n){return $u(t,n)||e.has(t,n)}}));const Wg="connector-db",Zg=1,zs={FEEDBACK:"feedback"},Wo=`${zs.FEEDBACK}:data`,Xs=`${zs.FEEDBACK}:last_submitted`,Zo=`${zs.FEEDBACK}:capture_on_demand`,zo=`${zs.FEEDBACK}:show_notification`,zg=12*60*60*1e3,zi=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=zg:!0,Uu=(e,t=!1)=>e.captureFeedback&&(zi(e.firstViewed)&&(!e.lastSubmittedFeedback||zi(e.lastSubmittedFeedback))||!!t);let br=null;const Gn=async()=>{try{br||(br=await jg(Wg,Zg,{upgrade(e){e.objectStoreNames.contains(Wo)||e.createObjectStore(Wo),e.objectStoreNames.contains(Xs)||e.createObjectStore(Xs),e.objectStoreNames.contains(Zo)||e.createObjectStore(Zo),e.objectStoreNames.contains(zo)||e.createObjectStore(zo)},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."),br&&(br.close(),br=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),br=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return br},Xi=async e=>{if(!e)return[];const t=await Gn();if(!t)return[];try{return await t.get(Wo,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},Xg=async e=>{if(!e)return null;const t=await Gn();if(!t)return null;try{return await t.get(Xs,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Ys=async e=>{if(!e)return;const t=await Gn();if(t)try{return await t.get(Zo,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},Yg=async e=>{if(!e)return!1;const t=await Gn();if(!t)return!1;try{return await t.get(zo,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},Jg=async(e,t)=>{if(!e||!t||!t.length)return;const n=await Gn();if(n)try{const r=await Xi(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(Wo,a,e),await n.put(zo,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},qg=async e=>{if(!e)return;const t=await Gn();if(t)try{const n=await Xi(e),r=await Ys(e),o=new Date,s=n.map(a=>{const i=Uu(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(Wo,s,e),await t.put(Xs,o,e),r&&await t.put(Zo,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},Ku=async(e,t)=>{if(!e)return;const n=await Gn();if(n)try{await n.put(Zo,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},Qg=async e=>{if(!e)return;const t=await Gn();if(t)try{await t.put(zo,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},$g=async e=>{const t=await Xi(e),n=await Ys(e);return t.filter(o=>Uu(o,n))},Yi=async e=>{const t=await Xg(e);return t&&!zi(t)?!1:await Ys(e)&&!t?!0:!!(await $g(e)).length},Ug=async(e,t)=>{await Jg(e,t)},Js=async e=>{e&&await qg(e)},Kg=async(e,t)=>{const n=await Ys(e);t?n!==!1&&await Ku(e,t):await Ku(e,void 0)},ed=async e=>await Yg(e)&&await Yi(e),td=async e=>{await Qg(e)};var Ji={},yr={};function nd(e,t){return function(){return e.apply(t,arguments)}}const{toString:em}=Object.prototype,{getPrototypeOf:qi}=Object,qs=(e=>t=>{const n=em.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),en=e=>(e=e.toLowerCase(),t=>qs(t)===e),Qs=e=>t=>typeof t===e,{isArray:$r}=Array,Xo=Qs("undefined");function tm(e){return e!==null&&!Xo(e)&&e.constructor!==null&&!Xo(e.constructor)&&kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rd=en("ArrayBuffer");function nm(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rd(e.buffer),t}const rm=Qs("string"),kt=Qs("function"),od=Qs("number"),$s=e=>e!==null&&typeof e=="object",om=e=>e===!0||e===!1,Us=e=>{if(qs(e)!=="object")return!1;const t=qi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},sm=en("Date"),am=en("File"),im=en("Blob"),cm=en("FileList"),lm=e=>$s(e)&&kt(e.pipe),um=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||kt(e.append)&&((t=qs(e))==="formdata"||t==="object"&&kt(e.toString)&&e.toString()==="[object FormData]"))},dm=en("URLSearchParams"),[fm,pm,hm,gm]=["ReadableStream","Request","Response","Headers"].map(en),mm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),$r(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 sd(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 xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ge,ad=e=>!Xo(e)&&e!==xr;function Qi(){const{caseless:e}=ad(this)&&this||{},t={},n=(r,o)=>{const s=e&&sd(t,o)||o;Us(t[s])&&Us(r)?t[s]=Qi(t[s],r):Us(r)?t[s]=Qi({},r):$r(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Yo(arguments[r],n);return t}const bm=(e,t,n,{allOwnKeys:r}={})=>(Yo(t,(o,s)=>{n&&kt(o)?e[s]=nd(o,n):e[s]=o},{allOwnKeys:r}),e),ym=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xm=(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)},Cm=(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&&qi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Em=(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},vm=e=>{if(!e)return null;if($r(e))return e;let t=e.length;if(!od(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wm=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qi(Uint8Array)),Im=(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])}},_m=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Sm=en("HTMLFormElement"),Am=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),id=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Tm=en("RegExp"),cd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Yo(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Lm=e=>{cd(e,(t,n)=>{if(kt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(kt(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+"'")})}})},Om=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return $r(e)?r(e):r(String(e).split(t)),n},km=()=>{},Fm=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,$i="abcdefghijklmnopqrstuvwxyz",ld="0123456789",ud={DIGIT:ld,ALPHA:$i,ALPHA_DIGIT:$i+$i.toUpperCase()+ld},Dm=(e=16,t=ud.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Nm(e){return!!(e&&kt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Rm=e=>{const t=new Array(10),n=(r,o)=>{if($s(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=$r(r)?[]:{};return Yo(r,(a,i)=>{const c=n(a,o+1);!Xo(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},Mm=en("AsyncFunction"),jm=e=>e&&($s(e)||kt(e))&&kt(e.then)&&kt(e.catch),dd=((e,t)=>e?setImmediate:t?((n,r)=>(xr.addEventListener("message",({source:o,data:s})=>{o===xr&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),xr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",kt(xr.postMessage)),Pm=typeof queueMicrotask<"u"?queueMicrotask.bind(xr):typeof process<"u"&&process.nextTick||dd;var P={isArray:$r,isArrayBuffer:rd,isBuffer:tm,isFormData:um,isArrayBufferView:nm,isString:rm,isNumber:od,isBoolean:om,isObject:$s,isPlainObject:Us,isReadableStream:fm,isRequest:pm,isResponse:hm,isHeaders:gm,isUndefined:Xo,isDate:sm,isFile:am,isBlob:im,isRegExp:Tm,isFunction:kt,isStream:lm,isURLSearchParams:dm,isTypedArray:wm,isFileList:cm,forEach:Yo,merge:Qi,extend:bm,trim:mm,stripBOM:ym,inherits:xm,toFlatObject:Cm,kindOf:qs,kindOfTest:en,endsWith:Em,toArray:vm,forEachEntry:Im,matchAll:_m,isHTMLForm:Sm,hasOwnProperty:id,hasOwnProp:id,reduceDescriptors:cd,freezeMethods:Lm,toObjectSet:Om,toCamelCase:Am,noop:km,toFiniteNumber:Fm,findKey:sd,global:xr,isContextDefined:ad,ALPHABET:ud,generateString:Dm,isSpecCompliantForm:Nm,toJSONObject:Rm,isAsyncFn:Mm,isThenable:jm,setImmediate:dd,asap:Pm};function xe(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)}P.inherits(xe,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:P.toJSONObject(this.config),code:this.code,status:this.status}}});const fd=xe.prototype,pd={};["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=>{pd[e]={value:e}}),Object.defineProperties(xe,pd),Object.defineProperty(fd,"isAxiosError",{value:!0}),xe.from=(e,t,n,r,o,s)=>{const a=Object.create(fd);return P.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),xe.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var Bm=null;function Ui(e){return P.isPlainObject(e)||P.isArray(e)}function hd(e){return P.endsWith(e,"[]")?e.slice(0,-2):e}function gd(e,t,n){return e?e.concat(t).map(function(o,s){return o=hd(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Vm(e){return P.isArray(e)&&!e.some(Ui)}const Gm=P.toFlatObject(P,{},null,function(t){return/^is[A-Z]/.test(t)});function Ks(e,t,n){if(!P.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=P.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,p){return!P.isUndefined(p[h])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(t);if(!P.isFunction(o))throw new TypeError("visitor must be a function");function d(b){if(b===null)return"";if(P.isDate(b))return b.toISOString();if(!c&&P.isBlob(b))throw new xe("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(b)||P.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,h,p){let m=b;if(b&&!p&&typeof b=="object"){if(P.endsWith(h,"{}"))h=r?h:h.slice(0,-2),b=JSON.stringify(b);else if(P.isArray(b)&&Vm(b)||(P.isFileList(b)||P.endsWith(h,"[]"))&&(m=P.toArray(b)))return h=hd(h),m.forEach(function(E,I){!(P.isUndefined(E)||E===null)&&t.append(a===!0?gd([h],I,s):a===null?h:h+"[]",d(E))}),!1}return Ui(b)?!0:(t.append(gd(p,h,s),d(b)),!1)}const g=[],y=Object.assign(Gm,{defaultVisitor:f,convertValue:d,isVisitable:Ui});function C(b,h){if(!P.isUndefined(b)){if(g.indexOf(b)!==-1)throw Error("Circular reference detected in "+h.join("."));g.push(b),P.forEach(b,function(m,x){(!(P.isUndefined(m)||m===null)&&o.call(t,m,P.isString(x)?x.trim():x,h,y))===!0&&C(m,h?h.concat(x):[x])}),g.pop()}}if(!P.isObject(e))throw new TypeError("data must be an object");return C(e),t}function md(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ki(e,t){this._pairs=[],e&&Ks(e,this,t)}const bd=Ki.prototype;bd.append=function(t,n){this._pairs.push([t,n])},bd.toString=function(t){const n=t?function(r){return t.call(this,r,md)}:md;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Hm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yd(e,t,n){if(!t)return e;const r=n&&n.encode||Hm,o=n&&n.serialize;let s;if(o?s=o(t,n):s=P.isURLSearchParams(t)?t.toString():new Ki(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Wm{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){P.forEach(this.handlers,function(r){r!==null&&t(r)})}}var xd=Wm,Cd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Zm=typeof URLSearchParams<"u"?URLSearchParams:Ki,zm=typeof FormData<"u"?FormData:null,Xm=typeof Blob<"u"?Blob:null,Ym={isBrowser:!0,classes:{URLSearchParams:Zm,FormData:zm,Blob:Xm},protocols:["http","https","file","blob","url","data"]};const ec=typeof window<"u"&&typeof document<"u",tc=typeof navigator=="object"&&navigator||void 0,Jm=ec&&(!tc||["ReactNative","NativeScript","NS"].indexOf(tc.product)<0),qm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Qm=ec&&window.location.href||"http://localhost";var $m=Object.freeze({__proto__:null,hasBrowserEnv:ec,hasStandardBrowserWebWorkerEnv:qm,hasStandardBrowserEnv:Jm,navigator:tc,origin:Qm}),Ct={...$m,...Ym};function Um(e,t){return Ks(e,new Ct.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return Ct.isNode&&P.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Km(e){return P.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function e3(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 Ed(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&&P.isArray(o)?o.length:a,c?(P.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!P.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&P.isArray(o[a])&&(o[a]=e3(o[a])),!i)}if(P.isFormData(e)&&P.isFunction(e.entries)){const n={};return P.forEachEntry(e,(r,o)=>{t(Km(r),o,n,0)}),n}return null}function t3(e,t,n){if(P.isString(e))try{return(t||JSON.parse)(e),P.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const nc={transitional:Cd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=P.isObject(t);if(s&&P.isHTMLForm(t)&&(t=new FormData(t)),P.isFormData(t))return o?JSON.stringify(Ed(t)):t;if(P.isArrayBuffer(t)||P.isBuffer(t)||P.isStream(t)||P.isFile(t)||P.isBlob(t)||P.isReadableStream(t))return t;if(P.isArrayBufferView(t))return t.buffer;if(P.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 Um(t,this.formSerializer).toString();if((i=P.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ks(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),t3(t)):t}],transformResponse:[function(t){const n=this.transitional||nc.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(P.isResponse(t)||P.isReadableStream(t))return t;if(t&&P.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"?xe.from(i,xe.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:Ct.classes.FormData,Blob:Ct.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],e=>{nc.headers[e]={}});var rc=nc;const n3=P.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 r3=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]&&
|
|
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[vd]=this[vd]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Jo(a);r[i]||(i3(o,a),r[i]=!0)}return P.isArray(t)?t.forEach(s):s(t),this}}ta.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),P.reduceDescriptors(ta.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),P.freezeMethods(ta);var tn=ta;function sc(e,t){const n=this||rc,r=t||n,o=tn.from(r.headers);let s=r.data;return P.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function wd(e){return!!(e&&e.__CANCEL__)}function Ur(e,t,n){xe.call(this,e??"canceled",xe.ERR_CANCELED,t,n),this.name="CanceledError"}P.inherits(Ur,xe,{__CANCEL__:!0});function Id(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new xe("Request failed with status code "+n.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function c3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function l3(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 d=Date.now(),f=r[s];a||(a=d),n[o]=c,r[o]=d;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),d-a<t)return;const C=f&&d-f;return C?Math.round(y*1e3/C):void 0}}function u3(e,t){let n=0,r=1e3/t,o,s;const a=(d,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,d)};return[(...d)=>{const f=Date.now(),g=f-n;g>=r?a(d,f):(o=d,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const na=(e,t,n=3)=>{let r=0;const o=l3(50,250);return u3(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,d=o(c),f=a<=i;r=a;const g={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&f?(i-a)/d:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},_d=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Sd=e=>(...t)=>P.asap(()=>e(...t));var d3=Ct.hasStandardBrowserEnv?function(){const t=Ct.navigator&&/(msie|trident)/i.test(Ct.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=P.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),f3=Ct.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];P.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),P.isString(r)&&a.push("path="+r),P.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 p3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function h3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ad(e,t){return e&&!p3(t)?h3(e,t):t}const Td=e=>e instanceof tn?{...e}:e;function Cr(e,t){t=t||{};const n={};function r(d,f,g){return P.isPlainObject(d)&&P.isPlainObject(f)?P.merge.call({caseless:g},d,f):P.isPlainObject(f)?P.merge({},f):P.isArray(f)?f.slice():f}function o(d,f,g){if(P.isUndefined(f)){if(!P.isUndefined(d))return r(void 0,d,g)}else return r(d,f,g)}function s(d,f){if(!P.isUndefined(f))return r(void 0,f)}function a(d,f){if(P.isUndefined(f)){if(!P.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function i(d,f,g){if(g in t)return r(d,f);if(g in e)return r(void 0,d)}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:(d,f)=>o(Td(d),Td(f),!0)};return P.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=c[f]||o,y=g(e[f],t[f],f);P.isUndefined(y)&&g!==i||(n[f]=y)}),n}var Ld=e=>{const t=Cr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=tn.from(a),t.url=yd(Ad(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(P.isFormData(n)){if(Ct.hasStandardBrowserEnv||Ct.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[d,...f]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...f].join("; "))}}if(Ct.hasStandardBrowserEnv&&(r&&P.isFunction(r)&&(r=r(t)),r||r!==!1&&d3(t.url))){const d=o&&s&&f3.read(s);d&&a.set(o,d)}return t},g3=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Ld(e);let s=o.data;const a=tn.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:d}=o,f,g,y,C,b;function h(){C&&C(),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 m(){if(!p)return;const E=tn.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),v={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:E,config:e,request:p};Id(function(A){n(A),h()},function(A){r(A),h()},v),p=null}"onloadend"in p?p.onloadend=m:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(m)},p.onabort=function(){p&&(r(new xe("Request aborted",xe.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new xe("Network Error",xe.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const v=o.transitional||Cd;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new xe(I,v.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,e,p)),p=null},s===void 0&&a.setContentType(null),"setRequestHeader"in p&&P.forEach(a.toJSON(),function(I,v){p.setRequestHeader(v,I)}),P.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),d&&([y,b]=na(d,!0),p.addEventListener("progress",y)),c&&p.upload&&([g,C]=na(c),p.upload.addEventListener("progress",g),p.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(f=E=>{p&&(r(!E||E.type?new Ur(null,e,p):E),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=c3(o.url);if(x&&Ct.protocols.indexOf(x)===-1){r(new xe("Unsupported protocol "+x+":",xe.ERR_BAD_REQUEST,e));return}p.send(s||null)})},m3=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(d){if(!o){o=!0,i();const f=d instanceof Error?d:this.reason;r.abort(f instanceof xe?f:new Ur(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new xe(`timeout ${t} of ms exceeded`,xe.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>P.asap(i),c}};const b3=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},y3=async function*(e,t){for await(const n of x3(e))yield*b3(n,t)},x3=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()}},Od=(e,t,n,r)=>{const o=y3(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await o.next();if(d){i(),c.close();return}let g=f.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(f))}catch(d){throw i(d),d}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},ra=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kd=ra&&typeof ReadableStream=="function",C3=ra&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},E3=kd&&Fd(()=>{let e=!1;const t=new Request(Ct.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Dd=64*1024,ac=kd&&Fd(()=>P.isReadableStream(new Response("").body)),oa={stream:ac&&(e=>e.body)};ra&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!oa[t]&&(oa[t]=P.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new xe(`Response type '${t}' is not supported`,xe.ERR_NOT_SUPPORT,r)})})})(new Response);const v3=async e=>{if(e==null)return 0;if(P.isBlob(e))return e.size;if(P.isSpecCompliantForm(e))return(await new Request(Ct.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(P.isArrayBufferView(e)||P.isArrayBuffer(e))return e.byteLength;if(P.isURLSearchParams(e)&&(e=e+""),P.isString(e))return(await C3(e)).byteLength},w3=async(e,t)=>{const n=P.toFiniteNumber(e.getContentLength());return n??v3(t)};var I3=ra&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:d,headers:f,withCredentials:g="same-origin",fetchOptions:y}=Ld(e);d=d?(d+"").toLowerCase():"text";let C=m3([o,s&&s.toAbortSignal()],a),b;const h=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let p;try{if(c&&E3&&n!=="get"&&n!=="head"&&(p=await w3(f,r))!==0){let v=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(P.isFormData(r)&&(_=v.headers.get("content-type"))&&f.setContentType(_),v.body){const[A,S]=_d(p,na(Sd(c)));r=Od(v.body,Dd,A,S)}}P.isString(g)||(g=g?"include":"omit");const m="credentials"in Request.prototype;b=new Request(t,{...y,signal:C,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:m?g:void 0});let x=await fetch(b);const E=ac&&(d==="stream"||d==="response");if(ac&&(i||E&&h)){const v={};["status","statusText","headers"].forEach(L=>{v[L]=x[L]});const _=P.toFiniteNumber(x.headers.get("content-length")),[A,S]=i&&_d(_,na(Sd(i),!0))||[];x=new Response(Od(x.body,Dd,A,()=>{S&&S(),h&&h()}),v)}d=d||"text";let I=await oa[P.findKey(oa,d)||"text"](x,e);return!E&&h&&h(),await new Promise((v,_)=>{Id(v,_,{data:I,headers:tn.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:b})})}catch(m){throw h&&h(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new xe("Network Error",xe.ERR_NETWORK,e,b),{cause:m.cause||m}):xe.from(m,m&&m.code,e,b)}});const ic={http:Bm,xhr:g3,fetch:I3};P.forEach(ic,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Nd=e=>`- ${e}`,_3=e=>P.isFunction(e)||e===null||e===!1;var Rd={getAdapter:e=>{e=P.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,!_3(n)&&(r=ic[(a=String(n)).toLowerCase()],r===void 0))throw new xe(`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} />`,Ds,Mn,tu,Mn),qr[Mn+Ds]=!0}}return k===r?Jr($e):Vo($e),$e}}function ye(k,Z,U){return ae(k,Z,U,!0)}function Ve(k,Z,U){return ae(k,Z,U,!1)}var Ot=Ve,ze=ye;Ho.Fragment=r,Ho.jsx=Ot,Ho.jsxs=ze}()),Ho}process.env.NODE_ENV==="production"?Si.exports=rg():Si.exports=og();var u=Si.exports,ur=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(){}},dr=typeof window>"u"||"Deno"in globalThis;function Zt(){}function sg(e,t){return typeof e=="function"?e(t):e}function Ai(e){return typeof e=="number"&&e>=0&&e!==1/0}function yu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qr(e,t){return typeof e=="function"?e(t):e}function Ut(e,t){return typeof e=="function"?e(t):e}function xu(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ti(a,t.options))return!1}else if(!Wo(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 Cu(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(fr(t.options.mutationKey)!==fr(s))return!1}else if(!Wo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ti(e,t){return((t==null?void 0:t.queryKeyHashFn)||fr)(e)}function fr(e){return JSON.stringify(e,(t,n)=>Li(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Wo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Wo(e[n],t[n])):!1}function Ms(e,t){if(e===t)return e;const n=Eu(e)&&Eu(t);if(n||Li(e)&&Li(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 d=0;d<a;d++){const f=n?d:s[d];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=Ms(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function js(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 Eu(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Li(e){if(!vu(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!vu(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vu(e){return Object.prototype.toString.call(e)==="[object Object]"}function ag(e){return new Promise(t=>{setTimeout(t,e)})}function Oi(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 Ms(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 Ms(e,t)}return t}function ig(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function cg(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ps=Symbol();function wu(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 lg=(Mh=class extends ur{constructor(){super();se(this,Lr);se(this,qn);se(this,xo);$(this,xo,t=>{if(!dr&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,qn)||this.setEventListener(O(this,xo))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,qn))==null||t.call(this),$(this,qn,void 0))}setEventListener(t){var n;$(this,xo,t),(n=O(this,qn))==null||n.call(this),$(this,qn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){O(this,Lr)!==t&&($(this,Lr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof O(this,Lr)=="boolean"?O(this,Lr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Lr=new WeakMap,qn=new WeakMap,xo=new WeakMap,Mh),ki=new lg,ug=(jh=class extends ur{constructor(){super();se(this,Co,!0);se(this,Qn);se(this,Eo);$(this,Eo,t=>{if(!dr&&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(){O(this,Qn)||this.setEventListener(O(this,Eo))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Qn))==null||t.call(this),$(this,Qn,void 0))}setEventListener(t){var n;$(this,Eo,t),(n=O(this,Qn))==null||n.call(this),$(this,Qn,t(this.setOnline.bind(this)))}setOnline(t){O(this,Co)!==t&&($(this,Co,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return O(this,Co)}},Co=new WeakMap,Qn=new WeakMap,Eo=new WeakMap,jh),Bs=new ug;function Fi(){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 dg(e){return Math.min(1e3*2**e,3e4)}function Iu(e){return(e??"online")==="online"?Bs.isOnline():!0}var _u=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Di(e){return e instanceof _u}function Su(e){let t=!1,n=0,r=!1,o;const s=Fi(),a=h=>{var p;r||(y(new _u(h)),(p=e.abort)==null||p.call(e))},i=()=>{t=!0},c=()=>{t=!1},d=()=>ki.isFocused()&&(e.networkMode==="always"||Bs.isOnline())&&e.canRun(),f=()=>Iu(e.networkMode)&&e.canRun(),g=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))},C=()=>new Promise(h=>{var p;o=m=>{(r||d())&&h(m)},(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(m){h=Promise.reject(m)}Promise.resolve(h).then(g).catch(m=>{var _;if(r)return;const x=e.retry??(dr?0:3),E=e.retryDelay??dg,I=typeof E=="function"?E(n,m):E,v=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,m);if(t||!v){y(m);return}n++,(_=e.onFail)==null||_.call(e,n,m),ag(I).then(()=>d()?void 0:C()).then(()=>{t?y(m):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?b():C().then(b),s)}}function fg(){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 Ye=fg(),Au=(Ph=class{constructor(){se(this,Or)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ai(this.gcTime)&&$(this,Or,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(dr?1/0:5*60*1e3))}clearGcTimeout(){O(this,Or)&&(clearTimeout(O(this,Or)),$(this,Or,void 0))}},Or=new WeakMap,Ph),pg=(Bh=class extends Au{constructor(t){super();se(this,cn);se(this,vo);se(this,wo);se(this,Yt);se(this,kr);se(this,ft);se(this,Ss);se(this,Fr);$(this,Fr,!1),$(this,Ss,t.defaultOptions),this.setOptions(t.options),this.observers=[],$(this,kr,t.client),$(this,Yt,O(this,kr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$(this,vo,hg(this.options)),this.state=t.state??O(this,vo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,ft))==null?void 0:t.promise}setOptions(t){this.options={...O(this,Ss),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Yt).remove(this)}setData(t,n){const r=Oi(this.state.data,t,this.options);return he(this,cn,Pn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){he(this,cn,Pn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=O(this,ft))==null?void 0:r.promise;return(o=O(this,ft))==null||o.cancel(t),n?n.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,vo))}isActive(){return this.observers.some(t=>Ut(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||!yu(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,ft))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,ft))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,Yt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(O(this,ft)&&(O(this,Fr)?O(this,ft).cancel({revert:!0}):O(this,ft).cancelRetry()),this.scheduleGc()),O(this,Yt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,cn,Pn).call(this,{type:"invalidate"})}fetch(t,n){var c,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,ft))return O(this,ft).continueRetry(),O(this,ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(y=>y.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>($(this,Fr,!0),r.signal)})},s=()=>{const g=wu(this.options,n),y={client:O(this,kr),queryKey:this.queryKey,meta:this.meta};return o(y),$(this,Fr,!1),this.options.persister?this.options.persister(g,y,this):g(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,kr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),$(this,wo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&he(this,cn,Pn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=g=>{var y,C,b,h;Di(g)&&g.silent||he(this,cn,Pn).call(this,{type:"error",error:g}),Di(g)||((C=(y=O(this,Yt).config).onError)==null||C.call(y,g,this),(h=(b=O(this,Yt).config).onSettled)==null||h.call(b,this.state.data,g,this)),this.scheduleGc()};return $(this,ft,Su({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var y,C,b,h;if(g===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(p){i(p);return}(C=(y=O(this,Yt).config).onSuccess)==null||C.call(y,g,this),(h=(b=O(this,Yt).config).onSettled)==null||h.call(b,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,y)=>{he(this,cn,Pn).call(this,{type:"failed",failureCount:g,error:y})},onPause:()=>{he(this,cn,Pn).call(this,{type:"pause"})},onContinue:()=>{he(this,cn,Pn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),O(this,ft).start()}},vo=new WeakMap,wo=new WeakMap,Yt=new WeakMap,kr=new WeakMap,ft=new WeakMap,Ss=new WeakMap,Fr=new WeakMap,cn=new WeakSet,Pn=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,...Tu(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 Di(o)&&o.revert&&O(this,wo)?{...O(this,wo),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),Ye.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),O(this,Yt).notify({query:this,type:"updated",action:t})})},Bh);function Tu(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Iu(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hg(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 gg=(Vh=class extends ur{constructor(t={}){super();se(this,yn);this.config=t,$(this,yn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ti(o,n);let a=this.get(s);return a||(a=new pg({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){O(this,yn).has(t.queryHash)||(O(this,yn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=O(this,yn).get(t.queryHash);n&&(t.destroy(),n===t&&O(this,yn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ye.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,yn).get(t)}getAll(){return[...O(this,yn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>xu(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>xu(t,r)):n}notify(t){Ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ye.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ye.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},yn=new WeakMap,Vh),mg=(Gh=class extends Au{constructor(t){super();se(this,Cn);se(this,xn);se(this,mt);se(this,Dr);this.mutationId=t.mutationId,$(this,mt,t.mutationCache),$(this,xn,[]),this.state=t.state||Lu(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,xn).includes(t)||(O(this,xn).push(t),this.clearGcTimeout(),O(this,mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$(this,xn,O(this,xn).filter(n=>n!==t)),this.scheduleGc(),O(this,mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,xn).length||(this.state.status==="pending"?this.scheduleGc():O(this,mt).remove(this))}continue(){var t;return((t=O(this,Dr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,d,f,g,y,C,b,h,p,m,x,E,I,v,_,A;$(this,Dr,Su({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{he(this,Cn,lr).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{he(this,Cn,lr).call(this,{type:"pause"})},onContinue:()=>{he(this,Cn,lr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,mt).canRun(this)}));const n=this.state.status==="pending",r=!O(this,Dr).canStart();try{if(!n){he(this,Cn,lr).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=O(this,mt).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&&he(this,Cn,lr).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await O(this,Dr).start();return await((d=(c=O(this,mt).config).onSuccess)==null?void 0:d.call(c,S,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,S,t,this.state.context)),await((C=(y=O(this,mt).config).onSettled)==null?void 0:C.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)),he(this,Cn,lr).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(p=O(this,mt).config).onError)==null?void 0:m.call(p,S,t,this.state.context,this)),await((E=(x=this.options).onError)==null?void 0:E.call(x,S,t,this.state.context)),await((v=(I=O(this,mt).config).onSettled)==null?void 0:v.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{he(this,Cn,lr).call(this,{type:"error",error:S})}}finally{O(this,mt).runNext(this)}}},xn=new WeakMap,mt=new WeakMap,Dr=new WeakMap,Cn=new WeakSet,lr=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),Ye.batch(()=>{O(this,xn).forEach(r=>{r.onMutationUpdate(t)}),O(this,mt).notify({mutation:this,type:"updated",action:t})})},Gh);function Lu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bg=(Hh=class extends ur{constructor(t={}){super();se(this,kn);se(this,ln);se(this,As);this.config=t,$(this,kn,new Set),$(this,ln,new Map),$(this,As,0)}build(t,n,r){const o=new mg({mutationCache:this,mutationId:++wi(this,As)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){O(this,kn).add(t);const n=Vs(t);if(typeof n=="string"){const r=O(this,ln).get(n);r?r.push(t):O(this,ln).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,kn).delete(t)){const n=Vs(t);if(typeof n=="string"){const r=O(this,ln).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&O(this,ln).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Vs(t);if(typeof n=="string"){const r=O(this,ln).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=Vs(t);if(typeof n=="string"){const o=(r=O(this,ln).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(){Ye.batch(()=>{O(this,kn).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,kn).clear(),O(this,ln).clear()})}getAll(){return Array.from(O(this,kn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Cu(n,r))}findAll(t={}){return this.getAll().filter(n=>Cu(t,n))}notify(t){Ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ye.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zt))))}},kn=new WeakMap,ln=new WeakMap,As=new WeakMap,Hh);function Vs(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Gs(e){return{onFetch:(t,n)=>{var f,g,y,C,b;const r=t.options,o=(y=(g=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:g.fetchMore)==null?void 0:y.direction,s=((C=t.state.data)==null?void 0:C.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const d=async()=>{let h=!1;const p=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},m=wu(t.options,t.fetchOptions),x=async(E,I,v)=>{if(h)return Promise.reject();if(I==null&&E.pages.length)return Promise.resolve(E);const _={client:t.client,queryKey:t.queryKey,pageParam:I,direction:v?"backward":"forward",meta:t.options.meta};p(_);const A=await m(_),{maxPages:S}=t.options,L=v?cg:ig;return{pages:L(E.pages,A,S),pageParams:L(E.pageParams,I,S)}};if(o&&s.length){const E=o==="backward",I=E?Ou:Ni,v={pages:s,pageParams:a},_=I(r,v);i=await x(v,_,E)}else{const E=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:Ni(r,i);if(c>0&&I==null)break;i=await x(i,I),c++}while(c<E)}return i};t.options.persister?t.fetchFn=()=>{var h,p;return(p=(h=t.options).persister)==null?void 0:p.call(h,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function Ni(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 Ou(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}function yg(e,t){return t?Ni(e,t)!=null:!1}function xg(e,t){return!t||!e.getPreviousPageParam?!1:Ou(e,t)!=null}var Cg=(Wh=class{constructor(e={}){se(this,Qe);se(this,$n);se(this,Un);se(this,Io);se(this,_o);se(this,Kn);se(this,So);se(this,Ao);$(this,Qe,e.queryCache||new gg),$(this,$n,e.mutationCache||new bg),$(this,Un,e.defaultOptions||{}),$(this,Io,new Map),$(this,_o,new Map),$(this,Kn,0)}mount(){wi(this,Kn)._++,O(this,Kn)===1&&($(this,So,ki.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Qe).onFocus())})),$(this,Ao,Bs.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,Qe).onOnline())})))}unmount(){var e,t;wi(this,Kn)._--,O(this,Kn)===0&&((e=O(this,So))==null||e.call(this),$(this,So,void 0),(t=O(this,Ao))==null||t.call(this),$(this,Ao,void 0))}isFetching(e){return O(this,Qe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,$n).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,Qe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=O(this,Qe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Qr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return O(this,Qe).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=O(this,Qe).get(r.queryHash),s=o==null?void 0:o.state.data,a=sg(t,s);if(a!==void 0)return O(this,Qe).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ye.batch(()=>O(this,Qe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,Qe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=O(this,Qe);Ye.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=O(this,Qe);return Ye.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ye.batch(()=>O(this,Qe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Zt).catch(Zt)}invalidateQueries(e,t={}){return Ye.batch(()=>(O(this,Qe).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=Ye.batch(()=>O(this,Qe).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Zt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=O(this,Qe).build(this,t);return n.isStaleByTime(Qr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zt).catch(Zt)}fetchInfiniteQuery(e){return e.behavior=Gs(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zt).catch(Zt)}ensureInfiniteQueryData(e){return e.behavior=Gs(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Bs.isOnline()?O(this,$n).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,Qe)}getMutationCache(){return O(this,$n)}getDefaultOptions(){return O(this,Un)}setDefaultOptions(e){$(this,Un,e)}setQueryDefaults(e,t){O(this,Io).set(fr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,Io).values()],n={};return t.forEach(r=>{Wo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){O(this,_o).set(fr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,_o).values()],n={};return t.forEach(r=>{Wo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,Un).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ti(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:{...O(this,Un).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,Qe).clear(),O(this,$n).clear()}},Qe=new WeakMap,$n=new WeakMap,Un=new WeakMap,Io=new WeakMap,_o=new WeakMap,Kn=new WeakMap,So=new WeakMap,Ao=new WeakMap,Wh),Hs=(Zh=class extends ur{constructor(t,n){super();se(this,Me);se(this,St);se(this,Ae);se(this,Ts);se(this,bt);se(this,Nr);se(this,To);se(this,er);se(this,En);se(this,Ls);se(this,Lo);se(this,Oo);se(this,Rr);se(this,Mr);se(this,tr);se(this,ko,new Set);this.options=n,$(this,St,t),$(this,En,null),$(this,er,Fi()),this.options.experimental_prefetchInRender||O(this,er).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&&(O(this,Ae).addObserver(this),ku(O(this,Ae),this.options)?he(this,Me,Ns).call(this):this.updateResult(),he(this,Me,au).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ri(O(this,Ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ri(O(this,Ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,Me,iu).call(this),he(this,Me,cu).call(this),O(this,Ae).removeObserver(this)}setOptions(t,n){const r=this.options,o=O(this,Ae);if(this.options=O(this,St).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ut(this.options.enabled,O(this,Ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,Me,lu).call(this),O(this,Ae).setOptions(this.options),r._defaulted&&!js(this.options,r)&&O(this,St).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,Ae),observer:this});const s=this.hasListeners();s&&Fu(O(this,Ae),o,this.options,r)&&he(this,Me,Ns).call(this),this.updateResult(n),s&&(O(this,Ae)!==o||Ut(this.options.enabled,O(this,Ae))!==Ut(r.enabled,O(this,Ae))||Qr(this.options.staleTime,O(this,Ae))!==Qr(r.staleTime,O(this,Ae)))&&he(this,Me,ru).call(this);const a=he(this,Me,ou).call(this);s&&(O(this,Ae)!==o||Ut(this.options.enabled,O(this,Ae))!==Ut(r.enabled,O(this,Ae))||a!==O(this,tr))&&he(this,Me,su).call(this,a)}getOptimisticResult(t){const n=O(this,St).getQueryCache().build(O(this,St),t),r=this.createResult(n,t);return vg(this,r)&&($(this,bt,r),$(this,To,this.options),$(this,Nr,O(this,Ae).state)),r}getCurrentResult(){return O(this,bt)}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){O(this,ko).add(t)}getCurrentQuery(){return O(this,Ae)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=O(this,St).defaultQueryOptions(t),r=O(this,St).getQueryCache().build(O(this,St),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return he(this,Me,Ns).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,bt)))}createResult(t,n){var S;const r=O(this,Ae),o=this.options,s=O(this,bt),a=O(this,Nr),i=O(this,To),d=t!==r?t.state:O(this,Ts),{state:f}=t;let g={...f},y=!1,C;if(n._optimisticResults){const L=this.hasListeners(),N=!L&&ku(t,n),D=L&&Fu(t,r,n,o);(N||D)&&(g={...g,...Tu(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:h,status:p}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===O(this,Ls))C=O(this,Lo);else try{$(this,Ls,n.select),C=n.select(g.data),C=Oi(s==null?void 0:s.data,C,n),$(this,Lo,C),$(this,En,null)}catch(L){$(this,En,L)}else C=g.data;if(n.placeholderData!==void 0&&C===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=O(this,Oo))==null?void 0:S.state.data,O(this,Oo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),$(this,En,null)}catch(N){$(this,En,N)}L!==void 0&&(p="success",C=Oi(s==null?void 0:s.data,L,n),y=!0)}O(this,En)&&(b=O(this,En),C=O(this,Lo),h=Date.now(),p="error");const m=g.fetchStatus==="fetching",x=p==="pending",E=p==="error",I=x&&m,v=C!==void 0,A={status:p,fetchStatus:g.fetchStatus,isPending:x,isSuccess:p==="success",isError:E,isInitialLoading:I,isLoading:I,data:C,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:h,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>d.dataUpdateCount||g.errorUpdateCount>d.errorUpdateCount,isFetching:m,isRefetching:m&&!x,isLoadingError:E&&!v,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:E&&v,isStale:Mi(t,n),refetch:this.refetch,promise:O(this,er)};if(this.options.experimental_prefetchInRender){const L=F=>{A.status==="error"?F.reject(A.error):A.data!==void 0&&F.resolve(A.data)},N=()=>{const F=$(this,er,A.promise=Fi());L(F)},D=O(this,er);switch(D.status){case"pending":t.queryHash===r.queryHash&&L(D);break;case"fulfilled":(A.status==="error"||A.data!==D.value)&&N();break;case"rejected":(A.status!=="error"||A.error!==D.reason)&&N();break}}return A}updateResult(t){const n=O(this,bt),r=this.createResult(O(this,Ae),this.options);if($(this,Nr,O(this,Ae).state),$(this,To,this.options),O(this,Nr).data!==void 0&&$(this,Oo,O(this,Ae)),js(r,n))return;$(this,bt,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!O(this,ko).size)return!0;const c=new Set(i??O(this,ko));return this.options.throwOnError&&c.add("error"),Object.keys(O(this,bt)).some(d=>{const f=d;return O(this,bt)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),he(this,Me,ng).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,Me,au).call(this)}},St=new WeakMap,Ae=new WeakMap,Ts=new WeakMap,bt=new WeakMap,Nr=new WeakMap,To=new WeakMap,er=new WeakMap,En=new WeakMap,Ls=new WeakMap,Lo=new WeakMap,Oo=new WeakMap,Rr=new WeakMap,Mr=new WeakMap,tr=new WeakMap,ko=new WeakMap,Me=new WeakSet,Ns=function(t){he(this,Me,lu).call(this);let n=O(this,Ae).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zt)),n},ru=function(){he(this,Me,iu).call(this);const t=Qr(this.options.staleTime,O(this,Ae));if(dr||O(this,bt).isStale||!Ai(t))return;const r=yu(O(this,bt).dataUpdatedAt,t)+1;$(this,Rr,setTimeout(()=>{O(this,bt).isStale||this.updateResult()},r))},ou=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,Ae)):this.options.refetchInterval)??!1},su=function(t){he(this,Me,cu).call(this),$(this,tr,t),!(dr||Ut(this.options.enabled,O(this,Ae))===!1||!Ai(O(this,tr))||O(this,tr)===0)&&$(this,Mr,setInterval(()=>{(this.options.refetchIntervalInBackground||ki.isFocused())&&he(this,Me,Ns).call(this)},O(this,tr)))},au=function(){he(this,Me,ru).call(this),he(this,Me,su).call(this,he(this,Me,ou).call(this))},iu=function(){O(this,Rr)&&(clearTimeout(O(this,Rr)),$(this,Rr,void 0))},cu=function(){O(this,Mr)&&(clearInterval(O(this,Mr)),$(this,Mr,void 0))},lu=function(){const t=O(this,St).getQueryCache().build(O(this,St),this.options);if(t===O(this,Ae))return;const n=O(this,Ae);$(this,Ae,t),$(this,Ts,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ng=function(t){Ye.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(O(this,bt))}),O(this,St).getQueryCache().notify({query:O(this,Ae),type:"observerResultsUpdated"})})},Zh);function Eg(e,t){return Ut(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ku(e,t){return Eg(e,t)||e.state.data!==void 0&&Ri(e,t,t.refetchOnMount)}function Ri(e,t,n){if(Ut(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Mi(e,t)}return!1}function Fu(e,t,n,r){return(e!==t||Ut(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Mi(e,n)}function Mi(e,t){return Ut(t.enabled,e)!==!1&&e.isStaleByTime(Qr(t.staleTime,e))}function vg(e,t){return!js(e.getCurrentResult(),t)}function Du(e,t){return e.filter(n=>!t.includes(n))}function wg(e,t,n){const r=e.slice(0);return r[t]=n,r}var Ig=(zh=class extends ur{constructor(t,n,r){super();se(this,ct);se(this,jr);se(this,Jt);se(this,Fo);se(this,Do);se(this,qt);se(this,nr);se(this,Os);se(this,ks);se(this,Fs,[]);$(this,jr,t),$(this,Do,r),$(this,Fo,[]),$(this,qt,[]),$(this,Jt,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&O(this,qt).forEach(t=>{t.subscribe(n=>{he(this,ct,pu).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,O(this,qt).forEach(t=>{t.destroy()})}setQueries(t,n,r){if($(this,Fo,t),$(this,Do,n),process.env.NODE_ENV!=="production"){const o=t.map(s=>O(this,jr).defaultQueryOptions(s).queryHash);new Set(o).size!==o.length&&console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.")}Ye.batch(()=>{const o=O(this,qt),s=he(this,ct,fu).call(this,O(this,Fo));$(this,Fs,s),s.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions,r));const a=s.map(d=>d.observer),i=a.map(d=>d.getCurrentResult()),c=a.some((d,f)=>d!==o[f]);o.length===a.length&&!c||($(this,qt,a),$(this,Jt,i),this.hasListeners()&&(Du(o,a).forEach(d=>{d.destroy()}),Du(a,o).forEach(d=>{d.subscribe(f=>{he(this,ct,pu).call(this,d,f)})}),he(this,ct,hu).call(this)))})}getCurrentResult(){return O(this,Jt)}getQueries(){return O(this,qt).map(t=>t.getCurrentQuery())}getObservers(){return O(this,qt)}getOptimisticResult(t,n){const r=he(this,ct,fu).call(this,t),o=r.map(s=>s.observer.getOptimisticResult(s.defaultedQueryOptions));return[o,s=>he(this,ct,du).call(this,s??o,n),()=>he(this,ct,uu).call(this,o,r)]}},jr=new WeakMap,Jt=new WeakMap,Fo=new WeakMap,Do=new WeakMap,qt=new WeakMap,nr=new WeakMap,Os=new WeakMap,ks=new WeakMap,Fs=new WeakMap,ct=new WeakSet,uu=function(t,n){return n.map((r,o)=>{const s=t[o];return r.defaultedQueryOptions.notifyOnChangeProps?s:r.observer.trackResult(s,a=>{n.forEach(i=>{i.observer.trackProp(a)})})})},du=function(t,n){return n?((!O(this,nr)||O(this,Jt)!==O(this,ks)||n!==O(this,Os))&&($(this,Os,n),$(this,ks,O(this,Jt)),$(this,nr,Ms(O(this,nr),n(t)))),O(this,nr)):t},fu=function(t){const n=new Map(O(this,qt).map(o=>[o.options.queryHash,o])),r=[];return t.forEach(o=>{const s=O(this,jr).defaultQueryOptions(o),a=n.get(s.queryHash);a?r.push({defaultedQueryOptions:s,observer:a}):r.push({defaultedQueryOptions:s,observer:new Hs(O(this,jr),s)})}),r},pu=function(t,n){const r=O(this,qt).indexOf(t);r!==-1&&($(this,Jt,wg(O(this,Jt),r,n)),he(this,ct,hu).call(this))},hu=function(){var t;if(this.hasListeners()){const n=O(this,nr),r=he(this,ct,uu).call(this,O(this,Jt),O(this,Fs)),o=he(this,ct,du).call(this,r,(t=O(this,Do))==null?void 0:t.combine);n!==o&&Ye.batch(()=>{this.listeners.forEach(s=>{s(O(this,Jt))})})}},zh),_g=class extends Hs{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:Gs()},t)}getOptimisticResult(e){return e.behavior=Gs(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,h;const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:a,isRefetchError:i}=r,c=(h=(b=n.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:h.direction,d=a&&c==="forward",f=o&&c==="forward",g=a&&c==="backward",y=o&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:yg(t,n.data),hasPreviousPage:xg(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:i&&!d&&!g,isRefetching:s&&!f&&!y}}},Sg=(Xh=class extends ur{constructor(n,r){super();se(this,Dn);se(this,rr);se(this,or);se(this,At);se(this,Fn);$(this,rr,n),this.setOptions(r),this.bindMethods(),he(this,Dn,Ii).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=O(this,rr).defaultMutationOptions(n),js(this.options,r)||O(this,rr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:O(this,At),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&fr(r.mutationKey)!==fr(this.options.mutationKey)?this.reset():((o=O(this,At))==null?void 0:o.state.status)==="pending"&&O(this,At).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=O(this,At))==null||n.removeObserver(this)}onMutationUpdate(n){he(this,Dn,Ii).call(this),he(this,Dn,gu).call(this,n)}getCurrentResult(){return O(this,or)}reset(){var n;(n=O(this,At))==null||n.removeObserver(this),$(this,At,void 0),he(this,Dn,Ii).call(this),he(this,Dn,gu).call(this)}mutate(n,r){var o;return $(this,Fn,r),(o=O(this,At))==null||o.removeObserver(this),$(this,At,O(this,rr).getMutationCache().build(O(this,rr),this.options)),O(this,At).addObserver(this),O(this,At).execute(n)}},rr=new WeakMap,or=new WeakMap,At=new WeakMap,Fn=new WeakMap,Dn=new WeakSet,Ii=function(){var r;const n=((r=O(this,At))==null?void 0:r.state)??Lu();$(this,or,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},gu=function(n){Ye.batch(()=>{var r,o,s,a,i,c,d,f;if(O(this,Fn)&&this.hasListeners()){const g=O(this,or).variables,y=O(this,or).context;(n==null?void 0:n.type)==="success"?((o=(r=O(this,Fn)).onSuccess)==null||o.call(r,n.data,g,y),(a=(s=O(this,Fn)).onSettled)==null||a.call(s,n.data,null,g,y)):(n==null?void 0:n.type)==="error"&&((c=(i=O(this,Fn)).onError)==null||c.call(i,n.error,g,y),(f=(d=O(this,Fn)).onSettled)==null||f.call(d,void 0,n.error,g,y))}this.listeners.forEach(g=>{g(O(this,or))})})},Xh),Nu=T.createContext(void 0),un=e=>{const t=T.useContext(Nu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ag=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(Nu.Provider,{value:e,children:t})),Ru=T.createContext(!1),Mu=()=>T.useContext(Ru);Ru.Provider;function Tg(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Lg=T.createContext(Tg()),ju=()=>T.useContext(Lg);function Pu(e,t){return typeof e=="function"?e(...t):!!e}function Ws(){}var Bu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Vu=e=>{T.useEffect(()=>{e.clearReset()},[e])},Gu=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Pu(n,[e.error,r])),Hu=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)))},Wu=(e,t)=>e.isLoading&&e.isFetching&&!t,ji=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Zs=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Og({queries:e,...t},n){const r=un(),o=Mu(),s=ju(),a=T.useMemo(()=>e.map(h=>{const p=r.defaultQueryOptions(h);return p._optimisticResults=o?"isRestoring":"optimistic",p}),[e,r,o]);a.forEach(h=>{Hu(h),Bu(h,s)}),Vu(s);const[i]=T.useState(()=>new Ig(r,a,t)),[c,d,f]=i.getOptimisticResult(a,t.combine),g=!o&&t.subscribed!==!1;T.useSyncExternalStore(T.useCallback(h=>g?i.subscribe(Ye.batchCalls(h)):Ws,[i,g]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),T.useEffect(()=>{i.setQueries(a,t,{listeners:!1})},[a,t,i]);const C=c.some((h,p)=>ji(a[p],h))?c.flatMap((h,p)=>{const m=a[p];if(m){const x=new Hs(r,m);if(ji(m,h))return Zs(m,x,s);Wu(h,o)&&Zs(m,x,s)}return[]}):[];if(C.length>0)throw Promise.all(C);const b=c.find((h,p)=>{const m=a[p];return m&&Gu({result:h,errorResetBoundary:s,throwOnError:m.throwOnError,query:r.getQueryCache().get(m.queryHash),suspense:m.suspense})});if(b!=null&&b.error)throw b.error;return d(f())}function Zu(e,t,n){var g,y,C,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=un(),o=Mu(),s=ju(),a=r.defaultQueryOptions(e);(y=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||y.call(g,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",Hu(a),Bu(a,s),Vu(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),d=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(p=>{const m=f?c.subscribe(Ye.batchCalls(p)):Ws;return c.updateResult(),m},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),ji(a,d))throw Zs(a,c,s);if(Gu({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw d.error;if((b=(C=r.getDefaultOptions().queries)==null?void 0:C._experimental_afterQuery)==null||b.call(C,a,d),a.experimental_prefetchInRender&&!dr&&Wu(d,o)){const p=i?Zs(a,c,s):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;p==null||p.catch(Ws).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?d:c.trackResult(d)}function Ft(e,t){return Zu(e,Hs)}function Kt(e,t){const n=un(),[r]=T.useState(()=>new Sg(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Ye.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(Ws)},[r]);if(o.error&&Pu(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function kg(e,t){return Zu(e,_g)}const Pi=(e,t)=>t.some(n=>e instanceof n);let zu,Xu;function Fg(){return zu||(zu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Dg(){return Xu||(Xu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Bi=new WeakMap,Vi=new WeakMap,zs=new WeakMap;function Ng(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(pr(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return zs.set(t,e),t}function Rg(e){if(Bi.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)});Bi.set(e,t)}let Gi={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return pr(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 Yu(e){Gi=e(Gi)}function Mg(e){return Dg().includes(e)?function(...t){return e.apply(Hi(this),t),pr(this.request)}:function(...t){return pr(e.apply(Hi(this),t))}}function jg(e){return typeof e=="function"?Mg(e):(e instanceof IDBTransaction&&Rg(e),Pi(e,Fg())?new Proxy(e,Gi):e)}function pr(e){if(e instanceof IDBRequest)return Ng(e);if(Vi.has(e))return Vi.get(e);const t=jg(e);return t!==e&&(Vi.set(e,t),zs.set(t,e)),t}const Hi=e=>zs.get(e);function Pg(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=pr(a);return r&&a.addEventListener("upgradeneeded",c=>{r(pr(a.result),c.oldVersion,c.newVersion,pr(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",d=>o(d.oldVersion,d.newVersion,d))}).catch(()=>{}),i}const Bg=["get","getKey","getAll","getAllKeys","count"],Vg=["put","add","delete","clear"],Wi=new Map;function Ju(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Wi.get(t))return Wi.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Vg.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||Bg.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let d=c.store;return r&&(d=d.index(i.shift())),(await Promise.all([d[n](...i),o&&c.done]))[0]};return Wi.set(t,s),s}Yu(e=>({...e,get:(t,n,r)=>Ju(t,n)||e.get(t,n,r),has:(t,n)=>!!Ju(t,n)||e.has(t,n)}));const Gg=["continue","continuePrimaryKey","advance"],qu={},Zi=new WeakMap,Qu=new WeakMap,Hg={get(e,t){if(!Gg.includes(t))return e[t];let n=qu[t];return n||(n=qu[t]=function(...r){Zi.set(this,Qu.get(this)[t](...r))}),n}};async function*Wg(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,Hg);for(Qu.set(n,t),zs.set(n,Hi(t));t;)yield n,t=await(Zi.get(n)||t.continue()),Zi.delete(n)}function $u(e,t){return t===Symbol.asyncIterator&&Pi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Pi(e,[IDBIndex,IDBObjectStore])}Yu(e=>({...e,get(t,n,r){return $u(t,n)?Wg:e.get(t,n,r)},has(t,n){return $u(t,n)||e.has(t,n)}}));const Zg="connector-db",zg=1,Xs={FEEDBACK:"feedback"},Zo=`${Xs.FEEDBACK}:data`,Ys=`${Xs.FEEDBACK}:last_submitted`,zo=`${Xs.FEEDBACK}:capture_on_demand`,Xo=`${Xs.FEEDBACK}:show_notification`,Xg=12*60*60*1e3,zi=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=Xg:!0,Uu=(e,t=!1)=>e.captureFeedback&&(zi(e.firstViewed)&&(!e.lastSubmittedFeedback||zi(e.lastSubmittedFeedback))||!!t);let hr=null;const Bn=async()=>{try{hr||(hr=await Pg(Zg,zg,{upgrade(e){e.objectStoreNames.contains(Zo)||e.createObjectStore(Zo),e.objectStoreNames.contains(Ys)||e.createObjectStore(Ys),e.objectStoreNames.contains(zo)||e.createObjectStore(zo),e.objectStoreNames.contains(Xo)||e.createObjectStore(Xo)},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."),hr&&(hr.close(),hr=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),hr=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return hr},Xi=async e=>{if(!e)return[];const t=await Bn();if(!t)return[];try{return await t.get(Zo,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},Yg=async e=>{if(!e)return null;const t=await Bn();if(!t)return null;try{return await t.get(Ys,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Js=async e=>{if(!e)return;const t=await Bn();if(t)try{return await t.get(zo,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},Jg=async e=>{if(!e)return!1;const t=await Bn();if(!t)return!1;try{return await t.get(Xo,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},qg=async(e,t)=>{if(!e||!t||!t.length)return;const n=await Bn();if(n)try{const r=await Xi(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(Zo,a,e),await n.put(Xo,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},Qg=async e=>{if(!e)return;const t=await Bn();if(t)try{const n=await Xi(e),r=await Js(e),o=new Date,s=n.map(a=>{const i=Uu(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(Zo,s,e),await t.put(Ys,o,e),r&&await t.put(zo,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},Ku=async(e,t)=>{if(!e)return;const n=await Bn();if(n)try{await n.put(zo,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},$g=async e=>{if(!e)return;const t=await Bn();if(t)try{await t.put(Xo,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},Ug=async e=>{const t=await Xi(e),n=await Js(e);return t.filter(o=>Uu(o,n))},Yi=async e=>{const t=await Yg(e);return t&&!zi(t)?!1:await Js(e)&&!t?!0:!!(await Ug(e)).length},Kg=async(e,t)=>{await qg(e,t)},qs=async e=>{e&&await Qg(e)},em=async(e,t)=>{const n=await Js(e);t?n!==!1&&await Ku(e,t):await Ku(e,void 0)},ed=async e=>await Jg(e)&&await Yi(e),td=async e=>{await $g(e)};var Ji={},gr={};function nd(e,t){return function(){return e.apply(t,arguments)}}const{toString:tm}=Object.prototype,{getPrototypeOf:qi}=Object,Qs=(e=>t=>{const n=tm.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),en=e=>(e=e.toLowerCase(),t=>Qs(t)===e),$s=e=>t=>typeof t===e,{isArray:$r}=Array,Yo=$s("undefined");function nm(e){return e!==null&&!Yo(e)&&e.constructor!==null&&!Yo(e.constructor)&&Dt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const rd=en("ArrayBuffer");function rm(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&rd(e.buffer),t}const om=$s("string"),Dt=$s("function"),od=$s("number"),Us=e=>e!==null&&typeof e=="object",sm=e=>e===!0||e===!1,Ks=e=>{if(Qs(e)!=="object")return!1;const t=qi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},am=en("Date"),im=en("File"),cm=en("Blob"),lm=en("FileList"),um=e=>Us(e)&&Dt(e.pipe),dm=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Dt(e.append)&&((t=Qs(e))==="formdata"||t==="object"&&Dt(e.toString)&&e.toString()==="[object FormData]"))},fm=en("URLSearchParams"),[pm,hm,gm,mm]=["ReadableStream","Request","Response","Headers"].map(en),bm=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),$r(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 sd(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 mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ge,ad=e=>!Yo(e)&&e!==mr;function Qi(){const{caseless:e}=ad(this)&&this||{},t={},n=(r,o)=>{const s=e&&sd(t,o)||o;Ks(t[s])&&Ks(r)?t[s]=Qi(t[s],r):Ks(r)?t[s]=Qi({},r):$r(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Jo(arguments[r],n);return t}const ym=(e,t,n,{allOwnKeys:r}={})=>(Jo(t,(o,s)=>{n&&Dt(o)?e[s]=nd(o,n):e[s]=o},{allOwnKeys:r}),e),xm=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Cm=(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)},Em=(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&&qi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},vm=(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},wm=e=>{if(!e)return null;if($r(e))return e;let t=e.length;if(!od(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Im=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&qi(Uint8Array)),_m=(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])}},Sm=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Am=en("HTMLFormElement"),Tm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),id=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Lm=en("RegExp"),cd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Jo(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},Om=e=>{cd(e,(t,n)=>{if(Dt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Dt(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+"'")})}})},km=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return $r(e)?r(e):r(String(e).split(t)),n},Fm=()=>{},Dm=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,$i="abcdefghijklmnopqrstuvwxyz",ld="0123456789",ud={DIGIT:ld,ALPHA:$i,ALPHA_DIGIT:$i+$i.toUpperCase()+ld},Nm=(e=16,t=ud.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Rm(e){return!!(e&&Dt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Mm=e=>{const t=new Array(10),n=(r,o)=>{if(Us(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=$r(r)?[]:{};return Jo(r,(a,i)=>{const c=n(a,o+1);!Yo(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},jm=en("AsyncFunction"),Pm=e=>e&&(Us(e)||Dt(e))&&Dt(e.then)&&Dt(e.catch),dd=((e,t)=>e?setImmediate:t?((n,r)=>(mr.addEventListener("message",({source:o,data:s})=>{o===mr&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),mr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Dt(mr.postMessage)),Bm=typeof queueMicrotask<"u"?queueMicrotask.bind(mr):typeof process<"u"&&process.nextTick||dd;var P={isArray:$r,isArrayBuffer:rd,isBuffer:nm,isFormData:dm,isArrayBufferView:rm,isString:om,isNumber:od,isBoolean:sm,isObject:Us,isPlainObject:Ks,isReadableStream:pm,isRequest:hm,isResponse:gm,isHeaders:mm,isUndefined:Yo,isDate:am,isFile:im,isBlob:cm,isRegExp:Lm,isFunction:Dt,isStream:um,isURLSearchParams:fm,isTypedArray:Im,isFileList:lm,forEach:Jo,merge:Qi,extend:ym,trim:bm,stripBOM:xm,inherits:Cm,toFlatObject:Em,kindOf:Qs,kindOfTest:en,endsWith:vm,toArray:wm,forEachEntry:_m,matchAll:Sm,isHTMLForm:Am,hasOwnProperty:id,hasOwnProp:id,reduceDescriptors:cd,freezeMethods:Om,toObjectSet:km,toCamelCase:Tm,noop:Fm,toFiniteNumber:Dm,findKey:sd,global:mr,isContextDefined:ad,ALPHABET:ud,generateString:Nm,isSpecCompliantForm:Rm,toJSONObject:Mm,isAsyncFn:jm,isThenable:Pm,setImmediate:dd,asap:Bm};function Ce(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)}P.inherits(Ce,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:P.toJSONObject(this.config),code:this.code,status:this.status}}});const fd=Ce.prototype,pd={};["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=>{pd[e]={value:e}}),Object.defineProperties(Ce,pd),Object.defineProperty(fd,"isAxiosError",{value:!0}),Ce.from=(e,t,n,r,o,s)=>{const a=Object.create(fd);return P.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),Ce.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var Vm=null;function Ui(e){return P.isPlainObject(e)||P.isArray(e)}function hd(e){return P.endsWith(e,"[]")?e.slice(0,-2):e}function gd(e,t,n){return e?e.concat(t).map(function(o,s){return o=hd(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Gm(e){return P.isArray(e)&&!e.some(Ui)}const Hm=P.toFlatObject(P,{},null,function(t){return/^is[A-Z]/.test(t)});function ea(e,t,n){if(!P.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=P.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,p){return!P.isUndefined(p[h])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(t);if(!P.isFunction(o))throw new TypeError("visitor must be a function");function d(b){if(b===null)return"";if(P.isDate(b))return b.toISOString();if(!c&&P.isBlob(b))throw new Ce("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(b)||P.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,h,p){let m=b;if(b&&!p&&typeof b=="object"){if(P.endsWith(h,"{}"))h=r?h:h.slice(0,-2),b=JSON.stringify(b);else if(P.isArray(b)&&Gm(b)||(P.isFileList(b)||P.endsWith(h,"[]"))&&(m=P.toArray(b)))return h=hd(h),m.forEach(function(E,I){!(P.isUndefined(E)||E===null)&&t.append(a===!0?gd([h],I,s):a===null?h:h+"[]",d(E))}),!1}return Ui(b)?!0:(t.append(gd(p,h,s),d(b)),!1)}const g=[],y=Object.assign(Hm,{defaultVisitor:f,convertValue:d,isVisitable:Ui});function C(b,h){if(!P.isUndefined(b)){if(g.indexOf(b)!==-1)throw Error("Circular reference detected in "+h.join("."));g.push(b),P.forEach(b,function(m,x){(!(P.isUndefined(m)||m===null)&&o.call(t,m,P.isString(x)?x.trim():x,h,y))===!0&&C(m,h?h.concat(x):[x])}),g.pop()}}if(!P.isObject(e))throw new TypeError("data must be an object");return C(e),t}function md(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ki(e,t){this._pairs=[],e&&ea(e,this,t)}const bd=Ki.prototype;bd.append=function(t,n){this._pairs.push([t,n])},bd.toString=function(t){const n=t?function(r){return t.call(this,r,md)}:md;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Wm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function yd(e,t,n){if(!t)return e;const r=n&&n.encode||Wm,o=n&&n.serialize;let s;if(o?s=o(t,n):s=P.isURLSearchParams(t)?t.toString():new Ki(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Zm{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){P.forEach(this.handlers,function(r){r!==null&&t(r)})}}var xd=Zm,Cd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zm=typeof URLSearchParams<"u"?URLSearchParams:Ki,Xm=typeof FormData<"u"?FormData:null,Ym=typeof Blob<"u"?Blob:null,Jm={isBrowser:!0,classes:{URLSearchParams:zm,FormData:Xm,Blob:Ym},protocols:["http","https","file","blob","url","data"]};const ec=typeof window<"u"&&typeof document<"u",tc=typeof navigator=="object"&&navigator||void 0,qm=ec&&(!tc||["ReactNative","NativeScript","NS"].indexOf(tc.product)<0),Qm=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$m=ec&&window.location.href||"http://localhost";var Um=Object.freeze({__proto__:null,hasBrowserEnv:ec,hasStandardBrowserWebWorkerEnv:Qm,hasStandardBrowserEnv:qm,navigator:tc,origin:$m}),xt={...Um,...Jm};function Km(e,t){return ea(e,new xt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return xt.isNode&&P.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function e3(e){return P.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function t3(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 Ed(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&&P.isArray(o)?o.length:a,c?(P.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!P.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&P.isArray(o[a])&&(o[a]=t3(o[a])),!i)}if(P.isFormData(e)&&P.isFunction(e.entries)){const n={};return P.forEachEntry(e,(r,o)=>{t(e3(r),o,n,0)}),n}return null}function n3(e,t,n){if(P.isString(e))try{return(t||JSON.parse)(e),P.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const nc={transitional:Cd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=P.isObject(t);if(s&&P.isHTMLForm(t)&&(t=new FormData(t)),P.isFormData(t))return o?JSON.stringify(Ed(t)):t;if(P.isArrayBuffer(t)||P.isBuffer(t)||P.isStream(t)||P.isFile(t)||P.isBlob(t)||P.isReadableStream(t))return t;if(P.isArrayBufferView(t))return t.buffer;if(P.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 Km(t,this.formSerializer).toString();if((i=P.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ea(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),n3(t)):t}],transformResponse:[function(t){const n=this.transitional||nc.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(P.isResponse(t)||P.isReadableStream(t))return t;if(t&&P.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"?Ce.from(i,Ce.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:xt.classes.FormData,Blob:xt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],e=>{nc.headers[e]={}});var rc=nc;const r3=P.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 o3=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]&&r3[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const vd=Symbol("internals");function qo(e){return e&&String(e).trim().toLowerCase()}function ta(e){return e===!1||e==null?e:P.isArray(e)?e.map(ta):String(e)}function s3(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 a3=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function oc(e,t,n,r,o){if(P.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!P.isString(t)){if(P.isString(r))return t.indexOf(r)!==-1;if(P.isRegExp(r))return r.test(t)}}function i3(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function c3(e,t){const n=P.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 na{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,d){const f=qo(c);if(!f)throw new Error("header name must be a non-empty string");const g=P.findKey(o,f);(!g||o[g]===void 0||d===!0||d===void 0&&o[g]!==!1)&&(o[g||c]=ta(i))}const a=(i,c)=>P.forEach(i,(d,f)=>s(d,f,c));if(P.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(P.isString(t)&&(t=t.trim())&&!a3(t))a(o3(t),n);else if(P.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=qo(t),t){const r=P.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return s3(o);if(P.isFunction(n))return n.call(this,o,r);if(P.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qo(t),t){const r=P.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||oc(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=qo(a),a){const i=P.findKey(r,a);i&&(!n||oc(r,r[i],i,n))&&(delete r[i],o=!0)}}return P.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||oc(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return P.forEach(this,(o,s)=>{const a=P.findKey(r,s);if(a){n[a]=ta(o),delete n[s];return}const i=t?i3(s):String(s).trim();i!==s&&delete n[s],n[i]=ta(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return P.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&P.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[vd]=this[vd]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=qo(a);r[i]||(c3(o,a),r[i]=!0)}return P.isArray(t)?t.forEach(s):s(t),this}}na.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),P.reduceDescriptors(na.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),P.freezeMethods(na);var tn=na;function sc(e,t){const n=this||rc,r=t||n,o=tn.from(r.headers);let s=r.data;return P.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function wd(e){return!!(e&&e.__CANCEL__)}function Ur(e,t,n){Ce.call(this,e??"canceled",Ce.ERR_CANCELED,t,n),this.name="CanceledError"}P.inherits(Ur,Ce,{__CANCEL__:!0});function Id(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ce("Request failed with status code "+n.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function l3(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function u3(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 d=Date.now(),f=r[s];a||(a=d),n[o]=c,r[o]=d;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),d-a<t)return;const C=f&&d-f;return C?Math.round(y*1e3/C):void 0}}function d3(e,t){let n=0,r=1e3/t,o,s;const a=(d,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,d)};return[(...d)=>{const f=Date.now(),g=f-n;g>=r?a(d,f):(o=d,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const ra=(e,t,n=3)=>{let r=0;const o=u3(50,250);return d3(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,d=o(c),f=a<=i;r=a;const g={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:d||void 0,estimated:d&&i&&f?(i-a)/d:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},_d=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Sd=e=>(...t)=>P.asap(()=>e(...t));var f3=xt.hasStandardBrowserEnv?function(){const t=xt.navigator&&/(msie|trident)/i.test(xt.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=P.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),p3=xt.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];P.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),P.isString(r)&&a.push("path="+r),P.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 h3(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function g3(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ad(e,t){return e&&!h3(t)?g3(e,t):t}const Td=e=>e instanceof tn?{...e}:e;function br(e,t){t=t||{};const n={};function r(d,f,g){return P.isPlainObject(d)&&P.isPlainObject(f)?P.merge.call({caseless:g},d,f):P.isPlainObject(f)?P.merge({},f):P.isArray(f)?f.slice():f}function o(d,f,g){if(P.isUndefined(f)){if(!P.isUndefined(d))return r(void 0,d,g)}else return r(d,f,g)}function s(d,f){if(!P.isUndefined(f))return r(void 0,f)}function a(d,f){if(P.isUndefined(f)){if(!P.isUndefined(d))return r(void 0,d)}else return r(void 0,f)}function i(d,f,g){if(g in t)return r(d,f);if(g in e)return r(void 0,d)}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:(d,f)=>o(Td(d),Td(f),!0)};return P.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=c[f]||o,y=g(e[f],t[f],f);P.isUndefined(y)&&g!==i||(n[f]=y)}),n}var Ld=e=>{const t=br({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=tn.from(a),t.url=yd(Ad(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(P.isFormData(n)){if(xt.hasStandardBrowserEnv||xt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[d,...f]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...f].join("; "))}}if(xt.hasStandardBrowserEnv&&(r&&P.isFunction(r)&&(r=r(t)),r||r!==!1&&f3(t.url))){const d=o&&s&&p3.read(s);d&&a.set(o,d)}return t},m3=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=Ld(e);let s=o.data;const a=tn.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:d}=o,f,g,y,C,b;function h(){C&&C(),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 m(){if(!p)return;const E=tn.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),v={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:E,config:e,request:p};Id(function(A){n(A),h()},function(A){r(A),h()},v),p=null}"onloadend"in p?p.onloadend=m:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(m)},p.onabort=function(){p&&(r(new Ce("Request aborted",Ce.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new Ce("Network Error",Ce.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const v=o.transitional||Cd;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new Ce(I,v.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,e,p)),p=null},s===void 0&&a.setContentType(null),"setRequestHeader"in p&&P.forEach(a.toJSON(),function(I,v){p.setRequestHeader(v,I)}),P.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),d&&([y,b]=ra(d,!0),p.addEventListener("progress",y)),c&&p.upload&&([g,C]=ra(c),p.upload.addEventListener("progress",g),p.upload.addEventListener("loadend",C)),(o.cancelToken||o.signal)&&(f=E=>{p&&(r(!E||E.type?new Ur(null,e,p):E),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=l3(o.url);if(x&&xt.protocols.indexOf(x)===-1){r(new Ce("Unsupported protocol "+x+":",Ce.ERR_BAD_REQUEST,e));return}p.send(s||null)})},b3=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(d){if(!o){o=!0,i();const f=d instanceof Error?d:this.reason;r.abort(f instanceof Ce?f:new Ur(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new Ce(`timeout ${t} of ms exceeded`,Ce.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>P.asap(i),c}};const y3=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},x3=async function*(e,t){for await(const n of C3(e))yield*y3(n,t)},C3=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()}},Od=(e,t,n,r)=>{const o=x3(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:d,value:f}=await o.next();if(d){i(),c.close();return}let g=f.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(f))}catch(d){throw i(d),d}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},oa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kd=oa&&typeof ReadableStream=="function",E3=oa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},v3=kd&&Fd(()=>{let e=!1;const t=new Request(xt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Dd=64*1024,ac=kd&&Fd(()=>P.isReadableStream(new Response("").body)),sa={stream:ac&&(e=>e.body)};oa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!sa[t]&&(sa[t]=P.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ce(`Response type '${t}' is not supported`,Ce.ERR_NOT_SUPPORT,r)})})})(new Response);const w3=async e=>{if(e==null)return 0;if(P.isBlob(e))return e.size;if(P.isSpecCompliantForm(e))return(await new Request(xt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(P.isArrayBufferView(e)||P.isArrayBuffer(e))return e.byteLength;if(P.isURLSearchParams(e)&&(e=e+""),P.isString(e))return(await E3(e)).byteLength},I3=async(e,t)=>{const n=P.toFiniteNumber(e.getContentLength());return n??w3(t)};var _3=oa&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:d,headers:f,withCredentials:g="same-origin",fetchOptions:y}=Ld(e);d=d?(d+"").toLowerCase():"text";let C=b3([o,s&&s.toAbortSignal()],a),b;const h=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let p;try{if(c&&v3&&n!=="get"&&n!=="head"&&(p=await I3(f,r))!==0){let v=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(P.isFormData(r)&&(_=v.headers.get("content-type"))&&f.setContentType(_),v.body){const[A,S]=_d(p,ra(Sd(c)));r=Od(v.body,Dd,A,S)}}P.isString(g)||(g=g?"include":"omit");const m="credentials"in Request.prototype;b=new Request(t,{...y,signal:C,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:m?g:void 0});let x=await fetch(b);const E=ac&&(d==="stream"||d==="response");if(ac&&(i||E&&h)){const v={};["status","statusText","headers"].forEach(L=>{v[L]=x[L]});const _=P.toFiniteNumber(x.headers.get("content-length")),[A,S]=i&&_d(_,ra(Sd(i),!0))||[];x=new Response(Od(x.body,Dd,A,()=>{S&&S(),h&&h()}),v)}d=d||"text";let I=await sa[P.findKey(sa,d)||"text"](x,e);return!E&&h&&h(),await new Promise((v,_)=>{Id(v,_,{data:I,headers:tn.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:b})})}catch(m){throw h&&h(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,e,b),{cause:m.cause||m}):Ce.from(m,m&&m.code,e,b)}});const ic={http:Vm,xhr:m3,fetch:_3};P.forEach(ic,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Nd=e=>`- ${e}`,S3=e=>P.isFunction(e)||e===null||e===!1;var Rd={getAdapter:e=>{e=P.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,!S3(n)&&(r=ic[(a=String(n)).toLowerCase()],r===void 0))throw new Ce(`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(Nd).join(`
|
|
34
|
-
`):" "+Nd(s[0]):"as no adapter specified";throw new
|
|
35
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Cr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&uc.assertOptions(r,{silentJSONParsing:Hn.transitional(Hn.boolean),forcedJSONParsing:Hn.transitional(Hn.boolean),clarifyTimeoutError:Hn.transitional(Hn.boolean)},!1),o!=null&&(P.isFunction(o)?n.paramsSerializer={serialize:o}:uc.assertOptions(o,{encode:Hn.function,serialize:Hn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&P.merge(s.common,s[n.method]);s&&P.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=tn.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 d=[];this.interceptors.response.forEach(function(h){d.push(h.fulfilled,h.rejected)});let f,g=0,y;if(!c){const b=[Md.bind(this),void 0];for(b.unshift.apply(b,i),b.push.apply(b,d),y=b.length,f=Promise.resolve(n);g<y;)f=f.then(b[g++],b[g++]);return f}y=i.length;let C=n;for(g=0;g<y;){const b=i[g++],h=i[g++];try{C=b(C)}catch(p){h.call(this,p);break}}try{f=Md.call(this,C)}catch(b){return Promise.reject(b)}for(g=0,y=d.length;g<y;)f=f.then(d[g++],d[g++]);return f}getUri(t){t=Cr(this.defaults,t);const n=Ad(t.baseURL,t.url);return yd(n,t.params,t.paramsSerializer)}};P.forEach(["delete","get","head","options"],function(t){sa.prototype[t]=function(n,r){return this.request(Cr(r||{},{method:t,url:n,data:(r||{}).data}))}}),P.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(Cr(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}sa.prototype[t]=n(),sa.prototype[t+"Form"]=n(!0)});var aa=sa;class dc{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 Ur(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 dc(function(o){t=o}),cancel:t}}}var A3=dc;function T3(e){return function(n){return e.apply(null,n)}}function L3(e){return P.isObject(e)&&e.isAxiosError===!0}const fc={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(fc).forEach(([e,t])=>{fc[t]=e});var O3=fc;function Bd(e){const t=new aa(e),n=nd(aa.prototype.request,t);return P.extend(n,aa.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Bd(Cr(e,o))},n}const Ke=Bd(rc);Ke.Axios=aa,Ke.CanceledError=Ur,Ke.CancelToken=A3,Ke.isCancel=wd,Ke.VERSION=jd,Ke.toFormData=Ks,Ke.AxiosError=xe,Ke.Cancel=Ke.CanceledError,Ke.all=function(t){return Promise.all(t)},Ke.spread=T3,Ke.isAxiosError=L3,Ke.mergeConfig=Cr,Ke.AxiosHeaders=tn,Ke.formToJSON=e=>Ed(P.isHTMLForm(e)?new FormData(e):e),Ke.getAdapter=Rd.getAdapter,Ke.HttpStatusCode=O3,Ke.default=Ke;var Vd=Ke,Oe={},Wn={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PLATFORM=e.TENANT_PLATFORM=e.API_CALL_ORIGIN=e.TIERS=e.APP_UI=e.CONFIG_HIVER=e.DEFAULT_INIT_CONFIG_HIVER=e.TWO_MINUTES_IN_MS=e.REFETCH_CHECK_DELAY=e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=e.INITIAL_RETRY_DELAY=e.MAX_BACKOFF_LIMIT=e.MAX_CONFLICT_RETRY_DELAY=e.MAX_RETRY_DELAY=e.GET_METHOD=void 0,e.GET_METHOD="GET",e.MAX_RETRY_DELAY=18e4,e.MAX_CONFLICT_RETRY_DELAY=63e3,e.MAX_BACKOFF_LIMIT=8e3,e.INITIAL_RETRY_DELAY=1e3,e.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY=3e3,e.REFETCH_CHECK_DELAY=168e4,e.TWO_MINUTES_IN_MS=2*60*1e3,e.DEFAULT_INIT_CONFIG_HIVER={getToken:!0,isHiverApiDomain:!0,fetchCsrfToken:function(){return""}},e.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},e.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},e.TIERS={DEV:"dev",SIT:"sit",QA:"qa",PRODUCTION:"production",PROD:"prod"},e.API_CALL_ORIGIN={API_RETRY:"Api Retry"},e.TENANT_PLATFORM={GMAIL:"GMAIL",HIVERWEB:"HIVERWEB"},function(t){t[t.WEB=0]="WEB",t[t.MOBILE=1]="MOBILE"}(e.PLATFORM||(e.PLATFORM={}))})(Wn);var Et={};Object.defineProperty(Et,"__esModule",{value:!0}),Et.getProdHqConfig=Et.getProdApiConfig=Et.getSitHqConfig=Et.getSitApiConfig=Et.getDevHqConfig=Et.getDevApiConfig=void 0;var Kr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},k3=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Kr}};Et.getDevApiConfig=k3;var F3=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Kr}};Et.getDevHqConfig=F3;var D3=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:Kr}};Et.getSitApiConfig=D3;var N3=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:Kr}};Et.getSitHqConfig=N3;var R3=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Kr}};Et.getProdApiConfig=R3;var M3=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Kr}};Et.getProdHqConfig=M3;var fn={},pn={};Object.defineProperty(pn,"__esModule",{value:!0}),pn.removeValue=pn.getValue=pn.setValue=void 0;var pc={};function j3(e,t){pc[e]=t}pn.setValue=j3;function P3(e){return pc[e]}pn.getValue=P3;function B3(e){delete pc[e]}pn.removeValue=B3,Object.defineProperty(fn,"__esModule",{value:!0}),fn.removeItemFromStorage=fn.setItemInStorage=fn.getItemFromStorage=void 0;var eo=Wn,to=pn,V3=function(e,t){switch(t===void 0&&(t=(0,to.getValue)("PLATFORM")),t){case eo.PLATFORM.WEB:return sessionStorage.getItem(e);case eo.PLATFORM.MOBILE:return(0,to.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};fn.getItemFromStorage=V3;var G3=function(e,t,n){switch(n===void 0&&(n=(0,to.getValue)("PLATFORM")),n){case eo.PLATFORM.WEB:return sessionStorage.setItem(e,t);case eo.PLATFORM.MOBILE:return(0,to.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};fn.setItemInStorage=G3;var H3=function(e,t){switch(t===void 0&&(t=(0,to.getValue)("PLATFORM")),t){case eo.PLATFORM.WEB:sessionStorage.removeItem(e);break;case eo.PLATFORM.MOBILE:(0,to.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};fn.removeItemFromStorage=H3;var W3=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{d(r.next(f))}catch(g){a(g)}}function c(f){try{d(r.throw(f))}catch(g){a(g)}}function d(f){f.done?s(f.value):o(f.value).then(i,c)}d((r=r.apply(e,t||[])).next())})},Z3=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(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],o=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.expireToken=Oe.invalidateToken=Oe.validateToken=Oe.validateAccount=Oe.getConfig=Oe.introduceDelay=Oe.isTokenInExpiryWindow=Oe.getStoredAuthData=Oe.setUserDetails=Oe.getRefreshInterval=Oe.setTokenAndExpiry=Oe.getRandomDelay=Oe.hasValidToken=void 0;var _n=Wn,no=Et,Ft=fn,hc=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},gc=function(e){var t=parseInt((0,Ft.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,Ft.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Oe.validateAccount=gc;var z3=function(e){var t=gc(e);return!Gd()&&t};Oe.validateToken=z3;var X3=function(e){return e.apiRetry?e.apiRetry>0:!1};Oe.invalidateToken=X3;var Y3=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Oe.expireToken=Y3;var J3=function(e){var t=(0,Ft.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=hc(),o=gc(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Oe.hasValidToken=J3;var q3=function(){return Math.floor(Math.random()*6e4)+6e4};Oe.getRandomDelay=q3;var Q3=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,Ft.setItemInStorage)("hiverAuthUserId",e),(0,Ft.setItemInStorage)("hiverAuthUserGroupId",t)};Oe.setUserDetails=Q3;var $3=function(e,t){if(!e)throw new Error("Token not found in the response");(0,Ft.setItemInStorage)("hiverAuthToken",e),(0,Ft.setItemInStorage)("hiverAuthTokenExpiry",t)};Oe.setTokenAndExpiry=$3;var U3=function(){var e=(0,Ft.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,Ft.getItemFromStorage)("hiverAuthToken"),n=(0,Ft.getItemFromStorage)("hiverAuthUserId"),r=(0,Ft.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Oe.getStoredAuthData=U3;var Gd=function(){var e=(0,Ft.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=hc(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Oe.isTokenInExpiryWindow=Gd;var K3=function(e){return W3(void 0,void 0,void 0,function(){return Z3(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Oe.introduceDelay=K3;var eb=function(e,t,n){switch(n===void 0&&(n=!0),t){case _n.TIERS.SIT:case _n.TIERS.QA:return n?(0,no.getSitApiConfig)(e):(0,no.getSitHqConfig)(e);case _n.TIERS.PRODUCTION:case _n.TIERS.PROD:return n?(0,no.getProdApiConfig)():(0,no.getProdHqConfig)();case _n.TIERS.DEV:default:return n?(0,no.getDevApiConfig)():(0,no.getDevHqConfig)()}};Oe.getConfig=eb;var tb=function(){try{var e=(0,Ft.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return _n.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=hc();return t.getTime()-n.getTime()>_n.TWO_MINUTES_IN_MS?t.getTime()-_n.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),_n.REFETCH_CHECK_DELAY}};Oe.getRefreshInterval=tb;var qo={},nn={},Hd;function Wd(){if(Hd)return nn;Hd=1;var e=ge&&ge.__awaiter||function(b,h,p,m){function x(E){return E instanceof p?E:new p(function(I){I(E)})}return new(p||(p=Promise))(function(E,I){function v(S){try{A(m.next(S))}catch(L){I(L)}}function _(S){try{A(m.throw(S))}catch(L){I(L)}}function A(S){S.done?E(S.value):x(S.value).then(v,_)}A((m=m.apply(b,h||[])).next())})},t=ge&&ge.__generator||function(b,h){var p={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},m,x,E,I;return I={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function v(A){return function(S){return _([A,S])}}function _(A){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(p=0)),p;)try{if(m=1,x&&(E=A[0]&2?x.return:A[0]?x.throw||((E=x.return)&&E.call(x),0):x.next)&&!(E=E.call(x,A[1])).done)return E;switch(x=0,E&&(A=[A[0]&2,E.value]),A[0]){case 0:case 1:E=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,x=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(E=p.trys,!(E=E.length>0&&E[E.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!E||A[1]>E[0]&&A[1]<E[3])){p.label=A[1];break}if(A[0]===6&&p.label<E[1]){p.label=E[1],E=A;break}if(E&&p.label<E[2]){p.label=E[2],p.ops.push(A);break}E[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(b,p)}catch(S){A=[6,S],x=0}finally{m=E=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(nn,"__esModule",{value:!0}),nn.logoutFromHeimdall=nn.getTenantLoginCode=nn.getLoginToken=nn.getAccessToken=void 0;var n=Wn,r=Jd(),o=Oe,s=function(b,h,p,m){var x=(0,o.getStoredAuthData)(),E=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":E},data:{user_id:h.userId,usergroup_id:h.usergroupId,access_token:(x==null?void 0:x.token)||"",source:m}}},a=function(b,h,p,m,x){var E=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":E,"x-hiver-userid":m,"x-hiver-usergroupid":x}}},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)},d=function(b,h,p,m){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:m||n.APP_UI.DEFAULT}}},f=function(b,h,p,m,x){return e(void 0,void 0,void 0,function(){var E,I,v,_,A,S,L;return t(this,function(N){switch(N.label){case 0:console.log("GETTOKEN tenantPlatform -> ",m),N.label=1;case 1:return N.trys.push([1,5,,6]),!(0,o.validateToken)(p)||(0,o.invalidateToken)(p)?(console.log("HEIMDALL: No valid token, fetching token"),E=s(h,p,m,x),[4,(0,r.performAxiosCall)(E)]):[3,3];case 2:return I=N.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 v=N.sent(),v;case 6:return[2]}})})};nn.getAccessToken=f;var g=function(b,h,p,m,x,E){return e(void 0,void 0,void 0,function(){var I,v,_,A,S,L,N;return t(this,function(D){switch(D.label){case 0:I=a(b,p,m,x,E),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return v=D.sent(),[2,{userId:(A=v==null?void 0:v.data)===null||A===void 0?void 0:A.user_id,userGroupId:(S=v==null?void 0:v.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=v==null?void 0:v.data.at)===null||L===void 0?void 0:L.token,expiryTime:(N=v==null?void 0:v.data.at)===null||N===void 0?void 0:N.expires_at}];case 3:throw _=D.sent(),_;case 4:return[2]}})})};nn.getLoginToken=g;var y=function(b,h,p,m,x){return e(void 0,void 0,void 0,function(){var E,I,v;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",x),E=d(h,p,m,x),[4,(0,r.performAxiosCall)(E)];case 1:return I=_.sent(),[2,I==null?void 0:I.data.code];case 2:throw v=_.sent(),v;case 3:return[2]}})})};nn.getTenantLoginCode=y;var C=function(b,h,p){return p===void 0&&(p=0),e(void 0,void 0,void 0,function(){var m,x,E;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),m=i(b,h),[4,(0,r.performAxiosCall)(m)];case 1:return x=I.sent(),[2,x==null?void 0:x.status];case 2:return E=I.sent(),p<2?[4,C(b,h,p+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw E;case 5:return[2]}})})};return nn.logoutFromHeimdall=C,nn}var ia={},nb=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{d(r.next(f))}catch(g){a(g)}}function c(f){try{d(r.throw(f))}catch(g){a(g)}}function d(f){f.done?s(f.value):o(f.value).then(i,c)}d((r=r.apply(e,t||[])).next())})},rb=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(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],o=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(ia,"__esModule",{value:!0}),ia.subscribeToOnlineEvent=void 0;var Zd=Wn,ob=pn,sb=function(e,t){switch(t===void 0&&(t=(0,ob.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Zd.PLATFORM.WEB:return window.addEventListener("online",function(){return nb(void 0,void 0,void 0,function(){return rb(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 Zd.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};ia.subscribeToOnlineEvent=sb;var zd;function Xd(){if(zd)return qo;zd=1;var e=ge&&ge.__awaiter||function(b,h,p,m){function x(E){return E instanceof p?E:new p(function(I){I(E)})}return new(p||(p=Promise))(function(E,I){function v(S){try{A(m.next(S))}catch(L){I(L)}}function _(S){try{A(m.throw(S))}catch(L){I(L)}}function A(S){S.done?E(S.value):x(S.value).then(v,_)}A((m=m.apply(b,h||[])).next())})},t=ge&&ge.__generator||function(b,h){var p={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},m,x,E,I;return I={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function v(A){return function(S){return _([A,S])}}function _(A){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(p=0)),p;)try{if(m=1,x&&(E=A[0]&2?x.return:A[0]?x.throw||((E=x.return)&&E.call(x),0):x.next)&&!(E=E.call(x,A[1])).done)return E;switch(x=0,E&&(A=[A[0]&2,E.value]),A[0]){case 0:case 1:E=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,x=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(E=p.trys,!(E=E.length>0&&E[E.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!E||A[1]>E[0]&&A[1]<E[3])){p.label=A[1];break}if(A[0]===6&&p.label<E[1]){p.label=E[1],E=A;break}if(E&&p.label<E[2]){p.label=E[2],p.ops.push(A);break}E[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(b,p)}catch(S){A=[6,S],x=0}finally{m=E=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(qo,"__esModule",{value:!0}),qo.fetchAccessToken=void 0;var n=Wd(),r=Wn,o=Oe,s=ia,a,i,c,d=function(b,h,p,m,x,E){return E===void 0&&(E=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,v,_,A,S,L,N,D,F;return t(this,function(M){switch(M.label){case 0:I=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",E,m),v=void 0,x?[4,x()]:[3,3];case 2:return v=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,h,m,E)];case 4:v=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(v,r.CONFIG_HIVER,b,m,h.userId,h.usergroupId)];case 6:return _=M.sent(),A=_.userId,S=_.userGroupId,L=_.atToken,N=_.expiryTime,(0,o.setTokenAndExpiry)(L,N),(0,o.setUserDetails)(A,S),[3,12];case 7:D=M.sent(),console.log("ERROR debug: in error login:",D,E),F=p,M.label=8;case 8:return F<I?[4,d(b,h,F+1,m,x,E)]:[3,11];case 9:M.sent(),M.label=10;case 10:return F++,[3,8];case 11:throw D;case 12:return[2]}})})},f=function(b,h,p,m,x){return e(void 0,void 0,void 0,function(){var E,I,v,_;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),E=p.retryDelay,I=p.configs,v=p.apiParams,_=p.appUI,[4,g(E,b,h,I,v,m,x,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},g=function(b,h,p,m,x,E,I,v,_){return v===void 0&&(v="default"),e(void 0,void 0,void 0,function(){var A,S,L,N,D,F,M,B,V,Y,W,H,q,Q;return t(this,function(ee){switch(ee.label){case 0:return ee.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,m,x,E,v)];case 1:return A=ee.sent(),S=A.atToken,L=A.expiryTime,N=A.userId,D=A.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),N&&D&&(0,o.setUserDetails)(N,D),b=r.INITIAL_RETRY_DELAY,h=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return F=ee.sent(),console.log("ERROR: Heimdall fetch token",F),((V=F.response)===null||V===void 0?void 0:V.status)===401||((Y=F.request)===null||Y===void 0?void 0:Y.status)===401?(M=1,[4,d(m,x,M,E,I,_)]):[3,4];case 3:return ee.sent(),[3,11];case 4:return((W=F.response)===null||W===void 0?void 0:W.status)===409||((H=F.request)===null||H===void 0?void 0:H.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),B={retryDelay:b,configs:m,apiParams:x,appUI:_},[4,f(h,p,B,E,I)]):[3,6];case 5:if(ee.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw F;return[3,11];case 6:if(!(((q=F.response)===null||q===void 0?void 0:q.status)===422||((Q=F.request)===null||Q===void 0?void 0:Q.status)===422))return[3,7];throw console.log("ERROR: Throwing error",F.response.status),F;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(G){return setTimeout(G,b)})]:[3,10];case 8:return ee.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,g(b,h,p,m,x,E,I,_)];case 9:return ee.sent(),[3,11];case 10:throw F;case 11:return[3,12];case 12:return[2]}})})},y=function(b,h,p,m,x,E,I,v){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),m===void 0&&(m=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,g(p,m,x,b,h,E,I,v)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},C=function(b,h,p,m,x,E,I){return e(void 0,void 0,void 0,function(){var v,_,A,S,L,N;return t(this,function(D){switch(D.label){case 0:a=b,i=h,v=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,g(v,_,A,S,p,m,x,E,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,m,x,I)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(F){switch(F.label){case 0:return[4,y(S,p,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,x,I)];case 1:return F.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return N=D.sent(),console.log("ERROR: Fetching token failed",N),[3,4];case 4:return[2]}})})};return qo.fetchAccessToken=C,qo}var Yd;function Jd(){if(Yd)return yr;Yd=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(h){for(var p,m=1,x=arguments.length;m<x;m++){p=arguments[m];for(var E in p)Object.prototype.hasOwnProperty.call(p,E)&&(h[E]=p[E])}return h},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(h,p,m,x){function E(I){return I instanceof m?I:new m(function(v){v(I)})}return new(m||(m=Promise))(function(I,v){function _(L){try{S(x.next(L))}catch(N){v(N)}}function A(L){try{S(x.throw(L))}catch(N){v(N)}}function S(L){L.done?I(L.value):E(L.value).then(_,A)}S((x=x.apply(h,p||[])).next())})},n=ge&&ge.__generator||function(h,p){var m={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},x,E,I,v;return v={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function _(S){return function(L){return A([S,L])}}function A(S){if(x)throw new TypeError("Generator is already executing.");for(;v&&(v=0,S[0]&&(m=0)),m;)try{if(x=1,E&&(I=S[0]&2?E.return:S[0]?E.throw||((I=E.return)&&I.call(E),0):E.next)&&!(I=I.call(E,S[1])).done)return I;switch(E=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,E=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(I=m.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){m.label=S[1];break}if(S[0]===6&&m.label<I[1]){m.label=I[1],I=S;break}if(I&&m.label<I[2]){m.label=I[2],m.ops.push(S);break}I[2]&&m.ops.pop(),m.trys.pop();continue}S=p.call(h,m)}catch(L){S=[6,L],E=0}finally{x=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(yr,"__esModule",{value:!0}),yr.hiverAxiosCall=yr.performAxiosCall=void 0;var r=Vd,o=Oe,s=Xd(),a=fn,i=Wn,c,d=2,f=function(h,p){var m=p.fetchCsrfToken();h.formData?h.formData.append("_csrf_token",m):(h.data=h.data||{},h.data._csrf_token=m)},g=function(h,p){var m={};!h.method||h.method.toLowerCase()==="get"?m={params:h.params?h.params:h.data}:m=h.params?{params:h,data:h.data}:{data:h.data};var x=e(e({method:h.method,url:"".concat(h.root_url).concat(h.url),headers:h.headers},m),{withCredentials:p,responseType:(h==null?void 0:h.responseType)||""});return x};function y(h,p){return p===void 0&&(p=!0),t(this,void 0,void 0,function(){var m;return n(this,function(x){return m=g(h,p),[2,(0,r.default)(m).then(function(E){return E}).catch(function(E){throw E})]})})}yr.performAxiosCall=y;function C(h,p,m){return t(this,void 0,void 0,function(){var x,E,I;return n(this,function(v){switch(v.label){case 0:return v.trys.push([0,6,,8]),h.authTokenFetchingInProgress?[3,2]:(h.authTokenFetchingInProgress=!0,x=h.appEnv,E=h.tier,[4,(0,s.fetchAccessToken)(x,E,p,h.tenantPlatform,h.getTokenForLogin,m)]);case 1:return v.sent(),h.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(_){return setTimeout(_,100)})];case 3:return v.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,C(h,p,m)];case 4:v.sent(),v.label=5;case 5:return[3,8];case 6:return I=v.sent(),console.log("Error while fetching Auth Token :",I),h.authTokenFetchingInProgress=!1,[4,C(h,p,m)];case 7:return v.sent(),[3,8];case 8:return[2]}})})}function b(h,p,m,x,E){var I,v;return E===void 0&&(E=0),t(this,void 0,void 0,function(){var _,A,S,L,N,D,F;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(m.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,C(h,S,x)]):[3,2];case 1:M.sent(),M.label=2;case 2:return h.csrfToken&&f(p,m),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"}),m.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 N=M.sent(),p.onSuccess&&p.onSuccess(N),[2,N];case 4:if(D=M.sent(),F=((I=D.response)===null||I===void 0?void 0:I.status)===403||((v=D.request)===null||v===void 0?void 0:v.status)===403,E<d&&F)return(0,o.expireToken)(),[2,b(h,p,m,x,E+1)];if(E>=d&&F||!F)throw p.onFail&&p.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return yr.hiverAxiosCall=b,yr}var Qo={},Ve={},Xe={};Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.TIERS=Xe.APP_UI=Xe.CONFIG_HIVER=Xe.REFETCH_CHECK_DELAY=Xe.INITIAL_RETRY_DELAY=Xe.MAX_BACKOFF_LIMIT=Xe.MAX_CONFLICT_RETRY_DELAY=Xe.MAX_RETRY_DELAY=Xe.GET_METHOD=void 0,Xe.GET_METHOD="GET",Xe.MAX_RETRY_DELAY=18e4,Xe.MAX_CONFLICT_RETRY_DELAY=63e3,Xe.MAX_BACKOFF_LIMIT=8e3,Xe.INITIAL_RETRY_DELAY=1e3,Xe.REFETCH_CHECK_DELAY=168e4,Xe.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Xe.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Xe.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.getProdHqConfig=vt.getProdApiConfig=vt.getSitHqConfig=vt.getSitApiConfig=vt.getDevHqConfig=vt.getDevApiConfig=void 0;var ro={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},ab=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:ro}};vt.getDevApiConfig=ab;var ib=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:ro}};vt.getDevHqConfig=ib;var cb=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:ro}};vt.getSitApiConfig=cb;var lb=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:ro}};vt.getSitHqConfig=lb;var ub=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:ro}};vt.getProdApiConfig=ub;var db=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:ro}};vt.getProdHqConfig=db;var fb=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{d(r.next(f))}catch(g){a(g)}}function c(f){try{d(r.throw(f))}catch(g){a(g)}}function d(f){f.done?s(f.value):o(f.value).then(i,c)}d((r=r.apply(e,t||[])).next())})},pb=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(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],o=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.expireToken=Ve.validateToken=Ve.validateAccount=Ve.getConfig=Ve.introduceDelay=Ve.isTokenInExpiryWindow=Ve.getStoredAuthData=Ve.setUserDetails=Ve.setTokenAndExpiry=Ve.getRandomDelay=Ve.hasValidToken=void 0;var mc=Xe,Er=vt,qd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},bc=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};Ve.validateAccount=bc;var hb=function(e){var t=bc(e);return!Qd()&&t};Ve.validateToken=hb;var gb=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ve.expireToken=gb;var mb=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=qd(),o=bc(e);return r<n&&o};Ve.hasValidToken=mb;var bb=function(){return Math.floor(Math.random()*6e4)+6e4};Ve.getRandomDelay=bb;var yb=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)};Ve.setUserDetails=yb;var xb=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Ve.setTokenAndExpiry=xb;var Cb=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}};Ve.getStoredAuthData=Cb;var Qd=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=qd(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Ve.isTokenInExpiryWindow=Qd;var Eb=function(e){return fb(void 0,void 0,void 0,function(){return pb(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Ve.introduceDelay=Eb;var vb=function(e,t,n){switch(t){case mc.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,Er.getSitHqConfig)(e)),n?(0,Er.getSitApiConfig)(e):(0,Er.getSitHqConfig)(e);case mc.TIERS.PROD:return n?(0,Er.getProdApiConfig)():(0,Er.getProdHqConfig)();case mc.TIERS.DEV:default:return n?(0,Er.getDevApiConfig)():(0,Er.getDevHqConfig)()}};Ve.getConfig=vb;var $o={},Sn={},$d;function wb(){if($d)return Sn;$d=1;var e=ge&&ge.__awaiter||function(y,C,b,h){function p(m){return m instanceof b?m:new b(function(x){x(m)})}return new(b||(b=Promise))(function(m,x){function E(_){try{v(h.next(_))}catch(A){x(A)}}function I(_){try{v(h.throw(_))}catch(A){x(A)}}function v(_){_.done?m(_.value):p(_.value).then(E,I)}v((h=h.apply(y,C||[])).next())})},t=ge&&ge.__generator||function(y,C){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},h,p,m,x;return x={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function E(v){return function(_){return I([v,_])}}function I(v){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,v[0]&&(b=0)),b;)try{if(h=1,p&&(m=v[0]&2?p.return:v[0]?p.throw||((m=p.return)&&m.call(p),0):p.next)&&!(m=m.call(p,v[1])).done)return m;switch(p=0,m&&(v=[v[0]&2,m.value]),v[0]){case 0:case 1:m=v;break;case 4:return b.label++,{value:v[1],done:!1};case 5:b.label++,p=v[1],v=[0];continue;case 7:v=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(v[0]===6||v[0]===2)){b=0;continue}if(v[0]===3&&(!m||v[1]>m[0]&&v[1]<m[3])){b.label=v[1];break}if(v[0]===6&&b.label<m[1]){b.label=m[1],m=v;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(v);break}m[2]&&b.ops.pop(),b.trys.pop();continue}v=C.call(y,b)}catch(_){v=[6,_],p=0}finally{h=m=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.getV2LoginCode=Sn.getLoginToken=Sn.getAccessToken=void 0;var n=Xe,r=t0(),o=Ve,s=function(y,C,b){var h=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:C.userId,usergroup_id:C.usergroupId,access_token:(h==null?void 0:h.token)||"",source:b},withCredentials:!0}},a=function(y,C){return{root_url:C.heimdallUrl,url:C.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,C){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:C||n.APP_UI.DEFAULT}}},d=function(y,C,b,h){return e(void 0,void 0,void 0,function(){var p,m,x,E,I,v,_;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(C,b,h),[4,(0,r.makeAxiosCall)(p,y)]);case 1:return m=A.sent(),[2,{atToken:(E=m==null?void 0:m.data.at)===null||E===void 0?void 0:E.token,expiryTime:(I=m==null?void 0:m.data.at)===null||I===void 0?void 0:I.expires_at,userId:(v=m==null?void 0:m.data)===null||v===void 0?void 0:v.user_id,userGroupId:(_=m==null?void 0:m.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw x=A.sent(),x;case 5:return[2]}})})};Sn.getAccessToken=d;var f=function(y,C,b){return e(void 0,void 0,void 0,function(){var h,p,m,x,E,I,v;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,C)];case 2:return p=_.sent(),[2,{userId:(x=p==null?void 0:p.data)===null||x===void 0?void 0:x.user_id,userGroupId:(E=p==null?void 0:p.data)===null||E===void 0?void 0:E.usergroup_id,atToken:(I=p==null?void 0:p.data.at)===null||I===void 0?void 0:I.token,expiryTime:(v=p==null?void 0:p.data.at)===null||v===void 0?void 0:v.expires_at}];case 3:throw m=_.sent(),m;case 4:return[2]}})})};Sn.getLoginToken=f;var g=function(y,C,b){return e(void 0,void 0,void 0,function(){var h,p,m;return t(this,function(x){switch(x.label){case 0:return x.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),h=c(C,b),[4,(0,r.makeAxiosCall)(h,y)];case 1:return p=x.sent(),console.log("DEBUG HEIMDALL: local storage:",p==null?void 0:p.data),[2,p==null?void 0:p.data.code];case 2:throw m=x.sent(),m;case 3:return[2]}})})};return Sn.getV2LoginCode=g,Sn}var Ud;function Kd(){if(Ud)return $o;Ud=1;var e=ge&&ge.__awaiter||function(C,b,h,p){function m(x){return x instanceof h?x:new h(function(E){E(x)})}return new(h||(h=Promise))(function(x,E){function I(A){try{_(p.next(A))}catch(S){E(S)}}function v(A){try{_(p.throw(A))}catch(S){E(S)}}function _(A){A.done?x(A.value):m(A.value).then(I,v)}_((p=p.apply(C,b||[])).next())})},t=ge&&ge.__generator||function(C,b){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},p,m,x,E;return E={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function I(_){return function(A){return v([_,A])}}function v(_){if(p)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(h=0)),h;)try{if(p=1,m&&(x=_[0]&2?m.return:_[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,_[1])).done)return x;switch(m=0,x&&(_=[_[0]&2,x.value]),_[0]){case 0:case 1:x=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,m=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!x||_[1]>x[0]&&_[1]<x[3])){h.label=_[1];break}if(_[0]===6&&h.label<x[1]){h.label=x[1],x=_;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(_);break}x[2]&&h.ops.pop(),h.trys.pop();continue}_=b.call(C,h)}catch(A){_=[6,A],m=0}finally{p=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty($o,"__esModule",{value:!0}),$o.fetchToken=void 0;var n=wb(),r=Xe,o=Ve,s,a,i,c=function(C,b,h){return h===void 0&&(h=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var p,m,x,E,I,v,_,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,C,h)];case 2:return m=L.sent(),[4,(0,n.getLoginToken)(m,r.CONFIG_HIVER,C)];case 3:return x=L.sent(),E=x.userId,I=x.userGroupId,v=x.atToken,_=x.expiryTime,(0,o.setTokenAndExpiry)(v,_),(0,o.setUserDetails)(E,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(C,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]}})})},d=function(C,b,h){return e(void 0,void 0,void 0,function(){var p,m,x,E;return t(this,function(I){switch(I.label){case 0:return b<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(v){return setTimeout(v,C)})]:[3,3];case 1:return I.sent(),b+=C,C*2<=r.MAX_BACKOFF_LIMIT?C*=2:C=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",C),p=h.retryDelay,m=h.configs,x=h.api_params,E=h.appUI,[4,f(p,C,b,m,x,E)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},f=function(C,b,h,p,m,x,E){return x===void 0&&(x="default"),e(void 0,void 0,void 0,function(){var I,v,_,A,S,L,N,D,F,M,B,V,Y,W;return t(this,function(H){switch(H.label){case 0:return H.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,p,m,x)];case 1:return I=H.sent(),v=I.atToken,_=I.expiryTime,A=I.userId,S=I.userGroupId,v&&_&&(0,o.setTokenAndExpiry)(v,_),A&&S&&(0,o.setUserDetails)(A,S),C=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return L=H.sent(),console.log("ERROR: Heimdall fetch token",L),((F=L.response)===null||F===void 0?void 0:F.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(N=1,[4,c(p,N,E)]):[3,4];case 3:return H.sent(),[3,11];case 4:return((B=L.response)===null||B===void 0?void 0:B.status)===409||((V=L.request)===null||V===void 0?void 0:V.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:C,configs:p,api_params:m,appUI:E},[4,d(b,h,D)]):[3,6];case 5:if(H.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((Y=L.response)===null||Y===void 0?void 0:Y.status)===422||((W=L.request)===null||W===void 0?void 0:W.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return C<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,C)})]:[3,10];case 8:return H.sent(),C*=2,console.log("Heimdall: Fetch token post doubling retry delay",C),[4,f(C,b,h,p,m,E)];case 9:return H.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(C,b,h,p,m,x){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),p===void 0&&(p=r.INITIAL_RETRY_DELAY),m===void 0&&(m=0),e(void 0,void 0,void 0,function(){var E,I,v;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),E=(0,o.isTokenInExpiryWindow)(),E?(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,m,C,b,x)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw v=_.sent(),v;case 5:return[2]}})})},y=function(C,b,h,p,m,x){return e(void 0,void 0,void 0,function(){var E,I,v,_,A;return t(this,function(S){switch(S.label){case 0:s=C,a=b,E=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,v=0,_=(0,o.getConfig)(s,a,p),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(E,I,v,_,h,m,x)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return g(_,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,g(_,h)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return $o.fetchToken=y,$o}var e0;function t0(){if(e0)return Qo;e0=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(y){for(var C,b=1,h=arguments.length;b<h;b++){C=arguments[b];for(var p in C)Object.prototype.hasOwnProperty.call(C,p)&&(y[p]=C[p])}return y},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(y,C,b,h){function p(m){return m instanceof b?m:new b(function(x){x(m)})}return new(b||(b=Promise))(function(m,x){function E(_){try{v(h.next(_))}catch(A){x(A)}}function I(_){try{v(h.throw(_))}catch(A){x(A)}}function v(_){_.done?m(_.value):p(_.value).then(E,I)}v((h=h.apply(y,C||[])).next())})},n=ge&&ge.__generator||function(y,C){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},h,p,m,x;return x={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function E(v){return function(_){return I([v,_])}}function I(v){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,v[0]&&(b=0)),b;)try{if(h=1,p&&(m=v[0]&2?p.return:v[0]?p.throw||((m=p.return)&&m.call(p),0):p.next)&&!(m=m.call(p,v[1])).done)return m;switch(p=0,m&&(v=[v[0]&2,m.value]),v[0]){case 0:case 1:m=v;break;case 4:return b.label++,{value:v[1],done:!1};case 5:b.label++,p=v[1],v=[0];continue;case 7:v=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(v[0]===6||v[0]===2)){b=0;continue}if(v[0]===3&&(!m||v[1]>m[0]&&v[1]<m[3])){b.label=v[1];break}if(v[0]===6&&b.label<m[1]){b.label=m[1],m=v;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(v);break}m[2]&&b.ops.pop(),b.trys.pop();continue}v=C.call(y,b)}catch(_){v=[6,_],p=0}finally{h=m=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.makeAxiosCall=void 0;var r=Vd,o=Ve,s=Kd(),a,i=2,c=function(y,C){var b=C.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",b):(y.data=y.data||{},y.data._csrf_token=b)},d=function(y){var C=!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},C),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return b};function f(y){return t(this,void 0,void 0,function(){var C;return n(this,function(b){return C=d(y),[2,(0,r.default)(C).then(function(h){return h}).catch(function(h){throw h})]})})}function g(y,C,b,h){var p,m;return h===void 0&&(h=0),t(this,void 0,void 0,function(){var x,E,I,v,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(C.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(x=y.app_env,E=y.tier,!x||!E)throw Error("app_env or tier missing : ".concat(x,"/").concat(E));return"userId"in y&&"usergroupId"in y?(I={userId:y.userId,usergroupId:y.usergroupId},typeof C.isHiverApiDomain!="boolean"&&(C.isHiverApiDomain=!0),[4,(0,s.fetchToken)(x,E,I,C.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,C),C.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",y.headers=e(e({},y.headers),{Authorization:"Bearer ".concat(a)})),[4,f(y)];case 3:return v=S.sent(),y.onSuccess&&y.onSuccess(v),[2,v];case 4:if(_=S.sent(),A=((p=_.response)===null||p===void 0?void 0:p.status)===403||((m=_.request)===null||m===void 0?void 0:m.status)===403,h<i&&A)return(0,o.expireToken)(),[2,g(y,C,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 Qo.makeAxiosCall=g,Qo}(function(e){var t=ge&&ge.__awaiter||function(C,b,h,p){function m(x){return x instanceof h?x:new h(function(E){E(x)})}return new(h||(h=Promise))(function(x,E){function I(A){try{_(p.next(A))}catch(S){E(S)}}function v(A){try{_(p.throw(A))}catch(S){E(S)}}function _(A){A.done?x(A.value):m(A.value).then(I,v)}_((p=p.apply(C,b||[])).next())})},n=ge&&ge.__generator||function(C,b){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},p,m,x,E;return E={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function I(_){return function(A){return v([_,A])}}function v(_){if(p)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(h=0)),h;)try{if(p=1,m&&(x=_[0]&2?m.return:_[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,_[1])).done)return x;switch(m=0,x&&(_=[_[0]&2,x.value]),_[0]){case 0:case 1:x=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,m=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!x||_[1]>x[0]&&_[1]<x[3])){h.label=_[1];break}if(_[0]===6&&h.label<x[1]){h.label=x[1],x=_;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(_);break}x[2]&&h.ops.pop(),h.trys.pop();continue}_=b.call(C,h)}catch(A){_=[6,A],m=0}finally{p=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=Jd(),o=Xd(),s=Wn;Object.defineProperty(e,"TENANT_PLATFORM",{enumerable:!0,get:function(){return s.TENANT_PLATFORM}}),Object.defineProperty(e,"DEFAULT_INIT_CONFIG_HIVER",{enumerable:!0,get:function(){return s.DEFAULT_INIT_CONFIG_HIVER}});var a=Wd(),i=Oe,c=fn,d=t0();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return d.makeAxiosCall}});var f=Kd();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var g=pn,y=function(){function C(b,h,p,m,x,E){p===void 0&&(p=s.TENANT_PLATFORM.GMAIL),m===void 0&&(m=null),x===void 0&&(x=!0),E===void 0&&(E=!1),this.setEnvironment(),this.appEnv=b,this.tier=h,this.tenantPlatform=p,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=m,this.withCredentials=x,this.csrfToken=E}return C.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},C.prototype.hiverAxios=function(b,h,p,m){return h===void 0&&(h=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var x,E;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),m&&m<2?(x={userId:b.userId,usergroupId:b.usergroupId,apiRetry:m},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,x,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:I.sent(),I.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,b,h,p)];case 3:return[2,I.sent()];case 4:throw E=I.sent(),console.log("ERROR: Axios call failed",E),E;case 5:return[2]}})})},C.prototype.fetchAuthToken=function(b,h,p){return t(this,void 0,void 0,function(){var m;return n(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,b,this.tenantPlatform,this.getTokenForLogin,h,p)]);case 1:return x.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),x.label=3;case 3:return[3,8];case 4:return m=x.sent(),console.log("ERROR: Fetching token failed",m),this.authTokenFetchingInProgress=!1,[4,new Promise(function(E){return setTimeout(E,100)})];case 5:return x.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,h,p)];case 6:return x.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},C.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]}})})},C.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},C}();e.Bifrost=y})(Ji);const Wt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Dt=()=>{if(!Wt.isInitiated)return null;if(!Wt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Wt},Ib=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=Ji.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i,onUserAuthRequired:c})=>{Wt.baseUrl=e,Wt.appEnv=t,Wt.tier=n,Wt.userGroupId=o,Wt.userId=r,Wt.tenantPlatform=s,Wt.onUserAuthRequired=c,Wt.bifrost=new Ji.Bifrost(t,n,s,i,a),Wt.isInitiated=!0},ve=(({configHiver:e})=>async n=>{var y,C,b;const r=Dt();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:d}=n,g={root_url:(d||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(g,{...e,isHiverApiDomain:!0}))}catch(h){const p=h,m=(y=p==null?void 0:p.response)==null?void 0:y.status,x=(C=p==null?void 0:p.response)==null?void 0:C.data;if(m===412&&(x==null?void 0:x.error_code)==="USER_AUTH_REQUIRED")try{(b=r.onUserAuthRequired)==null||b.call(r,x)}catch(E){console.error("onUserAuthRequired callback threw: ",E)}throw console.error("API call failed with error: ",h),h}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),_b=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)"})))),Sb=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"})),Ab=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"})))),Tb="Rate your experience with Hiver Apps",Lb="Share feedback on Apps",Ob="Got any feedback?",n0="https://txeep2wshyx.typeform.com/to/RuOwF9SG",kb="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",Fb="https://cdn.hiverhq.com/chat-support/hiver-chat.html",Db="enable_connectors_clicked",Nb="learn_more_clicked",Rb="connector_card_expand_clicked",Mb="connector_card_collapsed_clicked",jb="connector_card_refresh_clicked",Pb="connector_cards_loaded",Bb="connector_whats_new_card_viewed",Vb="connector_whats_new_explore_now_clicked",Gb="connector_whats_new_learn_more_clicked",Hb="connector_whats_new_dismissed",Wb="connector_create_new_object_clicked",Zb="connector_link_new_object_clicked",zb="connector_new_object_created_by_form",Xb="connector_new_object_linked_by_form",Yb="connector_object_unlinked_by_form",Jb="connector_link_preview_clicked",qb="connector_create_panel_cancel_clicked",r0="connector_create_panel_back_clicked",Qb="card_loaded_on_click",$b="card_loaded",Ub="schedule_call_clicked",Kb="schedule_call_cross_clicked",o0="CONNECTOR_EDIT_CLICKED",e4="CONNECTOR_EDIT_REQUEST_SEND",t4="CONNECTOR_EDIT_CANCELLED",s0="CONNECTOR_EDIT_BACK_CLICKED",n4="CONNECTOR_EDIT_SUCCESS",r4="connector_video_clicked",o4="connector_card_error",yc="got_any_feedback_clicked",s4="connector_deeplink_clicked",a4="search_bar_tapped",i4="search_suggestions_selected",c4="search_initiated",l4="no_results_found",u4="search_results_found",d4="search_result_selected",f4="search_result_linked",p4="feedback_closed_clicked",h4="help_btn_clicked",g4="connector_chat_support_clicked",m4="add_custom_field_clicked",b4="add_custom_field_success",y4="update_custom_field_success",a0="clicked_on_lookup_config",x4="clicked_on_lookup_field",C4="saved_lookup_config",E4="settings_defaults_modal_opened",v4="defaults_configuration_saved",w4={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},Ge=w.createContext(w4),ca="hiver_connectors",xc={NOT_FOUND:404},I4="ftr-connector-blue-dot",i0="ftr-connectors-write-flow",_4="ftr-connectors-enhancements",S4="ftr-connector-schedule-call-agent",A4="ftr-connectors-edit",T4="enableAllConnectorFtr",L4="ftr-cards-open-state",O4="ftr-connectors-global-search",k4="ftr-connectors-smart-suggestions",F4="ftr-connectors-email-selection",D4="ftr-connector-agent-feedback",la="ftr-connector-unified-view",N4="ftr-connectors-expanded-form",c0="ftr-apps-lookup-revamp",R4="ftr-ci-configurable-fields",l0="Please refresh and try again",M4="No data available",Uo="-",u0="Refresh",d0="Minimize",Cc="Expand",f0="Connectors",Ec="Apps",j4="Collapse",P4="Close",p0="Link",B4="Create",V4="Update",h0="Unlink",g0="Edit",vc="Cancel",wc="Create new object",m0="Link existing object",G4="Are you sure you want to unlink this object?",H4="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.",W4="Edit card",Z4="bullet_list",z4="Expanded",X4="Collapsed",b0="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",y0="UNKNOWN_ERROR",Y4="WORKSPACE_ACCESS_DENIED",J4="You don't have access to this card's workspace",q4="https://help.hiverhq.com/custom-connectors/common-connector-errors",x0={MAIN_BUTTON:"main_button",ICON:"create_icon"},Q4=" Add custom field",Ic=e=>{let t=localStorage.getItem(ca);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},$4=e=>!!Ic(e),C0=()=>{const{userId:e=""}=Dt()||{};return String(e)},U4=(e,t=C0())=>{const n=Ic(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},_c=(e,t=!1,n=!1)=>{const r=C0(),o=Ic(e);if(t||!o){localStorage.removeItem(ca);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(ca,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(ca,JSON.stringify(i));return}},rt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[T4])===!0:(e==null?void 0:e[t])===!0,ot=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),E0=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?z4:X4,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},v0=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==xc.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)!==xc.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},K4=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)},Sc=({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 w0(e,t){return e.length>t?e.substring(0,t)+"...":e}const e5=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)"})))),t5=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)"})))),n5=l.keyframes`
|
|
34
|
+
`):" "+Nd(s[0]):"as no adapter specified";throw new Ce("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:ic};function cc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ur(null,e)}function Md(e){return cc(e),e.headers=tn.from(e.headers),e.data=sc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Rd.getAdapter(e.adapter||rc.adapter)(e).then(function(r){return cc(e),r.data=sc.call(e,e.transformResponse,r),r.headers=tn.from(r.headers),r},function(r){return wd(r)||(cc(e),r&&r.response&&(r.response.data=sc.call(e,e.transformResponse,r.response),r.response.headers=tn.from(r.response.headers))),Promise.reject(r)})}const jd="1.7.7",lc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lc[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Pd={};lc.transitional=function(t,n,r){function o(s,a){return"[Axios v"+jd+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new Ce(o(a," has been removed"+(n?" in "+n:"")),Ce.ERR_DEPRECATED);return n&&!Pd[a]&&(Pd[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 A3(e,t,n){if(typeof e!="object")throw new Ce("options must be an object",Ce.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 Ce("option "+s+" must be "+c,Ce.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ce("Unknown option "+s,Ce.ERR_BAD_OPTION)}}var uc={assertOptions:A3,validators:lc};const Vn=uc.validators;let aa=class{constructor(t){this.defaults=t,this.interceptors={request:new xd,response:new xd}}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=br(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&uc.assertOptions(r,{silentJSONParsing:Vn.transitional(Vn.boolean),forcedJSONParsing:Vn.transitional(Vn.boolean),clarifyTimeoutError:Vn.transitional(Vn.boolean)},!1),o!=null&&(P.isFunction(o)?n.paramsSerializer={serialize:o}:uc.assertOptions(o,{encode:Vn.function,serialize:Vn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&P.merge(s.common,s[n.method]);s&&P.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=tn.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 d=[];this.interceptors.response.forEach(function(h){d.push(h.fulfilled,h.rejected)});let f,g=0,y;if(!c){const b=[Md.bind(this),void 0];for(b.unshift.apply(b,i),b.push.apply(b,d),y=b.length,f=Promise.resolve(n);g<y;)f=f.then(b[g++],b[g++]);return f}y=i.length;let C=n;for(g=0;g<y;){const b=i[g++],h=i[g++];try{C=b(C)}catch(p){h.call(this,p);break}}try{f=Md.call(this,C)}catch(b){return Promise.reject(b)}for(g=0,y=d.length;g<y;)f=f.then(d[g++],d[g++]);return f}getUri(t){t=br(this.defaults,t);const n=Ad(t.baseURL,t.url);return yd(n,t.params,t.paramsSerializer)}};P.forEach(["delete","get","head","options"],function(t){aa.prototype[t]=function(n,r){return this.request(br(r||{},{method:t,url:n,data:(r||{}).data}))}}),P.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(br(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}aa.prototype[t]=n(),aa.prototype[t+"Form"]=n(!0)});var ia=aa;class dc{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 Ur(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 dc(function(o){t=o}),cancel:t}}}var T3=dc;function L3(e){return function(n){return e.apply(null,n)}}function O3(e){return P.isObject(e)&&e.isAxiosError===!0}const fc={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(fc).forEach(([e,t])=>{fc[t]=e});var k3=fc;function Bd(e){const t=new ia(e),n=nd(ia.prototype.request,t);return P.extend(n,ia.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Bd(br(e,o))},n}const Ke=Bd(rc);Ke.Axios=ia,Ke.CanceledError=Ur,Ke.CancelToken=T3,Ke.isCancel=wd,Ke.VERSION=jd,Ke.toFormData=ea,Ke.AxiosError=Ce,Ke.Cancel=Ke.CanceledError,Ke.all=function(t){return Promise.all(t)},Ke.spread=L3,Ke.isAxiosError=O3,Ke.mergeConfig=br,Ke.AxiosHeaders=tn,Ke.formToJSON=e=>Ed(P.isHTMLForm(e)?new FormData(e):e),Ke.getAdapter=Rd.getAdapter,Ke.HttpStatusCode=k3,Ke.default=Ke;var Vd=Ke,Oe={},Gn={};(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={}))})(Gn);var Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.getProdHqConfig=Ct.getProdApiConfig=Ct.getSitHqConfig=Ct.getSitApiConfig=Ct.getDevHqConfig=Ct.getDevApiConfig=void 0;var Kr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},F3=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Kr}};Ct.getDevApiConfig=F3;var D3=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Kr}};Ct.getDevHqConfig=D3;var N3=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:Kr}};Ct.getSitApiConfig=N3;var R3=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:Kr}};Ct.getSitHqConfig=R3;var M3=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Kr}};Ct.getProdApiConfig=M3;var j3=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Kr}};Ct.getProdHqConfig=j3;var dn={},fn={};Object.defineProperty(fn,"__esModule",{value:!0}),fn.removeValue=fn.getValue=fn.setValue=void 0;var pc={};function P3(e,t){pc[e]=t}fn.setValue=P3;function B3(e){return pc[e]}fn.getValue=B3;function V3(e){delete pc[e]}fn.removeValue=V3,Object.defineProperty(dn,"__esModule",{value:!0}),dn.removeItemFromStorage=dn.setItemInStorage=dn.getItemFromStorage=void 0;var eo=Gn,to=fn,G3=function(e,t){switch(t===void 0&&(t=(0,to.getValue)("PLATFORM")),t){case eo.PLATFORM.WEB:return sessionStorage.getItem(e);case eo.PLATFORM.MOBILE:return(0,to.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};dn.getItemFromStorage=G3;var H3=function(e,t,n){switch(n===void 0&&(n=(0,to.getValue)("PLATFORM")),n){case eo.PLATFORM.WEB:return sessionStorage.setItem(e,t);case eo.PLATFORM.MOBILE:return(0,to.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};dn.setItemInStorage=H3;var W3=function(e,t){switch(t===void 0&&(t=(0,to.getValue)("PLATFORM")),t){case eo.PLATFORM.WEB:sessionStorage.removeItem(e);break;case eo.PLATFORM.MOBILE:(0,to.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};dn.removeItemFromStorage=W3;var Z3=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{d(r.next(f))}catch(g){a(g)}}function c(f){try{d(r.throw(f))}catch(g){a(g)}}function d(f){f.done?s(f.value):o(f.value).then(i,c)}d((r=r.apply(e,t||[])).next())})},z3=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(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],o=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.expireToken=Oe.invalidateToken=Oe.validateToken=Oe.validateAccount=Oe.getConfig=Oe.introduceDelay=Oe.isTokenInExpiryWindow=Oe.getStoredAuthData=Oe.setUserDetails=Oe.getRefreshInterval=Oe.setTokenAndExpiry=Oe.getRandomDelay=Oe.hasValidToken=void 0;var _n=Gn,no=Ct,Nt=dn,hc=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},gc=function(e){var t=parseInt((0,Nt.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,Nt.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Oe.validateAccount=gc;var X3=function(e){var t=gc(e);return!Gd()&&t};Oe.validateToken=X3;var Y3=function(e){return e.apiRetry?e.apiRetry>0:!1};Oe.invalidateToken=Y3;var J3=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Oe.expireToken=J3;var q3=function(e){var t=(0,Nt.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=hc(),o=gc(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Oe.hasValidToken=q3;var Q3=function(){return Math.floor(Math.random()*6e4)+6e4};Oe.getRandomDelay=Q3;var $3=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,Nt.setItemInStorage)("hiverAuthUserId",e),(0,Nt.setItemInStorage)("hiverAuthUserGroupId",t)};Oe.setUserDetails=$3;var U3=function(e,t){if(!e)throw new Error("Token not found in the response");(0,Nt.setItemInStorage)("hiverAuthToken",e),(0,Nt.setItemInStorage)("hiverAuthTokenExpiry",t)};Oe.setTokenAndExpiry=U3;var K3=function(){var e=(0,Nt.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,Nt.getItemFromStorage)("hiverAuthToken"),n=(0,Nt.getItemFromStorage)("hiverAuthUserId"),r=(0,Nt.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Oe.getStoredAuthData=K3;var Gd=function(){var e=(0,Nt.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=hc(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Oe.isTokenInExpiryWindow=Gd;var eb=function(e){return Z3(void 0,void 0,void 0,function(){return z3(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Oe.introduceDelay=eb;var tb=function(e,t,n){switch(n===void 0&&(n=!0),t){case _n.TIERS.SIT:case _n.TIERS.QA:return n?(0,no.getSitApiConfig)(e):(0,no.getSitHqConfig)(e);case _n.TIERS.PRODUCTION:case _n.TIERS.PROD:return n?(0,no.getProdApiConfig)():(0,no.getProdHqConfig)();case _n.TIERS.DEV:default:return n?(0,no.getDevApiConfig)():(0,no.getDevHqConfig)()}};Oe.getConfig=tb;var nb=function(){try{var e=(0,Nt.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return _n.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=hc();return t.getTime()-n.getTime()>_n.TWO_MINUTES_IN_MS?t.getTime()-_n.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),_n.REFETCH_CHECK_DELAY}};Oe.getRefreshInterval=nb;var Qo={},nn={},Hd;function Wd(){if(Hd)return nn;Hd=1;var e=ge&&ge.__awaiter||function(b,h,p,m){function x(E){return E instanceof p?E:new p(function(I){I(E)})}return new(p||(p=Promise))(function(E,I){function v(S){try{A(m.next(S))}catch(L){I(L)}}function _(S){try{A(m.throw(S))}catch(L){I(L)}}function A(S){S.done?E(S.value):x(S.value).then(v,_)}A((m=m.apply(b,h||[])).next())})},t=ge&&ge.__generator||function(b,h){var p={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},m,x,E,I;return I={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function v(A){return function(S){return _([A,S])}}function _(A){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(p=0)),p;)try{if(m=1,x&&(E=A[0]&2?x.return:A[0]?x.throw||((E=x.return)&&E.call(x),0):x.next)&&!(E=E.call(x,A[1])).done)return E;switch(x=0,E&&(A=[A[0]&2,E.value]),A[0]){case 0:case 1:E=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,x=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(E=p.trys,!(E=E.length>0&&E[E.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!E||A[1]>E[0]&&A[1]<E[3])){p.label=A[1];break}if(A[0]===6&&p.label<E[1]){p.label=E[1],E=A;break}if(E&&p.label<E[2]){p.label=E[2],p.ops.push(A);break}E[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(b,p)}catch(S){A=[6,S],x=0}finally{m=E=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(nn,"__esModule",{value:!0}),nn.logoutFromHeimdall=nn.getTenantLoginCode=nn.getLoginToken=nn.getAccessToken=void 0;var n=Gn,r=Jd(),o=Oe,s=function(b,h,p,m){var x=(0,o.getStoredAuthData)(),E=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":E},data:{user_id:h.userId,usergroup_id:h.usergroupId,access_token:(x==null?void 0:x.token)||"",source:m}}},a=function(b,h,p,m,x){var E=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":E,"x-hiver-userid":m,"x-hiver-usergroupid":x}}},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)},d=function(b,h,p,m){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:m||n.APP_UI.DEFAULT}}},f=function(b,h,p,m,x){return e(void 0,void 0,void 0,function(){var E,I,v,_,A,S,L;return t(this,function(N){switch(N.label){case 0:console.log("GETTOKEN tenantPlatform -> ",m),N.label=1;case 1:return N.trys.push([1,5,,6]),!(0,o.validateToken)(p)||(0,o.invalidateToken)(p)?(console.log("HEIMDALL: No valid token, fetching token"),E=s(h,p,m,x),[4,(0,r.performAxiosCall)(E)]):[3,3];case 2:return I=N.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 v=N.sent(),v;case 6:return[2]}})})};nn.getAccessToken=f;var g=function(b,h,p,m,x,E){return e(void 0,void 0,void 0,function(){var I,v,_,A,S,L,N;return t(this,function(D){switch(D.label){case 0:I=a(b,p,m,x,E),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return v=D.sent(),[2,{userId:(A=v==null?void 0:v.data)===null||A===void 0?void 0:A.user_id,userGroupId:(S=v==null?void 0:v.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=v==null?void 0:v.data.at)===null||L===void 0?void 0:L.token,expiryTime:(N=v==null?void 0:v.data.at)===null||N===void 0?void 0:N.expires_at}];case 3:throw _=D.sent(),_;case 4:return[2]}})})};nn.getLoginToken=g;var y=function(b,h,p,m,x){return e(void 0,void 0,void 0,function(){var E,I,v;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",x),E=d(h,p,m,x),[4,(0,r.performAxiosCall)(E)];case 1:return I=_.sent(),[2,I==null?void 0:I.data.code];case 2:throw v=_.sent(),v;case 3:return[2]}})})};nn.getTenantLoginCode=y;var C=function(b,h,p){return p===void 0&&(p=0),e(void 0,void 0,void 0,function(){var m,x,E;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),m=i(b,h),[4,(0,r.performAxiosCall)(m)];case 1:return x=I.sent(),[2,x==null?void 0:x.status];case 2:return E=I.sent(),p<2?[4,C(b,h,p+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw E;case 5:return[2]}})})};return nn.logoutFromHeimdall=C,nn}var ca={},rb=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{d(r.next(f))}catch(g){a(g)}}function c(f){try{d(r.throw(f))}catch(g){a(g)}}function d(f){f.done?s(f.value):o(f.value).then(i,c)}d((r=r.apply(e,t||[])).next())})},ob=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(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],o=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(ca,"__esModule",{value:!0}),ca.subscribeToOnlineEvent=void 0;var Zd=Gn,sb=fn,ab=function(e,t){switch(t===void 0&&(t=(0,sb.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Zd.PLATFORM.WEB:return window.addEventListener("online",function(){return rb(void 0,void 0,void 0,function(){return ob(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 Zd.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};ca.subscribeToOnlineEvent=ab;var zd;function Xd(){if(zd)return Qo;zd=1;var e=ge&&ge.__awaiter||function(b,h,p,m){function x(E){return E instanceof p?E:new p(function(I){I(E)})}return new(p||(p=Promise))(function(E,I){function v(S){try{A(m.next(S))}catch(L){I(L)}}function _(S){try{A(m.throw(S))}catch(L){I(L)}}function A(S){S.done?E(S.value):x(S.value).then(v,_)}A((m=m.apply(b,h||[])).next())})},t=ge&&ge.__generator||function(b,h){var p={label:0,sent:function(){if(E[0]&1)throw E[1];return E[1]},trys:[],ops:[]},m,x,E,I;return I={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function v(A){return function(S){return _([A,S])}}function _(A){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,A[0]&&(p=0)),p;)try{if(m=1,x&&(E=A[0]&2?x.return:A[0]?x.throw||((E=x.return)&&E.call(x),0):x.next)&&!(E=E.call(x,A[1])).done)return E;switch(x=0,E&&(A=[A[0]&2,E.value]),A[0]){case 0:case 1:E=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,x=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(E=p.trys,!(E=E.length>0&&E[E.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!E||A[1]>E[0]&&A[1]<E[3])){p.label=A[1];break}if(A[0]===6&&p.label<E[1]){p.label=E[1],E=A;break}if(E&&p.label<E[2]){p.label=E[2],p.ops.push(A);break}E[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(b,p)}catch(S){A=[6,S],x=0}finally{m=E=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.fetchAccessToken=void 0;var n=Wd(),r=Gn,o=Oe,s=ca,a,i,c,d=function(b,h,p,m,x,E){return E===void 0&&(E=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,v,_,A,S,L,N,D,F;return t(this,function(M){switch(M.label){case 0:I=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",E,m),v=void 0,x?[4,x()]:[3,3];case 2:return v=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,b,h,m,E)];case 4:v=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(v,r.CONFIG_HIVER,b,m,h.userId,h.usergroupId)];case 6:return _=M.sent(),A=_.userId,S=_.userGroupId,L=_.atToken,N=_.expiryTime,(0,o.setTokenAndExpiry)(L,N),(0,o.setUserDetails)(A,S),[3,12];case 7:D=M.sent(),console.log("ERROR debug: in error login:",D,E),F=p,M.label=8;case 8:return F<I?[4,d(b,h,F+1,m,x,E)]:[3,11];case 9:M.sent(),M.label=10;case 10:return F++,[3,8];case 11:throw D;case 12:return[2]}})})},f=function(b,h,p,m,x){return e(void 0,void 0,void 0,function(){var E,I,v,_;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),E=p.retryDelay,I=p.configs,v=p.apiParams,_=p.appUI,[4,g(E,b,h,I,v,m,x,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},g=function(b,h,p,m,x,E,I,v,_){return v===void 0&&(v="default"),e(void 0,void 0,void 0,function(){var A,S,L,N,D,F,M,B,V,Y,W,H,q,Q;return t(this,function(ee){switch(ee.label){case 0:return ee.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,m,x,E,v)];case 1:return A=ee.sent(),S=A.atToken,L=A.expiryTime,N=A.userId,D=A.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),N&&D&&(0,o.setUserDetails)(N,D),b=r.INITIAL_RETRY_DELAY,h=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return F=ee.sent(),console.log("ERROR: Heimdall fetch token",F),((V=F.response)===null||V===void 0?void 0:V.status)===401||((Y=F.request)===null||Y===void 0?void 0:Y.status)===401?(M=1,[4,d(m,x,M,E,I,_)]):[3,4];case 3:return ee.sent(),[3,11];case 4:return((W=F.response)===null||W===void 0?void 0:W.status)===409||((H=F.request)===null||H===void 0?void 0:H.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),B={retryDelay:b,configs:m,apiParams:x,appUI:_},[4,f(h,p,B,E,I)]):[3,6];case 5:if(ee.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw F;return[3,11];case 6:if(!(((q=F.response)===null||q===void 0?void 0:q.status)===422||((Q=F.request)===null||Q===void 0?void 0:Q.status)===422))return[3,7];throw console.log("ERROR: Throwing error",F.response.status),F;case 7:return b<=r.MAX_RETRY_DELAY?[4,new Promise(function(G){return setTimeout(G,b)})]:[3,10];case 8:return ee.sent(),b*=2,console.log("Heimdall: Fetch token post doubling retry delay",b),[4,g(b,h,p,m,x,E,I,_)];case 9:return ee.sent(),[3,11];case 10:throw F;case 11:return[3,12];case 12:return[2]}})})},y=function(b,h,p,m,x,E,I,v){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),m===void 0&&(m=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,g(p,m,x,b,h,E,I,v)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},C=function(b,h,p,m,x,E,I){return e(void 0,void 0,void 0,function(){var v,_,A,S,L,N;return t(this,function(D){switch(D.label){case 0:a=b,i=h,v=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,g(v,_,A,S,p,m,x,E,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,m,x,I)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(F){switch(F.label){case 0:return[4,y(S,p,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,x,I)];case 1:return F.sent(),[2]}})})},console.log("Heimdall: Interval Set on fetch token:",c),(0,s.subscribeToOnlineEvent)(L),[3,4];case 3:return N=D.sent(),console.log("ERROR: Fetching token failed",N),[3,4];case 4:return[2]}})})};return Qo.fetchAccessToken=C,Qo}var Yd;function Jd(){if(Yd)return gr;Yd=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(h){for(var p,m=1,x=arguments.length;m<x;m++){p=arguments[m];for(var E in p)Object.prototype.hasOwnProperty.call(p,E)&&(h[E]=p[E])}return h},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(h,p,m,x){function E(I){return I instanceof m?I:new m(function(v){v(I)})}return new(m||(m=Promise))(function(I,v){function _(L){try{S(x.next(L))}catch(N){v(N)}}function A(L){try{S(x.throw(L))}catch(N){v(N)}}function S(L){L.done?I(L.value):E(L.value).then(_,A)}S((x=x.apply(h,p||[])).next())})},n=ge&&ge.__generator||function(h,p){var m={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},x,E,I,v;return v={next:_(0),throw:_(1),return:_(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function _(S){return function(L){return A([S,L])}}function A(S){if(x)throw new TypeError("Generator is already executing.");for(;v&&(v=0,S[0]&&(m=0)),m;)try{if(x=1,E&&(I=S[0]&2?E.return:S[0]?E.throw||((I=E.return)&&I.call(E),0):E.next)&&!(I=I.call(E,S[1])).done)return I;switch(E=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,E=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(I=m.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){m.label=S[1];break}if(S[0]===6&&m.label<I[1]){m.label=I[1],I=S;break}if(I&&m.label<I[2]){m.label=I[2],m.ops.push(S);break}I[2]&&m.ops.pop(),m.trys.pop();continue}S=p.call(h,m)}catch(L){S=[6,L],E=0}finally{x=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(gr,"__esModule",{value:!0}),gr.hiverAxiosCall=gr.performAxiosCall=void 0;var r=Vd,o=Oe,s=Xd(),a=dn,i=Gn,c,d=2,f=function(h,p){var m=p.fetchCsrfToken();h.formData?h.formData.append("_csrf_token",m):(h.data=h.data||{},h.data._csrf_token=m)},g=function(h,p){var m={};!h.method||h.method.toLowerCase()==="get"?m={params:h.params?h.params:h.data}:m=h.params?{params:h,data:h.data}:{data:h.data};var x=e(e({method:h.method,url:"".concat(h.root_url).concat(h.url),headers:h.headers},m),{withCredentials:p,responseType:(h==null?void 0:h.responseType)||""});return x};function y(h,p){return p===void 0&&(p=!0),t(this,void 0,void 0,function(){var m;return n(this,function(x){return m=g(h,p),[2,(0,r.default)(m).then(function(E){return E}).catch(function(E){throw E})]})})}gr.performAxiosCall=y;function C(h,p,m){return t(this,void 0,void 0,function(){var x,E,I;return n(this,function(v){switch(v.label){case 0:return v.trys.push([0,6,,8]),h.authTokenFetchingInProgress?[3,2]:(h.authTokenFetchingInProgress=!0,x=h.appEnv,E=h.tier,[4,(0,s.fetchAccessToken)(x,E,p,h.tenantPlatform,h.getTokenForLogin,m)]);case 1:return v.sent(),h.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(_){return setTimeout(_,100)})];case 3:return v.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,C(h,p,m)];case 4:v.sent(),v.label=5;case 5:return[3,8];case 6:return I=v.sent(),console.log("Error while fetching Auth Token :",I),h.authTokenFetchingInProgress=!1,[4,C(h,p,m)];case 7:return v.sent(),[3,8];case 8:return[2]}})})}function b(h,p,m,x,E){var I,v;return E===void 0&&(E=0),t(this,void 0,void 0,function(){var _,A,S,L,N,D,F;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(m.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,C(h,S,x)]):[3,2];case 1:M.sent(),M.label=2;case 2:return h.csrfToken&&f(p,m),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"}),m.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 N=M.sent(),p.onSuccess&&p.onSuccess(N),[2,N];case 4:if(D=M.sent(),F=((I=D.response)===null||I===void 0?void 0:I.status)===403||((v=D.request)===null||v===void 0?void 0:v.status)===403,E<d&&F)return(0,o.expireToken)(),[2,b(h,p,m,x,E+1)];if(E>=d&&F||!F)throw p.onFail&&p.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return gr.hiverAxiosCall=b,gr}var $o={},Ge={},Je={};Object.defineProperty(Je,"__esModule",{value:!0}),Je.TIERS=Je.APP_UI=Je.CONFIG_HIVER=Je.REFETCH_CHECK_DELAY=Je.INITIAL_RETRY_DELAY=Je.MAX_BACKOFF_LIMIT=Je.MAX_CONFLICT_RETRY_DELAY=Je.MAX_RETRY_DELAY=Je.GET_METHOD=void 0,Je.GET_METHOD="GET",Je.MAX_RETRY_DELAY=18e4,Je.MAX_CONFLICT_RETRY_DELAY=63e3,Je.MAX_BACKOFF_LIMIT=8e3,Je.INITIAL_RETRY_DELAY=1e3,Je.REFETCH_CHECK_DELAY=168e4,Je.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Je.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Je.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var Et={};Object.defineProperty(Et,"__esModule",{value:!0}),Et.getProdHqConfig=Et.getProdApiConfig=Et.getSitHqConfig=Et.getSitApiConfig=Et.getDevHqConfig=Et.getDevApiConfig=void 0;var ro={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},ib=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:ro}};Et.getDevApiConfig=ib;var cb=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:ro}};Et.getDevHqConfig=cb;var lb=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:ro}};Et.getSitApiConfig=lb;var ub=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:ro}};Et.getSitHqConfig=ub;var db=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:ro}};Et.getProdApiConfig=db;var fb=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:ro}};Et.getProdHqConfig=fb;var pb=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{d(r.next(f))}catch(g){a(g)}}function c(f){try{d(r.throw(f))}catch(g){a(g)}}function d(f){f.done?s(f.value):o(f.value).then(i,c)}d((r=r.apply(e,t||[])).next())})},hb=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(d){return function(f){return c([d,f])}}function c(d){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,d[0]&&(n=0)),n;)try{if(r=1,o&&(s=d[0]&2?o.return:d[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,d[1])).done)return s;switch(o=0,s&&(d=[d[0]&2,s.value]),d[0]){case 0:case 1:s=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,o=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!s||d[1]>s[0]&&d[1]<s[3])){n.label=d[1];break}if(d[0]===6&&n.label<s[1]){n.label=s[1],s=d;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(d);break}s[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(f){d=[6,f],o=0}finally{r=s=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.expireToken=Ge.validateToken=Ge.validateAccount=Ge.getConfig=Ge.introduceDelay=Ge.isTokenInExpiryWindow=Ge.getStoredAuthData=Ge.setUserDetails=Ge.setTokenAndExpiry=Ge.getRandomDelay=Ge.hasValidToken=void 0;var mc=Je,yr=Et,qd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},bc=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};Ge.validateAccount=bc;var gb=function(e){var t=bc(e);return!Qd()&&t};Ge.validateToken=gb;var mb=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ge.expireToken=mb;var bb=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=qd(),o=bc(e);return r<n&&o};Ge.hasValidToken=bb;var yb=function(){return Math.floor(Math.random()*6e4)+6e4};Ge.getRandomDelay=yb;var xb=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)};Ge.setUserDetails=xb;var Cb=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Ge.setTokenAndExpiry=Cb;var Eb=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}};Ge.getStoredAuthData=Eb;var Qd=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=qd(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Ge.isTokenInExpiryWindow=Qd;var vb=function(e){return pb(void 0,void 0,void 0,function(){return hb(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Ge.introduceDelay=vb;var wb=function(e,t,n){switch(t){case mc.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,yr.getSitHqConfig)(e)),n?(0,yr.getSitApiConfig)(e):(0,yr.getSitHqConfig)(e);case mc.TIERS.PROD:return n?(0,yr.getProdApiConfig)():(0,yr.getProdHqConfig)();case mc.TIERS.DEV:default:return n?(0,yr.getDevApiConfig)():(0,yr.getDevHqConfig)()}};Ge.getConfig=wb;var Uo={},Sn={},$d;function Ib(){if($d)return Sn;$d=1;var e=ge&&ge.__awaiter||function(y,C,b,h){function p(m){return m instanceof b?m:new b(function(x){x(m)})}return new(b||(b=Promise))(function(m,x){function E(_){try{v(h.next(_))}catch(A){x(A)}}function I(_){try{v(h.throw(_))}catch(A){x(A)}}function v(_){_.done?m(_.value):p(_.value).then(E,I)}v((h=h.apply(y,C||[])).next())})},t=ge&&ge.__generator||function(y,C){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},h,p,m,x;return x={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function E(v){return function(_){return I([v,_])}}function I(v){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,v[0]&&(b=0)),b;)try{if(h=1,p&&(m=v[0]&2?p.return:v[0]?p.throw||((m=p.return)&&m.call(p),0):p.next)&&!(m=m.call(p,v[1])).done)return m;switch(p=0,m&&(v=[v[0]&2,m.value]),v[0]){case 0:case 1:m=v;break;case 4:return b.label++,{value:v[1],done:!1};case 5:b.label++,p=v[1],v=[0];continue;case 7:v=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(v[0]===6||v[0]===2)){b=0;continue}if(v[0]===3&&(!m||v[1]>m[0]&&v[1]<m[3])){b.label=v[1];break}if(v[0]===6&&b.label<m[1]){b.label=m[1],m=v;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(v);break}m[2]&&b.ops.pop(),b.trys.pop();continue}v=C.call(y,b)}catch(_){v=[6,_],p=0}finally{h=m=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.getV2LoginCode=Sn.getLoginToken=Sn.getAccessToken=void 0;var n=Je,r=t0(),o=Ge,s=function(y,C,b){var h=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:C.userId,usergroup_id:C.usergroupId,access_token:(h==null?void 0:h.token)||"",source:b},withCredentials:!0}},a=function(y,C){return{root_url:C.heimdallUrl,url:C.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,C){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:C||n.APP_UI.DEFAULT}}},d=function(y,C,b,h){return e(void 0,void 0,void 0,function(){var p,m,x,E,I,v,_;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(C,b,h),[4,(0,r.makeAxiosCall)(p,y)]);case 1:return m=A.sent(),[2,{atToken:(E=m==null?void 0:m.data.at)===null||E===void 0?void 0:E.token,expiryTime:(I=m==null?void 0:m.data.at)===null||I===void 0?void 0:I.expires_at,userId:(v=m==null?void 0:m.data)===null||v===void 0?void 0:v.user_id,userGroupId:(_=m==null?void 0:m.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw x=A.sent(),x;case 5:return[2]}})})};Sn.getAccessToken=d;var f=function(y,C,b){return e(void 0,void 0,void 0,function(){var h,p,m,x,E,I,v;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,C)];case 2:return p=_.sent(),[2,{userId:(x=p==null?void 0:p.data)===null||x===void 0?void 0:x.user_id,userGroupId:(E=p==null?void 0:p.data)===null||E===void 0?void 0:E.usergroup_id,atToken:(I=p==null?void 0:p.data.at)===null||I===void 0?void 0:I.token,expiryTime:(v=p==null?void 0:p.data.at)===null||v===void 0?void 0:v.expires_at}];case 3:throw m=_.sent(),m;case 4:return[2]}})})};Sn.getLoginToken=f;var g=function(y,C,b){return e(void 0,void 0,void 0,function(){var h,p,m;return t(this,function(x){switch(x.label){case 0:return x.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",b),h=c(C,b),[4,(0,r.makeAxiosCall)(h,y)];case 1:return p=x.sent(),console.log("DEBUG HEIMDALL: local storage:",p==null?void 0:p.data),[2,p==null?void 0:p.data.code];case 2:throw m=x.sent(),m;case 3:return[2]}})})};return Sn.getV2LoginCode=g,Sn}var Ud;function Kd(){if(Ud)return Uo;Ud=1;var e=ge&&ge.__awaiter||function(C,b,h,p){function m(x){return x instanceof h?x:new h(function(E){E(x)})}return new(h||(h=Promise))(function(x,E){function I(A){try{_(p.next(A))}catch(S){E(S)}}function v(A){try{_(p.throw(A))}catch(S){E(S)}}function _(A){A.done?x(A.value):m(A.value).then(I,v)}_((p=p.apply(C,b||[])).next())})},t=ge&&ge.__generator||function(C,b){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},p,m,x,E;return E={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function I(_){return function(A){return v([_,A])}}function v(_){if(p)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(h=0)),h;)try{if(p=1,m&&(x=_[0]&2?m.return:_[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,_[1])).done)return x;switch(m=0,x&&(_=[_[0]&2,x.value]),_[0]){case 0:case 1:x=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,m=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!x||_[1]>x[0]&&_[1]<x[3])){h.label=_[1];break}if(_[0]===6&&h.label<x[1]){h.label=x[1],x=_;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(_);break}x[2]&&h.ops.pop(),h.trys.pop();continue}_=b.call(C,h)}catch(A){_=[6,A],m=0}finally{p=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.fetchToken=void 0;var n=Ib(),r=Je,o=Ge,s,a,i,c=function(C,b,h){return h===void 0&&(h=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var p,m,x,E,I,v,_,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,C,h)];case 2:return m=L.sent(),[4,(0,n.getLoginToken)(m,r.CONFIG_HIVER,C)];case 3:return x=L.sent(),E=x.userId,I=x.userGroupId,v=x.atToken,_=x.expiryTime,(0,o.setTokenAndExpiry)(v,_),(0,o.setUserDetails)(E,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(C,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]}})})},d=function(C,b,h){return e(void 0,void 0,void 0,function(){var p,m,x,E;return t(this,function(I){switch(I.label){case 0:return b<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(v){return setTimeout(v,C)})]:[3,3];case 1:return I.sent(),b+=C,C*2<=r.MAX_BACKOFF_LIMIT?C*=2:C=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",C),p=h.retryDelay,m=h.configs,x=h.api_params,E=h.appUI,[4,f(p,C,b,m,x,E)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},f=function(C,b,h,p,m,x,E){return x===void 0&&(x="default"),e(void 0,void 0,void 0,function(){var I,v,_,A,S,L,N,D,F,M,B,V,Y,W;return t(this,function(H){switch(H.label){case 0:return H.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,p,m,x)];case 1:return I=H.sent(),v=I.atToken,_=I.expiryTime,A=I.userId,S=I.userGroupId,v&&_&&(0,o.setTokenAndExpiry)(v,_),A&&S&&(0,o.setUserDetails)(A,S),C=r.INITIAL_RETRY_DELAY,b=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return L=H.sent(),console.log("ERROR: Heimdall fetch token",L),((F=L.response)===null||F===void 0?void 0:F.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(N=1,[4,c(p,N,E)]):[3,4];case 3:return H.sent(),[3,11];case 4:return((B=L.response)===null||B===void 0?void 0:B.status)===409||((V=L.request)===null||V===void 0?void 0:V.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:C,configs:p,api_params:m,appUI:E},[4,d(b,h,D)]):[3,6];case 5:if(H.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((Y=L.response)===null||Y===void 0?void 0:Y.status)===422||((W=L.request)===null||W===void 0?void 0:W.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return C<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,C)})]:[3,10];case 8:return H.sent(),C*=2,console.log("Heimdall: Fetch token post doubling retry delay",C),[4,f(C,b,h,p,m,E)];case 9:return H.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(C,b,h,p,m,x){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),p===void 0&&(p=r.INITIAL_RETRY_DELAY),m===void 0&&(m=0),e(void 0,void 0,void 0,function(){var E,I,v;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),E=(0,o.isTokenInExpiryWindow)(),E?(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,m,C,b,x)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw v=_.sent(),v;case 5:return[2]}})})},y=function(C,b,h,p,m,x){return e(void 0,void 0,void 0,function(){var E,I,v,_,A;return t(this,function(S){switch(S.label){case 0:s=C,a=b,E=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,v=0,_=(0,o.getConfig)(s,a,p),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,f(E,I,v,_,h,m,x)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return g(_,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,g(_,h)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw A=S.sent(),A;case 4:return[2]}})})};return Uo.fetchToken=y,Uo}var e0;function t0(){if(e0)return $o;e0=1;var e=ge&&ge.__assign||function(){return e=Object.assign||function(y){for(var C,b=1,h=arguments.length;b<h;b++){C=arguments[b];for(var p in C)Object.prototype.hasOwnProperty.call(C,p)&&(y[p]=C[p])}return y},e.apply(this,arguments)},t=ge&&ge.__awaiter||function(y,C,b,h){function p(m){return m instanceof b?m:new b(function(x){x(m)})}return new(b||(b=Promise))(function(m,x){function E(_){try{v(h.next(_))}catch(A){x(A)}}function I(_){try{v(h.throw(_))}catch(A){x(A)}}function v(_){_.done?m(_.value):p(_.value).then(E,I)}v((h=h.apply(y,C||[])).next())})},n=ge&&ge.__generator||function(y,C){var b={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},h,p,m,x;return x={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function E(v){return function(_){return I([v,_])}}function I(v){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,v[0]&&(b=0)),b;)try{if(h=1,p&&(m=v[0]&2?p.return:v[0]?p.throw||((m=p.return)&&m.call(p),0):p.next)&&!(m=m.call(p,v[1])).done)return m;switch(p=0,m&&(v=[v[0]&2,m.value]),v[0]){case 0:case 1:m=v;break;case 4:return b.label++,{value:v[1],done:!1};case 5:b.label++,p=v[1],v=[0];continue;case 7:v=b.ops.pop(),b.trys.pop();continue;default:if(m=b.trys,!(m=m.length>0&&m[m.length-1])&&(v[0]===6||v[0]===2)){b=0;continue}if(v[0]===3&&(!m||v[1]>m[0]&&v[1]<m[3])){b.label=v[1];break}if(v[0]===6&&b.label<m[1]){b.label=m[1],m=v;break}if(m&&b.label<m[2]){b.label=m[2],b.ops.push(v);break}m[2]&&b.ops.pop(),b.trys.pop();continue}v=C.call(y,b)}catch(_){v=[6,_],p=0}finally{h=m=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty($o,"__esModule",{value:!0}),$o.makeAxiosCall=void 0;var r=Vd,o=Ge,s=Kd(),a,i=2,c=function(y,C){var b=C.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",b):(y.data=y.data||{},y.data._csrf_token=b)},d=function(y){var C=!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},C),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return b};function f(y){return t(this,void 0,void 0,function(){var C;return n(this,function(b){return C=d(y),[2,(0,r.default)(C).then(function(h){return h}).catch(function(h){throw h})]})})}function g(y,C,b,h){var p,m;return h===void 0&&(h=0),t(this,void 0,void 0,function(){var x,E,I,v,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(C.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(x=y.app_env,E=y.tier,!x||!E)throw Error("app_env or tier missing : ".concat(x,"/").concat(E));return"userId"in y&&"usergroupId"in y?(I={userId:y.userId,usergroupId:y.usergroupId},typeof C.isHiverApiDomain!="boolean"&&(C.isHiverApiDomain=!0),[4,(0,s.fetchToken)(x,E,I,C.isHiverApiDomain,b)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,C),C.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",y.headers=e(e({},y.headers),{Authorization:"Bearer ".concat(a)})),[4,f(y)];case 3:return v=S.sent(),y.onSuccess&&y.onSuccess(v),[2,v];case 4:if(_=S.sent(),A=((p=_.response)===null||p===void 0?void 0:p.status)===403||((m=_.request)===null||m===void 0?void 0:m.status)===403,h<i&&A)return(0,o.expireToken)(),[2,g(y,C,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 $o.makeAxiosCall=g,$o}(function(e){var t=ge&&ge.__awaiter||function(C,b,h,p){function m(x){return x instanceof h?x:new h(function(E){E(x)})}return new(h||(h=Promise))(function(x,E){function I(A){try{_(p.next(A))}catch(S){E(S)}}function v(A){try{_(p.throw(A))}catch(S){E(S)}}function _(A){A.done?x(A.value):m(A.value).then(I,v)}_((p=p.apply(C,b||[])).next())})},n=ge&&ge.__generator||function(C,b){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},p,m,x,E;return E={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function I(_){return function(A){return v([_,A])}}function v(_){if(p)throw new TypeError("Generator is already executing.");for(;E&&(E=0,_[0]&&(h=0)),h;)try{if(p=1,m&&(x=_[0]&2?m.return:_[0]?m.throw||((x=m.return)&&x.call(m),0):m.next)&&!(x=x.call(m,_[1])).done)return x;switch(m=0,x&&(_=[_[0]&2,x.value]),_[0]){case 0:case 1:x=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,m=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(x=h.trys,!(x=x.length>0&&x[x.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!x||_[1]>x[0]&&_[1]<x[3])){h.label=_[1];break}if(_[0]===6&&h.label<x[1]){h.label=x[1],x=_;break}if(x&&h.label<x[2]){h.label=x[2],h.ops.push(_);break}x[2]&&h.ops.pop(),h.trys.pop();continue}_=b.call(C,h)}catch(A){_=[6,A],m=0}finally{p=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=Jd(),o=Xd(),s=Gn;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=Wd(),i=Oe,c=dn,d=t0();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return d.makeAxiosCall}});var f=Kd();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var g=fn,y=function(){function C(b,h,p,m,x,E){p===void 0&&(p=s.TENANT_PLATFORM.GMAIL),m===void 0&&(m=null),x===void 0&&(x=!0),E===void 0&&(E=!1),this.setEnvironment(),this.appEnv=b,this.tier=h,this.tenantPlatform=p,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=m,this.withCredentials=x,this.csrfToken=E}return C.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},C.prototype.hiverAxios=function(b,h,p,m){return h===void 0&&(h=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var x,E;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),m&&m<2?(x={userId:b.userId,usergroupId:b.usergroupId,apiRetry:m},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,x,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:I.sent(),I.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,b,h,p)];case 3:return[2,I.sent()];case 4:throw E=I.sent(),console.log("ERROR: Axios call failed",E),E;case 5:return[2]}})})},C.prototype.fetchAuthToken=function(b,h,p){return t(this,void 0,void 0,function(){var m;return n(this,function(x){switch(x.label){case 0:return x.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,b,this.tenantPlatform,this.getTokenForLogin,h,p)]);case 1:return x.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),x.label=3;case 3:return[3,8];case 4:return m=x.sent(),console.log("ERROR: Fetching token failed",m),this.authTokenFetchingInProgress=!1,[4,new Promise(function(E){return setTimeout(E,100)})];case 5:return x.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(b,h,p)];case 6:return x.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},C.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]}})})},C.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},C}();e.Bifrost=y})(Ji);const zt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Rt=()=>{if(!zt.isInitiated)return null;if(!zt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return zt},_b=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=Ji.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i,onUserAuthRequired:c})=>{zt.baseUrl=e,zt.appEnv=t,zt.tier=n,zt.userGroupId=o,zt.userId=r,zt.tenantPlatform=s,zt.onUserAuthRequired=c,zt.bifrost=new Ji.Bifrost(t,n,s,i,a),zt.isInitiated=!0},ve=(({configHiver:e})=>async n=>{var y,C,b;const r=Rt();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:d}=n,g={root_url:(d||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(g,{...e,isHiverApiDomain:!0}))}catch(h){const p=h,m=(y=p==null?void 0:p.response)==null?void 0:y.status,x=(C=p==null?void 0:p.response)==null?void 0:C.data;if(m===412&&(x==null?void 0:x.error_code)==="USER_AUTH_REQUIRED")try{(b=r.onUserAuthRequired)==null||b.call(r,x)}catch(E){console.error("onUserAuthRequired callback threw: ",E)}throw console.error("API call failed with error: ",h),h}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Sb=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)"})))),Ab=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"})),Tb=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"})))),Lb="Rate your experience with Hiver Apps",Ob="Share feedback on Apps",kb="Got any feedback?",n0="https://txeep2wshyx.typeform.com/to/RuOwF9SG",Fb="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",Db="https://cdn.hiverhq.com/chat-support/hiver-chat.html",Nb="enable_connectors_clicked",Rb="learn_more_clicked",Mb="connector_card_expand_clicked",jb="connector_card_collapsed_clicked",Pb="connector_card_refresh_clicked",Bb="connector_cards_loaded",Vb="connector_whats_new_card_viewed",Gb="connector_whats_new_explore_now_clicked",Hb="connector_whats_new_learn_more_clicked",Wb="connector_whats_new_dismissed",Zb="connector_create_new_object_clicked",zb="connector_link_new_object_clicked",Xb="connector_new_object_created_by_form",Yb="connector_new_object_linked_by_form",Jb="connector_object_unlinked_by_form",qb="connector_link_preview_clicked",Qb="connector_create_panel_cancel_clicked",r0="connector_create_panel_back_clicked",$b="card_loaded_on_click",Ub="card_loaded",Kb="schedule_call_clicked",e4="schedule_call_cross_clicked",o0="CONNECTOR_EDIT_CLICKED",t4="CONNECTOR_EDIT_REQUEST_SEND",n4="CONNECTOR_EDIT_CANCELLED",s0="CONNECTOR_EDIT_BACK_CLICKED",r4="CONNECTOR_EDIT_SUCCESS",o4="connector_video_clicked",s4="connector_card_error",yc="got_any_feedback_clicked",a4="connector_deeplink_clicked",i4="search_bar_tapped",c4="search_suggestions_selected",l4="search_initiated",u4="no_results_found",d4="search_results_found",f4="search_result_selected",p4="search_result_linked",h4="feedback_closed_clicked",g4="help_btn_clicked",m4="connector_chat_support_clicked",b4="add_custom_field_clicked",y4="add_custom_field_success",x4="update_custom_field_success",a0="clicked_on_lookup_config",C4="clicked_on_lookup_field",E4="saved_lookup_config",v4="settings_defaults_modal_opened",w4="defaults_configuration_saved",I4={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},He=w.createContext(I4),la="hiver_connectors",xc={NOT_FOUND:404},_4="ftr-connector-blue-dot",i0="ftr-connectors-write-flow",S4="ftr-connectors-enhancements",A4="ftr-connector-schedule-call-agent",T4="ftr-connectors-edit",L4="enableAllConnectorFtr",O4="ftr-cards-open-state",k4="ftr-connectors-global-search",F4="ftr-connectors-smart-suggestions",D4="ftr-connectors-email-selection",N4="ftr-connector-agent-feedback",ua="ftr-connector-unified-view",R4="ftr-connectors-expanded-form",c0="ftr-apps-lookup-revamp",M4="ftr-ci-configurable-fields",l0="Please refresh and try again",j4="No data available",Ko="-",u0="Refresh",d0="Minimize",Cc="Expand",f0="Connectors",Ec="Apps",P4="Collapse",B4="Close",p0="Link",V4="Create",G4="Update",h0="Unlink",g0="Edit",vc="Cancel",wc="Create new object",m0="Link existing object",H4="Are you sure you want to unlink this object?",W4="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.",Z4="Edit card",z4="bullet_list",X4="Expanded",Y4="Collapsed",b0="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",y0="UNKNOWN_ERROR",J4="WORKSPACE_ACCESS_DENIED",q4="You don't have access to this card's workspace",Q4="https://help.hiverhq.com/custom-connectors/common-connector-errors",x0={MAIN_BUTTON:"main_button",ICON:"create_icon"},$4=" Add custom field",Ic=e=>{let t=localStorage.getItem(la);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},U4=e=>!!Ic(e),C0=()=>{const{userId:e=""}=Rt()||{};return String(e)},K4=(e,t=C0())=>{const n=Ic(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},_c=(e,t=!1,n=!1)=>{const r=C0(),o=Ic(e);if(t||!o){localStorage.removeItem(la);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(la,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(la,JSON.stringify(i));return}},rt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[L4])===!0:(e==null?void 0:e[t])===!0,ot=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),E0=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?X4:Y4,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},v0=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==xc.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)!==xc.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},e5=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)},Sc=({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 w0(e,t){return e.length>t?e.substring(0,t)+"...":e}const t5=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)"})))),n5=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)"})))),r5=l.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
|
-
`,
|
|
52
|
+
`,o5=l.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
|
-
`,
|
|
65
|
+
`,s5=l.styled(l.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: ${
|
|
96
|
+
animation: ${r5} 0.4s ease-in forwards;
|
|
97
97
|
}
|
|
98
|
-
`,
|
|
98
|
+
`,a5=l.styled(l.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: ${
|
|
115
|
+
animation: ${o5} 0.4s ease-in forwards;
|
|
116
116
|
}
|
|
117
|
-
`,
|
|
117
|
+
`,i5=l.styled(l.IconButton)`
|
|
118
118
|
position: absolute;
|
|
119
119
|
right: -8px;
|
|
120
120
|
top: -5px;
|
|
121
|
-
`,
|
|
121
|
+
`,c5=l.styled(l.Stack)`
|
|
122
122
|
margin-top: 8px;
|
|
123
123
|
flex-direction: row;
|
|
124
124
|
flex-wrap: wrap;
|
|
125
125
|
gap: 12px;
|
|
126
|
-
`,
|
|
126
|
+
`,l5=l.styled(l.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
|
-
`,
|
|
150
|
+
`,u5=l.styled(l.Typography)`
|
|
151
151
|
letter-spacing: 0.042px;
|
|
152
|
-
`,
|
|
152
|
+
`,d5=({rating:e,setRating:t,count:n=5})=>{const[r,o]=w.useState(e),s=r??e,a=d=>{t(d)},i=d=>{o(d)},c=()=>{o(0)};return u.jsx(c5,{onMouseLeave:c,children:Array.from({length:n},(d,f)=>{const g=f<s;return u.jsx(l5,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:u.jsxs("div",{children:[u.jsx(n5,{width:"20px",height:"20px",style:{opacity:g?1:0,zIndex:g?2:1}}),u.jsx(t5,{width:"20px",height:"20px",style:{opacity:g?0:1,zIndex:g?1:2}})]})},f)})})},f5=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=w.useContext(He),{userGroupId:s,userId:a}=Rt()||{},i=Sc({url:n0,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[c,d]=w.useState(t),[f,g]=w.useState(!1),[y,C]=w.useState(0),b=()=>{window.open(i,"_blank","noopener,noreferrer"),r(yc,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),qs(a)},h=x=>{r(yc,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:x});const E=Sc({url:Fb,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(x)}});C(x),window.open(E,"_blank"),d(!1),qs(a)},p=()=>{r(h4,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),g(!0),qs(a)},m=()=>{f&&(d(!1),g(!1))};return u.jsxs(u.Fragment,{children:[u.jsxs(a5,{className:f||!c?"slide-down-out":"",onAnimationEnd:m,children:[u.jsxs(l.Stack,{width:"100%",direction:"row",gap:"8px",children:[u.jsx(Ab,{}),u.jsxs(l.Box,{width:"175px",children:[u.jsx(u5,{variant:"h3",children:Lb}),u.jsx(d5,{rating:y,setRating:h})]})]}),u.jsx(l.Box,{position:"relative",children:u.jsx(l.Tooltip,{title:"Close",children:u.jsx(i5,{onClick:p,children:u.jsx(Tb,{width:"16px",height:"16px"})})})})]}),u.jsx(s5,{className:f||!c?"fade-in":"",children:u.jsxs(l.Button,{size:"small",variant:"outlined",color:"tertiary",onClick:b,children:[u.jsx(Sb,{}),Ob]})})]})},p5="Need setup help?",h5="Expert setup assistance available! Book a 15 min call with our integration specialist.",g5="Schedule call",m5="https://calendar.app.google/V2cJcwKMV4ax9rpk9",I0="agent_panel",Ac="hiver_schedule_call_close_button_click",b5=l.styled(l.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: ${l.theme.palette.gray.white};
|
|
159
159
|
box-shadow: 0px 0px 8px 0px #0000001a;
|
|
160
|
-
`,
|
|
160
|
+
`,y5=l.styled(l.Stack)`
|
|
161
161
|
width: 100%;
|
|
162
162
|
gap: 4px;
|
|
163
163
|
justify-content: space-between;
|
|
164
|
-
`,
|
|
164
|
+
`,x5=l.styled(l.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
|
-
`,
|
|
178
|
+
`,C5=l.styled(l.icons.Close)`
|
|
179
179
|
height: 20px;
|
|
180
180
|
width: 20px;
|
|
181
181
|
cursor: pointer;
|
|
182
|
-
`,
|
|
182
|
+
`,E5=l.styled(l.icons.CalendarTodayOutlinedIcon)`
|
|
183
183
|
height: 16px;
|
|
184
184
|
width: 16px;
|
|
185
|
-
`,E5=l.styled(l.Typography)`
|
|
186
|
-
color: ${l.theme.palette.gray.black};
|
|
187
185
|
`,v5=l.styled(l.Typography)`
|
|
186
|
+
color: ${l.theme.palette.gray.black};
|
|
187
|
+
`,w5=l.styled(l.Typography)`
|
|
188
188
|
color: ${l.theme.palette.gray.gray2};
|
|
189
|
-
`,w5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=w.useContext(Ge),[r,o]=w.useState(()=>!(localStorage.getItem(Ac)==="true")&&rt(e,S4));w.useEffect(()=>{localStorage.getItem(Ac)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(Ac,"true"),o(!1),t(Kb,{source:I0})},a=()=>{window.open(g5,"_blank"),t(Ub,{source:I0})};return!r||!n?null:u.jsxs(m5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[u.jsxs(b5,{gap:"4px",children:[u.jsxs(l.Stack,{direction:"row",justifyContent:"space-between",children:[u.jsx(E5,{variant:"body1_medium",children:f5}),u.jsx(l.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:u.jsx(l.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(l.IconButton,{children:u.jsx(x5,{})})})})]}),u.jsx(v5,{variant:"body2",children:p5})]}),u.jsx(l.Stack,{onClick:a,direction:"row",alignItems:"center",children:u.jsxs(y5,{variant:"outlined",size:"small",children:[u.jsx(C5,{}),h5]})})]})},I5="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",_0=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"})),_5="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",S5=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"})))),A5=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"})))),T5="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",S0=()=>{const{connectorId:e,store:t}=w.useContext(Ge),[n,r]=w.useState(!e),[o,s]=w.useState("");return w.useEffect(()=>{if(t&&e){const a=t.subscribe(i=>{s(i||""),r(!0)},"connectorName");return()=>a()}else r(!0)},[t,e]),{connectorId:e,connectorName:o,isReady:n}},L5=({options:e,anchor:t,open:n,onClose:r})=>u.jsx(l.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>u.jsxs(l.MenuItem,{onClick:o.onClick,children:[u.jsx(l.ListItemIcon,{children:o.icon}),o.label]},o.id))}),A0="connector-header-stuck",O5=l.styled(l.Stack)`
|
|
189
|
+
`,I5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=w.useContext(He),[r,o]=w.useState(()=>!(localStorage.getItem(Ac)==="true")&&rt(e,A4));w.useEffect(()=>{localStorage.getItem(Ac)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(Ac,"true"),o(!1),t(e4,{source:I0})},a=()=>{window.open(m5,"_blank"),t(Kb,{source:I0})};return!r||!n?null:u.jsxs(b5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[u.jsxs(y5,{gap:"4px",children:[u.jsxs(l.Stack,{direction:"row",justifyContent:"space-between",children:[u.jsx(v5,{variant:"body1_medium",children:p5}),u.jsx(l.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:u.jsx(l.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(l.IconButton,{children:u.jsx(C5,{})})})})]}),u.jsx(w5,{variant:"body2",children:h5})]}),u.jsx(l.Stack,{onClick:a,direction:"row",alignItems:"center",children:u.jsxs(x5,{variant:"outlined",size:"small",children:[u.jsx(E5,{}),g5]})})]})},_5="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",_0=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"})),S5="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",A5=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"})))),T5=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"})))),L5="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",S0=()=>{const{connectorId:e,store:t}=w.useContext(He),[n,r]=w.useState(!e),[o,s]=w.useState("");return w.useEffect(()=>{if(t&&e){const a=t.subscribe(i=>{s(i||""),r(!0)},"connectorName");return()=>a()}else r(!0)},[t,e]),{connectorId:e,connectorName:o,isReady:n}},O5=({options:e,anchor:t,open:n,onClose:r})=>u.jsx(l.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>u.jsxs(l.MenuItem,{onClick:o.onClick,children:[u.jsx(l.ListItemIcon,{children:o.icon}),o.label]},o.id))}),A0="connector-header-stuck",k5=l.styled(l.Stack)`
|
|
190
190
|
position: sticky;
|
|
191
191
|
top: 0;
|
|
192
192
|
box-sizing: content-box !important;
|
|
@@ -203,13 +203,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
203
203
|
&.${A0} {
|
|
204
204
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
205
205
|
}
|
|
206
|
-
`,
|
|
206
|
+
`,F5=l.styled(l.Stack)`
|
|
207
207
|
width: 0;
|
|
208
208
|
height: 0;
|
|
209
209
|
`,Tc={height:"36px",width:"36px",boxSizing:"border-box !important"},T0=l.styled(l.brandIcons.Connector)`
|
|
210
210
|
width: 20px;
|
|
211
211
|
height: 20px;
|
|
212
|
-
`,
|
|
212
|
+
`,da=l.styled(l.Typography)`
|
|
213
213
|
text-align: left;
|
|
214
214
|
color: ${l.theme.palette.gray.black};
|
|
215
215
|
`,L0=l.styled(l.Grid)`
|
|
@@ -226,7 +226,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
226
226
|
}
|
|
227
227
|
display: flex;
|
|
228
228
|
flex-direction: column;
|
|
229
|
-
`,
|
|
229
|
+
`,D5=l.styled(l.Box)`
|
|
230
230
|
flex-grow: 1;
|
|
231
231
|
overflow-y: auto;
|
|
232
232
|
overflow-x: hidden;
|
|
@@ -235,12 +235,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
235
235
|
`;l.styled(l.Box)`
|
|
236
236
|
width: inherit;
|
|
237
237
|
height: inherit;
|
|
238
|
-
`;const
|
|
238
|
+
`;const N5=l.styled(l.Box)`
|
|
239
239
|
margin-top: 12px;
|
|
240
240
|
border: 1px solid ${l.theme.palette.gray.gray5};
|
|
241
241
|
border-radius: 8px;
|
|
242
242
|
width: 100%;
|
|
243
|
-
`,
|
|
243
|
+
`,R5=l.styled(l.Stack)`
|
|
244
244
|
align-items: center;
|
|
245
245
|
padding: 11px;
|
|
246
246
|
width: 100%;
|
|
@@ -255,7 +255,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
255
255
|
`,O0=l.styled(l.Stack)`
|
|
256
256
|
flex-direction: row;
|
|
257
257
|
align-items: stretch;
|
|
258
|
-
`,
|
|
258
|
+
`,M5=l.styled(l.Stack)`
|
|
259
259
|
flex-direction: row;
|
|
260
260
|
flex-grow: 1;
|
|
261
261
|
align-items: center;
|
|
@@ -266,14 +266,14 @@ React keys must be passed directly to JSX without using spread:
|
|
|
266
266
|
height: 16px;
|
|
267
267
|
flex-shrink: 0;
|
|
268
268
|
}
|
|
269
|
-
`,
|
|
269
|
+
`,j5=l.styled(l.Typography)`
|
|
270
270
|
max-width: 150px;
|
|
271
271
|
min-width: 0;
|
|
272
272
|
letter-spacing: 0.5px;
|
|
273
273
|
text-overflow: ellipsis;
|
|
274
274
|
white-space: nowrap;
|
|
275
275
|
overflow: hidden;
|
|
276
|
-
`,
|
|
276
|
+
`,P5=l.styled(l.Box)`
|
|
277
277
|
box-sizing: border-box;
|
|
278
278
|
overflow-y: hidden;
|
|
279
279
|
height: ${e=>e.height?`${e.height}px`:"0px"};
|
|
@@ -282,20 +282,20 @@ React keys must be passed directly to JSX without using spread:
|
|
|
282
282
|
&.slideUp {
|
|
283
283
|
height: 0;
|
|
284
284
|
}
|
|
285
|
-
`,
|
|
285
|
+
`,B5=l.styled(l.Typography)`
|
|
286
286
|
text-transform: uppercase;
|
|
287
287
|
color: ${l.theme.palette.gray.gray3};
|
|
288
288
|
`,k0=l.styled(l.Typography)`
|
|
289
289
|
color: ${l.theme.palette.gray.gray4};
|
|
290
290
|
overflow: hidden;
|
|
291
291
|
word-break: break-word;
|
|
292
|
-
`,
|
|
292
|
+
`,V5=l.styled(l.Link)`
|
|
293
293
|
color: ${l.theme.palette.blue.primary};
|
|
294
294
|
display: inline;
|
|
295
295
|
whitespace: nowrap;
|
|
296
296
|
cursor: pointer;
|
|
297
297
|
text-decoration: none;
|
|
298
|
-
`,
|
|
298
|
+
`,G5=l.styled(l.Typography)`
|
|
299
299
|
&.ellipsisClass {
|
|
300
300
|
text-overflow: ellipsis;
|
|
301
301
|
white-space: nowrap;
|
|
@@ -317,12 +317,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
317
317
|
text-overflow: ellipsis;
|
|
318
318
|
-webkit-line-clamp: 3;
|
|
319
319
|
color: ${l.theme.palette.gray.gray1};
|
|
320
|
-
`,
|
|
320
|
+
`,H5=l.styled(l.Box)`
|
|
321
321
|
display: flex;
|
|
322
322
|
flex-wrap: wrap;
|
|
323
323
|
gap: 4px;
|
|
324
324
|
margin-top: 2px;
|
|
325
|
-
`,
|
|
325
|
+
`,W5=l.styled(l.Box)`
|
|
326
326
|
display: inline-flex;
|
|
327
327
|
align-items: center;
|
|
328
328
|
max-width: 100%;
|
|
@@ -401,7 +401,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
401
401
|
transform: rotate(360deg);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
`,
|
|
404
|
+
`,Z5=l.styled(l.Stack)`
|
|
405
405
|
flex-direction: row;
|
|
406
406
|
position: relative;
|
|
407
407
|
align-items: center;
|
|
@@ -415,10 +415,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
415
415
|
opacity: ${e=>e.isHovered?1:0};
|
|
416
416
|
transition: opacity ${e=>e.isHovered?"0.5s":"0.1s"} ease-in;
|
|
417
417
|
}
|
|
418
|
-
`,
|
|
418
|
+
`,z5=l.styled(l.TableHead)`
|
|
419
419
|
background-color: ${l.theme.palette.gray.white};
|
|
420
420
|
border-bottom: 1px solid ${l.theme.palette.gray.gray5};
|
|
421
|
-
`,
|
|
421
|
+
`,X5=l.styled(l.TableCell)`
|
|
422
422
|
height: 12px;
|
|
423
423
|
padding: 12px 16px;
|
|
424
424
|
border-top: 1px solid ${l.theme.palette.gray.gray5};
|
|
@@ -431,7 +431,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
431
431
|
&:nth-last-child(2) {
|
|
432
432
|
border-radius: 0px 5px 0px 0px;
|
|
433
433
|
}
|
|
434
|
-
`,
|
|
434
|
+
`,Y5=l.styled(l.TableRow)`
|
|
435
435
|
.row-edit {
|
|
436
436
|
visibility: hidden;
|
|
437
437
|
}
|
|
@@ -448,7 +448,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
448
448
|
border-radius: 0px 0px 5px 0px;
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
`,
|
|
451
|
+
`,J5=l.styled(l.TableCell)`
|
|
452
452
|
height: 32px;
|
|
453
453
|
padding: 8px 16px;
|
|
454
454
|
border-right: 1px solid ${l.theme.palette.gray.gray5};
|
|
@@ -456,39 +456,39 @@ React keys must be passed directly to JSX without using spread:
|
|
|
456
456
|
&:first-child {
|
|
457
457
|
border-left: 1px solid ${l.theme.palette.gray.gray5};
|
|
458
458
|
}
|
|
459
|
-
`,
|
|
459
|
+
`,q5=l.styled(l.TableCell)`
|
|
460
460
|
width: 34px;
|
|
461
461
|
position: sticky;
|
|
462
462
|
right: 0px;
|
|
463
463
|
background-color: white;
|
|
464
464
|
border: none;
|
|
465
465
|
padding: 0px 2px;
|
|
466
|
-
`,
|
|
466
|
+
`,Q5=l.styled(l.TableCell)`
|
|
467
467
|
padding: 16px 19px;
|
|
468
468
|
position: sticky;
|
|
469
469
|
right: 0px;
|
|
470
470
|
background-color: white;
|
|
471
471
|
border: none;
|
|
472
|
-
|
|
472
|
+
`,$5=l.styled("img")`
|
|
473
473
|
transition: transform 0.3s;
|
|
474
474
|
transform: rotate(${e=>e.transformAngle}deg);
|
|
475
|
-
|
|
475
|
+
`,U5=l.styled(l.Typography)`
|
|
476
476
|
display: flex;
|
|
477
477
|
color: ${l.theme.palette.blue.primary};
|
|
478
478
|
justify-content: flex-end;
|
|
479
479
|
align-items: center;
|
|
480
480
|
margin: 0 12px 12px 12px;
|
|
481
481
|
cursor: pointer;
|
|
482
|
-
`,
|
|
482
|
+
`,K5=l.styled(l.Typography)`
|
|
483
483
|
display: flex;
|
|
484
484
|
align-items: center;
|
|
485
485
|
line-height: 28px;
|
|
486
486
|
font-weight: 600;
|
|
487
|
-
`,
|
|
487
|
+
`,ey=l.styled(l.Box)`
|
|
488
488
|
margin-top: 12px;
|
|
489
489
|
border: 1px solid ${l.palette.gray.gray5};
|
|
490
490
|
border-radius: 4px;
|
|
491
|
-
`,
|
|
491
|
+
`,ty=l.styled(l.Stack)`
|
|
492
492
|
flex-direction: row;
|
|
493
493
|
align-items: center;
|
|
494
494
|
background-color: #e1e8ff;
|
|
@@ -496,7 +496,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
496
496
|
box-sizing: border-box;
|
|
497
497
|
height: 48px;
|
|
498
498
|
justify-content: space-between;
|
|
499
|
-
`,
|
|
499
|
+
`,ny=l.styled(l.Box)`
|
|
500
500
|
overflow: hidden;
|
|
501
501
|
transition: max-height 300ms;
|
|
502
502
|
&.slideUp {
|
|
@@ -505,17 +505,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
505
505
|
&.slideDown {
|
|
506
506
|
max-height: ${({height:e})=>e?`${e}px`:"0px"};
|
|
507
507
|
}
|
|
508
|
-
`,
|
|
508
|
+
`,ry=l.styled(l.Box)`
|
|
509
509
|
background-color: #f0f3ff99;
|
|
510
510
|
padding: 14px 12px 8px 12px;
|
|
511
511
|
box-sizing: border-box;
|
|
512
|
-
`,
|
|
512
|
+
`,oy=l.styled(l.Box)`
|
|
513
513
|
margin-bottom: 12px;
|
|
514
514
|
margin-top: 8px;
|
|
515
515
|
li {
|
|
516
516
|
display: list-item;
|
|
517
517
|
}
|
|
518
|
-
`,
|
|
518
|
+
`,sy=l.styled(l.Stack)`
|
|
519
519
|
margin-bottom: 6px;
|
|
520
520
|
list-style-type: disc;
|
|
521
521
|
margin-left: ${e=>e.marginLeft?`${e.marginLeft}`:"14px"};
|
|
@@ -527,35 +527,35 @@ React keys must be passed directly to JSX without using spread:
|
|
|
527
527
|
height: 20px;
|
|
528
528
|
border-radius: 2px;
|
|
529
529
|
}
|
|
530
|
-
`,
|
|
530
|
+
`,ay=l.styled(l.Button)`
|
|
531
531
|
height: 28px;
|
|
532
532
|
max-width: 115px;
|
|
533
533
|
white-space: pre;
|
|
534
|
-
`,
|
|
534
|
+
`,iy=l.styled(l.Typography)`
|
|
535
535
|
font-weight: 500;
|
|
536
536
|
height: 100%;
|
|
537
|
-
`,
|
|
537
|
+
`,cy=l.styled(l.Box)`
|
|
538
538
|
&:last-child {
|
|
539
539
|
margin-bottom: 16px;
|
|
540
540
|
}
|
|
541
|
-
`,
|
|
541
|
+
`,ly=l.styled(l.Typography)`
|
|
542
542
|
white-space: nowrap;
|
|
543
543
|
overflow: hidden;
|
|
544
544
|
text-overflow: ellipsis;
|
|
545
545
|
max-width: 100%;
|
|
546
546
|
height: 100%;
|
|
547
547
|
color: ${l.theme.palette.gray.gray2};
|
|
548
|
-
`,
|
|
548
|
+
`,uy=l.styled(l.Stack)`
|
|
549
549
|
padding: 8px 16px;
|
|
550
550
|
color: ${l.theme.palette.gray.black};
|
|
551
|
-
`,
|
|
551
|
+
`,dy=l.styled(l.Typography)`
|
|
552
552
|
white-space: nowrap;
|
|
553
553
|
overflow: hidden;
|
|
554
554
|
text-overflow: ellipsis;
|
|
555
555
|
width: calc(100% - 20px);
|
|
556
556
|
display: inline-block;
|
|
557
557
|
color: ${l.theme.palette.gray.gray2};
|
|
558
|
-
`,
|
|
558
|
+
`,fy=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:a})=>{const i=w.useRef(null),c=w.useRef(null),[d,f]=w.useState(null),g=!!d,{connectorName:y,connectorId:C,isReady:b}=S0(),{availableFeatures:h,sendTrackingEvent:p,currentSmIds:m,userEmail:x}=w.useContext(He),{userGroupId:E,userId:I}=Rt()||{},v=rt(h,ua),_=[{id:"rate-experience",label:"Rate your experience",icon:u.jsx(T5,{}),onClick:()=>{f(null);const L=Sc({url:n0,params:{email:x,user_id:I,ug_id:E,sm_ids:m.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(L,"_blank"),p(yc,{sm_ids:m,ug_id:E,connector_names:e,source:"help_drop_down"}),qs(I)}},{id:"instant-chat",label:"Instant chat with support",icon:u.jsx(A5,{}),onClick:()=>{f(null),window.open(Db,"_blank"),p(m4,{sm_ids:m,ug_id:E,connector_names:e,source:"help_drop_down"})}}],A=w.useCallback(L=>{const N=document.getElementById("connector-agent-container");if(!L||!N)return;c.current&&c.current.disconnect();const D=new IntersectionObserver(F=>{const M=i.current;for(const B of F)M==null||M.classList.toggle(A0,B.intersectionRatio===0)},{root:N});D.observe(L),c.current=D},[]),S=L=>{p(g4,{sm_ids:m,ug_id:E,connector_names:e}),f(L.currentTarget)};return b?u.jsxs(u.Fragment,{children:[u.jsx(F5,{ref:A}),u.jsx(O5,{options:_,anchor:d,open:g,onClose:()=>f(null)}),u.jsxs(k5,{ref:i,children:[y&&C?u.jsx(l.Stack,{direction:"row",alignItems:"center",gap:"8px",minHeight:"36px",children:u.jsx(da,{variant:"body_sm_medium",children:y})}):u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[v?u.jsx(_0,{width:"20px",height:"20px"}):u.jsx(T0,{}),u.jsx(da,{variant:"body_sm_medium",children:v?Ec:f0})]}),u.jsxs(l.Stack,{direction:"row",children:[u.jsx(l.Tooltip,{title:kb,placement:"bottom",children:u.jsx(l.IconButton,{onClick:S,id:"help-button",sx:Tc,children:u.jsx("img",{src:S5,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?u.jsxs(u.Fragment,{children:[r?u.jsx(l.Tooltip,{title:m0,placement:"bottom",children:u.jsx(l.IconButton,{onClick:a,sx:Tc,children:u.jsx("img",{src:L5,alt:"Link Task",height:"20px"})})}):null,n?u.jsx(l.Tooltip,{title:wc,placement:"bottom",children:u.jsx(l.IconButton,{onClick:s,sx:Tc,children:u.jsx("img",{src:_5,alt:"Add",height:"20px"})})}):null]}):null]})]})]}):null};var Oc={exports:{}},kc={};/**
|
|
559
559
|
* @license React
|
|
560
560
|
* use-sync-external-store-with-selector.production.min.js
|
|
561
561
|
*
|
|
@@ -563,7 +563,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
563
563
|
*
|
|
564
564
|
* This source code is licensed under the MIT license found in the
|
|
565
565
|
* LICENSE file in the root directory of this source tree.
|
|
566
|
-
*/var N0;function
|
|
566
|
+
*/var N0;function py(){if(N0)return kc;N0=1;var e=w;function t(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}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 kc.useSyncExternalStoreWithSelector=function(c,d,f,g,y){var C=o(null);if(C.current===null){var b={hasValue:!1,value:null};C.current=b}else b=C.current;C=a(function(){function p(v){if(!m){if(m=!0,x=v,v=g(v),y!==void 0&&b.hasValue){var _=b.value;if(y(_,v))return E=_}return E=v}if(_=E,n(x,v))return _;var A=g(v);return y!==void 0&&y(_,A)?_:(x=v,E=A)}var m=!1,x,E,I=f===void 0?null:f;return[function(){return p(d())},I===null?void 0:function(){return p(I())}]},[d,f,g,y]);var h=r(c,C[0],C[1]);return s(function(){b.hasValue=!0,b.value=h},[h]),i(h),h},kc}var Fc={};/**
|
|
567
567
|
* @license React
|
|
568
568
|
* use-sync-external-store-with-selector.development.js
|
|
569
569
|
*
|
|
@@ -571,30 +571,30 @@ React keys must be passed directly to JSX without using spread:
|
|
|
571
571
|
*
|
|
572
572
|
* This source code is licensed under the MIT license found in the
|
|
573
573
|
* LICENSE file in the root directory of this source tree.
|
|
574
|
-
*/var R0;function
|
|
574
|
+
*/var R0;function hy(){return R0||(R0=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(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&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(d,f,g,y,C){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,v,_,A=function(D){if(!I){I=!0,v=D;var F=y(D);if(C!==void 0&&h.hasValue){var M=h.value;if(C(M,F))return _=M,M}return _=F,F}var B=v,V=_;if(n(B,D))return V;var Y=y(D);return C!==void 0&&C(V,Y)?V:(v=D,_=Y,Y)},S=g===void 0?null:g,L=function(){return A(f())},N=S===null?void 0:function(){return A(S())};return[L,N]},[f,g,y,C]),m=p[0],x=p[1],E=r(d,m,x);return s(function(){h.hasValue=!0,h.value=E},[E]),i(E),E}Fc.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Fc}process.env.NODE_ENV==="production"?Oc.exports=py():Oc.exports=hy();var gy=Oc.exports,Mt="default"in T?T.default:T,M0=Symbol.for("react-redux-context"),j0=typeof globalThis<"u"?globalThis:{};function my(){if(!Mt.createContext)return{};const e=j0[M0]??(j0[M0]=new Map);let t=e.get(Mt.createContext);return t||(t=Mt.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(Mt.createContext,t)),t}var Hn=my(),by=()=>{throw new Error("uSES not initialized!")};function Dc(e=Hn){return function(){const n=Mt.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 P0=Dc(),B0=by,yy=e=>{B0=e},xy=(e,t)=>e===t;function Cy(e=Hn){const t=e===Hn?P0:Dc(e),n=(r,o={})=>{const{equalityFn:s=xy,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:d,stabilityCheck:f,identityFunctionCheck:g}=t(),y=Mt.useRef(!0),C=Mt.useCallback({[r.name](h){const p=r(h);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:m,stabilityCheck:x}={stabilityCheck:f,identityFunctionCheck:g,...a};if(x==="always"||x==="once"&&y.current){const E=r(h);if(!s(p,E)){let I;try{throw new Error}catch(v){({stack:I}=v)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
|
|
575
575
|
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:E,stack:I})}}if((m==="always"||m==="once"&&y.current)&&p===h){let E;try{throw new Error}catch(I){({stack:E}=I)}console.warn("Selector "+(r.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
|
|
576
|
-
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:E})}y.current&&(y.current=!1)}return p}}[r.name],[r,f,a.stabilityCheck]),b=B0(c.addNestedSub,i.getState,d||i.getState,C,s);return Nt.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var Cy=xy();function Ey(e){e()}function vy(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Ey(()=>{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 V0={notify(){},get:()=>[]};function wy(e,t){let n,r=V0,o=0,s=!1;function a(h){f();const p=r.subscribe(h);let m=!1;return()=>{m||(m=!0,p(),g())}}function i(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function d(){return s}function f(){o++,n||(n=e.subscribe(c),r=vy())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=V0)}function y(){s||(s=!0,f())}function C(){s&&(s=!1,g())}const b={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:d,trySubscribe:y,tryUnsubscribe:C,getListeners:()=>r};return b}var Iy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_y=typeof navigator<"u"&&navigator.product==="ReactNative",Sy=Iy||_y?Nt.useLayoutEffect:Nt.useEffect;function Ay({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=Nt.useMemo(()=>{const d=wy(e);return{store:e,subscription:d,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=Nt.useMemo(()=>e.getState(),[e]);Sy(()=>{const{subscription:d}=a;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),i!==e.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[a,i]);const c=t||Zn;return Nt.createElement(c.Provider,{value:a},n)}var Nc=Ay;function G0(e=Zn){const t=e===Zn?P0:Dc(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Ty=G0();function Ly(e=Zn){const t=e===Zn?Ty:G0(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Oy=Ly();by(hy.useSyncExternalStoreWithSelector);const gt=Oy.withTypes(),me=Cy.withTypes(),Le={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},te={IDLE:"idle",LOADING:"loading",FAILED:"failed"},ky="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",H0="Show more",Fy="Show less",Dy="Show preview",Ny="Hide preview",Ry="Select email";function it(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 My=typeof Symbol=="function"&&Symbol.observable||"@@observable",W0=My,Rc=()=>Math.random().toString(36).substring(7).split("").join("."),jy={INIT:`@@redux/INIT${Rc()}`,REPLACE:`@@redux/REPLACE${Rc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Rc()}`},vr=jy;function Ko(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 Py(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(Gy(e))return"date";if(Vy(e))return"error";const n=By(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 By(e){return typeof e.constructor=="function"?e.constructor.name:null}function Vy(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Gy(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function zn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Py(e)),t}function Z0(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?it(2):`Expected the root reducer to be a function. Instead, received: '${zn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?it(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"?it(1):`Expected the enhancer to be a function. Instead, received: '${zn(n)}'`);return n(Z0)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function d(){a===s&&(a=new Map,s.forEach((p,m)=>{a.set(m,p)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?it(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function g(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?it(4):`Expected the listener to be a function. Instead, received: '${zn(p)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?it(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;d();const x=i++;return a.set(x,p),function(){if(m){if(c)throw new Error(process.env.NODE_ENV==="production"?it(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,d(),a.delete(x),s=null}}}function y(p){if(!Ko(p))throw new Error(process.env.NODE_ENV==="production"?it(7):`Actions must be plain objects. Instead, the actual type was: '${zn(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"?it(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"?it(17):`Action "type" property must be a string. Instead, the actual type was: '${zn(p.type)}'. Value was: '${p.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?it(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,p)}finally{c=!1}return(s=a).forEach(x=>{x()}),p}function C(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?it(10):`Expected the nextReducer to be a function. Instead, received: '${zn(p)}`);r=p,y({type:vr.REPLACE})}function b(){const p=g;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?it(11):`Expected the observer to be an object. Instead, received: '${zn(m)}'`);function x(){const I=m;I.next&&I.next(f())}return x(),{unsubscribe:p(x)}},[W0](){return this}}}return y({type:vr.INIT}),{dispatch:y,subscribe:g,getState:f,replaceReducer:C,[W0]:b}}function z0(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Hy(e,t,n,r){const o=Object.keys(t),s=n&&n.type===vr.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(!Ko(e))return`The ${s} has unexpected type of "${zn(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===vr.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 Wy(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:vr.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?it(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:vr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?it(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${vr.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 X0(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"&&z0(`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{Wy(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=Hy(i,n,c,o);g&&z0(g)}let d=!1;const f={};for(let g=0;g<r.length;g++){const y=r[g],C=n[y],b=i[y],h=C(b,c);if(typeof h>"u"){const p=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?it(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,d=d||h!==b}return d=d||r.length!==Object.keys(i).length,d?f:i}}function da(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Zy(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?it(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,...d)=>s(c,...d)},i=e.map(c=>c(a));return s=da(...i)(o.dispatch),{...o,dispatch:s}}}function Y0(e){return Ko(e)&&"type"in e&&typeof e.type=="string"}var J0=Symbol.for("immer-nothing"),q0=Symbol.for("immer-draftable"),Rt=Symbol.for("immer-state"),zy=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 wt(e,...t){if(process.env.NODE_ENV!=="production"){const n=zy[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 so=Object.getPrototypeOf;function wr(e){return!!e&&!!e[Rt]}function An(e){var t;return e?Q0(e)||Array.isArray(e)||!!e[q0]||!!((t=e.constructor)!=null&&t[q0])||ha(e)||ga(e):!1}var Xy=Object.prototype.constructor.toString();function Q0(e){if(!e||typeof e!="object")return!1;const t=so(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)===Xy}function fa(e,t){pa(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function pa(e){const t=e[Rt];return t?t.type_:Array.isArray(e)?1:ha(e)?2:ga(e)?3:0}function Mc(e,t){return pa(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $0(e,t,n){const r=pa(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Yy(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ha(e){return e instanceof Map}function ga(e){return e instanceof Set}function Ir(e){return e.copy_||e.base_}function jc(e,t){if(ha(e))return new Map(e);if(ga(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Q0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Rt];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(so(e),r)}else{const r=so(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function Pc(e,t=!1){return ma(e)||wr(e)||!An(e)||(pa(e)>1&&(e.set=e.add=e.clear=e.delete=Jy),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Pc(r,!0))),e}function Jy(){wt(2)}function ma(e){return Object.isFrozen(e)}var qy={};function _r(e){const t=qy[e];return t||wt(0,e),t}var es;function U0(){return es}function Qy(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function K0(e,t){t&&(_r("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Bc(e){Vc(e),e.drafts_.forEach($y),e.drafts_=null}function Vc(e){e===es&&(es=e.parent_)}function ef(e){return es=Qy(es,e)}function $y(e){const t=e[Rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Rt].modified_&&(Bc(t),wt(4)),An(e)&&(e=ba(t,e),t.parent_||ya(t,e)),t.patches_&&_r("Patches").generateReplacementPatches_(n[Rt].base_,e,t.patches_,t.inversePatches_)):e=ba(t,n,[]),Bc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==J0?e:void 0}function ba(e,t,n){if(ma(t))return t;const r=t[Rt];if(!r)return fa(t,(o,s)=>nf(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ya(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),fa(s,(i,c)=>nf(e,r,o,i,c,n,a)),ya(e,o,!1),n&&e.patches_&&_r("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function nf(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&wt(5),wr(o)){const i=s&&t&&t.type_!==3&&!Mc(t.assigned_,r)?s.concat(r):void 0,c=ba(e,o,i);if($0(n,r,c),wr(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(An(o)&&!ma(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ba(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ya(e,o)}}function ya(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Pc(t,n)}function Uy(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:U0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=Gc;n&&(o=[r],s=ts);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var Gc={get(e,t){if(t===Rt)return e;const n=Ir(e);if(!Mc(n,t))return Ky(e,n,t);const r=n[t];return e.finalized_||!An(r)?r:r===Hc(e.base_,t)?(Zc(e),e.copy_[t]=zc(r,e)):r},has(e,t){return t in Ir(e)},ownKeys(e){return Reflect.ownKeys(Ir(e))},set(e,t,n){const r=rf(Ir(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Hc(Ir(e),t),s=o==null?void 0:o[Rt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Yy(n,o)&&(n!==void 0||Mc(e.base_,t)))return!0;Zc(e),Wc(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 Hc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zc(e),Wc(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(){wt(11)},getPrototypeOf(e){return so(e.base_)},setPrototypeOf(){wt(12)}},ts={};fa(Gc,(e,t)=>{ts[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ts.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&wt(13),ts.set.call(this,e,t,void 0)},ts.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&wt(14),Gc.set.call(this,e[0],t,n,e[0])};function Hc(e,t){const n=e[Rt];return(n?Ir(n):e)[t]}function Ky(e,t,n){var o;const r=rf(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function rf(e,t){if(!(t in e))return;let n=so(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=so(n)}}function Wc(e){e.modified_||(e.modified_=!0,e.parent_&&Wc(e.parent_))}function Zc(e){e.copy_||(e.copy_=jc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ex=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,...d){return a.produce(c,f=>n.call(this,f,...d))}}typeof n!="function"&&wt(6),r!==void 0&&typeof r!="function"&&wt(7);let o;if(An(t)){const s=ef(this),a=zc(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?Bc(s):Vc(s)}return K0(s,r),tf(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===J0&&(o=void 0),this.autoFreeze_&&Pc(o,!0),r){const s=[],a=[];_r("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else wt(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){An(e)||wt(8),wr(e)&&(e=tx(e));const t=ef(this),n=zc(e,void 0);return n[Rt].isManual_=!0,Vc(t),n}finishDraft(e,t){const n=e&&e[Rt];(!n||!n.isManual_)&&wt(9);const{scope_:r}=n;return K0(r,t),tf(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=_r("Patches").applyPatches_;return wr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function zc(e,t){const n=ha(e)?_r("MapSet").proxyMap_(e,t):ga(e)?_r("MapSet").proxySet_(e,t):Uy(e,t);return(t?t.scope_:U0()).drafts_.push(n),n}function tx(e){return wr(e)||wt(10,e),of(e)}function of(e){if(!An(e)||ma(e))return e;const t=e[Rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jc(e,t.scope_.immer_.useStrictShallowCopy_)}else n=jc(e,!0);return fa(n,(r,o)=>{$0(n,r,of(o))}),t&&(t.finalized_=!1),n}var Mt=new ex,sf=Mt.produce;Mt.produceWithPatches.bind(Mt),Mt.setAutoFreeze.bind(Mt),Mt.setUseStrictShallowCopy.bind(Mt),Mt.applyPatches.bind(Mt),Mt.createDraft.bind(Mt),Mt.finishDraft.bind(Mt);var nx=(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
|
|
576
|
+
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:E})}y.current&&(y.current=!1)}return p}}[r.name],[r,f,a.stabilityCheck]),b=B0(c.addNestedSub,i.getState,d||i.getState,C,s);return Mt.useDebugValue(b),b};return Object.assign(n,{withTypes:()=>n}),n}var Ey=Cy();function vy(e){e()}function wy(){let e=null,t=null;return{clear(){e=null,t=null},notify(){vy(()=>{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 V0={notify(){},get:()=>[]};function Iy(e,t){let n,r=V0,o=0,s=!1;function a(h){f();const p=r.subscribe(h);let m=!1;return()=>{m||(m=!0,p(),g())}}function i(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function d(){return s}function f(){o++,n||(n=e.subscribe(c),r=wy())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=V0)}function y(){s||(s=!0,f())}function C(){s&&(s=!1,g())}const b={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:d,trySubscribe:y,tryUnsubscribe:C,getListeners:()=>r};return b}var _y=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Sy=typeof navigator<"u"&&navigator.product==="ReactNative",Ay=_y||Sy?Mt.useLayoutEffect:Mt.useEffect;function Ty({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=Mt.useMemo(()=>{const d=Iy(e);return{store:e,subscription:d,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=Mt.useMemo(()=>e.getState(),[e]);Ay(()=>{const{subscription:d}=a;return d.onStateChange=d.notifyNestedSubs,d.trySubscribe(),i!==e.getState()&&d.notifyNestedSubs(),()=>{d.tryUnsubscribe(),d.onStateChange=void 0}},[a,i]);const c=t||Hn;return Mt.createElement(c.Provider,{value:a},n)}var Nc=Ty;function G0(e=Hn){const t=e===Hn?P0:Dc(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Ly=G0();function Oy(e=Hn){const t=e===Hn?Ly:G0(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ky=Oy();yy(gy.useSyncExternalStoreWithSelector);const ht=ky.withTypes(),be=Ey.withTypes(),Le={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},te={IDLE:"idle",LOADING:"loading",FAILED:"failed"},Fy="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",H0="Show more",Dy="Show less",Ny="Show preview",Ry="Hide preview",My="Select email";function at(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 jy=typeof Symbol=="function"&&Symbol.observable||"@@observable",W0=jy,Rc=()=>Math.random().toString(36).substring(7).split("").join("."),Py={INIT:`@@redux/INIT${Rc()}`,REPLACE:`@@redux/REPLACE${Rc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Rc()}`},xr=Py;function es(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 By(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(Hy(e))return"date";if(Gy(e))return"error";const n=Vy(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 Vy(e){return typeof e.constructor=="function"?e.constructor.name:null}function Gy(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Hy(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Wn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=By(e)),t}function Z0(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?at(2):`Expected the root reducer to be a function. Instead, received: '${Wn(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?at(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"?at(1):`Expected the enhancer to be a function. Instead, received: '${Wn(n)}'`);return n(Z0)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function d(){a===s&&(a=new Map,s.forEach((p,m)=>{a.set(m,p)}))}function f(){if(c)throw new Error(process.env.NODE_ENV==="production"?at(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function g(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?at(4):`Expected the listener to be a function. Instead, received: '${Wn(p)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?at(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;d();const x=i++;return a.set(x,p),function(){if(m){if(c)throw new Error(process.env.NODE_ENV==="production"?at(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,d(),a.delete(x),s=null}}}function y(p){if(!es(p))throw new Error(process.env.NODE_ENV==="production"?at(7):`Actions must be plain objects. Instead, the actual type was: '${Wn(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"?at(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"?at(17):`Action "type" property must be a string. Instead, the actual type was: '${Wn(p.type)}'. Value was: '${p.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?at(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,p)}finally{c=!1}return(s=a).forEach(x=>{x()}),p}function C(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?at(10):`Expected the nextReducer to be a function. Instead, received: '${Wn(p)}`);r=p,y({type:xr.REPLACE})}function b(){const p=g;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?at(11):`Expected the observer to be an object. Instead, received: '${Wn(m)}'`);function x(){const I=m;I.next&&I.next(f())}return x(),{unsubscribe:p(x)}},[W0](){return this}}}return y({type:xr.INIT}),{dispatch:y,subscribe:g,getState:f,replaceReducer:C,[W0]:b}}function z0(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Wy(e,t,n,r){const o=Object.keys(t),s=n&&n.type===xr.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(!es(e))return`The ${s} has unexpected type of "${Wn(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===xr.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 Zy(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:xr.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?at(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:xr.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?at(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${xr.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 X0(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"&&z0(`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{Zy(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=Wy(i,n,c,o);g&&z0(g)}let d=!1;const f={};for(let g=0;g<r.length;g++){const y=r[g],C=n[y],b=i[y],h=C(b,c);if(typeof h>"u"){const p=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?at(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,d=d||h!==b}return d=d||r.length!==Object.keys(i).length,d?f:i}}function fa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function zy(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?at(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,...d)=>s(c,...d)},i=e.map(c=>c(a));return s=fa(...i)(o.dispatch),{...o,dispatch:s}}}function Y0(e){return es(e)&&"type"in e&&typeof e.type=="string"}var J0=Symbol.for("immer-nothing"),q0=Symbol.for("immer-draftable"),jt=Symbol.for("immer-state"),Xy=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 vt(e,...t){if(process.env.NODE_ENV!=="production"){const n=Xy[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 so=Object.getPrototypeOf;function Cr(e){return!!e&&!!e[jt]}function An(e){var t;return e?Q0(e)||Array.isArray(e)||!!e[q0]||!!((t=e.constructor)!=null&&t[q0])||ga(e)||ma(e):!1}var Yy=Object.prototype.constructor.toString();function Q0(e){if(!e||typeof e!="object")return!1;const t=so(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)===Yy}function pa(e,t){ha(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ha(e){const t=e[jt];return t?t.type_:Array.isArray(e)?1:ga(e)?2:ma(e)?3:0}function Mc(e,t){return ha(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function $0(e,t,n){const r=ha(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Jy(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ga(e){return e instanceof Map}function ma(e){return e instanceof Set}function Er(e){return e.copy_||e.base_}function jc(e,t){if(ga(e))return new Map(e);if(ma(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Q0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[jt];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(so(e),r)}else{const r=so(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function Pc(e,t=!1){return ba(e)||Cr(e)||!An(e)||(ha(e)>1&&(e.set=e.add=e.clear=e.delete=qy),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Pc(r,!0))),e}function qy(){vt(2)}function ba(e){return Object.isFrozen(e)}var Qy={};function vr(e){const t=Qy[e];return t||vt(0,e),t}var ts;function U0(){return ts}function $y(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function K0(e,t){t&&(vr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Bc(e){Vc(e),e.drafts_.forEach(Uy),e.drafts_=null}function Vc(e){e===ts&&(ts=e.parent_)}function ef(e){return ts=$y(ts,e)}function Uy(e){const t=e[jt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tf(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[jt].modified_&&(Bc(t),vt(4)),An(e)&&(e=ya(t,e),t.parent_||xa(t,e)),t.patches_&&vr("Patches").generateReplacementPatches_(n[jt].base_,e,t.patches_,t.inversePatches_)):e=ya(t,n,[]),Bc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==J0?e:void 0}function ya(e,t,n){if(ba(t))return t;const r=t[jt];if(!r)return pa(t,(o,s)=>nf(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return xa(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),pa(s,(i,c)=>nf(e,r,o,i,c,n,a)),xa(e,o,!1),n&&e.patches_&&vr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function nf(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&vt(5),Cr(o)){const i=s&&t&&t.type_!==3&&!Mc(t.assigned_,r)?s.concat(r):void 0,c=ya(e,o,i);if($0(n,r,c),Cr(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(An(o)&&!ba(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ya(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&xa(e,o)}}function xa(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Pc(t,n)}function Ky(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:U0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=Gc;n&&(o=[r],s=ns);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var Gc={get(e,t){if(t===jt)return e;const n=Er(e);if(!Mc(n,t))return ex(e,n,t);const r=n[t];return e.finalized_||!An(r)?r:r===Hc(e.base_,t)?(Zc(e),e.copy_[t]=zc(r,e)):r},has(e,t){return t in Er(e)},ownKeys(e){return Reflect.ownKeys(Er(e))},set(e,t,n){const r=rf(Er(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Hc(Er(e),t),s=o==null?void 0:o[jt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Jy(n,o)&&(n!==void 0||Mc(e.base_,t)))return!0;Zc(e),Wc(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 Hc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zc(e),Wc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Er(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){vt(11)},getPrototypeOf(e){return so(e.base_)},setPrototypeOf(){vt(12)}},ns={};pa(Gc,(e,t)=>{ns[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ns.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&vt(13),ns.set.call(this,e,t,void 0)},ns.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&vt(14),Gc.set.call(this,e[0],t,n,e[0])};function Hc(e,t){const n=e[jt];return(n?Er(n):e)[t]}function ex(e,t,n){var o;const r=rf(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function rf(e,t){if(!(t in e))return;let n=so(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=so(n)}}function Wc(e){e.modified_||(e.modified_=!0,e.parent_&&Wc(e.parent_))}function Zc(e){e.copy_||(e.copy_=jc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tx=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,...d){return a.produce(c,f=>n.call(this,f,...d))}}typeof n!="function"&&vt(6),r!==void 0&&typeof r!="function"&&vt(7);let o;if(An(t)){const s=ef(this),a=zc(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?Bc(s):Vc(s)}return K0(s,r),tf(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===J0&&(o=void 0),this.autoFreeze_&&Pc(o,!0),r){const s=[],a=[];vr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else vt(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){An(e)||vt(8),Cr(e)&&(e=nx(e));const t=ef(this),n=zc(e,void 0);return n[jt].isManual_=!0,Vc(t),n}finishDraft(e,t){const n=e&&e[jt];(!n||!n.isManual_)&&vt(9);const{scope_:r}=n;return K0(r,t),tf(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=vr("Patches").applyPatches_;return Cr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function zc(e,t){const n=ga(e)?vr("MapSet").proxyMap_(e,t):ma(e)?vr("MapSet").proxySet_(e,t):Ky(e,t);return(t?t.scope_:U0()).drafts_.push(n),n}function nx(e){return Cr(e)||vt(10,e),of(e)}function of(e){if(!An(e)||ba(e))return e;const t=e[jt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jc(e,t.scope_.immer_.useStrictShallowCopy_)}else n=jc(e,!0);return pa(n,(r,o)=>{$0(n,r,of(o))}),t&&(t.finalized_=!1),n}var Pt=new tx,sf=Pt.produce;Pt.produceWithPatches.bind(Pt),Pt.setAutoFreeze.bind(Pt),Pt.setUseStrictShallowCopy.bind(Pt),Pt.applyPatches.bind(Pt),Pt.createDraft.bind(Pt),Pt.finishDraft.bind(Pt);var rx=(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
|
|
577
577
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
578
578
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
579
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},
|
|
579
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},ox=(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 d;try{throw new Error}catch(f){({stack:d}=f)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
580
580
|
This means your output selector will likely run more frequently than intended.
|
|
581
581
|
Avoid returning a new reference inside your input selector, e.g.
|
|
582
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:d})}},
|
|
583
|
-
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
|
|
582
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:d})}},sx={inputStabilityCheck:"once",identityFunctionCheck:"once"};function ax(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ix(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function cx(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 af=e=>Array.isArray(e)?e:[e];function lx(e){const t=Array.isArray(e[0])?e[0]:e;return cx(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function cf(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var ux=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...sx,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:rx},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:ox}}},dx=class{constructor(e){this.value=e}deref(){return this.value}},fx=typeof WeakRef<"u"?WeakRef:dx,px=0,lf=1;function Ca(){return{s:px,v:void 0,o:null,p:null}}function uf(e,t={}){let n=Ca();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var g;let i=n;const{length:c}=arguments;for(let y=0,C=c;y<C;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=Ca(),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=Ca(),h.set(b,i)):i=p}}const d=i;let f;if(i.s===lf)f=i.v;else if(f=e.apply(null,arguments),s++,r){const y=((g=o==null?void 0:o.deref)==null?void 0:g.call(o))??o;y!=null&&r(y,f)&&(f=y,s!==0&&s--),o=typeof f=="object"&&f!==null||typeof f=="function"?new fx(f):f}return d.s=lf,d.v=f,f}return a.clearCache=()=>{n=Ca(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function hx(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,a=0,i,c={},d=o.pop();typeof d=="object"&&(c=d,d=o.pop()),ax(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const f={...n,...c},{memoize:g,memoizeOptions:y=[],argsMemoize:C=uf,argsMemoizeOptions:b=[],devModeChecks:h={}}=f,p=af(y),m=af(b),x=lx(o),E=g(function(){return s++,d.apply(null,arguments)},...p);let I=!0;const v=C(function(){a++;const A=cf(x,arguments);if(i=E.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=ux(I,h);if(S.shouldRun&&S.run(d,A,i),L.shouldRun){const N=cf(x,arguments);L.run({inputSelectorResults:A,inputSelectorResultsCopy:N},{memoize:g,memoizeOptions:p},arguments)}I&&(I=!1)}return i},...m);return Object.assign(v,{resultFunc:d,memoizedResultFunc:E,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:g,argsMemoize:C})};return Object.assign(r,{withTypes:()=>r}),r}var gx=hx(uf),mx=Object.assign((e,t=gx)=>{ix(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:()=>mx});function df(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var bx=df(),yx=df,xx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?fa:fa.apply(null,arguments)},ff=e=>e&&typeof e.match=="function";function rs(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?Be(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=>Y0(r)&&r.type===e,n}function Cx(e){return typeof e=="function"&&"type"in e&&ff(e)}function Ex(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
583
|
+
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 vx(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=Cx}=e;return()=>n=>r=>(t(r)&&console.warn(Ex(r.type)),n(r))}function pf(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.
|
|
584
584
|
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.
|
|
585
|
-
It is disabled in production builds, so you don't need to worry about that.`)}}}var hf=class
|
|
585
|
+
It is disabled in production builds, so you don't need to worry about that.`)}}}var hf=class Rs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Rs.prototype)}static get[Symbol.species](){return Rs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Rs(...t[0].concat(this)):new Rs(...t.concat(this))}};function gf(e){return An(e)?sf(e,()=>{}):e}function mf(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"?Be(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function wx(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function Ix(e,t,n){const r=bf(e,t,n);return{detectMutations(){return yf(e,t,r,n)}}}function bf(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]=bf(e,t,n[a],i))}}return s}function yf(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 d=t.length>0;for(let f in c){const g=s?s+"."+f:f;if(d&&t.some(b=>b instanceof RegExp?b.test(g):g===b))continue;const y=yf(e,t,n.children[f],r[f],i,g);if(y.wasMutated)return y}return{wasMutated:!1}}function _x(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(i,c,d,f){return JSON.stringify(i,n(c,f),d)},n=function(i,c){let d=[],f=[];return c||(c=function(g,y){return d[0]===y?"[Circular ~]":"[Circular ~."+f.slice(0,d.indexOf(y)).join(".")+"]"}),function(g,y){if(d.length>0){var C=d.indexOf(this);~C?d.splice(C+1):d.push(this),~C?f.splice(C,1/0,g):f.push(g),~d.indexOf(y)&&(y=c.call(this,g,y))}else d.push(y);return i==null?y:i.call(this,g,y)}},{isImmutable:r=wx,ignoredPaths:o,warnAfter:s=32}=e;const a=Ix.bind(null,r,o);return({getState:i})=>{let c=i(),d=a(c),f;return g=>y=>{const C=pf(s,"ImmutableStateInvariantMiddleware");C.measureTime(()=>{if(c=i(),f=d.detectMutations(),d=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Be(19):`A state mutation was detected between dispatches, in the path '${f.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const b=g(y);return C.measureTime(()=>{if(c=i(),f=d.detectMutations(),d=a(c),f.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Be(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)`)}),C.warnIfExceeded(),b}}}}function xf(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||es(e)}function Xc(e,t="",n=xf,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[d,f]of i){const g=t?t+"."+d:d;if(!(c&&o.some(C=>C instanceof RegExp?C.test(g):g===C))){if(!n(f))return{keyPath:g,value:f};if(typeof f=="object"&&(a=Xc(f,g,n,r,o,s),a))return a}}return s&&Cf(e)&&s.add(e),!1}function Cf(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!Cf(t))return!1;return!0}function Sx(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=xf,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:a=32,ignoreState:i=!1,ignoreActions:c=!1,disableCache:d=!1}=e,f=!d&&WeakSet?new WeakSet:void 0;return g=>y=>C=>{if(!Y0(C))return y(C);const b=y(C),h=pf(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(C.type)!==-1)&&h.measureTime(()=>{const p=Xc(C,"",t,n,o,f);if(p){const{keyPath:m,value:x}=p;console.error(`A non-serializable value was detected in an action, in the path: \`${m}\`. Value:`,x,`
|
|
586
586
|
Take a look at the logic that dispatched this action: `,C,`
|
|
587
587
|
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
|
|
588
588
|
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),i||(h.measureTime(()=>{const p=g.getState(),m=Xc(p,"",t,n,s,f);if(m){const{keyPath:x,value:E}=m;console.error(`A non-serializable value was detected in the state, in the path: \`${x}\`. Value:`,E,`
|
|
589
589
|
Take a look at the reducer(s) handling this action type: ${C.type}.
|
|
590
|
-
(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 Ca(e){return typeof e=="boolean"}var Sx=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new hf;if(n&&(Ca(n)?a.push(mx):a.push(bx(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};Ca(r)||(i=r),a.unshift(Ix(i))}if(o){let i={};Ca(o)||(i=o),a.push(_x(i))}if(s){let i={};Ca(s)||(i=s),a.unshift(Ex(i))}}return a},Ax="RTK_autoBatch",Ef=e=>t=>{setTimeout(t,e)},Tx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ef(10),Lx=(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"?Tx:e.type==="callback"?e.queueNotification:Ef(e.timeout),d=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const g=()=>o&&f(),y=r.subscribe(g);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var g;try{return o=!((g=f==null?void 0:f.meta)!=null&&g[Ax]),s=!o,s&&(a||(a=!0,c(d))),r.dispatch(f)}finally{o=!0}}})},Ox=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new hf(e);return r&&o.push(Lx(typeof r=="object"?r:void 0)),o};function kx(e){const t=Sx(),{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(Ko(n))i=X0(n);else throw new Error(process.env.NODE_ENV==="production"?Be(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"?Be(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"?Be(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"?Be(4):"each middleware provided to configureStore must be a function");let d=da;o&&(d=yx({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=Zy(...c),g=Ox(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Be(5):"`enhancers` field must be a callback");let y=typeof a=="function"?a(g):g();if(process.env.NODE_ENV!=="production"&&!Array.isArray(y))throw new Error(process.env.NODE_ENV==="production"?Be(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"?Be(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 C=d(...y);return Z0(i,s,C)}function vf(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"?Be(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Be(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"?Be(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?Be(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"?Be(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"?Be(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function Fx(e){return typeof e=="function"}function Dx(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Be(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]=vf(t),s;if(Fx(e))s=()=>gf(e());else{const i=gf(e);s=()=>i}function a(i=s(),c){let d=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return d.filter(f=>!!f).length===0&&(d=[o]),d.reduce((f,g)=>{if(g)if(wr(f)){const C=g(f,c);return C===void 0?f:C}else{if(An(f))return sf(f,y=>g(y,c));{const y=g(f,c);if(y===void 0){if(f===null)return f;throw new Error(process.env.NODE_ENV==="production"?Be(9):"A case reducer on a non-draftable value must not return undefined")}return y}}return f},i)}return a.getInitialState=s,a}var Nx=(e,t)=>ff(e)?e.match(t):e(t);function Rx(...e){return t=>e.some(n=>Nx(n,t))}var Mx="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",jx=(e=21)=>{let t="",n=e;for(;n--;)t+=Mx[Math.random()*64|0];return t},Px=["name","message","stack","code"],Yc=class{constructor(e,t){je(this,"_type");this.payload=e,this.meta=t}},wf=class{constructor(e,t){je(this,"_type");this.payload=e,this.meta=t}},Bx=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Px)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},on=(()=>{function e(t,n,r){const o=ns(t+"/fulfilled",(c,d,f,g)=>({payload:c,meta:{...g||{},arg:f,requestId:d,requestStatus:"fulfilled"}})),s=ns(t+"/pending",(c,d,f)=>({payload:void 0,meta:{...f||{},arg:d,requestId:c,requestStatus:"pending"}})),a=ns(t+"/rejected",(c,d,f,g,y)=>({payload:g,error:(r&&r.serializeError||Bx)(c||"Rejected"),meta:{...y||{},arg:f,requestId:d,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(d,f,g)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):jx(),C=new AbortController;let b,h;function p(x){h=x,C.abort()}const m=async function(){var I,v;let x;try{let _=(I=r==null?void 0:r.condition)==null?void 0:I.call(r,c,{getState:f,extra:g});if(Gx(_)&&(_=await _),_===!1||C.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"})},C.signal.addEventListener("abort",b)});d(s(y,c,(v=r==null?void 0:r.getPendingMeta)==null?void 0:v.call(r,{requestId:y,arg:c},{getState:f,extra:g}))),x=await Promise.race([A,Promise.resolve(n(c,{dispatch:d,getState:f,extra:g,requestId:y,signal:C.signal,abort:p,rejectWithValue:(S,L)=>new Yc(S,L),fulfillWithValue:(S,L)=>new wf(S,L)})).then(S=>{if(S instanceof Yc)throw S;return S instanceof wf?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){x=_ instanceof Yc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{b&&C.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||d(x),x}();return Object.assign(m,{abort:p,requestId:y,arg:c,unwrap(){return m.then(Vx)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Rx(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Vx(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Gx(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Hx=Symbol.for("rtk-slice-createasyncthunk");function Wx(e,t){return`${e}/${t}`}function Zx({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Hx];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Be(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(Xx()):o.reducers)||{},c=Object.keys(i),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(E,I){const v=typeof E=="string"?E:E.type;if(!v)throw new Error(process.env.NODE_ENV==="production"?Be(12):"`context.addCase` cannot be called with an empty action type");if(v in d.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Be(13):"`context.addCase` cannot be called with two reducers for the same action type: "+v);return d.sliceCaseReducersByType[v]=I,f},addMatcher(E,I){return d.sliceMatchers.push({matcher:E,reducer:I}),f},exposeAction(E,I){return d.actionCreators[E]=I,f},exposeCaseReducer(E,I){return d.sliceCaseReducersByName[E]=I,f}};c.forEach(E=>{const I=i[E],v={reducerName:E,type:Wx(s,E),createNotation:typeof o.reducers=="function"};Jx(I)?Qx(v,I,f,t):Yx(v,I,f)});function g(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Be(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[E={},I=[],v=void 0]=typeof o.extraReducers=="function"?vf(o.extraReducers):[o.extraReducers],_={...E,...d.sliceCaseReducersByType};return Dx(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of d.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of I)A.addMatcher(S.matcher,S.reducer);v&&A.addDefaultCase(v)})}const y=E=>E,C=new Map;let b;function h(E,I){return b||(b=g()),b(E,I)}function p(){return b||(b=g()),b.getInitialState()}function m(E,I=!1){function v(A){let S=A[E];if(typeof S>"u"){if(I)S=p();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Be(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(A=y){const S=mf(C,I,{insert:()=>new WeakMap});return mf(S,A,{insert:()=>{const L={};for(const[N,D]of Object.entries(o.selectors??{}))L[N]=zx(D,A,p,I);return L}})}return{reducerPath:E,getSelectors:_,get selectors(){return _(v)},selectSlice:v}}const x={name:s,reducer:h,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:p,...m(a),injectInto(E,{reducerPath:I,...v}={}){const _=I??a;return E.inject({reducerPath:_,reducer:h},v),{...x,...m(_,!0)}}};return x}}function zx(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"?Be(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var Ea=Zx();function Xx(){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 Yx({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!qx(r))throw new Error(process.env.NODE_ENV==="production"?Be(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?ns(e,a):ns(e))}function Jx(e){return e._reducerDefinitionType==="asyncThunk"}function qx(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Qx({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Be(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:d,options:f}=n,g=o(e,s,f);r.exposeAction(t,g),a&&r.addCase(g.fulfilled,a),i&&r.addCase(g.pending,i),c&&r.addCase(g.rejected,c),d&&r.addMatcher(g.settled,d),r.exposeCaseReducer(t,{fulfilled:a||va,pending:i||va,rejected:c||va,settled:d||va})}function va(){}function Be(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 sn="success",Ue="error",If="Some error occured. Please contact support@hiverhq.com",_f="Card refreshed successfully",$x="Card linked successfully",Ux="Error in linking the card",Kx="Card unlinked successfully",e6="Failed to unlink the card",Tn="Something went wrong";function Sf(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=Sf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Xn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sf(e))&&(r&&(r+=" "),r+=t);return r}const rs=e=>typeof e=="number"&&!isNaN(e),Sr=e=>typeof e=="string",jt=e=>typeof e=="function",wa=e=>Sr(e)||jt(e)?e:null,Jc=e=>w.isValidElement(e)||Sr(e)||jt(e)||rs(e);function t6(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 Ia(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:d,done:f,nodeRef:g,isIn:y,playToast:C}=a;const b=r?`${t}--${c}`:t,h=r?`${n}--${c}`:n,p=w.useRef(0);return w.useLayoutEffect(()=>{const m=g.current,x=b.split(" "),E=I=>{I.target===g.current&&(C(),m.removeEventListener("animationend",E),m.removeEventListener("animationcancel",E),p.current===0&&I.type!=="animationcancel"&&m.classList.remove(...x))};m.classList.add(...x),m.addEventListener("animationend",E),m.addEventListener("animationcancel",E)},[]),w.useEffect(()=>{const m=g.current,x=()=>{m.removeEventListener("animationend",x),o?t6(m,f,s):f()};y||(d?x():(p.current=1,m.className+=` ${h}`,m.addEventListener("animationend",x)))},[y]),w.createElement(w.Fragment,null,i)}}function Af(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 mt=new Map;let os=[];const qc=new Set,n6=e=>qc.forEach(t=>t(e)),Tf=()=>mt.size>0;function Lf(e,t){var n;if(t)return!((n=mt.get(t))==null||!n.isToastActive(e));let r=!1;return mt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Of(e,t){Jc(e)&&(Tf()||os.push({content:e,options:t}),mt.forEach(n=>{n.buildToast(e,t)}))}function kf(e,t){mt.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 r6(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,g,y){let C=1,b=0,h=[],p=[],m=[],x=g;const E=new Map,I=new Set,v=()=>{m=Array.from(E.values()),I.forEach(S=>S())},_=S=>{p=S==null?[]:p.filter(L=>L!==S),v()},A=S=>{const{toastId:L,onOpen:N,updateId:D,children:F}=S.props,M=D==null;S.staleId&&E.delete(S.staleId),E.set(L,S),p=[...p,S.props.toastId].filter(B=>B!==S.staleId),v(),y(Af(S,M?"added":"updated")),M&&jt(N)&&N(w.isValidElement(F)&&F.props)};return{id:f,props:x,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{E.forEach(N=>{L!=null&&L!==N.props.toastId||jt(N.toggle)&&N.toggle(S)})},removeToast:_,toasts:E,clearQueue:()=>{b-=h.length,h=[]},buildToast:(S,L)=>{if((G=>{let{containerId:J,toastId:R,updateId:X}=G;const K=J?J!==f:f!==1,ne=E.has(R)&&X==null;return K||ne})(L))return;const{toastId:N,updateId:D,data:F,staleId:M,delay:B}=L,V=()=>{_(N)},Y=D==null;Y&&b++;const W={...x,style:x.toastStyle,key:C++,...Object.fromEntries(Object.entries(L).filter(G=>{let[J,R]=G;return R!=null})),toastId:N,updateId:D,data:F,closeToast:V,isIn:!1,className:wa(L.className||x.toastClassName),bodyClassName:wa(L.bodyClassName||x.bodyClassName),progressClassName:wa(L.progressClassName||x.progressClassName),autoClose:!L.isLoading&&(H=L.autoClose,q=x.autoClose,H===!1||rs(H)&&H>0?H:q),deleteToast(){const G=E.get(N),{onClose:J,children:R}=G.props;jt(J)&&J(w.isValidElement(R)&&R.props),y(Af(G,"removed")),E.delete(N),b--,b<0&&(b=0),h.length>0?A(h.shift()):v()}};var H,q;W.closeButton=x.closeButton,L.closeButton===!1||Jc(L.closeButton)?W.closeButton=L.closeButton:L.closeButton===!0&&(W.closeButton=!Jc(x.closeButton)||x.closeButton);let Q=S;w.isValidElement(S)&&!Sr(S.type)?Q=w.cloneElement(S,{closeToast:V,toastProps:W,data:F}):jt(S)&&(Q=S({closeToast:V,toastProps:W,data:F}));const ee={content:Q,props:W,staleId:M};x.limit&&x.limit>0&&b>x.limit&&Y?h.push(ee):rs(B)?setTimeout(()=>{A(ee)},B):A(ee)},setProps(S){x=S},setToggle:(S,L)=>{E.get(S).toggle=L},isToastActive:S=>p.some(L=>L===S),getSnapshot:()=>x.newestOnTop?m.reverse():m}}(a,s,n6);mt.set(a,c);const d=c.observe(i);return os.forEach(f=>Of(f.content,f.options)),os=[],()=>{d(),mt.delete(a)}},setProps(i){var c;(c=mt.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=mt.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:Lf,count:o==null?void 0:o.length}}function o6(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:d,onClick:f,closeOnClick:g}=e;var y,C;function b(){n(!0)}function h(){n(!1)}function p(E){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&h(),a.delta=e.draggableDirection==="x"?E.clientX-a.start:E.clientY-a.start,a.start!==E.clientX&&(a.canCloseOnClick=!1),I.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,I.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function m(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",m);const E=s.current;if(a.canDrag&&a.didMove&&E){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();E.style.transition="transform 0.2s, opacity 0.2s",E.style.removeProperty("transform"),E.style.removeProperty("opacity")}}(C=mt.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||C.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 x={onPointerDown:function(E){if(e.draggable===!0||e.draggable===E.pointerType){a.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",m);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=E.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=E.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(E){const{top:I,bottom:v,left:_,right:A}=s.current.getBoundingClientRect();E.nativeEvent.type!=="touchend"&&e.pauseOnHover&&E.clientX>=_&&E.clientX<=A&&E.clientY>=I&&E.clientY<=v?h():b()}};return i&&c&&(x.onMouseEnter=h,e.stacked||(x.onMouseLeave=b)),g&&(x.onClick=E=>{f&&f(E),a.canCloseOnClick&&d()}),{playToast:b,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:x}}function s6(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:d,rtl:f,isIn:g,theme:y}=e;const C=s||c&&d===0,b={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(b.transform=`scaleX(${d})`);const h=Xn("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=jt(a)?a({rtl:f,type:o,defaultClassName:h}):Xn(h,a),m={[c&&d>=1?"onTransitionEnd":"onAnimationEnd"]:c&&d<1?null:()=>{g&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":C},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":C?"true":"false","aria-label":"notification timer",className:p,style:b,...m}))}let a6=1;const Ff=()=>""+a6++;function i6(e){return e&&(Sr(e.toastId)||rs(e.toastId))?e.toastId:Ff()}function ss(e,t){return Of(e,t),t.toastId}function _a(e,t){return{...t,type:t&&t.type||e,toastId:i6(t)}}function Sa(e){return(t,n)=>ss(t,_a(e,n))}function De(e,t){return ss(e,_a("default",t))}De.loading=(e,t)=>ss(e,_a("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),De.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=Sr(o)?De.loading(o,n):De.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,g,y)=>{if(g==null)return void De.dismiss(r);const C={type:f,...i,...n,data:y},b=Sr(g)?{render:g}:g;return r?De.update(r,{...C,...b}):De(b.render,{...C,...b}),y},d=jt(e)?e():e;return d.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),d},De.success=Sa("success"),De.info=Sa("info"),De.error=Sa("error"),De.warning=Sa("warning"),De.warn=De.warning,De.dark=(e,t)=>ss(e,_a("default",{theme:"dark",...t})),De.dismiss=function(e){(function(t){var n;if(Tf()){if(t==null||Sr(n=t)||rs(n))mt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=mt.get(t.containerId);r?r.removeToast(t.id):mt.forEach(o=>{o.removeToast(t.id)})}}else os=os.filter(r=>t!=null&&r.options.toastId!==t)})(e)},De.clearWaitingQueue=function(e){e===void 0&&(e={}),mt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},De.isActive=Lf,De.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=mt.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:Ff()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,ss(a,s)}},De.done=e=>{De.update(e,{progress:1})},De.onChange=function(e){return qc.add(e),()=>{qc.delete(e)}},De.play=e=>kf(!0,e),De.pause=e=>kf(!1,e);const c6=typeof window<"u"?w.useLayoutEffect:w.useEffect,Aa=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})},Qc={info:function(e){return w.createElement(Aa,{...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(Aa,{...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(Aa,{...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(Aa,{...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"})}},l6=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=o6(e),{closeButton:a,children:i,autoClose:c,onClick:d,type:f,hideProgressBar:g,closeToast:y,transition:C,position:b,className:h,style:p,bodyClassName:m,bodyStyle:x,progressClassName:E,progressStyle:I,updateId:v,role:_,progress:A,rtl:S,toastId:L,deleteToast:N,isIn:D,isLoading:F,closeOnClick:M,theme:B}=e,V=Xn("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),Y=jt(h)?h({rtl:S,position:b,type:f,defaultClassName:V}):Xn(V,h),W=function(ee){let{theme:G,type:J,isLoading:R,icon:X}=ee,K=null;const ne={theme:G,type:J};return X===!1||(jt(X)?K=X({...ne,isLoading:R}):w.isValidElement(X)?K=w.cloneElement(X,ne):R?K=Qc.spinner():(le=>le in Qc)(J)&&(K=Qc[J](ne))),K}(e),H=!!A||!c,q={closeToast:y,type:f,theme:B};let Q=null;return a===!1||(Q=jt(a)?a(q):w.isValidElement(a)?w.cloneElement(a,q):function(ee){let{closeToast:G,theme:J,ariaLabel:R="close"}=ee;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${J}`,type:"button",onClick:X=>{X.stopPropagation(),G(X)},"aria-label":R},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(C,{isIn:D,done:N,position:b,preventExitTransition:n,nodeRef:r,playToast:s},w.createElement("div",{id:L,onClick:d,"data-in":D,className:Y,...o,style:p,ref:r},w.createElement("div",{...D&&{role:_},className:jt(m)?m({type:f}):Xn("Toastify__toast-body",m),style:x},W!=null&&w.createElement("div",{className:Xn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!F})},W),w.createElement("div",null,i)),Q,w.createElement(s6,{...v&&!H?{key:`pb-${v}`}:{},rtl:S,theme:B,delay:c,isRunning:t,isIn:D,closeToast:y,hide:g,type:f,style:I,className:E,controlledProgress:H,progress:A||0})))},Ta=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},u6=Ia(Ta("bounce",!0));Ia(Ta("slide",!0)),Ia(Ta("zoom")),Ia(Ta("flip"));const d6={position:"top-right",transition:u6,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function f6(e){let t={...d6,...e};const n=e.stacked,[r,o]=w.useState(!0),s=w.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=r6(t),{className:d,style:f,rtl:g,containerId:y}=t;function C(h){const p=Xn("Toastify__toast-container",`Toastify__toast-container--${h}`,{"Toastify__toast-container--rtl":g});return jt(d)?d({position:h,rtl:g,defaultClassName:p}):Xn(p,wa(d))}function b(){n&&(o(!0),De.play())}return c6(()=>{if(n){var h;const p=s.current.querySelectorAll('[data-in="true"]'),m=12,x=(h=t.position)==null?void 0:h.includes("top");let E=0,I=0;Array.from(p).reverse().forEach((v,_)=>{const A=v;A.classList.add("Toastify__toast--stacked"),_>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=x?"top":"bot");const S=E*(r?.2:1)+(r?0:m*_);A.style.setProperty("--y",`${x?S:-1*S}px`),A.style.setProperty("--g",`${m}`),A.style.setProperty("--s",""+(1-(r?I:0))),E+=A.offsetHeight,I+=.025})}},[r,c,n]),w.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),De.pause())},onMouseLeave:b},a((h,p)=>{const m=p.length?{...f}:{...f,pointerEvents:"none"};return w.createElement("div",{className:C(h),style:m,key:`container-${h}`},p.map(x=>{let{content:E,props:I}=x;return w.createElement(l6,{...I,stacked:n,collapseAll:b,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},E)}))}))}const p6="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",h6=l.styled(l.Box)`
|
|
590
|
+
(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 Ea(e){return typeof e=="boolean"}var Ax=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new hf;if(n&&(Ea(n)?a.push(bx):a.push(yx(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};Ea(r)||(i=r),a.unshift(_x(i))}if(o){let i={};Ea(o)||(i=o),a.push(Sx(i))}if(s){let i={};Ea(s)||(i=s),a.unshift(vx(i))}}return a},Tx="RTK_autoBatch",Ef=e=>t=>{setTimeout(t,e)},Lx=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Ef(10),Ox=(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"?Lx:e.type==="callback"?e.queueNotification:Ef(e.timeout),d=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const g=()=>o&&f(),y=r.subscribe(g);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var g;try{return o=!((g=f==null?void 0:f.meta)!=null&&g[Tx]),s=!o,s&&(a||(a=!0,c(d))),r.dispatch(f)}finally{o=!0}}})},kx=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new hf(e);return r&&o.push(Ox(typeof r=="object"?r:void 0)),o};function Fx(e){const t=Ax(),{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(es(n))i=X0(n);else throw new Error(process.env.NODE_ENV==="production"?Be(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"?Be(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"?Be(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"?Be(4):"each middleware provided to configureStore must be a function");let d=fa;o&&(d=xx({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=zy(...c),g=kx(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?Be(5):"`enhancers` field must be a callback");let y=typeof a=="function"?a(g):g();if(process.env.NODE_ENV!=="production"&&!Array.isArray(y))throw new Error(process.env.NODE_ENV==="production"?Be(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"?Be(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 C=d(...y);return Z0(i,s,C)}function vf(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"?Be(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Be(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"?Be(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?Be(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"?Be(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"?Be(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function Dx(e){return typeof e=="function"}function Nx(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Be(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]=vf(t),s;if(Dx(e))s=()=>gf(e());else{const i=gf(e);s=()=>i}function a(i=s(),c){let d=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return d.filter(f=>!!f).length===0&&(d=[o]),d.reduce((f,g)=>{if(g)if(Cr(f)){const C=g(f,c);return C===void 0?f:C}else{if(An(f))return sf(f,y=>g(y,c));{const y=g(f,c);if(y===void 0){if(f===null)return f;throw new Error(process.env.NODE_ENV==="production"?Be(9):"A case reducer on a non-draftable value must not return undefined")}return y}}return f},i)}return a.getInitialState=s,a}var Rx=(e,t)=>ff(e)?e.match(t):e(t);function Mx(...e){return t=>e.some(n=>Rx(n,t))}var jx="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Px=(e=21)=>{let t="",n=e;for(;n--;)t+=jx[Math.random()*64|0];return t},Bx=["name","message","stack","code"],Yc=class{constructor(e,t){je(this,"_type");this.payload=e,this.meta=t}},wf=class{constructor(e,t){je(this,"_type");this.payload=e,this.meta=t}},Vx=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Bx)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},on=(()=>{function e(t,n,r){const o=rs(t+"/fulfilled",(c,d,f,g)=>({payload:c,meta:{...g||{},arg:f,requestId:d,requestStatus:"fulfilled"}})),s=rs(t+"/pending",(c,d,f)=>({payload:void 0,meta:{...f||{},arg:d,requestId:c,requestStatus:"pending"}})),a=rs(t+"/rejected",(c,d,f,g,y)=>({payload:g,error:(r&&r.serializeError||Vx)(c||"Rejected"),meta:{...y||{},arg:f,requestId:d,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(d,f,g)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):Px(),C=new AbortController;let b,h;function p(x){h=x,C.abort()}const m=async function(){var I,v;let x;try{let _=(I=r==null?void 0:r.condition)==null?void 0:I.call(r,c,{getState:f,extra:g});if(Hx(_)&&(_=await _),_===!1||C.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"})},C.signal.addEventListener("abort",b)});d(s(y,c,(v=r==null?void 0:r.getPendingMeta)==null?void 0:v.call(r,{requestId:y,arg:c},{getState:f,extra:g}))),x=await Promise.race([A,Promise.resolve(n(c,{dispatch:d,getState:f,extra:g,requestId:y,signal:C.signal,abort:p,rejectWithValue:(S,L)=>new Yc(S,L),fulfillWithValue:(S,L)=>new wf(S,L)})).then(S=>{if(S instanceof Yc)throw S;return S instanceof wf?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){x=_ instanceof Yc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{b&&C.signal.removeEventListener("abort",b)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||d(x),x}();return Object.assign(m,{abort:p,requestId:y,arg:c,unwrap(){return m.then(Gx)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Mx(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Gx(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Hx(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Wx=Symbol.for("rtk-slice-createasyncthunk");function Zx(e,t){return`${e}/${t}`}function zx({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Wx];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?Be(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(Yx()):o.reducers)||{},c=Object.keys(i),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(E,I){const v=typeof E=="string"?E:E.type;if(!v)throw new Error(process.env.NODE_ENV==="production"?Be(12):"`context.addCase` cannot be called with an empty action type");if(v in d.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Be(13):"`context.addCase` cannot be called with two reducers for the same action type: "+v);return d.sliceCaseReducersByType[v]=I,f},addMatcher(E,I){return d.sliceMatchers.push({matcher:E,reducer:I}),f},exposeAction(E,I){return d.actionCreators[E]=I,f},exposeCaseReducer(E,I){return d.sliceCaseReducersByName[E]=I,f}};c.forEach(E=>{const I=i[E],v={reducerName:E,type:Zx(s,E),createNotation:typeof o.reducers=="function"};qx(I)?$x(v,I,f,t):Jx(v,I,f)});function g(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Be(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[E={},I=[],v=void 0]=typeof o.extraReducers=="function"?vf(o.extraReducers):[o.extraReducers],_={...E,...d.sliceCaseReducersByType};return Nx(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of d.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of I)A.addMatcher(S.matcher,S.reducer);v&&A.addDefaultCase(v)})}const y=E=>E,C=new Map;let b;function h(E,I){return b||(b=g()),b(E,I)}function p(){return b||(b=g()),b.getInitialState()}function m(E,I=!1){function v(A){let S=A[E];if(typeof S>"u"){if(I)S=p();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Be(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(A=y){const S=mf(C,I,{insert:()=>new WeakMap});return mf(S,A,{insert:()=>{const L={};for(const[N,D]of Object.entries(o.selectors??{}))L[N]=Xx(D,A,p,I);return L}})}return{reducerPath:E,getSelectors:_,get selectors(){return _(v)},selectSlice:v}}const x={name:s,reducer:h,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:p,...m(a),injectInto(E,{reducerPath:I,...v}={}){const _=I??a;return E.inject({reducerPath:_,reducer:h},v),{...x,...m(_,!0)}}};return x}}function Xx(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"?Be(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var va=zx();function Yx(){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 Jx({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!Qx(r))throw new Error(process.env.NODE_ENV==="production"?Be(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?rs(e,a):rs(e))}function qx(e){return e._reducerDefinitionType==="asyncThunk"}function Qx(e){return e._reducerDefinitionType==="reducerWithPrepare"}function $x({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?Be(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:d,options:f}=n,g=o(e,s,f);r.exposeAction(t,g),a&&r.addCase(g.fulfilled,a),i&&r.addCase(g.pending,i),c&&r.addCase(g.rejected,c),d&&r.addMatcher(g.settled,d),r.exposeCaseReducer(t,{fulfilled:a||wa,pending:i||wa,rejected:c||wa,settled:d||wa})}function wa(){}function Be(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 sn="success",Ue="error",If="Some error occured. Please contact support@hiverhq.com",_f="Card refreshed successfully",Ux="Card linked successfully",Kx="Error in linking the card",e6="Card unlinked successfully",t6="Failed to unlink the card",Tn="Something went wrong";function Sf(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=Sf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Zn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sf(e))&&(r&&(r+=" "),r+=t);return r}const os=e=>typeof e=="number"&&!isNaN(e),wr=e=>typeof e=="string",Bt=e=>typeof e=="function",Ia=e=>wr(e)||Bt(e)?e:null,Jc=e=>w.isValidElement(e)||wr(e)||Bt(e)||os(e);function n6(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 _a(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:d,done:f,nodeRef:g,isIn:y,playToast:C}=a;const b=r?`${t}--${c}`:t,h=r?`${n}--${c}`:n,p=w.useRef(0);return w.useLayoutEffect(()=>{const m=g.current,x=b.split(" "),E=I=>{I.target===g.current&&(C(),m.removeEventListener("animationend",E),m.removeEventListener("animationcancel",E),p.current===0&&I.type!=="animationcancel"&&m.classList.remove(...x))};m.classList.add(...x),m.addEventListener("animationend",E),m.addEventListener("animationcancel",E)},[]),w.useEffect(()=>{const m=g.current,x=()=>{m.removeEventListener("animationend",x),o?n6(m,f,s):f()};y||(d?x():(p.current=1,m.className+=` ${h}`,m.addEventListener("animationend",x)))},[y]),w.createElement(w.Fragment,null,i)}}function Af(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 gt=new Map;let ss=[];const qc=new Set,r6=e=>qc.forEach(t=>t(e)),Tf=()=>gt.size>0;function Lf(e,t){var n;if(t)return!((n=gt.get(t))==null||!n.isToastActive(e));let r=!1;return gt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Of(e,t){Jc(e)&&(Tf()||ss.push({content:e,options:t}),gt.forEach(n=>{n.buildToast(e,t)}))}function kf(e,t){gt.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 o6(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,g,y){let C=1,b=0,h=[],p=[],m=[],x=g;const E=new Map,I=new Set,v=()=>{m=Array.from(E.values()),I.forEach(S=>S())},_=S=>{p=S==null?[]:p.filter(L=>L!==S),v()},A=S=>{const{toastId:L,onOpen:N,updateId:D,children:F}=S.props,M=D==null;S.staleId&&E.delete(S.staleId),E.set(L,S),p=[...p,S.props.toastId].filter(B=>B!==S.staleId),v(),y(Af(S,M?"added":"updated")),M&&Bt(N)&&N(w.isValidElement(F)&&F.props)};return{id:f,props:x,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{E.forEach(N=>{L!=null&&L!==N.props.toastId||Bt(N.toggle)&&N.toggle(S)})},removeToast:_,toasts:E,clearQueue:()=>{b-=h.length,h=[]},buildToast:(S,L)=>{if((G=>{let{containerId:J,toastId:R,updateId:X}=G;const K=J?J!==f:f!==1,ne=E.has(R)&&X==null;return K||ne})(L))return;const{toastId:N,updateId:D,data:F,staleId:M,delay:B}=L,V=()=>{_(N)},Y=D==null;Y&&b++;const W={...x,style:x.toastStyle,key:C++,...Object.fromEntries(Object.entries(L).filter(G=>{let[J,R]=G;return R!=null})),toastId:N,updateId:D,data:F,closeToast:V,isIn:!1,className:Ia(L.className||x.toastClassName),bodyClassName:Ia(L.bodyClassName||x.bodyClassName),progressClassName:Ia(L.progressClassName||x.progressClassName),autoClose:!L.isLoading&&(H=L.autoClose,q=x.autoClose,H===!1||os(H)&&H>0?H:q),deleteToast(){const G=E.get(N),{onClose:J,children:R}=G.props;Bt(J)&&J(w.isValidElement(R)&&R.props),y(Af(G,"removed")),E.delete(N),b--,b<0&&(b=0),h.length>0?A(h.shift()):v()}};var H,q;W.closeButton=x.closeButton,L.closeButton===!1||Jc(L.closeButton)?W.closeButton=L.closeButton:L.closeButton===!0&&(W.closeButton=!Jc(x.closeButton)||x.closeButton);let Q=S;w.isValidElement(S)&&!wr(S.type)?Q=w.cloneElement(S,{closeToast:V,toastProps:W,data:F}):Bt(S)&&(Q=S({closeToast:V,toastProps:W,data:F}));const ee={content:Q,props:W,staleId:M};x.limit&&x.limit>0&&b>x.limit&&Y?h.push(ee):os(B)?setTimeout(()=>{A(ee)},B):A(ee)},setProps(S){x=S},setToggle:(S,L)=>{E.get(S).toggle=L},isToastActive:S=>p.some(L=>L===S),getSnapshot:()=>x.newestOnTop?m.reverse():m}}(a,s,r6);gt.set(a,c);const d=c.observe(i);return ss.forEach(f=>Of(f.content,f.options)),ss=[],()=>{d(),gt.delete(a)}},setProps(i){var c;(c=gt.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=gt.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:Lf,count:o==null?void 0:o.length}}function s6(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:d,onClick:f,closeOnClick:g}=e;var y,C;function b(){n(!0)}function h(){n(!1)}function p(E){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&h(),a.delta=e.draggableDirection==="x"?E.clientX-a.start:E.clientY-a.start,a.start!==E.clientX&&(a.canCloseOnClick=!1),I.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,I.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function m(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",m);const E=s.current;if(a.canDrag&&a.didMove&&E){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();E.style.transition="transform 0.2s, opacity 0.2s",E.style.removeProperty("transform"),E.style.removeProperty("opacity")}}(C=gt.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||C.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 x={onPointerDown:function(E){if(e.draggable===!0||e.draggable===E.pointerType){a.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",m);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=E.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=E.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(E){const{top:I,bottom:v,left:_,right:A}=s.current.getBoundingClientRect();E.nativeEvent.type!=="touchend"&&e.pauseOnHover&&E.clientX>=_&&E.clientX<=A&&E.clientY>=I&&E.clientY<=v?h():b()}};return i&&c&&(x.onMouseEnter=h,e.stacked||(x.onMouseLeave=b)),g&&(x.onClick=E=>{f&&f(E),a.canCloseOnClick&&d()}),{playToast:b,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:x}}function a6(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:d,rtl:f,isIn:g,theme:y}=e;const C=s||c&&d===0,b={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(b.transform=`scaleX(${d})`);const h=Zn("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=Bt(a)?a({rtl:f,type:o,defaultClassName:h}):Zn(h,a),m={[c&&d>=1?"onTransitionEnd":"onAnimationEnd"]:c&&d<1?null:()=>{g&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":C},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":C?"true":"false","aria-label":"notification timer",className:p,style:b,...m}))}let i6=1;const Ff=()=>""+i6++;function c6(e){return e&&(wr(e.toastId)||os(e.toastId))?e.toastId:Ff()}function as(e,t){return Of(e,t),t.toastId}function Sa(e,t){return{...t,type:t&&t.type||e,toastId:c6(t)}}function Aa(e){return(t,n)=>as(t,Sa(e,n))}function De(e,t){return as(e,Sa("default",t))}De.loading=(e,t)=>as(e,Sa("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),De.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=wr(o)?De.loading(o,n):De.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,g,y)=>{if(g==null)return void De.dismiss(r);const C={type:f,...i,...n,data:y},b=wr(g)?{render:g}:g;return r?De.update(r,{...C,...b}):De(b.render,{...C,...b}),y},d=Bt(e)?e():e;return d.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),d},De.success=Aa("success"),De.info=Aa("info"),De.error=Aa("error"),De.warning=Aa("warning"),De.warn=De.warning,De.dark=(e,t)=>as(e,Sa("default",{theme:"dark",...t})),De.dismiss=function(e){(function(t){var n;if(Tf()){if(t==null||wr(n=t)||os(n))gt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=gt.get(t.containerId);r?r.removeToast(t.id):gt.forEach(o=>{o.removeToast(t.id)})}}else ss=ss.filter(r=>t!=null&&r.options.toastId!==t)})(e)},De.clearWaitingQueue=function(e){e===void 0&&(e={}),gt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},De.isActive=Lf,De.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=gt.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:Ff()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,as(a,s)}},De.done=e=>{De.update(e,{progress:1})},De.onChange=function(e){return qc.add(e),()=>{qc.delete(e)}},De.play=e=>kf(!0,e),De.pause=e=>kf(!1,e);const l6=typeof window<"u"?w.useLayoutEffect:w.useEffect,Ta=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})},Qc={info:function(e){return w.createElement(Ta,{...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(Ta,{...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(Ta,{...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(Ta,{...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"})}},u6=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=s6(e),{closeButton:a,children:i,autoClose:c,onClick:d,type:f,hideProgressBar:g,closeToast:y,transition:C,position:b,className:h,style:p,bodyClassName:m,bodyStyle:x,progressClassName:E,progressStyle:I,updateId:v,role:_,progress:A,rtl:S,toastId:L,deleteToast:N,isIn:D,isLoading:F,closeOnClick:M,theme:B}=e,V=Zn("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),Y=Bt(h)?h({rtl:S,position:b,type:f,defaultClassName:V}):Zn(V,h),W=function(ee){let{theme:G,type:J,isLoading:R,icon:X}=ee,K=null;const ne={theme:G,type:J};return X===!1||(Bt(X)?K=X({...ne,isLoading:R}):w.isValidElement(X)?K=w.cloneElement(X,ne):R?K=Qc.spinner():(le=>le in Qc)(J)&&(K=Qc[J](ne))),K}(e),H=!!A||!c,q={closeToast:y,type:f,theme:B};let Q=null;return a===!1||(Q=Bt(a)?a(q):w.isValidElement(a)?w.cloneElement(a,q):function(ee){let{closeToast:G,theme:J,ariaLabel:R="close"}=ee;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${J}`,type:"button",onClick:X=>{X.stopPropagation(),G(X)},"aria-label":R},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(C,{isIn:D,done:N,position:b,preventExitTransition:n,nodeRef:r,playToast:s},w.createElement("div",{id:L,onClick:d,"data-in":D,className:Y,...o,style:p,ref:r},w.createElement("div",{...D&&{role:_},className:Bt(m)?m({type:f}):Zn("Toastify__toast-body",m),style:x},W!=null&&w.createElement("div",{className:Zn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!F})},W),w.createElement("div",null,i)),Q,w.createElement(a6,{...v&&!H?{key:`pb-${v}`}:{},rtl:S,theme:B,delay:c,isRunning:t,isIn:D,closeToast:y,hide:g,type:f,style:I,className:E,controlledProgress:H,progress:A||0})))},La=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},d6=_a(La("bounce",!0));_a(La("slide",!0)),_a(La("zoom")),_a(La("flip"));const f6={position:"top-right",transition:d6,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function p6(e){let t={...f6,...e};const n=e.stacked,[r,o]=w.useState(!0),s=w.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=o6(t),{className:d,style:f,rtl:g,containerId:y}=t;function C(h){const p=Zn("Toastify__toast-container",`Toastify__toast-container--${h}`,{"Toastify__toast-container--rtl":g});return Bt(d)?d({position:h,rtl:g,defaultClassName:p}):Zn(p,Ia(d))}function b(){n&&(o(!0),De.play())}return l6(()=>{if(n){var h;const p=s.current.querySelectorAll('[data-in="true"]'),m=12,x=(h=t.position)==null?void 0:h.includes("top");let E=0,I=0;Array.from(p).reverse().forEach((v,_)=>{const A=v;A.classList.add("Toastify__toast--stacked"),_>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=x?"top":"bot");const S=E*(r?.2:1)+(r?0:m*_);A.style.setProperty("--y",`${x?S:-1*S}px`),A.style.setProperty("--g",`${m}`),A.style.setProperty("--s",""+(1-(r?I:0))),E+=A.offsetHeight,I+=.025})}},[r,c,n]),w.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),De.pause())},onMouseLeave:b},a((h,p)=>{const m=p.length?{...f}:{...f,pointerEvents:"none"};return w.createElement("div",{className:C(h),style:m,key:`container-${h}`},p.map(x=>{let{content:E,props:I}=x;return w.createElement(u6,{...I,stacked:n,collapseAll:b,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},E)}))}))}const h6="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",g6=l.styled(l.Box)`
|
|
591
591
|
display: flex;
|
|
592
592
|
flex-direction: row;
|
|
593
593
|
align-items: center;
|
|
594
|
-
`,
|
|
594
|
+
`,m6=l.styled(l.Box)`
|
|
595
595
|
padding: 5px 8px;
|
|
596
596
|
color: white;
|
|
597
|
-
`,
|
|
597
|
+
`,b6=l.styled(l.brandIcons.Logo)(()=>({height:"26px",width:"26px",color:"#FFFFFF",marginRight:"4px"})),y6=l.styled(l.Stack)`
|
|
598
598
|
flex-direction: row;
|
|
599
599
|
padding: 0 10px;
|
|
600
600
|
img {
|
|
@@ -604,7 +604,7 @@ Take a look at the reducer(s) handling this action type: ${C.type}.
|
|
|
604
604
|
fill: #ffffff;
|
|
605
605
|
width: 10px;
|
|
606
606
|
}
|
|
607
|
-
`,
|
|
607
|
+
`,x6=(e,{closeToast:t})=>u.jsx(y6,{children:u.jsx("img",{src:h6,onClick:t})}),Oa=({message:e})=>u.jsxs(g6,{children:[u.jsx(b6,{}),u.jsx(m6,{children:e})]}),ka=l.styled(l.Box)`
|
|
608
608
|
height: inherit;
|
|
609
609
|
.MuiScopedCssBaseline-root {
|
|
610
610
|
height: inherit;
|
|
@@ -712,7 +712,7 @@ Take a look at the reducer(s) handling this action type: ${C.type}.
|
|
|
712
712
|
[hidden] {
|
|
713
713
|
display: none;
|
|
714
714
|
}
|
|
715
|
-
`,
|
|
715
|
+
`,C6=l.styled(l.Box)`
|
|
716
716
|
:root {
|
|
717
717
|
--toastify-color-light: #fff;
|
|
718
718
|
--toastify-color-dark: #121212;
|
|
@@ -1443,7 +1443,7 @@ Take a look at the reducer(s) handling this action type: ${C.type}.
|
|
|
1443
1443
|
transform: rotate(360deg);
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
|
-
`,
|
|
1446
|
+
`,E6=l.styled(C6)`
|
|
1447
1447
|
.Toastify__toast-container {
|
|
1448
1448
|
min-width: 320px !important;
|
|
1449
1449
|
font-size: 16px;
|
|
@@ -1492,26 +1492,26 @@ Take a look at the reducer(s) handling this action type: ${C.type}.
|
|
|
1492
1492
|
align-self: auto !important;
|
|
1493
1493
|
margin-left: 12px;
|
|
1494
1494
|
}
|
|
1495
|
-
`,$c=new Set;let as=null,is=!1;const Df=()=>$c.forEach(e=>e()),E6=()=>{is||(is=!0,Df())},ka=({zIndex:e})=>{const t=w.useId(),[n,r]=w.useState(!1),[o,s]=w.useState(is);return w.useEffect(()=>{const a=()=>{is&&as===null&&(as=t),r(as===t),s(is)};return $c.add(a),a(),()=>{$c.delete(a),as===t&&(as=null,Df())}},[t]),!o||!n?null:$t.createPortal(u.jsx(C6,{id:"toast-message",children:u.jsx(f6,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...e&&{style:{zIndex:e}}})}),document.body)};function Ae(e){const{message:t,type:n,autoClose:r}=e;E6();const o={closeButton:u.jsx(y6,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=De.success(u.jsx(La,{message:t}),{...o,icon:!1});break}case"error":{s=De.error(u.jsx(La,{message:t}),{...o,icon:!1});break}case"info-dark":{s=De.info(u.jsx(La,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=De.info(u.jsx(La,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{v6(s)},r&&!isNaN(r)?Number(r):5e3),s}function v6(e){De.dismiss(e)}const Nf={updateFormApiStatus:te.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:te.IDLE,unlinkCardApiStatus:te.IDLE,linkCardApiStatus:te.IDLE,optionsMap:null,dropdownOptionsApis:te.IDLE,dependentFieldsMap:{},createFormApiStatus:te.IDLE,currentResourceDetailsApiStatus:te.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},Rf=e=>{if(typeof e.userAuthEnabled=="boolean")return e;const t=e.user_auth_enabled;return typeof t=="boolean"?{...e,userAuthEnabled:t}:e},w6="/v1/api"+"/templates/metadata",Mf={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},I6="Required Field",_6="Invalid date",jf=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,S6=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Pf="Please enter a valid URL",A6="Please enter valid ID",T6="Please enter valid input",L6="URL must start with https://",O6="URL should not end with a slash",k6="Invalid email address",F6="Email must be a string",Bf="Invalid date",D6="Date cannot be in the past",N6="Date cannot be in the future",R6="Invalid number",M6="Invalid text",j6=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)}),ve({url:`${w6}?${t.toString()}`,method:Mf.GET})},P6="/v1/api/connectors/ug",Vf=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=P6+`?${t.toString()}`,r=await ve({url:n,method:Mf.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):[]};var Uc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(Uc||{});const B6={[Uc.ADD]:(e,t)=>e+t,[Uc.MULTIPLY]:(e,t)=>e*t},V6=e=>e,Gf=()=>{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}`},Hf=(e,t)=>{let n;const r=B6[t]??V6;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},Wf=(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},G6=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Zf=e=>typeof e=="object"&&e!==null&&"value"in e&&"label"in e,H6={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},W6="/v1/api/connectors/forms/:formId/get_forms_custom_fields",Z6=async({formId:e,args:t})=>{try{const n=await ve({url:G6(W6,{formId:e}),data:{args:t},method:H6.POST});return(n==null?void 0:n.data).fieldList}catch(n){throw console.error(n),n}},zf=(e,t)=>{if(!t)return{isApiEnabled:!0,args:{},argsMap:t};const n={};for(const r in t){const o=t[r],s=Zf(e[o])?e[o].value:e[o];if(!s)return{isApiEnabled:!1,args:{}};n[r]=s}return{isApiEnabled:!0,args:n,argsMap:t}},z6=({formId:e,argsMap:t,formData:n,enabled:r=!0,delay:o=500})=>{const[s,a]=w.useState(()=>zf(n,t));w.useEffect(()=>{const d=setTimeout(()=>{a(zf(n,t))},o);return()=>clearTimeout(d)},[n,t,o]);const i=s.argsMap===t,c=Ot({queryKey:["customFormFields",e,s.args],queryFn:()=>Z6({formId:e,args:s.args}),enabled:!!e&&r&&i&&s.isApiEnabled,staleTime:0});return{...c,data:s.isApiEnabled?c.data:void 0}},Xf=e=>{const t={current:null};return n=>{t.current&&clearTimeout(t.current),t.current=setTimeout(n,e)}};let ao={};const X6={get length(){return Object.keys(ao).length},getItem(e){return ao[e]??null},setItem(e,t){ao[e]=t},removeItem(e){delete ao[e]},clear(){ao={}},key(e){return Object.keys(ao)[e]}},Y6={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},cs=(e="LOCAL")=>Y6[e]??X6,Yf=(e="LOCAL")=>{const t=cs(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)}}}},Kc=Symbol("root"),J6="connectors-store",q6=e=>{const{name:t,initialState:n,persist:r,persistKey:o=`${J6}-${t}`}=e,s=Yf("LOCAL"),a={...n},i=r?s.getItem(o)??a:a,c=new Map,d=new Map;d.set(Kc,new Set);const f=(b,h,p=!0)=>{var E;const m=Symbol("callback");c.set(m,b);const x=h||Kc;if(d.has(x)||d.set(x,new Set),(E=d.get(x))==null||E.add(m),p){const I=h?i[h]:i;b(I)}return()=>{var I;c.delete(m),(I=d.get(x))==null||I.delete(m)}},g=(b,h)=>{h?i[h]=b:Object.assign(i,b),C();const p=h||Kc,m=d.get(p);if(m)for(const x of m){const E=c.get(x);E==null||E(h?i[h]:i)}},y=b=>b?i[b]:{...i},C=()=>{r&&s.setItem(o,i)};return{subscribe:f,setData:g,getData:y}},Q6=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?O6:jf.test(n)?!0:e||Pf:L6}return!1},$6=e=>t=>t&&typeof t=="string"?S6.test(t)?!0:e||k6:F6,U6=e=>t=>t==null||t===""?e||I6:!0,K6=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===_6)return Bf;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||D6:i&&o>s?e||N6:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:Bf},e9=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||R6},el=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||M6},t9=e=>t=>typeof t=="string"?t.startsWith("https:")?jf.test(t)?!0:e||Pf:t.trim().length>0?!0:e||A6:e||T6,n9=["async-select","select","multi-select","reference"],Jf=(e,t)=>{const n=Array.isArray(e)?e:e?[e]:[],r=Array.isArray(t)?t:t?[t]:[];return n.map((o,s)=>({value:o,label:r[s]??String(o)}))},qf=(e,t=!1)=>{const n={};for(const r in e){const o=e[r];if(!(o!=null&&o.label)&&!(o!=null&&o.value))continue;const s=o.label??o.value??"",a=Array.isArray(s)?s[0]??"":s;if(t&&o.type==="date"){const i=isNaN(Number(a))?a:Number(a),c=new Date(i);n[r]=isNaN(c.getTime())?a:c.toISOString();continue}if(n9.includes(o.type)){o.type==="multi-select"?n[r]=Jf(o.value,o.label):n[r]={label:o.label,value:o.value};continue}n[r]=a}return n},r9=(e,t)=>{const n={};for(const o of t)n[o.name]=o.type;const r={};for(const o in e){const s=e[o];if(Array.isArray(s)){const a=s.map(i=>i&&typeof i=="object"&&"value"in i&&"label"in i?i:{value:i,label:i});r[o]={value:a.map(i=>i.value),label:a.map(i=>i.label),type:n[o]}}else s&&typeof s=="object"&&"value"in s&&"label"in s?r[o]={value:s.value,label:s.label,type:n[o]}:r[o]={value:s,label:s,type:n[o]}}return r},o9=e=>{let t=0,n=!1;for(const r in e){const o=e[r];if(o!=null&&o.value){t++;const s=o.value;if(typeof s!="string")continue;s.includes("{{")&&s.includes("}}")&&(n=!0)}}return{fields_configured_count:t,has_system_variable:n}};function Ar(e){"@babel/helpers - typeof";return Ar=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},Ar(e)}function s9(e,t){if(Ar(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ar(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qf(e){var t=s9(e,"string");return Ar(t)=="symbol"?t:t+""}function io(e,t,n){return(t=Qf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $f(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 ae(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$f(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$f(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a9(e){if(Array.isArray(e))return e}function i9(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,d=!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){d=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw o}}return i}}function tl(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 Uf(e,t){if(e){if(typeof e=="string")return tl(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)?tl(e,t):void 0}}function c9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1496
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function st(e,t){return
|
|
1497
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function co(e){return b9(e)||y9(e)||Uf(e)||x9()}var C9=!1;function E9(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 v9(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 w9=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?!C9: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(v9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=E9(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}(),ft="-ms-",Da="-moz-",ke="-webkit-",tp="comm",ol="rule",sl="decl",I9="@import",np="@keyframes",_9="@layer",S9=Math.abs,Na=String.fromCharCode,A9=Object.assign;function T9(e,t){return ct(e,0)^45?(((t<<2^ct(e,0))<<2^ct(e,1))<<2^ct(e,2))<<2^ct(e,3):0}function rp(e){return e.trim()}function L9(e,t){return(e=t.exec(e))?e[0]:e}function Fe(e,t,n){return e.replace(t,n)}function al(e,t){return e.indexOf(t)}function ct(e,t){return e.charCodeAt(t)|0}function ls(e,t,n){return e.slice(t,n)}function hn(e){return e.length}function il(e){return e.length}function Ra(e,t){return t.push(e),e}function O9(e,t){return e.map(t).join("")}var Ma=1,lo=1,op=0,It=0,et=0,uo="";function ja(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Ma,column:lo,length:a,return:""}}function us(e,t){return A9(ja("",null,null,"",null,null,0),e,{length:-e.length},t)}function k9(){return et}function F9(){return et=It>0?ct(uo,--It):0,lo--,et===10&&(lo=1,Ma--),et}function Pt(){return et=It<op?ct(uo,It++):0,lo++,et===10&&(lo=1,Ma++),et}function gn(){return ct(uo,It)}function Pa(){return It}function ds(e,t){return ls(uo,e,t)}function fs(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 sp(e){return Ma=lo=1,op=hn(uo=e),It=0,[]}function ap(e){return uo="",e}function Ba(e){return rp(ds(It-1,cl(e===91?e+2:e===40?e+1:e)))}function D9(e){for(;(et=gn())&&et<33;)Pt();return fs(e)>2||fs(et)>3?"":" "}function N9(e,t){for(;--t&&Pt()&&!(et<48||et>102||et>57&&et<65||et>70&&et<97););return ds(e,Pa()+(t<6&&gn()==32&&Pt()==32))}function cl(e){for(;Pt();)switch(et){case e:return It;case 34:case 39:e!==34&&e!==39&&cl(et);break;case 40:e===41&&cl(e);break;case 92:Pt();break}return It}function R9(e,t){for(;Pt()&&e+et!==57;)if(e+et===84&&gn()===47)break;return"/*"+ds(t,It-1)+"*"+Na(e===47?e:Pt())}function M9(e){for(;!fs(gn());)Pt();return ds(e,It)}function j9(e){return ap(Va("",null,null,null,[""],e=sp(e),0,[0],e))}function Va(e,t,n,r,o,s,a,i,c){for(var d=0,f=0,g=a,y=0,C=0,b=0,h=1,p=1,m=1,x=0,E="",I=o,v=s,_=r,A=E;p;)switch(b=x,x=Pt()){case 40:if(b!=108&&ct(A,g-1)==58){al(A+=Fe(Ba(x),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:A+=Ba(x);break;case 9:case 10:case 13:case 32:A+=D9(b);break;case 92:A+=N9(Pa()-1,7);continue;case 47:switch(gn()){case 42:case 47:Ra(P9(R9(Pt(),Pa()),t,n),c);break;default:A+="/"}break;case 123*h:i[d++]=hn(A)*m;case 125*h:case 59:case 0:switch(x){case 0:case 125:p=0;case 59+f:m==-1&&(A=Fe(A,/\f/g,"")),C>0&&hn(A)-g&&Ra(C>32?cp(A+";",r,n,g-1):cp(Fe(A," ","")+";",r,n,g-2),c);break;case 59:A+=";";default:if(Ra(_=ip(A,t,n,d,f,o,i,E,I=[],v=[],g),s),x===123)if(f===0)Va(A,t,_,_,I,s,g,i,v);else switch(y===99&&ct(A,3)===110?100:y){case 100:case 108:case 109:case 115:Va(e,_,_,r&&Ra(ip(e,_,_,0,0,o,i,E,o,I=[],g),v),o,v,g,i,r?I:v);break;default:Va(A,_,_,_,[""],v,0,i,v)}}d=f=C=0,h=m=1,E=A="",g=a;break;case 58:g=1+hn(A),C=b;default:if(h<1){if(x==123)--h;else if(x==125&&h++==0&&F9()==125)continue}switch(A+=Na(x),x*h){case 38:m=f>0?1:(A+="\f",-1);break;case 44:i[d++]=(hn(A)-1)*m,m=1;break;case 64:gn()===45&&(A+=Ba(Pt())),y=gn(),f=g=hn(E=A+=M9(Pa())),x++;break;case 45:b===45&&hn(A)==2&&(h=0)}}return s}function ip(e,t,n,r,o,s,a,i,c,d,f){for(var g=o-1,y=o===0?s:[""],C=il(y),b=0,h=0,p=0;b<r;++b)for(var m=0,x=ls(e,g+1,g=S9(h=a[b])),E=e;m<C;++m)(E=rp(h>0?y[m]+" "+x:Fe(x,/&\f/g,y[m])))&&(c[p++]=E);return ja(e,t,n,o===0?ol:i,c,d,f)}function P9(e,t,n){return ja(e,t,n,tp,Na(k9()),ls(e,2,-2),0)}function cp(e,t,n,r){return ja(e,t,n,sl,ls(e,0,r),ls(e,r+1,-1),r)}function fo(e,t){for(var n="",r=il(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function B9(e,t,n,r){switch(e.type){case _9:if(e.children.length)break;case I9:case sl:return e.return=e.return||e.value;case tp:return"";case np:return e.return=e.value+"{"+fo(e.children,r)+"}";case ol:e.value=e.props.join(",")}return hn(n=fo(e.children,r))?e.return=e.value+"{"+n+"}":""}function V9(e){var t=il(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 G9(e){return function(t){t.root||(t=t.return)&&e(t)}}function H9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var W9=function(t,n,r){for(var o=0,s=0;o=s,s=gn(),o===38&&s===12&&(n[r]=1),!fs(s);)Pt();return ds(t,It)},Z9=function(t,n){var r=-1,o=44;do switch(fs(o)){case 0:o===38&&gn()===12&&(n[r]=1),t[r]+=W9(It-1,n,r);break;case 2:t[r]+=Ba(o);break;case 4:if(o===44){t[++r]=gn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Na(o)}while(o=Pt());return t},z9=function(t,n){return ap(Z9(sp(t),n))},lp=new WeakMap,X9=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&&!lp.get(r))&&!o){lp.set(t,!0);for(var s=[],a=z9(n,s),i=r.props,c=0,d=0;c<a.length;c++)for(var f=0;f<i.length;f++,d++)t.props[d]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},Y9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function up(e,t){switch(T9(e,t)){case 5103:return ke+"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 ke+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ke+e+Da+e+ft+e+e;case 6828:case 4268:return ke+e+ft+e+e;case 6165:return ke+e+ft+"flex-"+e+e;case 5187:return ke+e+Fe(e,/(\w+).+(:[^]+)/,ke+"box-$1$2"+ft+"flex-$1$2")+e;case 5443:return ke+e+ft+"flex-item-"+Fe(e,/flex-|-self/,"")+e;case 4675:return ke+e+ft+"flex-line-pack"+Fe(e,/align-content|flex-|-self/,"")+e;case 5548:return ke+e+ft+Fe(e,"shrink","negative")+e;case 5292:return ke+e+ft+Fe(e,"basis","preferred-size")+e;case 6060:return ke+"box-"+Fe(e,"-grow","")+ke+e+ft+Fe(e,"grow","positive")+e;case 4554:return ke+Fe(e,/([^-])(transform)/g,"$1"+ke+"$2")+e;case 6187:return Fe(Fe(Fe(e,/(zoom-|grab)/,ke+"$1"),/(image-set)/,ke+"$1"),e,"")+e;case 5495:case 3959:return Fe(e,/(image-set\([^]*)/,ke+"$1$`$1");case 4968:return Fe(Fe(e,/(.+:)(flex-)?(.*)/,ke+"box-pack:$3"+ft+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ke+e+e;case 4095:case 3583:case 4068:case 2532:return Fe(e,/(.+)-inline(.+)/,ke+"$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(hn(e)-1-t>6)switch(ct(e,t+1)){case 109:if(ct(e,t+4)!==45)break;case 102:return Fe(e,/(.+:)(.+)-([^]+)/,"$1"+ke+"$2-$3$1"+Da+(ct(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~al(e,"stretch")?up(Fe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ct(e,t+1)!==115)break;case 6444:switch(ct(e,hn(e)-3-(~al(e,"!important")&&10))){case 107:return Fe(e,":",":"+ke)+e;case 101:return Fe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ke+(ct(e,14)===45?"inline-":"")+"box$3$1"+ke+"$2$3$1"+ft+"$2box$3")+e}break;case 5936:switch(ct(e,t+11)){case 114:return ke+e+ft+Fe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ke+e+ft+Fe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ke+e+ft+Fe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ke+e+ft+e+e}return e}var J9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case sl:t.return=up(t.value,t.length);break;case np:return fo([us(t,{value:Fe(t.value,"@","@"+ke)})],o);case ol:if(t.length)return O9(t.props,function(s){switch(L9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return fo([us(t,{props:[Fe(s,/:(read-\w+)/,":"+Da+"$1")]})],o);case"::placeholder":return fo([us(t,{props:[Fe(s,/:(plac\w+)/,":"+ke+"input-$1")]}),us(t,{props:[Fe(s,/:(plac\w+)/,":"+Da+"$1")]}),us(t,{props:[Fe(s,/:(plac\w+)/,ft+"input-$1")]})],o)}return""})}},q9=[J9],Q9=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||q9,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(" "),m=1;m<p.length;m++)s[p[m]]=!0;i.push(h)});var c,d=[X9,Y9];{var f,g=[B9,G9(function(h){f.insert(h)})],y=V9(d.concat(o,g)),C=function(p){return fo(j9(p),y)};c=function(p,m,x,E){f=x,C(p?p+"{"+m.styles+"}":m.styles),E&&(b.inserted[m.name]=!0)}}var b={key:n,sheet:new w9({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},ll={exports:{}},Ne={};/** @license React v16.13.1
|
|
1495
|
+
`,$c=new Set;let is=null,cs=!1;const Df=()=>$c.forEach(e=>e()),v6=()=>{cs||(cs=!0,Df())},Fa=({zIndex:e})=>{const t=w.useId(),[n,r]=w.useState(!1),[o,s]=w.useState(cs);return w.useEffect(()=>{const a=()=>{cs&&is===null&&(is=t),r(is===t),s(cs)};return $c.add(a),a(),()=>{$c.delete(a),is===t&&(is=null,Df())}},[t]),!o||!n?null:$t.createPortal(u.jsx(E6,{id:"toast-message",children:u.jsx(p6,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...e&&{style:{zIndex:e}}})}),document.body)};function Te(e){const{message:t,type:n,autoClose:r}=e;v6();const o={closeButton:u.jsx(x6,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=De.success(u.jsx(Oa,{message:t}),{...o,icon:!1});break}case"error":{s=De.error(u.jsx(Oa,{message:t}),{...o,icon:!1});break}case"info-dark":{s=De.info(u.jsx(Oa,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=De.info(u.jsx(Oa,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{w6(s)},r&&!isNaN(r)?Number(r):5e3),s}function w6(e){De.dismiss(e)}const Nf={updateFormApiStatus:te.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:te.IDLE,unlinkCardApiStatus:te.IDLE,linkCardApiStatus:te.IDLE,optionsMap:null,dropdownOptionsApis:te.IDLE,dependentFieldsMap:{},createFormApiStatus:te.IDLE,currentResourceDetailsApiStatus:te.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},Rf=e=>{if(typeof e.userAuthEnabled=="boolean")return e;const t=e.user_auth_enabled;return typeof t=="boolean"?{...e,userAuthEnabled:t}:e},I6="/v1/api"+"/templates/metadata",Mf={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},_6="Required Field",S6="Invalid date",jf=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,A6=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Pf="Please enter a valid URL",T6="Please enter valid ID",L6="Please enter valid input",O6="URL must start with https://",k6="URL should not end with a slash",F6="Invalid email address",D6="Email must be a string",Bf="Invalid date",N6="Date cannot be in the past",R6="Date cannot be in the future",M6="Invalid number",j6="Invalid text",P6=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)}),ve({url:`${I6}?${t.toString()}`,method:Mf.GET})},B6="/v1/api/connectors/ug",Vf=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=B6+`?${t.toString()}`,r=await ve({url:n,method:Mf.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):[]};var Uc=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(Uc||{});const V6={[Uc.ADD]:(e,t)=>e+t,[Uc.MULTIPLY]:(e,t)=>e*t},G6=e=>e,Gf=()=>{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}`},Hf=(e,t)=>{let n;const r=V6[t]??G6;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},Wf=(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},H6=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Zf=e=>typeof e=="object"&&e!==null&&"value"in e&&"label"in e,W6={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},Z6="/v1/api/connectors/forms/:formId/get_forms_custom_fields",z6=async({formId:e,args:t})=>{try{const n=await ve({url:H6(Z6,{formId:e}),data:{args:t},method:W6.POST});return(n==null?void 0:n.data).fieldList}catch(n){throw console.error(n),n}},zf=(e,t)=>{if(!t)return{isApiEnabled:!0,args:{},argsMap:t};const n={};for(const r in t){const o=t[r],s=Zf(e[o])?e[o].value:e[o];if(!s)return{isApiEnabled:!1,args:{}};n[r]=s}return{isApiEnabled:!0,args:n,argsMap:t}},X6=({formId:e,argsMap:t,formData:n,enabled:r=!0,delay:o=500})=>{const[s,a]=w.useState(()=>zf(n,t));w.useEffect(()=>{const d=setTimeout(()=>{a(zf(n,t))},o);return()=>clearTimeout(d)},[n,t,o]);const i=s.argsMap===t,c=Ft({queryKey:["customFormFields",e,s.args],queryFn:()=>z6({formId:e,args:s.args}),enabled:!!e&&r&&i&&s.isApiEnabled,staleTime:0});return{...c,data:s.isApiEnabled?c.data:void 0}},Xf=e=>{const t={current:null};return n=>{t.current&&clearTimeout(t.current),t.current=setTimeout(n,e)}};let ao={};const Y6={get length(){return Object.keys(ao).length},getItem(e){return ao[e]??null},setItem(e,t){ao[e]=t},removeItem(e){delete ao[e]},clear(){ao={}},key(e){return Object.keys(ao)[e]}},J6={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},ls=(e="LOCAL")=>J6[e]??Y6,Yf=(e="LOCAL")=>{const t=ls(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)}}}},Kc=Symbol("root"),q6="connectors-store",Q6=e=>{const{name:t,initialState:n,persist:r,persistKey:o=`${q6}-${t}`}=e,s=Yf("LOCAL"),a={...n},i=r?s.getItem(o)??a:a,c=new Map,d=new Map;d.set(Kc,new Set);const f=(b,h,p=!0)=>{var E;const m=Symbol("callback");c.set(m,b);const x=h||Kc;if(d.has(x)||d.set(x,new Set),(E=d.get(x))==null||E.add(m),p){const I=h?i[h]:i;b(I)}return()=>{var I;c.delete(m),(I=d.get(x))==null||I.delete(m)}},g=(b,h)=>{h?i[h]=b:Object.assign(i,b),C();const p=h||Kc,m=d.get(p);if(m)for(const x of m){const E=c.get(x);E==null||E(h?i[h]:i)}},y=b=>b?i[b]:{...i},C=()=>{r&&s.setItem(o,i)};return{subscribe:f,setData:g,getData:y}},$6=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?k6:jf.test(n)?!0:e||Pf:O6}return!1},U6=e=>t=>t&&typeof t=="string"?A6.test(t)?!0:e||F6:D6,K6=e=>t=>t==null||t===""?e||_6:!0,e9=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===S6)return Bf;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||N6:i&&o>s?e||R6:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:Bf},t9=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||M6},el=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||j6},n9=e=>t=>typeof t=="string"?t.startsWith("https:")?jf.test(t)?!0:e||Pf:t.trim().length>0?!0:e||T6:e||L6,r9=["async-select","select","multi-select","reference"],Jf=(e,t)=>{const n=Array.isArray(e)?e:e?[e]:[],r=Array.isArray(t)?t:t?[t]:[];return n.map((o,s)=>({value:o,label:r[s]??String(o)}))},qf=(e,t=!1)=>{const n={};for(const r in e){const o=e[r];if(!(o!=null&&o.label)&&!(o!=null&&o.value))continue;const s=o.label??o.value??"",a=Array.isArray(s)?s[0]??"":s;if(t&&o.type==="date"){const i=isNaN(Number(a))?a:Number(a),c=new Date(i);n[r]=isNaN(c.getTime())?a:c.toISOString();continue}if(r9.includes(o.type)){o.type==="multi-select"?n[r]=Jf(o.value,o.label):n[r]={label:o.label,value:o.value};continue}n[r]=a}return n},o9=(e,t)=>{const n={};for(const o of t)n[o.name]=o.type;const r={};for(const o in e){const s=e[o];if(Array.isArray(s)){const a=s.map(i=>i&&typeof i=="object"&&"value"in i&&"label"in i?i:{value:i,label:i});r[o]={value:a.map(i=>i.value),label:a.map(i=>i.label),type:n[o]}}else s&&typeof s=="object"&&"value"in s&&"label"in s?r[o]={value:s.value,label:s.label,type:n[o]}:r[o]={value:s,label:s,type:n[o]}}return r},s9=e=>{let t=0,n=!1;for(const r in e){const o=e[r];if(o!=null&&o.value){t++;const s=o.value;if(typeof s!="string")continue;s.includes("{{")&&s.includes("}}")&&(n=!0)}}return{fields_configured_count:t,has_system_variable:n}};function Ir(e){"@babel/helpers - typeof";return Ir=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},Ir(e)}function a9(e,t){if(Ir(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ir(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qf(e){var t=a9(e,"string");return Ir(t)=="symbol"?t:t+""}function io(e,t,n){return(t=Qf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $f(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 ie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$f(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$f(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function i9(e){if(Array.isArray(e))return e}function c9(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,d=!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){d=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(d)throw o}}return i}}function tl(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 Uf(e,t){if(e){if(typeof e=="string")return tl(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)?tl(e,t):void 0}}function l9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1496
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function st(e,t){return i9(e)||c9(e,t)||Uf(e,t)||l9()}function u9(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 an(e,t){if(e==null)return{};var n,r,o=u9(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 d9=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function nl(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,d=e.onChange,f=e.onInputChange,g=e.onMenuClose,y=e.onMenuOpen,C=e.value,b=an(e,d9),h=w.useState(i!==void 0?i:n),p=st(h,2),m=p[0],x=p[1],E=w.useState(c!==void 0?c:o),I=st(E,2),v=I[0],_=I[1],A=w.useState(C!==void 0?C:a),S=st(A,2),L=S[0],N=S[1],D=w.useCallback(function(H,q){typeof d=="function"&&d(H,q),N(H)},[d]),F=w.useCallback(function(H,q){var Q;typeof f=="function"&&(Q=f(H,q)),x(Q!==void 0?Q:H)},[f]),M=w.useCallback(function(){typeof y=="function"&&y(),_(!0)},[y]),B=w.useCallback(function(){typeof g=="function"&&g(),_(!1)},[g]),V=i!==void 0?i:m,Y=c!==void 0?c:v,W=C!==void 0?C:L;return ie(ie({},b),{},{inputValue:V,menuIsOpen:Y,onChange:D,onInputChange:F,onMenuClose:B,onMenuOpen:M,value:W})}function fe(){return fe=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},fe.apply(null,arguments)}function f9(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kf(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,Qf(r.key),r)}}function p9(e,t,n){return t&&Kf(e.prototype,t),n&&Kf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rl(e,t){return rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},rl(e,t)}function h9(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&&rl(e,t)}function Da(e){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(e)}function ep(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ep=function(){return!!e})()}function g9(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m9(e,t){if(t&&(Ir(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g9(e)}function b9(e){var t=ep();return function(){var n,r=Da(e);if(t){var o=Da(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m9(this,n)}}function y9(e){if(Array.isArray(e))return tl(e)}function x9(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function C9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1497
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function co(e){return y9(e)||x9(e)||Uf(e)||C9()}var E9=!1;function v9(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 w9(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var I9=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!E9: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(w9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=v9(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}(),dt="-ms-",Na="-moz-",ke="-webkit-",tp="comm",ol="rule",sl="decl",_9="@import",np="@keyframes",S9="@layer",A9=Math.abs,Ra=String.fromCharCode,T9=Object.assign;function L9(e,t){return it(e,0)^45?(((t<<2^it(e,0))<<2^it(e,1))<<2^it(e,2))<<2^it(e,3):0}function rp(e){return e.trim()}function O9(e,t){return(e=t.exec(e))?e[0]:e}function Fe(e,t,n){return e.replace(t,n)}function al(e,t){return e.indexOf(t)}function it(e,t){return e.charCodeAt(t)|0}function us(e,t,n){return e.slice(t,n)}function pn(e){return e.length}function il(e){return e.length}function Ma(e,t){return t.push(e),e}function k9(e,t){return e.map(t).join("")}var ja=1,lo=1,op=0,wt=0,et=0,uo="";function Pa(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:ja,column:lo,length:a,return:""}}function ds(e,t){return T9(Pa("",null,null,"",null,null,0),e,{length:-e.length},t)}function F9(){return et}function D9(){return et=wt>0?it(uo,--wt):0,lo--,et===10&&(lo=1,ja--),et}function Vt(){return et=wt<op?it(uo,wt++):0,lo++,et===10&&(lo=1,ja++),et}function hn(){return it(uo,wt)}function Ba(){return wt}function fs(e,t){return us(uo,e,t)}function ps(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 sp(e){return ja=lo=1,op=pn(uo=e),wt=0,[]}function ap(e){return uo="",e}function Va(e){return rp(fs(wt-1,cl(e===91?e+2:e===40?e+1:e)))}function N9(e){for(;(et=hn())&&et<33;)Vt();return ps(e)>2||ps(et)>3?"":" "}function R9(e,t){for(;--t&&Vt()&&!(et<48||et>102||et>57&&et<65||et>70&&et<97););return fs(e,Ba()+(t<6&&hn()==32&&Vt()==32))}function cl(e){for(;Vt();)switch(et){case e:return wt;case 34:case 39:e!==34&&e!==39&&cl(et);break;case 40:e===41&&cl(e);break;case 92:Vt();break}return wt}function M9(e,t){for(;Vt()&&e+et!==57;)if(e+et===84&&hn()===47)break;return"/*"+fs(t,wt-1)+"*"+Ra(e===47?e:Vt())}function j9(e){for(;!ps(hn());)Vt();return fs(e,wt)}function P9(e){return ap(Ga("",null,null,null,[""],e=sp(e),0,[0],e))}function Ga(e,t,n,r,o,s,a,i,c){for(var d=0,f=0,g=a,y=0,C=0,b=0,h=1,p=1,m=1,x=0,E="",I=o,v=s,_=r,A=E;p;)switch(b=x,x=Vt()){case 40:if(b!=108&&it(A,g-1)==58){al(A+=Fe(Va(x),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:A+=Va(x);break;case 9:case 10:case 13:case 32:A+=N9(b);break;case 92:A+=R9(Ba()-1,7);continue;case 47:switch(hn()){case 42:case 47:Ma(B9(M9(Vt(),Ba()),t,n),c);break;default:A+="/"}break;case 123*h:i[d++]=pn(A)*m;case 125*h:case 59:case 0:switch(x){case 0:case 125:p=0;case 59+f:m==-1&&(A=Fe(A,/\f/g,"")),C>0&&pn(A)-g&&Ma(C>32?cp(A+";",r,n,g-1):cp(Fe(A," ","")+";",r,n,g-2),c);break;case 59:A+=";";default:if(Ma(_=ip(A,t,n,d,f,o,i,E,I=[],v=[],g),s),x===123)if(f===0)Ga(A,t,_,_,I,s,g,i,v);else switch(y===99&&it(A,3)===110?100:y){case 100:case 108:case 109:case 115:Ga(e,_,_,r&&Ma(ip(e,_,_,0,0,o,i,E,o,I=[],g),v),o,v,g,i,r?I:v);break;default:Ga(A,_,_,_,[""],v,0,i,v)}}d=f=C=0,h=m=1,E=A="",g=a;break;case 58:g=1+pn(A),C=b;default:if(h<1){if(x==123)--h;else if(x==125&&h++==0&&D9()==125)continue}switch(A+=Ra(x),x*h){case 38:m=f>0?1:(A+="\f",-1);break;case 44:i[d++]=(pn(A)-1)*m,m=1;break;case 64:hn()===45&&(A+=Va(Vt())),y=hn(),f=g=pn(E=A+=j9(Ba())),x++;break;case 45:b===45&&pn(A)==2&&(h=0)}}return s}function ip(e,t,n,r,o,s,a,i,c,d,f){for(var g=o-1,y=o===0?s:[""],C=il(y),b=0,h=0,p=0;b<r;++b)for(var m=0,x=us(e,g+1,g=A9(h=a[b])),E=e;m<C;++m)(E=rp(h>0?y[m]+" "+x:Fe(x,/&\f/g,y[m])))&&(c[p++]=E);return Pa(e,t,n,o===0?ol:i,c,d,f)}function B9(e,t,n){return Pa(e,t,n,tp,Ra(F9()),us(e,2,-2),0)}function cp(e,t,n,r){return Pa(e,t,n,sl,us(e,0,r),us(e,r+1,-1),r)}function fo(e,t){for(var n="",r=il(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function V9(e,t,n,r){switch(e.type){case S9:if(e.children.length)break;case _9:case sl:return e.return=e.return||e.value;case tp:return"";case np:return e.return=e.value+"{"+fo(e.children,r)+"}";case ol:e.value=e.props.join(",")}return pn(n=fo(e.children,r))?e.return=e.value+"{"+n+"}":""}function G9(e){var t=il(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 H9(e){return function(t){t.root||(t=t.return)&&e(t)}}function W9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Z9=function(t,n,r){for(var o=0,s=0;o=s,s=hn(),o===38&&s===12&&(n[r]=1),!ps(s);)Vt();return fs(t,wt)},z9=function(t,n){var r=-1,o=44;do switch(ps(o)){case 0:o===38&&hn()===12&&(n[r]=1),t[r]+=Z9(wt-1,n,r);break;case 2:t[r]+=Va(o);break;case 4:if(o===44){t[++r]=hn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ra(o)}while(o=Vt());return t},X9=function(t,n){return ap(z9(sp(t),n))},lp=new WeakMap,Y9=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&&!lp.get(r))&&!o){lp.set(t,!0);for(var s=[],a=X9(n,s),i=r.props,c=0,d=0;c<a.length;c++)for(var f=0;f<i.length;f++,d++)t.props[d]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},J9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function up(e,t){switch(L9(e,t)){case 5103:return ke+"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 ke+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ke+e+Na+e+dt+e+e;case 6828:case 4268:return ke+e+dt+e+e;case 6165:return ke+e+dt+"flex-"+e+e;case 5187:return ke+e+Fe(e,/(\w+).+(:[^]+)/,ke+"box-$1$2"+dt+"flex-$1$2")+e;case 5443:return ke+e+dt+"flex-item-"+Fe(e,/flex-|-self/,"")+e;case 4675:return ke+e+dt+"flex-line-pack"+Fe(e,/align-content|flex-|-self/,"")+e;case 5548:return ke+e+dt+Fe(e,"shrink","negative")+e;case 5292:return ke+e+dt+Fe(e,"basis","preferred-size")+e;case 6060:return ke+"box-"+Fe(e,"-grow","")+ke+e+dt+Fe(e,"grow","positive")+e;case 4554:return ke+Fe(e,/([^-])(transform)/g,"$1"+ke+"$2")+e;case 6187:return Fe(Fe(Fe(e,/(zoom-|grab)/,ke+"$1"),/(image-set)/,ke+"$1"),e,"")+e;case 5495:case 3959:return Fe(e,/(image-set\([^]*)/,ke+"$1$`$1");case 4968:return Fe(Fe(e,/(.+:)(flex-)?(.*)/,ke+"box-pack:$3"+dt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ke+e+e;case 4095:case 3583:case 4068:case 2532:return Fe(e,/(.+)-inline(.+)/,ke+"$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(pn(e)-1-t>6)switch(it(e,t+1)){case 109:if(it(e,t+4)!==45)break;case 102:return Fe(e,/(.+:)(.+)-([^]+)/,"$1"+ke+"$2-$3$1"+Na+(it(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~al(e,"stretch")?up(Fe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(it(e,t+1)!==115)break;case 6444:switch(it(e,pn(e)-3-(~al(e,"!important")&&10))){case 107:return Fe(e,":",":"+ke)+e;case 101:return Fe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ke+(it(e,14)===45?"inline-":"")+"box$3$1"+ke+"$2$3$1"+dt+"$2box$3")+e}break;case 5936:switch(it(e,t+11)){case 114:return ke+e+dt+Fe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ke+e+dt+Fe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ke+e+dt+Fe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ke+e+dt+e+e}return e}var q9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case sl:t.return=up(t.value,t.length);break;case np:return fo([ds(t,{value:Fe(t.value,"@","@"+ke)})],o);case ol:if(t.length)return k9(t.props,function(s){switch(O9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return fo([ds(t,{props:[Fe(s,/:(read-\w+)/,":"+Na+"$1")]})],o);case"::placeholder":return fo([ds(t,{props:[Fe(s,/:(plac\w+)/,":"+ke+"input-$1")]}),ds(t,{props:[Fe(s,/:(plac\w+)/,":"+Na+"$1")]}),ds(t,{props:[Fe(s,/:(plac\w+)/,dt+"input-$1")]})],o)}return""})}},Q9=[q9],$9=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||Q9,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(" "),m=1;m<p.length;m++)s[p[m]]=!0;i.push(h)});var c,d=[Y9,J9];{var f,g=[V9,H9(function(h){f.insert(h)})],y=G9(d.concat(o,g)),C=function(p){return fo(P9(p),y)};c=function(p,m,x,E){f=x,C(p?p+"{"+m.styles+"}":m.styles),E&&(b.inserted[m.name]=!0)}}var b={key:n,sheet:new I9({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return b.sheet.hydrate(i),b},ll={exports:{}},Ne={};/** @license React v16.13.1
|
|
1498
1498
|
* react-is.production.min.js
|
|
1499
1499
|
*
|
|
1500
1500
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1501
1501
|
*
|
|
1502
1502
|
* This source code is licensed under the MIT license found in the
|
|
1503
1503
|
* LICENSE file in the root directory of this source tree.
|
|
1504
|
-
*/var dp;function
|
|
1504
|
+
*/var dp;function U9(){if(dp)return Ne;dp=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,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,C=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,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function E(v){if(typeof v=="object"&&v!==null){var _=v.$$typeof;switch(_){case t:switch(v=v.type,v){case c:case d:case r:case s:case o:case g:return v;default:switch(v=v&&v.$$typeof,v){case i:case f:case b:case C:case a:return v;default:return _}}case n:return _}}}function I(v){return E(v)===d}return Ne.AsyncMode=c,Ne.ConcurrentMode=d,Ne.ContextConsumer=i,Ne.ContextProvider=a,Ne.Element=t,Ne.ForwardRef=f,Ne.Fragment=r,Ne.Lazy=b,Ne.Memo=C,Ne.Portal=n,Ne.Profiler=s,Ne.StrictMode=o,Ne.Suspense=g,Ne.isAsyncMode=function(v){return I(v)||E(v)===c},Ne.isConcurrentMode=I,Ne.isContextConsumer=function(v){return E(v)===i},Ne.isContextProvider=function(v){return E(v)===a},Ne.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},Ne.isForwardRef=function(v){return E(v)===f},Ne.isFragment=function(v){return E(v)===r},Ne.isLazy=function(v){return E(v)===b},Ne.isMemo=function(v){return E(v)===C},Ne.isPortal=function(v){return E(v)===n},Ne.isProfiler=function(v){return E(v)===s},Ne.isStrictMode=function(v){return E(v)===o},Ne.isSuspense=function(v){return E(v)===g},Ne.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===d||v===s||v===o||v===g||v===y||typeof v=="object"&&v!==null&&(v.$$typeof===b||v.$$typeof===C||v.$$typeof===a||v.$$typeof===i||v.$$typeof===f||v.$$typeof===p||v.$$typeof===m||v.$$typeof===x||v.$$typeof===h)},Ne.typeOf=E,Ne}var Re={};/** @license React v16.13.1
|
|
1505
1505
|
* react-is.development.js
|
|
1506
1506
|
*
|
|
1507
1507
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1508
1508
|
*
|
|
1509
1509
|
* This source code is licensed under the MIT license found in the
|
|
1510
1510
|
* LICENSE file in the root directory of this source tree.
|
|
1511
|
-
*/var fp;function U9(){return fp||(fp=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,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,C=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,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function E(z){return typeof z=="string"||typeof z=="function"||z===r||z===d||z===s||z===o||z===g||z===y||typeof z=="object"&&z!==null&&(z.$$typeof===b||z.$$typeof===C||z.$$typeof===a||z.$$typeof===i||z.$$typeof===f||z.$$typeof===p||z.$$typeof===m||z.$$typeof===x||z.$$typeof===h)}function I(z){if(typeof z=="object"&&z!==null){var Pe=z.$$typeof;switch(Pe){case t:var He=z.type;switch(He){case c:case d:case r:case s:case o:case g:return He;default:var Se=He&&He.$$typeof;switch(Se){case i:case f:case b:case C:case a:return Se;default:return Pe}}case n:return Pe}}}var v=c,_=d,A=i,S=a,L=t,N=f,D=r,F=b,M=C,B=n,V=s,Y=o,W=g,H=!1;function q(z){return H||(H=!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.")),Q(z)||I(z)===c}function Q(z){return I(z)===d}function ee(z){return I(z)===i}function G(z){return I(z)===a}function J(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function R(z){return I(z)===f}function X(z){return I(z)===r}function K(z){return I(z)===b}function ne(z){return I(z)===C}function le(z){return I(z)===n}function j(z){return I(z)===s}function oe(z){return I(z)===o}function Ie(z){return I(z)===g}Re.AsyncMode=v,Re.ConcurrentMode=_,Re.ContextConsumer=A,Re.ContextProvider=S,Re.Element=L,Re.ForwardRef=N,Re.Fragment=D,Re.Lazy=F,Re.Memo=M,Re.Portal=B,Re.Profiler=V,Re.StrictMode=Y,Re.Suspense=W,Re.isAsyncMode=q,Re.isConcurrentMode=Q,Re.isContextConsumer=ee,Re.isContextProvider=G,Re.isElement=J,Re.isForwardRef=R,Re.isFragment=X,Re.isLazy=K,Re.isMemo=ne,Re.isPortal=le,Re.isProfiler=j,Re.isStrictMode=oe,Re.isSuspense=Ie,Re.isValidElementType=E,Re.typeOf=I}()),Re}process.env.NODE_ENV==="production"?ll.exports=$9():ll.exports=U9();var K9=ll.exports,pp=K9,eC={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},tC={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hp={};hp[pp.ForwardRef]=eC,hp[pp.Memo]=tC;var nC=!0;function rC(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var gp=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||nC===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},oC=function(t,n,r){gp(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 sC(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 aC={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},iC=!1,cC=/[A-Z]|^ms/g,lC=/_EMO_([^_]+?)_([^]*?)_EMO_/g,mp=function(t){return t.charCodeAt(1)===45},bp=function(t){return t!=null&&typeof t!="boolean"},ul=H9(function(e){return mp(e)?e:e.replace(cC,"-$&").toLowerCase()}),yp=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(lC,function(r,o,s){return mn={name:o,styles:s,next:mn},o})}return aC[t]!==1&&!mp(t)&&typeof n=="number"&&n!==0?n+"px":n},uC="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ps(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 mn={name:o.name,styles:o.styles,next:mn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)mn={name:a.name,styles:a.styles,next:mn},a=a.next;var i=s.styles+";";return i}return dC(e,t,n)}case"function":{if(e!==void 0){var c=mn,d=n(e);return mn=c,ps(e,t,d)}break}}var f=n;return f}function dC(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ps(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;bp(i)&&(r+=ul(s)+":"+yp(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&iC)throw new Error(uC);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)bp(a[c])&&(r+=ul(s)+":"+yp(s,a[c])+";");else{var d=ps(e,t,a);switch(s){case"animation":case"animationName":{r+=ul(s)+":"+d+";";break}default:r+=s+"{"+d+"}"}}}}return r}var xp=/label:\s*([^\s;{]+)\s*(;|$)/g,mn;function Cp(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="";mn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=ps(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=ps(n,t,e[i]),r){var c=s;o+=c[i]}xp.lastIndex=0;for(var d="",f;(f=xp.exec(o))!==null;)d+="-"+f[1];var g=sC(o)+d;return{name:g,styles:o,next:mn}}var fC=function(t){return t()},pC=T.useInsertionEffect?T.useInsertionEffect:!1,hC=pC||fC,gC=!1,Ep=T.createContext(typeof HTMLElement<"u"?Q9({key:"css"}):null);Ep.Provider;var mC=function(t){return w.forwardRef(function(n,r){var o=w.useContext(Ep);return t(n,o,r)})},bC=T.createContext({}),dl={}.hasOwnProperty,fl="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yC=function(t,n){var r={};for(var o in n)dl.call(n,o)&&(r[o]=n[o]);return r[fl]=t,r},xC=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return gp(n,r,o),hC(function(){return oC(n,r,o)}),null},CC=mC(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[fl],s=[r],a="";typeof e.className=="string"?a=rC(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=Cp(s,void 0,T.useContext(bC));a+=t.key+"-"+i.name;var c={};for(var d in e)dl.call(e,d)&&d!=="css"&&d!==fl&&!gC&&(c[d]=e[d]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement(xC,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),EC=CC,ue=function(t,n){var r=arguments;if(n==null||!dl.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=EC,s[1]=yC(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function pl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Cp(t)}var vC=function(){var t=pl.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 wC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const IC=Math.min,_C=Math.max,Ga=Math.round,Ha=Math.floor,Wa=e=>({x:e,y:e});function SC(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 Za(){return typeof window<"u"}function vp(e){return Ip(e)?(e.nodeName||"").toLowerCase():"#document"}function Ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wp(e){var t;return(t=(Ip(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ip(e){return Za()?e instanceof Node||e instanceof Ln(e).Node:!1}function AC(e){return Za()?e instanceof Element||e instanceof Ln(e).Element:!1}function hl(e){return Za()?e instanceof HTMLElement||e instanceof Ln(e).HTMLElement:!1}function _p(e){return!Za()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ln(e).ShadowRoot}function Sp(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=gl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function TC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function LC(e){return["html","body","#document"].includes(vp(e))}function gl(e){return Ln(e).getComputedStyle(e)}function OC(e){if(vp(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_p(e)&&e.host||wp(e);return _p(t)?t.host:t}function Ap(e){const t=OC(e);return LC(t)?e.ownerDocument?e.ownerDocument.body:e.body:hl(t)&&Sp(t)?t:Ap(t)}function za(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ap(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ln(o);if(s){const i=ml(a);return t.concat(a,a.visualViewport||[],Sp(o)?o:[],i&&n?za(i):[])}return t.concat(o,za(o,[],n))}function ml(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function kC(e){const t=gl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=hl(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=Ga(n)!==s||Ga(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function bl(e){return AC(e)?e:e.contextElement}function Tp(e){const t=bl(e);if(!hl(t))return Wa(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=kC(t);let a=(s?Ga(n.width):n.width)/r,i=(s?Ga(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const FC=Wa(0);function DC(e){const t=Ln(e);return!TC()||!t.visualViewport?FC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function NC(e,t,n){return!1}function Lp(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=bl(e);let a=Wa(1);t&&(a=Tp(e));const i=NC()?DC(s):Wa(0);let c=(o.left+i.x)/a.x,d=(o.top+i.y)/a.y,f=o.width/a.x,g=o.height/a.y;if(s){const y=Ln(s),C=r;let b=y,h=ml(b);for(;h&&r&&C!==b;){const p=Tp(h),m=h.getBoundingClientRect(),x=gl(h),E=m.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,I=m.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;c*=p.x,d*=p.y,f*=p.x,g*=p.y,c+=E,d+=I,b=Ln(h),h=ml(b)}}return SC({width:f,height:g,x:c,y:d})}function RC(e,t){let n=null,r;const o=wp(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:d,top:f,width:g,height:y}=e.getBoundingClientRect();if(i||t(),!g||!y)return;const C=Ha(f),b=Ha(o.clientWidth-(d+g)),h=Ha(o.clientHeight-(f+y)),p=Ha(d),x={rootMargin:-C+"px "+-b+"px "+-h+"px "+-p+"px",threshold:_C(0,IC(1,c))||1};let E=!0;function I(v){const _=v[0].intersectionRatio;if(_!==c){if(!E)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E=!1}try{n=new IntersectionObserver(I,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,x)}n.observe(e)}return a(!0),s}function MC(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,d=bl(e),f=o||s?[...d?za(d):[],...za(t)]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const g=d&&i?RC(d,n):null;let y=-1,C=null;a&&(C=new ResizeObserver(m=>{let[x]=m;x&&x.target===d&&C&&(C.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var E;(E=C)==null||E.observe(t)})),n()}),d&&!c&&C.observe(d),C.observe(t));let b,h=c?Lp(e):null;c&&p();function p(){const m=Lp(e);h&&(m.x!==h.x||m.y!==h.y||m.width!==h.width||m.height!==h.height)&&n(),h=m,b=requestAnimationFrame(p)}return n(),()=>{var m;f.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),g==null||g(),(m=C)==null||m.disconnect(),C=null,c&&cancelAnimationFrame(b)}}var yl=w.useLayoutEffect,jC=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Xa=function(){};function PC(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function BC(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(PC(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var Ya=function(t){return qC(t)?t.filter(Boolean):Ar(t)==="object"&&t!==null?[t]:[]},Op=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=an(t,jC);return ae({},n)},Ye=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 VC(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function Ja(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function GC(e){return Ja(e)?window.innerHeight:e.clientHeight}function kp(e){return Ja(e)?window.pageYOffset:e.scrollTop}function qa(e,t){if(Ja(e)){window.scrollTo(0,t);return}e.scrollTop=t}function HC(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 WC(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Qa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Xa,o=kp(e),s=t-o,a=10,i=0;function c(){i+=a;var d=WC(i,o,s,n);qa(e,d),i<n?window.requestAnimationFrame(c):r(e)}c()}function Fp(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?qa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&qa(e,Math.max(t.offsetTop-o,0))}function ZC(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 Dp(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function zC(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Np=!1,XC={get passive(){return Np=!0}},$a=typeof window<"u"?window:{};$a.addEventListener&&$a.removeEventListener&&($a.addEventListener("p",Xa,XC),$a.removeEventListener("p",Xa,!1));var YC=Np;function JC(e){return e!=null}function qC(e){return Array.isArray(e)}function hs(e,t,n){return e?t:n}function eF(e){return e}function tF(e){return e}var QC=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=st(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=st(i,2),d=c[0],f=c[1];return a[d]=f,a},{})},$C=["children","innerProps"],UC=["children","innerProps"];function KC(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=HC(n),d={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return d;var f=c.getBoundingClientRect(),g=f.height,y=n.getBoundingClientRect(),C=y.bottom,b=y.height,h=y.top,p=n.offsetParent.getBoundingClientRect(),m=p.top,x=a?window.innerHeight:GC(c),E=kp(c),I=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),_=m-v,A=x-h,S=_+E,L=g-E-h,N=C-x+E+I,D=E+h-v,F=160;switch(o){case"auto":case"bottom":if(A>=b)return{placement:"bottom",maxHeight:t};if(L>=b&&!a)return s&&Qa(c,N,F),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&Qa(c,N,F);var M=a?A-I:L-I;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var B=t,V=a?_:S;return V>=r&&(B=Math.min(V-I-i,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return s&&qa(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(_>=b)return{placement:"top",maxHeight:t};if(S>=b&&!a)return s&&Qa(c,D,F),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var Y=t;return(!a&&S>=r||a&&_>=r)&&(Y=a?_-v:S-v),s&&Qa(c,D,F),{placement:"top",maxHeight:Y}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return d}function e8(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Rp=function(t){return t==="auto"?"bottom":t},t8=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return ae((r={label:"menu"},io(r,e8(o),"100%"),io(r,"position","absolute"),io(r,"width","100%"),io(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})},Mp=w.createContext(null),n8=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,d=w.useContext(Mp)||{},f=d.setPortalPlacement,g=w.useRef(null),y=w.useState(o),C=st(y,2),b=C[0],h=C[1],p=w.useState(null),m=st(p,2),x=m[0],E=m[1],I=c.spacing.controlHeight;return yl(function(){var v=g.current;if(v){var _=a==="fixed",A=i&&!_,S=KC({maxHeight:o,menuEl:v,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:I});h(S.maxHeight),E(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,I]),n({ref:g,placerProps:ae(ae({},t),{},{placement:x||Rp(s),maxHeight:b})})},r8=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ue("div",fe({},Ye(t,"menu",{menu:!0}),{ref:r},o),n)},o8=r8,s8=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ae({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},a8=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ue("div",fe({},Ye(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},jp=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ae({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},i8=jp,c8=jp,l8=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=an(t,$C);return ue("div",fe({},Ye(ae(ae({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},u8=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=an(t,UC);return ue("div",fe({},Ye(ae(ae({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},d8=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}},f8=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),d=w.useRef(null),f=w.useState(Rp(a)),g=st(f,2),y=g[0],C=g[1],b=w.useMemo(function(){return{setPortalPlacement:C}},[]),h=w.useState(null),p=st(h,2),m=p[0],x=p[1],E=w.useCallback(function(){if(o){var A=ZC(o),S=i==="fixed"?0:window.pageYOffset,L=A[y]+S;(L!==(m==null?void 0:m.offset)||A.left!==(m==null?void 0:m.rect.left)||A.width!==(m==null?void 0:m.rect.width))&&x({offset:L,rect:A})}},[o,i,y,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);yl(function(){E()},[E]);var I=w.useCallback(function(){typeof d.current=="function"&&(d.current(),d.current=null),o&&c.current&&(d.current=MC(o,c.current,E,{elementResize:"ResizeObserver"in window}))},[o,E]);yl(function(){I()},[I]);var v=w.useCallback(function(A){c.current=A,I()},[I]);if(!n&&i!=="fixed"||!m)return null;var _=ue("div",fe({ref:v},Ye(ae(ae({},t),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ue(Mp.Provider,{value:b},n?$t.createPortal(_,n):_)},p8=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},h8=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ue("div",fe({},Ye(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},g8=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ae({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")})},m8=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ue("div",fe({},Ye(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},b8=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},y8=function(t){var n=t.children,r=t.innerProps;return ue("div",fe({},Ye(t,"indicatorsContainer",{indicators:!0}),r),n)},Pp,x8=["size"],C8=["innerProps","isRtl","size"];function E8(){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 v8=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:E8},Bp=function(t){var n=t.size,r=an(t,x8);return ue("svg",fe({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:v8},r))},xl=function(t){return ue(Bp,fe({size:20},t),ue("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"}))},Vp=function(t){return ue(Bp,fe({size:20},t),ue("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"}))},Gp=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ae({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},w8=Gp,I8=function(t){var n=t.children,r=t.innerProps;return ue("div",fe({},Ye(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ue(Vp,null))},_8=Gp,S8=function(t){var n=t.children,r=t.innerProps;return ue("div",fe({},Ye(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ue(xl,null))},A8=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ae({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},T8=function(t){var n=t.innerProps;return ue("span",fe({},n,Ye(t,"indicatorSeparator",{"indicator-separator":!0})))},L8=vC(Pp||(Pp=wC([`
|
|
1511
|
+
*/var fp;function K9(){return fp||(fp=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,d=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,C=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,m=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function E(z){return typeof z=="string"||typeof z=="function"||z===r||z===d||z===s||z===o||z===g||z===y||typeof z=="object"&&z!==null&&(z.$$typeof===b||z.$$typeof===C||z.$$typeof===a||z.$$typeof===i||z.$$typeof===f||z.$$typeof===p||z.$$typeof===m||z.$$typeof===x||z.$$typeof===h)}function I(z){if(typeof z=="object"&&z!==null){var Pe=z.$$typeof;switch(Pe){case t:var We=z.type;switch(We){case c:case d:case r:case s:case o:case g:return We;default:var Ee=We&&We.$$typeof;switch(Ee){case i:case f:case b:case C:case a:return Ee;default:return Pe}}case n:return Pe}}}var v=c,_=d,A=i,S=a,L=t,N=f,D=r,F=b,M=C,B=n,V=s,Y=o,W=g,H=!1;function q(z){return H||(H=!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.")),Q(z)||I(z)===c}function Q(z){return I(z)===d}function ee(z){return I(z)===i}function G(z){return I(z)===a}function J(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function R(z){return I(z)===f}function X(z){return I(z)===r}function K(z){return I(z)===b}function ne(z){return I(z)===C}function le(z){return I(z)===n}function j(z){return I(z)===s}function oe(z){return I(z)===o}function _e(z){return I(z)===g}Re.AsyncMode=v,Re.ConcurrentMode=_,Re.ContextConsumer=A,Re.ContextProvider=S,Re.Element=L,Re.ForwardRef=N,Re.Fragment=D,Re.Lazy=F,Re.Memo=M,Re.Portal=B,Re.Profiler=V,Re.StrictMode=Y,Re.Suspense=W,Re.isAsyncMode=q,Re.isConcurrentMode=Q,Re.isContextConsumer=ee,Re.isContextProvider=G,Re.isElement=J,Re.isForwardRef=R,Re.isFragment=X,Re.isLazy=K,Re.isMemo=ne,Re.isPortal=le,Re.isProfiler=j,Re.isStrictMode=oe,Re.isSuspense=_e,Re.isValidElementType=E,Re.typeOf=I}()),Re}process.env.NODE_ENV==="production"?ll.exports=U9():ll.exports=K9();var eC=ll.exports,pp=eC,tC={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},nC={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hp={};hp[pp.ForwardRef]=tC,hp[pp.Memo]=nC;var rC=!0;function oC(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var gp=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||rC===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},sC=function(t,n,r){gp(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 aC(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 iC={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},cC=!1,lC=/[A-Z]|^ms/g,uC=/_EMO_([^_]+?)_([^]*?)_EMO_/g,mp=function(t){return t.charCodeAt(1)===45},bp=function(t){return t!=null&&typeof t!="boolean"},ul=W9(function(e){return mp(e)?e:e.replace(lC,"-$&").toLowerCase()}),yp=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(uC,function(r,o,s){return gn={name:o,styles:s,next:gn},o})}return iC[t]!==1&&!mp(t)&&typeof n=="number"&&n!==0?n+"px":n},dC="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function hs(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 gn={name:o.name,styles:o.styles,next:gn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)gn={name:a.name,styles:a.styles,next:gn},a=a.next;var i=s.styles+";";return i}return fC(e,t,n)}case"function":{if(e!==void 0){var c=gn,d=n(e);return gn=c,hs(e,t,d)}break}}var f=n;return f}function fC(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=hs(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;bp(i)&&(r+=ul(s)+":"+yp(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&cC)throw new Error(dC);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)bp(a[c])&&(r+=ul(s)+":"+yp(s,a[c])+";");else{var d=hs(e,t,a);switch(s){case"animation":case"animationName":{r+=ul(s)+":"+d+";";break}default:r+=s+"{"+d+"}"}}}}return r}var xp=/label:\s*([^\s;{]+)\s*(;|$)/g,gn;function Cp(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="";gn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=hs(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=hs(n,t,e[i]),r){var c=s;o+=c[i]}xp.lastIndex=0;for(var d="",f;(f=xp.exec(o))!==null;)d+="-"+f[1];var g=aC(o)+d;return{name:g,styles:o,next:gn}}var pC=function(t){return t()},hC=T.useInsertionEffect?T.useInsertionEffect:!1,gC=hC||pC,mC=!1,Ep=T.createContext(typeof HTMLElement<"u"?$9({key:"css"}):null);Ep.Provider;var bC=function(t){return w.forwardRef(function(n,r){var o=w.useContext(Ep);return t(n,o,r)})},yC=T.createContext({}),dl={}.hasOwnProperty,fl="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",xC=function(t,n){var r={};for(var o in n)dl.call(n,o)&&(r[o]=n[o]);return r[fl]=t,r},CC=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return gp(n,r,o),gC(function(){return sC(n,r,o)}),null},EC=bC(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[fl],s=[r],a="";typeof e.className=="string"?a=oC(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=Cp(s,void 0,T.useContext(yC));a+=t.key+"-"+i.name;var c={};for(var d in e)dl.call(e,d)&&d!=="css"&&d!==fl&&!mC&&(c[d]=e[d]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement(CC,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),vC=EC,de=function(t,n){var r=arguments;if(n==null||!dl.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=vC,s[1]=xC(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function pl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Cp(t)}var wC=function(){var t=pl.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 IC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const _C=Math.min,SC=Math.max,Ha=Math.round,Wa=Math.floor,Za=e=>({x:e,y:e});function AC(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 za(){return typeof window<"u"}function vp(e){return Ip(e)?(e.nodeName||"").toLowerCase():"#document"}function Ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wp(e){var t;return(t=(Ip(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ip(e){return za()?e instanceof Node||e instanceof Ln(e).Node:!1}function TC(e){return za()?e instanceof Element||e instanceof Ln(e).Element:!1}function hl(e){return za()?e instanceof HTMLElement||e instanceof Ln(e).HTMLElement:!1}function _p(e){return!za()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ln(e).ShadowRoot}function Sp(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=gl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function LC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function OC(e){return["html","body","#document"].includes(vp(e))}function gl(e){return Ln(e).getComputedStyle(e)}function kC(e){if(vp(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_p(e)&&e.host||wp(e);return _p(t)?t.host:t}function Ap(e){const t=kC(e);return OC(t)?e.ownerDocument?e.ownerDocument.body:e.body:hl(t)&&Sp(t)?t:Ap(t)}function Xa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ap(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ln(o);if(s){const i=ml(a);return t.concat(a,a.visualViewport||[],Sp(o)?o:[],i&&n?Xa(i):[])}return t.concat(o,Xa(o,[],n))}function ml(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FC(e){const t=gl(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=hl(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=Ha(n)!==s||Ha(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function bl(e){return TC(e)?e:e.contextElement}function Tp(e){const t=bl(e);if(!hl(t))return Za(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=FC(t);let a=(s?Ha(n.width):n.width)/r,i=(s?Ha(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const DC=Za(0);function NC(e){const t=Ln(e);return!LC()||!t.visualViewport?DC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RC(e,t,n){return!1}function Lp(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=bl(e);let a=Za(1);t&&(a=Tp(e));const i=RC()?NC(s):Za(0);let c=(o.left+i.x)/a.x,d=(o.top+i.y)/a.y,f=o.width/a.x,g=o.height/a.y;if(s){const y=Ln(s),C=r;let b=y,h=ml(b);for(;h&&r&&C!==b;){const p=Tp(h),m=h.getBoundingClientRect(),x=gl(h),E=m.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,I=m.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;c*=p.x,d*=p.y,f*=p.x,g*=p.y,c+=E,d+=I,b=Ln(h),h=ml(b)}}return AC({width:f,height:g,x:c,y:d})}function MC(e,t){let n=null,r;const o=wp(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:d,top:f,width:g,height:y}=e.getBoundingClientRect();if(i||t(),!g||!y)return;const C=Wa(f),b=Wa(o.clientWidth-(d+g)),h=Wa(o.clientHeight-(f+y)),p=Wa(d),x={rootMargin:-C+"px "+-b+"px "+-h+"px "+-p+"px",threshold:SC(0,_C(1,c))||1};let E=!0;function I(v){const _=v[0].intersectionRatio;if(_!==c){if(!E)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E=!1}try{n=new IntersectionObserver(I,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,x)}n.observe(e)}return a(!0),s}function jC(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,d=bl(e),f=o||s?[...d?Xa(d):[],...Xa(t)]:[];f.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const g=d&&i?MC(d,n):null;let y=-1,C=null;a&&(C=new ResizeObserver(m=>{let[x]=m;x&&x.target===d&&C&&(C.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var E;(E=C)==null||E.observe(t)})),n()}),d&&!c&&C.observe(d),C.observe(t));let b,h=c?Lp(e):null;c&&p();function p(){const m=Lp(e);h&&(m.x!==h.x||m.y!==h.y||m.width!==h.width||m.height!==h.height)&&n(),h=m,b=requestAnimationFrame(p)}return n(),()=>{var m;f.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),g==null||g(),(m=C)==null||m.disconnect(),C=null,c&&cancelAnimationFrame(b)}}var yl=w.useLayoutEffect,PC=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ya=function(){};function BC(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function VC(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(BC(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var Ja=function(t){return QC(t)?t.filter(Boolean):Ir(t)==="object"&&t!==null?[t]:[]},Op=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=an(t,PC);return ie({},n)},qe=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 GC(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function qa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function HC(e){return qa(e)?window.innerHeight:e.clientHeight}function kp(e){return qa(e)?window.pageYOffset:e.scrollTop}function Qa(e,t){if(qa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function WC(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 ZC(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function $a(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ya,o=kp(e),s=t-o,a=10,i=0;function c(){i+=a;var d=ZC(i,o,s,n);Qa(e,d),i<n?window.requestAnimationFrame(c):r(e)}c()}function Fp(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Qa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Qa(e,Math.max(t.offsetTop-o,0))}function zC(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 Dp(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function XC(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Np=!1,YC={get passive(){return Np=!0}},Ua=typeof window<"u"?window:{};Ua.addEventListener&&Ua.removeEventListener&&(Ua.addEventListener("p",Ya,YC),Ua.removeEventListener("p",Ya,!1));var JC=Np;function qC(e){return e!=null}function QC(e){return Array.isArray(e)}function gs(e,t,n){return e?t:n}function eF(e){return e}function tF(e){return e}var $C=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=st(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=st(i,2),d=c[0],f=c[1];return a[d]=f,a},{})},UC=["children","innerProps"],KC=["children","innerProps"];function e8(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=WC(n),d={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return d;var f=c.getBoundingClientRect(),g=f.height,y=n.getBoundingClientRect(),C=y.bottom,b=y.height,h=y.top,p=n.offsetParent.getBoundingClientRect(),m=p.top,x=a?window.innerHeight:HC(c),E=kp(c),I=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),_=m-v,A=x-h,S=_+E,L=g-E-h,N=C-x+E+I,D=E+h-v,F=160;switch(o){case"auto":case"bottom":if(A>=b)return{placement:"bottom",maxHeight:t};if(L>=b&&!a)return s&&$a(c,N,F),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&$a(c,N,F);var M=a?A-I:L-I;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var B=t,V=a?_:S;return V>=r&&(B=Math.min(V-I-i,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return s&&Qa(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(_>=b)return{placement:"top",maxHeight:t};if(S>=b&&!a)return s&&$a(c,D,F),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var Y=t;return(!a&&S>=r||a&&_>=r)&&(Y=a?_-v:S-v),s&&$a(c,D,F),{placement:"top",maxHeight:Y}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return d}function t8(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Rp=function(t){return t==="auto"?"bottom":t},n8=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return ie((r={label:"menu"},io(r,t8(o),"100%"),io(r,"position","absolute"),io(r,"width","100%"),io(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})},Mp=w.createContext(null),r8=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,d=w.useContext(Mp)||{},f=d.setPortalPlacement,g=w.useRef(null),y=w.useState(o),C=st(y,2),b=C[0],h=C[1],p=w.useState(null),m=st(p,2),x=m[0],E=m[1],I=c.spacing.controlHeight;return yl(function(){var v=g.current;if(v){var _=a==="fixed",A=i&&!_,S=e8({maxHeight:o,menuEl:v,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:I});h(S.maxHeight),E(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,I]),n({ref:g,placerProps:ie(ie({},t),{},{placement:x||Rp(s),maxHeight:b})})},o8=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return de("div",fe({},qe(t,"menu",{menu:!0}),{ref:r},o),n)},s8=o8,a8=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return ie({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},i8=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return de("div",fe({},qe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},jp=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return ie({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},c8=jp,l8=jp,u8=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=an(t,UC);return de("div",fe({},qe(ie(ie({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},d8=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=an(t,KC);return de("div",fe({},qe(ie(ie({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},f8=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}},p8=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),d=w.useRef(null),f=w.useState(Rp(a)),g=st(f,2),y=g[0],C=g[1],b=w.useMemo(function(){return{setPortalPlacement:C}},[]),h=w.useState(null),p=st(h,2),m=p[0],x=p[1],E=w.useCallback(function(){if(o){var A=zC(o),S=i==="fixed"?0:window.pageYOffset,L=A[y]+S;(L!==(m==null?void 0:m.offset)||A.left!==(m==null?void 0:m.rect.left)||A.width!==(m==null?void 0:m.rect.width))&&x({offset:L,rect:A})}},[o,i,y,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);yl(function(){E()},[E]);var I=w.useCallback(function(){typeof d.current=="function"&&(d.current(),d.current=null),o&&c.current&&(d.current=jC(o,c.current,E,{elementResize:"ResizeObserver"in window}))},[o,E]);yl(function(){I()},[I]);var v=w.useCallback(function(A){c.current=A,I()},[I]);if(!n&&i!=="fixed"||!m)return null;var _=de("div",fe({ref:v},qe(ie(ie({},t),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return de(Mp.Provider,{value:b},n?$t.createPortal(_,n):_)},h8=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},g8=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return de("div",fe({},qe(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},m8=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return ie({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")})},b8=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return de("div",fe({},qe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},y8=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},x8=function(t){var n=t.children,r=t.innerProps;return de("div",fe({},qe(t,"indicatorsContainer",{indicators:!0}),r),n)},Pp,C8=["size"],E8=["innerProps","isRtl","size"];function v8(){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 w8=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:v8},Bp=function(t){var n=t.size,r=an(t,C8);return de("svg",fe({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:w8},r))},xl=function(t){return de(Bp,fe({size:20},t),de("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"}))},Vp=function(t){return de(Bp,fe({size:20},t),de("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"}))},Gp=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ie({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},I8=Gp,_8=function(t){var n=t.children,r=t.innerProps;return de("div",fe({},qe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||de(Vp,null))},S8=Gp,A8=function(t){var n=t.children,r=t.innerProps;return de("div",fe({},qe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||de(xl,null))},T8=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return ie({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},L8=function(t){var n=t.innerProps;return de("span",fe({},n,qe(t,"indicatorSeparator",{"indicator-separator":!0})))},O8=wC(Pp||(Pp=IC([`
|
|
1512
1512
|
0%, 80%, 100% { opacity: 0; }
|
|
1513
1513
|
40% { opacity: 1; }
|
|
1514
|
-
`]))),O8=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return ae({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})},Cl=function(t){var n=t.delay,r=t.offset;return ue("span",{css:pl({animation:"".concat(L8," 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 */")})},k8=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=an(t,C8);return ue("div",fe({},Ye(ae(ae({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ue(Cl,{delay:0,offset:r}),ue(Cl,{delay:160,offset:!0}),ue(Cl,{delay:320,offset:!r}))},F8=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return ae({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}})},D8=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ue("div",fe({ref:s},Ye(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},N8=D8,R8=["data"],M8=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},j8=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,d=t.label,f=t.theme,g=t.selectProps;return ue("div",fe({},Ye(t,"group",{group:!0}),c),ue(a,fe({},i,{selectProps:g,theme:f,getStyles:o,getClassNames:s,cx:r}),d),ue("div",null,n))},P8=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ae({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"})},B8=function(t){var n=Op(t);n.data;var r=an(n,R8);return ue("div",fe({},Ye(t,"groupHeading",{"group-heading":!0}),r))},V8=j8,G8=["innerRef","isDisabled","isHidden","inputClassName"],H8=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return ae(ae({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},W8),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},Hp={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},W8={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ae({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Hp)},Z8=function(t){return ae({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Hp)},z8=function(t){var n=t.cx,r=t.value,o=Op(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,d=an(o,G8);return ue("div",fe({},Ye(t,"input",{"input-container":!0}),{"data-value":r||""}),ue("input",fe({className:n({input:!0},c),ref:s,style:Z8(i),disabled:a},d)))},X8=z8,Y8=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return ae({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},J8=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return ae({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})},q8=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return ae({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}})},Wp=function(t){var n=t.children,r=t.innerProps;return ue("div",r,n)},Q8=Wp,$8=Wp;function U8(e){var t=e.children,n=e.innerProps;return ue("div",fe({role:"button"},n),t||ue(xl,{size:14}))}var K8=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,d=r.Container,f=r.Label,g=r.Remove;return ue(d,{data:o,innerProps:ae(ae({},Ye(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ue(f,{data:o,innerProps:ae({},Ye(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ue(g,{data:o,innerProps:ae(ae({},Ye(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},e7=K8,t7=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return ae({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}})},n7=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ue("div",fe({},Ye(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},r7=n7,o7=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ae({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},s7=function(t){var n=t.children,r=t.innerProps;return ue("div",fe({},Ye(t,"placeholder",{placeholder:!0}),r),n)},a7=s7,i7=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return ae({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})},c7=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ue("div",fe({},Ye(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},l7=c7,bn={ClearIndicator:S8,Control:N8,DropdownIndicator:I8,DownChevron:Vp,CrossIcon:xl,Group:V8,GroupHeading:B8,IndicatorsContainer:y8,IndicatorSeparator:T8,Input:X8,LoadingIndicator:k8,Menu:o8,MenuList:a8,MenuPortal:f8,LoadingMessage:u8,NoOptionsMessage:l8,MultiValue:e7,MultiValueContainer:Q8,MultiValueLabel:$8,MultiValueRemove:U8,Option:r7,Placeholder:a7,SelectContainer:h8,SingleValue:l7,ValueContainer:m8},u7=function(t){return ae(ae({},bn),t.components)},Zp=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function d7(e,t){return!!(e===t||Zp(e)&&Zp(t))}function f7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!d7(e[n],t[n]))return!1;return!0}function p7(e,t){t===void 0&&(t=f7);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 h7(){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 g7=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:h7},m7=function(t){return ue("span",fe({css:g7},t))},zp=m7,b7={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,d=t.isSelected,f=t.isAppleDevice,g=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(g(i,r),".");if(n==="menu"&&f){var y=c?" disabled":"",C="".concat(d?" selected":"").concat(y);return"".concat(a).concat(C,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},y7=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,d=t.id,f=t.isAppleDevice,g=c.ariaLiveMessages,y=c.getOptionLabel,C=c.inputValue,b=c.isMulti,h=c.isOptionDisabled,p=c.isSearchable,m=c.menuIsOpen,x=c.options,E=c.screenReaderStatus,I=c.tabSelectsValue,v=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=w.useMemo(function(){return ae(ae({},b7),g||{})},[g]),L=w.useMemo(function(){var V="";if(n&&S.onChange){var Y=n.option,W=n.options,H=n.removedValue,q=n.removedValues,Q=n.value,ee=function(le){return Array.isArray(le)?null:le},G=H||Y||ee(Q),J=G?y(G):"",R=W||q||void 0,X=R?R.map(y):[],K=ae({isDisabled:G&&h(G,i),label:J,labels:X},n);V=S.onChange(K)}return V},[n,S,h,i,y]),N=w.useMemo(function(){var V="",Y=r||o,W=!!(r&&i&&i.includes(r));if(Y&&S.onFocus){var H={focused:Y,label:y(Y),isDisabled:h(Y,i),isSelected:W,options:s,context:Y===r?"menu":"value",selectValue:i,isAppleDevice:f};V=S.onFocus(H)}return V},[r,o,y,h,S,s,i,f]),D=w.useMemo(function(){var V="";if(m&&x.length&&!v&&S.onFilter){var Y=E({count:s.length});V=S.onFilter({inputValue:C,resultsMessage:Y})}return V},[s,C,m,S,x,E,v]),F=(n==null?void 0:n.action)==="initial-input-focus",M=w.useMemo(function(){var V="";if(S.guidance){var Y=o?"value":m?"menu":"input";V=S.guidance({"aria-label":_,context:Y,isDisabled:r&&h(r,i),isMulti:b,isSearchable:p,tabSelectsValue:I,isInitialFocus:F})}return V},[_,r,o,b,h,p,m,S,i,I,F]),B=ue(w.Fragment,null,ue("span",{id:"aria-selection"},L),ue("span",{id:"aria-focused"},N),ue("span",{id:"aria-results"},D),ue("span",{id:"aria-guidance"},M));return ue(w.Fragment,null,ue(zp,{id:d},F&&B),ue(zp,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!F&&B))},x7=y7,El=[{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źẑżžẓẕƶȥɀⱬꝣ"}],C7=new RegExp("["+El.map(function(e){return e.letters}).join("")+"]","g"),Xp={},vl=0;vl<El.length;vl++)for(var wl=El[vl],Il=0;Il<wl.letters.length;Il++)Xp[wl.letters[Il]]=wl.base;var Yp=function(t){return t.replace(C7,function(n){return Xp[n]})},E7=p7(Yp),Jp=function(t){return t.replace(/^\s+|\s+$/g,"")},v7=function(t){return"".concat(t.label," ").concat(t.value)},w7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ae({ignoreCase:!0,ignoreAccents:!0,stringify:v7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,d=o.matchFrom,f=c?Jp(r):r,g=c?Jp(i(n)):i(n);return s&&(f=f.toLowerCase(),g=g.toLowerCase()),a&&(f=E7(f),g=Yp(g)),d==="start"?g.substr(0,f.length)===f:g.indexOf(f)>-1}},I7=["innerRef"];function _7(e){var t=e.innerRef,n=an(e,I7),r=QC(n,"onExited","in","enter","exit","appear");return ue("input",fe({ref:t},r,{css:pl({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 S7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function A7(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),d=w.useRef(null),f=w.useCallback(function(p,m){if(d.current!==null){var x=d.current,E=x.scrollTop,I=x.scrollHeight,v=x.clientHeight,_=d.current,A=m>0,S=I-v-E,L=!1;S>m&&a.current&&(r&&r(p),a.current=!1),A&&i.current&&(s&&s(p),i.current=!1),A&&m>S?(n&&!a.current&&n(p),_.scrollTop=I,L=!0,a.current=!0):!A&&-m>E&&(o&&!i.current&&o(p),_.scrollTop=0,L=!0,i.current=!0),L&&S7(p)}},[n,r,o,s]),g=w.useCallback(function(p){f(p,p.deltaY)},[f]),y=w.useCallback(function(p){c.current=p.changedTouches[0].clientY},[]),C=w.useCallback(function(p){var m=c.current-p.changedTouches[0].clientY;f(p,m)},[f]),b=w.useCallback(function(p){if(p){var m=YC?{passive:!1}:!1;p.addEventListener("wheel",g,m),p.addEventListener("touchstart",y,m),p.addEventListener("touchmove",C,m)}},[C,y,g]),h=w.useCallback(function(p){p&&(p.removeEventListener("wheel",g,!1),p.removeEventListener("touchstart",y,!1),p.removeEventListener("touchmove",C,!1))},[C,y,g]);return w.useEffect(function(){if(t){var p=d.current;return b(p),function(){h(p)}}},[t,b,h]),function(p){d.current=p}}var qp=["boxSizing","height","overflow","paddingRight","position"],Qp={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function $p(e){e.preventDefault()}function Up(e){e.stopPropagation()}function Kp(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function e1(){return"ontouchstart"in window||navigator.maxTouchPoints}var t1=!!(typeof window<"u"&&window.document&&window.document.createElement),gs=0,po={capture:!1,passive:!1};function T7(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(t1){var d=document.body,f=d&&d.style;if(r&&qp.forEach(function(b){var h=f&&f[b];o.current[b]=h}),r&&gs<1){var g=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,C=window.innerWidth-y+g||0;Object.keys(Qp).forEach(function(b){var h=Qp[b];f&&(f[b]=h)}),f&&(f.paddingRight="".concat(C,"px"))}d&&e1()&&(d.addEventListener("touchmove",$p,po),c&&(c.addEventListener("touchstart",Kp,po),c.addEventListener("touchmove",Up,po))),gs+=1}},[r]),i=w.useCallback(function(c){if(t1){var d=document.body,f=d&&d.style;gs=Math.max(gs-1,0),r&&gs<1&&qp.forEach(function(g){var y=o.current[g];f&&(f[g]=y)}),d&&e1()&&(d.removeEventListener("touchmove",$p,po),c&&(c.removeEventListener("touchstart",Kp,po),c.removeEventListener("touchmove",Up,po)))}},[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 L7(){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 O7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},k7=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:L7};function F7(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,d=A7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=T7({isEnabled:n}),g=function(C){d(C),f(C)};return ue(w.Fragment,null,n&&ue("div",{onClick:O7,css:k7}),t(g))}function D7(){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 N7=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:D7},R7=function(t){var n=t.name,r=t.onFocus;return ue("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:N7,value:"",onChange:function(){}})},M7=R7;function _l(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 j7(){return _l(/^iPhone/i)}function n1(){return _l(/^Mac/i)}function P7(){return _l(/^iPad/i)||n1()&&navigator.maxTouchPoints>1}function B7(){return j7()||P7()}function V7(){return n1()||B7()}var G7=function(t){return t.label},r1=function(t){return t.label},o1=function(t){return t.value},H7=function(t){return!!t.isDisabled},W7={clearIndicator:_8,container:p8,control:F8,dropdownIndicator:w8,group:M8,groupHeading:P8,indicatorsContainer:b8,indicatorSeparator:A8,input:H8,loadingIndicator:O8,loadingMessage:c8,menu:t8,menuList:s8,menuPortal:d8,multiValue:Y8,multiValueLabel:J8,multiValueRemove:q8,noOptionsMessage:i8,option:t7,placeholder:o7,singleValue:i7,valueContainer:g8},Z7={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%)"},z7=4,s1=4,X7=38,Y7=s1*2,J7={baseUnit:s1,controlHeight:X7,menuGutter:Y7},Sl={borderRadius:z7,colors:Z7,spacing:J7},q7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Dp(),captureMenuScroll:!Dp(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:w7(),formatGroupLabel:G7,getOptionLabel:r1,getOptionValue:o1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:H7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!zC(),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 a1(e,t,n,r){var o=d1(e,t,n),s=f1(e,t,n),a=u1(e,t),i=Ka(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function Ua(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return a1(e,a,t,i)}).filter(function(a){return l1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=a1(e,n,t,r);return l1(e,s)?s:void 0}).filter(JC)}function i1(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,co(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function c1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,co(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 Q7(e,t){return i1(Ua(e,t))}function l1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!h1(e)||!s)&&p1(e,{label:a,value:i,data:o},r)}function $7(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 U7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Al=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},u1=function(t,n){return t.getOptionLabel(n)},Ka=function(t,n){return t.getOptionValue(n)};function d1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function f1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Ka(e,t);return n.some(function(o){return Ka(e,o)===r})}function p1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var h1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},K7=1,ei=function(e){p9(n,e);var t=m9(n);function n(r){var o;if(d9(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=V7(),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,d){var f=o.props,g=f.onChange,y=f.name;d.name=y,o.ariaOnChange(c,d),g(c,d)},o.setValue=function(c,d,f){var g=o.props,y=g.closeMenuOnSelect,C=g.isMulti,b=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),y&&(o.setState({inputIsHiddenAfterUpdate:!C}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:d,option:f})},o.selectOption=function(c){var d=o.props,f=d.blurInputOnSelect,g=d.isMulti,y=d.name,C=o.state.selectValue,b=g&&o.isOptionSelected(c,C),h=o.isOptionDisabled(c,C);if(b){var p=o.getOptionValue(c);o.setValue(C.filter(function(m){return o.getOptionValue(m)!==p}),"deselect-option",c)}else if(!h)g?o.setValue([].concat(co(C),[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 d=o.props.isMulti,f=o.state.selectValue,g=o.getOptionValue(c),y=f.filter(function(b){return o.getOptionValue(b)!==g}),C=hs(d,y,y[0]||null);o.onChange(C,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(hs(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,d=o.state.selectValue,f=d[d.length-1],g=d.slice(0,d.length-1),y=hs(c,g,g[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return Al(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return c1(Ua(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];return BC.apply(void 0,[o.props.classNamePrefix].concat(d))},o.getOptionLabel=function(c){return u1(o.props,c)},o.getOptionValue=function(c){return Ka(o.props,c)},o.getStyles=function(c,d){var f=o.props.unstyled,g=W7[c](d,f);g.boxSizing="border-box";var y=o.props.styles[c];return y?y(g,d):g},o.getClassNames=function(c,d){var f,g;return(f=(g=o.props.classNames)[c])===null||f===void 0?void 0:f.call(g,d)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return u7(o.props)},o.buildCategorizedOptions=function(){return Ua(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return i1(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,d){o.setState({ariaSelection:ae({value:c},d)})},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 d=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():d&&o.openMenu("first"):(d&&(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 d=o.props,f=d.isMulti,g=d.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&Ja(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 d=c.touches,f=d&&d.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var d=c.touches,f=d&&d.item(0);if(f){var g=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),C=5;o.userIsDragging=g>C||y>C}},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 d=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:d}),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 d=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:d}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var d=o.getFocusableOptions(),f=d.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return h1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var d=o.props,f=d.isMulti,g=d.backspaceRemovesValue,y=d.escapeClearsValue,C=d.inputValue,b=d.isClearable,h=d.isDisabled,p=d.menuIsOpen,m=d.onKeyDown,x=d.tabSelectsValue,E=d.openMenuOnFocus,I=o.state,v=I.focusedOption,_=I.focusedValue,A=I.selectValue;if(!h&&!(typeof m=="function"&&(m(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||C)return;o.focusValue("previous");break;case"ArrowRight":if(!f||C)return;o.focusValue("next");break;case"Delete":case"Backspace":if(C)return;if(_)o.removeValue(_);else{if(!g)return;f?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!p||!x||!v||E&&o.isOptionSelected(v,A))return;o.selectOption(v);break;case"Enter":if(c.keyCode===229)break;if(p){if(!v||o.isComposing)return;o.selectOption(v);break}return;case"Escape":p?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:C}),o.onMenuClose()):b&&y&&o.clearValue();break;case" ":if(C)return;if(!p){o.openMenu("first");break}if(!v)return;o.selectOption(v);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||++K7),o.state.selectValue=Ya(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=Al(s,a[i])}return o}return f9(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&&Fp(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&&(Fp(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,d=this.buildFocusableOptions(),f=o==="first"?0:d.length-1;if(!this.props.isMulti){var g=d.indexOf(i[0]);g>-1&&(f=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:d[f],focusedOptionId:this.getFocusedOptionId(d[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 d=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=d:f=c-1;break;case"next":c>-1&&c<d&&(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,d=i.indexOf(a);a||(d=-1),o==="up"?c=d>0?d-1:i.length-1:o==="down"?c=(d+1)%i.length:o==="pageup"?(c=d-s,c<0&&(c=0)):o==="pagedown"?(c=d+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(Sl):ae(ae({},Sl),this.props.theme):Sl}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,d=this.selectOption,f=this.setValue,g=this.props,y=g.isMulti,C=g.isRtl,b=g.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:h,isMulti:y,isRtl:C,options:b,selectOption:d,selectProps:g,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return d1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return f1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return p1(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,d=o.tabIndex,f=o.form,g=o.menuIsOpen,y=o.required,C=this.getComponents(),b=C.Input,h=this.state,p=h.inputIsHidden,m=h.ariaSelection,x=this.commonProps,E=i||this.getElementId("input"),I=ae(ae(ae({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":y,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(b,fe({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:E,innerRef:this.getInputRef,isDisabled:s,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:d,form:f,type:"text",value:c},I)):T.createElement(_7,fe({id:E,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Xa,onFocus:this.onInputFocus,disabled:s,tabIndex:d,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,d=s.MultiValueRemove,f=s.SingleValue,g=s.Placeholder,y=this.commonProps,C=this.props,b=C.controlShouldRenderValue,h=C.isDisabled,p=C.isMulti,m=C.inputValue,x=C.placeholder,E=this.state,I=E.selectValue,v=E.focusedValue,_=E.isFocused;if(!this.hasValue()||!b)return m?null:T.createElement(g,fe({},y,{key:"placeholder",isDisabled:h,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),x);if(p)return I.map(function(S,L){var N=S===v,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,fe({},y,{components:{Container:i,Label:c,Remove:d},isFocused:N,isDisabled:h,key:D,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(m)return null;var A=I[0];return T.createElement(f,fe({},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,d=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||d)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,fe({},a,{innerProps:g,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,d=i.isLoading,f=this.state.isFocused;if(!s||!d)return null;var g={"aria-hidden":"true"};return T.createElement(s,fe({},a,{innerProps:g,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,d=this.state.isFocused;return T.createElement(a,fe({},i,{isDisabled:c,isFocused:d}))}},{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,d={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,fe({},a,{innerProps:d,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,d=s.MenuList,f=s.MenuPortal,g=s.LoadingMessage,y=s.NoOptionsMessage,C=s.Option,b=this.commonProps,h=this.state.focusedOption,p=this.props,m=p.captureMenuScroll,x=p.inputValue,E=p.isLoading,I=p.loadingMessage,v=p.minMenuHeight,_=p.maxMenuHeight,A=p.menuIsOpen,S=p.menuPlacement,L=p.menuPosition,N=p.menuPortalTarget,D=p.menuShouldBlockScroll,F=p.menuShouldScrollIntoView,M=p.noOptionsMessage,B=p.onMenuScrollToTop,V=p.onMenuScrollToBottom;if(!A)return null;var Y=function(J,R){var X=J.type,K=J.data,ne=J.isDisabled,le=J.isSelected,j=J.label,oe=J.value,Ie=h===K,z=ne?void 0:function(){return o.onOptionHover(K)},Pe=ne?void 0:function(){return o.selectOption(K)},He="".concat(o.getElementId("option"),"-").concat(R),Se={id:He,onClick:Pe,onMouseMove:z,onMouseOver:z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:le};return T.createElement(C,fe({},b,{innerProps:Se,data:K,isDisabled:ne,isSelected:le,key:He,label:j,type:X,value:oe,isFocused:Ie,innerRef:Ie?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(J.data,"menu"))},W;if(this.hasOptions())W=this.getCategorizedOptions().map(function(G){if(G.type==="group"){var J=G.data,R=G.options,X=G.index,K="".concat(o.getElementId("group"),"-").concat(X),ne="".concat(K,"-heading");return T.createElement(a,fe({},b,{key:K,data:J,options:R,Heading:i,headingProps:{id:ne,data:G.data},label:o.formatGroupLabel(G.data)}),G.options.map(function(le){return Y(le,"".concat(X,"-").concat(le.index))}))}else if(G.type==="option")return Y(G,"".concat(G.index))});else if(E){var H=I({inputValue:x});if(H===null)return null;W=T.createElement(g,b,H)}else{var q=M({inputValue:x});if(q===null)return null;W=T.createElement(y,b,q)}var Q={minMenuHeight:v,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:F},ee=T.createElement(n8,fe({},b,Q),function(G){var J=G.ref,R=G.placerProps,X=R.placement,K=R.maxHeight;return T.createElement(c,fe({},b,Q,{innerRef:J,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:E,placement:X}),T.createElement(F7,{captureEnabled:m,onTopArrive:B,onBottomArrive:V,lockEnabled:D},function(ne){return T.createElement(d,fe({},b,{innerRef:function(j){o.getMenuListRef(j),ne(j)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:E,maxHeight:K,focusedOption:h}),W)}))});return N||L==="fixed"?T.createElement(f,fe({},b,{appendTo:N,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),ee):ee}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,d=s.name,f=s.required,g=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(M7,{name:d,onFocus:this.onValueInputFocus});if(!(!d||i))if(c)if(a){var y=g.map(function(h){return o.getOptionValue(h)}).join(a);return T.createElement("input",{name:d,type:"hidden",value:y})}else{var C=g.length>0?g.map(function(h,p){return T.createElement("input",{key:"i-".concat(p),name:d,type:"hidden",value:o.getOptionValue(h)})}):T.createElement("input",{name:d,type:"hidden",value:""});return T.createElement("div",null,C)}else{var b=g[0]?this.getOptionValue(g[0]):"";return T.createElement("input",{name:d,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,d=s.isFocused,f=s.selectValue,g=this.getFocusableOptions();return T.createElement(x7,fe({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:d,selectValue:f,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,d=this.props,f=d.className,g=d.id,y=d.isDisabled,C=d.menuIsOpen,b=this.state.isFocused,h=this.commonProps=this.getCommonProps();return T.createElement(i,fe({},h,{className:f,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:b}),this.renderLiveRegion(),T.createElement(s,fe({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:b,menuIsOpen:C}),T.createElement(c,fe({},h,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,fe({},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,d=s.ariaSelection,f=s.isFocused,g=s.prevWasFocused,y=s.instancePrefix,C=o.options,b=o.value,h=o.menuIsOpen,p=o.inputValue,m=o.isMulti,x=Ya(b),E={};if(a&&(b!==a.value||C!==a.options||h!==a.menuIsOpen||p!==a.inputValue)){var I=h?Q7(o,x):[],v=h?c1(Ua(o,x),"".concat(y,"-option")):[],_=i?$7(s,x):null,A=U7(s,I),S=Al(v,A);E={selectValue:x,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:v,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},N=d,D=f&&g;return f&&!D&&(N={value:hs(m,x,x[0]||null),options:x,action:"initial-input-focus"},D=!g),(d==null?void 0:d.action)==="initial-input-focus"&&(N=null),ae(ae(ae({},E),L),{},{prevProps:o,ariaSelection:N,prevWasFocused:D})}}]),n}(w.Component);ei.defaultProps=q7;var eE=w.forwardRef(function(e,t){var n=nl(e);return T.createElement(ei,fe({ref:t},n))}),tE=eE;const nE=l.styled(l.Box)`
|
|
1514
|
+
`]))),k8=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return ie({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})},Cl=function(t){var n=t.delay,r=t.offset;return de("span",{css:pl({animation:"".concat(O8," 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 */")})},F8=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=an(t,E8);return de("div",fe({},qe(ie(ie({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),de(Cl,{delay:0,offset:r}),de(Cl,{delay:160,offset:!0}),de(Cl,{delay:320,offset:!r}))},D8=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return ie({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}})},N8=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return de("div",fe({ref:s},qe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},R8=N8,M8=["data"],j8=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},P8=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,d=t.label,f=t.theme,g=t.selectProps;return de("div",fe({},qe(t,"group",{group:!0}),c),de(a,fe({},i,{selectProps:g,theme:f,getStyles:o,getClassNames:s,cx:r}),d),de("div",null,n))},B8=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return ie({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"})},V8=function(t){var n=Op(t);n.data;var r=an(n,M8);return de("div",fe({},qe(t,"groupHeading",{"group-heading":!0}),r))},G8=P8,H8=["innerRef","isDisabled","isHidden","inputClassName"],W8=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return ie(ie({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},Z8),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},Hp={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},Z8={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ie({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Hp)},z8=function(t){return ie({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Hp)},X8=function(t){var n=t.cx,r=t.value,o=Op(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,d=an(o,H8);return de("div",fe({},qe(t,"input",{"input-container":!0}),{"data-value":r||""}),de("input",fe({className:n({input:!0},c),ref:s,style:z8(i),disabled:a},d)))},Y8=X8,J8=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return ie({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},q8=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return ie({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})},Q8=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return ie({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}})},Wp=function(t){var n=t.children,r=t.innerProps;return de("div",r,n)},$8=Wp,U8=Wp;function K8(e){var t=e.children,n=e.innerProps;return de("div",fe({role:"button"},n),t||de(xl,{size:14}))}var e7=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,d=r.Container,f=r.Label,g=r.Remove;return de(d,{data:o,innerProps:ie(ie({},qe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},de(f,{data:o,innerProps:ie({},qe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),de(g,{data:o,innerProps:ie(ie({},qe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},t7=e7,n7=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return ie({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}})},r7=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return de("div",fe({},qe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},o7=r7,s7=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return ie({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},a7=function(t){var n=t.children,r=t.innerProps;return de("div",fe({},qe(t,"placeholder",{placeholder:!0}),r),n)},i7=a7,c7=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return ie({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})},l7=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return de("div",fe({},qe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},u7=l7,mn={ClearIndicator:A8,Control:R8,DropdownIndicator:_8,DownChevron:Vp,CrossIcon:xl,Group:G8,GroupHeading:V8,IndicatorsContainer:x8,IndicatorSeparator:L8,Input:Y8,LoadingIndicator:F8,Menu:s8,MenuList:i8,MenuPortal:p8,LoadingMessage:d8,NoOptionsMessage:u8,MultiValue:t7,MultiValueContainer:$8,MultiValueLabel:U8,MultiValueRemove:K8,Option:o7,Placeholder:i7,SelectContainer:g8,SingleValue:u7,ValueContainer:b8},d7=function(t){return ie(ie({},mn),t.components)},Zp=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function f7(e,t){return!!(e===t||Zp(e)&&Zp(t))}function p7(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!f7(e[n],t[n]))return!1;return!0}function h7(e,t){t===void 0&&(t=p7);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 g7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var m7=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:g7},b7=function(t){return de("span",fe({css:m7},t))},zp=b7,y7={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,d=t.isSelected,f=t.isAppleDevice,g=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(g(i,r),".");if(n==="menu"&&f){var y=c?" disabled":"",C="".concat(d?" selected":"").concat(y);return"".concat(a).concat(C,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},x7=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,d=t.id,f=t.isAppleDevice,g=c.ariaLiveMessages,y=c.getOptionLabel,C=c.inputValue,b=c.isMulti,h=c.isOptionDisabled,p=c.isSearchable,m=c.menuIsOpen,x=c.options,E=c.screenReaderStatus,I=c.tabSelectsValue,v=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=w.useMemo(function(){return ie(ie({},y7),g||{})},[g]),L=w.useMemo(function(){var V="";if(n&&S.onChange){var Y=n.option,W=n.options,H=n.removedValue,q=n.removedValues,Q=n.value,ee=function(le){return Array.isArray(le)?null:le},G=H||Y||ee(Q),J=G?y(G):"",R=W||q||void 0,X=R?R.map(y):[],K=ie({isDisabled:G&&h(G,i),label:J,labels:X},n);V=S.onChange(K)}return V},[n,S,h,i,y]),N=w.useMemo(function(){var V="",Y=r||o,W=!!(r&&i&&i.includes(r));if(Y&&S.onFocus){var H={focused:Y,label:y(Y),isDisabled:h(Y,i),isSelected:W,options:s,context:Y===r?"menu":"value",selectValue:i,isAppleDevice:f};V=S.onFocus(H)}return V},[r,o,y,h,S,s,i,f]),D=w.useMemo(function(){var V="";if(m&&x.length&&!v&&S.onFilter){var Y=E({count:s.length});V=S.onFilter({inputValue:C,resultsMessage:Y})}return V},[s,C,m,S,x,E,v]),F=(n==null?void 0:n.action)==="initial-input-focus",M=w.useMemo(function(){var V="";if(S.guidance){var Y=o?"value":m?"menu":"input";V=S.guidance({"aria-label":_,context:Y,isDisabled:r&&h(r,i),isMulti:b,isSearchable:p,tabSelectsValue:I,isInitialFocus:F})}return V},[_,r,o,b,h,p,m,S,i,I,F]),B=de(w.Fragment,null,de("span",{id:"aria-selection"},L),de("span",{id:"aria-focused"},N),de("span",{id:"aria-results"},D),de("span",{id:"aria-guidance"},M));return de(w.Fragment,null,de(zp,{id:d},F&&B),de(zp,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!F&&B))},C7=x7,El=[{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źẑżžẓẕƶȥɀⱬꝣ"}],E7=new RegExp("["+El.map(function(e){return e.letters}).join("")+"]","g"),Xp={},vl=0;vl<El.length;vl++)for(var wl=El[vl],Il=0;Il<wl.letters.length;Il++)Xp[wl.letters[Il]]=wl.base;var Yp=function(t){return t.replace(E7,function(n){return Xp[n]})},v7=h7(Yp),Jp=function(t){return t.replace(/^\s+|\s+$/g,"")},w7=function(t){return"".concat(t.label," ").concat(t.value)},I7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=ie({ignoreCase:!0,ignoreAccents:!0,stringify:w7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,d=o.matchFrom,f=c?Jp(r):r,g=c?Jp(i(n)):i(n);return s&&(f=f.toLowerCase(),g=g.toLowerCase()),a&&(f=v7(f),g=Yp(g)),d==="start"?g.substr(0,f.length)===f:g.indexOf(f)>-1}},_7=["innerRef"];function S7(e){var t=e.innerRef,n=an(e,_7),r=$C(n,"onExited","in","enter","exit","appear");return de("input",fe({ref:t},r,{css:pl({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 A7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function T7(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),d=w.useRef(null),f=w.useCallback(function(p,m){if(d.current!==null){var x=d.current,E=x.scrollTop,I=x.scrollHeight,v=x.clientHeight,_=d.current,A=m>0,S=I-v-E,L=!1;S>m&&a.current&&(r&&r(p),a.current=!1),A&&i.current&&(s&&s(p),i.current=!1),A&&m>S?(n&&!a.current&&n(p),_.scrollTop=I,L=!0,a.current=!0):!A&&-m>E&&(o&&!i.current&&o(p),_.scrollTop=0,L=!0,i.current=!0),L&&A7(p)}},[n,r,o,s]),g=w.useCallback(function(p){f(p,p.deltaY)},[f]),y=w.useCallback(function(p){c.current=p.changedTouches[0].clientY},[]),C=w.useCallback(function(p){var m=c.current-p.changedTouches[0].clientY;f(p,m)},[f]),b=w.useCallback(function(p){if(p){var m=JC?{passive:!1}:!1;p.addEventListener("wheel",g,m),p.addEventListener("touchstart",y,m),p.addEventListener("touchmove",C,m)}},[C,y,g]),h=w.useCallback(function(p){p&&(p.removeEventListener("wheel",g,!1),p.removeEventListener("touchstart",y,!1),p.removeEventListener("touchmove",C,!1))},[C,y,g]);return w.useEffect(function(){if(t){var p=d.current;return b(p),function(){h(p)}}},[t,b,h]),function(p){d.current=p}}var qp=["boxSizing","height","overflow","paddingRight","position"],Qp={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function $p(e){e.preventDefault()}function Up(e){e.stopPropagation()}function Kp(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function e1(){return"ontouchstart"in window||navigator.maxTouchPoints}var t1=!!(typeof window<"u"&&window.document&&window.document.createElement),ms=0,po={capture:!1,passive:!1};function L7(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(t1){var d=document.body,f=d&&d.style;if(r&&qp.forEach(function(b){var h=f&&f[b];o.current[b]=h}),r&&ms<1){var g=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,C=window.innerWidth-y+g||0;Object.keys(Qp).forEach(function(b){var h=Qp[b];f&&(f[b]=h)}),f&&(f.paddingRight="".concat(C,"px"))}d&&e1()&&(d.addEventListener("touchmove",$p,po),c&&(c.addEventListener("touchstart",Kp,po),c.addEventListener("touchmove",Up,po))),ms+=1}},[r]),i=w.useCallback(function(c){if(t1){var d=document.body,f=d&&d.style;ms=Math.max(ms-1,0),r&&ms<1&&qp.forEach(function(g){var y=o.current[g];f&&(f[g]=y)}),d&&e1()&&(d.removeEventListener("touchmove",$p,po),c&&(c.removeEventListener("touchstart",Kp,po),c.removeEventListener("touchmove",Up,po)))}},[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 O7(){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 k7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},F7=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:O7};function D7(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,d=T7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=L7({isEnabled:n}),g=function(C){d(C),f(C)};return de(w.Fragment,null,n&&de("div",{onClick:k7,css:F7}),t(g))}function N7(){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 R7=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:N7},M7=function(t){var n=t.name,r=t.onFocus;return de("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:R7,value:"",onChange:function(){}})},j7=M7;function _l(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 P7(){return _l(/^iPhone/i)}function n1(){return _l(/^Mac/i)}function B7(){return _l(/^iPad/i)||n1()&&navigator.maxTouchPoints>1}function V7(){return P7()||B7()}function G7(){return n1()||V7()}var H7=function(t){return t.label},r1=function(t){return t.label},o1=function(t){return t.value},W7=function(t){return!!t.isDisabled},Z7={clearIndicator:S8,container:h8,control:D8,dropdownIndicator:I8,group:j8,groupHeading:B8,indicatorsContainer:y8,indicatorSeparator:T8,input:W8,loadingIndicator:k8,loadingMessage:l8,menu:n8,menuList:a8,menuPortal:f8,multiValue:J8,multiValueLabel:q8,multiValueRemove:Q8,noOptionsMessage:c8,option:n7,placeholder:s7,singleValue:c7,valueContainer:m8},z7={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%)"},X7=4,s1=4,Y7=38,J7=s1*2,q7={baseUnit:s1,controlHeight:Y7,menuGutter:J7},Sl={borderRadius:X7,colors:z7,spacing:q7},Q7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Dp(),captureMenuScroll:!Dp(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:I7(),formatGroupLabel:H7,getOptionLabel:r1,getOptionValue:o1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:W7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!XC(),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 a1(e,t,n,r){var o=d1(e,t,n),s=f1(e,t,n),a=u1(e,t),i=ei(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function Ka(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return a1(e,a,t,i)}).filter(function(a){return l1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=a1(e,n,t,r);return l1(e,s)?s:void 0}).filter(qC)}function i1(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,co(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function c1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,co(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 $7(e,t){return i1(Ka(e,t))}function l1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!h1(e)||!s)&&p1(e,{label:a,value:i,data:o},r)}function U7(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 K7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Al=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},u1=function(t,n){return t.getOptionLabel(n)},ei=function(t,n){return t.getOptionValue(n)};function d1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function f1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ei(e,t);return n.some(function(o){return ei(e,o)===r})}function p1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var h1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},eE=1,ti=function(e){h9(n,e);var t=b9(n);function n(r){var o;if(f9(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=G7(),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,d){var f=o.props,g=f.onChange,y=f.name;d.name=y,o.ariaOnChange(c,d),g(c,d)},o.setValue=function(c,d,f){var g=o.props,y=g.closeMenuOnSelect,C=g.isMulti,b=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:b}),y&&(o.setState({inputIsHiddenAfterUpdate:!C}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:d,option:f})},o.selectOption=function(c){var d=o.props,f=d.blurInputOnSelect,g=d.isMulti,y=d.name,C=o.state.selectValue,b=g&&o.isOptionSelected(c,C),h=o.isOptionDisabled(c,C);if(b){var p=o.getOptionValue(c);o.setValue(C.filter(function(m){return o.getOptionValue(m)!==p}),"deselect-option",c)}else if(!h)g?o.setValue([].concat(co(C),[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 d=o.props.isMulti,f=o.state.selectValue,g=o.getOptionValue(c),y=f.filter(function(b){return o.getOptionValue(b)!==g}),C=gs(d,y,y[0]||null);o.onChange(C,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(gs(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,d=o.state.selectValue,f=d[d.length-1],g=d.slice(0,d.length-1),y=gs(c,g,g[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return Al(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return c1(Ka(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,d=new Array(c),f=0;f<c;f++)d[f]=arguments[f];return VC.apply(void 0,[o.props.classNamePrefix].concat(d))},o.getOptionLabel=function(c){return u1(o.props,c)},o.getOptionValue=function(c){return ei(o.props,c)},o.getStyles=function(c,d){var f=o.props.unstyled,g=Z7[c](d,f);g.boxSizing="border-box";var y=o.props.styles[c];return y?y(g,d):g},o.getClassNames=function(c,d){var f,g;return(f=(g=o.props.classNames)[c])===null||f===void 0?void 0:f.call(g,d)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return d7(o.props)},o.buildCategorizedOptions=function(){return Ka(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return i1(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,d){o.setState({ariaSelection:ie({value:c},d)})},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 d=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():d&&o.openMenu("first"):(d&&(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 d=o.props,f=d.isMulti,g=d.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&qa(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 d=c.touches,f=d&&d.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var d=c.touches,f=d&&d.item(0);if(f){var g=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),C=5;o.userIsDragging=g>C||y>C}},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 d=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:d}),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 d=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:d}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var d=o.getFocusableOptions(),f=d.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return h1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var d=o.props,f=d.isMulti,g=d.backspaceRemovesValue,y=d.escapeClearsValue,C=d.inputValue,b=d.isClearable,h=d.isDisabled,p=d.menuIsOpen,m=d.onKeyDown,x=d.tabSelectsValue,E=d.openMenuOnFocus,I=o.state,v=I.focusedOption,_=I.focusedValue,A=I.selectValue;if(!h&&!(typeof m=="function"&&(m(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||C)return;o.focusValue("previous");break;case"ArrowRight":if(!f||C)return;o.focusValue("next");break;case"Delete":case"Backspace":if(C)return;if(_)o.removeValue(_);else{if(!g)return;f?o.popValue():b&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!p||!x||!v||E&&o.isOptionSelected(v,A))return;o.selectOption(v);break;case"Enter":if(c.keyCode===229)break;if(p){if(!v||o.isComposing)return;o.selectOption(v);break}return;case"Escape":p?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:C}),o.onMenuClose()):b&&y&&o.clearValue();break;case" ":if(C)return;if(!p){o.openMenu("first");break}if(!v)return;o.selectOption(v);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||++eE),o.state.selectValue=Ja(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=Al(s,a[i])}return o}return p9(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&&Fp(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&&(Fp(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,d=this.buildFocusableOptions(),f=o==="first"?0:d.length-1;if(!this.props.isMulti){var g=d.indexOf(i[0]);g>-1&&(f=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:d[f],focusedOptionId:this.getFocusedOptionId(d[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 d=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=d:f=c-1;break;case"next":c>-1&&c<d&&(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,d=i.indexOf(a);a||(d=-1),o==="up"?c=d>0?d-1:i.length-1:o==="down"?c=(d+1)%i.length:o==="pageup"?(c=d-s,c<0&&(c=0)):o==="pagedown"?(c=d+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(Sl):ie(ie({},Sl),this.props.theme):Sl}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,d=this.selectOption,f=this.setValue,g=this.props,y=g.isMulti,C=g.isRtl,b=g.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:h,isMulti:y,isRtl:C,options:b,selectOption:d,selectProps:g,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return d1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return f1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return p1(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,d=o.tabIndex,f=o.form,g=o.menuIsOpen,y=o.required,C=this.getComponents(),b=C.Input,h=this.state,p=h.inputIsHidden,m=h.ariaSelection,x=this.commonProps,E=i||this.getElementId("input"),I=ie(ie(ie({"aria-autocomplete":"list","aria-expanded":g,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":y,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(b,fe({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:E,innerRef:this.getInputRef,isDisabled:s,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:d,form:f,type:"text",value:c},I)):T.createElement(S7,fe({id:E,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ya,onFocus:this.onInputFocus,disabled:s,tabIndex:d,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,d=s.MultiValueRemove,f=s.SingleValue,g=s.Placeholder,y=this.commonProps,C=this.props,b=C.controlShouldRenderValue,h=C.isDisabled,p=C.isMulti,m=C.inputValue,x=C.placeholder,E=this.state,I=E.selectValue,v=E.focusedValue,_=E.isFocused;if(!this.hasValue()||!b)return m?null:T.createElement(g,fe({},y,{key:"placeholder",isDisabled:h,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),x);if(p)return I.map(function(S,L){var N=S===v,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,fe({},y,{components:{Container:i,Label:c,Remove:d},isFocused:N,isDisabled:h,key:D,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(m)return null;var A=I[0];return T.createElement(f,fe({},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,d=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||d)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,fe({},a,{innerProps:g,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,d=i.isLoading,f=this.state.isFocused;if(!s||!d)return null;var g={"aria-hidden":"true"};return T.createElement(s,fe({},a,{innerProps:g,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,d=this.state.isFocused;return T.createElement(a,fe({},i,{isDisabled:c,isFocused:d}))}},{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,d={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,fe({},a,{innerProps:d,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,d=s.MenuList,f=s.MenuPortal,g=s.LoadingMessage,y=s.NoOptionsMessage,C=s.Option,b=this.commonProps,h=this.state.focusedOption,p=this.props,m=p.captureMenuScroll,x=p.inputValue,E=p.isLoading,I=p.loadingMessage,v=p.minMenuHeight,_=p.maxMenuHeight,A=p.menuIsOpen,S=p.menuPlacement,L=p.menuPosition,N=p.menuPortalTarget,D=p.menuShouldBlockScroll,F=p.menuShouldScrollIntoView,M=p.noOptionsMessage,B=p.onMenuScrollToTop,V=p.onMenuScrollToBottom;if(!A)return null;var Y=function(J,R){var X=J.type,K=J.data,ne=J.isDisabled,le=J.isSelected,j=J.label,oe=J.value,_e=h===K,z=ne?void 0:function(){return o.onOptionHover(K)},Pe=ne?void 0:function(){return o.selectOption(K)},We="".concat(o.getElementId("option"),"-").concat(R),Ee={id:We,onClick:Pe,onMouseMove:z,onMouseOver:z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:le};return T.createElement(C,fe({},b,{innerProps:Ee,data:K,isDisabled:ne,isSelected:le,key:We,label:j,type:X,value:oe,isFocused:_e,innerRef:_e?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(J.data,"menu"))},W;if(this.hasOptions())W=this.getCategorizedOptions().map(function(G){if(G.type==="group"){var J=G.data,R=G.options,X=G.index,K="".concat(o.getElementId("group"),"-").concat(X),ne="".concat(K,"-heading");return T.createElement(a,fe({},b,{key:K,data:J,options:R,Heading:i,headingProps:{id:ne,data:G.data},label:o.formatGroupLabel(G.data)}),G.options.map(function(le){return Y(le,"".concat(X,"-").concat(le.index))}))}else if(G.type==="option")return Y(G,"".concat(G.index))});else if(E){var H=I({inputValue:x});if(H===null)return null;W=T.createElement(g,b,H)}else{var q=M({inputValue:x});if(q===null)return null;W=T.createElement(y,b,q)}var Q={minMenuHeight:v,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:F},ee=T.createElement(r8,fe({},b,Q),function(G){var J=G.ref,R=G.placerProps,X=R.placement,K=R.maxHeight;return T.createElement(c,fe({},b,Q,{innerRef:J,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:E,placement:X}),T.createElement(D7,{captureEnabled:m,onTopArrive:B,onBottomArrive:V,lockEnabled:D},function(ne){return T.createElement(d,fe({},b,{innerRef:function(j){o.getMenuListRef(j),ne(j)},innerProps:{role:"listbox","aria-multiselectable":b.isMulti,id:o.getElementId("listbox")},isLoading:E,maxHeight:K,focusedOption:h}),W)}))});return N||L==="fixed"?T.createElement(f,fe({},b,{appendTo:N,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),ee):ee}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,d=s.name,f=s.required,g=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(j7,{name:d,onFocus:this.onValueInputFocus});if(!(!d||i))if(c)if(a){var y=g.map(function(h){return o.getOptionValue(h)}).join(a);return T.createElement("input",{name:d,type:"hidden",value:y})}else{var C=g.length>0?g.map(function(h,p){return T.createElement("input",{key:"i-".concat(p),name:d,type:"hidden",value:o.getOptionValue(h)})}):T.createElement("input",{name:d,type:"hidden",value:""});return T.createElement("div",null,C)}else{var b=g[0]?this.getOptionValue(g[0]):"";return T.createElement("input",{name:d,type:"hidden",value:b})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,d=s.isFocused,f=s.selectValue,g=this.getFocusableOptions();return T.createElement(C7,fe({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:d,selectValue:f,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,d=this.props,f=d.className,g=d.id,y=d.isDisabled,C=d.menuIsOpen,b=this.state.isFocused,h=this.commonProps=this.getCommonProps();return T.createElement(i,fe({},h,{className:f,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:b}),this.renderLiveRegion(),T.createElement(s,fe({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:b,menuIsOpen:C}),T.createElement(c,fe({},h,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,fe({},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,d=s.ariaSelection,f=s.isFocused,g=s.prevWasFocused,y=s.instancePrefix,C=o.options,b=o.value,h=o.menuIsOpen,p=o.inputValue,m=o.isMulti,x=Ja(b),E={};if(a&&(b!==a.value||C!==a.options||h!==a.menuIsOpen||p!==a.inputValue)){var I=h?$7(o,x):[],v=h?c1(Ka(o,x),"".concat(y,"-option")):[],_=i?U7(s,x):null,A=K7(s,I),S=Al(v,A);E={selectValue:x,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:v,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},N=d,D=f&&g;return f&&!D&&(N={value:gs(m,x,x[0]||null),options:x,action:"initial-input-focus"},D=!g),(d==null?void 0:d.action)==="initial-input-focus"&&(N=null),ie(ie(ie({},E),L),{},{prevProps:o,ariaSelection:N,prevWasFocused:D})}}]),n}(w.Component);ti.defaultProps=Q7;var tE=w.forwardRef(function(e,t){var n=nl(e);return T.createElement(ti,fe({ref:t},n))}),nE=tE;const rE=l.styled(l.Box)`
|
|
1515
1515
|
display: flex;
|
|
1516
1516
|
align-items: center;
|
|
1517
1517
|
gap: 2px;
|
|
@@ -1525,12 +1525,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1525
1525
|
max-width: 100%;
|
|
1526
1526
|
overflow-wrap: break-word;
|
|
1527
1527
|
}
|
|
1528
|
-
`,
|
|
1528
|
+
`,oE=l.styled("img")`
|
|
1529
1529
|
width: 24px;
|
|
1530
1530
|
height: 24px;
|
|
1531
1531
|
border-radius: 50%;
|
|
1532
1532
|
margin-right: 12px;
|
|
1533
|
-
`;function g1(e){const{data:t}=e;return u.jsx(
|
|
1533
|
+
`;function g1(e){const{data:t}=e;return u.jsx(mn.Option,{...e,children:u.jsxs(rE,{children:[t.avatarUrl?u.jsx(oE,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,u.jsx("span",{children:e.children})]})})}const sE=l.styled(l.Box)`
|
|
1534
1534
|
height: 24px;
|
|
1535
1535
|
width: 24px;
|
|
1536
1536
|
border-radius: 50%;
|
|
@@ -1555,27 +1555,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1555
1555
|
&:after {
|
|
1556
1556
|
transform: rotate(-45deg);
|
|
1557
1557
|
}
|
|
1558
|
-
`,m1=e=>u.jsx(
|
|
1558
|
+
`,m1=e=>u.jsx(mn.ClearIndicator,{...e,children:u.jsx(sE,{})}),b1=(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)}},valueContainer:(n,r)=>{var s;const o=r.isMulti;return{...n,...o?{paddingLeft:4,paddingRight:4}:{},...(s=e==null?void 0:e.valueContainer)==null?void 0:s.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:l.theme.typography.fontFamily,fontSize:"13px"}}}:null}),aE=l.styled(l.Stack)`
|
|
1559
1559
|
width: 0;
|
|
1560
1560
|
height: 0;
|
|
1561
|
-
`,
|
|
1561
|
+
`,iE=({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(aE,{ref:o})},y1=({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}},cE=e=>u.jsx(mn.DropdownIndicator,{...e,children:u.jsx(l.Icon,{children:e.selectProps.menuIsOpen?u.jsx(l.icons.ArrowDropUp,{}):u.jsx(l.icons.ArrowDropDown,{})})}),x1=()=>({ClearIndicator:m1,DropdownIndicator:cE,IndicatorSeparator:()=>null,Option:g1}),bs=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=w.useState(!1),c=w.useCallback(g=>{i(!g.isIntersecting)},[]),{getValue:d,closeMenuOnScroll:f}=y1({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(iE,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(nE,{...n,isDisabled:n.disabled,value:r?d(r):void 0,styles:b1(n.styles,e),components:n.components?n.components:x1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};bs.getDefaultComponents=x1;const C1="Required Field",lE="Validation Failed";var E1=(e=>(e.DATE="DD/MM/YYYY",e))(E1||{}),uE=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function v1(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,d=e.filterOption,f=d===void 0?null:d,g=an(e,uE),y=g.inputValue,C=w.useRef(void 0),b=w.useRef(!1),h=w.useState(Array.isArray(n)?n:void 0),p=st(h,2),m=p[0],x=p[1],E=w.useState(typeof y<"u"?y:""),I=st(E,2),v=I[0],_=I[1],A=w.useState(n===!0),S=st(A,2),L=S[0],N=S[1],D=w.useState(void 0),F=st(D,2),M=F[0],B=F[1],V=w.useState([]),Y=st(V,2),W=Y[0],H=Y[1],q=w.useState(!1),Q=st(q,2),ee=Q[0],G=Q[1],J=w.useState({}),R=st(J,2),X=R[0],K=R[1],ne=w.useState(void 0),le=st(ne,2),j=le[0],oe=le[1],_e=w.useState(void 0),z=st(_e,2),Pe=z[0],We=z[1];o!==Pe&&(K({}),We(o)),n!==j&&(x(Array.isArray(n)?n:void 0),oe(n)),w.useEffect(function(){return b.current=!0,function(){b.current=!1}},[]);var Ee=w.useCallback(function(nt,tt){if(!s)return tt();var Ze=s(nt,tt);Ze&&typeof Ze.then=="function"&&Ze.then(tt,function(){return tt()})},[s]);w.useEffect(function(){n===!0&&Ee(v,function(nt){b.current&&(x(nt||[]),N(!!C.current))})},[]);var Gt=w.useCallback(function(nt,tt){var Ze=GC(nt,tt,c);if(!Ze){C.current=void 0,_(""),B(""),H([]),N(!1),G(!1);return}if(o&&X[Ze])_(Ze),B(Ze),H(X[Ze]),N(!1),G(!1);else{var Pr=C.current={};_(Ze),N(!0),G(!M),Ee(Ze,function(Qt){b&&Pr===C.current&&(C.current=void 0,N(!1),B(Ze),H(Qt||[]),G(!1),K(Qt?ie(ie({},X),{},io({},Ze,Qt)):X))})}},[o,Ee,M,X,c]),sr=ee?[]:v&&M?W:m||[];return ie(ie({},g),{},{options:sr,isLoading:L||i,onInputChange:Gt,filterOption:f})}var dE=w.forwardRef(function(e,t){var n=v1(e),r=nl(n);return T.createElement(ti,fe({ref:t},r))}),fE=dE,pE=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],w1=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},Tl={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return w1(t,s,o)})||r.some(function(s){return w1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function hE(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?Tl.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Tl.isValidNewOption:i,d=e.getNewOptionData,f=d===void 0?Tl.getNewOptionData:d,g=e.onCreateOption,y=e.options,C=y===void 0?[]:y,b=e.onChange,h=an(e,pE),p=h.getOptionValue,m=p===void 0?o1:p,x=h.getOptionLabel,E=x===void 0?r1:x,I=h.inputValue,v=h.isLoading,_=h.isMulti,A=h.value,S=h.name,L=w.useMemo(function(){return c(I,Ja(A),C,{getOptionValue:m,getOptionLabel:E})?f(I,a(I)):void 0},[a,f,E,m,I,c,C,A]),N=w.useMemo(function(){return(n||!v)&&L?o==="first"?[L].concat(co(C)):[].concat(co(C),[L]):C},[n,o,v,L,C]),D=w.useCallback(function(F,M){if(M.action!=="select-option")return b(F,M);var B=Array.isArray(F)?F:[F];if(B[B.length-1]===L){if(g)g(I);else{var V=f(I,I),Y={action:"create-option",name:S,option:V};b(gs(_,[].concat(co(Ja(A)),[V]),V),Y)}return}b(F,M)},[f,I,_,S,L,g,b,A]);return ie(ie({},h),{},{options:N,onChange:D})}var gE=w.forwardRef(function(e,t){var n=v1(e),r=nl(n),o=hE(r);return T.createElement(ti,fe({ref:t},o))}),mE=gE;const bE=l.styled(l.Typography)`
|
|
1562
1562
|
display: block;
|
|
1563
1563
|
white-space: nowrap;
|
|
1564
1564
|
overflow: hidden;
|
|
1565
1565
|
text-overflow: ellipsis;
|
|
1566
|
-
`,I1=(e,t)=>{const n=w.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},_1=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
|
|
1566
|
+
`,I1=(e,t)=>{const n=w.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},_1=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 yE(e){return u.jsx(mn.DropdownIndicator,{...e,children:u.jsx(l.Icon,{children:e.selectProps.menuIsOpen?u.jsx(l.icons.ArrowDropUp,{}):u.jsx(l.icons.ArrowDropDown,{})})})}const xE=e=>u.jsxs(l.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[u.jsx(l.Stack,{flexShrink:0,children:u.jsx(_1,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),u.jsxs(bE,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function CE({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=w.useState([]),[s,a]=w.useState(""),[i,c]=w.useState(!1),d=w.useRef(),{isMulti:f,createOption:g,loadOptions:y,isApiSearchEnabled:C=!1,isInfiniteScrollable:b=!1,loadOptionsOnFocus:h=!1}=n,{getValue:p,closeMenuOnScroll:m}=y1({options:r,isMulti:f,isScrollTarget:t}),x=(M,B,V)=>(d.current&&d.current.abort("stale data"),d.current=new AbortController,y==null?void 0:y(M,B,V,d.current)),E=I1((M,B)=>{if(a(M),r.length>0&&!C){const Y=r.filter(W=>W&&typeof W=="object"&&"label"in W&&typeof W.label=="string"?W.label.toLowerCase().includes(M.toLowerCase()):!1);B(Y);return}const V=Y=>{B(Y),o(Y)};x==null||x(M,V,!1)},300),I=(M,B)=>{c(!1),!(B&&"isError"in B&&B.isError)&&o(M)},v=M=>{var B;(B=n.onMenuScrollToBottom)==null||B.call(n,M),b&&y&&!i&&(c(!0),x(s,I,!0))},_=(M,B)=>{var V;(V=n.onInputChange)==null||V.call(n,M,B),B.action==="input-change"&&C&&(a(M),o([]),M||(c(!0),E(M,I)))},A=M=>{var B;a(""),(B=n.onBlur)==null||B.call(n,M)},S=M=>{var B;(B=n.onFocus)==null||B.call(n,M),!i&&h&&(o([]),c(!0),x==null||x(s,I,!1))},L=M=>B=>{var Y;const V=B.find(W=>W.label===M);!n.isMulti&&V&&((Y=n.onChange)==null||Y.call(n,V,{action:"select-option",name:n.name,option:V})),o(B),c(!1)},N=M=>{c(!0),g==null||g(M,L(M))},D=()=>{c(!0),x==null||x(s,I,!1)},F=g?mE:fE;return u.jsx(F,{...n,menuShouldScrollIntoView:!1,value:n.value?p(n.value):null,isDisabled:n.disabled,loadOptions:E,onMenuScrollToBottom:v,onInputChange:_,onBlur:A,onFocus:S,onMenuOpen:D,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:b1(n.styles,e),components:{ClearIndicator:m1,DropdownIndicator:yE,IndicatorSeparator:()=>null,Option:g1},closeMenuOnScroll:m,...g?{formatCreateLabel:xE,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:N,options:r}:null})}const ho="table-cell-form-field",ni="60px",ri="24px",EE=l.styled(l.Box)`
|
|
1567
1567
|
width: 100%;
|
|
1568
|
-
`,
|
|
1568
|
+
`,vE=l.styled(l.Box)`
|
|
1569
1569
|
width: 100%;
|
|
1570
1570
|
overflow-x: auto;
|
|
1571
|
-
`,
|
|
1571
|
+
`,wE=l.styled(l.Box)`
|
|
1572
1572
|
--border-color: rgb(214, 221, 232);
|
|
1573
1573
|
--border-size: 1px;
|
|
1574
1574
|
display: grid;
|
|
1575
1575
|
grid-template-columns: ${({gridColumns:e})=>e};
|
|
1576
1576
|
border: 1px solid var(--border-color);
|
|
1577
1577
|
border-radius; 4px;
|
|
1578
|
-
`,
|
|
1578
|
+
`,IE=l.styled(l.Stack)`
|
|
1579
1579
|
margin-top: 16px;
|
|
1580
1580
|
flex-direction: row;
|
|
1581
1581
|
justify-content: space-between;
|
|
@@ -1591,8 +1591,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1591
1591
|
&:last-child {
|
|
1592
1592
|
border-bottom: 0;
|
|
1593
1593
|
}
|
|
1594
|
-
`,
|
|
1595
|
-
--cell-padding: 10px ${
|
|
1594
|
+
`,_E=l.styled(S1)`
|
|
1595
|
+
--cell-padding: 10px ${ri};
|
|
1596
1596
|
border-bottom: 1px solid var(--border-color);
|
|
1597
1597
|
`,Ll=l.styled(l.Box)`
|
|
1598
1598
|
border: var(--border-size) solid transparent;
|
|
@@ -1621,7 +1621,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1621
1621
|
width: 100%;
|
|
1622
1622
|
height: 100%;
|
|
1623
1623
|
}
|
|
1624
|
-
`,
|
|
1624
|
+
`,SE=l.styled(A1)`
|
|
1625
1625
|
box-sizing: content-box;
|
|
1626
1626
|
padding: 4px 12px;
|
|
1627
1627
|
color: rgb(80, 109, 255);
|
|
@@ -1643,9 +1643,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1643
1643
|
width: 20px;
|
|
1644
1644
|
height: 20px;
|
|
1645
1645
|
}
|
|
1646
|
-
`,
|
|
1646
|
+
`,AE=l.styled(l.Box)`
|
|
1647
1647
|
margin-left: auto;
|
|
1648
|
-
`,
|
|
1648
|
+
`,TE=l.styled(l.Stack)`
|
|
1649
1649
|
box-sizing: content-box;
|
|
1650
1650
|
padding: 4px 0;
|
|
1651
1651
|
flex-direction: row;
|
|
@@ -1655,19 +1655,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1655
1655
|
min-height: 28px;
|
|
1656
1656
|
color: ${l.theme.palette.gray.gray1};
|
|
1657
1657
|
font-weight: bold;
|
|
1658
|
-
`,
|
|
1658
|
+
`,LE=l.styled(l.DatePicker)`
|
|
1659
1659
|
&.${ho} .MuiInputBase-root {
|
|
1660
|
-
height: ${
|
|
1660
|
+
height: ${ni};
|
|
1661
1661
|
border: 0;
|
|
1662
|
-
padding-left: ${
|
|
1662
|
+
padding-left: ${ri};
|
|
1663
1663
|
}
|
|
1664
|
-
`;function
|
|
1664
|
+
`;function OE(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(LE,{inputFormat:e.inputFormat?e.inputFormat:E1.DATE,...e,value:e.value||null,open:t,onOpen:()=>n(!0),onClose:()=>n(!1),onChange:o,PopperProps:{anchorEl:r.current},renderInput:s=>u.jsx(l.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(l.InputAdornment,{position:"end",sx:{cursor:"pointer"},children:u.jsx(l.icons.CalendarTodayOutlinedIcon,{})})},onClick:()=>{t||n(!0)}})})}const kE=l.styled(l.Checkbox)`
|
|
1665
1665
|
&.${ho} {
|
|
1666
|
-
--v-margin: calc((${
|
|
1666
|
+
--v-margin: calc((${ni} - 36px) / 2);
|
|
1667
1667
|
--h-margin: calc((100% - 36px) / 2);
|
|
1668
1668
|
margin: var(--v-margin) var(--h-margin);
|
|
1669
1669
|
}
|
|
1670
|
-
`,
|
|
1670
|
+
`,T1=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(kE,{onChange:o,onFocus:t,onBlur:n,...r})},L1=({label:e,isRequired:t,prefixNode:n,...r})=>e?u.jsxs(l.Typography,{variant:"body_sm_medium",component:"label",color:l.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?u.jsx("span",{className:"required__star",children:"*"}):null]}):null,FE=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"})),O1=250,_r="__id",ys={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:O1,arithmeticOperation:[]},oi=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=ys.defaultNumberOfRows,fixedRows:a=ys.fixedRows,cellWidth:i=ys.cellWidth,arithmeticOperation:c=ys.arithmeticOperation}=ys,fetchConfig:d={},createConfig:f={},stackIndex:g,onChange:y=()=>{},onFocus:C,onValidationError:b})=>{const h=t??[],p=(o==null?void 0:o.validations)??{},m=w.useRef(),x=w.useRef({}),[E,I]=w.useState({}),{colsLength:v,colsTemplate:_,colWidth:A}=w.useMemo(()=>{let G=0,J="";for(const R of r){let X=R.cols?Number(R.cols):1;isNaN(X)&&(X=1),G+=X,J+=`${R.cols??X}fr `}return a||(G+=.5,J+="0.5fr"),{colsLength:G,colsTemplate:J.trim(),colWidth:`${isNaN(i)?O1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=w.useMemo(()=>{const G={},J={};for(const R of r){if(!R.valueConfig)continue;J[R.name]=R.valueConfig;const X=R.valueConfig.columnNames;for(const K of X)G[K]||(G[K]=[]),G[K].push(R.name)}return{fieldDependency:G,fieldConfigs:J}},[r]);w.useEffect(()=>{if(t)return;const G=[];for(let J=0;J<s;J++){const R=Gf();G.push({[_r]:R})}y(G)},[t,y,s]);const N=()=>{const G=Object.entries(x.current).filter(J=>!!J[1])[0];return(G==null?void 0:G[1])??""},D=()=>{const G={[_r]:Gf()};y([...h,G])},F=G=>{const J=h.filter(R=>R[_r]!==G);y(J),I(R=>({...R,[G]:{}}));for(const R in x.current)R.startsWith(`${G}.`)&&delete x.current[R];b==null||b(e,N())},M=(G,{columnNames:J=[],operationType:R})=>{const X=J.map(K=>G[K]);return""+Hf(X,R)},B=(G,J)=>{const R=h.map(X=>G!==X[_r]?X:{...X,...J});y(R)},V=(G,J)=>{const R=h.map(X=>{if(G!==X[_r])return X;const K={...X};for(const ne of J)delete K[ne];return K});y(R)},Y=(G,J,R,X)=>{var le;const K=((le=X==null?void 0:X.target)==null?void 0:le.value)??"",ne={...R,[J]:K};if(S[J])for(const j of S[J]){const oe=M(ne,L[j]);ne[j]=oe}B(G,ne)},W=(G,J,R)=>{B(G,{[J]:R})},H=(G,J,R,X)=>{if(R&&typeof R=="object"&&"value"in R&&typeof R.value=="string"&&typeof X.name<"u"){const K="prefillValues"in R&&R.prefillValues,ne={...J,[X.name]:R.value,...K};for(const le in ne)if(S[le])for(const j of S[le]){const oe=M(ne,L[j]);ne[j]=oe}B(G,ne)}(X==null?void 0:X.action)==="clear"&&X.name&&V(G,[X.name])},q=(G,J,R)=>{B(G,{[J]:(R==null?void 0:R.toISOString())??""})},Q=(G,J,R,X)=>{X&&I(K=>{const ne=K[G]??{};return{...K,[G]:{...ne,[J]:R}}}),x.current={...x.current,[`${G}.${J}`]:typeof R=="string"?R:""},b==null||b(e,N())},ee=G=>m.current===G;return u.jsxs(EE,{children:[u.jsx(vE,{ref:m,children:u.jsxs(wE,{gridColumns:_,minWidth:`calc( ${v} * ${A} )`,children:[u.jsx(_E,{children:r.map(({name:G,label:J,isRequired:R})=>u.jsx(Ll,{children:u.jsx(L1,{label:J,isRequired:R})},G))}),h.map(({[_r]:G,...J})=>u.jsxs(S1,{children:[r.map(({name:R,key:X,...K})=>{var ne;return u.jsx(Ll,{hasError:!!((ne=E==null?void 0:E[G])!=null&&ne[R]),children:u.jsx(Sr,{name:R,value:J[R],...K,className:ho,label:"",hideHelperText:!0,validation:p==null?void 0:p[R],onFocus:C,inputChangeHandler:le=>Y(G,R,J,le),checkboxChangeHandler:(...le)=>W(G,R,le[1]),selectChangeHandler:(...le)=>H(G,J,...le),dateChangeHandler:(le,j)=>q(G,le,j),onValidationError:(...le)=>Q(G,...le),fetchConfig:d==null?void 0:d[R],createConfig:f==null?void 0:f[R],isScrollTarget:ee,...g?{menuPortalTarget:document.body,stackIndex:g}:null})},R??X)}),a?null:u.jsx(Ll,{children:u.jsx(l.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:u.jsx(A1,{onClick:()=>F(G),children:u.jsx(FE,{})})})})]},G))]})}),u.jsxs(IE,{children:[a?null:u.jsxs(SE,{onClick:D,children:[u.jsx(_1,{}),u.jsx(l.Typography,{children:"Add Line"})]}),c.length?u.jsx(AE,{children:c.map(({label:G,columnName:J,operationType:R,prefix:X="",prefixKey:K,suffix:ne="",suffixKey:le})=>u.jsxs(TE,{children:[u.jsx(l.Typography,{fontWeight:500,children:G}),u.jsxs(l.Typography,{children:[u.jsxs("span",{children:[n[K]??X," "]}),u.jsx("span",{children:Hf(h.map(j=>j[J]),R)}),u.jsx("span",{children:n[le]??ne})]})]},G))}):null]})]})};oi.ROW_ID=_r;const DE=l.styled(l.Box)`
|
|
1671
1671
|
box-sizing: border-box;
|
|
1672
1672
|
&:not(:has(.${ho})) {
|
|
1673
1673
|
transform: translate(0, 5px);
|
|
@@ -1675,11 +1675,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1675
1675
|
}
|
|
1676
1676
|
`,NE=l.styled(l.TextField)`
|
|
1677
1677
|
&.${ho} {
|
|
1678
|
-
height: ${
|
|
1678
|
+
height: ${ni};
|
|
1679
1679
|
position: relative;
|
|
1680
1680
|
& > div {
|
|
1681
1681
|
height: 100%;
|
|
1682
|
-
padding-left: ${
|
|
1682
|
+
padding-left: ${ri};
|
|
1683
1683
|
}
|
|
1684
1684
|
|
|
1685
1685
|
fieldset.MuiOutlinedInput-notchedOutline {
|
|
@@ -1713,7 +1713,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1713
1713
|
&.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
|
|
1714
1714
|
border-width: 1px;
|
|
1715
1715
|
}
|
|
1716
|
-
`,
|
|
1716
|
+
`,k1=l.styled(l.Box)`
|
|
1717
1717
|
& .hiverFormField__placeholder {
|
|
1718
1718
|
color: #97a3b7;
|
|
1719
1719
|
}
|
|
@@ -1809,19 +1809,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1809
1809
|
}
|
|
1810
1810
|
|
|
1811
1811
|
& .${ho} {
|
|
1812
|
-
height: ${
|
|
1812
|
+
height: ${ni};
|
|
1813
1813
|
.hiverFormField__control {
|
|
1814
1814
|
height: 100%;
|
|
1815
1815
|
border: 0;
|
|
1816
1816
|
.hiverFormField__value-container {
|
|
1817
|
-
padding-left: ${
|
|
1817
|
+
padding-left: ${ri};
|
|
1818
1818
|
}
|
|
1819
1819
|
}
|
|
1820
1820
|
.hiverFormField__indicators {
|
|
1821
1821
|
height: 100%;
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
1824
|
-
`,
|
|
1824
|
+
`,F1=l.styled(l.Box)`
|
|
1825
1825
|
font-size: 12px;
|
|
1826
1826
|
font-weight: 400;
|
|
1827
1827
|
font-family: ${l.theme.typography.fontFamily};
|
|
@@ -1897,7 +1897,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1897
1897
|
transform: translate(5px, 0);
|
|
1898
1898
|
height: 34px;
|
|
1899
1899
|
width: 34px;
|
|
1900
|
-
`,GE=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"})),
|
|
1900
|
+
`,GE=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"})),Sr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:a,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:d,tableChangeHandler:f,checkboxChangeHandler:g,...y})=>{const{validation:C,helperText:b,id:h,label:p,name:m,type:x,validateOnBlur:E=!0,validateOnChange:I=!0,isRequired:v,labelSpacing:_=1,showGlobalLoader:A=!1,hideHelperText:S=!1,meta:{isExpandable:L=x==="table",isExpanded:N=!0}={}}=y,[D,F]=w.useState(!1),[M,B]=w.useState(""),[V,Y]=w.useState(N);w.useEffect(()=>{D||H(y.value,!1)},[D,y.value]);const W=j=>{var oe;j&&!D&&F(!0),(oe=y.onFocus)==null||oe.call(y,j)};function H(j,oe=!0,_e){let z="";const Pe=j==null||j===""||Array.isArray(j)&&j.length===0;if((C!=null&&C.isRequired||v)&&(z=Pe?C1:"",Pe&&typeof(C==null?void 0:C.isRequired)=="function")){const Ee=C.isRequired(j);Ee&&typeof Ee=="boolean"?z=C1:Ee&&(z=Ee)}let We={id:h,name:m,label:p};if(y.type==="date"?We={...We,disableFuture:y.disableFuture,disablePast:y.disablePast}:y.type==="number"?We={...We,min:y.min,max:y.max}:y.type==="text"&&y.multiline&&(We={...We,maxCharacters:y.maxCharacters}),j&&!z&&(C!=null&&C.validate)){const Ee=C.validate(j,{...We,..._e});typeof Ee=="boolean"&&Ee===!1?z=lE:typeof Ee=="string"&&(z=Ee)}oe&&B(z),a==null||a(m,z,oe)}const q=j=>{var oe;D||F(!0),(oe=y.onBlur)==null||oe.call(y,j),D&&E&&H(y.value)},Q=()=>S?null:y.helperText?u.jsx(F1,{children:b}):D&&M?u.jsx(F1,{className:"helper--error",children:M}):null,ee=j=>{j&&!D&&F(!0),i==null||i(j),D&&I&&H(j.target.value)},G=(j,oe)=>{j&&!D&&F(!0),g==null||g(j,oe),D&&I&&H(oe)},J=(j,oe)=>{c==null||c(j,oe),j&&!D&&F(!0),D&&I&&(Array.isArray(j)?H(j):j&&typeof j=="object"&&"value"in j&&H(j.value))},R=(j,oe)=>{d==null||d(m,j,oe),j&&!D&&F(!0),D&&I&&H(j)},X=j=>{f==null||f(m,j)},K=(j,oe)=>{D&&(a==null||a(j,oe),B(typeof oe=="string"?oe:""))},ne=j=>{Y(oe=>!oe)},le=j=>{if(A)return u.jsx(l.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(j.type){case"select":return u.jsx(k1,{children:u.jsx(bs,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&D?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:J,onFocus:W,menuPortalTarget:n})});case"async-select":return u.jsx(k1,{children:u.jsx(CE,{...j,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&D?"formField__select--error":""} ${j.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:J,onFocus:W,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return u.jsx(OE,{...j,label:void 0,onBlur:q,onFocus:W,onChange:R,error:!!(M&&D)});case"table":return u.jsx(oi,{...j,value:j.value,onChange:X,onFocus:W,onValidationError:K,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return u.jsx(T1,{...j,checked:!!j.value,onChange:G,onFocus:W,onBlur:q});default:return u.jsx(ME,{variant:"outlined",fullWidth:!0,id:h,...j,value:j.value,label:void 0,onBlur:q,onChange:ee,onFocus:W,error:!!(M&&D),inputProps:{type:j.type,min:j.min,max:j.max,...j.inputProps}})}};return u.jsxs(BE,{spacing:_,useFlexGap:!0,...L&&{className:`expandable ${V?"open":"close"}`},children:[u.jsx(L1,{label:p,htmlFor:h,isRequired:!!(C!=null&&C.isRequired)||v,prefixNode:L?u.jsx(PE,{children:u.jsx(GE,{className:"arrow-icon"})}):null,...L&&{onClick:()=>ne()}}),u.jsxs(jE,{className:"input-wrapper",children:[u.jsx(l.Tooltip,{title:y.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:le(y)}),r!=null&&r.icon?u.jsx(l.Tooltip,{title:r.toolTipText,placement:"bottom",children:u.jsx(VE,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),Q()]})},HE=l.styled(l.Stack)`
|
|
1901
1901
|
& .authform__section-title {
|
|
1902
1902
|
margin-top: 32px;
|
|
1903
1903
|
margin-bottom: -12px;
|
|
@@ -1916,7 +1916,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1916
1916
|
--include-width: calc(var(--cols) * var(--field-width));
|
|
1917
1917
|
width: calc(var(--include-width) + var(--include-gap));
|
|
1918
1918
|
max-width: 100%;
|
|
1919
|
-
`,
|
|
1919
|
+
`,D1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:d,onValidationError:f,stackIndex:g,sectionSpacing:y=3,fieldsSpacing:C=3,labelSpacing:b=1,fetchConfig:h,createConfig:p,showGlobalLoader:m=!1,cols:x=1})=>{const E=I=>(v,_)=>{n==null||n(v,_,I)};return u.jsx(HE,{spacing:y,children:e.map(({id:I,title:v,formFields:_})=>_.every(S=>S.hideInUI)?null:u.jsxs(w.Fragment,{children:[v&&_.length?u.jsx(l.Typography,{variant:"h3",className:"authform__section-title",children:v}):null,u.jsx(WE,{useFlexGap:!0,spacing:C,cols:x,children:_.map(S=>{var L;return i&&typeof i=="object"&&S.name in i&&i[S.name]===!1||S.hideInUI?null:u.jsx(ZE,{cols:S.cols??1,children:u.jsx(Sr,{value:c==null?void 0:c[S.name],data:c,...S,stackIndex:g,selectChangeHandler:E(S),inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,validation:d==null?void 0:d[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:m})},((L=h==null?void 0:h[S.name])==null?void 0:L.key)||S.name)})})]},I))})},zE=l.styled(l.Box)`
|
|
1920
1920
|
width: 100%;
|
|
1921
1921
|
aspect-ratio: ${({aspectRatio:e})=>e};
|
|
1922
1922
|
border-radius: 8px;
|
|
@@ -1940,7 +1940,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1940
1940
|
width: 40px;
|
|
1941
1941
|
height: 40px;
|
|
1942
1942
|
}
|
|
1943
|
-
`,XE=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"})))),YE=({aspectRatio:e="auto",...t})=>{const[n,r]=w.useState(!1);return n?null:u.jsxs(zE,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(XE,{className:"play-icon"})]})},
|
|
1943
|
+
`,XE=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"})))),YE=({aspectRatio:e="auto",...t})=>{const[n,r]=w.useState(!1);return n?null:u.jsxs(zE,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(XE,{className:"play-icon"})]})},N1=l.styled(({className:e,...t})=>u.jsx(l.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${l.tooltipClasses.arrow}`]:{...t},[`& .${l.tooltipClasses.tooltip}`]:{...e}}));function JE(e){return!!e.interfaceDetails||!!e.searchInterfaceDetails}const si=e=>!!e&&typeof e=="object"&&"value"in e&&"label"in e,R1=e=>typeof e=="string"&&e.startsWith("{{")&&e.endsWith("}}")&&e.includes("."),qE=e=>{if(!e||!R1(e.value))return null;const t=String(e.value).replace(/\{|\}/g,"").split("."),n=e.label.split(".");return{name:n[0],id:t[0],option:{label:n[1],value:t[1]}}},M1=e=>e?{label:`${e.name} > ${e.option.label}`,value:`{{${e.name}.${e.option.label}}}`}:null,QE=/\{\{([^}]*)\}\}/g,$E=/^[^{^}]+$/,UE="Invalid variable format. Please check inserted variables.",KE="Variable open brackets present. Please remove open brackets",ev=e=>{let t=0,n=0;for(let r=0;r<e.length;r++){const o=e[r]+e[r+1];o==="{{"&&t++,o==="}}"&&n++}return t===n},tv=e=>{if(!e)return;const t=e.matchAll(QE);for(const[,n]of[...t])if(!$E.test(n))return UE;if(!ev(e))return KE},nv=e=>{if(!e||e.includes("{{")&&e.includes("}}"))return;const t=new Date(e),n=/^\d{4}-\d{2}-\d{2}$/;if(isNaN(t.getTime())||!n.test(e))return"Invalid date format. Required date format is YYYY-MM-DD"},rv=({argsMap:e,optionalArgsMap:t,data:n})=>{const{args:r,enabled:o}=w.useMemo(()=>{const s={};for(const a in e){const i=e[a],c=n[i];if(!c)return{args:{},enabled:!1};s[a]=si(c)?c.value:c}for(const a in t){const i=t[a],c=n[i];s[a]=si(c)?c.value:c,s[a]||(s[a]=null)}return{args:s,enabled:!0}},[e,t,n]);return{args:r,enabled:o}},ov=({args:e,enabled:t,searchTerm:n,pagination:r,queryKey:o,debounceTime:s=500,fetchOptions:a})=>{const[i,c]=w.useState({args:e,enabled:t,searchTerm:n,pagination:r});w.useEffect(()=>{const x=setTimeout(()=>{c({args:e,enabled:t,searchTerm:n,pagination:r})},s);return()=>clearTimeout(x)},[e,t,n,r,s]);const d=w.useMemo(()=>{var x,E;return{searchTerm:i.searchTerm,limit:((x=i.pagination)==null?void 0:x.limit)??10,enabled:((E=i.pagination)==null?void 0:E.enabled)??!1}},[i]),{data:f,isLoading:g,isError:y,isFetching:C,isFetchingNextPage:b,hasNextPage:h,fetchNextPage:p}=kg({queryKey:["fetch-options",o,i.args,d],queryFn:({pageParam:x})=>a({args:i.args,pagination:{...d,pageNumber:x}}),getNextPageParam:(x,E)=>x.hasMore?E.length+1:void 0,initialPageParam:1,enabled:i.enabled,refetchOnMount:!0});return{options:w.useMemo(()=>(f==null?void 0:f.pages.flatMap(x=>x.options))??[],[f]),isLoading:g,isError:y,isFetching:C,isFetchingNextPage:b,hasNextPage:h,fetchNextPage:p}},Ol=e=>e instanceof Element,sv=({onIntersect:e,threshold:t,rootMargin:n,enabled:r=!0})=>{const[o,s]=w.useState(!1),a=w.useRef(null),i=w.useRef(null),c=w.useRef(e);c.current=e;const d=w.useCallback(g=>{Ol(g)&&(i.current||(i.current=new IntersectionObserver(y=>{var b;const C=y[y.length-1];C.isIntersecting&&((b=c.current)==null||b.call(c,C))},{root:g,threshold:t,rootMargin:n}),s(!0)))},[t,n]),f=w.useCallback(g=>{var y,C;Ol(a.current)&&((y=i.current)==null||y.unobserve(a.current)),Ol(g)&&r&&o&&((C=i.current)==null||C.observe(g))},[r,o]);return w.useEffect(()=>()=>{i.current&&(i.current.disconnect(),i.current=null)},[]),{parentRef:d,childRef:f}},j1=({value:e,isMulti:t=!1,interfaceDetails:n,formData:r,fieldKey:o,hasApiSearch:s,fetchOptions:a})=>{var _;const[i,c]=w.useState(""),{selectedOption:d,selectedOptions:f,selectedValue:g,selectedValues:y}=w.useMemo(()=>{if(t){const A=Array.isArray(e)?e.filter(si):[];return{selectedOption:null,selectedOptions:A,selectedValue:void 0,selectedValues:A.map(S=>S.value)}}return si(e)?{selectedOption:e,selectedOptions:[],selectedValue:e.value,selectedValues:[]}:{selectedOption:null,selectedOptions:[],selectedValue:Array.isArray(e)?void 0:e,selectedValues:[]}},[e,t]),{args:C,enabled:b}=rv({argsMap:n==null?void 0:n.args,optionalArgsMap:n==null?void 0:n.optionalArgs,data:r}),h=ov({args:C,enabled:b,queryKey:o,searchTerm:s?i:"",pagination:n==null?void 0:n.pagination,fetchOptions:a}),p=h.options,m=!!((_=n==null?void 0:n.pagination)!=null&&_.enabled),x=m&&!!h.hasNextPage,E=sv({onIntersect:()=>h.fetchNextPage(),threshold:.1,enabled:x}),I=w.useMemo(()=>{const A=t?f:d?[d]:[];let S=p;if(A.length){const N=new Set(A.map(D=>D.value));S=[...A,...p.filter(D=>!N.has(D.value))]}const L=i.trim().toLowerCase();return!L||s?S:S.filter(N=>String(N.label).toLowerCase().includes(L))},[p,i,d,f,s,t]),v=w.useMemo(()=>{const A={};for(const S of f)A[S.value]=S.label;d&&(A[d.value]=d.label);for(const S of p)A[S.value]=S.label;return A},[p,f,d]);return{selectedOption:d,selectedOptions:f,selectedValue:g,selectedValues:y,search:i,optionsProps:h,observerProps:E,filteredOptions:I,labelsMap:v,paginationEnabled:m,setSearch:c}},av=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"})),iv={borderRadius:"8px",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",mt:.5,backgroundColor:"#FFFFFF"},cv={maxHeight:280,overflow:"auto",paddingTop:0,paddingBottom:1},lv={lineHeight:1,padding:"12px 12px 8px",backgroundColor:"#FFFFFF"},uv={display:"flex",alignItems:"center",gap:"4px",padding:"8px",border:"1px solid #ECEFF6",borderRadius:"6px",width:"100%",boxSizing:"border-box"},dv={flex:1,minWidth:0,fontSize:13,lineHeight:"18px","& .MuiInputBase-input":{padding:0,"&::placeholder":{color:"#97A3B7",opacity:1}}},P1={fontSize:"14px",width:"100%",minWidth:200,height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"& .MuiSelect-select":{display:"flex",alignItems:"center",paddingLeft:"12px",paddingRight:"8px"},"& .MuiSelect-icon":{color:"#97A3B7"}},fv={...P1,height:"auto",minHeight:"40px","& .MuiSelect-select":{display:"flex",alignItems:"center",minHeight:"40px !important",boxSizing:"border-box !important",padding:"6px 12px"},"& .MuiSelect-icon":{color:"#97A3B7"}},pv={display:"flex",flexWrap:"wrap",gap:"6px",alignItems:"center",width:"100%",marginLeft:"-6px"},hv={height:28,boxSizing:"border-box !important",borderRadius:"4px",backgroundColor:"#EBECF0",color:"#3E4C5A",fontSize:13,lineHeight:14,fontWeight:400,maxWidth:"100%","&:hover":{backgroundColor:"#EBECF0"},"& .MuiChip-label":{paddingLeft:"8px",paddingRight:"4px"},"& .MuiChip-deleteIcon":{fontSize:15,color:"#3E4C5A",margin:"0 6px 0 0","&:hover":{color:"#1A1F24"}}},gv=e=>({fontSize:14,lineHeight:"20px",minHeight:36,py:1,pl:2,pr:2.5,mx:0,borderRadius:"4px",color:"#343C45",backgroundColor:e?"#F6F8FC":"transparent","&:hover":{backgroundColor:"#F6F8FC"},"&.Mui-selected":{backgroundColor:"#F6F8FC","&:hover":{backgroundColor:"#F6F8FC"}}}),B1=l.styled(l.Box)`
|
|
1944
1944
|
height: 28px;
|
|
1945
1945
|
width: 28px;
|
|
1946
1946
|
border-radius: 50%;
|
|
@@ -1972,7 +1972,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1972
1972
|
&:after {
|
|
1973
1973
|
transform: translate(-50%, -50%) rotate(-45deg);
|
|
1974
1974
|
}
|
|
1975
|
-
`,
|
|
1975
|
+
`,V1=String(Symbol("_no_results")),G1=({selectedValue:e,selectedValues:t=[],isMulti:n=!1,search:r,searchPlaceholder:o,paginationEnabled:s,filteredOptions:a,observerProps:{childRef:i},optionsProps:{options:c,isLoading:d,isFetchingNextPage:f,hasNextPage:g},searchOffset:y=0,setSearch:C})=>{const b=new Set(t.map(String)),h=d&&c.length===0,p=s&&g&&!h&&!r,m=u.jsx(l.ListSubheader,{sx:lv,style:{top:y},children:u.jsxs(l.Box,{sx:uv,children:[u.jsx(l.icons.Search,{sx:{fontSize:18,color:l.theme.palette.gray.gray3,flexShrink:0}}),u.jsx(l.InputBase,{autoFocus:!0,placeholder:o,value:r,onChange:I=>C(I.target.value),onKeyDown:I=>{I.key!=="Escape"&&I.stopPropagation()},sx:dv})]})}),x=h?u.jsx(l.MenuItem,{disabled:!0,sx:{justifyContent:"center",opacity:1,minHeight:120,cursor:"default"},children:u.jsx(l.CircularProgress,{size:24})}):a.length===0?u.jsx(l.MenuItem,{disabled:!0,value:V1,sx:{opacity:1,color:l.theme.palette.gray.gray3},children:u.jsx(l.Typography,{variant:"body2",fontSize:14,children:"No results found"})}):a.map(I=>{const v=String(I.value),_=n?b.has(v):v===e;return u.jsxs(l.MenuItem,{value:v,sx:gv(_),children:[u.jsx("span",{children:I.label}),_?u.jsx(av,{fill:"#97A3B7",style:{marginLeft:"auto"}}):null]},v)}),E=p?u.jsx(l.MenuItem,{disabled:!0,disableRipple:!0,tabIndex:-1,ref:i,sx:{justifyContent:"center",minHeight:40,opacity:1,cursor:"default"},children:f?u.jsx(l.CircularProgress,{size:20}):u.jsx(l.Box,{sx:{minHeight:1,width:"100%"},"aria-hidden":!0})}):null;return[m,x,E]},H1=String(Symbol("_no_results")),mv=e=>!!e&&typeof e=="object"&&"label"in e&&"value"in e,bv=({fieldKey:e,value:t,isMulti:n=!1,placeholder:r="Select",searchPlaceholder:o="Search",disabled:s=!1,menuZIndex:a=1600,interfaceDetails:i,formData:c,hasApiSearch:d=!1,onChange:f,fetchOptions:g})=>{const{selectedValue:y,selectedValues:C,selectedOptions:b,search:h,optionsProps:p,observerProps:m,filteredOptions:x,labelsMap:E,paginationEnabled:I,setSearch:v}=j1({value:t,isMulti:n,interfaceDetails:i,formData:c,fieldKey:e,hasApiSearch:d,fetchOptions:g}),{parentRef:_}=m,A=w.useMemo(()=>mv(t)?t.label:E[String(t)]??String(t),[E,t]),S=F=>{const M=F.target.value;if(n){const Y=(Array.isArray(M)?M:[M]).map(String).filter(W=>W!==H1).map(W=>b.find(q=>String(q.value)===W)??{value:W,label:E[W]??W});f(Y);return}const B=String(M);B!==H1&&f({value:B,label:E[B]})},L=F=>{f(b.filter(M=>String(M.value)!==String(F)))},N=n?C.length>0:!!y,D=()=>n?b.length?u.jsx(l.Box,{sx:pv,children:b.map(F=>u.jsx(l.Chip,{label:F.label,size:"small",sx:hv,onMouseDown:M=>M.stopPropagation(),onDelete:()=>L(F.value),deleteIcon:u.jsx(l.icons.Close,{onMouseDown:M=>M.stopPropagation()})},String(F.value)))}):u.jsx(l.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:l.theme.palette.gray.gray4},children:r}):t===""?u.jsx(l.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:l.theme.palette.gray.gray4},children:r}):u.jsx(l.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:l.theme.palette.gray.gray1},children:A});return u.jsx(l.FormControl,{fullWidth:!0,disabled:s,sx:{m:0,minWidth:0},children:u.jsx(l.Select,{displayEmpty:!0,multiple:n,value:n?C.map(String):y,variant:"outlined",size:"small",sx:n?fv:P1,onChange:S,onClose:()=>v(""),renderValue:D,endAdornment:N&&!n?u.jsx(B1,{onClick:()=>f(n?[]:void 0)}):null,MenuProps:{autoFocus:!1,sx:{zIndex:a},PaperProps:{sx:iv},MenuListProps:{sx:cv,ref:_}},children:G1({selectedValue:y,selectedValues:C,isMulti:n,search:h,searchPlaceholder:o,paginationEnabled:I,filteredOptions:x,observerProps:m,optionsProps:p,setSearch:v})})})},yv=l.styled(l.TextField)`
|
|
1976
1976
|
width: 100%;
|
|
1977
1977
|
& input {
|
|
1978
1978
|
padding: 10px 12px !important;
|
|
@@ -2015,18 +2015,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2015
2015
|
overflow: hidden;
|
|
2016
2016
|
text-overflow: ellipsis;
|
|
2017
2017
|
padding-top: 2px;
|
|
2018
|
-
`,Cv=e=>{const t=n=>{var o;const r=n.target;r&&((o=e.onChange)==null||o.call(e,r.value))};return u.jsx(yv,{...e,variant:"outlined",onChange:t,...e.multiline?{rows:4}:null})},
|
|
2018
|
+
`,Cv=e=>{const t=n=>{var o;const r=n.target;r&&((o=e.onChange)==null||o.call(e,r.value))};return u.jsx(yv,{...e,variant:"outlined",onChange:t,...e.multiline?{rows:4}:null})},W1=()=>{const[e,t]=w.useState(null),[n,r]=w.useState(null),o=w.useRef(null);return{activeField:e,anchorEl:n,onEnter:i=>{o.current&&clearTimeout(o.current),i&&(t(i.field),r(i.currentTarget))},onLeave:()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{t(null),r(null)},100)}}},Ev={borderRadius:"8px",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",mt:.5,backgroundColor:"#FFFFFF",minWidth:337},vv={maxHeight:280,overflow:"auto",paddingTop:0,paddingBottom:1},wv={lineHeight:1,padding:"12px 12px 2px",backgroundColor:"#FFFFFF",position:"sticky",top:0,zIndex:2},Iv={m:0,minWidth:0,width:"100%"},_v={fontSize:"14px",width:"100%",minWidth:200,height:"40px",boxSizing:"border-box !important",background:"#F6F8FC",borderRadius:"8px",fontWeight:500,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"},"& .MuiSelect-select":{display:"flex",alignItems:"center",paddingLeft:"12px",paddingRight:"8px"},"& .MuiSelect-icon":{color:"#97A3B7"}},Sv={fontSize:14,lineHeight:"18px",minHeight:36,py:.75,pl:2,pr:1.5,color:"#343C45",display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,boxSizing:"border-box"},Av=e=>({...Sv,backgroundColor:e?"#F6F8FC":"transparent",cursor:"pointer",fontWeight:400,"&:hover":{backgroundColor:"#F6F8FC"}}),Tv={display:"grid",gridTemplateColumns:"1fr 1fr",alignItems:"center",backgroundColor:"#F6F8FC",borderRadius:"8px",padding:"3px"},Z1=e=>({border:"none",borderRadius:"8px",backgroundColor:e?"#FFFFFF":"transparent",color:e?"#196fe0":"#343C45",lineHeight:"24px",padding:"4px 12px",cursor:"pointer"}),Lv={fontSize:12,color:"#6F7C90",flexShrink:0},Ov={display:"flex",flexDirection:"column",alignItems:"stretch",py:0},kv=e=>({fontSize:14,fontWeight:400,lineHeight:"18px",minHeight:36,py:.75,px:1.5,pl:2,pr:1.5,color:"#343C45",textTransform:"none",justifyContent:"flex-start",backgroundColor:e?"#F6F8FC":"transparent","&:hover":{backgroundColor:"#F6F8FC"}}),Fv={color:"#97A3B7",fontSize:13,px:2,py:1.5},Dv=l.styled(l.Stack)`
|
|
2019
2019
|
flex-flow: row nowrap;
|
|
2020
2020
|
align-items: center;
|
|
2021
2021
|
color: #343c45;
|
|
2022
2022
|
font-size: 14px;
|
|
2023
2023
|
min-height: 36px;
|
|
2024
|
-
`,
|
|
2024
|
+
`,ai=l.styled(l.Typography)`
|
|
2025
2025
|
font-size: 14px;
|
|
2026
2026
|
line-height: 36px;
|
|
2027
2027
|
min-height: 36px;
|
|
2028
2028
|
text-align: center;
|
|
2029
|
-
`,Nv=l.Popper,
|
|
2029
|
+
`,Nv=l.Popper,z1=({name:e,customValue:t,popperOpen:n,anchorEl:r,zIndex:o,activeField:s,onEnter:a,onLeave:i,onChange:c})=>u.jsx(Nv,{id:`${e}-popper`,open:n,anchorEl:r,placement:"left-end",modifiers:[{name:"offset",options:{offset:[0,2]}}],sx:{zIndex:o+10},children:u.jsx(l.Paper,{elevation:3,sx:{width:200,maxHeight:"200px",overflow:"auto",borderRadius:"4px"},onPointerEnter:()=>a(),onPointerLeave:()=>i(),children:s&&s.options.length>0?u.jsx(l.Box,{role:"list",sx:Ov,children:s.options.map(d=>{var g;const f=(t==null?void 0:t.name)===s.name&&((g=t==null?void 0:t.option)==null?void 0:g.value)===d.value;return u.jsx(l.Button,{size:"small",fullWidth:!0,variant:"text",sx:kv(f),onClick:()=>c({name:s.name,id:s.id,option:d}),children:d.label},d.value)})}):s&&s.options.length===0?u.jsx(l.Box,{sx:Fv,children:"No options"}):null})}),Rv=1600,Mv={POPPER:3e3},jv=l.styled(l.Stack)`
|
|
2030
2030
|
flex-direction: column;
|
|
2031
2031
|
align-items: flex-start;
|
|
2032
2032
|
box-shadow: 0px 3px 15px 0px #00000040;
|
|
@@ -2036,7 +2036,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2036
2036
|
overflow-y: auto;
|
|
2037
2037
|
overflow-x: hidden;
|
|
2038
2038
|
padding: 8px 0 16px;
|
|
2039
|
-
`,
|
|
2039
|
+
`,X1=l.styled(l.Box)`
|
|
2040
2040
|
padding: 8px 20px;
|
|
2041
2041
|
width: 100%;
|
|
2042
2042
|
flex-shrink: 0;
|
|
@@ -2050,7 +2050,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2050
2050
|
&:hover {
|
|
2051
2051
|
background-color: ${({theme:e})=>{var t,n;return((n=(t=e.palette)==null?void 0:t.gray)==null?void 0:n.gray6)||"#f5f5f5"}};
|
|
2052
2052
|
}
|
|
2053
|
-
`,
|
|
2053
|
+
`,Y1=l.styled(l.Typography)`
|
|
2054
2054
|
color: #343c45;
|
|
2055
2055
|
font-size: 14px;
|
|
2056
2056
|
font-weight: 400;
|
|
@@ -2109,13 +2109,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2109
2109
|
display: flex;
|
|
2110
2110
|
align-items: center;
|
|
2111
2111
|
justify-content: center;
|
|
2112
|
-
`,
|
|
2112
|
+
`,J1=l.styled(l.Typography)`
|
|
2113
2113
|
padding: 8px 20px;
|
|
2114
2114
|
color: #97a3b7;
|
|
2115
2115
|
font-size: 13px;
|
|
2116
2116
|
font-weight: 600;
|
|
2117
2117
|
line-height: 14px;
|
|
2118
|
-
`,Hv=({name:e,variables:t,customFields:n,onOptionClick:r})=>{const[o,s]=w.useState(""),a=w.useMemo(()=>t.filter(h=>h.title.toLowerCase().includes(o.toLowerCase())),[t,o]),{activeField:i,anchorEl:c,onEnter:d,onLeave:f}=H1(),g=h=>{var p;s(((p=h==null?void 0:h.target)==null?void 0:p.value)||"")},y=h=>{if(!h)return;const p=R1(h);r({title:(p==null?void 0:p.label)||"",value:p==null?void 0:p.value})},C=n&&n.length>0,b=!!i&&Array.isArray(i==null?void 0:i.options)&&i.options.length>0;return u.jsxs(jv,{children:[u.jsx(Vv,{value:o,onChange:g,InputProps:{startAdornment:u.jsx(Gv,{children:u.jsx(l.icons.Search,{sx:{fontSize:18,color:l.theme.palette.gray.gray3,flexShrink:0}})})},placeholder:"Search variables",variant:"outlined"}),C&&u.jsx(u.Fragment,{children:u.jsx(Y1,{variant:"body2_medium",children:"Variables"})}),a.map(({value:h,title:p},m)=>u.jsx(l.Tooltip,{title:p,placement:"top",arrow:!0,children:u.jsx(z1,{onClick:()=>r({title:p,value:h}),children:u.jsx(X1,{variant:"body2",children:p})})},`${p}-${h}-${m}`)),C&&u.jsxs(u.Fragment,{children:[u.jsx(Y1,{variant:"h2",children:"Custom Objects"}),n==null?void 0:n.map(({id:h,name:p,options:m})=>u.jsx(l.Tooltip,{title:p,placement:"top",arrow:!0,children:u.jsx(z1,{onPointerEnter:x=>{x.pointerType==="touch"||!m.length||d({field:{id:h,name:p,options:m},currentTarget:x.currentTarget})},onPointerLeave:x=>{x.pointerType==="touch"||!m.length||f()},sx:{cursor:m.length?"pointer":"default"},children:u.jsx(X1,{variant:"body2",children:p})})},h))]}),u.jsx(Z1,{name:e,customValue:null,popperOpen:b,anchorEl:c,zIndex:Mv.POPPER,activeField:i,onEnter:d,onLeave:f,onChange:y})]})},Wv=({setOpen:e})=>{const t=()=>{e(n=>!n)};return u.jsx(Pv,{onClick:t,tabIndex:0,children:u.jsx(l.icons.Add,{sx:{fontSize:"12px",color:"#4d596c"}})})},Zv=({name:e,variables:t,customFields:n,onOptionClick:r})=>{const[o,s]=w.useState(!1),a=i=>{s(!1),r(i)};return u.jsx(l.ClickAwayListener,{onClickAway:()=>{s(!1)},children:u.jsx(l.Box,{children:u.jsx(l.Tooltip,{title:u.jsx(Hv,{name:e,variables:t,customFields:n,onOptionClick:a}),placement:"bottom-end",arrow:!1,open:o,PopperProps:{sx:{"& .MuiTooltip-popper":{zIndex:2e3},"& .MuiTooltip-tooltip":{backgroundColor:"transparent",color:"inherit",padding:0,boxShadow:"none",fontSize:"inherit"}}},children:u.jsx(l.Box,{children:u.jsx(Wv,{setOpen:s})})})})})},zv=()=>{const e=w.useRef(0),t=w.useRef(null);return{onBlur:s=>{var i;const a=((i=s==null?void 0:s.target)==null?void 0:i.selectionStart)??0;e.current=a},inputRef:t,focusInput:(s=0)=>{var d;const a=t.current;if(!a)return;const i=e.current+s;(d=a.focus)==null||d.call(a),(window.requestAnimationFrame??window.setTimeout)(()=>{var f;(f=a.setSelectionRange)==null||f.call(a,i,i)})},insertVariable:(s,a)=>{const i=e.current;return s.slice(0,i)+a+s.slice(i)}}},Xv=({name:e,type:t,value:n,label:r,variables:o,hasError:s,limit:a,multiline:i=!1,customFields:c,isRequired:d=!1,onChange:f,setError:g})=>{const{onBlur:y,inputRef:C,focusInput:b,insertVariable:h}=zv(),p=t==="date"?o.filter(I=>I.isDate):o,m=I1(I=>{let v=tv(I);t==="date"&&(v=nv(I)),d&&!I&&(v=`${r} is required`),g(v)},1e3),x=I=>{f(I),m(I)},E=({value:I})=>{const v=h(n,I);x(v),b(I==null?void 0:I.length)};return u.jsx(Cv,{inputRef:C,value:n,onChange:x,onBlur:y,placeholder:"Value",hasError:s,limit:a,multiline:i,InputProps:{endAdornment:p.length>0?u.jsx(Bv,{style:{justifyContent:i?"flex-end":"center",padding:"10px"},children:u.jsx(Zv,{name:e,variables:p,customFields:c,onOptionClick:E})}):null}})},Yv=({name:e,value:t,placeholder:n,searchPlaceholder:r="Search",formData:o,interfaceDetails:s,customFields:a=[],className:i,hasApiSearch:c=!1,zIndex:d=3e3,fetchOptions:f,onChange:g})=>{const[y,C]=w.useState(!1),[b,h]=w.useState("options"),{activeField:p,anchorEl:m,onEnter:x,onLeave:E}=H1(),I=qE(t),{selectedValue:v,search:_,optionsProps:A,observerProps:S,filteredOptions:L,paginationEnabled:N,labelsMap:D,setSearch:F}=M1({value:I?void 0:t,interfaceDetails:s,formData:o,fieldKey:e,hasApiSearch:c,fetchOptions:f}),{parentRef:M}=S,B=q=>{const Q=R1(q);Q&&(g(Q),E(),C(!1))},V=q=>{const Q=String(q.target.value);if(Q===B1)return;const ee=D[Q];g({value:Q,label:ee}),E(),C(!1)},Y=q=>Q=>{Q.preventDefault(),Q.stopPropagation(),h(q),E()},W=b==="custom"&&Array.isArray(p==null?void 0:p.options)&&p.options.length>0,H=()=>{var ee;if(!t)return u.jsx(si,{children:n});const[q="",Q=""]=((ee=t.label)==null?void 0:ee.split(" > "))??[];return I?u.jsxs(Dv,{children:[u.jsx(si,{children:q}),u.jsx(l.icons.ChevronRightOutlined,{sx:{fontSize:"18px"}}),u.jsx(si,{children:Q})]}):u.jsx(si,{children:t.label})};return w.useEffect(()=>{if(!(t!=null&&t.value)||!y)return;const q=N1(t.value)?"custom":"options";h(q)},[t,y]),u.jsxs(l.FormControl,{fullWidth:!0,sx:Iv,className:i,children:[u.jsxs(l.Select,{id:e,displayEmpty:!0,value:v,variant:"outlined",size:"small",sx:_v,open:y,onOpen:()=>{C(!0),h("options")},onClose:()=>{C(!1),E()},renderValue:H,endAdornment:t?u.jsx(P1,{onClick:()=>g(null)}):null,MenuProps:{autoFocus:!1,sx:{zIndex:d},PaperProps:{sx:Ev},MenuListProps:{sx:vv,ref:M}},onChange:V,children:[u.jsx(l.ListSubheader,{sx:wv,children:u.jsxs(l.Box,{sx:Tv,children:[u.jsx(l.Box,{component:"button",type:"button",sx:W1(b==="options"),onClick:Y("options"),children:u.jsx(l.Typography,{variant:"caption",fontSize:14,fontWeight:400,color:"inherit",children:"Options"})}),u.jsx(l.Box,{component:"button",type:"button",sx:W1(b==="custom"),onClick:Y("custom"),children:u.jsx(l.Typography,{variant:"caption",fontSize:14,fontWeight:400,color:"inherit",children:"Custom Object"})})]})}),b==="options"?V1({selectedValue:v,search:_,searchPlaceholder:r,paginationEnabled:N,filteredOptions:L,observerProps:S,optionsProps:A,setSearch:F,searchOffset:52}):u.jsx(l.ListSubheader,{sx:{padding:"12px 0 0"},children:a.map(q=>{const Q=q.options.length>0;return u.jsxs(l.ListSubheader,{onPointerEnter:ee=>{ee.pointerType==="touch"||!Q||x({field:q,currentTarget:ee.currentTarget})},onPointerLeave:ee=>{ee.pointerType==="touch"||!Q||E()},sx:Av(Q&&(p==null?void 0:p.id)===q.id),"data-field-id":q.id,children:[u.jsx("span",{style:{minWidth:0,flex:1,textAlign:"left"},children:q.name}),Q?u.jsx(l.icons.PlayArrow,{sx:Lv}):null]},q.id)})})]}),u.jsx(Z1,{name:e,customValue:I,popperOpen:W,anchorEl:m,zIndex:d,activeField:p,onEnter:x,onLeave:E,onChange:B})]})},Jv=({field:e,formId:t,value:n,formValues:r,variables:o,customFields:s,errors:a,checkMandatory:i,customFieldsInDropdown:c,setError:d,fetchOptions:f,setFormValues:g,onFieldChange:y})=>{var v,_;const C=w.useMemo(()=>Xf(500),[]),b=A=>{g(S=>({...S,[e.name]:A})),C(()=>{y==null||y({name:e.name,value:A,type:e.type})})},h=a[e.name],p=h?u.jsx(l.Tooltip,{title:h,placement:"bottom",children:u.jsx(xv,{variant:"body2",fontSize:"13px",color:l.theme.palette.error.main,children:h})}):null,m=Array.isArray(s)&&s.length>0,x=e.type==="multi-select"||!!e.isMulti,E=m&&c&&!x?u.jsx(Yv,{customFields:s??[],interfaceDetails:e.interfaceDetails??e.searchInterfaceDetails,formData:r,fetchOptions:A=>f(A,{formId:t,fieldName:e.name}),name:e.name,value:n,placeholder:"Select object",hasApiSearch:!!e.searchInterfaceDetails,onChange:b}):u.jsx(bv,{fieldKey:`${t}-${e.name}`,isMulti:x,interfaceDetails:e.interfaceDetails??e.searchInterfaceDetails,value:n,fetchOptions:A=>f(A,{formId:t,fieldName:e.name}),disabled:e.disabled,placeholder:e.placeholder??"Select",menuZIndex:Rv,formData:r,hasApiSearch:!!e.searchInterfaceDetails,onChange:b}),I=JE(e)?E:u.jsx(Xv,{name:e.name,label:e.label,type:e.type,variables:o,value:r[e.name]??"",isRequired:i&&!!((v=e.validations)!=null&&v.isRequired),onChange:b,hasError:!!h,limit:(_=e.validations)==null?void 0:_.maxCharacters,multiline:e.type==="multiline",setError:A=>d({name:e.name,value:A}),customFields:s});return u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"4px",position:"relative",children:[I,p]})},qv=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 15 15",fill:"none",...e},T.createElement("g",{clipPath:"url(#clip0_833_38792)"},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4 2.52266C11.4 2.86744 11.537 3.1981 11.7808 3.4419C12.0246 3.68569 12.3552 3.82266 12.7 3.82266C13.0448 3.82266 13.3754 3.68569 13.6192 3.4419C13.863 3.1981 14 2.86744 14 2.52266C14 2.17788 13.863 1.84722 13.6192 1.60342C13.3754 1.35962 13.0448 1.22266 12.7 1.22266C12.3552 1.22266 12.0246 1.35962 11.7808 1.60342C11.537 1.84722 11.4 2.17788 11.4 2.52266ZM1 2.52266C1 2.86744 1.13696 3.1981 1.38076 3.44189C1.62456 3.68569 1.95522 3.82266 2.3 3.82266C2.64478 3.82266 2.97544 3.68569 3.21924 3.44189C3.46304 3.1981 3.6 2.86744 3.6 2.52266C3.6 2.17788 3.46304 1.84721 3.21924 1.60342C2.97544 1.35962 2.64478 1.22266 2.3 1.22266C1.95522 1.22266 1.62456 1.35962 1.38076 1.60342C1.13696 1.84721 1 2.17787 1 2.52266Z",fill:"#7853FF",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4 12.3449C11.4 12.6897 11.537 13.0204 11.7808 13.2642C12.0246 13.508 12.3552 13.6449 12.7 13.6449C13.0448 13.6449 13.3754 13.508 13.6192 13.2642C13.863 13.0204 14 12.6897 14 12.3449C14 12.0001 13.863 11.6695 13.6192 11.4257C13.3754 11.1819 13.0448 11.0449 12.7 11.0449C12.3552 11.0449 12.0246 11.1819 11.7808 11.4257C11.537 11.6695 11.4 12.0001 11.4 12.3449ZM1 12.3449C1 12.6897 1.13696 13.0204 1.38076 13.2642C1.62456 13.508 1.95522 13.6449 2.3 13.6449C2.64478 13.6449 2.97544 13.508 3.21924 13.2642C3.46304 13.0204 3.6 12.6897 3.6 12.3449C3.6 12.0001 3.46304 11.6695 3.21924 11.4257C2.97544 11.1819 2.64478 11.0449 2.3 11.0449C1.95522 11.0449 1.62456 11.1819 1.38076 11.4257C1.13696 11.6695 1 12.0001 1 12.3449Z",fill:"#7853FF",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M11.3984 2.52344L3.59844 2.52344L5.77656 2.52344",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M11.3984 12.3457L3.59844 12.3457L5.77656 12.3457",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_833_38792"},T.createElement("rect",{width:15,height:15,fill:"white",transform:"translate(15) rotate(90)"})))),kl={outer:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,bgcolor:"#f3ebff",p:"6px",borderRadius:"8px"},frame:{width:24,height:24,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center"},rotate:{display:"flex",alignItems:"center",justifyContent:"center",transform:"rotate(180deg)",transformOrigin:"center","& svg":{width:15,height:15,display:"block"}}},Qv=()=>u.jsx(l.Box,{"aria-hidden":!0,component:"span",sx:kl.outer,children:u.jsx(l.Box,{component:"span",sx:kl.frame,children:u.jsx(l.Box,{component:"span",sx:kl.rotate,children:u.jsx(qv,{})})})}),$v=l.styled("img")`
|
|
2118
|
+
`,Hv=({name:e,variables:t,customFields:n,onOptionClick:r})=>{const[o,s]=w.useState(""),a=w.useMemo(()=>t.filter(h=>h.title.toLowerCase().includes(o.toLowerCase())),[t,o]),{activeField:i,anchorEl:c,onEnter:d,onLeave:f}=W1(),g=h=>{var p;s(((p=h==null?void 0:h.target)==null?void 0:p.value)||"")},y=h=>{if(!h)return;const p=M1(h);r({title:(p==null?void 0:p.label)||"",value:p==null?void 0:p.value})},C=n&&n.length>0,b=!!i&&Array.isArray(i==null?void 0:i.options)&&i.options.length>0;return u.jsxs(jv,{children:[u.jsx(Vv,{value:o,onChange:g,InputProps:{startAdornment:u.jsx(Gv,{children:u.jsx(l.icons.Search,{sx:{fontSize:18,color:l.theme.palette.gray.gray3,flexShrink:0}})})},placeholder:"Search variables",variant:"outlined"}),C&&u.jsx(u.Fragment,{children:u.jsx(J1,{variant:"body2_medium",children:"Variables"})}),a.map(({value:h,title:p},m)=>u.jsx(l.Tooltip,{title:p,placement:"top",arrow:!0,children:u.jsx(X1,{onClick:()=>r({title:p,value:h}),children:u.jsx(Y1,{variant:"body2",children:p})})},`${p}-${h}-${m}`)),C&&u.jsxs(u.Fragment,{children:[u.jsx(J1,{variant:"h2",children:"Custom Objects"}),n==null?void 0:n.map(({id:h,name:p,options:m})=>u.jsx(l.Tooltip,{title:p,placement:"top",arrow:!0,children:u.jsx(X1,{onPointerEnter:x=>{x.pointerType==="touch"||!m.length||d({field:{id:h,name:p,options:m},currentTarget:x.currentTarget})},onPointerLeave:x=>{x.pointerType==="touch"||!m.length||f()},sx:{cursor:m.length?"pointer":"default"},children:u.jsx(Y1,{variant:"body2",children:p})})},h))]}),u.jsx(z1,{name:e,customValue:null,popperOpen:b,anchorEl:c,zIndex:Mv.POPPER,activeField:i,onEnter:d,onLeave:f,onChange:y})]})},Wv=({setOpen:e})=>{const t=()=>{e(n=>!n)};return u.jsx(Pv,{onClick:t,tabIndex:0,children:u.jsx(l.icons.Add,{sx:{fontSize:"12px",color:"#4d596c"}})})},Zv=({name:e,variables:t,customFields:n,onOptionClick:r})=>{const[o,s]=w.useState(!1),a=i=>{s(!1),r(i)};return u.jsx(l.ClickAwayListener,{onClickAway:()=>{s(!1)},children:u.jsx(l.Box,{children:u.jsx(l.Tooltip,{title:u.jsx(Hv,{name:e,variables:t,customFields:n,onOptionClick:a}),placement:"bottom-end",arrow:!1,open:o,PopperProps:{sx:{"& .MuiTooltip-popper":{zIndex:2e3},"& .MuiTooltip-tooltip":{backgroundColor:"transparent",color:"inherit",padding:0,boxShadow:"none",fontSize:"inherit"}}},children:u.jsx(l.Box,{children:u.jsx(Wv,{setOpen:s})})})})})},zv=()=>{const e=w.useRef(0),t=w.useRef(null);return{onBlur:s=>{var i;const a=((i=s==null?void 0:s.target)==null?void 0:i.selectionStart)??0;e.current=a},inputRef:t,focusInput:(s=0)=>{var d;const a=t.current;if(!a)return;const i=e.current+s;(d=a.focus)==null||d.call(a),(window.requestAnimationFrame??window.setTimeout)(()=>{var f;(f=a.setSelectionRange)==null||f.call(a,i,i)})},insertVariable:(s,a)=>{const i=e.current;return s.slice(0,i)+a+s.slice(i)}}},Xv=({name:e,type:t,value:n,label:r,variables:o,hasError:s,limit:a,multiline:i=!1,customFields:c,isRequired:d=!1,onChange:f,setError:g})=>{const{onBlur:y,inputRef:C,focusInput:b,insertVariable:h}=zv(),p=t==="date"?o.filter(I=>I.isDate):o,m=I1(I=>{let v=tv(I);t==="date"&&(v=nv(I)),d&&!I&&(v=`${r} is required`),g(v)},1e3),x=I=>{f(I),m(I)},E=({value:I})=>{const v=h(n,I);x(v),b(I==null?void 0:I.length)};return u.jsx(Cv,{inputRef:C,value:n,onChange:x,onBlur:y,placeholder:"Value",hasError:s,limit:a,multiline:i,InputProps:{endAdornment:p.length>0?u.jsx(Bv,{style:{justifyContent:i?"flex-end":"center",padding:"10px"},children:u.jsx(Zv,{name:e,variables:p,customFields:c,onOptionClick:E})}):null}})},Yv=({name:e,value:t,placeholder:n,searchPlaceholder:r="Search",formData:o,interfaceDetails:s,customFields:a=[],className:i,hasApiSearch:c=!1,zIndex:d=3e3,fetchOptions:f,onChange:g})=>{const[y,C]=w.useState(!1),[b,h]=w.useState("options"),{activeField:p,anchorEl:m,onEnter:x,onLeave:E}=W1(),I=qE(t),{selectedValue:v,search:_,optionsProps:A,observerProps:S,filteredOptions:L,paginationEnabled:N,labelsMap:D,setSearch:F}=j1({value:I?void 0:t,interfaceDetails:s,formData:o,fieldKey:e,hasApiSearch:c,fetchOptions:f}),{parentRef:M}=S,B=q=>{const Q=M1(q);Q&&(g(Q),E(),C(!1))},V=q=>{const Q=String(q.target.value);if(Q===V1)return;const ee=D[Q];g({value:Q,label:ee}),E(),C(!1)},Y=q=>Q=>{Q.preventDefault(),Q.stopPropagation(),h(q),E()},W=b==="custom"&&Array.isArray(p==null?void 0:p.options)&&p.options.length>0,H=()=>{var ee;if(!t)return u.jsx(ai,{children:n});const[q="",Q=""]=((ee=t.label)==null?void 0:ee.split(" > "))??[];return I?u.jsxs(Dv,{children:[u.jsx(ai,{children:q}),u.jsx(l.icons.ChevronRightOutlined,{sx:{fontSize:"18px"}}),u.jsx(ai,{children:Q})]}):u.jsx(ai,{children:t.label})};return w.useEffect(()=>{if(!(t!=null&&t.value)||!y)return;const q=R1(t.value)?"custom":"options";h(q)},[t,y]),u.jsxs(l.FormControl,{fullWidth:!0,sx:Iv,className:i,children:[u.jsxs(l.Select,{id:e,displayEmpty:!0,value:v,variant:"outlined",size:"small",sx:_v,open:y,onOpen:()=>{C(!0),h("options")},onClose:()=>{C(!1),E()},renderValue:H,endAdornment:t?u.jsx(B1,{onClick:()=>g(null)}):null,MenuProps:{autoFocus:!1,sx:{zIndex:d},PaperProps:{sx:Ev},MenuListProps:{sx:vv,ref:M}},onChange:V,children:[u.jsx(l.ListSubheader,{sx:wv,children:u.jsxs(l.Box,{sx:Tv,children:[u.jsx(l.Box,{component:"button",type:"button",sx:Z1(b==="options"),onClick:Y("options"),children:u.jsx(l.Typography,{variant:"caption",fontSize:14,fontWeight:400,color:"inherit",children:"Options"})}),u.jsx(l.Box,{component:"button",type:"button",sx:Z1(b==="custom"),onClick:Y("custom"),children:u.jsx(l.Typography,{variant:"caption",fontSize:14,fontWeight:400,color:"inherit",children:"Custom Object"})})]})}),b==="options"?G1({selectedValue:v,search:_,searchPlaceholder:r,paginationEnabled:N,filteredOptions:L,observerProps:S,optionsProps:A,setSearch:F,searchOffset:52}):u.jsx(l.ListSubheader,{sx:{padding:"12px 0 0"},children:a.map(q=>{const Q=q.options.length>0;return u.jsxs(l.ListSubheader,{onPointerEnter:ee=>{ee.pointerType==="touch"||!Q||x({field:q,currentTarget:ee.currentTarget})},onPointerLeave:ee=>{ee.pointerType==="touch"||!Q||E()},sx:Av(Q&&(p==null?void 0:p.id)===q.id),"data-field-id":q.id,children:[u.jsx("span",{style:{minWidth:0,flex:1,textAlign:"left"},children:q.name}),Q?u.jsx(l.icons.PlayArrow,{sx:Lv}):null]},q.id)})})]}),u.jsx(z1,{name:e,customValue:I,popperOpen:W,anchorEl:m,zIndex:d,activeField:p,onEnter:x,onLeave:E,onChange:B})]})},Jv=({field:e,formId:t,value:n,formValues:r,variables:o,customFields:s,errors:a,checkMandatory:i,customFieldsInDropdown:c,setError:d,fetchOptions:f,setFormValues:g,onFieldChange:y})=>{var v,_;const C=w.useMemo(()=>Xf(500),[]),b=A=>{g(S=>({...S,[e.name]:A})),C(()=>{y==null||y({name:e.name,value:A,type:e.type})})},h=a[e.name],p=h?u.jsx(l.Tooltip,{title:h,placement:"bottom",children:u.jsx(xv,{variant:"body2",fontSize:"13px",color:l.theme.palette.error.main,children:h})}):null,m=Array.isArray(s)&&s.length>0,x=e.type==="multi-select"||!!e.isMulti,E=m&&c&&!x?u.jsx(Yv,{customFields:s??[],interfaceDetails:e.interfaceDetails??e.searchInterfaceDetails,formData:r,fetchOptions:A=>f(A,{formId:t,fieldName:e.name}),name:e.name,value:n,placeholder:"Select object",hasApiSearch:!!e.searchInterfaceDetails,onChange:b}):u.jsx(bv,{fieldKey:`${t}-${e.name}`,isMulti:x,interfaceDetails:e.interfaceDetails??e.searchInterfaceDetails,value:n,fetchOptions:A=>f(A,{formId:t,fieldName:e.name}),disabled:e.disabled,placeholder:e.placeholder??"Select",menuZIndex:Rv,formData:r,hasApiSearch:!!e.searchInterfaceDetails,onChange:b}),I=JE(e)?E:e.type==="checkbox"?u.jsx(T1,{type:"checkbox",name:e.name,checked:!!r[e.name],disabled:e.disabled,onChange:(A,S)=>b(S)}):u.jsx(Xv,{name:e.name,label:e.label,type:e.type,variables:o,value:r[e.name]??"",isRequired:i&&!!((v=e.validations)!=null&&v.isRequired),onChange:b,hasError:!!h,limit:(_=e.validations)==null?void 0:_.maxCharacters,multiline:e.type==="multiline",setError:A=>d({name:e.name,value:A}),customFields:s});return u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"4px",position:"relative",children:[I,p]})},qv=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:15,height:15,viewBox:"0 0 15 15",fill:"none",...e},T.createElement("g",{clipPath:"url(#clip0_833_38792)"},T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4 2.52266C11.4 2.86744 11.537 3.1981 11.7808 3.4419C12.0246 3.68569 12.3552 3.82266 12.7 3.82266C13.0448 3.82266 13.3754 3.68569 13.6192 3.4419C13.863 3.1981 14 2.86744 14 2.52266C14 2.17788 13.863 1.84722 13.6192 1.60342C13.3754 1.35962 13.0448 1.22266 12.7 1.22266C12.3552 1.22266 12.0246 1.35962 11.7808 1.60342C11.537 1.84722 11.4 2.17788 11.4 2.52266ZM1 2.52266C1 2.86744 1.13696 3.1981 1.38076 3.44189C1.62456 3.68569 1.95522 3.82266 2.3 3.82266C2.64478 3.82266 2.97544 3.68569 3.21924 3.44189C3.46304 3.1981 3.6 2.86744 3.6 2.52266C3.6 2.17788 3.46304 1.84721 3.21924 1.60342C2.97544 1.35962 2.64478 1.22266 2.3 1.22266C1.95522 1.22266 1.62456 1.35962 1.38076 1.60342C1.13696 1.84721 1 2.17787 1 2.52266Z",fill:"#7853FF",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.4 12.3449C11.4 12.6897 11.537 13.0204 11.7808 13.2642C12.0246 13.508 12.3552 13.6449 12.7 13.6449C13.0448 13.6449 13.3754 13.508 13.6192 13.2642C13.863 13.0204 14 12.6897 14 12.3449C14 12.0001 13.863 11.6695 13.6192 11.4257C13.3754 11.1819 13.0448 11.0449 12.7 11.0449C12.3552 11.0449 12.0246 11.1819 11.7808 11.4257C11.537 11.6695 11.4 12.0001 11.4 12.3449ZM1 12.3449C1 12.6897 1.13696 13.0204 1.38076 13.2642C1.62456 13.508 1.95522 13.6449 2.3 13.6449C2.64478 13.6449 2.97544 13.508 3.21924 13.2642C3.46304 13.0204 3.6 12.6897 3.6 12.3449C3.6 12.0001 3.46304 11.6695 3.21924 11.4257C2.97544 11.1819 2.64478 11.0449 2.3 11.0449C1.95522 11.0449 1.62456 11.1819 1.38076 11.4257C1.13696 11.6695 1 12.0001 1 12.3449Z",fill:"#7853FF",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M11.3984 2.52344L3.59844 2.52344L5.77656 2.52344",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("path",{d:"M11.3984 12.3457L3.59844 12.3457L5.77656 12.3457",stroke:"#7853FF",strokeWidth:1.3,strokeLinecap:"round",strokeLinejoin:"round"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_833_38792"},T.createElement("rect",{width:15,height:15,fill:"white",transform:"translate(15) rotate(90)"})))),kl={outer:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,bgcolor:"#f3ebff",p:"6px",borderRadius:"8px"},frame:{width:24,height:24,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center"},rotate:{display:"flex",alignItems:"center",justifyContent:"center",transform:"rotate(180deg)",transformOrigin:"center","& svg":{width:15,height:15,display:"block"}}},Qv=()=>u.jsx(l.Box,{"aria-hidden":!0,component:"span",sx:kl.outer,children:u.jsx(l.Box,{component:"span",sx:kl.frame,children:u.jsx(l.Box,{component:"span",sx:kl.rotate,children:u.jsx(qv,{})})})}),$v=l.styled("img")`
|
|
2119
2119
|
width: 16px;
|
|
2120
2120
|
height: auto;
|
|
2121
2121
|
object-fit: cover;
|
|
@@ -2175,7 +2175,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2175
2175
|
display: inline-block;
|
|
2176
2176
|
color: inherit;
|
|
2177
2177
|
}
|
|
2178
|
-
`,cw={borderRadius:"0 !important",padding:"0 !important",width:"max-content !important",maxWidth:"max-content !important",height:"100% !important",maxHeight:"100% !important",position:"fixed",boxSizing:"border-box !important",top:0,bottom:0,right:0,margin:0};function lw(e){return e.name??e.rowId}const uw=({open:e,onClose:t,formId:n,fields:r,variables:o,connectorLogo:s,isSaving:a,title:i,isLoading:c=!1,defaultValues:d,customFields:f,checkMandatory:g=!1,className:y,customFieldsInDropdown:C=!0,fetchOptions:b,onSave:h,onCancel:p,onFieldChange:m})=>{const[x,E]=w.useState({}),[I,v]=w.useState({}),[_,A]=w.useState(!1),S=w.useMemo(()=>Xf(500),[]),L=w.useMemo(()=>{if(!Array.isArray(r)||!r.length)return[];const V=new Set;return r.filter(W=>V.has(W.name)?!1:(V.add(W.name),!0)).sort((W,H)=>W.priority-H.priority)},[r]),N=({name:V,value:Y})=>{v(W=>{const H={...W};return Y?H[V]=Y:delete H[V],H})};w.useEffect(()=>{d&&e&&E({...d})},[d,e]),w.useEffect(()=>()=>{e||(E({}),v({}))},[e]),w.useEffect(()=>{g&&S(()=>{const Y=r.filter(W=>{var H;return!!((H=W.validations)!=null&&H.isRequired)}).filter(W=>!x[W.name]);A(Y.length>0)})},[S,x,r,g]);const D=()=>{t(),E({})},F=()=>{p==null||p(),E({}),t()},M=()=>{const V={...x};for(const Y in V)V[Y]||delete V[Y]
|
|
2178
|
+
`,cw={borderRadius:"0 !important",padding:"0 !important",width:"max-content !important",maxWidth:"max-content !important",height:"100% !important",maxHeight:"100% !important",position:"fixed",boxSizing:"border-box !important",top:0,bottom:0,right:0,margin:0};function lw(e){return e.name??e.rowId}const uw=({open:e,onClose:t,formId:n,fields:r,variables:o,connectorLogo:s,isSaving:a,title:i,isLoading:c=!1,defaultValues:d,customFields:f,checkMandatory:g=!1,className:y,customFieldsInDropdown:C=!0,fetchOptions:b,onSave:h,onCancel:p,onFieldChange:m})=>{const[x,E]=w.useState({}),[I,v]=w.useState({}),[_,A]=w.useState(!1),S=w.useMemo(()=>Xf(500),[]),L=w.useMemo(()=>{if(!Array.isArray(r)||!r.length)return[];const V=new Set;return r.filter(W=>V.has(W.name)?!1:(V.add(W.name),!0)).sort((W,H)=>W.priority-H.priority)},[r]),N=({name:V,value:Y})=>{v(W=>{const H={...W};return Y?H[V]=Y:delete H[V],H})};w.useEffect(()=>{d&&e&&E({...d})},[d,e]),w.useEffect(()=>()=>{e||(E({}),v({}))},[e]),w.useEffect(()=>{g&&S(()=>{const Y=r.filter(W=>{var H;return!!((H=W.validations)!=null&&H.isRequired)}).filter(W=>!x[W.name]);A(Y.length>0)})},[S,x,r,g]);const D=()=>{t(),E({})},F=()=>{p==null||p(),E({}),t()},M=()=>{const V={...x};for(const Y in V){const W=V[Y];(W===""||W===null||W===void 0)&&delete V[Y]}h(V)},B=Object.keys(I).length>0||_;return u.jsx(l.Dialog,{className:y,open:e,onClose:D,PaperProps:{sx:cw},maxWidth:!1,children:c?u.jsx(l.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"615px"},children:u.jsx(l.CircularProgress,{})}):u.jsxs(ew,{children:[u.jsxs(tw,{children:[u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:2,children:[u.jsx(Qv,{}),u.jsx(l.Stack,{gap:.5,flex:1,minWidth:0,children:u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:.5,children:[u.jsx(l.Typography,{variant:"h6",fontSize:18,fontWeight:600,color:l.theme.palette.gray.gray1,children:i}),u.jsx(l.Tooltip,{title:"Assign default values to create fields",placement:"top",children:u.jsx(l.IconButton,{size:"small","aria-label":"About mapping fields",sx:{padding:"4px"},children:u.jsx(l.icons.InfoOutlined,{sx:{fontSize:18,color:l.theme.palette.gray.gray3}})})})]})})]}),u.jsx(l.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(l.IconButton,{onClick:D,size:"small","aria-label":"Close",children:u.jsx(l.icons.Close,{sx:{fontSize:20}})})})]}),u.jsx(nw,{children:u.jsxs(rw,{children:[u.jsxs(l.Stack,{direction:"row",padding:"16px 24px",sx:{backgroundColor:l.theme.palette.gray.gray6a,borderBottom:"1px solid #ECEFF6",borderRadius:"8px 8px 0 0"},children:[u.jsx(Uv,{src:s,alt:"Connector"}),u.jsx(l.Typography,{variant:"caption",fontSize:14,fontWeight:600,color:l.theme.palette.gray.gray3,flex:1,children:"Field"}),u.jsx(l.Typography,{variant:"caption",fontSize:14,fontWeight:600,color:l.theme.palette.gray.gray3,width:320,children:"Map to"})]}),L.map((V,Y)=>{var q;const W=lw(V),H=x[W]??"";return u.jsxs(l.Stack,{direction:"row",alignItems:"center",padding:"24px",gap:2,sx:{borderBottom:Y<L.length-1?"1px solid #F6F8FC":void 0,"&:last-child":{borderBottom:"none"}},children:[u.jsx(aw,{children:u.jsxs(l.Typography,{variant:"body2",fontSize:14,color:l.theme.palette.gray.gray2,children:[V.label,g&&((q=V.validations)!=null&&q.isRequired)?u.jsx(iw,{}):null]})}),u.jsx(Kv,{width:20,height:20}),u.jsx(sw,{children:u.jsx(Jv,{field:V,formId:String(n),value:H,formValues:x,variables:o,customFields:f,errors:I,checkMandatory:g,customFieldsInDropdown:C,setError:N,fetchOptions:b,setFormValues:E,onFieldChange:m})})]},W)})]})}),u.jsxs(ow,{children:[u.jsx(l.Button,{variant:"contained",onClick:M,sx:{textTransform:"none",padding:"3px 32px !important"},disabled:a||B,children:"Save"}),u.jsx(l.Button,{variant:"outlined",color:"inherit",onClick:F,disabled:a,sx:{textTransform:"none",padding:"3px 12px !important",borderColor:l.theme.palette.gray.gray5},children:"Cancel"})]})]})})},dw=l.styled(l.Box)`
|
|
2179
2179
|
position: fixed;
|
|
2180
2180
|
inset: 0;
|
|
2181
2181
|
z-index: ${({zIndex:e})=>e};
|
|
@@ -2188,8 +2188,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2188
2188
|
border-radius: 10px;
|
|
2189
2189
|
pointer-events: auto;
|
|
2190
2190
|
box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
|
|
2191
|
-
`,pw=e=>e,hw=({open:e,targetRef:t,endElRef:n,padding:r=8,zIndex:o=1300,renderHighlight:s=pw,onClose:a})=>{const[i,c]=w.useState(null);if(w.useEffect(()=>{if(!e){c(null);return}const f=t.current;if(!f){c(null);return}const g=(n==null?void 0:n.current)||f,y=f.getBoundingClientRect(),C=g.getBoundingClientRect(),b=window.innerWidth,h=window.innerHeight,p=Math.max(0,y.left-r),m=Math.max(0,y.top-r),x=Math.min(h,y.bottom+r),E=Math.min(b,C.right+r),I=Math.max(0,E-p),v=Math.max(0,x-m);if(!I||!v){c(null);return}c({top:m,left:p,width:I,height:v,right:E,bottom:x})},[e,r,t,n]),!e||!i||typeof document>"u")return null;const d=u.jsx(fw,{top:i.top,left:i.left,width:i.width,height:i.height,onClick:f=>f.stopPropagation()});return $t.createPortal(u.jsx(dw,{zIndex:o,onClick:a,children:s(d)}),document.body)},Fl=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},gw=(e,t)=>t?Object.values(t).filter(r=>{if(e.errors[r])return!1;const o=e.values[r];return Array.isArray(o)?o.length>0:!!o}):[],ys=(e,t)=>t?Object.keys(t).reduce((r,o)=>{var c;let s="";const a=t[o],i=(c=e.values)==null?void 0:c[a];return Array.isArray(i)?(s=i.filter(d=>!!d&&typeof d=="object"&&"value"in d).map(d=>d.value),s=s.length>0?s:null):i&&typeof i=="object"&&"value"in i?s=i.value:i&&typeof i!="object"?s=i:s=null,{...r,[o]:s}},{}):{},Dl=({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=U6(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let d=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";d=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:d,t[n.name].validate=K6(d);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=e9();return}if(n.type==="text"&&n.limit){t[n.name].validate=el();return}if(n.type==="table"){const d=Dl({formFields:n.columns??[]});t[n.name].validations=d}if((i=n.validations)!=null&&i.isUrl){const d=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=Q6(d)}else if((c=n.validations)!=null&&c.isEmail){const d=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=$6(d)}}),t},ai={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[ri.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},xs=(e,t,n)=>Object.keys(t).reduce((r,o)=>{const s=e.values[t[o]];let a;return ai.isMultiSelect(s)?a=s.map(i=>i.value):ai.isTable(s)?a=s.map(({...c})=>(delete c[ri.ROW_ID],c)).filter(c=>Object.keys(c).length>0):ai.isSelect(s)?a=s.value:ai.isDate(s)?a=s.toISOString():n!=null&&n.has(t[o])?a=[]:a=s||"",r[o]=a,r},{}),mw=(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]}))},J1=(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=J1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},Yn="/v1/api",bw=`${Yn}/connectors/conversation/:conversationId/metadata`,yw=`${Yn}/connectors/forms/:formId/field/:fieldName/data`,xw=`${Yn}/connectors/form/:formId`,Cw=`${Yn}/connectors/forms/:id/link`,Ew=`${Yn}/connectors/forms/:id/preview`,vw=`${Yn}/connectors/conversation/:conversationId/selected-email`,ww=`${Yn}/connectors/app-cf-values`,Iw=`${Yn}/connectors/deferred-app-cf-values`,q1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ve({url:ot(`${yw}?${r.toString()}`,e),method:Le.POST,data:t})},_w=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ve({url:ot(`${xw}?${r.toString()}`,e),method:Le.POST,data:t})},Sw=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ve({url:`${Ew.replace(":id",e)}?${r.toString()}`,method:Le.POST,data:{args:t}})},Aw="https://avatars.githubusercontent.com/u/62397590",Q1={optionsMap:null,createOptionApi:te.IDLE,dropdownOptionsApis:te.IDLE,previewCardData:null,previewCardApiStatus:te.IDLE,selectedSuggestionType:"basic"},$1=Ea({name:"commonSlice",initialState:Q1,reducers:{resetState:()=>Q1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=te.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload},resetDropdownOptionsCache:e=>{e.optionsMap=null,e.dropdownOptionsApis=te.IDLE}},extraReducers:e=>{e.addCase(ii.pending,t=>{t.createOptionApi=te.LOADING}).addCase(ii.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=te.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(ii.rejected,t=>{t.createOptionApi=te.FAILED}).addCase(Or.pending,t=>{t.dropdownOptionsApis=te.LOADING}).addCase(Or.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=te.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(Or.rejected,t=>{t.dropdownOptionsApis=te.FAILED}).addCase(go.pending,t=>{t.previewCardApiStatus=te.LOADING}).addCase(go.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=te.IDLE}).addCase(go.rejected,t=>{t.previewCardApiStatus=te.FAILED})}}),ii=on("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var h,p,m;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:d={},callback:f}=e,g=Fl(c||{},s,r),{common:y}=t(),{options:C=[],...b}=((h=y.optionsMap)==null?void 0:h[g])||{};try{const x=await _w({fieldName:r,formId:a},{args:d,conversation_id:i});if(!x||!("data"in x)||!("output_variables"in x.data)||!("external_resource_id"in x.data.output_variables))throw x;const E=x.data.output_variables,{external_resource_id:I,...v}=E,A=[{label:o,value:I,prefillValues:v},...C],S=Wf(A,L=>L.value);return f==null||f(S),{optionsList:S,key:g,...b}}catch(x){f==null||f(C);const E=x,I=(p=E==null?void 0:E.response)==null?void 0:p.data,v=typeof I=="string"?I:(I==null?void 0:I.message)||Tn;return Ae({message:v,type:Ue}),n((m=E==null?void 0:E.response)==null?void 0:m.status)}}),Or=on("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:d="",pagination:f={enabled:!1},controller:g}=e,y=Fl(c||{},o,r),{common:C}=t();let b=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(b=a.meta.showAvatar);const h=((A=C.optionsMap)==null?void 0:A[y])||{},p=!e.isScrollToBottomEvent&&(!h||s!==h.searchTerm),m=p?[]:h.options||[],x=p?!0:h.hasMore??!0,E=p?0:h.currentPage??0,{enabled:I,limit:v}=f,_=v||10;try{let N;const D=g==null?void 0:g.signal,F=I?{pageNumber:E+1,searchTerm:s,limit:_,enabled:I}:null;if(x&&(N=await q1({fieldName:r,formId:o},{pagination:F||{},args:c,interfaceId:d})),D!=null&&D.aborted)throw D.reason;if(!N||!N.data||!("data"in N.data)||!Array.isArray(N.data.data)||!N.data.data.length){const{common:H}=t(),q=(S=H.optionsMap)==null?void 0:S[y];return i==null||i(q.options??[]),{...q,optionsList:q.options??[],key:y,hasMore:!1}}const B=N.data.data.map(H=>b?{...H,avatarUrl:H.avatarUrl||Aw}:(delete H.avatarUrl,H)),V=[...m,...B],Y=I?B.length>=_:!1,W=Wf(V,H=>H.value);return i==null||i(W),{optionsList:W,fieldName:r,formId:o,searchTerm:s,currentPage:E+1,hasMore:Y,key:y}}catch(N){const{common:D}=t(),F=((L=D.optionsMap)==null?void 0:L[y])||{};return i==null||i(F.options??[]),n(N)}},{condition:(e,{getState:t})=>{var g;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=Fl(a||{},r,n),{common:c}=t(),d=(g=c.optionsMap)==null?void 0:g[i];if((d==null?void 0:d.searchTerm)!==o)return!0;const f=(d==null?void 0:d.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),go=on("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await Sw(e,t,n),i=a==null?void 0:a.data;return i?(r&&Ae({message:_f,type:sn}),{data:v0(i)}):(r&&Ae({message:If,type:Ue}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:nF,resetPreviewCardData:Tw,setSelectedSuggestionType:Lw,resetDropdownOptionsCache:Ow}=$1.actions,kw=$1.reducer,Jn="/v1/api",Fw=`${Jn}/connectors/forms/list`,Dw=`${Jn}/connectors/cards/:id/unlink`,Nw=`${Jn}/connectors/forms/:id/link`,Rw=`${Jn}/connectors/form/:formId`,Mw=`${Jn}/connectors/forms/:formId/data`,jw=`${Jn}/connectors/forms/:formId/get_forms_custom_fields`,U1=`${Jn}/connectors/forms/:formId/defaults`,Pw=`${Jn}/connectors/forms/:formId/default-values`,Bw=({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)),ve({url:`${Fw}?${o.toString()}`,method:Le.GET})},K1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ve({url:ot(`${Rw}?${r.toString()}`,e),method:Le.POST,data:t})},Vw=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),ve({url:`${Dw.replace(":id",e)}?${o.toString()}`,method:Le.POST,data:{externalResourceId:n,conversationId:r}})},Gw=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),ve({url:`${Nw.replace(":id",e)}?${s.toString()}`,method:Le.POST,data:{externalResourceId:t,conversationId:r}})},Hw=(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),ve({url:`${Mw.replace(":formId",e)}?${s.toString()}`,method:Le.GET})},Ww="Error in previewing the card",e2="Link format isn't recognized. Please check that you've entered a valid URL",Zw="Item already linked",zw="Card linked successfully",Xw="Error in linking the card",Yw="New card created",Jw="Card creation failed",qw="Create and link objects from different apps to this conversation",Qw="Are you sure you want to change the primary object?",$w="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",Uw="Are you sure you want to leave?",Kw=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
|
|
2192
|
-
Do you want to continue?`,eI="Select an object to create",tI="Select an object to link",t2="Select object",nI="Paste URL or ID",rI="Object ID/Link",oI="Card updated",sI="Card updation failed",n2=3,aI="Pre-fill fields",iI="Variables linked to inbox may not be available as conversation is linked to multiple inboxes.",Nl=(e,t)=>{var r,o,s,a,i,c,d,f,g,y,C,b,h;if(e.fieldAccessMode==="no_access")return{...e,type:"text",disabled:!0,isClearable:!1,placeholder:"No access",validations:{},...t};let n={};switch(e.type){case"select":case"reference":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",isMulti:e.type==="multi-select"&&!!e.interfaceDetails,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=(d=e.validations)==null?void 0:d.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((y=(g=e.validations)==null?void 0:g.range)==null?void 0:y.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((C=e.validations)==null?void 0:C.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}},r2=Ea({name:"writeCapability",initialState:Nf,reducers:{resetState:()=>Nf,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=te.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ci.pending,t=>{t.objectListApiStatus=te.LOADING}).addCase(ci.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:d,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=te.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=d,t.dependentFieldsMap=f}).addCase(ci.rejected,t=>{t.objectListApiStatus=te.FAILED}).addCase(Or.pending,t=>{t.dropdownOptionsApis=te.LOADING}).addCase(Or.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=te.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(Or.rejected,t=>{t.dropdownOptionsApis=te.FAILED}).addCase(li.pending,t=>{t.createFormApiStatus=te.LOADING}).addCase(li.fulfilled,t=>{t.createFormApiStatus=te.IDLE}).addCase(li.rejected,t=>{t.createFormApiStatus=te.FAILED}).addCase(fi.pending,t=>{t.linkCardApiStatus=te.LOADING}).addCase(fi.fulfilled,t=>{t.linkCardApiStatus=te.IDLE}).addCase(fi.rejected,t=>{t.linkCardApiStatus=te.FAILED}).addCase(di.pending,t=>{t.unlinkCardApiStatus=te.LOADING}).addCase(di.fulfilled,t=>{t.unlinkCardApiStatus=te.IDLE}).addCase(di.rejected,t=>{t.unlinkCardApiStatus=te.FAILED}).addCase(ui.pending,t=>{t.updateFormApiStatus=te.LOADING}).addCase(ui.fulfilled,t=>{t.updateFormApiStatus=te.IDLE}).addCase(ui.rejected,t=>{t.updateFormApiStatus=te.FAILED}).addCase(pi.pending,t=>{t.currentResourceDetailsApiStatus=te.LOADING}).addCase(pi.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=te.IDLE}).addCase(pi.rejected,t=>{t.currentResourceDetailsApiStatus=te.FAILED})}}),ci=on("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o,connectorId:s}=e,a=await Bw({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={},d=[],f=[],g=[],y=[],C=[],b={},h={};return i==null||i.forEach(p=>{var x,E;if(p.expandedView&&!o)return;const m=Rf({...p});"fieldList"in m&&delete m.fieldList,h[p.id]=m,c[p.id]||(c[p.id]={}),b[p.id]||(b[p.id]=[]),p.type==="create"&&p.authenticated?(d.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?g.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&&C.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(x=p.fieldList)==null||x.sort((I,v)=>I.priority-v.priority),(E=p.fieldList)==null||E.forEach(I=>{const v=Nl(I);if(v.columns&&(v.columns=v.columns.map(_=>Nl(_,{loadOptionsOnFocus:!0,defaultOptions:!1}))),b[p.id]=[...b[p.id],v],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:d,createObjectConnectorNamesList:f,linkObjectList:g,editObjectList:y,searchObjectList:C,formFields:b,objectDict:h,dependentFieldsMap:c}}),li=on("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await K1({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),Ae({message:Yw,type:sn})}catch(d){const f=d,g=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(g==null?void 0:g.message)??Jw;return o==null||o(d),Ae({message:y,type:Ue}),t(d)}}),ui=on("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:d={}}=e;try{await K1({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:d}),r==null||r(),Ae({message:oI,type:sn})}catch(f){return o==null||o(f),Ae({message:sI,type:Ue}),t(f)}}),di=on("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await Vw(e,t,n,r)}),fi=on("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await Gw(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),pi=on("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await Hw(n,r,o,s,a),c=i==null?void 0:i.data,d=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,y])=>{if("label"in y)if(y.type&&y.type==="date"){const C=Array.isArray(y.label)?y.label[0]:y.label;f.values[g]=C?new Date(parseInt(C)).toISOString():""}else y.type&&y.type==="multi-select"?f.values[g]=Jf(y.value,y.label):y.value?f.values[g]={value:y.value,label:y.label}:f.values[g]=y.label}),{data:f,status:d}}catch(i){return Ae({message:Tn,type:Ue}),t(i)}}),{resetState:rF,setCurrentCardInEdit:mo,resetCurrentResourceDetails:cI,setHasUnsavedChanges:o2}=r2.actions,lI=r2.reducer,uI=()=>{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,d=f=>{s||(s=window.setTimeout(()=>{const g=f.target,y=Number(e.dataset.prevScrollLeft)||0,C=Number(e.dataset.prevScrollTop)||0,b=g.scrollLeft,h=g.scrollTop,p=b-y,m=h-C,x=Math.abs(m)>Math.abs(p),E=Math.abs(p)>Math.abs(m);r({isVertical:x,isHorizontal:E,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(h),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(g=>({...g,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",d),()=>{e.removeEventListener("scroll",d),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},dI="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",s2=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,hi=e=>typeof e=="boolean"?e?"Yes":"No":String(e),a2=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}},fI=(e,t)=>`${b0} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),pI=(e,t)=>{const{error_code:n,error_message:r}=a2(e);return n===Y4&&t?J4:r},hI=(e,t,n)=>{var d,f,g,y,C;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=(d=t==null?void 0:t[r])==null?void 0:d.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((C=(y=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:y[0])!=null&&C.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&s2.test(c)?!0:!i2(e,t,n)&&!i.length},i2=(e,t,n)=>{var f,g;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(g=(f=o.data)==null?void 0:f.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===te.FAILED,c=o.cardErrorMessage,d=c&&s2.test(c);return i||a||c&&!d};function gI(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const d=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[d],g=(f==null?void 0:f.connectorNames)??[];for(const y of g)r[y]||(r[y]=[],o[y]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[y].push(c),o[y].cards_visible+=1,o[y].card_key.push(c.id),o[y].card_title.push(c.title),hI(c,t,n)&&(o[y].empty_cards+=1,s+=1),i2(c,t,n)&&(o[y].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,d])=>({app_name:c,...d})),total_empty_cards:s,total_cards_with_errors:a}}const mI=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=gt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Ge),{userGroupId:i}=Dt()||{},[c,d]=uI(),{isScrolling:f,isVertical:g}=c,y=f&&g,C=w.useMemo(()=>(e==null?void 0:e[0].data.map(m=>m.label))||[],[e]),b=w.useMemo(()=>e.map(m=>{const x={cells:{},externalResourceId:m.externalResourceId};return m.data.forEach((E,I)=>{if(C[I]){let v=E.value==null||E.value===void 0||E.value===""?Uo:Array.isArray(E.value)?E.value.map(hi).join(", "):hi(E.value);v&&E.type==="date"&&(v=new Date(parseInt(v)).toLocaleDateString(navigator.language)),x.cells[C[I]]={label:v,deepLink:E==null?void 0:E.deepLink}}}),x}),[e,C]),h=(m,x)=>u.jsx(Y5,{align:"left",children:m.deepLink?u.jsx(l.Link,{target:"_blank",underline:"none",href:m.deepLink,children:m.label}):u.jsx(l.Typography,{variant:"body2",color:"gray.black",children:m.label})},`${x}_${m.label}`),p=m=>{!m||!n||(r(!1),s(o0,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(mo({...n,externalResourceId:m})))};return u.jsxs(l.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[u.jsx(l.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),u.jsx(l.TableContainer,{ref:d,children:u.jsxs(l.Table,{stickyHeader:!0,children:[u.jsx(Z5,{children:u.jsxs(l.TableRow,{children:[C.map(m=>u.jsx(z5,{sx:{whiteSpace:"nowrap"},children:u.jsx(l.Typography,{variant:"overline",color:"gray.gray3",children:m})},m)),u.jsx(q5,{})]})}),u.jsx(l.TableBody,{children:b.map((m,x)=>u.jsxs(X5,{children:[Object.values(m.cells).map((E,I)=>h(E,I)),u.jsx(J5,{children:!y&&m.externalResourceId&&u.jsx(l.Tooltip,{title:g0,placement:"bottom",children:u.jsx(l.IconButton,{className:"row-edit",onClick:()=>p(m.externalResourceId),children:u.jsx("img",{src:dI})})})})]},`id_${x}`))})]})})]})},c2=e=>e.cardList.connectorCards,bI=e=>e.cardList.connectorsEnabled,yI=e=>e.cardList.connectorApiStatus,xI=e=>e.cardList.cardSpecificData,CI=e=>e.cardList.specificConnectorApiStatus,EI=e=>e.cardList.specificConnectorErrorCode,vI=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==te.IDLE||!n?!1:Object.values(n).every(r=>r===te.IDLE||r===te.FAILED)},wI="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",l2=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:d,cardTitle:f,currentCard:g,cardId:y,isCardLevelError:C,fieldName:b,showErrorIcon:h}=e,p=w.useRef(null),m=w.useRef(null),{email:x,currentSmIds:E,conversationId:I,sendTrackingEvent:v,connectorFunctions:_}=w.useContext(Ge),A=me(EI),S=A==null?void 0:A[y],[L,N]=w.useState(!1),D=w.useMemo(()=>n&&C?pI(n,g==null?void 0:g.userAuthEnabled):c?b0.replace(/{{connector_name}}/g,(d==null?void 0:d[0])||""):l0,[n,c,d,C,g==null?void 0:g.userAuthEnabled]),F=w.useCallback(()=>{const Q=n||fI(S,d),{error_code:ee,error_message:G}=a2(Q);v==null||v(o4,{sm_ids:E,frontend_req_params:{email:x,conversationId:I,externalResourceId:g==null?void 0:g.externalResourceId},card_title:f,connector_name:d!=null&&d.length?d:"",error_code:ee,error_message:G})},[n,S,v,E,x,I,f,d,g==null?void 0:g.externalResourceId]);w.useEffect(()=>{(n&&C||c&&S)&&F()},[F,S,c,n,C]),w.useEffect(()=>{const Q=r?m.current:p.current;if(Q){const ee=Q.scrollHeight>Q.clientHeight||Q.scrollWidth>Q.clientWidth;N(ee)}},[t,r]);const M=o==xc.NOT_FOUND,B=!M&&Array.isArray(t)&&t.every(Q=>typeof Q=="string"||typeof Q=="number"||typeof Q=="boolean");let V=M||t==null||t===void 0||Array.isArray(t)?Uo:hi(t);a==="date"&&V&&!M&&(V=new Date(parseInt(V)).toLocaleDateString(navigator.language));const Y=!!n||c,W=()=>{i?_==null||_.redirectToAdmin():window.open(q4,"_blank")},H=()=>{v==null||v(s4,{sm_ids:E,card_title:f,field_name:b})},q=Q=>{const ee=/<>(.*?)<>/g,G=Q.split(ee);return u.jsx(w.Fragment,{children:G.map((J,R)=>R%2===1?u.jsx(B5,{variant:"body2",onClick:W,children:J},R):J)})};if(s)return u.jsx(rn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"});if(Y)return u.jsxs(O0,{gap:"7px",children:[h?u.jsx(l.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:wI,width:"18px",height:"18px"})}):null,u.jsx(k0,{variant:"body_sm_regular",children:D?q(D):l0})]});if(B){const Q=t;return Q.length?u.jsx(G5,{children:Q.map((ee,G)=>u.jsx(H5,{children:hi(ee)},`${G}_${String(ee)}`))}):u.jsx(D0,{variant:"caption_regular",children:Uo})}return u.jsx(l.Tooltip,{title:L?V:null,placement:"bottom",children:r?u.jsx(F0,{ref:m,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:H,children:V||Uo}):u.jsx(D0,{ref:p,variant:"caption_regular",children:V||Uo})})},u2="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",qn=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>u.jsx(l.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(l.Stack,{direction:"row",children:[r&&u.jsx(l.Box,{position:"absolute",right:10,top:10,children:u.jsx(l.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(l.IconButton,{onClick:()=>t(!1),children:u.jsx("img",{src:u2})})})}),n]})}),d2=e=>{var G,J,R;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===te.IDLE,d=(o==null?void 0:o[t])===te.LOADING,f=(o==null?void 0:o[t])===te.FAILED,{cardType:g,data:y,cardErrorMessage:C,redirectToAdminTab:b,connectorNames:h}=(r==null?void 0:r[t])||{},p=g==="flat",[m,x]=w.useState(!1),[E,I]=w.useState(!1),[v,_]=w.useState(!1),[A,S]=w.useState(!1),L=((G=y==null?void 0:y.listItems)==null?void 0:G.statusCode)!==401,N=w.useMemo(()=>{var X,K,ne,le;return p&&((X=y==null?void 0:y.flatDisplay)!=null&&X.data)?y.flatDisplay.data:!p&&((le=(ne=(K=y==null?void 0:y.listItems)==null?void 0:K.fields)==null?void 0:ne[0])!=null&&le.data)?y.listItems.fields[0].data:[]},[p,y]),D=w.useMemo(()=>N==null?void 0:N.slice(0,5),[N]),[F,M]=w.useState([]),B=w.useRef(null),[V,Y]=w.useState(0),W=m?-180:0,H=p?!1:!!((J=y==null?void 0:y.listItems)!=null&&J.errorMessage),q=H||f||C,Q=c&&!H&&s&&(v||E);w.useLayoutEffect(()=>{var X;(X=B.current)!=null&&X.scrollHeight&&Y(B.current.scrollHeight+i)},[o==null?void 0:o[t],F,B]),w.useEffect(()=>{var le,j;const X=((N==null?void 0:N.length)||0)>5,K=!p&&(((j=(le=y==null?void 0:y.listItems)==null?void 0:le.fields)==null?void 0:j.length)||0)>1;_(X&&!K),I(K)},[y,p,N==null?void 0:N.length]),w.useEffect(()=>{M(m?N:D)},[y,m,D,N]);const ee=()=>{v?x(X=>!X):S(X=>!X)};return u.jsxs(u.Fragment,{children:[u.jsx(qn,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(mI,{data:((R=y==null?void 0:y.listItems)==null?void 0:R.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx(j5,{className:s?"":"slideUp",height:V,children:u.jsx(l.Stack,{ref:B,gap:1,margin:"12px",children:d&&!(F!=null&&F.length)?u.jsxs(u.Fragment,{children:[u.jsx(rn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(rn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:q?u.jsx(l.Box,{margin:"8px 0",children:u.jsx(l2,{error:C,isLoading:d,redirectToAdminTab:b,isFailed:f,showErrorIcon:!L,connectorNames:h,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):F!=null&&F.length?F==null?void 0:F.map(X=>{const{value:K,label:ne,deepLink:le,type:j}=X,oe="errorMessage"in X?X.errorMessage:null,Ie="statusCode"in X?X.statusCode:null;return u.jsxs("div",{children:[u.jsx(P5,{variant:"overline_medium",children:ne}),u.jsx(l2,{value:K,error:oe,deepLink:le,statusCode:Ie,isLoading:d,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:ne})]},ne)}):u.jsx(l.Box,{margin:"8px 0",children:u.jsx(k0,{variant:"body_sm_regular",children:M4})})})})}),!C&&Q&&u.jsx($5,{variant:"body_xs_medium",onClick:ee,children:v?u.jsxs(u.Fragment,{children:[m?Fy:H0,u.jsx(Q5,{src:ky,transformAngle:W})]}):H0})]})},II={connectorCards:null,cardSpecificData:null,connectorApiStatus:te.IDLE,conversationMetaDataApiStatus:te.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},gi="/v1/api",_I=`${gi}/connectors/cards`,SI=`${gi}/connectors/cards/:id/data`,AI=`${gi}/connectors/:connectorId/user-auth/status`,TI=`${gi}/connectors/:connectorId/user-auth/start`,LI=({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)),ve({url:`${_I}?${o.toString()}`,method:Le.GET})},OI=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),ve({url:`${SI.replace(":id",e)}?${o.toString()}`,method:Le.GET})},f2=Ea({name:"connectorCardLibrary",initialState:II,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(mi.pending,t=>{t.connectorApiStatus=te.LOADING}).addCase(mi.fulfilled,(t,n)=>{t.connectorApiStatus=te.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(mi.rejected,t=>{t.connectorApiStatus=te.FAILED}).addCase(Cs.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:te.LOADING}}).addCase(Cs.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]:te.IDLE}}).addCase(Cs.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:te.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):y0;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),mi=on("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n,connectorId:r})=>{var c;const o=await LI({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.map(d=>Rf(d)).sort((d,f)=>(d==null?void 0:d.priority)-(f==null?void 0:f.priority)),connectorsEnabled:a}}),Cs=on("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await OI(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&Ae({message:_f,type:sn}),{data:v0(i),status:c}):(r&&Ae({message:If,type:Ue}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||y0})}}),kI=f2.reducer,p2=f2.actions,h2="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",FI="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",DI="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",g2=e=>e.write.createObjectList,NI=e=>e.write.createObjectConnectorNamesList,m2=e=>e.write.linkObjectList,RI=e=>e.write.editObjectList,Rl=e=>e.write.objectDict,MI=e=>e.write.formFields,jI=e=>e.write.linkCardApiStatus,PI=e=>e.write.unlinkCardApiStatus,BI=e=>e.write.dependentFieldsMap,VI=e=>e.write.createFormApiStatus,GI=e=>e.write.updateFormApiStatus,HI=e=>e.write.currentResourceDetails,WI=e=>e.write.currentResourceDetailsApiStatus,b2=e=>e.write.currentCardInEdit,y2=e=>e.write.hasUnsavedChanges,ZI=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,x2=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)&&ZI(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),C2=(e,t)=>JSON.stringify(x2(e))===JSON.stringify(x2(t)),zI=e=>H4.replace("{{connectorName}}",e),XI=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=gt(),{sendTrackingEvent:c}=w.useContext(Ge),f=me(PI)===te.LOADING,g=()=>{s&&o&&i(di({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(Yb,{connector_name:a,conversation_id:s}),t(!1),r(),Ae({message:Kx,type:sn})}).catch(()=>{Ae({message:e6,type:sn})})};return u.jsx(qn,{shown:e,setShown:t,showCloseButton:!0,children:u.jsxs(l.Stack,{width:"400px",padding:"20px",gap:"8px",children:[u.jsx(l.Typography,{variant:"h2",children:G4}),u.jsx(l.Typography,{variant:"body2",children:zI(a)}),u.jsxs(l.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[u.jsx(l.Button,{variant:"text",onClick:()=>t(!1),children:vc}),u.jsx(l.Button,{disabled:f,color:"error",onClick:g,children:h0})]})]})})},YI=({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(W5,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:d,iconSrc:f,action:g})=>u.jsx(l.Tooltip,{title:d,placement:"bottom",children:u.jsx(oo,{onClick:g,disabled:c,children:u.jsx("img",{src:f})})},i))}),o&&u.jsx(l.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(oo,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},E2=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=gt(),{availableFeatures:c,sendTrackingEvent:d,conversationId:f,currentSmIds:g}=w.useContext(Ge),{userGroupId:y}=Dt()||{},[C,b]=w.useState(!!s),[h,p]=w.useState(!1),[m,x]=w.useState(!1),[E,I]=w.useState(!1),{id:v,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let N=v;A&&(N=`${N}_${A}`);const{data:D,cardType:F,cardErrorMessage:M,connectorNames:B}=(n==null?void 0:n[N])??{},V=(B==null?void 0:B[0])||"",Y=(o==null?void 0:o[N])===te.LOADING,W=(o==null?void 0:o[N])===te.FAILED,H=!!(rt(c,i0)&&A),q=w.useMemo(()=>{var j,oe;if(M||W||!(rt(c,A4)&&S.some(Ie=>Ie.type==="edit")))return!1;switch(F){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?(oe=D==null?void 0:D.listItems)==null?void 0:oe.fields.some(Ie=>Ie.externalResourceId):!1;default:return!1}},[D,F,c,S,t,M,W]),Q=w.useCallback((j=!1)=>{const oe=j?$b:Qb;r&&v&&f&&i(Cs({id:v,email:r,conversationId:f,externalResourceId:A})).unwrap().then(Ie=>{const z={...E0(Ie,_,j,!0),sm_ids:g};d(oe,z)}).catch(Ie=>{const z={...E0(Ie,_,j,!1),sm_ids:g};d(oe,z)})},[i,r,v,_,d,f,A,g]);w.useEffect(()=>{C&&Q(!0)},[C,Q]);const ee=(j,oe)=>{var z;j==null||j.stopPropagation(),i(Cs({id:oe,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{d(jb,{id:oe})});const Ie=j.target.tagName==="BUTTON"?(z=j.target)==null?void 0:z.firstChild:j.target;Ie.className&&(Ie.className=""),setTimeout(()=>Ie.className="selected",1)},G=(j,oe)=>{j.stopPropagation(),!(n!=null&&n[oe])&&!Y&&Q(),d(C?Mb:Rb,{id:oe}),b(Ie=>!Ie)},J=j=>{j.stopPropagation();const oe=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;p(!!oe)},R=j=>{var Ie,z;j.stopPropagation(),d(o0,{card_title:_,connector_name:V,ug_id:y,sm_ids:g});let oe;F==="flat"?oe=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:F==="flat_with_list"&&(oe=(z=(Ie=D==null?void 0:D.listItems)==null?void 0:Ie.fields[0])==null?void 0:z.externalResourceId),oe?i(mo({...t,externalResourceId:oe})):Ae({message:Tn,type:Ue})},X=j=>{j.stopPropagation(),x(!0)},K=()=>{I(!0)},ne=()=>{I(!1)},le=[{id:"unlink",label:h0,disabled:Y,shown:H,iconSrc:FI,action:j=>X(j)},{id:"refresh",label:u0,disabled:Y,shown:!0,iconSrc:h2,action:j=>ee(j,v)},{id:"edit",label:g0,disabled:Y,shown:q,iconSrc:DI,action:j=>R(j)}];return u.jsxs(D5,{"data-testid":`test_${v}`,onMouseEnter:K,onMouseLeave:ne,children:[u.jsxs(N5,{className:C?"hiver-card-expanded":"",onClick:j=>G(j,N),children:[u.jsxs(R5,{children:[L&&u.jsx("img",{src:L,alt:_}),u.jsx(l.Tooltip,{title:h?_:"",placement:"bottom",children:u.jsx(M5,{variant:"body_sm_regular",onMouseOver:j=>J(j),onMouseLeave:j=>J(j),children:_})})]}),u.jsxs(O0,{children:[u.jsx(YI,{actions:le,isHovered:E}),u.jsx(l.Tooltip,{title:C?d0:Cc,placement:"bottom",children:u.jsx(oo,{onClick:j=>G(j,N),children:u.jsx(Lc,{className:C?"":"hiver-up"})})})]})]}),u.jsx(d2,{id:N,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:C}),u.jsx(XI,{showUnlinkModal:m,setShowUnlinkModal:x,cardId:v,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:V})]})},JI="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%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.86993%200.652446C7.56922%200.248711%208.43078%200.248711%209.13007%200.652446L13.7981%203.34755C14.4974%203.75129%2014.9282%204.49742%2014.9282%205.30489V10.6951C14.9282%2011.5026%2014.4974%2012.2487%2013.7981%2012.6524L9.13007%2015.3476C8.43078%2015.7513%207.56922%2015.7513%206.86993%2015.3476L2.20187%2012.6524C1.50258%2012.2487%201.0718%2011.5026%201.0718%2010.6951V5.30489C1.0718%204.49742%201.50258%203.75129%202.20187%203.34755L6.86993%200.652446Z'%20fill='%23FFD122'/%3e%3cg%20filter='url(%23filter0_d_360_39563)'%3e%3cpath%20d='M5.83154%204.43359V4.43359C6.84296%204.43359%207.66287%205.25351%207.66287%206.26492V11.5179V11.5179C6.65146%2011.5179%205.83154%2010.698%205.83154%209.68661V4.43359Z'%20fill='white'/%3e%3c/g%3e%3cg%20filter='url(%23filter1_d_360_39563)'%3e%3cpath%20d='M8.57812%207.66211V7.66211C9.58954%207.66211%2010.4095%208.48202%2010.4095%209.49343V11.7103V11.7103C9.39804%2011.7103%208.57812%2010.8904%208.57812%209.87898V7.66211Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_360_39563'%20x='4.76488'%20y='3.36693'%20width='3.96488'%20height='9.21732'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset/%3e%3cfeGaussianBlur%20stdDeviation='0.533333'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.114019%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_360_39563'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_360_39563'%20result='shape'/%3e%3c/filter%3e%3cfilter%20id='filter1_d_360_39563'%20x='7.51146'%20y='6.59544'%20width='3.96488'%20height='6.18216'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset/%3e%3cfeGaussianBlur%20stdDeviation='0.533333'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.114019%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_360_39563'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_360_39563'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",Ml=e=>ve({url:AI.replace(":connectorId",e),method:Le.GET}),qI=e=>ve({url:TI.replace(":connectorId",e),method:Le.POST}),QI={byConnectorId:{}},$I=new Set(["popup_blocked","in_progress_timeout","start_user_auth_failed","popup_closed","cancelled"]),v2=Ea({name:"userAuth",initialState:QI,reducers:{userAuthStatusReceived(e,t){const{connectorId:n,state:r,reason:o,externalUserId:s,authoritative:a}=t.payload,i=e.byConnectorId[n];(i==null?void 0:i.state)==="in_progress"&&r!=="connected"&&!a||(e.byConnectorId[n]={state:r,reason:o,externalUserId:s,connectUrl:i==null?void 0:i.connectUrl,lastChecked:Date.now()})},userAuthRequired(e,t){const{connectorId:n,connectUrl:r,reason:o}=t.payload,s=e.byConnectorId[n];(s==null?void 0:s.state)!=="in_progress"&&(e.byConnectorId[n]={state:"disconnected",reason:o,connectUrl:r,externalUserId:s==null?void 0:s.externalUserId,lastChecked:Date.now()})},userAuthInProgress(e,t){const{connectorId:n}=t.payload,r=e.byConnectorId[n]||{state:"unknown"};e.byConnectorId[n]={...r,state:"in_progress",lastChecked:Date.now()}},userAuthCompleted(e,t){const{connectorId:n,externalUserId:r}=t.payload;e.byConnectorId[n]={state:"connected",externalUserId:r,lastChecked:Date.now()}},userAuthFailed(e,t){const{connectorId:n,reason:r}=t.payload,o=e.byConnectorId[n];e.byConnectorId[n]={...o,state:$I.has(r)?"disconnected":"reauth_required",reason:r,lastChecked:Date.now()}},userAuthReset(e,t){delete e.byConnectorId[t.payload.connectorId]}}}),{userAuthStatusReceived:jl,userAuthRequired:UI,userAuthInProgress:KI,userAuthCompleted:oF,userAuthFailed:bo,userAuthReset:sF}=v2.actions,e_=v2.reducer,t_={state:"unknown"},Es=(e,t)=>e.userAuth.byConnectorId[t]||t_,n_=new Set(["disconnected","in_progress","reauth_required","workspace_mismatch"]),r_=(e,t)=>n_.has(Es(e,t).state),o_=e=>{for(const[t,n]of Object.entries(e.userAuth.byConnectorId))if(n.state==="in_progress")return t},s_=2e3,a_=5*60*1e3;function i_(e,t={}){const n=gt(),r=dn(),o=me(g=>Es(g,e)),{onConnected:s}=t,a=w.useRef(!1),i=w.useRef(null),c=w.useRef(null),d=w.useRef(!1);w.useEffect(()=>{o.state!=="connected"&&(d.current=!1)},[o.state]),Ot({queryKey:["userAuthStatus",e],queryFn:async()=>{const g=await Ml(e),y=(g==null?void 0:g.data)??g;return y.state==="connected"&&(n(jl({connectorId:e,state:y.state,reason:y.reason,externalUserId:y.external_user_id})),c.current&&!c.current.closed&&c.current.close(),c.current=null,d.current||(d.current=!0,s==null||s())),y},enabled:o.state==="in_progress",refetchInterval:o.state==="in_progress"?s_:!1,refetchOnWindowFocus:!1}),w.useEffect(()=>{if(o.state!=="in_progress"){i.current&&(clearTimeout(i.current),i.current=null);return}return i.current=setTimeout(()=>{n(bo({connectorId:e,reason:"in_progress_timeout"}))},a_),()=>{i.current&&(clearTimeout(i.current),i.current=null)}},[o.state,e,n]),w.useEffect(()=>{if(o.state!=="in_progress"){if(c.current&&!c.current.closed)try{c.current.close()}catch{}c.current=null}},[o.state]),w.useEffect(()=>{if(o.state!=="in_progress")return;const g=setInterval(async()=>{const y=c.current;if(!(!y||!y.closed)){clearInterval(g),c.current=null;try{const C=await Ml(e),b=(C==null?void 0:C.data)??C;b.state==="connected"||b.state==="reauth_required"||b.state==="workspace_mismatch"?(n(jl({connectorId:e,state:b.state,reason:b.reason,externalUserId:b.external_user_id,authoritative:!0})),b.state==="connected"&&!d.current&&(d.current=!0,s==null||s())):n(bo({connectorId:e,reason:"popup_closed"}))}catch{n(bo({connectorId:e,reason:"popup_closed"}))}}},800);return()=>clearInterval(g)},[o.state,e,n,s]);const f=w.useCallback(async()=>{if(!a.current){a.current=!0,n(KI({connectorId:e}));try{const g=await qI(e),y=(g==null?void 0:g.data)??g,C=y==null?void 0:y.auth_url;if(!C)throw new Error("No auth_url returned from /user-auth/start");const b=600,h=700,p=window.screen.width/2-b/2,m=window.screen.height/2-h/2,x=window.open(C,"user_auth_popup",`width=${b},height=${h},left=${p},top=${m},menubar=no,toolbar=no`);c.current=x,x||n(bo({connectorId:e,reason:"popup_blocked"}))}catch(g){console.error("startUserAuth failed: ",g),n(bo({connectorId:e,reason:"start_user_auth_failed"}))}finally{a.current=!1,r.invalidateQueries({queryKey:["userAuthStatus",e]})}}},[e,n,r]);return{entry:o,state:o.state,connect:f,isStarting:a.current}}const w2=(e,t,n)=>({queryKey:["userAuthStatus",e,"initial"],queryFn:async()=>{const r=await Ml(e),o=(r==null?void 0:r.data)??r;return t(jl({connectorId:e,state:o.state,reason:o.reason,externalUserId:o.external_user_id})),o},enabled:n,refetchOnWindowFocus:!1,staleTime:3e4});function I2(e,t){const n=gt(),r=Ot(w2(e,n,t));return{isLoading:t&&r.isLoading}}function c_(e){const t=gt();return{isResolving:Lg({queries:e.map(r=>w2(r,t,!0))}).some(r=>r.isLoading)}}const l_=l.styled(l.Box)`
|
|
2191
|
+
`,pw=e=>e,hw=({open:e,targetRef:t,endElRef:n,padding:r=8,zIndex:o=1300,renderHighlight:s=pw,onClose:a})=>{const[i,c]=w.useState(null);if(w.useEffect(()=>{if(!e){c(null);return}const f=t.current;if(!f){c(null);return}const g=(n==null?void 0:n.current)||f,y=f.getBoundingClientRect(),C=g.getBoundingClientRect(),b=window.innerWidth,h=window.innerHeight,p=Math.max(0,y.left-r),m=Math.max(0,y.top-r),x=Math.min(h,y.bottom+r),E=Math.min(b,C.right+r),I=Math.max(0,E-p),v=Math.max(0,x-m);if(!I||!v){c(null);return}c({top:m,left:p,width:I,height:v,right:E,bottom:x})},[e,r,t,n]),!e||!i||typeof document>"u")return null;const d=u.jsx(fw,{top:i.top,left:i.left,width:i.width,height:i.height,onClick:f=>f.stopPropagation()});return $t.createPortal(u.jsx(dw,{zIndex:o,onClick:a,children:s(d)}),document.body)},Fl=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},gw=(e,t)=>t?Object.values(t).filter(r=>{if(e.errors[r])return!1;const o=e.values[r];return Array.isArray(o)?o.length>0:!!o}):[],xs=(e,t)=>t?Object.keys(t).reduce((r,o)=>{var c;let s="";const a=t[o],i=(c=e.values)==null?void 0:c[a];return Array.isArray(i)?(s=i.filter(d=>!!d&&typeof d=="object"&&"value"in d).map(d=>d.value),s=s.length>0?s:null):i&&typeof i=="object"&&"value"in i?s=i.value:i&&typeof i!="object"?s=i:s=null,{...r,[o]:s}},{}):{},Dl=({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=K6(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let d=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";d=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:d,t[n.name].validate=e9(d);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=t9();return}if(n.type==="text"&&n.limit){t[n.name].validate=el();return}if(n.type==="table"){const d=Dl({formFields:n.columns??[]});t[n.name].validations=d}if((i=n.validations)!=null&&i.isUrl){const d=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=$6(d)}else if((c=n.validations)!=null&&c.isEmail){const d=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=U6(d)}}),t},Cs={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[oi.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e,isBoolean:e=>typeof e=="boolean"},Es=(e,t,n)=>Object.keys(t).reduce((r,o)=>{const s=e.values[t[o]];let a;return Cs.isMultiSelect(s)?a=s.map(i=>i.value):Cs.isTable(s)?a=s.map(({...c})=>(delete c[oi.ROW_ID],c)).filter(c=>Object.keys(c).length>0):Cs.isSelect(s)?a=s.value:Cs.isDate(s)?a=s.toISOString():n!=null&&n.has(t[o])?a=[]:Cs.isBoolean(s)?a=s:a=s||"",r[o]=a,r},{}),mw=(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]}))},q1=(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=q1(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},zn="/v1/api",bw=`${zn}/connectors/conversation/:conversationId/metadata`,yw=`${zn}/connectors/forms/:formId/field/:fieldName/data`,xw=`${zn}/connectors/form/:formId`,Cw=`${zn}/connectors/forms/:id/link`,Ew=`${zn}/connectors/forms/:id/preview`,vw=`${zn}/connectors/conversation/:conversationId/selected-email`,ww=`${zn}/connectors/app-cf-values`,Iw=`${zn}/connectors/deferred-app-cf-values`,Q1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ve({url:ot(`${yw}?${r.toString()}`,e),method:Le.POST,data:t})},_w=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ve({url:ot(`${xw}?${r.toString()}`,e),method:Le.POST,data:t})},Sw=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ve({url:`${Ew.replace(":id",e)}?${r.toString()}`,method:Le.POST,data:{args:t}})},Aw="https://avatars.githubusercontent.com/u/62397590",$1={optionsMap:null,createOptionApi:te.IDLE,dropdownOptionsApis:te.IDLE,previewCardData:null,previewCardApiStatus:te.IDLE,selectedSuggestionType:"basic"},U1=va({name:"commonSlice",initialState:$1,reducers:{resetState:()=>$1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=te.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload},resetDropdownOptionsCache:e=>{e.optionsMap=null,e.dropdownOptionsApis=te.IDLE}},extraReducers:e=>{e.addCase(ii.pending,t=>{t.createOptionApi=te.LOADING}).addCase(ii.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=te.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(ii.rejected,t=>{t.createOptionApi=te.FAILED}).addCase(Ar.pending,t=>{t.dropdownOptionsApis=te.LOADING}).addCase(Ar.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=te.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(Ar.rejected,t=>{t.dropdownOptionsApis=te.FAILED}).addCase(go.pending,t=>{t.previewCardApiStatus=te.LOADING}).addCase(go.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=te.IDLE}).addCase(go.rejected,t=>{t.previewCardApiStatus=te.FAILED})}}),ii=on("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var h,p,m;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:d={},callback:f}=e,g=Fl(c||{},s,r),{common:y}=t(),{options:C=[],...b}=((h=y.optionsMap)==null?void 0:h[g])||{};try{const x=await _w({fieldName:r,formId:a},{args:d,conversation_id:i});if(!x||!("data"in x)||!("output_variables"in x.data)||!("external_resource_id"in x.data.output_variables))throw x;const E=x.data.output_variables,{external_resource_id:I,...v}=E,A=[{label:o,value:I,prefillValues:v},...C],S=Wf(A,L=>L.value);return f==null||f(S),{optionsList:S,key:g,...b}}catch(x){f==null||f(C);const E=x,I=(p=E==null?void 0:E.response)==null?void 0:p.data,v=typeof I=="string"?I:(I==null?void 0:I.message)||Tn;return Te({message:v,type:Ue}),n((m=E==null?void 0:E.response)==null?void 0:m.status)}}),Ar=on("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:d="",pagination:f={enabled:!1},controller:g}=e,y=Fl(c||{},o,r),{common:C}=t();let b=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(b=a.meta.showAvatar);const h=((A=C.optionsMap)==null?void 0:A[y])||{},p=!e.isScrollToBottomEvent&&(!h||s!==h.searchTerm),m=p?[]:h.options||[],x=p?!0:h.hasMore??!0,E=p?0:h.currentPage??0,{enabled:I,limit:v}=f,_=v||10;try{let N;const D=g==null?void 0:g.signal,F=I?{pageNumber:E+1,searchTerm:s,limit:_,enabled:I}:null;if(x&&(N=await Q1({fieldName:r,formId:o},{pagination:F||{},args:c,interfaceId:d})),D!=null&&D.aborted)throw D.reason;if(!N||!N.data||!("data"in N.data)||!Array.isArray(N.data.data)||!N.data.data.length){const{common:H}=t(),q=(S=H.optionsMap)==null?void 0:S[y];return i==null||i(q.options??[]),{...q,optionsList:q.options??[],key:y,hasMore:!1}}const B=N.data.data.map(H=>b?{...H,avatarUrl:H.avatarUrl||Aw}:(delete H.avatarUrl,H)),V=[...m,...B],Y=I?B.length>=_:!1,W=Wf(V,H=>H.value);return i==null||i(W),{optionsList:W,fieldName:r,formId:o,searchTerm:s,currentPage:E+1,hasMore:Y,key:y}}catch(N){const{common:D}=t(),F=((L=D.optionsMap)==null?void 0:L[y])||{};return i==null||i(F.options??[]),n(N)}},{condition:(e,{getState:t})=>{var g;if(e.isScrollToBottomEvent)return!0;const{fieldName:n,formId:r,searchTerm:o,callback:s,args:a}=e,i=Fl(a||{},r,n),{common:c}=t(),d=(g=c.optionsMap)==null?void 0:g[i];if((d==null?void 0:d.searchTerm)!==o)return!0;const f=(d==null?void 0:d.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),go=on("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await Sw(e,t,n),i=a==null?void 0:a.data;return i?(r&&Te({message:_f,type:sn}),{data:v0(i)}):(r&&Te({message:If,type:Ue}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:nF,resetPreviewCardData:Tw,setSelectedSuggestionType:Lw,resetDropdownOptionsCache:Ow}=U1.actions,kw=U1.reducer,Xn="/v1/api",Fw=`${Xn}/connectors/forms/list`,Dw=`${Xn}/connectors/cards/:id/unlink`,Nw=`${Xn}/connectors/forms/:id/link`,Rw=`${Xn}/connectors/form/:formId`,Mw=`${Xn}/connectors/forms/:formId/data`,jw=`${Xn}/connectors/forms/:formId/get_forms_custom_fields`,K1=`${Xn}/connectors/forms/:formId/defaults`,Pw=`${Xn}/connectors/forms/:formId/default-values`,Bw=({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)),ve({url:`${Fw}?${o.toString()}`,method:Le.GET})},e2=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ve({url:ot(`${Rw}?${r.toString()}`,e),method:Le.POST,data:t})},Vw=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),ve({url:`${Dw.replace(":id",e)}?${o.toString()}`,method:Le.POST,data:{externalResourceId:n,conversationId:r}})},Gw=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),ve({url:`${Nw.replace(":id",e)}?${s.toString()}`,method:Le.POST,data:{externalResourceId:t,conversationId:r}})},Hw=(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),ve({url:`${Mw.replace(":formId",e)}?${s.toString()}`,method:Le.GET})},Ww="Error in previewing the card",t2="Link format isn't recognized. Please check that you've entered a valid URL",Zw="Item already linked",zw="Card linked successfully",Xw="Error in linking the card",Yw="New card created",Jw="Card creation failed",qw="Create and link objects from different apps to this conversation",Qw="Are you sure you want to change the primary object?",$w="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",Uw="Are you sure you want to leave?",Kw=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
|
|
2192
|
+
Do you want to continue?`,eI="Select an object to create",tI="Select an object to link",n2="Select object",nI="Paste URL or ID",rI="Object ID/Link",oI="Card updated",sI="Card updation failed",r2=3,aI="Pre-fill fields",iI="Variables linked to inbox may not be available as conversation is linked to multiple inboxes.",Nl=(e,t)=>{var r,o,s,a,i,c,d,f,g,y,C,b,h;if(e.fieldAccessMode==="no_access")return{...e,type:"text",disabled:!0,isClearable:!1,placeholder:"No access",validations:{},...t};let n={};switch(e.type){case"select":case"reference":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",isMulti:e.type==="multi-select"&&!!e.interfaceDetails,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=(d=e.validations)==null?void 0:d.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((y=(g=e.validations)==null?void 0:g.range)==null?void 0:y.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((C=e.validations)==null?void 0:C.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}case"checkbox":{n={...e,type:"checkbox",value:!!e.value};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},o2=va({name:"writeCapability",initialState:Nf,reducers:{resetState:()=>Nf,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=te.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ci.pending,t=>{t.objectListApiStatus=te.LOADING}).addCase(ci.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:d,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=te.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=d,t.dependentFieldsMap=f}).addCase(ci.rejected,t=>{t.objectListApiStatus=te.FAILED}).addCase(Ar.pending,t=>{t.dropdownOptionsApis=te.LOADING}).addCase(Ar.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=te.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(Ar.rejected,t=>{t.dropdownOptionsApis=te.FAILED}).addCase(li.pending,t=>{t.createFormApiStatus=te.LOADING}).addCase(li.fulfilled,t=>{t.createFormApiStatus=te.IDLE}).addCase(li.rejected,t=>{t.createFormApiStatus=te.FAILED}).addCase(fi.pending,t=>{t.linkCardApiStatus=te.LOADING}).addCase(fi.fulfilled,t=>{t.linkCardApiStatus=te.IDLE}).addCase(fi.rejected,t=>{t.linkCardApiStatus=te.FAILED}).addCase(di.pending,t=>{t.unlinkCardApiStatus=te.LOADING}).addCase(di.fulfilled,t=>{t.unlinkCardApiStatus=te.IDLE}).addCase(di.rejected,t=>{t.unlinkCardApiStatus=te.FAILED}).addCase(ui.pending,t=>{t.updateFormApiStatus=te.LOADING}).addCase(ui.fulfilled,t=>{t.updateFormApiStatus=te.IDLE}).addCase(ui.rejected,t=>{t.updateFormApiStatus=te.FAILED}).addCase(pi.pending,t=>{t.currentResourceDetailsApiStatus=te.LOADING}).addCase(pi.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=te.IDLE}).addCase(pi.rejected,t=>{t.currentResourceDetailsApiStatus=te.FAILED})}}),ci=on("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o,connectorId:s}=e,a=await Bw({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={},d=[],f=[],g=[],y=[],C=[],b={},h={};return i==null||i.forEach(p=>{var x,E;if(p.expandedView&&!o)return;const m=Rf({...p});"fieldList"in m&&delete m.fieldList,h[p.id]=m,c[p.id]||(c[p.id]={}),b[p.id]||(b[p.id]=[]),p.type==="create"&&p.authenticated?(d.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?g.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&&C.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(x=p.fieldList)==null||x.sort((I,v)=>I.priority-v.priority),(E=p.fieldList)==null||E.forEach(I=>{const v=Nl(I);if(v.columns&&(v.columns=v.columns.map(_=>Nl(_,{loadOptionsOnFocus:!0,defaultOptions:!1}))),b[p.id]=[...b[p.id],v],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:d,createObjectConnectorNamesList:f,linkObjectList:g,editObjectList:y,searchObjectList:C,formFields:b,objectDict:h,dependentFieldsMap:c}}),li=on("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await e2({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),Te({message:Yw,type:sn})}catch(d){const f=d,g=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(g==null?void 0:g.message)??Jw;return o==null||o(d),Te({message:y,type:Ue}),t(d)}}),ui=on("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:d={}}=e;try{await e2({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:d}),r==null||r(),Te({message:oI,type:sn})}catch(f){return o==null||o(f),Te({message:sI,type:Ue}),t(f)}}),di=on("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await Vw(e,t,n,r)}),fi=on("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await Gw(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),pi=on("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await Hw(n,r,o,s,a),c=i==null?void 0:i.data,d=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,y])=>{if("label"in y)if(y.type&&y.type==="date"){const C=Array.isArray(y.label)?y.label[0]:y.label;f.values[g]=C?new Date(parseInt(C)).toISOString():""}else y.type&&y.type==="multi-select"?f.values[g]=Jf(y.value,y.label):y.value?f.values[g]={value:y.value,label:y.label}:f.values[g]=y.label}),{data:f,status:d}}catch(i){return Te({message:Tn,type:Ue}),t(i)}}),{resetState:rF,setCurrentCardInEdit:mo,resetCurrentResourceDetails:cI,setHasUnsavedChanges:s2}=o2.actions,lI=o2.reducer,uI=()=>{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,d=f=>{s||(s=window.setTimeout(()=>{const g=f.target,y=Number(e.dataset.prevScrollLeft)||0,C=Number(e.dataset.prevScrollTop)||0,b=g.scrollLeft,h=g.scrollTop,p=b-y,m=h-C,x=Math.abs(m)>Math.abs(p),E=Math.abs(p)>Math.abs(m);r({isVertical:x,isHorizontal:E,isScrolling:!0}),e.dataset.prevScrollLeft=String(b),e.dataset.prevScrollTop=String(h),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(g=>({...g,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",d),()=>{e.removeEventListener("scroll",d),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},dI="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",a2=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,hi=e=>typeof e=="boolean"?e?"Yes":"No":String(e),i2=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}},fI=(e,t)=>`${b0} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),pI=(e,t)=>{const{error_code:n,error_message:r}=i2(e);return n===J4&&t?q4:r},hI=(e,t,n)=>{var d,f,g,y,C;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=(d=t==null?void 0:t[r])==null?void 0:d.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((C=(y=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:y[0])!=null&&C.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&a2.test(c)?!0:!c2(e,t,n)&&!i.length},c2=(e,t,n)=>{var f,g;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(g=(f=o.data)==null?void 0:f.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===te.FAILED,c=o.cardErrorMessage,d=c&&a2.test(c);return i||a||c&&!d};function gI(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const d=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[d],g=(f==null?void 0:f.connectorNames)??[];for(const y of g)r[y]||(r[y]=[],o[y]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[y].push(c),o[y].cards_visible+=1,o[y].card_key.push(c.id),o[y].card_title.push(c.title),hI(c,t,n)&&(o[y].empty_cards+=1,s+=1),c2(c,t,n)&&(o[y].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,d])=>({app_name:c,...d})),total_empty_cards:s,total_cards_with_errors:a}}const mI=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=ht(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(He),{userGroupId:i}=Rt()||{},[c,d]=uI(),{isScrolling:f,isVertical:g}=c,y=f&&g,C=w.useMemo(()=>(e==null?void 0:e[0].data.map(m=>m.label))||[],[e]),b=w.useMemo(()=>e.map(m=>{const x={cells:{},externalResourceId:m.externalResourceId};return m.data.forEach((E,I)=>{if(C[I]){let v=E.value==null||E.value===void 0||E.value===""?Ko:Array.isArray(E.value)?E.value.map(hi).join(", "):hi(E.value);v&&E.type==="date"&&(v=new Date(parseInt(v)).toLocaleDateString(navigator.language)),x.cells[C[I]]={label:v,deepLink:E==null?void 0:E.deepLink}}}),x}),[e,C]),h=(m,x)=>u.jsx(J5,{align:"left",children:m.deepLink?u.jsx(l.Link,{target:"_blank",underline:"none",href:m.deepLink,children:m.label}):u.jsx(l.Typography,{variant:"body2",color:"gray.black",children:m.label})},`${x}_${m.label}`),p=m=>{!m||!n||(r(!1),s(o0,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(mo({...n,externalResourceId:m})))};return u.jsxs(l.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[u.jsx(l.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),u.jsx(l.TableContainer,{ref:d,children:u.jsxs(l.Table,{stickyHeader:!0,children:[u.jsx(z5,{children:u.jsxs(l.TableRow,{children:[C.map(m=>u.jsx(X5,{sx:{whiteSpace:"nowrap"},children:u.jsx(l.Typography,{variant:"overline",color:"gray.gray3",children:m})},m)),u.jsx(Q5,{})]})}),u.jsx(l.TableBody,{children:b.map((m,x)=>u.jsxs(Y5,{children:[Object.values(m.cells).map((E,I)=>h(E,I)),u.jsx(q5,{children:!y&&m.externalResourceId&&u.jsx(l.Tooltip,{title:g0,placement:"bottom",children:u.jsx(l.IconButton,{className:"row-edit",onClick:()=>p(m.externalResourceId),children:u.jsx("img",{src:dI})})})})]},`id_${x}`))})]})})]})},l2=e=>e.cardList.connectorCards,bI=e=>e.cardList.connectorsEnabled,yI=e=>e.cardList.connectorApiStatus,xI=e=>e.cardList.cardSpecificData,CI=e=>e.cardList.specificConnectorApiStatus,EI=e=>e.cardList.specificConnectorErrorCode,vI=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==te.IDLE||!n?!1:Object.values(n).every(r=>r===te.IDLE||r===te.FAILED)},wI="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",u2=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:d,cardTitle:f,currentCard:g,cardId:y,isCardLevelError:C,fieldName:b,showErrorIcon:h}=e,p=w.useRef(null),m=w.useRef(null),{email:x,currentSmIds:E,conversationId:I,sendTrackingEvent:v,connectorFunctions:_}=w.useContext(He),A=be(EI),S=A==null?void 0:A[y],[L,N]=w.useState(!1),D=w.useMemo(()=>n&&C?pI(n,g==null?void 0:g.userAuthEnabled):c?b0.replace(/{{connector_name}}/g,(d==null?void 0:d[0])||""):l0,[n,c,d,C,g==null?void 0:g.userAuthEnabled]),F=w.useCallback(()=>{const Q=n||fI(S,d),{error_code:ee,error_message:G}=i2(Q);v==null||v(s4,{sm_ids:E,frontend_req_params:{email:x,conversationId:I,externalResourceId:g==null?void 0:g.externalResourceId},card_title:f,connector_name:d!=null&&d.length?d:"",error_code:ee,error_message:G})},[n,S,v,E,x,I,f,d,g==null?void 0:g.externalResourceId]);w.useEffect(()=>{(n&&C||c&&S)&&F()},[F,S,c,n,C]),w.useEffect(()=>{const Q=r?m.current:p.current;if(Q){const ee=Q.scrollHeight>Q.clientHeight||Q.scrollWidth>Q.clientWidth;N(ee)}},[t,r]);const M=o==xc.NOT_FOUND,B=!M&&Array.isArray(t)&&t.every(Q=>typeof Q=="string"||typeof Q=="number"||typeof Q=="boolean");let V=M||t==null||t===void 0||Array.isArray(t)?Ko:hi(t);a==="date"&&V&&!M&&(V=new Date(parseInt(V)).toLocaleDateString(navigator.language));const Y=!!n||c,W=()=>{i?_==null||_.redirectToAdmin():window.open(Q4,"_blank")},H=()=>{v==null||v(a4,{sm_ids:E,card_title:f,field_name:b})},q=Q=>{const ee=/<>(.*?)<>/g,G=Q.split(ee);return u.jsx(w.Fragment,{children:G.map((J,R)=>R%2===1?u.jsx(V5,{variant:"body2",onClick:W,children:J},R):J)})};if(s)return u.jsx(rn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"});if(Y)return u.jsxs(O0,{gap:"7px",children:[h?u.jsx(l.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:wI,width:"18px",height:"18px"})}):null,u.jsx(k0,{variant:"body_sm_regular",children:D?q(D):l0})]});if(B){const Q=t;return Q.length?u.jsx(H5,{children:Q.map((ee,G)=>u.jsx(W5,{children:hi(ee)},`${G}_${String(ee)}`))}):u.jsx(D0,{variant:"caption_regular",children:Ko})}return u.jsx(l.Tooltip,{title:L?V:null,placement:"bottom",children:r?u.jsx(F0,{ref:m,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:H,children:V||Ko}):u.jsx(D0,{ref:p,variant:"caption_regular",children:V||Ko})})},d2="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",Yn=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>u.jsx(l.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(l.Stack,{direction:"row",children:[r&&u.jsx(l.Box,{position:"absolute",right:10,top:10,children:u.jsx(l.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(l.IconButton,{onClick:()=>t(!1),children:u.jsx("img",{src:d2})})})}),n]})}),f2=e=>{var G,J,R;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===te.IDLE,d=(o==null?void 0:o[t])===te.LOADING,f=(o==null?void 0:o[t])===te.FAILED,{cardType:g,data:y,cardErrorMessage:C,redirectToAdminTab:b,connectorNames:h}=(r==null?void 0:r[t])||{},p=g==="flat",[m,x]=w.useState(!1),[E,I]=w.useState(!1),[v,_]=w.useState(!1),[A,S]=w.useState(!1),L=((G=y==null?void 0:y.listItems)==null?void 0:G.statusCode)!==401,N=w.useMemo(()=>{var X,K,ne,le;return p&&((X=y==null?void 0:y.flatDisplay)!=null&&X.data)?y.flatDisplay.data:!p&&((le=(ne=(K=y==null?void 0:y.listItems)==null?void 0:K.fields)==null?void 0:ne[0])!=null&&le.data)?y.listItems.fields[0].data:[]},[p,y]),D=w.useMemo(()=>N==null?void 0:N.slice(0,5),[N]),[F,M]=w.useState([]),B=w.useRef(null),[V,Y]=w.useState(0),W=m?-180:0,H=p?!1:!!((J=y==null?void 0:y.listItems)!=null&&J.errorMessage),q=H||f||C,Q=c&&!H&&s&&(v||E);w.useLayoutEffect(()=>{var X;(X=B.current)!=null&&X.scrollHeight&&Y(B.current.scrollHeight+i)},[o==null?void 0:o[t],F,B]),w.useEffect(()=>{var le,j;const X=((N==null?void 0:N.length)||0)>5,K=!p&&(((j=(le=y==null?void 0:y.listItems)==null?void 0:le.fields)==null?void 0:j.length)||0)>1;_(X&&!K),I(K)},[y,p,N==null?void 0:N.length]),w.useEffect(()=>{M(m?N:D)},[y,m,D,N]);const ee=()=>{v?x(X=>!X):S(X=>!X)};return u.jsxs(u.Fragment,{children:[u.jsx(Yn,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(mI,{data:((R=y==null?void 0:y.listItems)==null?void 0:R.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx(P5,{className:s?"":"slideUp",height:V,children:u.jsx(l.Stack,{ref:B,gap:1,margin:"12px",children:d&&!(F!=null&&F.length)?u.jsxs(u.Fragment,{children:[u.jsx(rn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(rn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:q?u.jsx(l.Box,{margin:"8px 0",children:u.jsx(u2,{error:C,isLoading:d,redirectToAdminTab:b,isFailed:f,showErrorIcon:!L,connectorNames:h,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):F!=null&&F.length?F==null?void 0:F.map(X=>{const{value:K,label:ne,deepLink:le,type:j}=X,oe="errorMessage"in X?X.errorMessage:null,_e="statusCode"in X?X.statusCode:null;return u.jsxs("div",{children:[u.jsx(B5,{variant:"overline_medium",children:ne}),u.jsx(u2,{value:K,error:oe,deepLink:le,statusCode:_e,isLoading:d,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:ne})]},ne)}):u.jsx(l.Box,{margin:"8px 0",children:u.jsx(k0,{variant:"body_sm_regular",children:j4})})})})}),!C&&Q&&u.jsx(U5,{variant:"body_xs_medium",onClick:ee,children:v?u.jsxs(u.Fragment,{children:[m?Dy:H0,u.jsx($5,{src:Fy,transformAngle:W})]}):H0})]})},II={connectorCards:null,cardSpecificData:null,connectorApiStatus:te.IDLE,conversationMetaDataApiStatus:te.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},gi="/v1/api",_I=`${gi}/connectors/cards`,SI=`${gi}/connectors/cards/:id/data`,AI=`${gi}/connectors/:connectorId/user-auth/status`,TI=`${gi}/connectors/:connectorId/user-auth/start`,LI=({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)),ve({url:`${_I}?${o.toString()}`,method:Le.GET})},OI=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),ve({url:`${SI.replace(":id",e)}?${o.toString()}`,method:Le.GET})},p2=va({name:"connectorCardLibrary",initialState:II,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(mi.pending,t=>{t.connectorApiStatus=te.LOADING}).addCase(mi.fulfilled,(t,n)=>{t.connectorApiStatus=te.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(mi.rejected,t=>{t.connectorApiStatus=te.FAILED}).addCase(vs.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:te.LOADING}}).addCase(vs.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]:te.IDLE}}).addCase(vs.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:te.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):y0;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),mi=on("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n,connectorId:r})=>{var c;const o=await LI({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.map(d=>Rf(d)).sort((d,f)=>(d==null?void 0:d.priority)-(f==null?void 0:f.priority)),connectorsEnabled:a}}),vs=on("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await OI(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&Te({message:_f,type:sn}),{data:v0(i),status:c}):(r&&Te({message:If,type:Ue}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||y0})}}),kI=p2.reducer,h2=p2.actions,g2="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",FI="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",DI="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",m2=e=>e.write.createObjectList,NI=e=>e.write.createObjectConnectorNamesList,b2=e=>e.write.linkObjectList,RI=e=>e.write.editObjectList,Rl=e=>e.write.objectDict,MI=e=>e.write.formFields,jI=e=>e.write.linkCardApiStatus,PI=e=>e.write.unlinkCardApiStatus,BI=e=>e.write.dependentFieldsMap,VI=e=>e.write.createFormApiStatus,GI=e=>e.write.updateFormApiStatus,HI=e=>e.write.currentResourceDetails,WI=e=>e.write.currentResourceDetailsApiStatus,y2=e=>e.write.currentCardInEdit,x2=e=>e.write.hasUnsavedChanges,ZI=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,C2=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)&&ZI(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),E2=(e,t)=>JSON.stringify(C2(e))===JSON.stringify(C2(t)),zI=e=>W4.replace("{{connectorName}}",e),XI=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=ht(),{sendTrackingEvent:c}=w.useContext(He),f=be(PI)===te.LOADING,g=()=>{s&&o&&i(di({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(Jb,{connector_name:a,conversation_id:s}),t(!1),r(),Te({message:e6,type:sn})}).catch(()=>{Te({message:t6,type:sn})})};return u.jsx(Yn,{shown:e,setShown:t,showCloseButton:!0,children:u.jsxs(l.Stack,{width:"400px",padding:"20px",gap:"8px",children:[u.jsx(l.Typography,{variant:"h2",children:H4}),u.jsx(l.Typography,{variant:"body2",children:zI(a)}),u.jsxs(l.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[u.jsx(l.Button,{variant:"text",onClick:()=>t(!1),children:vc}),u.jsx(l.Button,{disabled:f,color:"error",onClick:g,children:h0})]})]})})},YI=({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(Z5,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:d,iconSrc:f,action:g})=>u.jsx(l.Tooltip,{title:d,placement:"bottom",children:u.jsx(oo,{onClick:g,disabled:c,children:u.jsx("img",{src:f})})},i))}),o&&u.jsx(l.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(oo,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},v2=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=ht(),{availableFeatures:c,sendTrackingEvent:d,conversationId:f,currentSmIds:g}=w.useContext(He),{userGroupId:y}=Rt()||{},[C,b]=w.useState(!!s),[h,p]=w.useState(!1),[m,x]=w.useState(!1),[E,I]=w.useState(!1),{id:v,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let N=v;A&&(N=`${N}_${A}`);const{data:D,cardType:F,cardErrorMessage:M,connectorNames:B}=(n==null?void 0:n[N])??{},V=(B==null?void 0:B[0])||"",Y=(o==null?void 0:o[N])===te.LOADING,W=(o==null?void 0:o[N])===te.FAILED,H=!!(rt(c,i0)&&A),q=w.useMemo(()=>{var j,oe;if(M||W||!(rt(c,T4)&&S.some(_e=>_e.type==="edit")))return!1;switch(F){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?(oe=D==null?void 0:D.listItems)==null?void 0:oe.fields.some(_e=>_e.externalResourceId):!1;default:return!1}},[D,F,c,S,t,M,W]),Q=w.useCallback((j=!1)=>{const oe=j?Ub:$b;r&&v&&f&&i(vs({id:v,email:r,conversationId:f,externalResourceId:A})).unwrap().then(_e=>{const z={...E0(_e,_,j,!0),sm_ids:g};d(oe,z)}).catch(_e=>{const z={...E0(_e,_,j,!1),sm_ids:g};d(oe,z)})},[i,r,v,_,d,f,A,g]);w.useEffect(()=>{C&&Q(!0)},[C,Q]);const ee=(j,oe)=>{var z;j==null||j.stopPropagation(),i(vs({id:oe,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{d(Pb,{id:oe})});const _e=j.target.tagName==="BUTTON"?(z=j.target)==null?void 0:z.firstChild:j.target;_e.className&&(_e.className=""),setTimeout(()=>_e.className="selected",1)},G=(j,oe)=>{j.stopPropagation(),!(n!=null&&n[oe])&&!Y&&Q(),d(C?jb:Mb,{id:oe}),b(_e=>!_e)},J=j=>{j.stopPropagation();const oe=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;p(!!oe)},R=j=>{var _e,z;j.stopPropagation(),d(o0,{card_title:_,connector_name:V,ug_id:y,sm_ids:g});let oe;F==="flat"?oe=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:F==="flat_with_list"&&(oe=(z=(_e=D==null?void 0:D.listItems)==null?void 0:_e.fields[0])==null?void 0:z.externalResourceId),oe?i(mo({...t,externalResourceId:oe})):Te({message:Tn,type:Ue})},X=j=>{j.stopPropagation(),x(!0)},K=()=>{I(!0)},ne=()=>{I(!1)},le=[{id:"unlink",label:h0,disabled:Y,shown:H,iconSrc:FI,action:j=>X(j)},{id:"refresh",label:u0,disabled:Y,shown:!0,iconSrc:g2,action:j=>ee(j,v)},{id:"edit",label:g0,disabled:Y,shown:q,iconSrc:DI,action:j=>R(j)}];return u.jsxs(N5,{"data-testid":`test_${v}`,onMouseEnter:K,onMouseLeave:ne,children:[u.jsxs(R5,{className:C?"hiver-card-expanded":"",onClick:j=>G(j,N),children:[u.jsxs(M5,{children:[L&&u.jsx("img",{src:L,alt:_}),u.jsx(l.Tooltip,{title:h?_:"",placement:"bottom",children:u.jsx(j5,{variant:"body_sm_regular",onMouseOver:j=>J(j),onMouseLeave:j=>J(j),children:_})})]}),u.jsxs(O0,{children:[u.jsx(YI,{actions:le,isHovered:E}),u.jsx(l.Tooltip,{title:C?d0:Cc,placement:"bottom",children:u.jsx(oo,{onClick:j=>G(j,N),children:u.jsx(Lc,{className:C?"":"hiver-up"})})})]})]}),u.jsx(f2,{id:N,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:C}),u.jsx(XI,{showUnlinkModal:m,setShowUnlinkModal:x,cardId:v,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:V})]})},JI="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%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M6.86993%200.652446C7.56922%200.248711%208.43078%200.248711%209.13007%200.652446L13.7981%203.34755C14.4974%203.75129%2014.9282%204.49742%2014.9282%205.30489V10.6951C14.9282%2011.5026%2014.4974%2012.2487%2013.7981%2012.6524L9.13007%2015.3476C8.43078%2015.7513%207.56922%2015.7513%206.86993%2015.3476L2.20187%2012.6524C1.50258%2012.2487%201.0718%2011.5026%201.0718%2010.6951V5.30489C1.0718%204.49742%201.50258%203.75129%202.20187%203.34755L6.86993%200.652446Z'%20fill='%23FFD122'/%3e%3cg%20filter='url(%23filter0_d_360_39563)'%3e%3cpath%20d='M5.83154%204.43359V4.43359C6.84296%204.43359%207.66287%205.25351%207.66287%206.26492V11.5179V11.5179C6.65146%2011.5179%205.83154%2010.698%205.83154%209.68661V4.43359Z'%20fill='white'/%3e%3c/g%3e%3cg%20filter='url(%23filter1_d_360_39563)'%3e%3cpath%20d='M8.57812%207.66211V7.66211C9.58954%207.66211%2010.4095%208.48202%2010.4095%209.49343V11.7103V11.7103C9.39804%2011.7103%208.57812%2010.8904%208.57812%209.87898V7.66211Z'%20fill='white'/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_360_39563'%20x='4.76488'%20y='3.36693'%20width='3.96488'%20height='9.21732'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset/%3e%3cfeGaussianBlur%20stdDeviation='0.533333'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.114019%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_360_39563'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_360_39563'%20result='shape'/%3e%3c/filter%3e%3cfilter%20id='filter1_d_360_39563'%20x='7.51146'%20y='6.59544'%20width='3.96488'%20height='6.18216'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset/%3e%3cfeGaussianBlur%20stdDeviation='0.533333'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.114019%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_360_39563'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_360_39563'%20result='shape'/%3e%3c/filter%3e%3c/defs%3e%3c/svg%3e",Ml=e=>ve({url:AI.replace(":connectorId",e),method:Le.GET}),qI=e=>ve({url:TI.replace(":connectorId",e),method:Le.POST}),QI={byConnectorId:{}},$I=new Set(["popup_blocked","in_progress_timeout","start_user_auth_failed","popup_closed","cancelled"]),w2=va({name:"userAuth",initialState:QI,reducers:{userAuthStatusReceived(e,t){const{connectorId:n,state:r,reason:o,externalUserId:s,authoritative:a}=t.payload,i=e.byConnectorId[n];(i==null?void 0:i.state)==="in_progress"&&r!=="connected"&&!a||(e.byConnectorId[n]={state:r,reason:o,externalUserId:s,connectUrl:i==null?void 0:i.connectUrl,lastChecked:Date.now()})},userAuthRequired(e,t){const{connectorId:n,connectUrl:r,reason:o}=t.payload,s=e.byConnectorId[n];(s==null?void 0:s.state)!=="in_progress"&&(e.byConnectorId[n]={state:"disconnected",reason:o,connectUrl:r,externalUserId:s==null?void 0:s.externalUserId,lastChecked:Date.now()})},userAuthInProgress(e,t){const{connectorId:n}=t.payload,r=e.byConnectorId[n]||{state:"unknown"};e.byConnectorId[n]={...r,state:"in_progress",lastChecked:Date.now()}},userAuthCompleted(e,t){const{connectorId:n,externalUserId:r}=t.payload;e.byConnectorId[n]={state:"connected",externalUserId:r,lastChecked:Date.now()}},userAuthFailed(e,t){const{connectorId:n,reason:r}=t.payload,o=e.byConnectorId[n];e.byConnectorId[n]={...o,state:$I.has(r)?"disconnected":"reauth_required",reason:r,lastChecked:Date.now()}},userAuthReset(e,t){delete e.byConnectorId[t.payload.connectorId]}}}),{userAuthStatusReceived:jl,userAuthRequired:UI,userAuthInProgress:KI,userAuthCompleted:oF,userAuthFailed:bo,userAuthReset:sF}=w2.actions,e_=w2.reducer,t_={state:"unknown"},ws=(e,t)=>e.userAuth.byConnectorId[t]||t_,n_=new Set(["disconnected","in_progress","reauth_required","workspace_mismatch"]),r_=(e,t)=>n_.has(ws(e,t).state),o_=e=>{for(const[t,n]of Object.entries(e.userAuth.byConnectorId))if(n.state==="in_progress")return t},s_=2e3,a_=5*60*1e3;function i_(e,t={}){const n=ht(),r=un(),o=be(g=>ws(g,e)),{onConnected:s}=t,a=w.useRef(!1),i=w.useRef(null),c=w.useRef(null),d=w.useRef(!1);w.useEffect(()=>{o.state!=="connected"&&(d.current=!1)},[o.state]),Ft({queryKey:["userAuthStatus",e],queryFn:async()=>{const g=await Ml(e),y=(g==null?void 0:g.data)??g;return y.state==="connected"&&(n(jl({connectorId:e,state:y.state,reason:y.reason,externalUserId:y.external_user_id})),c.current&&!c.current.closed&&c.current.close(),c.current=null,d.current||(d.current=!0,s==null||s())),y},enabled:o.state==="in_progress",refetchInterval:o.state==="in_progress"?s_:!1,refetchOnWindowFocus:!1}),w.useEffect(()=>{if(o.state!=="in_progress"){i.current&&(clearTimeout(i.current),i.current=null);return}return i.current=setTimeout(()=>{n(bo({connectorId:e,reason:"in_progress_timeout"}))},a_),()=>{i.current&&(clearTimeout(i.current),i.current=null)}},[o.state,e,n]),w.useEffect(()=>{if(o.state!=="in_progress"){if(c.current&&!c.current.closed)try{c.current.close()}catch{}c.current=null}},[o.state]),w.useEffect(()=>{if(o.state!=="in_progress")return;const g=setInterval(async()=>{const y=c.current;if(!(!y||!y.closed)){clearInterval(g),c.current=null;try{const C=await Ml(e),b=(C==null?void 0:C.data)??C;b.state==="connected"||b.state==="reauth_required"||b.state==="workspace_mismatch"?(n(jl({connectorId:e,state:b.state,reason:b.reason,externalUserId:b.external_user_id,authoritative:!0})),b.state==="connected"&&!d.current&&(d.current=!0,s==null||s())):n(bo({connectorId:e,reason:"popup_closed"}))}catch{n(bo({connectorId:e,reason:"popup_closed"}))}}},800);return()=>clearInterval(g)},[o.state,e,n,s]);const f=w.useCallback(async()=>{if(!a.current){a.current=!0,n(KI({connectorId:e}));try{const g=await qI(e),y=(g==null?void 0:g.data)??g,C=y==null?void 0:y.auth_url;if(!C)throw new Error("No auth_url returned from /user-auth/start");const b=600,h=700,p=window.screen.width/2-b/2,m=window.screen.height/2-h/2,x=window.open(C,"user_auth_popup",`width=${b},height=${h},left=${p},top=${m},menubar=no,toolbar=no`);c.current=x,x||n(bo({connectorId:e,reason:"popup_blocked"}))}catch(g){console.error("startUserAuth failed: ",g),n(bo({connectorId:e,reason:"start_user_auth_failed"}))}finally{a.current=!1,r.invalidateQueries({queryKey:["userAuthStatus",e]})}}},[e,n,r]);return{entry:o,state:o.state,connect:f,isStarting:a.current}}const I2=(e,t,n)=>({queryKey:["userAuthStatus",e,"initial"],queryFn:async()=>{const r=await Ml(e),o=(r==null?void 0:r.data)??r;return t(jl({connectorId:e,state:o.state,reason:o.reason,externalUserId:o.external_user_id})),o},enabled:n,refetchOnWindowFocus:!1,staleTime:3e4});function _2(e,t){const n=ht(),r=Ft(I2(e,n,t));return{isLoading:t&&r.isLoading}}function c_(e){const t=ht();return{isResolving:Og({queries:e.map(r=>I2(r,t,!0))}).some(r=>r.isLoading)}}const l_=l.styled(l.Box)`
|
|
2193
2193
|
display: flex;
|
|
2194
2194
|
flex-direction: column;
|
|
2195
2195
|
align-items: stretch;
|
|
@@ -2198,13 +2198,13 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2198
2198
|
against the tab bar above it. */
|
|
2199
2199
|
margin-top: 12px;
|
|
2200
2200
|
padding: 4px 4px 24px;
|
|
2201
|
-
background: ${((
|
|
2202
|
-
border: 1px solid ${((
|
|
2201
|
+
background: ${((Yh=l.theme.palette.gray)==null?void 0:Yh.gray6a)??"#F6F8FC"};
|
|
2202
|
+
border: 1px solid ${((Jh=l.theme.palette.gray)==null?void 0:Jh.gray6)??"#ECEFF6"};
|
|
2203
2203
|
border-radius: 12px;
|
|
2204
2204
|
gap: 16px;
|
|
2205
2205
|
`,u_=l.styled(l.Box)`
|
|
2206
|
-
background: ${((
|
|
2207
|
-
border: 1px solid ${((
|
|
2206
|
+
background: ${((qh=l.theme.palette.common)==null?void 0:qh.white)??"#FFFFFF"};
|
|
2207
|
+
border: 1px solid ${((Qh=l.theme.palette.gray)==null?void 0:Qh.gray6)??"#ECEFF6"};
|
|
2208
2208
|
border-radius: 10px;
|
|
2209
2209
|
padding: 48px 0;
|
|
2210
2210
|
display: flex;
|
|
@@ -2216,7 +2216,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2216
2216
|
justify-content: center;
|
|
2217
2217
|
gap: 10px;
|
|
2218
2218
|
position: relative;
|
|
2219
|
-
`,
|
|
2219
|
+
`,S2=l.styled("img")`
|
|
2220
2220
|
width: 50px;
|
|
2221
2221
|
height: 50px;
|
|
2222
2222
|
border-radius: 8px;
|
|
@@ -2244,7 +2244,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2244
2244
|
font-size: 14px;
|
|
2245
2245
|
line-height: 18px;
|
|
2246
2246
|
background: ${l.theme.palette.purple.primary};
|
|
2247
|
-
color: ${((
|
|
2247
|
+
color: ${(($h=l.theme.palette.common)==null?void 0:$h.white)??"#FFFFFF"};
|
|
2248
2248
|
/* Doubled selector beats MUI's default contained-button padding
|
|
2249
2249
|
(6px 16px) so the horizontal padding lands at exactly 12px (Figma 10:2936). */
|
|
2250
2250
|
&& {
|
|
@@ -2256,10 +2256,10 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2256
2256
|
}
|
|
2257
2257
|
&.Mui-disabled {
|
|
2258
2258
|
background: ${l.theme.palette.purple.primary};
|
|
2259
|
-
color: ${((
|
|
2259
|
+
color: ${((Uh=l.theme.palette.common)==null?void 0:Uh.white)??"#FFFFFF"};
|
|
2260
2260
|
opacity: 0.55;
|
|
2261
2261
|
}
|
|
2262
|
-
`,h_=({color:e="#5C6470",size:t=19})=>u.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[u.jsx("path",{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3z",fill:e}),u.jsx("path",{d:"M21 9l-3.99-4v3H10v2h7.01v3L21 9z",fill:e})]}),S2=({connectorId:e,connectorName:t,connectorLogo:n,variant:r,reason:o,onConnected:s})=>{var y,C;const{connect:a}=i_(e,{onConnected:s}),i=w.useCallback(()=>{a()},[a]);if(r==="connected")return null;const c=r==="reauth_required"||r==="workspace_mismatch",d={disconnected:{title:`Sign in to use ${t}`,body:"Connect your account to view details directly from your inbox.",cta:"Authenticate"},in_progress:{title:`Connecting to ${t}`,body:"Complete authentication in the new window.",cta:"Authenticating…"},reauth_required:{title:"Authentication failed",body:"We couldn't verify your credentials. Please try signing in again.",cta:"Re-authenticate"},workspace_mismatch_workspace:{title:"Workspace access required",body:`Your ${t} account doesn't have access to the workspace your admin connected. Reconnect using an account with the right access.`,cta:"Re-authenticate"},workspace_mismatch_site:{title:"Site access required",body:`Your ${t} account doesn't have access to the site your admin connected. Reconnect using an account with the right access.`,cta:"Re-authenticate"},workspace_mismatch_generic:{title:"Access required",body:`Your ${t} account doesn't have the access your admin set up. Reconnect with the right account.`,cta:"Re-authenticate"},workspace_mismatch_extra:{title:"No shared workspace",body:`Your ${t} account isn't a member of any workspace your admin connected. Sign in with an account that has access to one of them.`,cta:"Re-authenticate"},unknown:{title:`Sign in to use ${t}`,body:"Connect your account to view details directly from your inbox.",cta:"Authenticate"}};let f=r;r==="workspace_mismatch"&&(o==="site_access_denied"?f="workspace_mismatch_site":o==="workspace_mismatch"?f="workspace_mismatch_workspace":o==="workspace_not_authorized"?f="workspace_mismatch_extra":f="workspace_mismatch_generic");const g=d[f]??d.disconnected;return u.jsxs(l_,{sx:c?{background:((y=l.theme.palette.orange)==null?void 0:y.light)??"#FFEFE0",border:"none"}:void 0,children:[u.jsx(u_,{children:u.jsxs(d_,{children:[u.jsx(_2,{src:JI,alt:"Hiver"}),u.jsx(h_,{color:((C=l.theme.palette.gray)==null?void 0:C.gray3)??"#5C6470"}),u.jsxs(l.Stack,{sx:{position:"relative"},children:[u.jsx(_2,{src:n,alt:t}),c&&u.jsx(f_,{"aria-label":"error",children:"!"})]})]})}),u.jsxs(l.Stack,{gap:"16px",alignItems:"center",sx:{width:"100%",padding:"0 8px"},children:[u.jsxs(l.Stack,{gap:"6px",alignItems:"center",sx:{width:"100%",textAlign:"center"},children:[u.jsx(l.Typography,{sx:{fontWeight:600,fontSize:"16px",lineHeight:"18px",color:"#343C45"},children:g.title}),u.jsx(l.Typography,{sx:{fontWeight:500,fontSize:"13px",lineHeight:"18px",color:"#6F7C90",maxWidth:"220px"},children:g.body})]}),u.jsx(p_,{variant:"contained",onClick:i,disabled:r==="in_progress",disableElevation:!0,children:g.cta})]})]})},g_=({card:e,email:t,specificCardData:n,specificConnectorApiStatus:r,defaultOpenState:o,onCardUnlinking:s,isPrimaryUserAuthCard:a=!0})=>{const i=dn(),c=e.connectorId??"",d=!!e.userAuthEnabled&&!!c,{isLoading:f}=I2(c,d),g=me(C=>Es(C,c));if(!d)return u.jsx(E2,{card:e,specificCardData:n,email:t,defaultOpenState:o,specificConnectorApiStatus:r,onCardUnlinking:s});const y=u.jsx(E2,{card:e,specificCardData:n,email:t,defaultOpenState:o,specificConnectorApiStatus:r,onCardUnlinking:s});return g.state==="connected"?y:g.state==="unknown"?f?a?u.jsxs(l.Box,{sx:{flexGrow:1,display:"flex",flexDirection:"column",gap:"12px"},children:[u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]}):null:y:a?u.jsx(l.Box,{sx:{flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"flex-start"},children:u.jsx(S2,{connectorId:c,connectorName:e.connectorName??e.title,connectorLogo:e.logoUrl??"",variant:g.state,reason:g.reason,onConnected:()=>{i.invalidateQueries({queryKey:["lookup","bulk"]}),s()}})}):null},m_=Number.MAX_SAFE_INTEGER,b_=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=w.useContext(Ge),i=rt(s,L4)?m_:1,c=f=>f.externalResourceId?`${f.id}_${f.externalResourceId}`:f.id,d=new Map;return e.forEach(f=>{f.userAuthEnabled&&f.connectorId&&!d.has(f.connectorId)&&d.set(f.connectorId,c(f))}),u.jsx(l.Box,{sx:{flexGrow:1,display:"flex",flexDirection:"column"},children:e.map((f,g)=>{const y=c(f);return u.jsx("div",{style:{display:"contents"},children:u.jsx(g_,{card:f,specificCardData:n,email:t??"",defaultOpenState:g<i,specificConnectorApiStatus:r,onCardUnlinking:o,isPrimaryUserAuthCard:!f.connectorId||d.get(f.connectorId)===y})},y)})})},A2=new Set(["disconnected","in_progress","reauth_required","workspace_mismatch"]),y_=({connector:e,onConnected:t})=>{I2(e.connectorId,!0);const n=me(r=>Es(r,e.connectorId));return A2.has(n.state)?u.jsx(l.Box,{sx:{flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"flex-start"},children:u.jsx(S2,{connectorId:e.connectorId,connectorName:e.connectorName,connectorLogo:e.connectorLogo,variant:n.state,reason:n.reason,onConnected:t})}):null},x_=({connectors:e,onConnected:t,children:n})=>{const r=me(o=>e.some(s=>A2.has(Es(o,s.connectorId).state)));return u.jsxs(u.Fragment,{children:[e.map(o=>u.jsx(y_,{connector:o,onConnected:t},o.connectorId)),!r&&n]})},T2=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"})))),C_=({color:e="#5C6470",size:t=24})=>u.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[u.jsx("path",{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3z",fill:e}),u.jsx("path",{d:"M21 9l-3.99-4v3H10v2h7.01v3L21 9z",fill:e})]}),E_=()=>{var i,c,d;const e=gt(),t=me(o_),n=me(c2),r=w.useMemo(()=>{if(!(!t||!n))return n.find(f=>f.id===t||f.connectorId===t)},[t,n]),o=me(Rl),s=w.useMemo(()=>{var f;if(r!=null&&r.logoUrl)return r.logoUrl;if(!(!t||!o))return((f=Object.values(o).find(g=>g.connectorId===t))==null?void 0:f.logoUrl)||void 0},[r,o,t]);if(!t)return null;const a=()=>{e(bo({connectorId:t,reason:"cancelled"}))};return u.jsx(qn,{shown:!0,setShown:a,showCloseButton:!0,borderRadius:8,children:u.jsxs(l.Stack,{sx:{width:"399px",padding:"8px 8px 32px",alignItems:"center",gap:"24px",background:((i=l.theme.palette.common)==null?void 0:i.white)??"#FFFFFF"},children:[u.jsx(l.Stack,{sx:{width:"100%",alignItems:"center",justifyContent:"center",padding:"52px 0",background:"#F5EAF6",borderRadius:"8px"},children:u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"12px",children:[u.jsx(T2,{width:64,height:64}),u.jsx(C_,{color:((c=l.theme.palette.gray)==null?void 0:c.gray3)??"#5C6470"}),s&&u.jsx("img",{src:s,alt:(r==null?void 0:r.connectorName)??"",width:64,height:64,style:{borderRadius:8}})]})}),u.jsxs(l.Stack,{gap:"8px",alignItems:"center",children:[u.jsx(l.Typography,{sx:{fontWeight:500,fontSize:"16px",lineHeight:"21px",letterSpacing:"-0.16px",color:"#000000"},children:"Connection in progress"}),u.jsx(l.Typography,{sx:{fontWeight:400,fontSize:"14px",lineHeight:"18px",color:((d=l.theme.palette.gray)==null?void 0:d.gray2)??"#4D596C"},children:"Complete authentication in the new window"})]})]})})},yo=({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 On({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}yo.CaseView=On;const v_="Bring your favourite tools into Hiver",w_="Plugin image",I_="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",__="Enable Connectors",S_="Enable Apps",A_="Enable Cards",T_="Learn more",L_="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",O_="Contact your admin to enable this",k_="https://youtu.be/ODcJnzZLb50",F_="connectors-module/assets/connectors-images/connector-mainpage.png",D_="connectors-module/assets/connectors-images/connector-mainpage-apps.png",N_="Explore connectors",R_="Connectors",M_=l.styled(l.Box)`
|
|
2262
|
+
`,h_=({color:e="#5C6470",size:t=19})=>u.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[u.jsx("path",{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3z",fill:e}),u.jsx("path",{d:"M21 9l-3.99-4v3H10v2h7.01v3L21 9z",fill:e})]}),A2=({connectorId:e,connectorName:t,connectorLogo:n,variant:r,reason:o,onConnected:s})=>{var y,C;const{connect:a}=i_(e,{onConnected:s}),i=w.useCallback(()=>{a()},[a]);if(r==="connected")return null;const c=r==="reauth_required"||r==="workspace_mismatch",d={disconnected:{title:`Sign in to use ${t}`,body:"Connect your account to view details directly from your inbox.",cta:"Authenticate"},in_progress:{title:`Connecting to ${t}`,body:"Complete authentication in the new window.",cta:"Authenticating…"},reauth_required:{title:"Authentication failed",body:"We couldn't verify your credentials. Please try signing in again.",cta:"Re-authenticate"},workspace_mismatch_workspace:{title:"Workspace access required",body:`Your ${t} account doesn't have access to the workspace your admin connected. Reconnect using an account with the right access.`,cta:"Re-authenticate"},workspace_mismatch_site:{title:"Site access required",body:`Your ${t} account doesn't have access to the site your admin connected. Reconnect using an account with the right access.`,cta:"Re-authenticate"},workspace_mismatch_generic:{title:"Access required",body:`Your ${t} account doesn't have the access your admin set up. Reconnect with the right account.`,cta:"Re-authenticate"},workspace_mismatch_extra:{title:"No shared workspace",body:`Your ${t} account isn't a member of any workspace your admin connected. Sign in with an account that has access to one of them.`,cta:"Re-authenticate"},unknown:{title:`Sign in to use ${t}`,body:"Connect your account to view details directly from your inbox.",cta:"Authenticate"}};let f=r;r==="workspace_mismatch"&&(o==="site_access_denied"?f="workspace_mismatch_site":o==="workspace_mismatch"?f="workspace_mismatch_workspace":o==="workspace_not_authorized"?f="workspace_mismatch_extra":f="workspace_mismatch_generic");const g=d[f]??d.disconnected;return u.jsxs(l_,{sx:c?{background:((y=l.theme.palette.orange)==null?void 0:y.light)??"#FFEFE0",border:"none"}:void 0,children:[u.jsx(u_,{children:u.jsxs(d_,{children:[u.jsx(S2,{src:JI,alt:"Hiver"}),u.jsx(h_,{color:((C=l.theme.palette.gray)==null?void 0:C.gray3)??"#5C6470"}),u.jsxs(l.Stack,{sx:{position:"relative"},children:[u.jsx(S2,{src:n,alt:t}),c&&u.jsx(f_,{"aria-label":"error",children:"!"})]})]})}),u.jsxs(l.Stack,{gap:"16px",alignItems:"center",sx:{width:"100%",padding:"0 8px"},children:[u.jsxs(l.Stack,{gap:"6px",alignItems:"center",sx:{width:"100%",textAlign:"center"},children:[u.jsx(l.Typography,{sx:{fontWeight:600,fontSize:"16px",lineHeight:"18px",color:"#343C45"},children:g.title}),u.jsx(l.Typography,{sx:{fontWeight:500,fontSize:"13px",lineHeight:"18px",color:"#6F7C90",maxWidth:"220px"},children:g.body})]}),u.jsx(p_,{variant:"contained",onClick:i,disabled:r==="in_progress",disableElevation:!0,children:g.cta})]})]})},g_=({card:e,email:t,specificCardData:n,specificConnectorApiStatus:r,defaultOpenState:o,onCardUnlinking:s,isPrimaryUserAuthCard:a=!0})=>{const i=un(),c=e.connectorId??"",d=!!e.userAuthEnabled&&!!c,{isLoading:f}=_2(c,d),g=be(C=>ws(C,c));if(!d)return u.jsx(v2,{card:e,specificCardData:n,email:t,defaultOpenState:o,specificConnectorApiStatus:r,onCardUnlinking:s});const y=u.jsx(v2,{card:e,specificCardData:n,email:t,defaultOpenState:o,specificConnectorApiStatus:r,onCardUnlinking:s});return g.state==="connected"?y:g.state==="unknown"?f?a?u.jsxs(l.Box,{sx:{flexGrow:1,display:"flex",flexDirection:"column",gap:"12px"},children:[u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]}):null:y:a?u.jsx(l.Box,{sx:{flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"flex-start"},children:u.jsx(A2,{connectorId:c,connectorName:e.connectorName??e.title,connectorLogo:e.logoUrl??"",variant:g.state,reason:g.reason,onConnected:()=>{i.invalidateQueries({queryKey:["lookup","bulk"]}),s()}})}):null},m_=Number.MAX_SAFE_INTEGER,b_=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=w.useContext(He),i=rt(s,O4)?m_:1,c=f=>f.externalResourceId?`${f.id}_${f.externalResourceId}`:f.id,d=new Map;return e.forEach(f=>{f.userAuthEnabled&&f.connectorId&&!d.has(f.connectorId)&&d.set(f.connectorId,c(f))}),u.jsx(l.Box,{sx:{flexGrow:1,display:"flex",flexDirection:"column"},children:e.map((f,g)=>{const y=c(f);return u.jsx("div",{style:{display:"contents"},children:u.jsx(g_,{card:f,specificCardData:n,email:t??"",defaultOpenState:g<i,specificConnectorApiStatus:r,onCardUnlinking:o,isPrimaryUserAuthCard:!f.connectorId||d.get(f.connectorId)===y})},y)})})},T2=new Set(["disconnected","in_progress","reauth_required","workspace_mismatch"]),y_=({connector:e,onConnected:t})=>{_2(e.connectorId,!0);const n=be(r=>ws(r,e.connectorId));return T2.has(n.state)?u.jsx(l.Box,{sx:{flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"flex-start"},children:u.jsx(A2,{connectorId:e.connectorId,connectorName:e.connectorName,connectorLogo:e.connectorLogo,variant:n.state,reason:n.reason,onConnected:t})}):null},x_=({connectors:e,onConnected:t,children:n})=>{const r=be(o=>e.some(s=>T2.has(ws(o,s.connectorId).state)));return u.jsxs(u.Fragment,{children:[e.map(o=>u.jsx(y_,{connector:o,onConnected:t},o.connectorId)),!r&&n]})},L2=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"})))),C_=({color:e="#5C6470",size:t=24})=>u.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[u.jsx("path",{d:"M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3z",fill:e}),u.jsx("path",{d:"M21 9l-3.99-4v3H10v2h7.01v3L21 9z",fill:e})]}),E_=()=>{var i,c,d;const e=ht(),t=be(o_),n=be(l2),r=w.useMemo(()=>{if(!(!t||!n))return n.find(f=>f.id===t||f.connectorId===t)},[t,n]),o=be(Rl),s=w.useMemo(()=>{var f;if(r!=null&&r.logoUrl)return r.logoUrl;if(!(!t||!o))return((f=Object.values(o).find(g=>g.connectorId===t))==null?void 0:f.logoUrl)||void 0},[r,o,t]);if(!t)return null;const a=()=>{e(bo({connectorId:t,reason:"cancelled"}))};return u.jsx(Yn,{shown:!0,setShown:a,showCloseButton:!0,borderRadius:8,children:u.jsxs(l.Stack,{sx:{width:"399px",padding:"8px 8px 32px",alignItems:"center",gap:"24px",background:((i=l.theme.palette.common)==null?void 0:i.white)??"#FFFFFF"},children:[u.jsx(l.Stack,{sx:{width:"100%",alignItems:"center",justifyContent:"center",padding:"52px 0",background:"#F5EAF6",borderRadius:"8px"},children:u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"12px",children:[u.jsx(L2,{width:64,height:64}),u.jsx(C_,{color:((c=l.theme.palette.gray)==null?void 0:c.gray3)??"#5C6470"}),s&&u.jsx("img",{src:s,alt:(r==null?void 0:r.connectorName)??"",width:64,height:64,style:{borderRadius:8}})]})}),u.jsxs(l.Stack,{gap:"8px",alignItems:"center",children:[u.jsx(l.Typography,{sx:{fontWeight:500,fontSize:"16px",lineHeight:"21px",letterSpacing:"-0.16px",color:"#000000"},children:"Connection in progress"}),u.jsx(l.Typography,{sx:{fontWeight:400,fontSize:"14px",lineHeight:"18px",color:((d=l.theme.palette.gray)==null?void 0:d.gray2)??"#4D596C"},children:"Complete authentication in the new window"})]})]})})},yo=({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 On({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}yo.CaseView=On;const v_="Bring your favourite tools into Hiver",w_="Plugin image",I_="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",__="Enable Connectors",S_="Enable Apps",A_="Enable Cards",T_="Learn more",L_="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",O_="Contact your admin to enable this",k_="https://youtu.be/ODcJnzZLb50",F_="connectors-module/assets/connectors-images/connector-mainpage.png",D_="connectors-module/assets/connectors-images/connector-mainpage-apps.png",N_="Explore connectors",R_="Connectors",M_=l.styled(l.Box)`
|
|
2263
2263
|
padding-top: 20px;
|
|
2264
2264
|
`,j_=l.styled(l.Stack)`
|
|
2265
2265
|
width: 100%;
|
|
@@ -2291,7 +2291,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2291
2291
|
color: ${l.theme.palette.gray.gray1};
|
|
2292
2292
|
font-size: 13px;
|
|
2293
2293
|
margin-bottom: 24px;
|
|
2294
|
-
`,
|
|
2294
|
+
`,O2=l.styled(l.Button)`
|
|
2295
2295
|
width: 100%;
|
|
2296
2296
|
color: ${l.theme.palette.gray.black};
|
|
2297
2297
|
background-color: white;
|
|
@@ -2311,7 +2311,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2311
2311
|
color: ${l.theme.palette.gray.gray3};
|
|
2312
2312
|
`,W_=l.styled(l.Typography)`
|
|
2313
2313
|
color: ${l.theme.palette.gray.gray3};
|
|
2314
|
-
`,Z_="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",z_={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:X_}=z_,
|
|
2314
|
+
`,Z_="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",z_={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:X_}=z_,k2=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o,connectorId:s}=w.useContext(He),a=rt(r,S4),i=rt(r,ua),c=y=>{y.stopPropagation(),n(Nb),s?o==null||o.redirectToAdmin(s,{isEdit:!0,tabIndex:2}):o==null||o.redirectToAdmin()},d=y=>{y.stopPropagation(),n(Rb),window.open(L_,"_blank")},f=()=>{n(o4,{source:"main_tab"})},g=i?D_:F_;return u.jsxs(M_,{"data-testid":"noConnectors",children:[a?u.jsxs(u.Fragment,{children:[t?null:u.jsx(l.Typography,{variant:"h2",children:i?Ec:R_}),u.jsx(B_,{onClick:f,href:k_,target:"_blank",children:u.jsx(YE,{src:X_+g,alt:N_,aspectRatio:"1000/783"})})]}):u.jsxs(j_,{children:[u.jsx(P_,{variant:"body1_medium",children:v_}),u.jsx("img",{src:Z_,alt:w_})]}),u.jsx(V_,{variant:"body2",children:I_}),e?u.jsx(O2,{endIcon:u.jsx(l.icons.ArrowForward,{}),onClick:c,...a&&{size:"medium"},children:s?A_:i?S_:__}):u.jsxs(u.Fragment,{children:[u.jsx(O2,{onClick:d,children:T_}),u.jsxs(G_,{direction:"row",children:[u.jsx(H_,{}),u.jsx(W_,{variant:"caption",children:O_})]})]})]})},Y_=()=>{const{availableFeatures:e}=w.useContext(He),t=rt(e,ua),{connectorName:n,connectorId:r,isReady:o}=S0();return o?u.jsxs(L0,{children:[u.jsx(l.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:n&&r?u.jsx(da,{variant:"body_sm_medium",children:n}):u.jsxs(u.Fragment,{children:[t?u.jsx(_0,{width:"20px",height:"20px"}):u.jsx(T0,{}),u.jsx(da,{variant:"body_sm_medium",children:t?Ec:f0})]})}),u.jsxs(l.Stack,{gap:"12px",children:[u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(rn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]}):null},J_=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=w.useContext(He),[o,s]=w.useState(!1),a=w.useRef(null),[i,c]=w.useState(0),{templateUpdates:d}=e||{},{sections:f=[],actionButtons:g=[],title:y}=d||{},{version:C=""}=d||{},b=K4(C),h=w.useMemo(()=>U4(C),[C]),p=w.useMemo(()=>(g==null?void 0:g.filter(({isAdminPanelLink:I})=>!(!n&&I)))??[],[g,n]);if(w.useEffect(()=>{!h&&d&&_c(C,!0)},[h,C,d]),w.useLayoutEffect(()=>{var I;(I=a.current)!=null&&I.scrollHeight&&c(a.current.scrollHeight)},[a]),w.useEffect(()=>{d&&!b&&t(Vb,{update_version_id:C})},[]),!d||b)return null;const m=I=>{var v;I.stopPropagation(),s(_=>!_),(v=a.current)!=null&&v.scrollHeight&&c(a.current.scrollHeight),_c(C,!1,!0)},x=(I,v="",_=!1,A=!1)=>{var S;if(I.stopPropagation(),_&&A?t(Gb,{update_version_id:C}):A&&t(Hb,{update_version_id:C}),!_&&v){(S=window.open(v,"_blank"))==null||S.focus();return}E(I,!1),r==null||r.redirectToAdmin()},E=(I,v=!0)=>{I.stopPropagation(),_c(C,!1),s(!1),v&&t(Wb,{update_version_id:C})};return u.jsxs(ey,{children:[u.jsxs(ty,{children:[u.jsx(K5,{variant:"h3",children:y}),u.jsxs(l.Box,{children:[o?u.jsx(l.Tooltip,{title:B4,placement:"bottom",children:u.jsx(l.IconButton,{onClick:E,children:u.jsx(l.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,u.jsx(l.Tooltip,{title:o?P4:Cc,placement:"bottom",children:u.jsx(oo,{onClick:m,children:u.jsx(Lc,{className:o?"":"hiver-up"})})})]})]}),u.jsx(ny,{className:o?"slideDown":"slideUp",ref:a,height:i,children:u.jsxs(ry,{children:[f.map(({title:I,items:v,type:_})=>u.jsxs(cy,{children:[u.jsx(l.Typography,{variant:"body2_medium",children:I}),v.map(A=>{const S=_===z4,{deeplink:L,textHtml:N,imageUrl:D}=A,F=()=>u.jsx(G5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:N}});return u.jsx(oy,{component:"ul",children:u.jsxs(sy,{component:S?"li":"div",marginLeft:D?"0":"14px",children:[D?u.jsx("img",{src:D}):null,L?u.jsx(F0,{target:"_blank",underline:"none",onClick:M=>x(M,L),fontSize:"13px",children:F()}):F()]})},N)})]},I)),u.jsx(l.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:p.map(({text:I,link:v,isAdminPanelLink:_})=>u.jsx(ay,{variant:_?"contained":"text",children:u.jsx(iy,{variant:"caption",onClick:A=>x(A,v,_,!0),children:I})},I))})]})})]})},q_=({selectedEmail:e,conversationId:t})=>ve({url:vw.replace(":conversationId",""+t),method:Le.PATCH,data:{selectedEmail:e}}),Q_="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",F2=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}},$_=e=>{const{textRef:t,isOverflow:n}=F2(e.data.label);return u.jsx(l.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:u.jsx(ly,{ref:t,variant:"body_sm_regular",paddingTop:n?"5px":"0px",children:e.data.label})})},U_=e=>u.jsxs(mn.MenuList,{...e,children:[u.jsx(uy,{children:u.jsx(l.Typography,{variant:"body_sm_medium",children:My})}),e.children]}),K_=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=F2(e.data.label);return u.jsx(mn.Option,{...e,children:u.jsxs(l.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[u.jsx(l.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:u.jsx(dy,{ref:n,className:"dropdown-item-text",variant:"body_sm_regular",children:e.data.label})}),t?u.jsx("img",{src:Q_,width:"14px",height:"14px"}):null]})})},eS=e=>u.jsx(mn.ValueContainer,{...e,children:u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[u.jsx(l.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:l.theme.palette.gray.gray3,flexShrink:0}}),u.jsx(l.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),tS=e=>u.jsx(mn.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?u.jsx(l.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:l.theme.palette.gray.gray3}}):u.jsx(l.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:l.theme.palette.gray.gray3}})}),nS={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?l.theme.palette.gray.gray3:l.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${l.theme.palette.gray.gray3}`:"none",backgroundColor:l.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:l.theme.palette.gray.white,color:l.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?l.theme.palette.gray.gray7:l.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"})},rS=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=w.useContext(He),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 d=String((c==null?void 0:c.value)||"");d&&s&&q_({selectedEmail:d,conversationId:s}),o(d)};return u.jsx(l.Tooltip,{title:"Selected email",placement:"top",children:u.jsx("div",{style:{marginTop:"12px"},children:u.jsx(bs,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...bs.getDefaultComponents(),MenuList:U_,Option:K_,SingleValue:$_,DropdownIndicator:tS,ValueContainer:eS},root:n,styles:nS,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})};l.styled(l.Paper)`
|
|
2315
2315
|
width: stretch;
|
|
2316
2316
|
height: 100%;
|
|
2317
2317
|
position: absolute;
|
|
@@ -2335,7 +2335,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2335
2335
|
`,aS=l.styled(l.Box)`
|
|
2336
2336
|
margin-top: 12px;
|
|
2337
2337
|
height: 100%;
|
|
2338
|
-
`,iS="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",Pl=({children:e,rightNode:t,title:n="Back",backButtonTooltip:r,onClose:o})=>u.jsxs(oS,{children:[u.jsxs(l.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsxs(l.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[u.jsx(l.Tooltip,{title:r,placement:"bottom",children:u.jsx(l.IconButton,{onClick:o,children:u.jsx(sS,{src:iS})})}),u.jsx(l.Typography,{children:n})]}),u.jsx(l.Stack,{direction:"row",alignItems:"center",children:t})]}),u.jsx(aS,{children:e})]}),
|
|
2338
|
+
`,iS="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",Pl=({children:e,rightNode:t,title:n="Back",backButtonTooltip:r,onClose:o})=>u.jsxs(oS,{children:[u.jsxs(l.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[u.jsxs(l.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[u.jsx(l.Tooltip,{title:r,placement:"bottom",children:u.jsx(l.IconButton,{onClick:o,children:u.jsx(sS,{src:iS})})}),u.jsx(l.Typography,{children:n})]}),u.jsx(l.Stack,{direction:"row",alignItems:"center",children:t})]}),u.jsx(aS,{children:e})]}),D2=e=>e.common.previewCardData,N2=e=>e.common.previewCardApiStatus,cS=e=>e.common.selectedSuggestionType,lS=l.styled(l.Stack)`
|
|
2339
2339
|
width: 100%;
|
|
2340
2340
|
border-radius: 8px;
|
|
2341
2341
|
border: 1px solid ${l.theme.palette.gray.gray5};
|
|
@@ -2368,7 +2368,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2368
2368
|
height: 20px;
|
|
2369
2369
|
flex-shrink: 0;
|
|
2370
2370
|
}
|
|
2371
|
-
`,
|
|
2371
|
+
`,R2=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=ht(),[s,a]=w.useState(!1),[i,c]=w.useState(!0),{id:d="",cardTitle:f="",logoUrl:g}=e||{},y=t===te.LOADING,C=h=>{h.stopPropagation();const p=h.currentTarget.offsetWidth<h.currentTarget.scrollWidth;a(!!p)},b=h=>{var m;o(go({id:n,args:r,isRefresh:!0}));const p=h.target.tagName==="BUTTON"?(m=h.target)==null?void 0:m.firstChild:h.target;p.className&&(p.className=""),setTimeout(()=>p.className="selected",1)};return u.jsxs(lS,{children:[u.jsxs(uS,{direction:"row",justifyContent:"space-between",children:[y?u.jsxs(l.Stack,{gap:"6px",direction:"row",children:[u.jsx(rn,{width:"16px",height:"24px"}),u.jsx(rn,{width:"100px",height:"24px"})]}):u.jsxs(fS,{children:[g&&u.jsx("img",{src:g,alt:f}),u.jsx(l.Tooltip,{title:s?f:"",children:u.jsx(l.Typography,{variant:"h4",onMouseOver:h=>C(h),onMouseLeave:h=>C(h),children:f})})]}),u.jsxs(l.Stack,{direction:"row",alignItems:"center",children:[i?u.jsx(l.Tooltip,{title:u0,placement:"bottom",children:u.jsx(oo,{onClick:h=>b(h),children:u.jsx("img",{src:g2})})}):null,u.jsx(l.Tooltip,{title:i?d0:Cc,placement:"bottom",children:u.jsx(oo,{onClick:()=>c(h=>!h),children:u.jsx(Lc,{className:i?"":"hiver-up"})})})]})]}),u.jsx(f2,{id:d,cardTitle:f,specificCardData:{[d]:e},specificConnectorApiStatus:{[d]:t},isOpen:i})]})},M2={values:{},errors:{}},It={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",SET_FORM_DEFAULTS:"SET_FORM_DEFAULTS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},pS=(e,t)=>{const{type:n,payload:r}=t;switch(n){case It.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 It.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 It.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case It.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case It.SET_FORM_DEFAULTS:{if(!(r!=null&&r.values))return e;const{values:o}=r,s={...e.errors};for(const a in o??{})o[a]&&delete s[a];return{...e,errors:s,values:{...e.values,...o}}}case It.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 It.RESET_STATE:return M2}return e},j2=()=>w.useReducer(pS,M2),P2=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(C,b)=>{t({type:It.SET_FIELD_VALUE,payload:{value:{value:b,name:C}}})},a=w.useCallback(C=>{t({type:It.SET_FORM_DEFAULTS,payload:{values:C}})},[t]),i=w.useCallback(()=>Object.keys(o).filter(b=>!!o[b]).length>0,[o]),c=C=>{C.stopPropagation();const{name:b,value:h}=(C==null?void 0:C.target)||{};s(b,h)},d=(C,b)=>{C.stopPropagation();const{name:h}=(C==null?void 0:C.target)||{};s(h,b)},f=(C,b)=>{s(C,b||"")},g=(C,b)=>{e.errors[C]!==b&&t({type:It.SET_FIELD_ERROR,payload:{value:{name:C,value:b}}})},y=(C,b)=>{if(b){const h=b[C];h==null||h.forEach(p=>{var m;s(p,""),b[p]&&y(p,b),(m=n[p])!=null&&m.isRequired&&g(p,!0)})}};return w.useEffect(()=>{if(Array.isArray(r))return()=>{const C=r.map(b=>b.name);t({type:It.CLEAR_FIELDS,payload:{fieldNames:C}})}},[r,t]),{setValue:s,setFormDefaults:a,isErrorInValidations:i,inputChangeHandler:c,checkboxChangeHandler:d,dateChangeHandler:f,handleValidationError:g,clearDependentFields:y}},B2=({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,d,f,g)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const C=gw(n,y==null?void 0:y.args),b=Object.values((y==null?void 0:y.args)||{});if(C.length===b.length){r(Ar({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:d,args:{...xs(n,y==null?void 0:y.args),...xs(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:g}));return}return d([])}};return{...o,[s.name]:i}},{}),V2=({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,d)=>{var g,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(ii({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:d,args:{...xs(n,(g=a==null?void 0:a.interfaceDetails)==null?void 0:g.args),...xs(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...xs(f,i.args)}}))}}}},{}),G2=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=ht(),s=w.useMemo(()=>{if(e&&e.length){const i=B2({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((d,f)=>{const g=f.columns;if(!g)return d;const y=B2({formFields:g,formId:n,formState:t,appDispatch:o});return{...d,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=w.useMemo(()=>{const i=V2({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((d,f)=>{const g=f.columns;if(!g)return d;const y=V2({formFields:g,formId:n,formState:t,conversationId:r,appDispatch:o});return{...d,[f.name]:{createOptionList:y}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},hS=async({formId:e})=>{try{const t=await ve({url:ot(K1,{formId:e}),method:Le.GET}),n=t==null?void 0:t.data;return n.enabled?qf(n.defaults):{}}catch(t){throw console.error(t),t}},H2=({formId:e})=>["Global","WriteForm","FormDefaults",e],gS=({formId:e,enabled:t})=>{const n=w.useRef(!1),r=w.useRef(void 0);e&&e!==r.current&&(n.current=!0,r.current=e);const o=Ft({queryKey:H2({formId:e}),queryFn:async()=>{const s=await hS({formId:e});return n.current=!1,s},refetchOnMount:!0,enabled:n.current&&t,staleTime:0});return{enabledRef:n,...o}},W2=e=>Array.isArray(e)&&e.length>0,mS=async({formId:e,conversationId:t,inboxIds:n})=>{try{const r=new URLSearchParams;if(t&&r.set("conversation_id",String(t)),W2(n))for(const a of n)r.append("inbox_id",String(a));const o=await ve({url:ot(Pw,{formId:e})+"?"+r.toString(),method:Le.GET}),s=o==null?void 0:o.data;if(!s.enabled)throw new Error("Form default values are not enabled");return qf(s.defaults,!0)}catch(r){throw console.error(r),r}},Z2=({formId:e,conversationId:t,inboxIds:n})=>["Global","WriteForm","FormDefaults",e,t,n],z2=({formId:e,conversationId:t,inboxIds:n,enabled:r,fetchOnMount:o=!0})=>{const s=w.useRef(!0),a=w.useRef();e!==a.current&&(s.current=!0,a.current=e);const i=Ft({queryKey:Z2({formId:e,conversationId:t,inboxIds:n}),queryFn:async()=>{const d=await mS({formId:e,conversationId:t,inboxIds:n});return s.current=!1,d},refetchOnMount:o,enabled:s.current&&!!e&&!!t&&W2(n)&&r,staleTime:0}),c=w.useMemo(()=>{if(Object.keys(i.data??{}).length===0&&i.isSuccess)return!0},[i.data,i.isSuccess]);return{enabledRef:s,isNudgeRequired:c,...i}},bS=async({formId:e,data:t})=>{try{return await ve({url:ot(K1,{formId:e}),data:{defaults:t},method:Le.PUT}),{formId:e,data:t}}catch(n){throw console.error(n),n}},yS=({formId:e,conversationId:t,inboxIds:n,onSuccess:r,onError:o})=>{const s=un();return Kt({mutationFn:a=>bS({formId:e,data:a}),onSuccess:a=>{s.invalidateQueries({queryKey:H2({formId:e})}),s.invalidateQueries({queryKey:Z2({formId:e,conversationId:t,inboxIds:n})}),r==null||r(a),Te({message:"Form defaults updated successfully",type:sn})},onError:()=>{o==null||o(),Te({message:"Failed to update form defaults",type:Ue})}})},xS=({open:e,isEdit:t,formId:n,fields:r,connectorLogo:o,variables:s,customFormArgsEnabled:a,customFormArgsMap:i,title:c="Pre-fill fields",isLoading:d=!1,onSuccess:f,onClose:g})=>{const[y,C]=w.useState({}),{conversationId:b,currentSmIds:h}=w.useContext(He),{data:p}=X6({formId:n,formData:y,argsMap:i??{},enabled:!!n&&!!a,delay:500}),{data:m,isLoading:x,enabledRef:E}=gS({formId:n,enabled:!t&&!!e&&!!n}),{mutate:I,isPending:v}=yS({formId:n,conversationId:b,inboxIds:h,onSuccess:N=>{E.current=!0,f==null||f(N)}}),_=w.useMemo(()=>p!=null&&p.length?[...r,...p]:r,[r,p]);w.useEffect(()=>{m&&C(m)},[m]);const A=N=>{const D=_.map(M=>({name:M.name,type:M.isMultiSelect?"multi-select":M.type})),F=o9(N,D);I(F)},S=async({args:N,pagination:D},{formId:F,fieldName:M})=>{const B=await Q1({formId:F,fieldName:M},{pagination:D,args:N}),V=Array.isArray(B==null?void 0:B.data.data)?B.data.data:[];return{options:V,hasMore:!!V.length}},L=N=>{if(N.type==="multi-select"){C(F=>({...F,[N.name]:N.value}));return}const D=Zf(N.value)?N.value.value:N.value;C(F=>({...F,[N.name]:D}))};return u.jsx(uw,{open:e,defaultValues:m,formId:n,fields:_,connectorLogo:o,variables:s,title:`Pre-fill fields for ${c}`,isLoading:d||x,isSaving:v,fetchOptions:S,onSave:A,onClose:()=>g==null?void 0:g(),onCancel:()=>g==null?void 0:g(),onFieldChange:L})},CS=async({formId:e,args:t})=>{try{const n=await ve({url:ot(jw,{formId:e}),data:{args:t},method:Le.POST});return(n==null?void 0:n.data).fieldList.map(o=>Nl(o))}catch(n){throw console.error(n),n}},ES=({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]),Ft({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>CS({formId:e,args:t}),refetchOnMount:!1,enabled:n})},X2="connector-agent_auto_fill_nudge",vS=l.styled(l.Stack)`
|
|
2372
2372
|
gap: 12px;
|
|
2373
2373
|
align-items: stretch;
|
|
2374
2374
|
border: 1px solid #e0bce8;
|
|
@@ -2405,8 +2405,8 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2405
2405
|
flex-direction: row;
|
|
2406
2406
|
gap: 12px;
|
|
2407
2407
|
align-items: center;
|
|
2408
|
-
`,SS=({appName:e,onPrimaryClick:t})=>{const[n,r]=w.useState(()=>
|
|
2409
|
-
`).map((s,a)=>u.jsx(l.Typography,{variant:"body2",children:s},a))}),u.jsx(l.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>u.jsx(l.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),
|
|
2408
|
+
`,SS=({appName:e,onPrimaryClick:t})=>{const[n,r]=w.useState(()=>ls().getItem(X2)==="true");if(n)return null;const o=()=>{ls().setItem(X2,"true"),r(!0)};return u.jsx(vS,{children:u.jsxs(wS,{children:[u.jsxs(IS,{children:[u.jsxs(l.Typography,{variant:"body2",sx:{fontWeight:600,color:l.theme.palette.gray.black,lineHeight:"18px"},children:["Create ",e," tasks faster"]}),u.jsxs(l.Typography,{variant:"caption",color:l.theme.palette.gray.gray3,sx:{letterSpacing:"0.2px",lineHeight:"16px"},children:["Spend less time filling ",e," fields. Pre-fill them for your team."]})]}),u.jsxs(_S,{children:[u.jsx(l.Button,{size:"small",onClick:t,children:"Set up now"}),u.jsx(l.Button,{variant:"text",size:"small",sx:{color:l.theme.palette.gray.gray2},onClick:o,children:"Dismiss"})]})]})})},Y2=({setShown:e,shown:t,title:n,description:r,buttons:o})=>u.jsx(Yn,{shown:t,setShown:e,showCloseButton:!0,children:u.jsxs(l.Stack,{width:"400px",padding:"20px",children:[u.jsx(l.Typography,{variant:"h2",marginBottom:"8px",children:n}),u.jsx(l.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
|
|
2409
|
+
`).map((s,a)=>u.jsx(l.Typography,{variant:"body2",children:s},a))}),u.jsx(l.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>u.jsx(l.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),J2="connector-agent-expanded-write-form",q2=({metaData:e,isEdit:t=!1,defaultOption:n,mapFormOpen:r,onClose:o,onCreateSuccess:s,setMetaData:a,setMapFormOpen:i,setCreateFormId:c,syncCurrentObject:d})=>{var Jr,qr;const{userGroupId:f}=Rt()||{},[g,y]=w.useState(null),[C,b]=w.useState(!1),[h,p]=w.useState(!1),m=w.useRef(null),{conversationId:x,availableFeatures:E,sendTrackingEvent:I,currentSmIds:v,connectorFunctions:{redirectToAdmin:_,getFormElement:A,toggleFormElement:S},stackingContext:L,isAdmin:N,variables:D}=w.useContext(He),[F,M]=j2(),B=be(y2),V=be(t?RI:m2),Y=be(MI),W=be(Rl),H=be(BI),q=be(VI),Q=be(GI),ee=be(HI),G=be(WI),J=be(x2),R=W==null?void 0:W[(g==null?void 0:g.value)??""];d==null||d(R);const X=rt(E,M4),K=(R==null?void 0:R.hasCustomFields)??!1,{customFieldsArgsPresent:ne,customFieldsArgs:le}=w.useMemo(()=>{if(!K)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const ae=Object.values((R==null?void 0:R.customFieldsArgs)??{}).every(Ot=>!!F.values[Ot]);if(!ae)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const ye=(R==null?void 0:R.customFieldsArgs)??{},Ve=Es(F,ye);return{customFieldsArgsPresent:ae,customFieldsArgs:Ve}},[K,F,R==null?void 0:R.customFieldsArgs]),j=K&&ne&&X,{data:oe}=ES({formId:String(g==null?void 0:g.value),args:le,enabled:j}),_e=w.useMemo(()=>j?oe??[]:[],[j,oe]),z=R==null?void 0:R.expandedView,{formConfigs:Pe,formViewConfigs:We}=w.useMemo(()=>{if(g&&"value"in g&&Y&&Y[g.value]&&Array.isArray(Y[g.value])){const ye=[...Y[g.value],..._e],Ve=[{id:g.value,formFields:ye}];return{formConfigs:Ve,formViewConfigs:z?mw(ye,r2):Ve}}const ae=[{id:"emptyFormId",formFields:[]}];return{formConfigs:ae,formViewConfigs:ae}},[Y,_e,g,z]),Ee=(Jr=Pe[0])==null?void 0:Jr.formFields,Gt=w.useMemo(()=>new Set((Ee??[]).filter(ae=>ae.isMulti).map(ae=>ae.name)),[Ee]),sr=w.useMemo(()=>(Ee??[]).filter(ye=>!ye.isFieldCustom),[Ee]),nt=w.useMemo(()=>{var ye;const ae=((ye=Pe==null?void 0:Pe[0])==null?void 0:ye.formFields)||[];return Dl({formFields:ae})},[Pe]),{setValue:tt,setFormDefaults:Ze,inputChangeHandler:Pr,checkboxChangeHandler:Qt,dateChangeHandler:Br,clearDependentFields:Nn,handleValidationError:Vr,isErrorInValidations:Rn}=P2({state:F,dispatch:M,validations:nt,dynamicFields:_e}),Tt=Pe[0].id!=="emptyFormId"?Pe[0].id:g==null?void 0:g.value,{data:yt,isNudgeRequired:Gr,enabledRef:ar}=z2({formId:Tt,conversationId:x,inboxIds:v,enabled:!t&&!!N});w.useEffect(()=>{yt&&Ze(yt)},[yt,Ze]);const Ht=w.useRef(null);w.useEffect(()=>{if(!(Ee!=null&&Ee.length)||!Tt||Ht.current===Tt)return;const ae=Ee.reduce((ye,Ve)=>(Ve.type==="checkbox"&&(ye[Ve.name]=!!Ve.defaultValue),ye),{});Object.keys(ae).length&&(Ze(ae),Ht.current=Tt)},[Ee,Tt,Ze]),w.useEffect(()=>{g&&(c==null||c(g.value))},[g,c]);const{userGroupId:No}=Rt()||{},{fetchConfig:Ro,createConfig:Hr}=G2({formFields:Pe[0].formFields,formId:Pe[0].id,formState:F,conversationId:x}),Lt=(qr=B==null?void 0:B.forms.find(ae=>ae.type==="edit"))==null?void 0:qr.id,{externalResourceId:ir}=B??{},cr=[q,Q,G].includes(te.LOADING),Wr=w.useMemo(()=>!z||!A?null:A(),[z,A]),Wt=ht();w.useEffect(()=>{Wt(Ow())},[]),w.useEffect(()=>(z&&S&&S(!0),()=>{z&&S&&S(!1)}),[z,S]),w.useEffect(()=>{Wt(s2(t?!(ee&&"values"in ee&&"values"in F&&E2(F.values,ee.values)):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,ee,F,Wt]),w.useEffect(()=>(t&&ee&&M({type:It.SET_FIELDS,payload:ee}),()=>{M({type:It.SET_FIELDS,payload:{values:{}}})}),[t,M,ee]),w.useEffect(()=>{g!==null&&a(ae=>({...ae,object_type:g.label}))},[g,a]),w.useEffect(()=>{if(F.values){const ae=q1(Pe[0].formFields,F.values);a(ye=>({...ye,fields_filled:ae}))}},[F,Pe,a]),w.useEffect(()=>{if(n&&!t)return y(n);V&&V.length&&y(t&&Lt?V.find(ae=>ae.value===Lt)??null:ae=>ae||!W?ae:V.length===1?V[0]:V.find(Ve=>!W[Ve.value].expandedView)??null)},[V,W,t,Lt,n]);const Zr=()=>{y(m.current),b(!1),M({type:It.RESET_STATE})},vn=(ae,ye)=>{tt(ae,ye)},wn=(ae,ye,Ve)=>{if(!!Ve&&!!Ve.isMulti&&ye.name&&ye.name!=="form-object"){const ze=Array.isArray(ae)?ae.map(k=>({value:k.value,label:k.label})):[];tt(ye.name,ze),g!=null&&g.value&&Nn(ye.name,H==null?void 0:H[g.value]);return}if(ye.action==="clear"&&ye.name&&(tt(ye.name,""),g!=null&&g.value&&Nn(ye.name,H==null?void 0:H[g.value]),nt[ye.name].isRequired&&Vr(ye.name,!0)),ae&&typeof ae=="object"&&"label"in ae&&typeof ae.label=="string"&&"value"in ae&&(typeof ae.value=="string"||typeof ae.value=="number")&&typeof ye.name<"u")if(ye.name==="form-object"){if(m.current={value:ae.value,label:ae.label},F.values&&ae.value!==(g==null?void 0:g.value)){const ze=Object.values(F.values).filter(U=>U!=="").length;(Object.values(yt??{}).filter(U=>!!U).length>0?!E2(F.values,yt):ze>0)?b(!0):Zr()}}else{const ze=!!Ve&&!!Ve.isMultiSelect,k=!ze&&"prefillValues"in ae&&ae.prefillValues,Z=ze?[{value:ae.value,label:ae.label}]:{value:ae.value,label:ae.label};if(tt(ye.name,Z),k)for(const U in k)tt(U,k[U]);g!=null&&g.value&&Nn(ye.name,H==null?void 0:H[g.value])}},zr=()=>{if(!Rn()&&Lt&&(W!=null&&W[Lt])&&x&&ir){const{connectorName:ae,title:ye}=B;I(t4,{connector_name:ae,card_title:ye,sm_ids:v,ug_id:No});const Ve=W[Lt].interfaceDetails;if(!Ve||!ee)return;const{id:Ot,args:ze={},previousArgs:k={}}=Ve,Z=Es(ee,k,Gt),U=Es(F,ze,Gt);Wt(ui({formId:String(Lt),conversationId:x,args:U,previousArgs:Z,externalResourceId:ir,interfaceId:Ot,successCallback:()=>{s()}})).unwrap().then(()=>{var xe;I(r4,{connector_name:ae,card_title:ye,sm_ids:v,ug_id:No});const ue=((xe=Pe[0].formFields)==null?void 0:xe.filter(me=>me.isFieldCustom))??[],Se=ue.length>0,we=ue.some(me=>F.values[me.name]);I(x4,{sm_ids:v,ug_id:f,connector_name:R==null?void 0:R.connectorName,form_object:R==null?void 0:R.name,object_type:g==null?void 0:g.label,has_custom_fields:Se,custom_fields_used:we})}).finally(()=>{Wt(mo(null))})}},Xr=()=>{if(!Rn()&&g&&(W!=null&&W[g.value])&&x){const ae=W==null?void 0:W[g.value].interfaceDetails;if(!ae)return;const{id:ye,args:Ve={}}=ae,Ot=Es(F,Ve,Gt);Wt(li({formId:String(g.value),conversationId:x,args:Ot,interfaceId:ye,successCallback:()=>{s()}})).unwrap().then(()=>{var Se;I(Xb,{object_type:g});const ze=((Se=Pe[0].formFields)==null?void 0:Se.filter(we=>we.isFieldCustom))??[],k=ze.length>0,Z=ze.some(we=>F.values[we.name]),ue=Object.entries(yt??{}).filter(([we,xe])=>{if(F.values[we]===xe)return!0}).map(([we])=>we);I(y4,{sm_ids:v,ug_id:f,connector_name:R==null?void 0:R.connectorName,form_object:R==null?void 0:R.name,object_type:g==null?void 0:g.label,has_custom_fields:k,custom_fields_used:Z,...ue.length?{fields_with_defaults_used:ue.join(",")}:{}})})}},Mo=[{label:"Cancel",action:()=>b(!1),variant:"text"},{label:"Continue",action:Zr}],Yr=()=>{_(R==null?void 0:R.connectorId,{isEdit:!0,tabIndex:2,editCard:(R==null?void 0:R.cardId)??""}),I(b4,{sm_ids:v,ug_id:f,connector_name:R==null?void 0:R.connectorName,form_object:R==null?void 0:R.name})},jo=({data:ae})=>{ar.current=!0,i==null||i(!1);const{fields_configured_count:ye,has_system_variable:Ve}=s9(ae);I(w4,{app_name:R==null?void 0:R.connectorName,object_type:R==null?void 0:R.name,fields_configured_count:ye,has_system_variable:Ve})},Po=N&&X&&(R==null?void 0:R.cardAccessMode)==="read_write",Bo=!h&&(v==null?void 0:v.length)>1&&Object.keys(yt??{}).length>0,Vo=u.jsxs(K2,{className:z?J2:"",children:[i&&u.jsx(xS,{open:r??!1,isEdit:t,fields:sr,variables:D??[],title:(R==null?void 0:R.name)||"Pre-fill fields",connectorLogo:(R==null?void 0:R.logoUrl)??"",formId:Tt,customFormArgsEnabled:(R==null?void 0:R.hasCustomFields)??!1,customFormArgsMap:(R==null?void 0:R.customFieldsArgs)??void 0,onSuccess:jo,onClose:()=>i==null?void 0:i(!1)}),Gr?u.jsx(SS,{appName:(R==null?void 0:R.connectorName)??"App",onPrimaryClick:()=>{i==null||i(!0)}}):null,u.jsx(Y2,{shown:C,setShown:b,title:Qw,description:$w,buttons:Mo}),z?u.jsxs(TS,{children:[u.jsxs(l.Typography,{variant:"body_sm_medium",children:[t?"Edit":"Add"," to ",R.connectorName]}),u.jsx(l.Tooltip,{title:"Close Popup",placement:"bottom",children:u.jsx(l.IconButton,{onClick:o,children:u.jsx(LS,{src:d2})})})]}):null,u.jsxs(U2,{spacing:3,children:[!t&&!z?u.jsx(Sr,{type:"select",placeholder:n2,options:V,value:g,name:"form-object",selectChangeHandler:wn,label:eI,labelSpacing:.5,validation:{isRequired:!0}}):null,u.jsx(D1,{showGlobalLoader:G===te.LOADING,formConfig:We,selectChangeHandler:wn,inputChangeHandler:Pr,checkboxChangeHandler:Qt,dateChangeHandler:Br,tableChangeHandler:vn,onValidationError:Vr,fieldsSpacing:3,labelSpacing:.5,fetchConfig:Ro,createConfig:Hr,values:F.values,validations:nt,...z?{cols:r2,stackIndex:L.expandedForm}:null}),Po?u.jsx(l.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:u.jsx(l.Button,{variant:"text",startIcon:u.jsx(OS,{}),onClick:Yr,size:"small",children:$4})}):null]}),Bo?u.jsxs(AS,{children:[u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray1,children:iI}),u.jsx(l.IconButton,{onClick:()=>p(!0),children:u.jsx(l.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})]}):null,u.jsxs($2,{children:[u.jsx(l.Button,{disabled:Rn()||cr||!J,onClick:t?zr:Xr,size:"small",...z?{style:{order:2}}:null,children:t?G4:V4}),u.jsx(eh,{variant:"outlined",color:"tertiary",size:"small",onClick:o,disabled:cr,children:vc})]})]});return z&&Wr?$t.createPortal(Vo,Wr):Vo},Q2=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"})),AS=l.styled(l.Stack)`
|
|
2410
2410
|
box-sizing: border-box;
|
|
2411
2411
|
width: 100%;
|
|
2412
2412
|
flex-flow: row nowrap;
|
|
@@ -2420,7 +2420,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2420
2420
|
& > :first-child {
|
|
2421
2421
|
flex-grow: 1;
|
|
2422
2422
|
}
|
|
2423
|
-
|
|
2423
|
+
`,$2=l.styled(l.Box)`
|
|
2424
2424
|
box-sizing: border-box;
|
|
2425
2425
|
height: 52px;
|
|
2426
2426
|
background-color: var(--form-background-color, inherit);
|
|
@@ -2432,7 +2432,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2432
2432
|
display: flex;
|
|
2433
2433
|
justify-content: flex-end;
|
|
2434
2434
|
column-gap: 12px;
|
|
2435
|
-
|
|
2435
|
+
`,U2=l.styled(l.Stack)`
|
|
2436
2436
|
margin-bottom: 25px;
|
|
2437
2437
|
flex-grow: 1;
|
|
2438
2438
|
& .required__star {
|
|
@@ -2440,7 +2440,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2440
2440
|
position: relative;
|
|
2441
2441
|
top: -5px;
|
|
2442
2442
|
}
|
|
2443
|
-
`,
|
|
2443
|
+
`,K2=l.styled(l.Stack)`
|
|
2444
2444
|
height: calc(100% - 44px);
|
|
2445
2445
|
position: relative;
|
|
2446
2446
|
overflow: auto;
|
|
@@ -2455,12 +2455,12 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2455
2455
|
border-radius: 4px;
|
|
2456
2456
|
}
|
|
2457
2457
|
}
|
|
2458
|
-
&.${
|
|
2458
|
+
&.${J2} {
|
|
2459
2459
|
padding: 0 40px;
|
|
2460
2460
|
background-color: inherit;
|
|
2461
2461
|
--form-background-color: inherit;
|
|
2462
2462
|
}
|
|
2463
|
-
`,
|
|
2463
|
+
`,eh=l.styled(l.Button)`
|
|
2464
2464
|
&:hover {
|
|
2465
2465
|
background-color: #e3e9ff !important;
|
|
2466
2466
|
color: ${l.theme.palette.purple.primary} !important;
|
|
@@ -2486,12 +2486,12 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2486
2486
|
&:hover {
|
|
2487
2487
|
color: ${l.theme.palette.purple.primary};
|
|
2488
2488
|
}
|
|
2489
|
-
`;const OS=l.styled(
|
|
2489
|
+
`;const OS=l.styled(Q2)`
|
|
2490
2490
|
fill: ${l.theme.palette.purple.primary};
|
|
2491
2491
|
path {
|
|
2492
2492
|
fill: ${l.theme.palette.purple.primary} !important;
|
|
2493
2493
|
}
|
|
2494
|
-
`,kS=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=
|
|
2494
|
+
`,kS=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=ht(),r=be(D2),o=be(N2),s=be(jI),a=be(b2),[i,c]=w.useState(!1),[d,f]=w.useState(null),[g,y]=w.useState(""),[C,b]=w.useState({}),{conversationId:h,sendTrackingEvent:p,email:m}=w.useContext(He);w.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const x={externalResourceId:g},E=o===te.LOADING,I=s===te.LOADING,v=()=>{!i&&d&&"value"in d&&(p(qb,{object_type:d.label}),n(go({id:String(d==null?void 0:d.value),args:x})).unwrap().catch(F=>{(F==null?void 0:F.status)===400?Te({message:t2,type:Ue}):Te({message:Ww,type:Ue})})),c(F=>!F)},_=()=>{d&&"value"in d&&h&&n(fi({id:String(d.value),externalResourceId:g,conversationId:h,email:m})).unwrap().then(()=>{p(Yb,{object_type:d.label,input_type:g}),Te({message:zw,type:sn}),e(!1),t()}).catch(F=>{(F==null?void 0:F.status)===400?Te({message:t2,type:Ue}):(F==null?void 0:F.status)===409?Te({message:Zw,type:Ue}):Te({message:Xw,type:Ue})})},A=()=>{e(!1),c(!1)},S=(F,M)=>{F&&typeof F=="object"&&"label"in F&&typeof F.label=="string"&&"value"in F&&(typeof F.value=="string"||typeof F.value=="number")&&typeof M.name<"u"&&(f({value:F.value,label:F.label}),y(""))},L=F=>{F.stopPropagation();const{value:M}=(F==null?void 0:F.target)||{};y(M),c(!1)},N=(F,M)=>{b(B=>({...B,[F]:!!M}))},D=()=>Object.keys(C).filter(M=>C[M]).length>0;return u.jsxs(K2,{children:[u.jsxs(U2,{spacing:3,children:[u.jsx(Sr,{type:"select",placeholder:n2,options:a,value:d,name:"form-object",selectChangeHandler:S,label:tI,labelSpacing:.5,validation:{isRequired:!0},onValidationError:N}),u.jsx(Sr,{type:"text",placeholder:nI,value:g,name:"resourceId",inputChangeHandler:L,label:rI,labelSpacing:.5,validation:{isRequired:!0,validate:n9()},onValidationError:N}),i?u.jsx(R2,{cardData:r,cardDataApiStatus:o,objectToLink:String((d==null?void 0:d.value)||""),args:x}):null,u.jsx(dS,{fullWidth:!0,disabled:D()||E,color:"tertiary",variant:"outlined",size:"small",onClick:v,children:i?Ry:Ny})]}),u.jsxs($2,{children:[u.jsx(l.Button,{onClick:_,disabled:D()||I,size:"small",children:p0}),u.jsx(eh,{color:"tertiary",variant:"outlined",onClick:A,disabled:I,size:"small",children:vc})]})]})},FS=({formId:e,enabled:t,conversationId:n,inboxIds:r,setMapFormOpen:o})=>{const{isSuccess:s}=z2({formId:e,conversationId:n,inboxIds:r,enabled:t,fetchOnMount:!1});return s?u.jsx(l.Typography,{variant:"body2",color:"primary.main",fontSize:14,fontWeight:500,lineHeight:"20px",paddingRight:"8px",onClick:()=>o(),style:{cursor:"pointer"},children:aI}):null},DS=l.styled(l.Button)`
|
|
2495
2495
|
&:hover {
|
|
2496
2496
|
background-color: #e3e9ff !important;
|
|
2497
2497
|
color: ${l.theme.palette.purple.primary} !important;
|
|
@@ -2512,7 +2512,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2512
2512
|
& .content__btn {
|
|
2513
2513
|
margin-left: 8px;
|
|
2514
2514
|
}
|
|
2515
|
-
`,RS=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"}))),MS=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"})),jS=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>u.jsxs(l.Stack,{gap:2,marginTop:"12px",children:[u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray1,children:qw}),u.jsxs(l.Stack,{gap:"12px",children:[n?u.jsxs(NS,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(RS,{}),u.jsx("span",{className:"content__btn",children:wc})]}):null,r?u.jsxs(DS,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(MS,{}),u.jsx("span",{className:"content__btn",children:m0})]}):null]})]}),PS=e=>e.write.searchObjectList,
|
|
2515
|
+
`,RS=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"}))),MS=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"})),jS=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>u.jsxs(l.Stack,{gap:2,marginTop:"12px",children:[u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray1,children:qw}),u.jsxs(l.Stack,{gap:"12px",children:[n?u.jsxs(NS,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(RS,{}),u.jsx("span",{className:"content__btn",children:wc})]}):null,r?u.jsxs(DS,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(MS,{}),u.jsx("span",{className:"content__btn",children:m0})]}):null]})]}),PS=e=>e.write.searchObjectList,th=e=>e.write.objectDict,BS=e=>e.write.formFields,VS=e=>e.write.dependentFieldsMap,GS="Search in Connectors",HS="Search in Apps",WS="Start typing to search..",ZS="Smart search suggestions",zS=":count result:countSuffix found for :searchObject in :connectorName",XS="Back to search results",YS="No search results found",nh=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"}))),JS=l.styled(l.Stack)`
|
|
2516
2516
|
flex-flow: row nowrap;
|
|
2517
2517
|
align-items: center;
|
|
2518
2518
|
column-gap: 12px;
|
|
@@ -2528,11 +2528,11 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2528
2528
|
width: 24px;
|
|
2529
2529
|
height: 24px;
|
|
2530
2530
|
border-radius: 50%;
|
|
2531
|
-
`,
|
|
2531
|
+
`,rh=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=ht(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(He),{label:i,description:c,avatarUrl:d,connectorName:f}=e,g=()=>{s(c4,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:f}),r(e,t),o(Lw(t))};return u.jsxs(JS,{isSelected:n,onClick:g,children:[u.jsx(qS,{src:d,alt:"option"}),u.jsxs(l.Stack,{children:[u.jsx(l.Typography,{color:l.theme.palette.gray.gray1,children:i}),u.jsx(l.Typography,{color:l.theme.palette.gray.gray3,fontSize:"12px",children:c})]})]})},QS=l.styled(l.Stack)`
|
|
2532
2532
|
padding: 10px 0 10px 10px;
|
|
2533
|
-
`,{Control:$S}=
|
|
2533
|
+
`,{Control:$S}=mn,US=({children:e,...t})=>u.jsxs($S,{...t,children:[u.jsx(QS,{children:u.jsx(nh,{})}),e]}),KS=e=>{const{data:t,isSelected:n,selectOption:r}=e;return u.jsx(rh,{data:t,isSelected:n,onSelect:r})},eA={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})},tA=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:d,sendTrackingEvent:f,currentSmIds:g}=w.useContext(He),y=rt(d,ua),C=(p,{action:m})=>{m==="input-change"&&(s(p),p||a())},b=p=>{o(p),p||(s(""),a())},h=()=>{const p=[...new Set(e.map(m=>m.connectorName))];f(i4,{connector_names:p,sm_ids:g})};return u.jsx(bs,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:y?HS:GS,isSearchable:!0,filterOption:null,styles:eA,onInputChange:C,onChange:b,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:h,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:KS,Control:US,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},nA=l.styled(l.Stack)`
|
|
2534
2534
|
margin: ${({isEmpty:e})=>e?"0":"12px 0"};
|
|
2535
|
-
`,rA=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=
|
|
2535
|
+
`,rA=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=j2(),s=w.useRef(null),a=be(th),i=be(BS),c=be(VS),d=w.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),f=w.useMemo(()=>{const v=(d==null?void 0:d.formFields)||[];return Dl({formFields:v})},[d]),{setValue:g,inputChangeHandler:y,dateChangeHandler:C,clearDependentFields:b,handleValidationError:h,isErrorInValidations:p}=P2({state:r,dispatch:o,validations:f}),{fetchConfig:m}=G2({formState:r,formFields:d.formFields,formId:d.id}),x=w.useCallback(v=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(v)},500)},[n]);w.useEffect(()=>{const v=r.values,_=d.id,A=d.formFields;if(Object.values(v).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:N,args:D={}}=S,F=Es(r,D);x({id:_,interfaceId:N,searchString:t,connectorName:L,args:F})},[r,d,a,e,t,p,x]),w.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const E=(v,_,A)=>{if(_.action==="clear"&&_.name&&(g(_.name,""),b(_.name,c[e]),f[_.name].isRequired&&h(_.name,!0)),v&&typeof v=="object"&&"label"in v&&typeof v.label=="string"&&"value"in v&&(typeof v.value=="string"||typeof v.value=="number")&&typeof _.name<"u"){let S=!1;A&&(S=A.isMultiSelect||!1);const L=S?[{value:v.value,label:v.label}]:{value:v.value,label:v.label};g(_.name,L),b(_.name,c[e])}};return u.jsx(nA,{isEmpty:((I=d.formFields)==null?void 0:I.length)===0,children:u.jsx(D1,{showGlobalLoader:!1,formConfig:[d],selectChangeHandler:E,inputChangeHandler:y,dateChangeHandler:C,onValidationError:h,labelSpacing:.5,fetchConfig:m,values:r.values,validations:f})})},Bl="@connector-agent-global-search-priority",Vl=Yf(),oA=({objectList:e})=>({sortedObjectList:w.useMemo(()=>{const r=Vl.getItem(Bl);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=Vl.getItem(Bl)??{};o[r]||(o[r]=0),o[r]++,Vl.setItem(Bl,o)}}),sA=l.styled(l.Stack)`
|
|
2536
2536
|
padding: 8px 0;
|
|
2537
2537
|
`,aA=l.styled(l.Typography)`
|
|
2538
2538
|
padding: 6px 16px;
|
|
@@ -2543,7 +2543,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2543
2543
|
color: ${l.theme.palette.gray.gray3};
|
|
2544
2544
|
font-size: 11px;
|
|
2545
2545
|
text-transform: uppercase;
|
|
2546
|
-
`,cA=({onSelect:e,selectedOption:t,options:n})=>n.length?u.jsxs(sA,{children:[u.jsx(aA,{children:WS}),u.jsx(iA,{children:ZS}),n.map(r=>u.jsx(
|
|
2546
|
+
`,cA=({onSelect:e,selectedOption:t,options:n})=>n.length?u.jsxs(sA,{children:[u.jsx(aA,{children:WS}),u.jsx(iA,{children:ZS}),n.map(r=>u.jsx(rh,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null,lA=e=>new Promise(t=>setTimeout(t,e)),Gl=({apiFn:e,intervalMillis:t,maxRetries:n,increaseIntervalMillis:r=0,isSatisfied:o,pushIntermediateResults:s=()=>{}})=>(...i)=>{const c=async(d=0)=>{const f=await e(...i);if(o(f))return f;if(s(f),d>=n)throw f;return d++,t+=r,lA(t).then(()=>c(d))};return c()},uA=async({conversationId:e,senderEmail:t})=>{try{const n=await ve({url:ot(bw,{conversationId:e}),params:{senderEmail:t},method:Le.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},oh=({conversationId:e,senderEmail:t,enabled:n})=>Ft({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>uA({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),sh="/v1/api",dA=`${sh}/connectors/forms/:formId/search`,fA=`${sh}/connectors/conversation/:conversationId/smart-suggestions`,pA=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}},hA=Gl({apiFn:async({conversationId:e})=>{try{const t=await ve({url:ot(fA,{conversationId:e}),method:Le.GET}),n=t==null?void 0:t.data;return pA(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),gA=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=oh({conversationId:e,senderEmail:t,enabled:n});return Ft({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>hA({conversationId:e}),enabled:n&&r})},mA=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=w.useState(""),{conversationId:i,email:c,availableFeatures:d}=w.useContext(He),f=be(PS),g=be(th),y=rt(d,F4),{sortedObjectList:C,updatePriority:b}=oA({objectList:f}),{data:h}=gA({enabled:y&&!!i,conversationId:String(i),senderEmail:c}),p=(h==null?void 0:h.suggestedOptions)??[],m=w.useMemo(()=>!g||!C.length?[]:C.map(({value:E})=>{const I=g[E];return I?{description:`${I.connectorName??""} - ${I.searchObject}`,avatarUrl:I.logoUrl,label:"",value:E,connectorName:I.connectorName,objectName:I.searchObject}:null}).filter(E=>!!E),[C,g]),x=E=>{n(E),E&&b(""+E.value)};return m.length?u.jsxs(l.Stack,{children:[u.jsx(tA,{value:e,options:m.map(E=>({...E,label:s})),inputValue:s,root:t,onInputChange:a,onChange:x,onReset:o,NoOptionsMessage:({selectOption:E})=>u.jsx(cA,{selectedOption:e,onSelect:E,options:p}),menuOpen:!s&&!p.length?!1:void 0}),e?u.jsx(rA,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},bA="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",yA=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 ve({url:`${Cw.replace(":id",e)}?${s.toString()}`,method:Le.POST,data:{externalResourceId:t,conversationId:n}})},xA=({onSuccess:e})=>Kt({mutationFn:yA,onSuccess:()=>{Te({message:Ux,type:sn}),e==null||e()},onError:()=>{Te({message:Kx,type:Ue})}}),CA="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",EA=l.styled(l.Stack)`
|
|
2547
2547
|
width: fit-content;
|
|
2548
2548
|
cursor: pointer;
|
|
2549
2549
|
gap: 8px;
|
|
@@ -2555,7 +2555,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2555
2555
|
letter-spacing: 0.4px;
|
|
2556
2556
|
text-align: center;
|
|
2557
2557
|
vertical-align: middle;
|
|
2558
|
-
`,vA=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=
|
|
2558
|
+
`,vA=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=ht(),{conversationId:i,currentSmIds:c,sendTrackingEvent:d,email:f}=w.useContext(He),g=be(D2),y=be(N2),{mutate:C,isPending:b}=xA({onSuccess:s}),h=y===te.LOADING,p={externalResourceId:e};w.useEffect(()=>{a(go({id:t,args:{externalResourceId:e}}))},[e,t,a]);const m=()=>{d(p4,{search_keyword:n,search_result_label:r,sm_ids:c,card_title:g==null?void 0:g.cardTitle,connector_names:g==null?void 0:g.connectorNames}),C({id:t,externalResourceId:e,conversationId:i,email:f})};return u.jsxs(l.Stack,{gap:"12px",marginTop:"12px",children:[u.jsxs(EA,{onClick:o,children:[u.jsx("img",{src:CA,width:"16px",height:"16px"}),u.jsx(l.Typography,{children:XS})]}),u.jsxs(l.Stack,{gap:"24px",children:[u.jsx(R2,{cardData:g,cardDataApiStatus:y,objectToLink:t,args:p}),u.jsx(l.Stack,{alignItems:"flex-end",children:u.jsx(l.Button,{size:"small",disabled:h||b,onClick:m,children:p0})})]})]})},ah=l.styled(l.Stack)`
|
|
2559
2559
|
padding: 12px 12px 12px 11px;
|
|
2560
2560
|
border: 1px solid ${l.theme.palette.gray.gray5};
|
|
2561
2561
|
border-radius: 8px;
|
|
@@ -2571,10 +2571,10 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2571
2571
|
}
|
|
2572
2572
|
}
|
|
2573
2573
|
`};
|
|
2574
|
-
`,wA="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",IA=()=>u.jsxs(l.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:wA,width:124,height:107}),u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray3,children:YS})]}),_A=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=gt(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(Ge),[i,c]=w.useState(null),d=ot(zS,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(C,b)=>{s(d4,{search_keyword:t.label,search_result_label:b,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:C,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},g=()=>{c(null),o(Tw())},y=()=>{n(),r(),g()};return e.length?i?u.jsx(vA,{meta:i,onBack:g,onLink:y}):u.jsxs(l.Stack,{gap:"14px",marginTop:"12px",children:[u.jsx(l.Typography,{variant:"body2",children:d}),u.jsx(l.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:C,name:b,description:h})=>u.jsxs(sh,{onClick:()=>f(C,b),direction:"row",children:[u.jsxs(l.Stack,{flexGrow:1,children:[u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray1,children:b}),u.jsx(l.Typography,{variant:"caption",color:l.theme.palette.gray.gray3,children:h})]}),u.jsx(l.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:bA})})]},C))})]}):u.jsx(IA,{})},Hl=l.styled(l.Skeleton)`
|
|
2574
|
+
`,wA="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",IA=()=>u.jsxs(l.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:wA,width:124,height:107}),u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray3,children:YS})]}),_A=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=ht(),{sendTrackingEvent:s,currentSmIds:a}=w.useContext(He),[i,c]=w.useState(null),d=ot(zS,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(C,b)=>{s(f4,{search_keyword:t.label,search_result_label:b,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:C,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:b})},g=()=>{c(null),o(Tw())},y=()=>{n(),r(),g()};return e.length?i?u.jsx(vA,{meta:i,onBack:g,onLink:y}):u.jsxs(l.Stack,{gap:"14px",marginTop:"12px",children:[u.jsx(l.Typography,{variant:"body2",children:d}),u.jsx(l.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:C,name:b,description:h})=>u.jsxs(ah,{onClick:()=>f(C,b),direction:"row",children:[u.jsxs(l.Stack,{flexGrow:1,children:[u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray1,children:b}),u.jsx(l.Typography,{variant:"caption",color:l.theme.palette.gray.gray3,children:h})]}),u.jsx(l.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:bA})})]},C))})]}):u.jsx(IA,{})},Hl=l.styled(l.Skeleton)`
|
|
2575
2575
|
display: block;
|
|
2576
2576
|
margin: ${e=>e.margin?e.margin:0};
|
|
2577
|
-
`,SA=()=>u.jsxs(l.Stack,{marginTop:"12px",children:[u.jsx(Hl,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(l.Stack,{gap:"17px",children:u.jsxs(sh,{gap:"8px",disableHover:!0,children:[u.jsx(Hl,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx(Hl,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let Wl={};const Zl=new Set,AA=(e,t)=>{Wl={...Wl,[e]:t},Zl.forEach(n=>n())},TA=e=>(Zl.add(e),()=>Zl.delete(e)),LA=e=>w.useSyncExternalStore(TA,()=>Wl)[e],OA=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await ve({url:dA.replace(":formId",e.toString()),method:Le.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){Ae({message:Tn,type:Ue}),console.error(r)}},kA=(e,t)=>Kt({mutationFn:OA,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),zl={OPEN_FORM_VIEW:"connector-agent-open-form-view"},FA=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=w.useRef(!1),o=w.useRef(void 0),s=w.useCallback((c="auto")=>{const d=e.current;d&&d.scrollIntoView({behavior:c})},[e]),a=w.useCallback((c,d="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(d),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}},DA="/v1/api/connectors/lookup/bulk",NA="/v1/api/connectors/lookup/bulk",RA=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${DA}?${t.toString()}`,r=await ve({url:n,method:Le.GET});return r==null?void 0:r.data},MA=async e=>{const t=await ve({url:NA,method:Le.PUT,data:{entries:e}});return t==null?void 0:t.data},jA={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},PA={border:`1px solid ${l.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},ah={flex:1,height:"1px",backgroundColor:l.theme.palette.gray.gray6},BA={flexShrink:0,border:`1px solid ${l.theme.palette.gray.gray6}`,borderRadius:"15px"},VA={border:`1px solid ${l.theme.palette.gray.gray6}`,backgroundColor:l.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},GA=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(x4,{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(l.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[u.jsx(l.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:jA,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const d=((f=(t.presets??[]).find(g=>g.hiverParam===c))==null?void 0:f.label)??"";return u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(T2,{width:18,height:18}),u.jsx("span",{children:d})]})},children:(t.presets??[]).map(c=>u.jsx(l.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),u.jsx(l.Box,{sx:ah}),u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:BA,children:[t.logo&&u.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),u.jsxs(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),u.jsx(l.Box,{sx:ah}),u.jsx(l.Box,{sx:VA,children:u.jsx(l.Typography,{variant:"body2",fontSize:14,children:s})})]})}),HA=w.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=w.useContext(Ge),[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=dn(),{mutate:d,isPending:f}=Kt({mutationFn:MA,onSuccess:b=>{const h={};b.results.forEach(({connectorId:p,hiverParam:m})=>{h[p]=m}),c.setQueriesData({queryKey:["lookup","bulk"]},p=>p&&{...p,connectors:p.connectors.map(m=>h[m.connectorId]!==void 0?{...m,hiverParam:h[m.connectorId]}:m)}),s(C4,{page:"agent_connector_panel"}),Ae({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{Ae({message:"Failed to save identity mapping",type:"error"})}}),g=w.useCallback(()=>{const b=Object.entries(a).map(([h,p])=>({connector_id:h,hiver_param:p}));d(b)},[a,d]),y=w.useCallback((b,h)=>{i(p=>({...p,[b]:h}))},[]),C=w.useCallback(b=>{b||n()},[n]);return u.jsx(qn,{shown:t,setShown:C,showCloseButton:!1,children:u.jsxs(l.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[u.jsx(l.Typography,{variant:"h2",children:"Customer identity mapping"}),u.jsx(l.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(l.Stack,{gap:"8px",sx:PA,children:r.filter(b=>{var h;return((h=b.presets)==null?void 0:h.length)>1}).map(b=>u.jsx(GA,{connector:b,selectedHiverParam:a[b.connectorId]??b.hiverParam,onChange:y,sendTrackingEvent:s},b.connectorId))}),u.jsxs(l.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[u.jsx(l.Button,{variant:"text",onClick:n,children:"Cancel"}),u.jsx(l.Button,{variant:"contained",onClick:g,disabled:f,children:"Save"})]})]})})}),WA=({enabled:e,...t})=>{const{actionQueue:n}=w.useContext(Ge);n&&e&&n.register(t),w.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},ZA=({isAdmin:e=!1})=>{var vi,Uh;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s,connectorId:a}=w.useContext(Ge),i=gt(),{userGroupId:c,userId:d}=Dt()||{},f=w.useRef(!1),g=w.useRef(null),y=w.useRef(null),C=w.useRef(null),[b,h]=w.useState({}),[p,m]=w.useState(!1),[x,E]=w.useState(!1),[I,v]=w.useState(!1),[_,A]=w.useState(!1),[S,L]=w.useState(),[N,D]=w.useState(!1),[F,M]=w.useState(null),[B,V]=w.useState(),[Y,W]=w.useState(null),[H,q]=w.useState(!1),[Q,ee]=w.useState(!1),[G,J]=w.useState(!1),[R,X]=w.useState(!1),[K,ne]=w.useState(void 0),le=w.useRef(),j=me(c2),oe=me(bI),Ie=me(xI),z=me(CI),Pe=me(vI),He=me(yI),Se=me(g2),Bt=me(NI),ir=me(m2),nt=me(b2),tt=me(y2),qe=me(cS),Gr=rt(o,I4),Jt=rt(o,i0),Hr=rt(o,O4),Nn=rt(o,F4),Wr=rt(o,D4),Rn=rt(o,N4),wn=(vi=Dt())==null?void 0:vi.tenantPlatform,xt=rt(o,wn==="HIVERWEB"?`hot-${c0}`:c0),{data:Zr}=Ot({queryKey:["connectors","enabledAuthenticated"],queryFn:()=>Vf(),enabled:xt&&e}),cr=w.useMemo(()=>(Zr??[]).map(re=>re.id),[Zr]),{data:Vt,isSuccess:ks}=Ot({queryKey:["lookup","bulk",cr.join(",")],queryFn:()=>RA(cr),enabled:cr.length>0&&xt&&e,refetchOnMount:!1}),No=ks&&((Vt==null?void 0:Vt.connectors)??[]).some(re=>{var we;return(((we=re.presets)==null?void 0:we.length)??0)>1});WA({conversationId:s,openCreateForm:()=>v(!0),enabled:oe});const Gt=w.useMemo(()=>!j||!j.length?null:gI(j,Ie,z),[j,Ie,z]),Mn=K4(Ie),lr=me(Rl),ur=w.useMemo(()=>{if(!lr)return[];const re=new Map;return Object.values(lr).forEach(we=>{we.userAuthEnabled&&we.connectorId&&!re.has(we.connectorId)&&re.set(we.connectorId,{connectorId:we.connectorId,connectorName:we.connectorName??we.name,connectorLogo:we.logoUrl??""})}),Array.from(re.values())},[lr]),qt=me(re=>ur.some(we=>r_(re,we.connectorId))),dr=w.useMemo(()=>(j??[]).filter(re=>re.userAuthEnabled&&re.connectorId).map(re=>re.connectorId),[j]),{isResolving:Ro}=c_(dr),{data:un,isLoading:jn}=rh({senderEmail:t,conversationId:String(s),enabled:Nn&&!!t}),{emailHeaders:zr,selectedEmail:Xr}=un??{},{scrollOnceAfterLoad:Mo,resetScrollState:Yr}=FA(y),jo=He!==te.LOADING&&(!z||!Object.values(z).some(re=>re===te.LOADING))&&j&&j.length>0;w.useLayoutEffect(()=>{var re;H&&!p&&Q&&((re=C==null?void 0:C.current)!=null&&re.scrollHeight)&&Mo(!!jo,"smooth")},[H,p,Q,jo,Mo,(Uh=C==null?void 0:C.current)==null?void 0:Uh.scrollHeight,d]);const Po=(re,we)=>{r(c4,{search_keyword:re,sm_ids:n,connector_name:we,suggestion_type:qe})},Jr=(re,we,Lt)=>{!Array.isArray(we)||!we.length?r(l4,{search_keyword:re,sm_ids:n,connector_name:Lt,suggestion_type:qe}):we.length&&r(u4,{num_of_results:we.length,search_keyword:re,sm_ids:n,connector_name:Lt,suggestion_type:qe})},{mutate:Bo,reset:qr,data:ie,isPending:Ce,isIdle:Qe}=kA(Po,Jr),Qt=w.useCallback(()=>{qr(),M(null)},[qr,M]),at=dn(),We=w.useCallback(()=>{if(t&&n.length&&s){const re=i(mi({inboxIds:n,conversationId:s,connectorId:a}));return()=>re.abort()}},[i,t,n,s,a]),k=w.useCallback(()=>{at.invalidateQueries({queryKey:["lookup","bulk"]}),We()},[at,We]),Z=w.useCallback(()=>{at.invalidateQueries({queryKey:["lookup","bulk"]}),We()},[at,We]),U=w.useCallback((re,we)=>{re&&s&&we&&i(pi({id:re,channelType:"email",conversationId:s,externalResourceId:we,contactEmail:t})).unwrap().catch(()=>{i(mo(null))})},[i,s,t]);if(w.useEffect(()=>{(async()=>{d&&(q(await Yi(d)),ee(await ed(d)))})()},[d]),w.useEffect(()=>{jn||V(Xr||t)},[t,Xr,jn]),w.useEffect(()=>{B&&s&&AA(String(s),B)},[B,s]),w.useEffect(()=>{Q&&d&&td(d)},[Q,d]),w.useEffect(()=>{var re;if(nt){E(!0);const{externalResourceId:we}=nt,Lt=(re=nt.forms.find(Bn=>Bn.type==="edit"))==null?void 0:re.id;U(Lt,we)}else E(!1),i(cI())},[nt,U,i]),w.useEffect(()=>{const re=We();return Yr(),()=>{re==null||re(),i(p2.clearConnectorList())}},[i,We,Yr]),w.useEffect(()=>{var re;if(Pe&&j&&j.length&&Gt&&!f.current){const{cards_per_app:we,total_empty_cards:Lt,total_cards_with_errors:Bn}=Gt,Kh=a?(re=we[0])==null?void 0:re.app_name:null;r(Pb,{numOfCards:j.length,total_cards_loaded:j.length,total_empty_cards:Lt,total_cards_with_errors:Bn,cards_per_app:we,sm_ids:n,...Kh?{app_name:Kh}:null}),f.current=!0}return()=>{f.current=!1}},[Pe,j,Gt,r,n,a]),w.useEffect(()=>{if(s&&n&&n.length){const re=i(ci({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:Rn,connectorId:a}));return()=>re.abort()}},[i,n,s,Rn,a]),w.useEffect(()=>{const re=we=>{var Bn;if(!(we instanceof CustomEvent))return;const Lt=(Bn=we.detail)==null?void 0:Bn.connectorKey;h({connectorKey:Lt})};return window.addEventListener(zl.OPEN_FORM_VIEW,re),()=>{window.removeEventListener(zl.OPEN_FORM_VIEW,re)}},[]),w.useEffect(()=>{if(!(Se!=null&&Se.length)||!b.connectorKey)return;const re=b.connectorKey;h({});const we=Se.find(Lt=>{var Bn;return((Bn=Lt.connectorKey)==null?void 0:Bn.toLowerCase())===(re==null?void 0:re.toLowerCase())});we&&(W(we),v(!0))},[Se,b]),!t.length||He===te.LOADING||Ro)return u.jsx(Y_,{});const de=re=>{r(Wb,{connector_name:Bt,source:re,sm_ids:n})},be=re=>{v(!0),de(re)},Te=()=>{A(!0),ye(r0),Ee(s0),r(Zb)},ye=re=>{r(re,S),tt?D(!0):(v(!1),W(null))},Ee=re=>{if(nt){const{connectorName:we,title:Lt}=nt;r(re,{connector_name:we,card_title:Lt,sm_ids:n,ug_id:c})}tt?D(!0):i(mo(null))},ut=()=>{v(!1),i(mo(null)),L(void 0),D(!1)},Ze=()=>{We(),v(!1),E(!1),i(p2.clearConnectorList())},$e=[{label:"Go back",variant:"text",action:ut},{label:"Stay",variant:"contained",action:()=>D(!1)}],ht=Se.length>0,In=ir.length>0,Pn=I||x||_,dt=()=>ht||In?u.jsx(jS,{haveCreateObjects:ht,haveLinkObjects:In,onCreateClick:()=>be(x0.MAIN_BUTTON),onLinkClick:()=>A(!0)}):u.jsx(O2,{isAdmin:e,hideHeading:!0}),Fs=()=>{J(!0);const re=le.current,we=re==null?void 0:re.connectorName,Lt=re==null?void 0:re.name;r(E4,{entry_point:"agent",app_name:we,object_type:Lt})},tu=re=>{le.current=re};return u.jsxs(L0,{ref:g,"data-testid":Array.isArray(j)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:I||_,children:[u.jsx(E_,{}),u.jsx(X2,{shown:N,setShown:D,title:Uw,description:Kw,buttons:$e}),u.jsx(F5,{onWheel:()=>m(!0),ref:C,children:oe?u.jsxs(u.Fragment,{children:[!qt&&u.jsx(dy,{connectors:Mn,isWriteFlowEnabled:Jt,haveCreateObjects:ht,haveLinkObjects:In,cards:j,handleCreateNewObject:()=>be(x0.ICON),handleLinkNewObject:Te}),Hr&&!Pn?u.jsx(mA,{selectedObject:F,setSelectedObject:M,fetchSearchResults:Bo,onReset:Qt,root:g.current}):null,u.jsxs(yo,{children:[u.jsx(On,{condition:Hr&&Ce,children:u.jsx(SA,{})},"search"),u.jsx(On,{condition:Hr&&!!F&&!Qe,children:u.jsx(_A,{searchResults:ie??[],selectedObject:F,onReset:Qt,fetchCards:We})},"results"),u.jsx(On,{condition:I,children:u.jsx(Pl,{onClose:()=>ye(r0),title:wc,rightNode:u.jsx(FS,{formId:K,conversationId:s,inboxIds:n,enabled:I&&!!K&&!!e,setMapFormOpen:Fs}),children:u.jsx(J2,{onClose:()=>ye(qb),onCreateSuccess:Ze,metaData:S,setMetaData:L,defaultOption:Y,connectors:Mn,mapFormOpen:G,setMapFormOpen:J,setCreateFormId:ne,syncCurrentObject:tu})})},"create-form"),u.jsx(On,{condition:x,children:u.jsx(Pl,{onClose:()=>Ee(s0),title:W4,backButtonTooltip:"Back",children:u.jsx(J2,{isEdit:!0,onClose:()=>Ee(t4),onCreateSuccess:Ze,metaData:S,setMetaData:L,connectors:Mn})})},"edit-form"),u.jsx(On,{condition:_,children:u.jsx(Pl,{onClose:()=>A(!1),children:u.jsx(kS,{setOpenTaskLinking:A,onLinkingSuccess:We})})},"link-form"),u.jsxs(On,{fallback:!0,children:[Nn&&(j!=null&&j.length)&&!qt?u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(l.Stack,{sx:{flex:1,minWidth:0},children:u.jsx(rS,{emailHeaders:zr,selectedEmail:B,root:g.current,isLoading:jn,setSelectedEmail:V})}),xt&&No&&e&&u.jsx(l.Tooltip,{title:"Update customer identity mapping",placement:"top",children:u.jsx(l.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(a0,{page:"agent_connector_panel"}),X(!0)},children:u.jsx(l.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!Nn&&xt&&No&&e&&(j!=null&&j.length)?u.jsx(l.Button,{fullWidth:!0,variant:"contained",startIcon:u.jsx(l.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(a0,{page:"agent_connector_panel"}),X(!0)},children:"Customer identity mapping"}):null,Gr?u.jsx(J_,{}):null,u.jsxs(yo,{children:[u.jsxs(On,{condition:!!j&&j.length>0,children:[u.jsx(b_,{cards:j,specificCardData:Ie,email:B??"",specificConnectorApiStatus:z,onCardUnlinking:We}),u.jsx("div",{ref:y,children:Wr?u.jsx(d5,{connectors:Mn,expanded:H}):null})]},"cards-list"),u.jsx(On,{condition:!(j!=null&&j.length)&&Jt,children:ur.length>0?u.jsx(x_,{connectors:ur,onConnected:Z,children:dt()}):dt()},"create-banner")]})]},"cards")]})]}):u.jsx(O2,{isAdmin:e})}),!oe&&u.jsx(w5,{}),xt&&u.jsx(HA,{open:R,onClose:()=>X(!1),connectors:(Vt==null?void 0:Vt.connectors)??[],onSaveSuccess:k})]})},zA=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:d,stackingContext:f,isAdmin:g=!1,actionQueue:y,store:C,connectorId:b,variables:h})=>{const p=w.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:d,stackingContext:f,actionQueue:y,store:C,connectorId:b,variables:h}),[s,n,r,t,o,a,i,c,g,d,f,y,C,b,h]);return u.jsx(Ge.Provider,{value:p,children:e})},Xl=({children:e})=>{const[t]=w.useState(()=>new xg);return u.jsx(Sg,{client:t,children:e})},XA=X0({cardList:kI,userAuth:e_,write:lI,common:kw}),bi=kx({reducer:XA,devTools:!0}),YA=()=>{const e=Dt();if(!e){console.warn("[connectors-ui] registerUserAuthCallback called before initConnectorsBifrost; user-tier 412 responses will not route through the userAuth slice.");return}e.onUserAuthRequired=t=>{bi.dispatch(UI({connectorId:t.connector_id,connectUrl:t.connect_url,reason:t.reason}))}},JA=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c,store:d,connectorId:f})=>(w.useEffect(()=>{YA()},[]),u.jsx(Nc,{store:bi,children:u.jsx(l.HiverProvider,{inter:!0,children:u.jsx(Xl,{children:u.jsx(zA,{...n,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:d,connectorId:f,children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})})),qA=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i,store:c})=>{const[d,f]=w.useState(()=>{if(c)return c.getData("connectorId")});return w.useEffect(()=>{if(!c)return;const g=c.subscribe(y=>{f(y)},"connectorId");return()=>g()},[c]),u.jsx(Oa,{children:u.jsxs(JA,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,store:c,connectorId:d,children:[u.jsx(ZA,{isAdmin:r==null?void 0:r.isAdmin},d||"root"),u.jsx(ka,{zIndex:a.toastMessage}),u.jsx("div",{"data-connectorid":"connector-layover-portal"})]})})},ih="/v1/api",QA=`${ih}/connector/conversation/:conversationId/data`,$A=`${ih}/connector/feedback/conversation/:conversationId`,UA=async(e,t)=>{try{let n=QA.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 ve({url:n,method:Le.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 KA(e,t,n){return Ot({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await UA(e,n),enabled:!!t&&!!e})}class eT{constructor(t=[],n=null){je(this,"highlightTerms");je(this,"observer");je(this,"isHighlighting");je(this,"debounceTimer");je(this,"debounceDelay");je(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,d,f,g;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((d=i.classList)==null?void 0:d.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((g=i.querySelector)==null?void 0:g.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
|
|
2577
|
+
`,SA=()=>u.jsxs(l.Stack,{marginTop:"12px",children:[u.jsx(Hl,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(l.Stack,{gap:"17px",children:u.jsxs(ah,{gap:"8px",disableHover:!0,children:[u.jsx(Hl,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx(Hl,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let Wl={};const Zl=new Set,AA=(e,t)=>{Wl={...Wl,[e]:t},Zl.forEach(n=>n())},TA=e=>(Zl.add(e),()=>Zl.delete(e)),LA=e=>w.useSyncExternalStore(TA,()=>Wl)[e],OA=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await ve({url:dA.replace(":formId",e.toString()),method:Le.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){Te({message:Tn,type:Ue}),console.error(r)}},kA=(e,t)=>Kt({mutationFn:OA,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),zl={OPEN_FORM_VIEW:"connector-agent-open-form-view"},FA=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=w.useRef(!1),o=w.useRef(void 0),s=w.useCallback((c="auto")=>{const d=e.current;d&&d.scrollIntoView({behavior:c})},[e]),a=w.useCallback((c,d="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(d),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}},DA="/v1/api/connectors/lookup/bulk",NA="/v1/api/connectors/lookup/bulk",RA=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${DA}?${t.toString()}`,r=await ve({url:n,method:Le.GET});return r==null?void 0:r.data},MA=async e=>{const t=await ve({url:NA,method:Le.PUT,data:{entries:e}});return t==null?void 0:t.data},jA={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},PA={border:`1px solid ${l.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},ih={flex:1,height:"1px",backgroundColor:l.theme.palette.gray.gray6},BA={flexShrink:0,border:`1px solid ${l.theme.palette.gray.gray6}`,borderRadius:"15px"},VA={border:`1px solid ${l.theme.palette.gray.gray6}`,backgroundColor:l.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},GA=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(C4,{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(l.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[u.jsx(l.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:jA,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const d=((f=(t.presets??[]).find(g=>g.hiverParam===c))==null?void 0:f.label)??"";return u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(L2,{width:18,height:18}),u.jsx("span",{children:d})]})},children:(t.presets??[]).map(c=>u.jsx(l.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),u.jsx(l.Box,{sx:ih}),u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:BA,children:[t.logo&&u.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),u.jsxs(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),u.jsx(l.Box,{sx:ih}),u.jsx(l.Box,{sx:VA,children:u.jsx(l.Typography,{variant:"body2",fontSize:14,children:s})})]})}),HA=w.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=w.useContext(He),[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=un(),{mutate:d,isPending:f}=Kt({mutationFn:MA,onSuccess:b=>{const h={};b.results.forEach(({connectorId:p,hiverParam:m})=>{h[p]=m}),c.setQueriesData({queryKey:["lookup","bulk"]},p=>p&&{...p,connectors:p.connectors.map(m=>h[m.connectorId]!==void 0?{...m,hiverParam:h[m.connectorId]}:m)}),s(E4,{page:"agent_connector_panel"}),Te({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{Te({message:"Failed to save identity mapping",type:"error"})}}),g=w.useCallback(()=>{const b=Object.entries(a).map(([h,p])=>({connector_id:h,hiver_param:p}));d(b)},[a,d]),y=w.useCallback((b,h)=>{i(p=>({...p,[b]:h}))},[]),C=w.useCallback(b=>{b||n()},[n]);return u.jsx(Yn,{shown:t,setShown:C,showCloseButton:!1,children:u.jsxs(l.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[u.jsx(l.Typography,{variant:"h2",children:"Customer identity mapping"}),u.jsx(l.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(l.Stack,{gap:"8px",sx:PA,children:r.filter(b=>{var h;return((h=b.presets)==null?void 0:h.length)>1}).map(b=>u.jsx(GA,{connector:b,selectedHiverParam:a[b.connectorId]??b.hiverParam,onChange:y,sendTrackingEvent:s},b.connectorId))}),u.jsxs(l.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[u.jsx(l.Button,{variant:"text",onClick:n,children:"Cancel"}),u.jsx(l.Button,{variant:"contained",onClick:g,disabled:f,children:"Save"})]})]})})}),WA=({enabled:e,...t})=>{const{actionQueue:n}=w.useContext(He);n&&e&&n.register(t),w.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},ZA=({isAdmin:e=!1})=>{var vi,Kh;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s,connectorId:a}=w.useContext(He),i=ht(),{userGroupId:c,userId:d}=Rt()||{},f=w.useRef(!1),g=w.useRef(null),y=w.useRef(null),C=w.useRef(null),[b,h]=w.useState({}),[p,m]=w.useState(!1),[x,E]=w.useState(!1),[I,v]=w.useState(!1),[_,A]=w.useState(!1),[S,L]=w.useState(),[N,D]=w.useState(!1),[F,M]=w.useState(null),[B,V]=w.useState(),[Y,W]=w.useState(null),[H,q]=w.useState(!1),[Q,ee]=w.useState(!1),[G,J]=w.useState(!1),[R,X]=w.useState(!1),[K,ne]=w.useState(void 0),le=w.useRef(),j=be(l2),oe=be(bI),_e=be(xI),z=be(CI),Pe=be(vI),We=be(yI),Ee=be(m2),Gt=be(NI),sr=be(b2),nt=be(y2),tt=be(x2),Ze=be(cS),Pr=rt(o,_4),Qt=rt(o,i0),Br=rt(o,k4),Nn=rt(o,D4),Vr=rt(o,N4),Rn=rt(o,R4),Tt=(vi=Rt())==null?void 0:vi.tenantPlatform,yt=rt(o,Tt==="HIVERWEB"?`hot-${c0}`:c0),{data:Gr}=Ft({queryKey:["connectors","enabledAuthenticated"],queryFn:()=>Vf(),enabled:yt&&e}),ar=w.useMemo(()=>(Gr??[]).map(re=>re.id),[Gr]),{data:Ht,isSuccess:No}=Ft({queryKey:["lookup","bulk",ar.join(",")],queryFn:()=>RA(ar),enabled:ar.length>0&&yt&&e,refetchOnMount:!1}),Ro=No&&((Ht==null?void 0:Ht.connectors)??[]).some(re=>{var Ie;return(((Ie=re.presets)==null?void 0:Ie.length)??0)>1});WA({conversationId:s,openCreateForm:()=>v(!0),enabled:oe});const Hr=w.useMemo(()=>!j||!j.length?null:gI(j,_e,z),[j,_e,z]),Lt=e5(_e),ir=be(Rl),cr=w.useMemo(()=>{if(!ir)return[];const re=new Map;return Object.values(ir).forEach(Ie=>{Ie.userAuthEnabled&&Ie.connectorId&&!re.has(Ie.connectorId)&&re.set(Ie.connectorId,{connectorId:Ie.connectorId,connectorName:Ie.connectorName??Ie.name,connectorLogo:Ie.logoUrl??""})}),Array.from(re.values())},[ir]),Wr=be(re=>cr.some(Ie=>r_(re,Ie.connectorId))),Wt=w.useMemo(()=>(j??[]).filter(re=>re.userAuthEnabled&&re.connectorId).map(re=>re.connectorId),[j]),{isResolving:Zr}=c_(Wt),{data:vn,isLoading:wn}=oh({senderEmail:t,conversationId:String(s),enabled:Nn&&!!t}),{emailHeaders:zr,selectedEmail:Xr}=vn??{},{scrollOnceAfterLoad:Mo,resetScrollState:Yr}=FA(y),jo=We!==te.LOADING&&(!z||!Object.values(z).some(re=>re===te.LOADING))&&j&&j.length>0;w.useLayoutEffect(()=>{var re;H&&!p&&Q&&((re=C==null?void 0:C.current)!=null&&re.scrollHeight)&&Mo(!!jo,"smooth")},[H,p,Q,jo,Mo,(Kh=C==null?void 0:C.current)==null?void 0:Kh.scrollHeight,d]);const Po=(re,Ie)=>{r(l4,{search_keyword:re,sm_ids:n,connector_name:Ie,suggestion_type:Ze})},Bo=(re,Ie,kt)=>{!Array.isArray(Ie)||!Ie.length?r(u4,{search_keyword:re,sm_ids:n,connector_name:kt,suggestion_type:Ze}):Ie.length&&r(d4,{num_of_results:Ie.length,search_keyword:re,sm_ids:n,connector_name:kt,suggestion_type:Ze})},{mutate:Vo,reset:Jr,data:qr,isPending:ae,isIdle:ye}=kA(Po,Bo),Ve=w.useCallback(()=>{Jr(),M(null)},[Jr,M]),Ot=un(),ze=w.useCallback(()=>{if(t&&n.length&&s){const re=i(mi({inboxIds:n,conversationId:s,connectorId:a}));return()=>re.abort()}},[i,t,n,s,a]),k=w.useCallback(()=>{Ot.invalidateQueries({queryKey:["lookup","bulk"]}),ze()},[Ot,ze]),Z=w.useCallback(()=>{Ot.invalidateQueries({queryKey:["lookup","bulk"]}),ze()},[Ot,ze]),U=w.useCallback((re,Ie)=>{re&&s&&Ie&&i(pi({id:re,channelType:"email",conversationId:s,externalResourceId:Ie,contactEmail:t})).unwrap().catch(()=>{i(mo(null))})},[i,s,t]);if(w.useEffect(()=>{(async()=>{d&&(q(await Yi(d)),ee(await ed(d)))})()},[d]),w.useEffect(()=>{wn||V(Xr||t)},[t,Xr,wn]),w.useEffect(()=>{B&&s&&AA(String(s),B)},[B,s]),w.useEffect(()=>{Q&&d&&td(d)},[Q,d]),w.useEffect(()=>{var re;if(nt){E(!0);const{externalResourceId:Ie}=nt,kt=(re=nt.forms.find(jn=>jn.type==="edit"))==null?void 0:re.id;U(kt,Ie)}else E(!1),i(cI())},[nt,U,i]),w.useEffect(()=>{const re=ze();return Yr(),()=>{re==null||re(),i(h2.clearConnectorList())}},[i,ze,Yr]),w.useEffect(()=>{var re;if(Pe&&j&&j.length&&Hr&&!f.current){const{cards_per_app:Ie,total_empty_cards:kt,total_cards_with_errors:jn}=Hr,eg=a?(re=Ie[0])==null?void 0:re.app_name:null;r(Bb,{numOfCards:j.length,total_cards_loaded:j.length,total_empty_cards:kt,total_cards_with_errors:jn,cards_per_app:Ie,sm_ids:n,...eg?{app_name:eg}:null}),f.current=!0}return()=>{f.current=!1}},[Pe,j,Hr,r,n,a]),w.useEffect(()=>{if(s&&n&&n.length){const re=i(ci({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:Rn,connectorId:a}));return()=>re.abort()}},[i,n,s,Rn,a]),w.useEffect(()=>{const re=Ie=>{var jn;if(!(Ie instanceof CustomEvent))return;const kt=(jn=Ie.detail)==null?void 0:jn.connectorKey;h({connectorKey:kt})};return window.addEventListener(zl.OPEN_FORM_VIEW,re),()=>{window.removeEventListener(zl.OPEN_FORM_VIEW,re)}},[]),w.useEffect(()=>{if(!(Ee!=null&&Ee.length)||!b.connectorKey)return;const re=b.connectorKey;h({});const Ie=Ee.find(kt=>{var jn;return((jn=kt.connectorKey)==null?void 0:jn.toLowerCase())===(re==null?void 0:re.toLowerCase())});Ie&&(W(Ie),v(!0))},[Ee,b]),!t.length||We===te.LOADING||Zr)return u.jsx(Y_,{});const ue=re=>{r(Zb,{connector_name:Gt,source:re,sm_ids:n})},Se=re=>{v(!0),ue(re)},we=()=>{A(!0),xe(r0),me(s0),r(zb)},xe=re=>{r(re,S),tt?D(!0):(v(!1),W(null))},me=re=>{if(nt){const{connectorName:Ie,title:kt}=nt;r(re,{connector_name:Ie,card_title:kt,sm_ids:n,ug_id:c})}tt?D(!0):i(mo(null))},lt=()=>{v(!1),i(mo(null)),L(void 0),D(!1)},Xe=()=>{ze(),v(!1),E(!1),i(h2.clearConnectorList())},$e=[{label:"Go back",variant:"text",action:lt},{label:"Stay",variant:"contained",action:()=>D(!1)}],pt=Ee.length>0,In=sr.length>0,Mn=I||x||_,ut=()=>pt||In?u.jsx(jS,{haveCreateObjects:pt,haveLinkObjects:In,onCreateClick:()=>Se(x0.MAIN_BUTTON),onLinkClick:()=>A(!0)}):u.jsx(k2,{isAdmin:e,hideHeading:!0}),Ds=()=>{J(!0);const re=le.current,Ie=re==null?void 0:re.connectorName,kt=re==null?void 0:re.name;r(v4,{entry_point:"agent",app_name:Ie,object_type:kt})},tu=re=>{le.current=re};return u.jsxs(L0,{ref:g,"data-testid":Array.isArray(j)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:I||_,children:[u.jsx(E_,{}),u.jsx(Y2,{shown:N,setShown:D,title:Uw,description:Kw,buttons:$e}),u.jsx(D5,{onWheel:()=>m(!0),ref:C,children:oe?u.jsxs(u.Fragment,{children:[!Wr&&u.jsx(fy,{connectors:Lt,isWriteFlowEnabled:Qt,haveCreateObjects:pt,haveLinkObjects:In,cards:j,handleCreateNewObject:()=>Se(x0.ICON),handleLinkNewObject:we}),Br&&!Mn?u.jsx(mA,{selectedObject:F,setSelectedObject:M,fetchSearchResults:Vo,onReset:Ve,root:g.current}):null,u.jsxs(yo,{children:[u.jsx(On,{condition:Br&&ae,children:u.jsx(SA,{})},"search"),u.jsx(On,{condition:Br&&!!F&&!ye,children:u.jsx(_A,{searchResults:qr??[],selectedObject:F,onReset:Ve,fetchCards:ze})},"results"),u.jsx(On,{condition:I,children:u.jsx(Pl,{onClose:()=>xe(r0),title:wc,rightNode:u.jsx(FS,{formId:K,conversationId:s,inboxIds:n,enabled:I&&!!K&&!!e,setMapFormOpen:Ds}),children:u.jsx(q2,{onClose:()=>xe(Qb),onCreateSuccess:Xe,metaData:S,setMetaData:L,defaultOption:Y,connectors:Lt,mapFormOpen:G,setMapFormOpen:J,setCreateFormId:ne,syncCurrentObject:tu})})},"create-form"),u.jsx(On,{condition:x,children:u.jsx(Pl,{onClose:()=>me(s0),title:Z4,backButtonTooltip:"Back",children:u.jsx(q2,{isEdit:!0,onClose:()=>me(n4),onCreateSuccess:Xe,metaData:S,setMetaData:L,connectors:Lt})})},"edit-form"),u.jsx(On,{condition:_,children:u.jsx(Pl,{onClose:()=>A(!1),children:u.jsx(kS,{setOpenTaskLinking:A,onLinkingSuccess:ze})})},"link-form"),u.jsxs(On,{fallback:!0,children:[Nn&&(j!=null&&j.length)&&!Wr?u.jsxs(l.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[u.jsx(l.Stack,{sx:{flex:1,minWidth:0},children:u.jsx(rS,{emailHeaders:zr,selectedEmail:B,root:g.current,isLoading:wn,setSelectedEmail:V})}),yt&&Ro&&e&&u.jsx(l.Tooltip,{title:"Update customer identity mapping",placement:"top",children:u.jsx(l.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(a0,{page:"agent_connector_panel"}),X(!0)},children:u.jsx(l.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!Nn&&yt&&Ro&&e&&(j!=null&&j.length)?u.jsx(l.Button,{fullWidth:!0,variant:"contained",startIcon:u.jsx(l.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(a0,{page:"agent_connector_panel"}),X(!0)},children:"Customer identity mapping"}):null,Pr?u.jsx(J_,{}):null,u.jsxs(yo,{children:[u.jsxs(On,{condition:!!j&&j.length>0,children:[u.jsx(b_,{cards:j,specificCardData:_e,email:B??"",specificConnectorApiStatus:z,onCardUnlinking:ze}),u.jsx("div",{ref:y,children:Vr?u.jsx(f5,{connectors:Lt,expanded:H}):null})]},"cards-list"),u.jsx(On,{condition:!(j!=null&&j.length)&&Qt,children:cr.length>0?u.jsx(x_,{connectors:cr,onConnected:Z,children:ut()}):ut()},"create-banner")]})]},"cards")]})]}):u.jsx(k2,{isAdmin:e})}),!oe&&u.jsx(I5,{}),yt&&u.jsx(HA,{open:R,onClose:()=>X(!1),connectors:(Ht==null?void 0:Ht.connectors)??[],onSaveSuccess:k})]})},zA=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:d,stackingContext:f,isAdmin:g=!1,actionQueue:y,store:C,connectorId:b,variables:h})=>{const p=w.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:d,stackingContext:f,actionQueue:y,store:C,connectorId:b,variables:h}),[s,n,r,t,o,a,i,c,g,d,f,y,C,b,h]);return u.jsx(He.Provider,{value:p,children:e})},Xl=({children:e})=>{const[t]=w.useState(()=>new Cg);return u.jsx(Ag,{client:t,children:e})},XA=X0({cardList:kI,userAuth:e_,write:lI,common:kw}),bi=Fx({reducer:XA,devTools:!0}),YA=()=>{const e=Rt();if(!e){console.warn("[connectors-ui] registerUserAuthCallback called before initConnectorsBifrost; user-tier 412 responses will not route through the userAuth slice.");return}e.onUserAuthRequired=t=>{bi.dispatch(UI({connectorId:t.connector_id,connectUrl:t.connect_url,reason:t.reason}))}},JA=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c,store:d,connectorId:f})=>(w.useEffect(()=>{YA()},[]),u.jsx(Nc,{store:bi,children:u.jsx(l.HiverProvider,{inter:!0,children:u.jsx(Xl,{children:u.jsx(zA,{...n,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:d,connectorId:f,children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})})),qA=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i,store:c})=>{const[d,f]=w.useState(()=>{if(c)return c.getData("connectorId")});return w.useEffect(()=>{if(!c)return;const g=c.subscribe(y=>{f(y)},"connectorId");return()=>g()},[c]),u.jsx(ka,{children:u.jsxs(JA,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,store:c,connectorId:d,children:[u.jsx(ZA,{isAdmin:r==null?void 0:r.isAdmin},d||"root"),u.jsx(Fa,{zIndex:a.toastMessage}),u.jsx("div",{"data-connectorid":"connector-layover-portal"})]})})},ch="/v1/api",QA=`${ch}/connector/conversation/:conversationId/data`,$A=`${ch}/connector/feedback/conversation/:conversationId`,UA=async(e,t)=>{try{let n=QA.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 ve({url:n,method:Le.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 KA(e,t,n){return Ft({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await UA(e,n),enabled:!!t&&!!e})}class eT{constructor(t=[],n=null){je(this,"highlightTerms");je(this,"observer");je(this,"isHighlighting");je(this,"debounceTimer");je(this,"debounceDelay");je(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,d,f,g;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((d=i.classList)==null?void 0:d.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((g=i.querySelector)==null?void 0:g.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
|
|
2578
2578
|
.gmail-highlight {
|
|
2579
2579
|
background-color: #ECEFF6 !important;
|
|
2580
2580
|
color: #2c3e50 !important;
|
|
@@ -2604,7 +2604,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2604
2604
|
transform: translateY(0) !important;
|
|
2605
2605
|
box-shadow: none !important;
|
|
2606
2606
|
}
|
|
2607
|
-
`,document.head.appendChild(e)}function tT(){return Kt({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await ve({url:$A.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const nT="Everything looks good",rT="Something is not working",oT="Share feedback",sT="Manage Smart Previews",aT="Reach out to your admin to disable this feature",iT="Go to Apps",cT="Disable Feature",lT="Tell us what went wrong",uT="Please provide feedback",dT=[{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"}],fT="Tell us more (optional)",pT="Enter your feedback",Yl=40,hT="Feedback submitted",gT="Failed to submit feedback",
|
|
2607
|
+
`,document.head.appendChild(e)}function tT(){return Kt({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await ve({url:$A.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const nT="Everything looks good",rT="Something is not working",oT="Share feedback",sT="Manage Smart Previews",aT="Reach out to your admin to disable this feature",iT="Go to Apps",cT="Disable Feature",lT="Tell us what went wrong",uT="Please provide feedback",dT=[{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"}],fT="Tell us more (optional)",pT="Enter your feedback",Yl=40,hT="Feedback submitted",gT="Failed to submit feedback",bn={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"},lh=e=>u.jsx(l.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?u.jsx(l.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),mT=l.styled(l.Box)`
|
|
2608
2608
|
max-height: 340px;
|
|
2609
2609
|
width: 440px;
|
|
2610
2610
|
border-radius: 12px;
|
|
@@ -2626,7 +2626,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2626
2626
|
justify-content: flex-end;
|
|
2627
2627
|
margin-top: 30px;
|
|
2628
2628
|
gap: 8px;
|
|
2629
|
-
`,
|
|
2629
|
+
`,uh=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=w.useState(""),[i,c]=w.useState(""),d=b=>{a(b.target.value)},f=b=>{b.stopPropagation();const{value:h}=(b==null?void 0:b.target)||{};c(h)},g=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},C=r?!s:!i;return u.jsxs(mT,{children:[u.jsx(l.Typography,{variant:"h3",children:o}),u.jsx(bT,{}),r?u.jsx(l.FormControl,{children:u.jsx(l.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:d,children:dT.map(b=>u.jsx(l.FormControlLabel,{value:b.value,control:u.jsx(l.Radio,{}),label:b.label},b.value))})}):null,u.jsx(Sr,{type:"text",placeholder:r?fT:pT,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:el()}}),u.jsxs(yT,{children:[u.jsx(l.Button,{variant:"text",color:"primary",style:{color:l.theme.palette.gray.gray3},disabled:n,onClick:y,children:"Cancel"}),u.jsx(lh,{variant:"contained",color:"primary",isLoading:n,disabled:C,label:"Submit",onClick:g})]})]})},xT=l.styled(l.Box)`
|
|
2630
2630
|
border-radius: 12px;
|
|
2631
2631
|
max-height: 298px;
|
|
2632
2632
|
width: 288px;
|
|
@@ -2687,7 +2687,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2687
2687
|
width: 100%;
|
|
2688
2688
|
min-height: 40px;
|
|
2689
2689
|
background-color: ${l.theme.palette.gray.gray6a};
|
|
2690
|
-
`,
|
|
2690
|
+
`,Is=l.styled(l.Tooltip)`
|
|
2691
2691
|
padding: 6px;
|
|
2692
2692
|
border-radius: 6px;
|
|
2693
2693
|
`,TT=l.styled(l.Button)`
|
|
@@ -2696,7 +2696,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2696
2696
|
color: #196fe0;
|
|
2697
2697
|
padding: 5px 12px;
|
|
2698
2698
|
min-width: 100px;
|
|
2699
|
-
`,uh=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"})),dh=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"})),LT=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"})),OT=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)"})))),kT=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"})))),FT=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[d,f]=w.useState(!1),g=w.useRef(!1),[y,C]=w.useState(!1),[b,h]=w.useState([]),{mutate:p,isPending:m}=tT(),{logoUrl:x,cardTitle:E,id:I,externalResourceId:v,connectorId:_,textToHighlight:A}=e.cardData||{},S=w.useMemo(()=>({key:A,card_id:I,card_title:E,connector_id:_,external_resource_id:v,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,I,E,_,v,r,n]);if(w.useEffect(()=>{const H=Date.now();return()=>{c(yn.DATA_CARD_DURATION,{...S,duration:Date.now()-H})}},[c]),w.useEffect(()=>{var q,Q,ee;const H=(ee=(Q=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:Q.flatDetails)==null?void 0:ee.data;if(H){const G=H.sort((J,R)=>J.priority-R.priority);h(G),c(yn.OBJECT_HOVERED,S)}},[e,c,S]),!b||b.length===0)return null;const L=()=>{f(!0),c(yn.FEEDBACK_OPTION_CLICKED,S)},N=()=>{C(!0),c(yn.NEGATIVE_FEEDBACK_CLICKED,S)},D=H=>{const q={card_id:I,entity_id:v,comment:H.feedbackComment,option:H.feedbackOption,feedback_type:"entity_extraction"};typeof H.isThumbsUp<"u"&&(q.positive_feedback=H.isThumbsUp),p({conversationId:r,feedbackData:q},{onSuccess:()=>{d?c(yn.FEEDBACK_OPTION_SUBMITTED,S):y&&c(yn.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),C(!1),Ae({message:hT,type:sn})},onError:()=>{Ae({message:gT,type:Ue})}})},F=()=>{D({isThumbsUp:!0}),c(yn.POSITIVE_FEEDBACK_CLICKED,S)},M=H=>{D({...H,isThumbsUp:!1})},B=()=>{s==null||s(_),i()},V=()=>{a==null||a()},Y=H=>{c(yn.PERMALINK_CLICKED,{...S,clicked_value:H})},W=()=>{g.current||(c(yn.DATA_CARD_SCROLLED,S),g.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(xT,{children:[u.jsxs(wT,{onScroll:W,children:[u.jsxs(CT,{children:[u.jsxs(l.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[x&&u.jsx("img",{src:x,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(l.Tooltip,{title:E,arrow:!0,placement:"top",children:u.jsx(ET,{variant:"h3",color:l.theme.palette.gray.black,width:o?"100px":"200px",children:E})})]}),o?u.jsx(TT,{variant:"text",size:"small",endIcon:u.jsx(l.icons.ArrowForward,{}),onClick:V,children:iT}):null]}),u.jsx(vT,{}),u.jsx(l.Box,{paddingY:"16px",children:b.map(({key:H,value:q,label:Q,deepLink:ee})=>u.jsxs(ST,{children:[u.jsxs(IT,{children:[Q,":"]}),u.jsx(l.Tooltip,{title:(q==null?void 0:q.length)>Yl?q:"",arrow:!0,placement:"top",children:ee?u.jsx(l.Link,{href:ee,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:l.theme.palette.primary.main},onClick:()=>Y(q),children:w0(q||"N/A",Yl)}):u.jsx(_T,{children:w0(q||"N/A",Yl)})})]},H))})]}),u.jsxs(AT,{children:[u.jsx(l.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx(vs,{arrow:!0,title:sT,placement:"top",children:u.jsx(l.IconButton,{onClick:B,children:u.jsx(LT,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(l.Typography,{color:l.theme.palette.gray.gray3,fontSize:12,children:cT}),u.jsx(vs,{arrow:!0,title:aT,placement:"top",children:u.jsx(l.IconButton,{size:"small",children:u.jsx(kT,{})})})]})}),u.jsxs(l.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx(vs,{arrow:!0,title:nT,placement:"top",children:u.jsx(l.IconButton,{size:"small",disabled:m,onClick:F,children:u.jsx(uh,{})})}),u.jsx(vs,{arrow:!0,title:rT,placement:"top",children:u.jsx(l.IconButton,{size:"small",disabled:m,onClick:N,children:u.jsx(dh,{})})}),u.jsx(vs,{arrow:!0,title:oT,placement:"top",children:u.jsx(l.IconButton,{onClick:L,size:"small",disabled:m,children:u.jsx(OT,{})})})]})]})]}),u.jsx(qn,{shown:d,setShown:f,borderRadius:12,sx:{zIndex:15002},children:u.jsx(lh,{onCancel:()=>f(!1),onSubmit:D,isLoading:m,showOptions:!1,title:uT})}),u.jsx(qn,{shown:y,setShown:C,borderRadius:12,sx:{zIndex:15002},children:u.jsx(lh,{onCancel:()=>C(!1),onSubmit:M,isLoading:m,title:lT})})]})},fh=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,ph=(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"},DT=l.styled(({className:e,...t})=>u.jsx(l.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${l.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 ${l.theme.palette.gray.gray6}`,position:"relative"}}));function NT({elements:e,title:t,onKeyChange:n}){const[r,o]=w.useState(!1),[s,a]=w.useState(null),[i,c]=w.useState(""),[d,f]=w.useState("bottom"),[g,y]=w.useState(!1),C=w.useRef(null),b=w.useRef({x:0,y:0}),h=w.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null)},[]);w.useEffect(()=>{if(e&&e.length>0){const v=S=>{const L=S.currentTarget,N=L.textContent||"",D=ph(L);f(D),c(N),n&&n(N),a(L),o(!0)},_=()=>{if(r&&s){const S=ph(s);f(S)}},A=S=>{if(b.current={x:S.clientX,y:S.clientY},!r||g)return;const L=S.clientX,N=S.clientY;let D=!1;for(const F of e)if(fh(L,N,F.getBoundingClientRect())){D=!0;break}if(!D){const F=document.querySelector(`.${l.tooltipClasses.tooltip}`);F&&fh(L,N,F.getBoundingClientRect())&&(D=!0)}D||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",v)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",A),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",v)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",A),h()}}},[e,n,r,s,g,h]);const p=()=>{y(!0),h()},m=()=>{y(!1),C.current=setTimeout(()=>{o(!1),a(null)},150)},E=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:p,onMouseLeave:m,children:E});return u.jsx(DT,{title:I,open:r,placement:d,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const RT=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=w.useState(null),[d,f]=w.useState([]),{data:g,isError:y}=KA(e,t,n);return w.useEffect(()=>{g?c(g):y&&c(null)},[g,y]),w.useEffect(()=>{let C=null;if(i&&Object.keys(i).length&&e){C=new eT(Object.keys(i)||[],f);const b=Object.keys(i).map(h=>{var m;const p=((m=i[h])==null?void 0:m.cardData)||{};return{key:h,card_title:p.cardTitle,connector_id:p.connectorId}});a(yn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:b})}return()=>{C&&C.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(NT,{elements:d,title:(C,b)=>{var h;return!i||!C||!((h=i[C])!=null&&h.cardData)?u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(FT,{smIds:n,conversationId:e||"",analysisData:i[C],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:b,sendTrackingEvent:a})}})})},MT=({children:e})=>u.jsx(Nc,{store:bi,children:u.jsx(l.HiverProvider,{inter:!0,children:u.jsx(Xl,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),jT=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx(Oa,{children:u.jsxs(MT,{children:[u.jsx(RT,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),u.jsx(ka,{})]})}),hh={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},PT=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class BT{constructor({processDelay:t=1e3}){je(this,"_processDelay");je(this,"initialized",!1);je(this,"_queue",[]);je(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});je(this,"ACTIONS",hh);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 hh.OPEN_CREATE_FORM:PT(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var pe=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(pe||{}),yi=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(yi||{});const VT=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},gh=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===yi.UNAUTHENTICATED?pe.UNAUTHENTICATED:n.pending>0?pe.PENDING:n.failed?pe.ERROR:r.length===0?pe.NOT_LOGGED:o?pe.LOGGED:pe.PAUSED},Jl=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"})),GT=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"})),HT=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)"})))),WT=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"})))),xi=l.keyframes`
|
|
2699
|
+
`,dh=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"})),fh=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"})),LT=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"})),OT=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)"})))),kT=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"})))),FT=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[d,f]=w.useState(!1),g=w.useRef(!1),[y,C]=w.useState(!1),[b,h]=w.useState([]),{mutate:p,isPending:m}=tT(),{logoUrl:x,cardTitle:E,id:I,externalResourceId:v,connectorId:_,textToHighlight:A}=e.cardData||{},S=w.useMemo(()=>({key:A,card_id:I,card_title:E,connector_id:_,external_resource_id:v,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,I,E,_,v,r,n]);if(w.useEffect(()=>{const H=Date.now();return()=>{c(bn.DATA_CARD_DURATION,{...S,duration:Date.now()-H})}},[c]),w.useEffect(()=>{var q,Q,ee;const H=(ee=(Q=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:Q.flatDetails)==null?void 0:ee.data;if(H){const G=H.sort((J,R)=>J.priority-R.priority);h(G),c(bn.OBJECT_HOVERED,S)}},[e,c,S]),!b||b.length===0)return null;const L=()=>{f(!0),c(bn.FEEDBACK_OPTION_CLICKED,S)},N=()=>{C(!0),c(bn.NEGATIVE_FEEDBACK_CLICKED,S)},D=H=>{const q={card_id:I,entity_id:v,comment:H.feedbackComment,option:H.feedbackOption,feedback_type:"entity_extraction"};typeof H.isThumbsUp<"u"&&(q.positive_feedback=H.isThumbsUp),p({conversationId:r,feedbackData:q},{onSuccess:()=>{d?c(bn.FEEDBACK_OPTION_SUBMITTED,S):y&&c(bn.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),C(!1),Te({message:hT,type:sn})},onError:()=>{Te({message:gT,type:Ue})}})},F=()=>{D({isThumbsUp:!0}),c(bn.POSITIVE_FEEDBACK_CLICKED,S)},M=H=>{D({...H,isThumbsUp:!1})},B=()=>{s==null||s(_),i()},V=()=>{a==null||a()},Y=H=>{c(bn.PERMALINK_CLICKED,{...S,clicked_value:H})},W=()=>{g.current||(c(bn.DATA_CARD_SCROLLED,S),g.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(xT,{children:[u.jsxs(wT,{onScroll:W,children:[u.jsxs(CT,{children:[u.jsxs(l.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[x&&u.jsx("img",{src:x,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(l.Tooltip,{title:E,arrow:!0,placement:"top",children:u.jsx(ET,{variant:"h3",color:l.theme.palette.gray.black,width:o?"100px":"200px",children:E})})]}),o?u.jsx(TT,{variant:"text",size:"small",endIcon:u.jsx(l.icons.ArrowForward,{}),onClick:V,children:iT}):null]}),u.jsx(vT,{}),u.jsx(l.Box,{paddingY:"16px",children:b.map(({key:H,value:q,label:Q,deepLink:ee})=>u.jsxs(ST,{children:[u.jsxs(IT,{children:[Q,":"]}),u.jsx(l.Tooltip,{title:(q==null?void 0:q.length)>Yl?q:"",arrow:!0,placement:"top",children:ee?u.jsx(l.Link,{href:ee,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:l.theme.palette.primary.main},onClick:()=>Y(q),children:w0(q||"N/A",Yl)}):u.jsx(_T,{children:w0(q||"N/A",Yl)})})]},H))})]}),u.jsxs(AT,{children:[u.jsx(l.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx(Is,{arrow:!0,title:sT,placement:"top",children:u.jsx(l.IconButton,{onClick:B,children:u.jsx(LT,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(l.Typography,{color:l.theme.palette.gray.gray3,fontSize:12,children:cT}),u.jsx(Is,{arrow:!0,title:aT,placement:"top",children:u.jsx(l.IconButton,{size:"small",children:u.jsx(kT,{})})})]})}),u.jsxs(l.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx(Is,{arrow:!0,title:nT,placement:"top",children:u.jsx(l.IconButton,{size:"small",disabled:m,onClick:F,children:u.jsx(dh,{})})}),u.jsx(Is,{arrow:!0,title:rT,placement:"top",children:u.jsx(l.IconButton,{size:"small",disabled:m,onClick:N,children:u.jsx(fh,{})})}),u.jsx(Is,{arrow:!0,title:oT,placement:"top",children:u.jsx(l.IconButton,{onClick:L,size:"small",disabled:m,children:u.jsx(OT,{})})})]})]})]}),u.jsx(Yn,{shown:d,setShown:f,borderRadius:12,sx:{zIndex:15002},children:u.jsx(uh,{onCancel:()=>f(!1),onSubmit:D,isLoading:m,showOptions:!1,title:uT})}),u.jsx(Yn,{shown:y,setShown:C,borderRadius:12,sx:{zIndex:15002},children:u.jsx(uh,{onCancel:()=>C(!1),onSubmit:M,isLoading:m,title:lT})})]})},ph=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,hh=(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"},DT=l.styled(({className:e,...t})=>u.jsx(l.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${l.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 ${l.theme.palette.gray.gray6}`,position:"relative"}}));function NT({elements:e,title:t,onKeyChange:n}){const[r,o]=w.useState(!1),[s,a]=w.useState(null),[i,c]=w.useState(""),[d,f]=w.useState("bottom"),[g,y]=w.useState(!1),C=w.useRef(null),b=w.useRef({x:0,y:0}),h=w.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null)},[]);w.useEffect(()=>{if(e&&e.length>0){const v=S=>{const L=S.currentTarget,N=L.textContent||"",D=hh(L);f(D),c(N),n&&n(N),a(L),o(!0)},_=()=>{if(r&&s){const S=hh(s);f(S)}},A=S=>{if(b.current={x:S.clientX,y:S.clientY},!r||g)return;const L=S.clientX,N=S.clientY;let D=!1;for(const F of e)if(ph(L,N,F.getBoundingClientRect())){D=!0;break}if(!D){const F=document.querySelector(`.${l.tooltipClasses.tooltip}`);F&&ph(L,N,F.getBoundingClientRect())&&(D=!0)}D||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",v)}),window.addEventListener("resize",_),window.addEventListener("scroll",_),document.addEventListener("mousemove",A),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",v)}),window.removeEventListener("resize",_),window.removeEventListener("scroll",_),document.removeEventListener("mousemove",A),h()}}},[e,n,r,s,g,h]);const p=()=>{y(!0),h()},m=()=>{y(!1),C.current=setTimeout(()=>{o(!1),a(null)},150)},E=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:p,onMouseLeave:m,children:E});return u.jsx(DT,{title:I,open:r,placement:d,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const RT=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=w.useState(null),[d,f]=w.useState([]),{data:g,isError:y}=KA(e,t,n);return w.useEffect(()=>{g?c(g):y&&c(null)},[g,y]),w.useEffect(()=>{let C=null;if(i&&Object.keys(i).length&&e){C=new eT(Object.keys(i)||[],f);const b=Object.keys(i).map(h=>{var m;const p=((m=i[h])==null?void 0:m.cardData)||{};return{key:h,card_title:p.cardTitle,connector_id:p.connectorId}});a(bn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:b})}return()=>{C&&C.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(NT,{elements:d,title:(C,b)=>{var h;return!i||!C||!((h=i[C])!=null&&h.cardData)?u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(FT,{smIds:n,conversationId:e||"",analysisData:i[C],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:b,sendTrackingEvent:a})}})})},MT=({children:e})=>u.jsx(Nc,{store:bi,children:u.jsx(l.HiverProvider,{inter:!0,children:u.jsx(Xl,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),jT=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx(ka,{children:u.jsxs(MT,{children:[u.jsx(RT,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),u.jsx(Fa,{})]})}),gh={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},PT=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class BT{constructor({processDelay:t=1e3}){je(this,"_processDelay");je(this,"initialized",!1);je(this,"_queue",[]);je(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});je(this,"ACTIONS",gh);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 gh.OPEN_CREATE_FORM:PT(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var pe=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(pe||{}),yi=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(yi||{});const VT=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},mh=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===yi.UNAUTHENTICATED?pe.UNAUTHENTICATED:n.pending>0?pe.PENDING:n.failed?pe.ERROR:r.length===0?pe.NOT_LOGGED:o?pe.LOGGED:pe.PAUSED},Jl=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"})),GT=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"})),HT=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)"})))),WT=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"})))),xi=l.keyframes`
|
|
2700
2700
|
from {
|
|
2701
2701
|
transform: rotate(0deg);
|
|
2702
2702
|
}
|
|
@@ -2717,17 +2717,17 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2717
2717
|
animation: ${xi} 1s linear infinite;
|
|
2718
2718
|
animation-fill-mode: backwards;
|
|
2719
2719
|
animation-direction: reverse;
|
|
2720
|
-
`,YT={[pe.NOT_LOGGED]:u.jsx(ZT,{children:u.jsx(
|
|
2720
|
+
`,YT={[pe.NOT_LOGGED]:u.jsx(ZT,{children:u.jsx(Q2,{})}),[pe.PENDING]:u.jsx(XT,{children:u.jsx(HT,{})}),[pe.LOGGED]:u.jsx(zT,{children:u.jsx(GT,{})}),[pe.ERROR]:u.jsx(Jl,{width:16,height:16}),[pe.UNAUTHENTICATED]:u.jsx(Jl,{width:16,height:16}),[pe.PAUSED]:u.jsx(WT,{width:16,height:16})},bh=l.styled(l.Typography)`
|
|
2721
2721
|
font-size: 13px;
|
|
2722
2722
|
line-height: 24px;
|
|
2723
2723
|
font-weight: 500;
|
|
2724
2724
|
color: #4d596c;
|
|
2725
|
-
`,JT=l.styled(
|
|
2725
|
+
`,JT=l.styled(bh)`
|
|
2726
2726
|
color: #6f7c90;
|
|
2727
|
-
`,Ql=e=>u.jsx(
|
|
2727
|
+
`,Ql=e=>u.jsx(bh,{children:e}),$l=e=>u.jsx(JT,{children:e}),qT={[pe.NOT_LOGGED]:Ql,[pe.PENDING]:$l,[pe.LOGGED]:Ql,[pe.PAUSED]:Ql,[pe.ERROR]:$l,[pe.UNAUTHENTICATED]:$l},QT={[pe.NOT_LOGGED]:"Sync conversation",[pe.PENDING]:"Syncing in progress",[pe.LOGGED]:"Synced",[pe.PAUSED]:"Synced",[pe.ERROR]:"Syncing failed",[pe.UNAUTHENTICATED]:"Sync conversation"},Xt=w.createContext({}),$T=l.styled(({className:e,...t})=>u.jsx(l.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${l.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 ${l.theme.palette.gray.gray6}`,position:"relative"}})),UT=l.styled(l.Box)`
|
|
2728
2728
|
width: fit-content;
|
|
2729
2729
|
height: fit-content;
|
|
2730
|
-
`,KT=({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(l.ClickAwayListener,{onClickAway:s,children:u.jsx(UT,{onClick:a,children:u.jsx($T,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:u.jsx(l.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},eL="Turn off to stop syncing this conversation.",tL="Turn on to continue syncing this conversation.",nL="Authentication failed",rL="Retry authentication to use this functionality and save in ':connectorName'",oL="Reach out to your admin to reauthenticate :connectorName",sL="Syncing this conversation to :connectorName. Refresh the page to see updates.",aL="Something went wrong while syncing this conversation. Please try again.",iL="No recommendations found",cL="Already synced email cannot be removed",lL="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",uL="Log this email thread to your CRM",dL="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",
|
|
2730
|
+
`,KT=({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(l.ClickAwayListener,{onClickAway:s,children:u.jsx(UT,{onClick:a,children:u.jsx($T,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:u.jsx(l.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},eL="Turn off to stop syncing this conversation.",tL="Turn on to continue syncing this conversation.",nL="Authentication failed",rL="Retry authentication to use this functionality and save in ':connectorName'",oL="Reach out to your admin to reauthenticate :connectorName",sL="Syncing this conversation to :connectorName. Refresh the page to see updates.",aL="Something went wrong while syncing this conversation. Please try again.",iL="No recommendations found",cL="Already synced email cannot be removed",lL="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",uL="Log this email thread to your CRM",dL="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",yh="connector-agent_email-logger_welcomed",xh="connector-agent_email-logger_welcome_shown",fL="Tell us how we can improve",pL="Everything looks good",hL="Something is not working",gL="Please provide your feedback",mL="Share your feedback",bL="Feedback submitted",yL="Failed to submit feedback",Ch="email-logging",xL=[{label:"Records are not accurate",value:"not_accurate"},{label:"Search is not working",value:"search_not_working"},{label:"Other",value:"other"}],_t={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"},CL={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:l.theme.palette.gray.gray3,padding:"0px"},EL={color:"#fff !important"},vL=l.styled(l.Stack)`
|
|
2731
2731
|
box-sizing: border-box;
|
|
2732
2732
|
padding: 16px;
|
|
2733
2733
|
`,wL=l.styled("img")`
|
|
@@ -2756,7 +2756,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2756
2756
|
flex-flow: row nowrap;
|
|
2757
2757
|
justify-content: flex-end;
|
|
2758
2758
|
column-gap: 8px;
|
|
2759
|
-
`,
|
|
2759
|
+
`,Eh=ls(),AL=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=w.useContext(Xt),r=n==null?void 0:n.sendTrackingEvent;return w.useEffect(()=>{const o=Eh.getItem(xh);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(_t.email_logging_intro_popup_shown,{app_name:t}),Eh.setItem(xh,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),u.jsxs(vL,{children:[u.jsx(wL,{src:lL,alt:"Welcome"}),u.jsx(IL,{children:uL}),u.jsx(_L,{children:dL}),u.jsx(SL,{children:e?u.jsx(l.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},TL=({children:e,onContinue:t,connectorName:n})=>u.jsx(N1,{title:u.jsx(AL,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:CL,arrowStyle:EL,children:e}),LL={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:l.theme.palette.gray.gray3,padding:"0px"},OL={color:"#fff !important"},kL=l.styled(l.Box)`
|
|
2760
2760
|
padding: 16px;
|
|
2761
2761
|
`,FL=l.styled(l.Typography)`
|
|
2762
2762
|
font-weight: 600;
|
|
@@ -2775,7 +2775,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2775
2775
|
align-items: center;
|
|
2776
2776
|
margin-top: 20px;
|
|
2777
2777
|
width: 100%;
|
|
2778
|
-
`,RL=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"})),ML=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?rL:oL,{connectorFunctions:s}=w.useContext(Zt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(kL,{children:[u.jsx(FL,{children:nL}),u.jsx(DL,{children:ot(o,{connectorName:n})}),u.jsxs(NL,{children:[u.jsx("div",{children:u.jsx(RL,{})}),e?u.jsx(l.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},jL=({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(D1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(ML,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:LL,arrowStyle:OL,children:o})},PL=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=w.useContext(Zt),i=a==null?void 0:a.sendTrackingEvent,[c,d]=w.useState(()=>localStorage.getItem(bh)==="true"),[f,g]=w.useState(!1),{connectorId:y,connectorName:C,connectorStatus:b}=n??{},h=t||b!==yi.DISABLED,p=b===yi.UNAUTHENTICATED,m=r===pe.PENDING,x=()=>{localStorage.setItem(bh,"true"),d(!0),g(!0),i==null||i(St.email_logging_intro_popup_continue_clicked,{app_name:C})};return c?p?u.jsx(jL,{connectorId:y,connectorName:C,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(l.Tooltip,{title:aL,children:e}):m?u.jsx(l.Tooltip,{title:sL.replace(":connectorName",C),children:e}):s?u.jsx(KT,{defaultOpen:f,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(TL,{onContinue:h?x:void 0,connectorName:C,children:e})},BL=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"})))),Ul=({message:e})=>u.jsxs(l.Stack,{justifyContent:"center",alignItems:"center",height:"100%","data-section":"empty",children:[u.jsx(BL,{width:124,height:107,className:"empty-illustration"}),u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray3,children:e})]}),Qn="/v1/api",VL=`${Qn}/connector/conversation/:conversationId/email_log_status`,GL=`${Qn}/connector/conversation/:conversationId/entity_recommendations`,HL=`${Qn}/connector/conversation/:conversationId/retry_emails_log`,WL=`${Qn}/connector/conversation/:conversationId/validate_entity`,ZL=`${Qn}/connectors/forms/:formId/search`,zL=`${Qn}/connector/conversation/:conversationId/log_emails`,XL=`${Qn}/connector/feedback/conversation/:conversationId`,YL=`${Qn}/connector/conversation/:conversationId/log_emails`,JL=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 ve({url:ot(WL,{conversationId:n}),data:e,method:Le.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}},qL=({onSuccess:e,onError:t})=>Kt({mutationFn:JL,onSuccess:e,onError:t}),Kl=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"})),QL=l.styled(l.Stack)`
|
|
2778
|
+
`,RL=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"})),ML=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?rL:oL,{connectorFunctions:s}=w.useContext(Xt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(kL,{children:[u.jsx(FL,{children:nL}),u.jsx(DL,{children:ot(o,{connectorName:n})}),u.jsxs(NL,{children:[u.jsx("div",{children:u.jsx(RL,{})}),e?u.jsx(l.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},jL=({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(N1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(ML,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:LL,arrowStyle:OL,children:o})},PL=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=w.useContext(Xt),i=a==null?void 0:a.sendTrackingEvent,[c,d]=w.useState(()=>localStorage.getItem(yh)==="true"),[f,g]=w.useState(!1),{connectorId:y,connectorName:C,connectorStatus:b}=n??{},h=t||b!==yi.DISABLED,p=b===yi.UNAUTHENTICATED,m=r===pe.PENDING,x=()=>{localStorage.setItem(yh,"true"),d(!0),g(!0),i==null||i(_t.email_logging_intro_popup_continue_clicked,{app_name:C})};return c?p?u.jsx(jL,{connectorId:y,connectorName:C,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(l.Tooltip,{title:aL,children:e}):m?u.jsx(l.Tooltip,{title:sL.replace(":connectorName",C),children:e}):s?u.jsx(KT,{defaultOpen:f,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(TL,{onContinue:h?x:void 0,connectorName:C,children:e})},BL=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"})))),Ul=({message:e})=>u.jsxs(l.Stack,{justifyContent:"center",alignItems:"center",height:"100%","data-section":"empty",children:[u.jsx(BL,{width:124,height:107,className:"empty-illustration"}),u.jsx(l.Typography,{variant:"body2",color:l.theme.palette.gray.gray3,children:e})]}),Jn="/v1/api",VL=`${Jn}/connector/conversation/:conversationId/email_log_status`,GL=`${Jn}/connector/conversation/:conversationId/entity_recommendations`,HL=`${Jn}/connector/conversation/:conversationId/retry_emails_log`,WL=`${Jn}/connector/conversation/:conversationId/validate_entity`,ZL=`${Jn}/connectors/forms/:formId/search`,zL=`${Jn}/connector/conversation/:conversationId/log_emails`,XL=`${Jn}/connector/feedback/conversation/:conversationId`,YL=`${Jn}/connector/conversation/:conversationId/log_emails`,JL=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 ve({url:ot(WL,{conversationId:n}),data:e,method:Le.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}},qL=({onSuccess:e,onError:t})=>Kt({mutationFn:JL,onSuccess:e,onError:t}),Kl=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"})),QL=l.styled(l.Stack)`
|
|
2779
2779
|
display: flex;
|
|
2780
2780
|
flex-flow: row nowrap;
|
|
2781
2781
|
justify-content: flex-start;
|
|
@@ -2817,10 +2817,10 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2817
2817
|
overflow: hidden;
|
|
2818
2818
|
text-overflow: ellipsis;
|
|
2819
2819
|
white-space: nowrap;
|
|
2820
|
-
`,
|
|
2820
|
+
`,vh=l.styled(l.Stack)`
|
|
2821
2821
|
margin-left: auto;
|
|
2822
2822
|
flex-shrink: 0;
|
|
2823
|
-
`,eO=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=w.useContext(
|
|
2823
|
+
`,eO=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=w.useContext(Xt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:d,cardId:f}=t,g=m=>{o==null||o(x=>({...x,[d+c]:m})),i==null||i(_t.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},y=()=>{i==null||i(_t.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:C,isPending:b,isError:h}=qL({onSuccess:g,onError:y}),p=()=>{!o||b||r||h||(n?o(m=>{const x={...m};return delete x[d+c],x}):(i==null||i(_t.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),C({entity:t,payload:{entityType:d,searchString:c,cardId:f},conversationId:s})))};return u.jsx(l.Tooltip,{title:r?cL:"",placement:"top",children:u.jsxs(QL,{disabled:b||h,onClick:p,"data-section":"entity-row",children:[u.jsx($L,{value:n,checked:n,disabled:r}),u.jsx(l.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:u.jsx(KL,{variant:"body2",children:c})}),b?u.jsx(vh,{"data-section":"row-action",children:u.jsx(UL,{})}):null,h?u.jsx(l.Tooltip,{title:"Record not found in "+e,children:u.jsx(vh,{"data-section":"row-action",children:u.jsx(Jl,{})})}):null]})})},tO=l.styled(l.Stack)`
|
|
2824
2824
|
color: #343c45;
|
|
2825
2825
|
padding: 18px 0;
|
|
2826
2826
|
box-sizing: border-box;
|
|
@@ -2865,7 +2865,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2865
2865
|
text-transform: capitalize;
|
|
2866
2866
|
`,sO=l.styled(l.Stack)`
|
|
2867
2867
|
overflow: hidden;
|
|
2868
|
-
`,
|
|
2868
|
+
`,wh=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"})),Ih=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=w.useMemo(()=>VT(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const d=c.parentElement;d&&d.classList.toggle("expanded")};return t!=null&&t.length?u.jsx(tO,{"data-section":"suggestions",children:s.map(i=>u.jsxs(nO,{className:"expanded","data-section":"group",children:[u.jsxs(rO,{onClick:a,children:[u.jsx(oO,{variant:"body2",children:i.type}),u.jsx(wh,{className:"toggle-arrow-icon"})]}),u.jsx(sO,{children:i.entities.map(c=>u.jsx(eO,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):u.jsx(Ul,{message:iL})},aO=l.styled(l.Stack)`
|
|
2869
2869
|
padding: 18px 0;
|
|
2870
2870
|
row-gap: 12px;
|
|
2871
2871
|
box-sizing: border-box;
|
|
@@ -2903,7 +2903,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2903
2903
|
padding: 8px 0;
|
|
2904
2904
|
row-gap: 12px;
|
|
2905
2905
|
box-sizing: border-box;
|
|
2906
|
-
`,pO=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(uO,{onClick:t,direction:"row",children:[u.jsx(l.Stack,{flexGrow:1,children:u.jsx(l.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),u.jsx(
|
|
2906
|
+
`,pO=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(uO,{onClick:t,direction:"row",children:[u.jsx(l.Stack,{flexGrow:1,children:u.jsx(l.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),u.jsx(wh,{})]},n)},hO=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=w.useContext(Xt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return u.jsx(Ul,{message:"No results found"});const c=d=>{o(d),i==null||i(_t.email_logging_search_result_selected,{app_name:e,object_name:d.displayValue,object_key:d.entityType})};return u.jsxs(dO,{children:[u.jsxs(l.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),u.jsx(fO,{children:t.map(d=>u.jsx(pO,{entity:{...d,id:n,searchObject:r},onLog:()=>c({...d,entityType:r,app:e,displayValue:d.name})},d.externalResourceId))})]})},gO=l.styled(l.Stack)`
|
|
2907
2907
|
height: 100%;
|
|
2908
2908
|
row-gap: 8px;
|
|
2909
2909
|
align-items: center;
|
|
@@ -2913,7 +2913,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2913
2913
|
height: 32px;
|
|
2914
2914
|
fill: #506dff;
|
|
2915
2915
|
animation: ${xi} 1s linear infinite;
|
|
2916
|
-
`,bO=({message:e="Fetching details"})=>u.jsxs(gO,{children:[u.jsx(mO,{}),u.jsx(l.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),yO=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await ve({url:ot(VL,{conversationId:e}),method:Le.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},xO=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},
|
|
2916
|
+
`,bO=({message:e="Fetching details"})=>u.jsxs(gO,{children:[u.jsx(mO,{}),u.jsx(l.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),yO=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await ve({url:ot(VL,{conversationId:e}),method:Le.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},xO=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},_s=({conversationId:e})=>{const t=un(),{queryKey:n,polledLogsStatus:r}=w.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=Gl({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:yO,isSatisfied:xO,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return Ft({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},CO=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await ve({url:ot(zL,{conversationId:t}),data:e,method:Le.POST});return n==null?void 0:n.data}catch(n){throw Te({message:Tn,type:Ue}),console.error(n),n}},EO=({onSuccess:e})=>Kt({mutationFn:CO,onSuccess:e}),vO=l.styled(l.Stack)`
|
|
2917
2917
|
padding: 12px;
|
|
2918
2918
|
flex-flow: row nowrap;
|
|
2919
2919
|
justify-content: flex-end;
|
|
@@ -2930,7 +2930,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2930
2930
|
padding: 7px 10px;
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
|
-
`,wO=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=w.useContext(
|
|
2933
|
+
`,wO=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=w.useContext(Xt),{refetch:a}=_s({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const b=Object.values(e),h=b.map(m=>m.displayValue).join(", "),p=Array.from(new Set(b.map(m=>m==null?void 0:m.entityType)));i==null||i(_t.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:d,isPending:f}=EO({onSuccess:c}),g=Object.keys(e).length>0,y=()=>{const b=Object.values(e);d({conversationId:o,payload:{selectedEntities:b,connectorId:r,autoLogEnabled:!0}})},C=()=>{t==null||t(),i==null||i(_t.email_logging_log_config_canceled,{app_name:n})};return u.jsxs(vO,{"data-section":"footer",children:[u.jsx(l.Button,{variant:"text",size:"small",onClick:C,children:"Cancel"}),u.jsxs(l.Button,{variant:"contained",size:"small",className:"primary-action",disabled:f||!g,onClick:y,children:[f?u.jsx(l.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},IO="Tell us more (optional)",_O=l.styled(l.Box)`
|
|
2934
2934
|
width: ${({width:e})=>e||"440px"};
|
|
2935
2935
|
border-radius: 12px;
|
|
2936
2936
|
padding: 16px;
|
|
@@ -2951,7 +2951,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2951
2951
|
justify-content: flex-end;
|
|
2952
2952
|
margin-top: 30px;
|
|
2953
2953
|
gap: 8px;
|
|
2954
|
-
`,TO=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=IO})=>{const[c,d]=w.useState(""),[f,g]=w.useState(""),y=m=>{d(m.target.value)},C=m=>{m.stopPropagation();const{value:x}=(m==null?void 0:m.target)||{};g(x)},b=()=>{t({feedbackOption:c,feedbackComment:f})},h=()=>{e==null||e()},p=r?!c:!f;return u.jsxs(_O,{width:s,children:[u.jsx(l.Typography,{variant:"h3",children:o}),u.jsx(SO,{}),r?u.jsx(l.FormControl,{children:u.jsx(l.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:y,children:a.map(m=>u.jsx(l.FormControlLabel,{value:m.value,control:u.jsx(l.Radio,{}),label:m.label},m.value))})}):null,u.jsx(
|
|
2954
|
+
`,TO=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=IO})=>{const[c,d]=w.useState(""),[f,g]=w.useState(""),y=m=>{d(m.target.value)},C=m=>{m.stopPropagation();const{value:x}=(m==null?void 0:m.target)||{};g(x)},b=()=>{t({feedbackOption:c,feedbackComment:f})},h=()=>{e==null||e()},p=r?!c:!f;return u.jsxs(_O,{width:s,children:[u.jsx(l.Typography,{variant:"h3",children:o}),u.jsx(SO,{}),r?u.jsx(l.FormControl,{children:u.jsx(l.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:y,children:a.map(m=>u.jsx(l.FormControlLabel,{value:m.value,control:u.jsx(l.Radio,{}),label:m.label},m.value))})}):null,u.jsx(Sr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:C,multiline:!0,rows:5,limit:250,validation:{validate:el()}}),u.jsxs(AO,{children:[u.jsx(l.Button,{variant:"text",color:"primary",style:{color:l.theme.palette.gray.gray3},disabled:n,onClick:h,children:"Cancel"}),u.jsx(lh,{variant:"contained",color:"primary",isLoading:n,disabled:p,label:"Submit",onClick:b})]})]})},LO=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await ve({url:XL.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return Te({message:bL,type:sn}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),Te({message:yL,type:Ue}),n}};function OO({onSuccess:e}){return Kt({mutationFn:LO,onSuccess:e})}const kO=l.styled(l.Stack)`
|
|
2955
2955
|
flex-flow: row nowrap;
|
|
2956
2956
|
justify-content: space-between;
|
|
2957
2957
|
align-items: center;
|
|
@@ -2959,7 +2959,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2959
2959
|
padding: 6px 12px;
|
|
2960
2960
|
margin-top: auto;
|
|
2961
2961
|
background-color: #f6f8fc;
|
|
2962
|
-
`,
|
|
2962
|
+
`,_h=l.styled(l.IconButton)`
|
|
2963
2963
|
&:disabled {
|
|
2964
2964
|
opacity: 0.4;
|
|
2965
2965
|
}
|
|
@@ -2969,10 +2969,10 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
2969
2969
|
font-weight: 400;
|
|
2970
2970
|
line-height: 12px;
|
|
2971
2971
|
letter-spacing: 0;
|
|
2972
|
-
`,
|
|
2972
|
+
`,Sh=l.styled(l.Tooltip)`
|
|
2973
2973
|
padding: 6px;
|
|
2974
2974
|
border-radius: 6px;
|
|
2975
|
-
`,DO=()=>{const{conversationId:e,tenant:t}=w.useContext(
|
|
2975
|
+
`,DO=()=>{const{conversationId:e,tenant:t}=w.useContext(Xt),[n,r]=w.useState(!1),o=t==="HIVERWEB"?mL:gL,s=()=>{r(!1)},{mutate:a,isPending:i}=OO({onSuccess:s}),c=()=>{a({conversationId:e,feedbackData:{feedback_type:Ch,positive_feedback:!1}})},d=()=>{r(!0)},f=({feedbackComment:g,feedbackOption:y})=>{a({conversationId:e,feedbackData:{feedback_type:Ch,comment:g,option:y,positive_feedback:!1}})};return u.jsxs(kO,{"data-section":"feedback",children:[u.jsx(FO,{children:o}),u.jsxs(l.Stack,{flexDirection:"row",alignItems:"flex-end",children:[u.jsx(Sh,{arrow:!0,title:pL,placement:"top",slotProps:{popper:{sx:{zIndex:2100}}},children:u.jsx(_h,{className:"feedback-button",size:"small",onClick:c,disabled:i,children:u.jsx(dh,{})})}),u.jsx(Sh,{arrow:!0,title:hL,placement:"top",slotProps:{popper:{sx:{zIndex:2100}}},children:u.jsx(_h,{className:"feedback-button",size:"small",onClick:d,disabled:i,children:u.jsx(fh,{})})})]}),u.jsx(Yn,{shown:n,setShown:r,borderRadius:12,sx:{zIndex:15002},children:u.jsx(TO,{onCancel:()=>r(!1),onSubmit:f,isLoading:i,title:fL,feedbackOptions:xL,width:"440px"})})]})},NO=Gl({apiFn:async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await ve({url:ot(GL,{conversationId:e}),method:Le.GET}),n=t==null?void 0:t.data;return(n==null?void 0:n.results)??[]}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:1,isSatisfied:e=>((e==null?void 0:e.length)??0)>0}),RO=({conversationId:e,enabled:t=!0})=>Ft({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>NO({conversationId:e}).catch(()=>[]),enabled:!!e&&t}),MO=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await ve({url:ot(ZL,{formId:e}),data:{search_string:n,args:{}},method:Le.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 Te({message:Tn,type:Ue}),console.error(r),r}},jO=({onSuccess:e})=>Kt({mutationFn:MO,onSuccess:e}),PO=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await ve({url:ot(YL,{conversationId:t}),data:e,method:Le.PATCH});return n==null?void 0:n.data}catch(n){throw Te({message:Tn,type:Ue}),console.error(n),n}},BO=({onSuccess:e})=>Kt({mutationFn:PO,onSuccess:e}),VO=l.styled(l.Stack)`
|
|
2976
2976
|
color: #343c45;
|
|
2977
2977
|
height: 100%;
|
|
2978
2978
|
box-sizing: border-box;
|
|
@@ -3002,11 +3002,11 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
3002
3002
|
height: 16px;
|
|
3003
3003
|
`,XO=l.styled(l.Stack)`
|
|
3004
3004
|
flex-grow: 1;
|
|
3005
|
-
`,
|
|
3005
|
+
`,Ah=l.styled(l.Stack)`
|
|
3006
3006
|
flex-grow: 1;
|
|
3007
3007
|
flex-basis: 0;
|
|
3008
3008
|
min-height: 0;
|
|
3009
|
-
`,
|
|
3009
|
+
`,Th=l.styled(l.Stack)`
|
|
3010
3010
|
padding: 0 16px;
|
|
3011
3011
|
min-height: 100%;
|
|
3012
3012
|
max-height: 100%;
|
|
@@ -3049,7 +3049,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
3049
3049
|
height: 14px;
|
|
3050
3050
|
fill: #4d596c;
|
|
3051
3051
|
animation: ${xi} 1s linear infinite;
|
|
3052
|
-
`,
|
|
3052
|
+
`,Tr=yo.CaseView,Lh=({emailLogStatus:e,close:t})=>{const{emailLogSettings:n,autoLogEnabled:r,selectedEntities:o,formList:s}=e,{connectorName:a,connectorId:i,logoUrl:c}=n??{},d=(o==null?void 0:o.length)>0,[f,g]=w.useState(""),[y,C]=w.useState([]),[b,h]=w.useState({}),{conversationId:p,connectorFunctions:m,tenant:x}=w.useContext(Xt),E=m==null?void 0:m.sendTrackingEvent,{data:I,isError:v,isLoading:_}=RO({conversationId:p,enabled:!d}),{refetch:A}=_s({conversationId:p}),S=()=>{E==null||E(_t.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:L,data:N,isPending:D,isIdle:F,reset:M}=jO({onSuccess:S}),{mutate:B,isPending:V}=BO({onSuccess:A}),{results:Y=[],...W}=N??{},H=w.useMemo(()=>{const R={},X=[];for(const K of y){const ne=K.entityType+K.displayValue;R[ne]||X.push(K),R[ne]=K}for(const K of I??[]){const ne=K.entityType+K.displayValue;R[ne]||X.push(K),R[ne]=K}return X},[I,y]),q=R=>{g(R.target.value),F||M()},Q=R=>{const{entityType:X,displayValue:K}=R;h(ne=>({...ne,[X+K]:R})),C(ne=>[R,...ne]),g(""),M()},ee=()=>{E==null||E(_t.email_logging_search_initiated,{app_name:a})},G=()=>{B({payload:{autoLogEnabled:!r},conversationId:p});const R=r?_t.email_logging_auto_log_disabled:_t.email_logging_auto_log_enabled;E==null||E(R,{app_name:a})},J=_||D;return u.jsxs(VO,{"data-tenant":x??"GMAIL","data-section":"root",children:[u.jsxs(GO,{"data-section":"header",children:[u.jsxs(HO,{children:[u.jsx(ZO,{children:u.jsx(zO,{src:c,alt:"connector"})}),u.jsx(l.Typography,{children:"Sync conversation"})]}),u.jsxs(WO,{children:[V?u.jsx(UO,{}):null,d?u.jsx(l.Tooltip,{arrow:!0,title:r?eL:tL,slotProps:{popper:{sx:{zIndex:2100}}},children:u.jsx(l.Stack,{children:u.jsx($O,{checked:r,value:r,onClick:G,disabled:V})})}):null]})]}),u.jsx(XO,{children:u.jsxs(yo,{children:[u.jsxs(Tr,{condition:d,children:[u.jsx(Ah,{children:u.jsx(Th,{"data-section":"scrollable",children:u.jsx(Ih,{connectorName:a,entities:o,disabled:!0})})}),u.jsx(DO,{})]},"disabled-view"),u.jsxs(Tr,{fallback:!0,children:[u.jsx(YO,{"data-section":"searchbox",children:u.jsx(JO,{type:"text",name:"search",value:f,onChange:q,onFocus:ee,startAdornment:u.jsx(qO,{children:u.jsx(nh,{})}),size:"small"})}),u.jsx(Ah,{children:u.jsx(Th,{"data-section":"scrollable",children:u.jsxs(yo,{children:[u.jsx(Tr,{condition:J,children:u.jsx(bO,{message:D?"Searching...":"Loading..."})},"loading"),u.jsx(Tr,{condition:f===""&&H.length>0,children:u.jsx(Ih,{connectorName:a,checkedEntities:b,setCheckedEntities:h,entities:H??[]})},"entity-suggestions"),u.jsx(Tr,{condition:!!f&&F,children:u.jsx(lO,{searchText:f,connectorName:a,options:s,onSearch:L})},"search-options"),u.jsx(Tr,{condition:!!f&&!F,children:u.jsx(hO,{connectorName:a,results:Y,...W,addEntity:Q})},"search-results"),u.jsx(Tr,{condition:!H.length&&v,children:u.jsx(Ul,{message:Tn})},"error")]})})}),f?null:u.jsx(wO,{connectorName:a,connectorId:i,checkedEntities:b,close:t})]},"select-logs")]})})]})},KO=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await ve({url:ot(HL,{conversationId:e}),method:Le.POST});return t==null?void 0:t.data}catch(t){throw Te({message:Tn,type:Ue}),console.error(t),t}},Oh=({onSuccess:e})=>Kt({mutationFn:KO,onSuccess:e}),ek=l.styled(l.Stack)`
|
|
3053
3053
|
border-radius: 100px;
|
|
3054
3054
|
background: #f6f8fc;
|
|
3055
3055
|
flex-flow: row nowrap;
|
|
@@ -3067,7 +3067,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
3067
3067
|
line-height: 14px;
|
|
3068
3068
|
color: #506dff;
|
|
3069
3069
|
margin-left: 6px;
|
|
3070
|
-
`,nk=[pe.PENDING,pe.LOGGED,pe.NOT_LOGGED,pe.PAUSED],rk=[pe.LOGGED,pe.PAUSED],ok=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=w.useContext(
|
|
3070
|
+
`,nk=[pe.PENDING,pe.LOGGED,pe.NOT_LOGGED,pe.PAUSED],rk=[pe.LOGGED,pe.PAUSED],ok=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=w.useContext(Xt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=_s({conversationId:r}),{mutate:i,isPending:c}=Oh({onSuccess:a}),d=YT[e],f=QT[e],g=qT[e],{emailLogSettings:y,messageLogStatus:C}=t,{connectorName:b}=y??{},{logged:h,total:p}=C??{},m=rk.includes(e)&&p?` (${h}/${p})`:"",x=e===pe.ERROR,E=nk.includes(e),I=({close:_})=>u.jsx(Lh,{close:_,emailLogStatus:t}),v=()=>{i({conversationId:r}),s==null||s(_t.email_logging_failed_clicked,{app_name:b})};return u.jsx(PL,{logSettings:y,status:e,isAdmin:n,retry:x,renderEntities:E?I:void 0,children:u.jsxs(ek,{style:{cursor:E?"pointer":"not-allowed"},children:[d,g?g(`${f} ${m}`):null,x?u.jsx(tk,{variant:"text",disabled:c,onClick:v,children:"Retry"}):null]})})},eu=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=mh(e);return $t.createPortal(u.jsx(ok,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},sk=({observer:e})=>{var C;const[t,n]=w.useState({}),[r,o]=w.useState({}),[s,a]=w.useState({}),{conversationId:i}=w.useContext(Xt),{data:c}=_s({conversationId:i}),d=(C=c==null?void 0:c.emailLogSettings)==null?void 0:C.enabled,f=b=>{n(h=>({...h,...b}))},g=b=>{o(h=>({...h,...b}))},y=b=>{a(b)};return w.useEffect(()=>{if(!(!e||!d))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:g,setSubjectButtonContainers:y}),()=>{e.destroy(),n({}),o({})}},[e,d]),c?u.jsxs(u.Fragment,{children:[Object.entries(t).map(([b,h])=>u.jsx(eu,{emailLogStatus:c,containerElement:h.element,messageId:h.messageId,legacyMessageId:h.legacyMessageId},b)),Object.entries(r).map(([b,h])=>u.jsx(eu,{emailLogStatus:c,containerElement:h.element},b)),Object.entries(s).map(([b,h])=>u.jsx(eu,{emailLogStatus:c,containerElement:h.element},b))]}):null},ak=({isAdmin:e,conversationId:t,connectorFunctions:n,tenant:r,children:o})=>{const s=w.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n,tenant:r}),[e,t,n,r]);return u.jsx(Xt.Provider,{value:s,children:o})},kh=({children:e,...t})=>u.jsx(Nc,{store:bi,children:u.jsx(l.HiverProvider,{inter:!0,children:u.jsx(Xl,{children:u.jsx(w.Suspense,{fallback:u.jsx(u.Fragment,{}),children:u.jsx(ak,{...t,children:e})})})})}),Ci=".hiver-log-crm-button",Ei=".hiver-log-crm-compose-button",Fh=".hiver-log-crm-subject-button";class ik{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:d=!1}={}){je(this,"observer",null);je(this,"setComposeButtonContainers",null);je(this,"setEmailButtonContainers",null);je(this,"setSubjectButtonContainers",null);je(this,"emailNodeFilter");je(this,"composeNodeFilter");je(this,"emailHeaderTargetSelector");je(this,"composeHeaderTargetSelector");je(this,"emailMessageContainerSelector");je(this,"disableAutoLogInEmail");je(this,"disableAutoLogInCompose");je(this,"disableAutoLogInSubject");je(this,"subjectContainer",null);je(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(Ci).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(Ci))return;const i=document.createElement("div");i.classList.add(Ci.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}})})});je(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Ei).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Ei))return;const s=document.createElement("div");s.classList.add(Ei.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});je(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(Fh);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(Fh.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=d}_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(Ci).forEach(r=>r.remove()),document.querySelectorAll(Ei).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const ck=({observer:e,...t})=>u.jsx(ka,{children:u.jsxs(kh,{...t,children:[u.jsx(sk,{observer:e}),u.jsx(Fa,{})]})});l.styled(l.Stack)`
|
|
3071
3071
|
width: 300px;
|
|
3072
3072
|
background-color: #ffffff;
|
|
3073
3073
|
border: 0.5px solid #e2e8f0;
|
|
@@ -3314,7 +3314,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
3314
3314
|
color: #64748b;
|
|
3315
3315
|
text-align: center;
|
|
3316
3316
|
width: 100%;
|
|
3317
|
-
`;const uk={brand:"#f1f5f9",success:"#ddefeb",danger:"#fde6e6",muted:"#f1f5f9",paused:"#f1f5f9",pending:"#f1f5f9"},dk={brand:"#e2e8f0",success:"#c8e5dc",danger:"#fbd1d1",muted:"#e2e8f0",paused:"#e2e8f0",pending:"#e2e8f0"},
|
|
3317
|
+
`;const uk={brand:"#f1f5f9",success:"#ddefeb",danger:"#fde6e6",muted:"#f1f5f9",paused:"#f1f5f9",pending:"#f1f5f9"},dk={brand:"#e2e8f0",success:"#c8e5dc",danger:"#fbd1d1",muted:"#e2e8f0",paused:"#e2e8f0",pending:"#e2e8f0"},Dh={brand:"#334155",success:"#2f6e61",danger:"#b42318",muted:"#64748b",paused:"#334155",pending:"#64748b"},fk={brand:"#64748b",success:"#2f6e61",danger:"#b42318",muted:"#94a3b8",paused:"#64748b",pending:"#64748b"},pk=l.styled("button")`
|
|
3318
3318
|
display: inline-flex;
|
|
3319
3319
|
align-items: center;
|
|
3320
3320
|
gap: 4px;
|
|
@@ -3326,7 +3326,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
3326
3326
|
font-weight: 500;
|
|
3327
3327
|
font-size: 14px;
|
|
3328
3328
|
line-height: 20px;
|
|
3329
|
-
color: ${({tone:e="brand"})=>
|
|
3329
|
+
color: ${({tone:e="brand"})=>Dh[e]};
|
|
3330
3330
|
cursor: pointer;
|
|
3331
3331
|
|
|
3332
3332
|
&:hover {
|
|
@@ -3350,7 +3350,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
3350
3350
|
font-size: 14px !important;
|
|
3351
3351
|
line-height: 20px !important;
|
|
3352
3352
|
letter-spacing: 0 !important;
|
|
3353
|
-
color: ${({tone:e="brand"})=>
|
|
3353
|
+
color: ${({tone:e="brand"})=>Dh[e]};
|
|
3354
3354
|
`;l.styled("span")`
|
|
3355
3355
|
font-family: 'Hanken Grotesk', sans-serif !important;
|
|
3356
3356
|
font-weight: 500 !important;
|
|
@@ -3725,7 +3725,7 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
3725
3725
|
width: 16px !important;
|
|
3726
3726
|
height: 16px !important;
|
|
3727
3727
|
}
|
|
3728
|
-
`,xk=e=>{switch(e){case pe.PENDING:return"Syncing in progress";case pe.ERROR:return"Sync failed";case pe.LOGGED:return"Synced";case pe.PAUSED:return"Sync paused";case pe.UNAUTHENTICATED:case pe.NOT_LOGGED:default:return"Sync conversation"}},Ck=e=>e===pe.LOGGED?"success":e===pe.ERROR?"danger":e===pe.PAUSED?"paused":e===pe.PENDING?"pending":e===pe.UNAUTHENTICATED?"muted":"brand",Ek=()=>u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",children:u.jsx("path",{d:"M8.99984 4.91602V13.0827M4.9165 8.99935H13.0832",stroke:"#ffffff",strokeWidth:"1.1",strokeLinecap:"round",strokeLinejoin:"round"})}),vk=()=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[u.jsx("circle",{cx:"7",cy:"7",r:"7",fill:"#2F6E61"}),u.jsx("path",{d:"M10.8288 4.89995C10.5922 4.64324 10.1976 4.63193 9.94761 4.87601L5.96804 8.75823L4.06989 6.75353C3.82948 6.49981 3.43531 6.49425 3.18845 6.74158C2.9418 6.98865 2.9366 7.39455 3.1768 7.64827L5.50404 10.1061C5.626 10.235 5.78808 10.3 5.95059 10.3C6.10477 10.3 6.25896 10.2414 6.37969 10.124L10.8056 5.80646C11.0553 5.56278 11.0659 5.15689 10.8288 4.89995Z",fill:"white"})]}),wk=()=>u.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[u.jsx("path",{d:"M7 4V7.5",stroke:"#b42318",strokeWidth:"1.6",strokeLinecap:"round"}),u.jsx("circle",{cx:"7",cy:"10",r:"0.9",fill:"#b42318"})]}),Ik=()=>u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",children:u.jsx("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:"#E98959"})}),_k=()=>u.jsx("span",{style:{width:14,height:14,display:"inline-flex",animation:"omni-pill-rotate 1s linear infinite reverse",animationFillMode:"backwards"},children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 19 18",fill:"#64748b",children:[u.jsx("g",{clipPath:"url(#omni-pill-spin-clip)",children:u.jsx("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"})}),u.jsx("defs",{children:u.jsx("clipPath",{id:"omni-pill-spin-clip",children:u.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0.940918)"})})})]})}),Sk=({status:e})=>e===pe.PENDING?u.jsx(_k,{}):e===pe.LOGGED?u.jsx(vk,{}):e===pe.ERROR?u.jsx(wk,{}):e===pe.PAUSED?u.jsx(Ik,{}):u.jsx(Ek,{}),Ak=({status:e,loggedCount:t=0,totalCount:n=0,onClick:r,onRetry:o,isRetrying:s=!1})=>{const a=Ck(e),i=e===pe.ERROR&&!!o,c=d=>{d.preventDefault(),d.stopPropagation(),!s&&(o==null||o())};return u.jsxs(pk,{type:"button",tone:a,onClick:r,children:[u.jsx("style",{children:"@keyframes omni-pill-rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }"}),u.jsx(hk,{tone:a,children:u.jsx(Sk,{status:e})}),u.jsxs(gk,{tone:a,children:[xk(e),e===pe.LOGGED&&n>0?` (${t}/${n})`:""]}),i?u.jsx(mk,{role:"button",tabIndex:0,"aria-disabled":s,onClick:c,onMouseDown:d=>d.stopPropagation(),children:s?"Retrying…":"Retry"}):null]})},
|
|
3728
|
+
`,xk=e=>{switch(e){case pe.PENDING:return"Syncing in progress";case pe.ERROR:return"Sync failed";case pe.LOGGED:return"Synced";case pe.PAUSED:return"Sync paused";case pe.UNAUTHENTICATED:case pe.NOT_LOGGED:default:return"Sync conversation"}},Ck=e=>e===pe.LOGGED?"success":e===pe.ERROR?"danger":e===pe.PAUSED?"paused":e===pe.PENDING?"pending":e===pe.UNAUTHENTICATED?"muted":"brand",Ek=()=>u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",children:u.jsx("path",{d:"M8.99984 4.91602V13.0827M4.9165 8.99935H13.0832",stroke:"#ffffff",strokeWidth:"1.1",strokeLinecap:"round",strokeLinejoin:"round"})}),vk=()=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[u.jsx("circle",{cx:"7",cy:"7",r:"7",fill:"#2F6E61"}),u.jsx("path",{d:"M10.8288 4.89995C10.5922 4.64324 10.1976 4.63193 9.94761 4.87601L5.96804 8.75823L4.06989 6.75353C3.82948 6.49981 3.43531 6.49425 3.18845 6.74158C2.9418 6.98865 2.9366 7.39455 3.1768 7.64827L5.50404 10.1061C5.626 10.235 5.78808 10.3 5.95059 10.3C6.10477 10.3 6.25896 10.2414 6.37969 10.124L10.8056 5.80646C11.0553 5.56278 11.0659 5.15689 10.8288 4.89995Z",fill:"white"})]}),wk=()=>u.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[u.jsx("path",{d:"M7 4V7.5",stroke:"#b42318",strokeWidth:"1.6",strokeLinecap:"round"}),u.jsx("circle",{cx:"7",cy:"10",r:"0.9",fill:"#b42318"})]}),Ik=()=>u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 18 18",fill:"none",children:u.jsx("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:"#E98959"})}),_k=()=>u.jsx("span",{style:{width:14,height:14,display:"inline-flex",animation:"omni-pill-rotate 1s linear infinite reverse",animationFillMode:"backwards"},children:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 19 18",fill:"#64748b",children:[u.jsx("g",{clipPath:"url(#omni-pill-spin-clip)",children:u.jsx("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"})}),u.jsx("defs",{children:u.jsx("clipPath",{id:"omni-pill-spin-clip",children:u.jsx("rect",{width:"18",height:"18",fill:"white",transform:"translate(0.940918)"})})})]})}),Sk=({status:e})=>e===pe.PENDING?u.jsx(_k,{}):e===pe.LOGGED?u.jsx(vk,{}):e===pe.ERROR?u.jsx(wk,{}):e===pe.PAUSED?u.jsx(Ik,{}):u.jsx(Ek,{}),Ak=({status:e,loggedCount:t=0,totalCount:n=0,onClick:r,onRetry:o,isRetrying:s=!1})=>{const a=Ck(e),i=e===pe.ERROR&&!!o,c=d=>{d.preventDefault(),d.stopPropagation(),!s&&(o==null||o())};return u.jsxs(pk,{type:"button",tone:a,onClick:r,children:[u.jsx("style",{children:"@keyframes omni-pill-rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }"}),u.jsx(hk,{tone:a,children:u.jsx(Sk,{status:e})}),u.jsxs(gk,{tone:a,children:[xk(e),e===pe.LOGGED&&n>0?` (${t}/${n})`:""]}),i?u.jsx(mk,{role:"button",tabIndex:0,"aria-disabled":s,onClick:c,onMouseDown:d=>d.stopPropagation(),children:s?"Retrying…":"Retry"}):null]})},Nh=288,Tk=405,Lk=4,Ok=({onVisibilityChange:e}={})=>{var I,v;const{conversationId:t,connectorFunctions:n}=w.useContext(Xt),{data:r,refetch:o}=_s({conversationId:t}),s=un(),[a,i]=w.useState(!1),c=w.useRef(null),d=w.useRef(null),[f,g]=w.useState({top:0,left:0}),y=!!t&&!!((I=r==null?void 0:r.emailLogSettings)!=null&&I.enabled);w.useEffect(()=>{e==null||e(y)},[y,e]);const{mutate:C,isPending:b}=Oh({onSuccess:()=>{s.invalidateQueries({queryKey:["EmailLogger","PolledLogsStatus",t]}),o()}}),h=()=>{var _,A;t&&(C({conversationId:t}),(A=n==null?void 0:n.sendTrackingEvent)==null||A.call(n,_t.email_logging_failed_clicked,{app_name:(_=r==null?void 0:r.emailLogSettings)==null?void 0:_.connectorName}))};w.useLayoutEffect(()=>{if(!a||!c.current)return;const _=()=>{const A=c.current.getBoundingClientRect(),S=Math.max(8,Math.min(A.left,window.innerWidth-Nh-8));g({top:A.bottom+Lk,left:S})};return _(),window.addEventListener("resize",_),window.addEventListener("scroll",_,!0),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",_,!0)}},[a]),w.useEffect(()=>{if(!a)return;const _=A=>{var L,N;const S=A.target;(L=c.current)!=null&&L.contains(S)||(N=d.current)!=null&&N.contains(S)||i(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[a]);const p=w.useMemo(()=>l.createTheme({...l.theme,zIndex:{...l.theme.zIndex,tooltip:2100,modal:2100}}),[]);if(!t||!((v=r==null?void 0:r.emailLogSettings)!=null&&v.enabled))return null;const m=mh(r),x=r.messageLogStatus,E=_=>_.stopPropagation();return u.jsxs(bk,{ref:c,onClick:E,onMouseDown:E,children:[u.jsx(Ak,{status:m,loggedCount:(x==null?void 0:x.logged)??0,totalCount:(x==null?void 0:x.total)??0,isRetrying:b,onClick:()=>i(_=>!_),onRetry:h}),a&&m!==pe.UNAUTHENTICATED?$t.createPortal(u.jsx("div",{ref:d,style:{position:"fixed",top:f.top,left:f.left,width:Nh,height:Tk,background:"#ffffff",borderRadius:8,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.2)",border:"0.5px solid #e2e8f0",overflow:"hidden",zIndex:2e3},onClick:E,onMouseDown:E,children:u.jsx(l.ThemeProvider,{theme:p,children:u.jsx(yk,{style:{height:"100%"},children:u.jsx(Lh,{emailLogStatus:r,close:()=>i(!1)})})})}),document.body):null]})},kk=({onVisibilityChange:e,...t})=>u.jsx(ka,{children:u.jsxs(kh,{...t,tenant:"HIVERWEB",children:[u.jsx(Ok,{onVisibilityChange:e}),u.jsx(Fa,{})]})}),Fk=e=>ve({url:ww,method:Le.POST,data:e}),Dk=e=>ve({url:Iw,method:Le.POST,data:e}),Nk=(...e)=>{},Rk=e=>{const t=new AbortController,n=async(r=0)=>{try{Nk("getConnectorsList",r);const o=await Vf(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)}},Mk=()=>{const e={connectorApiPending:!1,connectorApiAbort:null};if(!Rt())throw new Error("Please initiate bifrost by calling initConnectorsBifrost function before creating app store");const n=Q6({name:"app-store",initialState:{}}),r=()=>{const i=n.getData("inboxIds");if(!Array.isArray(i)||!i.length)return;e.connectorApiAbort&&e.connectorApiAbort(),e.connectorApiPending=!0;const c={all:"true",inbox_id:i},{fetchConnectors:d,abort:f}=Rk(c);e.connectorApiAbort=f,d().then(g=>{Array.isArray(g)&&n.setData(g,"connectors")}).catch(g=>{console.warn("Failed to fetch connectors",g)}).finally(()=>{e.connectorApiPending=!1})},o=i=>{(!Array.isArray(i)||!i.length)&&(i=n.getData("connectors")||[]);const c=n.getData("sideBarTabs")||0,d=[...i].sort((f,g)=>{const y=f.lastAccessed??0,C=g.lastAccessed??0;return y===C?0:y>C?-1:1}).map((f,g)=>({...f,sidebarView:g<c}));n.setData(d,"connectorTabs")},s=()=>{const i=n.getData("connectors");if(!Array.isArray(i))return r();typeof n.getData("sideBarTabs")=="number"&&o()},a=i=>{if(!i)return;const c=n.getData("connectorTabs"),d=c==null?void 0:c.find(g=>g.id===i);if(!d||d.sidebarView)return;const f=new Date().getTime();d.lastAccessed=f,o(c)};return n.subscribe(s,"connectors"),n.subscribe(()=>o(),"sideBarTabs",!1),n.subscribe(a,"connectorId",!1),n.subscribe(r,"inboxIds",!1),n},jk=({children:e})=>u.jsx(l.HiverProvider,{inter:!0,children:e}),Pk=l.styled(({className:e,...t})=>u.jsx(l.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${l.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,width:"min-content",borderRadius:"12px",maxWidth:"90vw",boxShadow:"0px 3px 15px 0px #00000040",color:"#000"},[`& .${l.tooltipClasses.arrow}`]:{color:"#fff !important"}})),Bk=l.styled(l.Stack)`
|
|
3729
3729
|
box-sizing: content-box !important;
|
|
3730
3730
|
display: flex;
|
|
3731
3731
|
flex-direction: column;
|
|
@@ -3756,4 +3756,4 @@ Do you want to continue?`,eI="Select an object to create",tI="Select an object t
|
|
|
3756
3756
|
letter-spacing: 0.4px;
|
|
3757
3757
|
line-height: 20px;
|
|
3758
3758
|
margin-top: 14px;
|
|
3759
|
-
`,Wk=({children:e,zIndex:t,onClose:n})=>{const r=u.jsxs(Bk,{children:[u.jsx(Vk,{variant:"h2",color:"text.primary",children:"Split apps view"}),u.jsx(Gk,{variant:"body2",color:"text.secondary",children:"Each connected app now has its own tab, making it easier to view app-specific data"}),u.jsx(Hk,{variant:"contained",color:"primary",onClick:n,children:"Dismiss"})]});return u.jsx(Pk,{open:!0,title:r,placement:"left-start",disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,slotProps:{popper:{sx:{zIndex:t+1},modifiers:[{name:"flip",enabled:!0},{name:"preventOverflow",enabled:!0}]},tooltip:{sx:{pointerEvents:"auto",maxWidth:"min(360px, calc(60vw - 24px))",padding:"12px"},onClick:o=>o.stopPropagation()},arrow:{sx:{fontSize:"12px"}}},children:e})},
|
|
3759
|
+
`,Wk=({children:e,zIndex:t,onClose:n})=>{const r=u.jsxs(Bk,{children:[u.jsx(Vk,{variant:"h2",color:"text.primary",children:"Split apps view"}),u.jsx(Gk,{variant:"body2",color:"text.secondary",children:"Each connected app now has its own tab, making it easier to view app-specific data"}),u.jsx(Hk,{variant:"contained",color:"primary",onClick:n,children:"Dismiss"})]});return u.jsx(Pk,{open:!0,title:r,placement:"left-start",disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,arrow:!0,slotProps:{popper:{sx:{zIndex:t+1},modifiers:[{name:"flip",enabled:!0},{name:"preventOverflow",enabled:!0}]},tooltip:{sx:{pointerEvents:"auto",maxWidth:"min(360px, calc(60vw - 24px))",padding:"12px"},onClick:o=>o.stopPropagation()},arrow:{sx:{fontSize:"12px"}}},children:e})},Rh=ls("LOCAL"),Zk="connector-library-split-apps-nudge",zk=({open:e,targetRef:t,endElRef:n,zIndex:r,storageKey:o=Zk,onClose:s})=>{const[a,i]=w.useState(()=>Rh.getItem(o)==="true"),c=()=>{Rh.setItem(o,"true"),i(!0),s()},d=f=>u.jsx(Wk,{zIndex:r,onClose:c,children:f});return a?null:u.jsx(hw,{open:e,targetRef:t,endElRef:n,padding:8,zIndex:r,renderHighlight:d})},Xk=e=>u.jsx(jk,{children:u.jsx(zk,{...e})});ce.ActionQueue=BT,ce.CONNECTORS_AGENT_EVENTS=zl,ce.ConnectorCardList=qA,ce.EmailLogger=ck,ce.GmailLogObserver=ik,ce.HiverConnectorBifrostAuth=ve,ce.IntegrationSense=jT,ce.OmniEmailLogger=kk,ce.SplitAppsNudge=Xk,ce.addNewConnectors=Kg,ce.createAppStore=Mk,ce.dismissNotification=td,ce.fetchAppCfValues=Fk,ce.fetchDeferredAppCfValues=Dk,ce.getConnectorsBifrostConfigs=Rt,ce.getMetaData=P6,ce.initConnectorsBifrost=_b,ce.setCaptureFeedbackOnDemand=em,ce.shouldCaptureFeedback=Yi,ce.shouldShowNotification=ed,ce.useConnectorSelectedEmail=LA,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});
|