@hiver/connector-agent 4.11.0 → 4.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/split-apps-nudge/index.d.ts +3 -0
- package/app/split-apps-nudge/index.d.ts.map +1 -0
- package/app/split-apps-nudge/provider.d.ts +7 -0
- package/app/split-apps-nudge/provider.d.ts.map +1 -0
- package/features/split-apps/components/nudge/index.d.ts +14 -0
- package/features/split-apps/components/nudge/index.d.ts.map +1 -0
- package/features/split-apps/components/nudge/styles.d.ts +8 -0
- package/features/split-apps/components/nudge/styles.d.ts.map +1 -0
- package/features/split-apps/components/nudge/tooltip.d.ts +8 -0
- package/features/split-apps/components/nudge/tooltip.d.ts.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.es.js +4318 -4155
- package/index.umd.js +282 -238
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(ce,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react"),require("react-dom"),require("@hiver/hiver-ui-kit")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@hiver/hiver-ui-kit"],I):(ce=typeof globalThis<"u"?globalThis:ce||self,I(ce["@hiver/connector-agent"]={},ce.React,ce.ReactDOM,ce.hiverUiKit))})(this,function(ce,I,
|
|
1
|
+
(function(ce,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react"),require("react-dom"),require("@hiver/hiver-ui-kit")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@hiver/hiver-ui-kit"],I):(ce=typeof globalThis<"u"?globalThis:ce||self,I(ce["@hiver/connector-agent"]={},ce.React,ce.ReactDOM,ce.hiverUiKit))})(this,function(ce,I,je,u){"use strict";var LL=Object.defineProperty;var D2=ce=>{throw TypeError(ce)};var OL=(ce,I,je)=>I in ce?LL(ce,I,{enumerable:!0,configurable:!0,writable:!0,value:je}):ce[I]=je;var Pe=(ce,I,je)=>OL(ce,typeof I!="symbol"?I+"":I,je),Tl=(ce,I,je)=>I.has(ce)||D2("Cannot "+je);var F=(ce,I,je)=>(Tl(ce,I,"read from private field"),je?je.call(ce):I.get(ce)),ue=(ce,I,je)=>I.has(ce)?D2("Cannot add the same private member more than once"):I instanceof WeakSet?I.add(ce):I.set(ce,je),U=(ce,I,je,u)=>(Tl(ce,I,"write to private field"),u?u.call(ce,je):I.set(ce,je),je),be=(ce,I,je)=>(Tl(ce,I,"access private method"),je);var Ja=(ce,I,je,u)=>({set _(Qa){U(ce,I,Qa,je)},get _(){return F(ce,I,u)}});var Ar,Zn,fo,w2,po,Xn,ho,I2,Tr,_2,go,mo,jt,Lr,ft,is,Or,tn,Dn,S2,hn,A2,gn,ht,Fr,mn,ir,T2,_n,nn,cs,L2,Ye,zn,Yn,bo,yo,Jn,xo,Co,O2,It,_e,ls,gt,kr,Eo,qn,bn,us,vo,wo,Dr,Nr,Qn,Io,Me,hs,Ll,Ol,Fl,kl,Dl,Nl,Rl,N2,F2,$n,Un,_t,Sn,An,qa,Ml,k2;function Qa(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=Qa(I);var pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},$a={exports:{}},To={};/**
|
|
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 Pl;function
|
|
9
|
+
*/var Pl;function R2(){if(Pl)return To;Pl=1;var e=I,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(i,c,l){var f,g={},y=null,E=null;l!==void 0&&(y=""+l),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(E=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:E,props:g,_owner:o.current}}return To.Fragment=n,To.jsx=a,To.jsxs=a,To}var Lo={};/**
|
|
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 jl;function
|
|
18
|
-
`+ae+O}}var P=!1,ee;{var ye=typeof WeakMap=="function"?WeakMap:Map;ee=new ye}function z(O,Z){if(!O||P)return"";{var Q=ee.get(O);if(Q!==void 0)return Q}var ne;P=!0;var ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var we;we=$.current,$.current=null,R();try{if(Z){var
|
|
17
|
+
*/var jl;function M2(){return jl||(jl=1,process.env.NODE_ENV!=="production"&&function(){var e=I,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function p(O){if(O===null||typeof O!="object")return null;var Z=m&&O[m]||O[h];return typeof Z=="function"?Z:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(O){{for(var Z=arguments.length,Q=new Array(Z>1?Z-1:0),ne=1;ne<Z;ne++)Q[ne-1]=arguments[ne];C("error",O,Q)}}function C(O,Z,Q){{var ne=b.ReactDebugCurrentFrame,ve=ne.getStackAddendum();ve!==""&&(Z+="%s",Q=Q.concat([ve]));var we=Q.map(function(xe){return String(xe)});we.unshift("Warning: "+Z),Function.prototype.apply.call(console[O],console,we)}}var w=!1,v=!1,_=!1,A=!1,S=!1,L;L=Symbol.for("react.module.reference");function N(O){return!!(typeof O=="string"||typeof O=="function"||O===r||O===s||S||O===o||O===l||O===f||A||O===E||w||v||_||typeof O=="object"&&O!==null&&(O.$$typeof===y||O.$$typeof===g||O.$$typeof===a||O.$$typeof===i||O.$$typeof===c||O.$$typeof===L||O.getModuleId!==void 0))}function D(O,Z,Q){var ne=O.displayName;if(ne)return ne;var ve=Z.displayName||Z.name||"";return ve!==""?Q+"("+ve+")":Q}function k(O){return O.displayName||"Context"}function M(O){if(O==null)return null;if(typeof O.tag=="number"&&x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof O=="function")return O.displayName||O.name||null;if(typeof O=="string")return O;switch(O){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof O=="object")switch(O.$$typeof){case i:var Z=O;return k(Z)+".Consumer";case a:var Q=O;return k(Q._context)+".Provider";case c:return D(O,O.render,"ForwardRef");case g:var ne=O.displayName||null;return ne!==null?ne:M(O.type)||"Memo";case y:{var ve=O,we=ve._payload,xe=ve._init;try{return M(xe(we))}catch{return null}}}return null}var B=Object.assign,Y=0,J,H,G,q,oe,te,V;function W(){}W.__reactDisabledLog=!0;function R(){{if(Y===0){J=console.log,H=console.info,G=console.warn,q=console.error,oe=console.group,te=console.groupCollapsed,V=console.groupEnd;var O={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:O,log:O,warn:O,error:O,group:O,groupCollapsed:O,groupEnd:O})}Y++}}function X(){{if(Y--,Y===0){var O={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},O,{value:J}),info:B({},O,{value:H}),warn:B({},O,{value:G}),error:B({},O,{value:q}),group:B({},O,{value:oe}),groupCollapsed:B({},O,{value:te}),groupEnd:B({},O,{value:V})})}Y<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var $=b.ReactCurrentDispatcher,ae;function ie(O,Z,Q){{if(ae===void 0)try{throw Error()}catch(ve){var ne=ve.stack.trim().match(/\n( *(at )?)/);ae=ne&&ne[1]||""}return`
|
|
18
|
+
`+ae+O}}var P=!1,ee;{var ye=typeof WeakMap=="function"?WeakMap:Map;ee=new ye}function z(O,Z){if(!O||P)return"";{var Q=ee.get(O);if(Q!==void 0)return Q}var ne;P=!0;var ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var we;we=$.current,$.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(me){ne=me}Reflect.construct(O,[],xe)}else{try{xe.call()}catch(me){ne=me}O.call(xe.prototype)}}else{try{throw Error()}catch(me){ne=me}O()}}catch(me){if(me&&ne&&typeof me.stack=="string"){for(var Ce=me.stack.split(`
|
|
19
19
|
`),ut=ne.stack.split(`
|
|
20
|
-
`),Ze=
|
|
21
|
-
`+
|
|
20
|
+
`),Ze=Ce.length-1,Je=ut.length-1;Ze>=1&&Je>=0&&Ce[Ze]!==ut[Je];)Je--;for(;Ze>=1&&Je>=0;Ze--,Je--)if(Ce[Ze]!==ut[Je]){if(Ze!==1||Je!==1)do if(Ze--,Je--,Je<0||Ce[Ze]!==ut[Je]){var bt=`
|
|
21
|
+
`+Ce[Ze].replace(" at new "," at ");return O.displayName&&bt.includes("<anonymous>")&&(bt=bt.replace("<anonymous>",O.displayName)),typeof O=="function"&&ee.set(O,bt),bt}while(Ze>=1&&Je>=0);break}}}finally{P=!1,$.current=we,X(),Error.prepareStackTrace=ve}var Fn=O?O.displayName||O.name:"",se=Fn?ie(Fn):"";return typeof O=="function"&&ee.set(O,se),se}function Ae(O,Z,Q){return z(O,!1)}function Ge(O){var Z=O.prototype;return!!(Z&&Z.isReactComponent)}function We(O,Z,Q){if(O==null)return"";if(typeof O=="function")return z(O,Ge(O));if(typeof O=="string")return ie(O);switch(O){case l:return ie("Suspense");case f:return ie("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Ae(O.render);case g:return We(O.type,Z,Q);case y:{var ne=O,ve=ne._payload,we=ne._init;try{return We(we(ve),Z,Q)}catch{}}}return""}var rn=Object.prototype.hasOwnProperty,yn={},et=b.ReactDebugCurrentFrame;function ct(O){if(O){var Z=O._owner,Q=We(O.type,O._source,Z?Z.type:null);et.setExtraStackFrame(Q)}else et.setExtraStackFrame(null)}function Qe(O,Z,Q,ne,ve){{var we=Function.call.bind(rn);for(var xe in O)if(we(O,xe)){var Ce=void 0;try{if(typeof O[xe]!="function"){var ut=Error((ne||"React class")+": "+Q+" type `"+xe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[xe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ut.name="Invariant Violation",ut}Ce=O[xe](Z,xe,ne,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ze){Ce=Ze}Ce&&!(Ce instanceof Error)&&(ct(ve),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).",ne||"React class",Q,xe,typeof Ce),ct(null)),Ce instanceof Error&&!(Ce.message in yn)&&(yn[Ce.message]=!0,ct(ve),x("Failed %s type: %s",Q,Ce.message),ct(null))}}}var Rr=Array.isArray;function Bt(O){return Rr(O)}function Kn(O){{var Z=typeof Symbol=="function"&&Symbol.toStringTag,Q=Z&&O[Symbol.toStringTag]||O.constructor.name||"Object";return Q}}function er(O){try{return tr(O),!1}catch{return!0}}function tr(O){return""+O}function nr(O){if(er(O))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Kn(O)),tr(O)}var mt=b.ReactCurrentOwner,Tn={key:!0,ref:!0,__self:!0,__source:!0},Mr,Ln,Vt;Vt={};function ds(O){if(rn.call(O,"ref")){var Z=Object.getOwnPropertyDescriptor(O,"ref").get;if(Z&&Z.isReactWarning)return!1}return O.ref!==void 0}function Gt(O){if(rn.call(O,"key")){var Z=Object.getOwnPropertyDescriptor(O,"key").get;if(Z&&Z.isReactWarning)return!1}return O.key!==void 0}function rr(O,Z){if(typeof O.ref=="string"&&mt.current&&Z&&mt.current.stateNode!==Z){var Q=M(mt.current.type);Vt[Q]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(mt.current.type),O.ref),Vt[Q]=!0)}}function On(O,Z){{var Q=function(){Mr||(Mr=!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))};Q.isReactWarning=!0,Object.defineProperty(O,"key",{get:Q,configurable:!0})}}function _o(O,Z){{var Q=function(){Ln||(Ln=!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))};Q.isReactWarning=!0,Object.defineProperty(O,"ref",{get:Q,configurable:!0})}}var Ht=function(O,Z,Q,ne,ve,we,xe){var Ce={$$typeof:t,type:O,key:Z,ref:Q,props:xe,_owner:we};return Ce._store={},Object.defineProperty(Ce._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ce,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ne}),Object.defineProperty(Ce,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ve}),Object.freeze&&(Object.freeze(Ce.props),Object.freeze(Ce)),Ce};function So(O,Z,Q,ne,ve){{var we,xe={},Ce=null,ut=null;Q!==void 0&&(nr(Q),Ce=""+Q),Gt(Z)&&(nr(Z.key),Ce=""+Z.key),ds(Z)&&(ut=Z.ref,rr(Z,ve));for(we in Z)rn.call(Z,we)&&!Tn.hasOwnProperty(we)&&(xe[we]=Z[we]);if(O&&O.defaultProps){var Ze=O.defaultProps;for(we in Ze)xe[we]===void 0&&(xe[we]=Ze[we])}if(Ce||ut){var Je=typeof O=="function"?O.displayName||O.name||"Unknown":O;Ce&&On(xe,Je),ut&&_o(xe,Je)}return Ht(O,Ce,ut,ve,ne,mt.current,xe)}}var or=b.ReactCurrentOwner,sr=b.ReactDebugCurrentFrame;function on(O){if(O){var Z=O._owner,Q=We(O.type,O._source,Z?Z.type:null);sr.setExtraStackFrame(Q)}else sr.setExtraStackFrame(null)}var ar;ar=!1;function Pr(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function Ao(){{if(or.current){var O=M(or.current.type);if(O)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+O+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+O+"`."}return""}}function fs(O){return""}var jr={};function ps(O){{var Z=Ao();if(!Z){var Q=typeof O=="string"?O:O.displayName||O.name;Q&&(Z=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+Q+">.")}return Z}}function Br(O,Z){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=
|
|
25
|
+
Check the top-level render call using <`+Q+">.")}return Z}}function Br(O,Z){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var Q=ps(Z);if(jr[Q])return;jr[Q]=!0;var ne="";O&&O._owner&&O._owner!==or.current&&(ne=" It was passed a child from "+M(O._owner.type)+"."),on(O),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Q,ne),on(null)}}function Vr(O,Z){{if(typeof O!="object")return;if(Bt(O))for(var Q=0;Q<O.length;Q++){var ne=O[Q];Pr(ne)&&Br(ne,Z)}else if(Pr(O))O._store&&(O._store.validated=!0);else if(O){var ve=p(O);if(typeof ve=="function"&&ve!==O.entries)for(var we=ve.call(O),xe;!(xe=we.next()).done;)Pr(xe.value)&&Br(xe.value,Z)}}}function Gr(O){{var Z=O.type;if(Z==null||typeof Z=="string")return;var Q;if(typeof Z=="function")Q=Z.propTypes;else if(typeof Z=="object"&&(Z.$$typeof===c||Z.$$typeof===g))Q=Z.propTypes;else return;if(Q){var ne=M(Z);Qe(Q,O.props,"prop",ne,O)}else if(Z.PropTypes!==void 0&&!ar){ar=!0;var ve=M(Z);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ve||"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 fe(O){{for(var Z=Object.keys(O.props),Q=0;Q<Z.length;Q++){var ne=Z[Q];if(ne!=="children"&&ne!=="key"){on(O),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ne),on(null);break}}O.ref!==null&&(on(O),x("Invalid attribute `ref` supplied to `React.Fragment`."),on(null))}}var he={};function $e(O,Z,Q,ne,ve,we){{var xe=N(O);if(!xe){var Ce="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(Ce+=" 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 ut=fs();ut?Ce+=ut:Ce+=Ao();var Ze;O===null?Ze="null":Bt(O)?Ze="array":O!==void 0&&O.$$typeof===t?(Ze="<"+(M(O.type)||"Unknown")+" />",Ce=" Did you accidentally export a JSX literal instead of a component?"):Ze=typeof O,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ze,Ce)}var Je=So(O,Z,Q,ve,we);if(Je==null)return Je;if(xe){var bt=Z.children;if(bt!==void 0)if(ne)if(Bt(bt)){for(var Fn=0;Fn<bt.length;Fn++)Vr(bt[Fn],O);Object.freeze&&Object.freeze(bt)}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 Vr(bt,O)}if(rn.call(Z,"key")){var se=M(O),me=Object.keys(Z).filter(function(TL){return TL!=="key"}),st=me.length>0?"{key: someKey, "+me.join(": ..., ")+": ...}":"{key: someKey}";if(!he[se+st]){var kn=me.length>0?"{"+me.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} />`,st,se,kn,se),he[se+st]=!0}}return O===r?fe(Je):Gr(Je),Je}}function lt(O,Z,Q){return $e(O,Z,Q,!0)}function Rt(O,Z,Q){return $e(O,Z,Q,!1)}var sn=Rt,St=lt;Lo.Fragment=r,Lo.jsx=sn,Lo.jsxs=St}()),Lo}process.env.NODE_ENV==="production"?$a.exports=N2():$a.exports=R2();var d=$a.exports;function Bl(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=Bl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Bl(e))&&(r&&(r+=" "),r+=t);return r}const Oo=e=>typeof e=="number"&&!isNaN(e),cr=e=>typeof e=="string",At=e=>typeof e=="function",gs=e=>cr(e)||At(e)?e:null,Ua=e=>I.isValidElement(e)||cr(e)||At(e)||Oo(e);function M2(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 ms(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(a){let{children:i,position:c,preventExitTransition:l,done:f,nodeRef:g,isIn:y,playToast:E}=a;const m=r?`${t}--${c}`:t,h=r?`${n}--${c}`:n,p=I.useRef(0);return I.useLayoutEffect(()=>{const b=g.current,C=m.split(" "),x=w=>{w.target===g.current&&(E(),b.removeEventListener("animationend",x),b.removeEventListener("animationcancel",x),p.current===0&&w.type!=="animationcancel"&&b.classList.remove(...C))};b.classList.add(...C),b.addEventListener("animationend",x),b.addEventListener("animationcancel",x)},[]),I.useEffect(()=>{const b=g.current,C=()=>{b.removeEventListener("animationend",C),o?M2(b,f,s):f()};y||(l?C():(p.current=1,b.className+=` ${h}`,b.addEventListener("animationend",C)))},[y]),I.createElement(I.Fragment,null,i)}}function Vl(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 pt=new Map;let Fo=[];const Ka=new Set,P2=e=>Ka.forEach(t=>t(e)),Gl=()=>pt.size>0;function Hl(e,t){var n;if(t)return!((n=pt.get(t))==null||!n.isToastActive(e));let r=!1;return pt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Wl(e,t){Ua(e)&&(Gl()||Fo.push({content:e,options:t}),pt.forEach(n=>{n.buildToast(e,t)}))}function Zl(e,t){pt.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 j2(e){const{subscribe:t,getSnapshot:n,setProps:r}=I.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,g,y){let E=1,m=0,h=[],p=[],b=[],C=g;const x=new Map,w=new Set,v=()=>{b=Array.from(x.values()),w.forEach(S=>S())},_=S=>{p=S==null?[]:p.filter(L=>L!==S),v()},A=S=>{const{toastId:L,onOpen:N,updateId:D,children:k}=S.props,M=D==null;S.staleId&&x.delete(S.staleId),x.set(L,S),p=[...p,S.props.toastId].filter(B=>B!==S.staleId),v(),y(Vl(S,M?"added":"updated")),M&&At(N)&&N(I.isValidElement(k)&&k.props)};return{id:f,props:C,observe:S=>(w.add(S),()=>w.delete(S)),toggle:(S,L)=>{x.forEach(N=>{L!=null&&L!==N.props.toastId||At(N.toggle)&&N.toggle(S)})},removeToast:_,toasts:x,clearQueue:()=>{m-=h.length,h=[]},buildToast:(S,L)=>{if((V=>{let{containerId:W,toastId:R,updateId:X}=V;const $=W?W!==f:f!==1,ae=x.has(R)&&X==null;return $||ae})(L))return;const{toastId:N,updateId:D,data:k,staleId:M,delay:B}=L,Y=()=>{_(N)},J=D==null;J&&m++;const H={...C,style:C.toastStyle,key:E++,...Object.fromEntries(Object.entries(L).filter(V=>{let[W,R]=V;return R!=null})),toastId:N,updateId:D,data:k,closeToast:Y,isIn:!1,className:gs(L.className||C.toastClassName),bodyClassName:gs(L.bodyClassName||C.bodyClassName),progressClassName:gs(L.progressClassName||C.progressClassName),autoClose:!L.isLoading&&(G=L.autoClose,q=C.autoClose,G===!1||Oo(G)&&G>0?G:q),deleteToast(){const V=x.get(N),{onClose:W,children:R}=V.props;At(W)&&W(I.isValidElement(R)&&R.props),y(Vl(V,"removed")),x.delete(N),m--,m<0&&(m=0),h.length>0?A(h.shift()):v()}};var G,q;H.closeButton=C.closeButton,L.closeButton===!1||Ua(L.closeButton)?H.closeButton=L.closeButton:L.closeButton===!0&&(H.closeButton=!Ua(C.closeButton)||C.closeButton);let oe=S;I.isValidElement(S)&&!cr(S.type)?oe=I.cloneElement(S,{closeToast:Y,toastProps:H,data:k}):At(S)&&(oe=S({closeToast:Y,toastProps:H,data:k}));const te={content:oe,props:H,staleId:M};C.limit&&C.limit>0&&m>C.limit&&J?h.push(te):Oo(B)?setTimeout(()=>{A(te)},B):A(te)},setProps(S){C=S},setToggle:(S,L)=>{x.get(S).toggle=L},isToastActive:S=>p.some(L=>L===S),getSnapshot:()=>C.newestOnTop?b.reverse():b}}(a,s,P2);pt.set(a,c);const l=c.observe(i);return Fo.forEach(f=>Wl(f.content,f.options)),Fo=[],()=>{l(),pt.delete(a)}},setProps(i){var c;(c=pt.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=pt.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=I.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:Hl,count:o==null?void 0:o.length}}function B2(e){const[t,n]=I.useState(!1),[r,o]=I.useState(!1),s=I.useRef(null),a=I.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:g}=e;var y,E;function m(){n(!0)}function h(){n(!1)}function p(x){const w=s.current;a.canDrag&&w&&(a.didMove=!0,t&&h(),a.delta=e.draggableDirection==="x"?x.clientX-a.start:x.clientY-a.start,a.start!==x.clientX&&(a.canCloseOnClick=!1),w.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,w.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function b(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",b);const x=s.current;if(a.canDrag&&a.didMove&&x){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();x.style.transition="transform 0.2s, opacity 0.2s",x.style.removeProperty("transform"),x.style.removeProperty("opacity")}}(E=pt.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||E.setToggle(y.id,y.fn),I.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",m),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);const C={onPointerDown:function(x){if(e.draggable===!0||e.draggable===x.pointerType){a.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",b);const w=s.current;a.canCloseOnClick=!0,a.canDrag=!0,w.style.transition="none",e.draggableDirection==="x"?(a.start=x.clientX,a.removalDistance=w.offsetWidth*(e.draggablePercent/100)):(a.start=x.clientY,a.removalDistance=w.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(x){const{top:w,bottom:v,left:_,right:A}=s.current.getBoundingClientRect();x.nativeEvent.type!=="touchend"&&e.pauseOnHover&&x.clientX>=_&&x.clientX<=A&&x.clientY>=w&&x.clientY<=v?h():m()}};return i&&c&&(C.onMouseEnter=h,e.stacked||(C.onMouseLeave=m)),g&&(C.onClick=x=>{f&&f(x),a.canCloseOnClick&&l()}),{playToast:m,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:C}}function V2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:g,theme:y}=e;const E=s||c&&l===0,m={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(m.transform=`scaleX(${l})`);const h=Nn("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=At(a)?a({rtl:f,type:o,defaultClassName:h}):Nn(h,a),b={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{g&&r()}};return I.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":E},I.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),I.createElement("div",{role:"progressbar","aria-hidden":E?"true":"false","aria-label":"notification timer",className:p,style:m,...b}))}let G2=1;const Xl=()=>""+G2++;function H2(e){return e&&(cr(e.toastId)||Oo(e.toastId))?e.toastId:Xl()}function ko(e,t){return Wl(e,t),t.toastId}function bs(e,t){return{...t,type:t&&t.type||e,toastId:H2(t)}}function ys(e){return(t,n)=>ko(t,bs(e,n))}function De(e,t){return ko(e,bs("default",t))}De.loading=(e,t)=>ko(e,bs("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=cr(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 E={type:f,...i,...n,data:y},m=cr(g)?{render:g}:g;return r?De.update(r,{...E,...m}):De(m.render,{...E,...m}),y},l=At(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},De.success=ys("success"),De.info=ys("info"),De.error=ys("error"),De.warning=ys("warning"),De.warn=De.warning,De.dark=(e,t)=>ko(e,bs("default",{theme:"dark",...t})),De.dismiss=function(e){(function(t){var n;if(Gl()){if(t==null||cr(n=t)||Oo(n))pt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=pt.get(t.containerId);r?r.removeToast(t.id):pt.forEach(o=>{o.removeToast(t.id)})}}else Fo=Fo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},De.clearWaitingQueue=function(e){e===void 0&&(e={}),pt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},De.isActive=Hl,De.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=pt.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:Xl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,ko(a,s)}},De.done=e=>{De.update(e,{progress:1})},De.onChange=function(e){return Ka.add(e),()=>{Ka.delete(e)}},De.play=e=>Zl(!0,e),De.pause=e=>Zl(!1,e);const W2=typeof window<"u"?I.useLayoutEffect:I.useEffect,Cs=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return I.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},ei={info:function(e){return I.createElement(Cs,{...e},I.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 I.createElement(Cs,{...e},I.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 I.createElement(Cs,{...e},I.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 I.createElement(Cs,{...e},I.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 I.createElement("div",{className:"Toastify__spinner"})}},Z2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=B2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:g,closeToast:y,transition:E,position:m,className:h,style:p,bodyClassName:b,bodyStyle:C,progressClassName:x,progressStyle:w,updateId:v,role:_,progress:A,rtl:S,toastId:L,deleteToast:N,isIn:D,isLoading:k,closeOnClick:M,theme:B}=e,Y=Nn("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),J=At(h)?h({rtl:S,position:m,type:f,defaultClassName:Y}):Nn(Y,h),H=function(te){let{theme:V,type:W,isLoading:R,icon:X}=te,$=null;const ae={theme:V,type:W};return X===!1||(At(X)?$=X({...ae,isLoading:R}):I.isValidElement(X)?$=I.cloneElement(X,ae):R?$=ei.spinner():(ie=>ie in ei)(W)&&($=ei[W](ae))),$}(e),G=!!A||!c,q={closeToast:y,type:f,theme:B};let oe=null;return a===!1||(oe=At(a)?a(q):I.isValidElement(a)?I.cloneElement(a,q):function(te){let{closeToast:V,theme:W,ariaLabel:R="close"}=te;return I.createElement("button",{className:`Toastify__close-button Toastify__close-button--${W}`,type:"button",onClick:X=>{X.stopPropagation(),V(X)},"aria-label":R},I.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},I.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)),I.createElement(E,{isIn:D,done:N,position:m,preventExitTransition:n,nodeRef:r,playToast:s},I.createElement("div",{id:L,onClick:l,"data-in":D,className:J,...o,style:p,ref:r},I.createElement("div",{...D&&{role:_},className:At(b)?b({type:f}):Nn("Toastify__toast-body",b),style:C},H!=null&&I.createElement("div",{className:Nn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!k})},H),I.createElement("div",null,i)),oe,I.createElement(V2,{...v&&!G?{key:`pb-${v}`}:{},rtl:S,theme:B,delay:c,isRunning:t,isIn:D,closeToast:y,hide:g,type:f,style:w,className:x,controlledProgress:G,progress:A||0})))},xs=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},X2=ms(xs("bounce",!0));ms(xs("slide",!0)),ms(xs("zoom")),ms(xs("flip"));const z2={position:"top-right",transition:X2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function ti(e){let t={...z2,...e};const n=e.stacked,[r,o]=I.useState(!0),s=I.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=j2(t),{className:l,style:f,rtl:g,containerId:y}=t;function E(h){const p=Nn("Toastify__toast-container",`Toastify__toast-container--${h}`,{"Toastify__toast-container--rtl":g});return At(l)?l({position:h,rtl:g,defaultClassName:p}):Nn(p,gs(l))}function m(){n&&(o(!0),De.play())}return W2(()=>{if(n){var h;const p=s.current.querySelectorAll('[data-in="true"]'),b=12,C=(h=t.position)==null?void 0:h.includes("top");let x=0,w=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=C?"top":"bot");const S=x*(r?.2:1)+(r?0:b*_);A.style.setProperty("--y",`${C?S:-1*S}px`),A.style.setProperty("--g",`${b}`),A.style.setProperty("--s",""+(1-(r?w:0))),x+=A.offsetHeight,w+=.025})}},[r,c,n]),I.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),De.pause())},onMouseLeave:m},a((h,p)=>{const b=p.length?{...f}:{...f,pointerEvents:"none"};return I.createElement("div",{className:E(h),style:b,key:`container-${h}`},p.map(C=>{let{content:x,props:w}=C;return I.createElement(Z2,{...w,stacked:n,collapseAll:m,isIn:i(w.toastId,w.containerId),style:w.style,key:`toast-${w.key}`},x)}))}))}var Hr=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(){}},lr=typeof window>"u"||"Deno"in globalThis;function Mt(){}function Y2(e,t){return typeof e=="function"?e(t):e}function ni(e){return typeof e=="number"&&e>=0&&e!==1/0}function zl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Wr(e,t){return typeof e=="function"?e(t):e}function Wt(e,t){return typeof e=="function"?e(t):e}function Yl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==ri(a,t.options))return!1}else if(!Do(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Jl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ur(t.options.mutationKey)!==ur(s))return!1}else if(!Do(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function ri(e,t){return((t==null?void 0:t.queryKeyHashFn)||ur)(e)}function ur(e){return JSON.stringify(e,(t,n)=>si(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Do(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Do(e[n],t[n])):!1}function oi(e,t){if(e===t)return e;const n=ql(e)&&ql(t);if(n||si(e)&&si(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let c=0;for(let l=0;l<a;l++){const f=n?l:s[l];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=oi(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function Es(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 ql(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function si(e){if(!Ql(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ql(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ql(e){return Object.prototype.toString.call(e)==="[object Object]"}function J2(e){return new Promise(t=>{setTimeout(t,e)})}function ai(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 oi(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 oi(e,t)}return t}function q2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Q2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var vs=Symbol();function $l(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===vs&&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===vs?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var $2=(v2=class extends Hr{constructor(){super();ue(this,Ar);ue(this,Zn);ue(this,fo);U(this,fo,t=>{if(!lr&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Zn)||this.setEventListener(F(this,fo))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Zn))==null||t.call(this),U(this,Zn,void 0))}setEventListener(t){var n;U(this,fo,t),(n=F(this,Zn))==null||n.call(this),U(this,Zn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,Ar)!==t&&(U(this,Ar,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,Ar)=="boolean"?F(this,Ar):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ar=new WeakMap,Zn=new WeakMap,fo=new WeakMap,v2),ii=new $2,U2=(w2=class extends Hr{constructor(){super();ue(this,po,!0);ue(this,Xn);ue(this,ho);U(this,ho,t=>{if(!lr&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,Xn)||this.setEventListener(F(this,ho))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Xn))==null||t.call(this),U(this,Xn,void 0))}setEventListener(t){var n;U(this,ho,t),(n=F(this,Xn))==null||n.call(this),U(this,Xn,t(this.setOnline.bind(this)))}setOnline(t){F(this,po)!==t&&(U(this,po,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,po)}},po=new WeakMap,Xn=new WeakMap,ho=new WeakMap,w2),ws=new U2;function ci(){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 K2(e){return Math.min(1e3*2**e,3e4)}function Ul(e){return(e??"online")==="online"?ws.isOnline():!0}var Kl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function li(e){return e instanceof Kl}function eu(e){let t=!1,n=0,r=!1,o;const s=ci(),a=h=>{var p;r||(y(new Kl(h)),(p=e.abort)==null||p.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>ii.isFocused()&&(e.networkMode==="always"||ws.isOnline())&&e.canRun(),f=()=>Ul(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))},E=()=>new Promise(h=>{var p;o=b=>{(r||l())&&h(b)},(p=e.onPause)==null||p.call(e)}).then(()=>{var h;o=void 0,r||(h=e.onContinue)==null||h.call(e)}),m=()=>{if(r)return;let h;const p=n===0?e.initialPromise:void 0;try{h=p??e.fn()}catch(b){h=Promise.reject(b)}Promise.resolve(h).then(g).catch(b=>{var _;if(r)return;const C=e.retry??(lr?0:3),x=e.retryDelay??K2,w=typeof x=="function"?x(n,b):x,v=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,b);if(t||!v){y(b);return}n++,(_=e.onFail)==null||_.call(e,n,b),J2(w).then(()=>l()?void 0:E()).then(()=>{t?y(b):m()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?m():E().then(m),s)}}function eh(){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 tt=eh(),tu=(I2=class{constructor(){ue(this,Tr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ni(this.gcTime)&&U(this,Tr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(lr?1/0:5*60*1e3))}clearGcTimeout(){F(this,Tr)&&(clearTimeout(F(this,Tr)),U(this,Tr,void 0))}},Tr=new WeakMap,I2),th=(_2=class extends tu{constructor(t){super();ue(this,tn);ue(this,go);ue(this,mo);ue(this,jt);ue(this,Lr);ue(this,ft);ue(this,as);ue(this,Or);U(this,Or,!1),U(this,as,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Lr,t.client),U(this,jt,F(this,Lr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,go,nh(this.options)),this.state=t.state??F(this,go),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,ft))==null?void 0:t.promise}setOptions(t){this.options={...F(this,as),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,jt).remove(this)}setData(t,n){const r=ai(this.state.data,t,this.options);return be(this,tn,Dn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,tn,Dn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,ft))==null?void 0:r.promise;return(o=F(this,ft))==null||o.cancel(t),n?n.then(Mt).catch(Mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,go))}isActive(){return this.observers.some(t=>Wt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vs||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||!zl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,ft))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,ft))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,ft)&&(F(this,Or)?F(this,ft).cancel({revert:!0}):F(this,ft).cancelRetry()),this.scheduleGc()),F(this,jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,tn,Dn).call(this,{type:"invalidate"})}fetch(t,n){var c,l,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,ft))return F(this,ft).continueRetry(),F(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:()=>(U(this,Or,!0),r.signal)})},s=()=>{const g=$l(this.options,n),y={client:F(this,Lr),queryKey:this.queryKey,meta:this.meta};return o(y),U(this,Or,!1),this.options.persister?this.options.persister(g,y,this):g(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,Lr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),U(this,mo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&be(this,tn,Dn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=g=>{var y,E,m,h;li(g)&&g.silent||be(this,tn,Dn).call(this,{type:"error",error:g}),li(g)||((E=(y=F(this,jt).config).onError)==null||E.call(y,g,this),(h=(m=F(this,jt).config).onSettled)==null||h.call(m,this.state.data,g,this)),this.scheduleGc()};return U(this,ft,eu({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var y,E,m,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}(E=(y=F(this,jt).config).onSuccess)==null||E.call(y,g,this),(h=(m=F(this,jt).config).onSettled)==null||h.call(m,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,y)=>{be(this,tn,Dn).call(this,{type:"failed",failureCount:g,error:y})},onPause:()=>{be(this,tn,Dn).call(this,{type:"pause"})},onContinue:()=>{be(this,tn,Dn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,ft).start()}},go=new WeakMap,mo=new WeakMap,jt=new WeakMap,Lr=new WeakMap,ft=new WeakMap,as=new WeakMap,Or=new WeakMap,tn=new WeakSet,Dn=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,...nu(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 li(o)&&o.revert&&F(this,mo)?{...F(this,mo),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),tt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,jt).notify({query:this,type:"updated",action:t})})},_2);function nu(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ul(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nh(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 rh=(S2=class extends Hr{constructor(t={}){super();ue(this,hn);this.config=t,U(this,hn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??ri(o,n);let a=this.get(s);return a||(a=new th({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,hn).has(t.queryHash)||(F(this,hn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,hn).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,hn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,hn).get(t)}getAll(){return[...F(this,hn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Yl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Yl(t,r)):n}notify(t){tt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},hn=new WeakMap,S2),oh=(A2=class extends tu{constructor(t){super();ue(this,mn);ue(this,gn);ue(this,ht);ue(this,Fr);this.mutationId=t.mutationId,U(this,ht,t.mutationCache),U(this,gn,[]),this.state=t.state||ru(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,gn).includes(t)||(F(this,gn).push(t),this.clearGcTimeout(),F(this,ht).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,gn,F(this,gn).filter(n=>n!==t)),this.scheduleGc(),F(this,ht).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,gn).length||(this.state.status==="pending"?this.scheduleGc():F(this,ht).remove(this))}continue(){var t;return((t=F(this,Fr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,g,y,E,m,h,p,b,C,x,w,v,_,A;U(this,Fr,eu({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{be(this,mn,ir).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{be(this,mn,ir).call(this,{type:"pause"})},onContinue:()=>{be(this,mn,ir).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ht).canRun(this)}));const n=this.state.status==="pending",r=!F(this,Fr).canStart();try{if(!n){be(this,mn,ir).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,ht).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&be(this,mn,ir).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,Fr).start();return await((l=(c=F(this,ht).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,S,t,this.state.context)),await((E=(y=F(this,ht).config).onSettled)==null?void 0:E.call(y,S,null,this.state.variables,this.state.context,this)),await((h=(m=this.options).onSettled)==null?void 0:h.call(m,S,null,t,this.state.context)),be(this,mn,ir).call(this,{type:"success",data:S}),S}catch(S){try{throw await((b=(p=F(this,ht).config).onError)==null?void 0:b.call(p,S,t,this.state.context,this)),await((x=(C=this.options).onError)==null?void 0:x.call(C,S,t,this.state.context)),await((v=(w=F(this,ht).config).onSettled)==null?void 0:v.call(w,void 0,S,this.state.variables,this.state.context,this)),await((A=(_=this.options).onSettled)==null?void 0:A.call(_,void 0,S,t,this.state.context)),S}finally{be(this,mn,ir).call(this,{type:"error",error:S})}}finally{F(this,ht).runNext(this)}}},gn=new WeakMap,ht=new WeakMap,Fr=new WeakMap,mn=new WeakSet,ir=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),tt.batch(()=>{F(this,gn).forEach(r=>{r.onMutationUpdate(t)}),F(this,ht).notify({mutation:this,type:"updated",action:t})})},A2);function ru(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var sh=(T2=class extends Hr{constructor(t={}){super();ue(this,_n);ue(this,nn);ue(this,is);this.config=t,U(this,_n,new Set),U(this,nn,new Map),U(this,is,0)}build(t,n,r){const o=new oh({mutationCache:this,mutationId:++Ja(this,is)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,_n).add(t);const n=Is(t);if(typeof n=="string"){const r=F(this,nn).get(n);r?r.push(t):F(this,nn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,_n).delete(t)){const n=Is(t);if(typeof n=="string"){const r=F(this,nn).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,nn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Is(t);if(typeof n=="string"){const r=F(this,nn).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=Is(t);if(typeof n=="string"){const o=(r=F(this,nn).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(){tt.batch(()=>{F(this,_n).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,_n).clear(),F(this,nn).clear()})}getAll(){return Array.from(F(this,_n))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Jl(n,r))}findAll(t={}){return this.getAll().filter(n=>Jl(t,n))}notify(t){tt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return tt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Mt))))}},_n=new WeakMap,nn=new WeakMap,is=new WeakMap,T2);function Is(e){var t;return(t=e.options.scope)==null?void 0:t.id}function _s(e){return{onFetch:(t,n)=>{var f,g,y,E,m;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=((E=t.state.data)==null?void 0:E.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let h=!1;const p=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},b=$l(t.options,t.fetchOptions),C=async(x,w,v)=>{if(h)return Promise.reject();if(w==null&&x.pages.length)return Promise.resolve(x);const _={client:t.client,queryKey:t.queryKey,pageParam:w,direction:v?"backward":"forward",meta:t.options.meta};p(_);const A=await b(_),{maxPages:S}=t.options,L=v?Q2:q2;return{pages:L(x.pages,A,S),pageParams:L(x.pageParams,w,S)}};if(o&&s.length){const x=o==="backward",w=x?ou:ui,v={pages:s,pageParams:a},_=w(r,v);i=await C(v,_,x)}else{const x=e??s.length;do{const w=c===0?a[0]??r.initialPageParam:ui(r,i);if(c>0&&w==null)break;i=await C(i,w),c++}while(c<x)}return i};t.options.persister?t.fetchFn=()=>{var h,p;return(p=(h=t.options).persister)==null?void 0:p.call(h,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function ui(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 ah(e,t){return t?ui(e,t)!=null:!1}function ih(e,t){return!t||!e.getPreviousPageParam?!1:ou(e,t)!=null}var ch=(L2=class{constructor(e={}){ue(this,Ye);ue(this,zn);ue(this,Yn);ue(this,bo);ue(this,yo);ue(this,Jn);ue(this,Co);ue(this,xo);U(this,Ye,e.queryCache||new rh),U(this,zn,e.mutationCache||new sh),U(this,Yn,e.defaultOptions||{}),U(this,bo,new Map),U(this,yo,new Map),U(this,Jn,0)}mount(){Ja(this,Jn)._++,F(this,Jn)===1&&(U(this,Co,ii.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ye).onFocus())})),U(this,xo,ws.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ye).onOnline())})))}unmount(){var e,t;Ja(this,Jn)._--,F(this,Jn)===0&&((e=F(this,Co))==null||e.call(this),U(this,Co,void 0),(t=F(this,xo))==null||t.call(this),U(this,xo,void 0))}isFetching(e){return F(this,Ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,zn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Ye).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Ye).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Wr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Ye).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,Ye).get(r.queryHash),s=o==null?void 0:o.state.data,a=Y2(t,s);if(a!==void 0)return F(this,Ye).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return tt.batch(()=>F(this,Ye).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Ye).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Ye);tt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Ye);return tt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=tt.batch(()=>F(this,Ye).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Mt).catch(Mt)}invalidateQueries(e,t={}){return tt.batch(()=>(F(this,Ye).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=tt.batch(()=>F(this,Ye).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Mt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Mt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Ye).build(this,t);return n.isStaleByTime(Wr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Mt).catch(Mt)}fetchInfiniteQuery(e){return e.behavior=_s(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Mt).catch(Mt)}ensureInfiniteQueryData(e){return e.behavior=_s(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ws.isOnline()?F(this,zn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Ye)}getMutationCache(){return F(this,zn)}getDefaultOptions(){return F(this,Yn)}setDefaultOptions(e){U(this,Yn,e)}setQueryDefaults(e,t){F(this,bo).set(ur(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,bo).values()],n={};return t.forEach(r=>{Do(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,yo).set(ur(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,yo).values()],n={};return t.forEach(r=>{Do(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Yn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ri(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===vs&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Yn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Ye).clear(),F(this,zn).clear()}},Ye=new WeakMap,zn=new WeakMap,Yn=new WeakMap,bo=new WeakMap,yo=new WeakMap,Jn=new WeakMap,Co=new WeakMap,xo=new WeakMap,L2),su=(O2=class extends Hr{constructor(t,n){super();ue(this,Me);ue(this,It);ue(this,_e);ue(this,cs);ue(this,gt);ue(this,kr);ue(this,Eo);ue(this,qn);ue(this,bn);ue(this,ls);ue(this,vo);ue(this,wo);ue(this,Dr);ue(this,Nr);ue(this,Qn);ue(this,Io,new Set);this.options=n,U(this,It,t),U(this,bn,null),U(this,qn,ci()),this.options.experimental_prefetchInRender||F(this,qn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,_e).addObserver(this),au(F(this,_e),this.options)?be(this,Me,ps).call(this):this.updateResult(),be(this,Me,kl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return di(F(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return di(F(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,Me,Dl).call(this),be(this,Me,Nl).call(this),F(this,_e).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,_e);if(this.options=F(this,It).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Wt(this.options.enabled,F(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,Me,Rl).call(this),F(this,_e).setOptions(this.options),r._defaulted&&!Es(this.options,r)&&F(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,_e),observer:this});const s=this.hasListeners();s&&iu(F(this,_e),o,this.options,r)&&be(this,Me,ps).call(this),this.updateResult(n),s&&(F(this,_e)!==o||Wt(this.options.enabled,F(this,_e))!==Wt(r.enabled,F(this,_e))||Wr(this.options.staleTime,F(this,_e))!==Wr(r.staleTime,F(this,_e)))&&be(this,Me,Ll).call(this);const a=be(this,Me,Ol).call(this);s&&(F(this,_e)!==o||Wt(this.options.enabled,F(this,_e))!==Wt(r.enabled,F(this,_e))||a!==F(this,Qn))&&be(this,Me,Fl).call(this,a)}getOptimisticResult(t){const n=F(this,It).getQueryCache().build(F(this,It),t),r=this.createResult(n,t);return uh(this,r)&&(U(this,gt,r),U(this,Eo,this.options),U(this,kr,F(this,_e).state)),r}getCurrentResult(){return F(this,gt)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,Io).add(t)}getCurrentQuery(){return F(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,It).defaultQueryOptions(t),r=F(this,It).getQueryCache().build(F(this,It),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,Me,ps).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,gt)))}createResult(t,n){var S;const r=F(this,_e),o=this.options,s=F(this,gt),a=F(this,kr),i=F(this,Eo),l=t!==r?t.state:F(this,cs),{state:f}=t;let g={...f},y=!1,E;if(n._optimisticResults){const L=this.hasListeners(),N=!L&&au(t,n),D=L&&iu(t,r,n,o);(N||D)&&(g={...g,...nu(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:m,errorUpdatedAt:h,status:p}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===F(this,ls))E=F(this,vo);else try{U(this,ls,n.select),E=n.select(g.data),E=ai(s==null?void 0:s.data,E,n),U(this,vo,E),U(this,bn,null)}catch(L){U(this,bn,L)}else E=g.data;if(n.placeholderData!==void 0&&E===void 0&&p==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,wo))==null?void 0:S.state.data,F(this,wo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),U(this,bn,null)}catch(N){U(this,bn,N)}L!==void 0&&(p="success",E=ai(s==null?void 0:s.data,L,n),y=!0)}F(this,bn)&&(m=F(this,bn),E=F(this,vo),h=Date.now(),p="error");const b=g.fetchStatus==="fetching",C=p==="pending",x=p==="error",w=C&&b,v=E!==void 0,A={status:p,fetchStatus:g.fetchStatus,isPending:C,isSuccess:p==="success",isError:x,isInitialLoading:w,isLoading:w,data:E,dataUpdatedAt:g.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>l.dataUpdateCount||g.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!C,isLoadingError:x&&!v,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:x&&v,isStale:fi(t,n),refetch:this.refetch,promise:F(this,qn)};if(this.options.experimental_prefetchInRender){const L=k=>{A.status==="error"?k.reject(A.error):A.data!==void 0&&k.resolve(A.data)},N=()=>{const k=U(this,qn,A.promise=ci());L(k)},D=F(this,qn);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=F(this,gt),r=this.createResult(F(this,_e),this.options);if(U(this,kr,F(this,_e).state),U(this,Eo,this.options),F(this,kr).data!==void 0&&U(this,wo,F(this,_e)),Es(r,n))return;U(this,gt,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,Io).size)return!0;const c=new Set(i??F(this,Io));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,gt)).some(l=>{const f=l;return F(this,gt)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),be(this,Me,D2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,Me,kl).call(this)}},It=new WeakMap,_e=new WeakMap,cs=new WeakMap,gt=new WeakMap,kr=new WeakMap,Eo=new WeakMap,qn=new WeakMap,bn=new WeakMap,ls=new WeakMap,vo=new WeakMap,wo=new WeakMap,Dr=new WeakMap,Nr=new WeakMap,Qn=new WeakMap,Io=new WeakMap,Me=new WeakSet,ps=function(t){be(this,Me,Rl).call(this);let n=F(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Mt)),n},Ll=function(){be(this,Me,Dl).call(this);const t=Wr(this.options.staleTime,F(this,_e));if(lr||F(this,gt).isStale||!ni(t))return;const r=zl(F(this,gt).dataUpdatedAt,t)+1;U(this,Dr,setTimeout(()=>{F(this,gt).isStale||this.updateResult()},r))},Ol=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,_e)):this.options.refetchInterval)??!1},Fl=function(t){be(this,Me,Nl).call(this),U(this,Qn,t),!(lr||Wt(this.options.enabled,F(this,_e))===!1||!ni(F(this,Qn))||F(this,Qn)===0)&&U(this,Nr,setInterval(()=>{(this.options.refetchIntervalInBackground||ii.isFocused())&&be(this,Me,ps).call(this)},F(this,Qn)))},kl=function(){be(this,Me,Ll).call(this),be(this,Me,Fl).call(this,be(this,Me,Ol).call(this))},Dl=function(){F(this,Dr)&&(clearTimeout(F(this,Dr)),U(this,Dr,void 0))},Nl=function(){F(this,Nr)&&(clearInterval(F(this,Nr)),U(this,Nr,void 0))},Rl=function(){const t=F(this,It).getQueryCache().build(F(this,It),this.options);if(t===F(this,_e))return;const n=F(this,_e);U(this,_e,t),U(this,cs,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},D2=function(t){tt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,gt))}),F(this,It).getQueryCache().notify({query:F(this,_e),type:"observerResultsUpdated"})})},O2);function lh(e,t){return Wt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function au(e,t){return lh(e,t)||e.state.data!==void 0&&di(e,t,t.refetchOnMount)}function di(e,t,n){if(Wt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&fi(e,t)}return!1}function iu(e,t,n,r){return(e!==t||Wt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&fi(e,n)}function fi(e,t){return Wt(t.enabled,e)!==!1&&e.isStaleByTime(Wr(t.staleTime,e))}function uh(e,t){return!Es(e.getCurrentResult(),t)}var dh=class extends su{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:_s()},t)}getOptimisticResult(e){return e.behavior=_s(),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 m,h;const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:a,isRefetchError:i}=r,c=(h=(m=n.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:h.direction,l=a&&c==="forward",f=o&&c==="forward",g=a&&c==="backward",y=o&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ah(t,n.data),hasPreviousPage:ih(t,n.data),isFetchNextPageError:l,isFetchingNextPage:f,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:i&&!l&&!g,isRefetching:s&&!f&&!y}}},fh=(F2=class extends Hr{constructor(n,r){super();ue(this,An);ue(this,$n);ue(this,Un);ue(this,_t);ue(this,Sn);U(this,$n,n),this.setOptions(r),this.bindMethods(),be(this,An,qa).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,$n).defaultMutationOptions(n),Es(this.options,r)||F(this,$n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,_t),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ur(r.mutationKey)!==ur(this.options.mutationKey)?this.reset():((o=F(this,_t))==null?void 0:o.state.status)==="pending"&&F(this,_t).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,_t))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,An,qa).call(this),be(this,An,Ml).call(this,n)}getCurrentResult(){return F(this,Un)}reset(){var n;(n=F(this,_t))==null||n.removeObserver(this),U(this,_t,void 0),be(this,An,qa).call(this),be(this,An,Ml).call(this)}mutate(n,r){var o;return U(this,Sn,r),(o=F(this,_t))==null||o.removeObserver(this),U(this,_t,F(this,$n).getMutationCache().build(F(this,$n),this.options)),F(this,_t).addObserver(this),F(this,_t).execute(n)}},$n=new WeakMap,Un=new WeakMap,_t=new WeakMap,Sn=new WeakMap,An=new WeakSet,qa=function(){var r;const n=((r=F(this,_t))==null?void 0:r.state)??ru();U(this,Un,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ml=function(n){tt.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,Sn)&&this.hasListeners()){const g=F(this,Un).variables,y=F(this,Un).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,Sn)).onSuccess)==null||o.call(r,n.data,g,y),(a=(s=F(this,Sn)).onSettled)==null||a.call(s,n.data,null,g,y)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,Sn)).onError)==null||c.call(i,n.error,g,y),(f=(l=F(this,Sn)).onSettled)==null||f.call(l,void 0,n.error,g,y))}this.listeners.forEach(g=>{g(F(this,Un))})})},F2),cu=T.createContext(void 0),Zr=e=>{const t=T.useContext(cu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ph=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(cu.Provider,{value:e,children:t})),lu=T.createContext(!1),hh=()=>T.useContext(lu);lu.Provider;function gh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var mh=T.createContext(gh()),bh=()=>T.useContext(mh);function uu(e,t){return typeof e=="function"?e(...t):!!e}function pi(){}var yh=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ch=e=>{T.useEffect(()=>{e.clearReset()},[e])},xh=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||uu(n,[e.error,r])),Eh=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)))},vh=(e,t)=>e.isLoading&&e.isFetching&&!t,wh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,du=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function fu(e,t,n){var g,y,E,m,h;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Zr(),o=hh(),s=bh(),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",Eh(a),yh(a,s),Ch(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(p=>{const b=f?c.subscribe(tt.batchCalls(p)):pi;return c.updateResult(),b},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),wh(a,l))throw du(a,c,s);if(xh({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((m=(E=r.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||m.call(E,a,l),a.experimental_prefetchInRender&&!lr&&vh(l,o)){const p=i?du(a,c,s):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;p==null||p.catch(pi).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Zt(e,t){return fu(e,su)}function Xt(e,t){const n=Zr(),[r]=T.useState(()=>new fh(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(tt.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(pi)},[r]);if(o.error&&uu(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function Ih(e,t){return fu(e,dh)}const hi=(e,t)=>t.some(n=>e instanceof n);let pu,hu;function _h(){return pu||(pu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Sh(){return hu||(hu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const gi=new WeakMap,mi=new WeakMap,Ss=new WeakMap;function Ah(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(dr(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return Ss.set(t,e),t}function Th(e){if(gi.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)});gi.set(e,t)}let bi={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return gi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return dr(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 gu(e){bi=e(bi)}function Lh(e){return Sh().includes(e)?function(...t){return e.apply(yi(this),t),dr(this.request)}:function(...t){return dr(e.apply(yi(this),t))}}function Oh(e){return typeof e=="function"?Lh(e):(e instanceof IDBTransaction&&Th(e),hi(e,_h())?new Proxy(e,bi):e)}function dr(e){if(e instanceof IDBRequest)return Ah(e);if(mi.has(e))return mi.get(e);const t=Oh(e);return t!==e&&(mi.set(e,t),Ss.set(t,e)),t}const yi=e=>Ss.get(e);function Fh(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=dr(a);return r&&a.addEventListener("upgradeneeded",c=>{r(dr(a.result),c.oldVersion,c.newVersion,dr(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const kh=["get","getKey","getAll","getAllKeys","count"],Dh=["put","add","delete","clear"],Ci=new Map;function mu(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Ci.get(t))return Ci.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Dh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||kh.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[n](...i),o&&c.done]))[0]};return Ci.set(t,s),s}gu(e=>({...e,get:(t,n,r)=>mu(t,n)||e.get(t,n,r),has:(t,n)=>!!mu(t,n)||e.has(t,n)}));const Nh=["continue","continuePrimaryKey","advance"],bu={},xi=new WeakMap,yu=new WeakMap,Rh={get(e,t){if(!Nh.includes(t))return e[t];let n=bu[t];return n||(n=bu[t]=function(...r){xi.set(this,yu.get(this)[t](...r))}),n}};async function*Mh(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,Rh);for(yu.set(n,t),Ss.set(n,yi(t));t;)yield n,t=await(xi.get(n)||t.continue()),xi.delete(n)}function Cu(e,t){return t===Symbol.asyncIterator&&hi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&hi(e,[IDBIndex,IDBObjectStore])}gu(e=>({...e,get(t,n,r){return Cu(t,n)?Mh:e.get(t,n,r)},has(t,n){return Cu(t,n)||e.has(t,n)}}));const Ph="connector-db",jh=1,As={FEEDBACK:"feedback"},No=`${As.FEEDBACK}:data`,Ts=`${As.FEEDBACK}:last_submitted`,Ro=`${As.FEEDBACK}:capture_on_demand`,Mo=`${As.FEEDBACK}:show_notification`,Bh=12*60*60*1e3,Ei=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=Bh:!0,xu=(e,t=!1)=>e.captureFeedback&&(Ei(e.firstViewed)&&(!e.lastSubmittedFeedback||Ei(e.lastSubmittedFeedback))||!!t);let fr=null;const Rn=async()=>{try{fr||(fr=await Fh(Ph,jh,{upgrade(e){e.objectStoreNames.contains(No)||e.createObjectStore(No),e.objectStoreNames.contains(Ts)||e.createObjectStore(Ts),e.objectStoreNames.contains(Ro)||e.createObjectStore(Ro),e.objectStoreNames.contains(Mo)||e.createObjectStore(Mo)},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."),fr&&(fr.close(),fr=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),fr=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return fr},vi=async e=>{if(!e)return[];const t=await Rn();if(!t)return[];try{return await t.get(No,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},Vh=async e=>{if(!e)return null;const t=await Rn();if(!t)return null;try{return await t.get(Ts,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Ls=async e=>{if(!e)return;const t=await Rn();if(t)try{return await t.get(Ro,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},Gh=async e=>{if(!e)return!1;const t=await Rn();if(!t)return!1;try{return await t.get(Mo,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},Hh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await Rn();if(n)try{const r=await vi(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(No,a,e),await n.put(Mo,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},Wh=async e=>{if(!e)return;const t=await Rn();if(t)try{const n=await vi(e),r=await Ls(e),o=new Date,s=n.map(a=>{const i=xu(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(No,s,e),await t.put(Ts,o,e),r&&await t.put(Ro,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},Eu=async(e,t)=>{if(!e)return;const n=await Rn();if(n)try{await n.put(Ro,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},Zh=async e=>{if(!e)return;const t=await Rn();if(t)try{await t.put(Mo,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},Xh=async e=>{const t=await vi(e),n=await Ls(e);return t.filter(o=>xu(o,n))},wi=async e=>{const t=await Vh(e);return t&&!Ei(t)?!1:await Ls(e)&&!t?!0:!!(await Xh(e)).length},zh=async(e,t)=>{await Hh(e,t)},Os=async e=>{e&&await Wh(e)},Yh=async(e,t)=>{const n=await Ls(e);t?n!==!1&&await Eu(e,t):await Eu(e,void 0)},vu=async e=>await Gh(e)&&await wi(e),wu=async e=>{await Zh(e)};var Ii={},pr={};function Iu(e,t){return function(){return e.apply(t,arguments)}}const{toString:Jh}=Object.prototype,{getPrototypeOf:_i}=Object,Fs=(e=>t=>{const n=Jh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zt=e=>(e=e.toLowerCase(),t=>Fs(t)===e),ks=e=>t=>typeof t===e,{isArray:Xr}=Array,Po=ks("undefined");function qh(e){return e!==null&&!Po(e)&&e.constructor!==null&&!Po(e.constructor)&&Tt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _u=zt("ArrayBuffer");function Qh(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_u(e.buffer),t}const $h=ks("string"),Tt=ks("function"),Su=ks("number"),Ds=e=>e!==null&&typeof e=="object",Uh=e=>e===!0||e===!1,Ns=e=>{if(Fs(e)!=="object")return!1;const t=_i(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kh=zt("Date"),eg=zt("File"),tg=zt("Blob"),ng=zt("FileList"),rg=e=>Ds(e)&&Tt(e.pipe),og=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tt(e.append)&&((t=Fs(e))==="formdata"||t==="object"&&Tt(e.toString)&&e.toString()==="[object FormData]"))},sg=zt("URLSearchParams"),[ag,ig,cg,lg]=["ReadableStream","Request","Response","Headers"].map(zt),ug=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]),Xr(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 Au(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 hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:pe,Tu=e=>!Po(e)&&e!==hr;function Si(){const{caseless:e}=Tu(this)&&this||{},t={},n=(r,o)=>{const s=e&&Au(t,o)||o;Ns(t[s])&&Ns(r)?t[s]=Si(t[s],r):Ns(r)?t[s]=Si({},r):Xr(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 dg=(e,t,n,{allOwnKeys:r}={})=>(jo(t,(o,s)=>{n&&Tt(o)?e[s]=Iu(o,n):e[s]=o},{allOwnKeys:r}),e),fg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pg=(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)},hg=(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&&_i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gg=(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},mg=e=>{if(!e)return null;if(Xr(e))return e;let t=e.length;if(!Su(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},bg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_i(Uint8Array)),yg=(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])}},Cg=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},xg=zt("HTMLFormElement"),Eg=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Lu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),vg=zt("RegExp"),Ou=(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)},wg=e=>{Ou(e,(t,n)=>{if(Tt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Tt(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+"'")})}})},Ig=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Xr(e)?r(e):r(String(e).split(t)),n},_g=()=>{},Sg=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Ai="abcdefghijklmnopqrstuvwxyz",Fu="0123456789",ku={DIGIT:Fu,ALPHA:Ai,ALPHA_DIGIT:Ai+Ai.toUpperCase()+Fu},Ag=(e=16,t=ku.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Tg(e){return!!(e&&Tt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Lg=e=>{const t=new Array(10),n=(r,o)=>{if(Ds(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Xr(r)?[]:{};return jo(r,(a,i)=>{const c=n(a,o+1);!Po(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},Og=zt("AsyncFunction"),Fg=e=>e&&(Ds(e)||Tt(e))&&Tt(e.then)&&Tt(e.catch),Du=((e,t)=>e?setImmediate:t?((n,r)=>(hr.addEventListener("message",({source:o,data:s})=>{o===hr&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),hr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tt(hr.postMessage)),kg=typeof queueMicrotask<"u"?queueMicrotask.bind(hr):typeof process<"u"&&process.nextTick||Du;var j={isArray:Xr,isArrayBuffer:_u,isBuffer:qh,isFormData:og,isArrayBufferView:Qh,isString:$h,isNumber:Su,isBoolean:Uh,isObject:Ds,isPlainObject:Ns,isReadableStream:ag,isRequest:ig,isResponse:cg,isHeaders:lg,isUndefined:Po,isDate:Kh,isFile:eg,isBlob:tg,isRegExp:vg,isFunction:Tt,isStream:rg,isURLSearchParams:sg,isTypedArray:bg,isFileList:ng,forEach:jo,merge:Si,extend:dg,trim:ug,stripBOM:fg,inherits:pg,toFlatObject:hg,kindOf:Fs,kindOfTest:zt,endsWith:gg,toArray:mg,forEachEntry:yg,matchAll:Cg,isHTMLForm:xg,hasOwnProperty:Lu,hasOwnProp:Lu,reduceDescriptors:Ou,freezeMethods:wg,toObjectSet:Ig,toCamelCase:Eg,noop:_g,toFiniteNumber:Sg,findKey:Au,global:hr,isContextDefined:Tu,ALPHABET:ku,generateString:Ag,isSpecCompliantForm:Tg,toJSONObject:Lg,isAsyncFn:Og,isThenable:Fg,setImmediate:Du,asap:kg};function ge(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)}j.inherits(ge,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:j.toJSONObject(this.config),code:this.code,status:this.status}}});const Nu=ge.prototype,Ru={};["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=>{Ru[e]={value:e}}),Object.defineProperties(ge,Ru),Object.defineProperty(Nu,"isAxiosError",{value:!0}),ge.from=(e,t,n,r,o,s)=>{const a=Object.create(Nu);return j.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),ge.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var Dg=null;function Ti(e){return j.isPlainObject(e)||j.isArray(e)}function Mu(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function Pu(e,t,n){return e?e.concat(t).map(function(o,s){return o=Mu(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Ng(e){return j.isArray(e)&&!e.some(Ti)}const Rg=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function Rs(e,t,n){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=j.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,p){return!j.isUndefined(p[h])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(t);if(!j.isFunction(o))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(j.isDate(m))return m.toISOString();if(!c&&j.isBlob(m))throw new ge("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(m)||j.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,h,p){let b=m;if(m&&!p&&typeof m=="object"){if(j.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(j.isArray(m)&&Ng(m)||(j.isFileList(m)||j.endsWith(h,"[]"))&&(b=j.toArray(m)))return h=Mu(h),b.forEach(function(x,w){!(j.isUndefined(x)||x===null)&&t.append(a===!0?Pu([h],w,s):a===null?h:h+"[]",l(x))}),!1}return Ti(m)?!0:(t.append(Pu(p,h,s),l(m)),!1)}const g=[],y=Object.assign(Rg,{defaultVisitor:f,convertValue:l,isVisitable:Ti});function E(m,h){if(!j.isUndefined(m)){if(g.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));g.push(m),j.forEach(m,function(b,C){(!(j.isUndefined(b)||b===null)&&o.call(t,b,j.isString(C)?C.trim():C,h,y))===!0&&E(b,h?h.concat(C):[C])}),g.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return E(e),t}function ju(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Li(e,t){this._pairs=[],e&&Rs(e,this,t)}const Bu=Li.prototype;Bu.append=function(t,n){this._pairs.push([t,n])},Bu.toString=function(t){const n=t?function(r){return t.call(this,r,ju)}:ju;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Mg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vu(e,t,n){if(!t)return e;const r=n&&n.encode||Mg,o=n&&n.serialize;let s;if(o?s=o(t,n):s=j.isURLSearchParams(t)?t.toString():new Li(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Pg{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){j.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Gu=Pg,Hu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},jg=typeof URLSearchParams<"u"?URLSearchParams:Li,Bg=typeof FormData<"u"?FormData:null,Vg=typeof Blob<"u"?Blob:null,Gg={isBrowser:!0,classes:{URLSearchParams:jg,FormData:Bg,Blob:Vg},protocols:["http","https","file","blob","url","data"]};const Oi=typeof window<"u"&&typeof document<"u",Fi=typeof navigator=="object"&&navigator||void 0,Hg=Oi&&(!Fi||["ReactNative","NativeScript","NS"].indexOf(Fi.product)<0),Wg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zg=Oi&&window.location.href||"http://localhost";var Xg=Object.freeze({__proto__:null,hasBrowserEnv:Oi,hasStandardBrowserWebWorkerEnv:Wg,hasStandardBrowserEnv:Hg,navigator:Fi,origin:Zg}),yt={...Xg,...Gg};function zg(e,t){return Rs(e,new yt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return yt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Yg(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Jg(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 Wu(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&&j.isArray(o)?o.length:a,c?(j.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!j.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&j.isArray(o[a])&&(o[a]=Jg(o[a])),!i)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,(r,o)=>{t(Yg(r),o,n,0)}),n}return null}function qg(e,t,n){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ki={transitional:Hu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=j.isObject(t);if(s&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Wu(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.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 zg(t,this.formSerializer).toString();if((i=j.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Rs(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),qg(t)):t}],transformResponse:[function(t){const n=this.transitional||ki.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.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"?ge.from(i,ge.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:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{ki.headers[e]={}});var Di=ki;const Qg=j.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 $g=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[Zu]=this[Zu]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Bo(a);r[i]||(tm(o,a),r[i]=!0)}return j.isArray(t)?t.forEach(s):s(t),this}}Ps.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(Ps.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),j.freezeMethods(Ps);var Yt=Ps;function Ri(e,t){const n=this||Di,r=t||n,o=Yt.from(r.headers);let s=r.data;return j.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Xu(e){return!!(e&&e.__CANCEL__)}function zr(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}j.inherits(zr,ge,{__CANCEL__:!0});function zu(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function nm(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function rm(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[s];a||(a=l),n[o]=c,r[o]=l;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const E=f&&l-f;return E?Math.round(y*1e3/E):void 0}}function om(e,t){let n=0,r=1e3/t,o,s;const a=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),g=f-n;g>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const js=(e,t,n=3)=>{let r=0;const o=rm(50,250);return om(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const g={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&f?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},Yu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ju=e=>(...t)=>j.asap(()=>e(...t));var sm=yt.hasStandardBrowserEnv?function(){const t=yt.navigator&&/(msie|trident)/i.test(yt.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=j.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),am=yt.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];j.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),j.isString(r)&&a.push("path="+r),j.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 im(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function cm(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qu(e,t){return e&&!im(t)?cm(e,t):t}const Qu=e=>e instanceof Yt?{...e}:e;function gr(e,t){t=t||{};const n={};function r(l,f,g){return j.isPlainObject(l)&&j.isPlainObject(f)?j.merge.call({caseless:g},l,f):j.isPlainObject(f)?j.merge({},f):j.isArray(f)?f.slice():f}function o(l,f,g){if(j.isUndefined(f)){if(!j.isUndefined(l))return r(void 0,l,g)}else return r(l,f,g)}function s(l,f){if(!j.isUndefined(f))return r(void 0,f)}function a(l,f){if(j.isUndefined(f)){if(!j.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function i(l,f,g){if(g in t)return r(l,f);if(g in e)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,f)=>o(Qu(l),Qu(f),!0)};return j.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=c[f]||o,y=g(e[f],t[f],f);j.isUndefined(y)&&g!==i||(n[f]=y)}),n}var $u=e=>{const t=gr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Yt.from(a),t.url=Vu(qu(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(j.isFormData(n)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(yt.hasStandardBrowserEnv&&(r&&j.isFunction(r)&&(r=r(t)),r||r!==!1&&sm(t.url))){const l=o&&s&&am.read(s);l&&a.set(o,l)}return t},lm=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=$u(e);let s=o.data;const a=Yt.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,g,y,E,m;function h(){E&&E(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function b(){if(!p)return;const x=Yt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),v={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:x,config:e,request:p};zu(function(A){n(A),h()},function(A){r(A),h()},v),p=null}"onloadend"in p?p.onloadend=b:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(b)},p.onabort=function(){p&&(r(new ge("Request aborted",ge.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let w=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const v=o.transitional||Hu;o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),r(new ge(w,v.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,p)),p=null},s===void 0&&a.setContentType(null),"setRequestHeader"in p&&j.forEach(a.toJSON(),function(w,v){p.setRequestHeader(v,w)}),j.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),l&&([y,m]=js(l,!0),p.addEventListener("progress",y)),c&&p.upload&&([g,E]=js(c),p.upload.addEventListener("progress",g),p.upload.addEventListener("loadend",E)),(o.cancelToken||o.signal)&&(f=x=>{p&&(r(!x||x.type?new zr(null,e,p):x),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const C=nm(o.url);if(C&&yt.protocols.indexOf(C)===-1){r(new ge("Unsupported protocol "+C+":",ge.ERR_BAD_REQUEST,e));return}p.send(s||null)})},um=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,i();const f=l instanceof Error?l:this.reason;r.abort(f instanceof ge?f:new zr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new ge(`timeout ${t} of ms exceeded`,ge.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>j.asap(i),c}};const dm=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},fm=async function*(e,t){for await(const n of pm(e))yield*dm(n,t)},pm=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()}},Uu=(e,t,n,r)=>{const o=fm(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){i(),c.close();return}let g=f.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Bs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ku=Bs&&typeof ReadableStream=="function",hm=Bs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ed=(e,...t)=>{try{return!!e(...t)}catch{return!1}},gm=Ku&&ed(()=>{let e=!1;const t=new Request(yt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),td=64*1024,Mi=Ku&&ed(()=>j.isReadableStream(new Response("").body)),Vs={stream:Mi&&(e=>e.body)};Bs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Vs[t]&&(Vs[t]=j.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ge(`Response type '${t}' is not supported`,ge.ERR_NOT_SUPPORT,r)})})})(new Response);const mm=async e=>{if(e==null)return 0;if(j.isBlob(e))return e.size;if(j.isSpecCompliantForm(e))return(await new Request(yt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(j.isArrayBufferView(e)||j.isArrayBuffer(e))return e.byteLength;if(j.isURLSearchParams(e)&&(e=e+""),j.isString(e))return(await hm(e)).byteLength},bm=async(e,t)=>{const n=j.toFiniteNumber(e.getContentLength());return n??mm(t)};var ym=Bs&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:g="same-origin",fetchOptions:y}=$u(e);l=l?(l+"").toLowerCase():"text";let E=um([o,s&&s.toAbortSignal()],a),m;const h=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let p;try{if(c&&gm&&n!=="get"&&n!=="head"&&(p=await bm(f,r))!==0){let v=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(j.isFormData(r)&&(_=v.headers.get("content-type"))&&f.setContentType(_),v.body){const[A,S]=Yu(p,js(Ju(c)));r=Uu(v.body,td,A,S)}}j.isString(g)||(g=g?"include":"omit");const b="credentials"in Request.prototype;m=new Request(t,{...y,signal:E,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:b?g:void 0});let C=await fetch(m);const x=Mi&&(l==="stream"||l==="response");if(Mi&&(i||x&&h)){const v={};["status","statusText","headers"].forEach(L=>{v[L]=C[L]});const _=j.toFiniteNumber(C.headers.get("content-length")),[A,S]=i&&Yu(_,js(Ju(i),!0))||[];C=new Response(Uu(C.body,td,A,()=>{S&&S(),h&&h()}),v)}l=l||"text";let w=await Vs[j.findKey(Vs,l)||"text"](C,e);return!x&&h&&h(),await new Promise((v,_)=>{zu(v,_,{data:w,headers:Yt.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:m})})}catch(b){throw h&&h(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,e,m),{cause:b.cause||b}):ge.from(b,b&&b.code,e,m)}});const Pi={http:Dg,xhr:lm,fetch:ym};j.forEach(Pi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nd=e=>`- ${e}`,Cm=e=>j.isFunction(e)||e===null||e===!1;var rd={getAdapter:e=>{e=j.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,!Cm(n)&&(r=Pi[(a=String(n)).toLowerCase()],r===void 0))throw new ge(`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} />`,st,se,kn,se),he[se+st]=!0}}return O===r?fe(Je):Gr(Je),Je}}function lt(O,Z,Q){return $e(O,Z,Q,!0)}function Rt(O,Z,Q){return $e(O,Z,Q,!1)}var sn=Rt,St=lt;Lo.Fragment=r,Lo.jsx=sn,Lo.jsxs=St}()),Lo}process.env.NODE_ENV==="production"?$a.exports=R2():$a.exports=M2();var d=$a.exports;function Bl(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=Bl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Nn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Bl(e))&&(r&&(r+=" "),r+=t);return r}const Oo=e=>typeof e=="number"&&!isNaN(e),cr=e=>typeof e=="string",At=e=>typeof e=="function",ms=e=>cr(e)||At(e)?e:null,Ua=e=>I.isValidElement(e)||cr(e)||At(e)||Oo(e);function P2(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 bs(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:s=300}=e;return function(a){let{children:i,position:c,preventExitTransition:l,done:f,nodeRef:g,isIn:y,playToast:E}=a;const m=r?`${t}--${c}`:t,h=r?`${n}--${c}`:n,p=I.useRef(0);return I.useLayoutEffect(()=>{const b=g.current,x=m.split(" "),C=w=>{w.target===g.current&&(E(),b.removeEventListener("animationend",C),b.removeEventListener("animationcancel",C),p.current===0&&w.type!=="animationcancel"&&b.classList.remove(...x))};b.classList.add(...x),b.addEventListener("animationend",C),b.addEventListener("animationcancel",C)},[]),I.useEffect(()=>{const b=g.current,x=()=>{b.removeEventListener("animationend",x),o?P2(b,f,s):f()};y||(l?x():(p.current=1,b.className+=` ${h}`,b.addEventListener("animationend",x)))},[y]),I.createElement(I.Fragment,null,i)}}function Vl(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 pt=new Map;let Fo=[];const Ka=new Set,j2=e=>Ka.forEach(t=>t(e)),Gl=()=>pt.size>0;function Hl(e,t){var n;if(t)return!((n=pt.get(t))==null||!n.isToastActive(e));let r=!1;return pt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function Wl(e,t){Ua(e)&&(Gl()||Fo.push({content:e,options:t}),pt.forEach(n=>{n.buildToast(e,t)}))}function Zl(e,t){pt.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 B2(e){const{subscribe:t,getSnapshot:n,setProps:r}=I.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(f,g,y){let E=1,m=0,h=[],p=[],b=[],x=g;const C=new Map,w=new Set,v=()=>{b=Array.from(C.values()),w.forEach(S=>S())},_=S=>{p=S==null?[]:p.filter(L=>L!==S),v()},A=S=>{const{toastId:L,onOpen:N,updateId:D,children:k}=S.props,M=D==null;S.staleId&&C.delete(S.staleId),C.set(L,S),p=[...p,S.props.toastId].filter(B=>B!==S.staleId),v(),y(Vl(S,M?"added":"updated")),M&&At(N)&&N(I.isValidElement(k)&&k.props)};return{id:f,props:x,observe:S=>(w.add(S),()=>w.delete(S)),toggle:(S,L)=>{C.forEach(N=>{L!=null&&L!==N.props.toastId||At(N.toggle)&&N.toggle(S)})},removeToast:_,toasts:C,clearQueue:()=>{m-=h.length,h=[]},buildToast:(S,L)=>{if((V=>{let{containerId:W,toastId:R,updateId:X}=V;const $=W?W!==f:f!==1,ae=C.has(R)&&X==null;return $||ae})(L))return;const{toastId:N,updateId:D,data:k,staleId:M,delay:B}=L,Y=()=>{_(N)},J=D==null;J&&m++;const H={...x,style:x.toastStyle,key:E++,...Object.fromEntries(Object.entries(L).filter(V=>{let[W,R]=V;return R!=null})),toastId:N,updateId:D,data:k,closeToast:Y,isIn:!1,className:ms(L.className||x.toastClassName),bodyClassName:ms(L.bodyClassName||x.bodyClassName),progressClassName:ms(L.progressClassName||x.progressClassName),autoClose:!L.isLoading&&(G=L.autoClose,q=x.autoClose,G===!1||Oo(G)&&G>0?G:q),deleteToast(){const V=C.get(N),{onClose:W,children:R}=V.props;At(W)&&W(I.isValidElement(R)&&R.props),y(Vl(V,"removed")),C.delete(N),m--,m<0&&(m=0),h.length>0?A(h.shift()):v()}};var G,q;H.closeButton=x.closeButton,L.closeButton===!1||Ua(L.closeButton)?H.closeButton=L.closeButton:L.closeButton===!0&&(H.closeButton=!Ua(x.closeButton)||x.closeButton);let oe=S;I.isValidElement(S)&&!cr(S.type)?oe=I.cloneElement(S,{closeToast:Y,toastProps:H,data:k}):At(S)&&(oe=S({closeToast:Y,toastProps:H,data:k}));const te={content:oe,props:H,staleId:M};x.limit&&x.limit>0&&m>x.limit&&J?h.push(te):Oo(B)?setTimeout(()=>{A(te)},B):A(te)},setProps(S){x=S},setToggle:(S,L)=>{C.get(S).toggle=L},isToastActive:S=>p.some(L=>L===S),getSnapshot:()=>x.newestOnTop?b.reverse():b}}(a,s,j2);pt.set(a,c);const l=c.observe(i);return Fo.forEach(f=>Wl(f.content,f.options)),Fo=[],()=>{l(),pt.delete(a)}},setProps(i){var c;(c=pt.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=pt.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=I.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:Hl,count:o==null?void 0:o.length}}function V2(e){const[t,n]=I.useState(!1),[r,o]=I.useState(!1),s=I.useRef(null),a=I.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:g}=e;var y,E;function m(){n(!0)}function h(){n(!1)}function p(C){const w=s.current;a.canDrag&&w&&(a.didMove=!0,t&&h(),a.delta=e.draggableDirection==="x"?C.clientX-a.start:C.clientY-a.start,a.start!==C.clientX&&(a.canCloseOnClick=!1),w.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,w.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function b(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",b);const C=s.current;if(a.canDrag&&a.didMove&&C){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}(E=pt.get((y={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||E.setToggle(y.id,y.fn),I.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||h(),window.addEventListener("focus",m),window.addEventListener("blur",h),()=>{window.removeEventListener("focus",m),window.removeEventListener("blur",h)}},[e.pauseOnFocusLoss]);const x={onPointerDown:function(C){if(e.draggable===!0||e.draggable===C.pointerType){a.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",b);const w=s.current;a.canCloseOnClick=!0,a.canDrag=!0,w.style.transition="none",e.draggableDirection==="x"?(a.start=C.clientX,a.removalDistance=w.offsetWidth*(e.draggablePercent/100)):(a.start=C.clientY,a.removalDistance=w.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(C){const{top:w,bottom:v,left:_,right:A}=s.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=_&&C.clientX<=A&&C.clientY>=w&&C.clientY<=v?h():m()}};return i&&c&&(x.onMouseEnter=h,e.stacked||(x.onMouseLeave=m)),g&&(x.onClick=C=>{f&&f(C),a.canCloseOnClick&&l()}),{playToast:m,pauseToast:h,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:x}}function G2(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:f,isIn:g,theme:y}=e;const E=s||c&&l===0,m={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(m.transform=`scaleX(${l})`);const h=Nn("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=At(a)?a({rtl:f,type:o,defaultClassName:h}):Nn(h,a),b={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{g&&r()}};return I.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":E},I.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${y} Toastify__progress-bar--${o}`}),I.createElement("div",{role:"progressbar","aria-hidden":E?"true":"false","aria-label":"notification timer",className:p,style:m,...b}))}let H2=1;const Xl=()=>""+H2++;function W2(e){return e&&(cr(e.toastId)||Oo(e.toastId))?e.toastId:Xl()}function ko(e,t){return Wl(e,t),t.toastId}function ys(e,t){return{...t,type:t&&t.type||e,toastId:W2(t)}}function xs(e){return(t,n)=>ko(t,ys(e,n))}function De(e,t){return ko(e,ys("default",t))}De.loading=(e,t)=>ko(e,ys("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=cr(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 E={type:f,...i,...n,data:y},m=cr(g)?{render:g}:g;return r?De.update(r,{...E,...m}):De(m.render,{...E,...m}),y},l=At(e)?e():e;return l.then(f=>c("success",a,f)).catch(f=>c("error",s,f)),l},De.success=xs("success"),De.info=xs("info"),De.error=xs("error"),De.warning=xs("warning"),De.warn=De.warning,De.dark=(e,t)=>ko(e,ys("default",{theme:"dark",...t})),De.dismiss=function(e){(function(t){var n;if(Gl()){if(t==null||cr(n=t)||Oo(n))pt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=pt.get(t.containerId);r?r.removeToast(t.id):pt.forEach(o=>{o.removeToast(t.id)})}}else Fo=Fo.filter(r=>t!=null&&r.options.toastId!==t)})(e)},De.clearWaitingQueue=function(e){e===void 0&&(e={}),pt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},De.isActive=Hl,De.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=pt.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:Xl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,ko(a,s)}},De.done=e=>{De.update(e,{progress:1})},De.onChange=function(e){return Ka.add(e),()=>{Ka.delete(e)}},De.play=e=>Zl(!0,e),De.pause=e=>Zl(!1,e);const Z2=typeof window<"u"?I.useLayoutEffect:I.useEffect,Cs=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return I.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},ei={info:function(e){return I.createElement(Cs,{...e},I.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 I.createElement(Cs,{...e},I.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 I.createElement(Cs,{...e},I.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 I.createElement(Cs,{...e},I.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 I.createElement("div",{className:"Toastify__spinner"})}},X2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=V2(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:f,hideProgressBar:g,closeToast:y,transition:E,position:m,className:h,style:p,bodyClassName:b,bodyStyle:x,progressClassName:C,progressStyle:w,updateId:v,role:_,progress:A,rtl:S,toastId:L,deleteToast:N,isIn:D,isLoading:k,closeOnClick:M,theme:B}=e,Y=Nn("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),J=At(h)?h({rtl:S,position:m,type:f,defaultClassName:Y}):Nn(Y,h),H=function(te){let{theme:V,type:W,isLoading:R,icon:X}=te,$=null;const ae={theme:V,type:W};return X===!1||(At(X)?$=X({...ae,isLoading:R}):I.isValidElement(X)?$=I.cloneElement(X,ae):R?$=ei.spinner():(ie=>ie in ei)(W)&&($=ei[W](ae))),$}(e),G=!!A||!c,q={closeToast:y,type:f,theme:B};let oe=null;return a===!1||(oe=At(a)?a(q):I.isValidElement(a)?I.cloneElement(a,q):function(te){let{closeToast:V,theme:W,ariaLabel:R="close"}=te;return I.createElement("button",{className:`Toastify__close-button Toastify__close-button--${W}`,type:"button",onClick:X=>{X.stopPropagation(),V(X)},"aria-label":R},I.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},I.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)),I.createElement(E,{isIn:D,done:N,position:m,preventExitTransition:n,nodeRef:r,playToast:s},I.createElement("div",{id:L,onClick:l,"data-in":D,className:J,...o,style:p,ref:r},I.createElement("div",{...D&&{role:_},className:At(b)?b({type:f}):Nn("Toastify__toast-body",b),style:x},H!=null&&I.createElement("div",{className:Nn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!k})},H),I.createElement("div",null,i)),oe,I.createElement(G2,{...v&&!G?{key:`pb-${v}`}:{},rtl:S,theme:B,delay:c,isRunning:t,isIn:D,closeToast:y,hide:g,type:f,style:w,className:C,controlledProgress:G,progress:A||0})))},Es=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},z2=bs(Es("bounce",!0));bs(Es("slide",!0)),bs(Es("zoom")),bs(Es("flip"));const Y2={position:"top-right",transition:z2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function ti(e){let t={...Y2,...e};const n=e.stacked,[r,o]=I.useState(!0),s=I.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=B2(t),{className:l,style:f,rtl:g,containerId:y}=t;function E(h){const p=Nn("Toastify__toast-container",`Toastify__toast-container--${h}`,{"Toastify__toast-container--rtl":g});return At(l)?l({position:h,rtl:g,defaultClassName:p}):Nn(p,ms(l))}function m(){n&&(o(!0),De.play())}return Z2(()=>{if(n){var h;const p=s.current.querySelectorAll('[data-in="true"]'),b=12,x=(h=t.position)==null?void 0:h.includes("top");let C=0,w=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=C*(r?.2:1)+(r?0:b*_);A.style.setProperty("--y",`${x?S:-1*S}px`),A.style.setProperty("--g",`${b}`),A.style.setProperty("--s",""+(1-(r?w:0))),C+=A.offsetHeight,w+=.025})}},[r,c,n]),I.createElement("div",{ref:s,className:"Toastify",id:y,onMouseEnter:()=>{n&&(o(!1),De.pause())},onMouseLeave:m},a((h,p)=>{const b=p.length?{...f}:{...f,pointerEvents:"none"};return I.createElement("div",{className:E(h),style:b,key:`container-${h}`},p.map(x=>{let{content:C,props:w}=x;return I.createElement(X2,{...w,stacked:n,collapseAll:m,isIn:i(w.toastId,w.containerId),style:w.style,key:`toast-${w.key}`},C)}))}))}var Hr=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(){}},lr=typeof window>"u"||"Deno"in globalThis;function Mt(){}function J2(e,t){return typeof e=="function"?e(t):e}function ni(e){return typeof e=="number"&&e>=0&&e!==1/0}function zl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Wr(e,t){return typeof e=="function"?e(t):e}function Wt(e,t){return typeof e=="function"?e(t):e}function Yl(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==ri(a,t.options))return!1}else if(!Do(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function Jl(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ur(t.options.mutationKey)!==ur(s))return!1}else if(!Do(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function ri(e,t){return((t==null?void 0:t.queryKeyHashFn)||ur)(e)}function ur(e){return JSON.stringify(e,(t,n)=>si(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Do(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Do(e[n],t[n])):!1}function oi(e,t){if(e===t)return e;const n=ql(e)&&ql(t);if(n||si(e)&&si(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let c=0;for(let l=0;l<a;l++){const f=n?l:s[l];(!n&&r.includes(f)||n)&&e[f]===void 0&&t[f]===void 0?(i[f]=void 0,c++):(i[f]=oi(e[f],t[f]),i[f]===e[f]&&e[f]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function vs(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 ql(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function si(e){if(!Ql(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ql(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ql(e){return Object.prototype.toString.call(e)==="[object Object]"}function q2(e){return new Promise(t=>{setTimeout(t,e)})}function ai(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 oi(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 oi(e,t)}return t}function Q2(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $2(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ws=Symbol();function $l(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ws&&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===ws?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var U2=(w2=class extends Hr{constructor(){super();ue(this,Ar);ue(this,Zn);ue(this,fo);U(this,fo,t=>{if(!lr&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Zn)||this.setEventListener(F(this,fo))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Zn))==null||t.call(this),U(this,Zn,void 0))}setEventListener(t){var n;U(this,fo,t),(n=F(this,Zn))==null||n.call(this),U(this,Zn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,Ar)!==t&&(U(this,Ar,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,Ar)=="boolean"?F(this,Ar):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ar=new WeakMap,Zn=new WeakMap,fo=new WeakMap,w2),ii=new U2,K2=(I2=class extends Hr{constructor(){super();ue(this,po,!0);ue(this,Xn);ue(this,ho);U(this,ho,t=>{if(!lr&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){F(this,Xn)||this.setEventListener(F(this,ho))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Xn))==null||t.call(this),U(this,Xn,void 0))}setEventListener(t){var n;U(this,ho,t),(n=F(this,Xn))==null||n.call(this),U(this,Xn,t(this.setOnline.bind(this)))}setOnline(t){F(this,po)!==t&&(U(this,po,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,po)}},po=new WeakMap,Xn=new WeakMap,ho=new WeakMap,I2),Is=new K2;function ci(){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 eh(e){return Math.min(1e3*2**e,3e4)}function Ul(e){return(e??"online")==="online"?Is.isOnline():!0}var Kl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function li(e){return e instanceof Kl}function eu(e){let t=!1,n=0,r=!1,o;const s=ci(),a=h=>{var p;r||(y(new Kl(h)),(p=e.abort)==null||p.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>ii.isFocused()&&(e.networkMode==="always"||Is.isOnline())&&e.canRun(),f=()=>Ul(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))},E=()=>new Promise(h=>{var p;o=b=>{(r||l())&&h(b)},(p=e.onPause)==null||p.call(e)}).then(()=>{var h;o=void 0,r||(h=e.onContinue)==null||h.call(e)}),m=()=>{if(r)return;let h;const p=n===0?e.initialPromise:void 0;try{h=p??e.fn()}catch(b){h=Promise.reject(b)}Promise.resolve(h).then(g).catch(b=>{var _;if(r)return;const x=e.retry??(lr?0:3),C=e.retryDelay??eh,w=typeof C=="function"?C(n,b):C,v=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,b);if(t||!v){y(b);return}n++,(_=e.onFail)==null||_.call(e,n,b),q2(w).then(()=>l()?void 0:E()).then(()=>{t?y(b):m()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:f,start:()=>(f()?m():E().then(m),s)}}function th(){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 tt=th(),tu=(_2=class{constructor(){ue(this,Tr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ni(this.gcTime)&&U(this,Tr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(lr?1/0:5*60*1e3))}clearGcTimeout(){F(this,Tr)&&(clearTimeout(F(this,Tr)),U(this,Tr,void 0))}},Tr=new WeakMap,_2),nh=(S2=class extends tu{constructor(t){super();ue(this,tn);ue(this,go);ue(this,mo);ue(this,jt);ue(this,Lr);ue(this,ft);ue(this,is);ue(this,Or);U(this,Or,!1),U(this,is,t.defaultOptions),this.setOptions(t.options),this.observers=[],U(this,Lr,t.client),U(this,jt,F(this,Lr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,U(this,go,rh(this.options)),this.state=t.state??F(this,go),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,ft))==null?void 0:t.promise}setOptions(t){this.options={...F(this,is),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,jt).remove(this)}setData(t,n){const r=ai(this.state.data,t,this.options);return be(this,tn,Dn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){be(this,tn,Dn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,ft))==null?void 0:r.promise;return(o=F(this,ft))==null||o.cancel(t),n?n.then(Mt).catch(Mt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,go))}isActive(){return this.observers.some(t=>Wt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ws||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||!zl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,ft))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,ft))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(F(this,ft)&&(F(this,Or)?F(this,ft).cancel({revert:!0}):F(this,ft).cancelRetry()),this.scheduleGc()),F(this,jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||be(this,tn,Dn).call(this,{type:"invalidate"})}fetch(t,n){var c,l,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,ft))return F(this,ft).continueRetry(),F(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:()=>(U(this,Or,!0),r.signal)})},s=()=>{const g=$l(this.options,n),y={client:F(this,Lr),queryKey:this.queryKey,meta:this.meta};return o(y),U(this,Or,!1),this.options.persister?this.options.persister(g,y,this):g(y)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,Lr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),U(this,mo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&be(this,tn,Dn).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const i=g=>{var y,E,m,h;li(g)&&g.silent||be(this,tn,Dn).call(this,{type:"error",error:g}),li(g)||((E=(y=F(this,jt).config).onError)==null||E.call(y,g,this),(h=(m=F(this,jt).config).onSettled)==null||h.call(m,this.state.data,g,this)),this.scheduleGc()};return U(this,ft,eu({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var y,E,m,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}(E=(y=F(this,jt).config).onSuccess)==null||E.call(y,g,this),(h=(m=F(this,jt).config).onSettled)==null||h.call(m,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,y)=>{be(this,tn,Dn).call(this,{type:"failed",failureCount:g,error:y})},onPause:()=>{be(this,tn,Dn).call(this,{type:"pause"})},onContinue:()=>{be(this,tn,Dn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,ft).start()}},go=new WeakMap,mo=new WeakMap,jt=new WeakMap,Lr=new WeakMap,ft=new WeakMap,is=new WeakMap,Or=new WeakMap,tn=new WeakSet,Dn=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,...nu(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 li(o)&&o.revert&&F(this,mo)?{...F(this,mo),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),tt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,jt).notify({query:this,type:"updated",action:t})})},S2);function nu(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ul(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function rh(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 oh=(A2=class extends Hr{constructor(t={}){super();ue(this,hn);this.config=t,U(this,hn,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??ri(o,n);let a=this.get(s);return a||(a=new nh({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,hn).has(t.queryHash)||(F(this,hn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,hn).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,hn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,hn).get(t)}getAll(){return[...F(this,hn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Yl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Yl(t,r)):n}notify(t){tt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},hn=new WeakMap,A2),sh=(T2=class extends tu{constructor(t){super();ue(this,mn);ue(this,gn);ue(this,ht);ue(this,Fr);this.mutationId=t.mutationId,U(this,ht,t.mutationCache),U(this,gn,[]),this.state=t.state||ru(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){F(this,gn).includes(t)||(F(this,gn).push(t),this.clearGcTimeout(),F(this,ht).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){U(this,gn,F(this,gn).filter(n=>n!==t)),this.scheduleGc(),F(this,ht).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,gn).length||(this.state.status==="pending"?this.scheduleGc():F(this,ht).remove(this))}continue(){var t;return((t=F(this,Fr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,f,g,y,E,m,h,p,b,x,C,w,v,_,A;U(this,Fr,eu({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{be(this,mn,ir).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{be(this,mn,ir).call(this,{type:"pause"})},onContinue:()=>{be(this,mn,ir).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ht).canRun(this)}));const n=this.state.status==="pending",r=!F(this,Fr).canStart();try{if(!n){be(this,mn,ir).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,ht).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&be(this,mn,ir).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,Fr).start();return await((l=(c=F(this,ht).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((g=(f=this.options).onSuccess)==null?void 0:g.call(f,S,t,this.state.context)),await((E=(y=F(this,ht).config).onSettled)==null?void 0:E.call(y,S,null,this.state.variables,this.state.context,this)),await((h=(m=this.options).onSettled)==null?void 0:h.call(m,S,null,t,this.state.context)),be(this,mn,ir).call(this,{type:"success",data:S}),S}catch(S){try{throw await((b=(p=F(this,ht).config).onError)==null?void 0:b.call(p,S,t,this.state.context,this)),await((C=(x=this.options).onError)==null?void 0:C.call(x,S,t,this.state.context)),await((v=(w=F(this,ht).config).onSettled)==null?void 0:v.call(w,void 0,S,this.state.variables,this.state.context,this)),await((A=(_=this.options).onSettled)==null?void 0:A.call(_,void 0,S,t,this.state.context)),S}finally{be(this,mn,ir).call(this,{type:"error",error:S})}}finally{F(this,ht).runNext(this)}}},gn=new WeakMap,ht=new WeakMap,Fr=new WeakMap,mn=new WeakSet,ir=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),tt.batch(()=>{F(this,gn).forEach(r=>{r.onMutationUpdate(t)}),F(this,ht).notify({mutation:this,type:"updated",action:t})})},T2);function ru(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ah=(L2=class extends Hr{constructor(t={}){super();ue(this,_n);ue(this,nn);ue(this,cs);this.config=t,U(this,_n,new Set),U(this,nn,new Map),U(this,cs,0)}build(t,n,r){const o=new sh({mutationCache:this,mutationId:++Ja(this,cs)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,_n).add(t);const n=_s(t);if(typeof n=="string"){const r=F(this,nn).get(n);r?r.push(t):F(this,nn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,_n).delete(t)){const n=_s(t);if(typeof n=="string"){const r=F(this,nn).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&F(this,nn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_s(t);if(typeof n=="string"){const r=F(this,nn).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=_s(t);if(typeof n=="string"){const o=(r=F(this,nn).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(){tt.batch(()=>{F(this,_n).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,_n).clear(),F(this,nn).clear()})}getAll(){return Array.from(F(this,_n))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Jl(n,r))}findAll(t={}){return this.getAll().filter(n=>Jl(t,n))}notify(t){tt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return tt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Mt))))}},_n=new WeakMap,nn=new WeakMap,cs=new WeakMap,L2);function _s(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ss(e){return{onFetch:(t,n)=>{var f,g,y,E,m;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=((E=t.state.data)==null?void 0:E.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let h=!1;const p=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},b=$l(t.options,t.fetchOptions),x=async(C,w,v)=>{if(h)return Promise.reject();if(w==null&&C.pages.length)return Promise.resolve(C);const _={client:t.client,queryKey:t.queryKey,pageParam:w,direction:v?"backward":"forward",meta:t.options.meta};p(_);const A=await b(_),{maxPages:S}=t.options,L=v?$2:Q2;return{pages:L(C.pages,A,S),pageParams:L(C.pageParams,w,S)}};if(o&&s.length){const C=o==="backward",w=C?ou:ui,v={pages:s,pageParams:a},_=w(r,v);i=await x(v,_,C)}else{const C=e??s.length;do{const w=c===0?a[0]??r.initialPageParam:ui(r,i);if(c>0&&w==null)break;i=await x(i,w),c++}while(c<C)}return i};t.options.persister?t.fetchFn=()=>{var h,p;return(p=(h=t.options).persister)==null?void 0:p.call(h,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function ui(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 ih(e,t){return t?ui(e,t)!=null:!1}function ch(e,t){return!t||!e.getPreviousPageParam?!1:ou(e,t)!=null}var lh=(O2=class{constructor(e={}){ue(this,Ye);ue(this,zn);ue(this,Yn);ue(this,bo);ue(this,yo);ue(this,Jn);ue(this,xo);ue(this,Co);U(this,Ye,e.queryCache||new oh),U(this,zn,e.mutationCache||new ah),U(this,Yn,e.defaultOptions||{}),U(this,bo,new Map),U(this,yo,new Map),U(this,Jn,0)}mount(){Ja(this,Jn)._++,F(this,Jn)===1&&(U(this,xo,ii.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ye).onFocus())})),U(this,Co,Is.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ye).onOnline())})))}unmount(){var e,t;Ja(this,Jn)._--,F(this,Jn)===0&&((e=F(this,xo))==null||e.call(this),U(this,xo,void 0),(t=F(this,Co))==null||t.call(this),U(this,Co,void 0))}isFetching(e){return F(this,Ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,zn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Ye).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Ye).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Wr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Ye).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=F(this,Ye).get(r.queryHash),s=o==null?void 0:o.state.data,a=J2(t,s);if(a!==void 0)return F(this,Ye).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return tt.batch(()=>F(this,Ye).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Ye).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Ye);tt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Ye);return tt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=tt.batch(()=>F(this,Ye).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Mt).catch(Mt)}invalidateQueries(e,t={}){return tt.batch(()=>(F(this,Ye).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=tt.batch(()=>F(this,Ye).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Mt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Mt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Ye).build(this,t);return n.isStaleByTime(Wr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Mt).catch(Mt)}fetchInfiniteQuery(e){return e.behavior=Ss(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Mt).catch(Mt)}ensureInfiniteQueryData(e){return e.behavior=Ss(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Is.isOnline()?F(this,zn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Ye)}getMutationCache(){return F(this,zn)}getDefaultOptions(){return F(this,Yn)}setDefaultOptions(e){U(this,Yn,e)}setQueryDefaults(e,t){F(this,bo).set(ur(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,bo).values()],n={};return t.forEach(r=>{Do(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,yo).set(ur(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,yo).values()],n={};return t.forEach(r=>{Do(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Yn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ri(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===ws&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Yn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Ye).clear(),F(this,zn).clear()}},Ye=new WeakMap,zn=new WeakMap,Yn=new WeakMap,bo=new WeakMap,yo=new WeakMap,Jn=new WeakMap,xo=new WeakMap,Co=new WeakMap,O2),su=(F2=class extends Hr{constructor(t,n){super();ue(this,Me);ue(this,It);ue(this,_e);ue(this,ls);ue(this,gt);ue(this,kr);ue(this,Eo);ue(this,qn);ue(this,bn);ue(this,us);ue(this,vo);ue(this,wo);ue(this,Dr);ue(this,Nr);ue(this,Qn);ue(this,Io,new Set);this.options=n,U(this,It,t),U(this,bn,null),U(this,qn,ci()),this.options.experimental_prefetchInRender||F(this,qn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(F(this,_e).addObserver(this),au(F(this,_e),this.options)?be(this,Me,hs).call(this):this.updateResult(),be(this,Me,kl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return di(F(this,_e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return di(F(this,_e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,be(this,Me,Dl).call(this),be(this,Me,Nl).call(this),F(this,_e).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,_e);if(this.options=F(this,It).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Wt(this.options.enabled,F(this,_e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");be(this,Me,Rl).call(this),F(this,_e).setOptions(this.options),r._defaulted&&!vs(this.options,r)&&F(this,It).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,_e),observer:this});const s=this.hasListeners();s&&iu(F(this,_e),o,this.options,r)&&be(this,Me,hs).call(this),this.updateResult(n),s&&(F(this,_e)!==o||Wt(this.options.enabled,F(this,_e))!==Wt(r.enabled,F(this,_e))||Wr(this.options.staleTime,F(this,_e))!==Wr(r.staleTime,F(this,_e)))&&be(this,Me,Ll).call(this);const a=be(this,Me,Ol).call(this);s&&(F(this,_e)!==o||Wt(this.options.enabled,F(this,_e))!==Wt(r.enabled,F(this,_e))||a!==F(this,Qn))&&be(this,Me,Fl).call(this,a)}getOptimisticResult(t){const n=F(this,It).getQueryCache().build(F(this,It),t),r=this.createResult(n,t);return dh(this,r)&&(U(this,gt,r),U(this,Eo,this.options),U(this,kr,F(this,_e).state)),r}getCurrentResult(){return F(this,gt)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,Io).add(t)}getCurrentQuery(){return F(this,_e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,It).defaultQueryOptions(t),r=F(this,It).getQueryCache().build(F(this,It),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return be(this,Me,hs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,gt)))}createResult(t,n){var S;const r=F(this,_e),o=this.options,s=F(this,gt),a=F(this,kr),i=F(this,Eo),l=t!==r?t.state:F(this,ls),{state:f}=t;let g={...f},y=!1,E;if(n._optimisticResults){const L=this.hasListeners(),N=!L&&au(t,n),D=L&&iu(t,r,n,o);(N||D)&&(g={...g,...nu(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:m,errorUpdatedAt:h,status:p}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===F(this,us))E=F(this,vo);else try{U(this,us,n.select),E=n.select(g.data),E=ai(s==null?void 0:s.data,E,n),U(this,vo,E),U(this,bn,null)}catch(L){U(this,bn,L)}else E=g.data;if(n.placeholderData!==void 0&&E===void 0&&p==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,wo))==null?void 0:S.state.data,F(this,wo)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),U(this,bn,null)}catch(N){U(this,bn,N)}L!==void 0&&(p="success",E=ai(s==null?void 0:s.data,L,n),y=!0)}F(this,bn)&&(m=F(this,bn),E=F(this,vo),h=Date.now(),p="error");const b=g.fetchStatus==="fetching",x=p==="pending",C=p==="error",w=x&&b,v=E!==void 0,A={status:p,fetchStatus:g.fetchStatus,isPending:x,isSuccess:p==="success",isError:C,isInitialLoading:w,isLoading:w,data:E,dataUpdatedAt:g.dataUpdatedAt,error:m,errorUpdatedAt:h,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>l.dataUpdateCount||g.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:C&&!v,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:C&&v,isStale:fi(t,n),refetch:this.refetch,promise:F(this,qn)};if(this.options.experimental_prefetchInRender){const L=k=>{A.status==="error"?k.reject(A.error):A.data!==void 0&&k.resolve(A.data)},N=()=>{const k=U(this,qn,A.promise=ci());L(k)},D=F(this,qn);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=F(this,gt),r=this.createResult(F(this,_e),this.options);if(U(this,kr,F(this,_e).state),U(this,Eo,this.options),F(this,kr).data!==void 0&&U(this,wo,F(this,_e)),vs(r,n))return;U(this,gt,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,Io).size)return!0;const c=new Set(i??F(this,Io));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,gt)).some(l=>{const f=l;return F(this,gt)[f]!==n[f]&&c.has(f)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),be(this,Me,N2).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&be(this,Me,kl).call(this)}},It=new WeakMap,_e=new WeakMap,ls=new WeakMap,gt=new WeakMap,kr=new WeakMap,Eo=new WeakMap,qn=new WeakMap,bn=new WeakMap,us=new WeakMap,vo=new WeakMap,wo=new WeakMap,Dr=new WeakMap,Nr=new WeakMap,Qn=new WeakMap,Io=new WeakMap,Me=new WeakSet,hs=function(t){be(this,Me,Rl).call(this);let n=F(this,_e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Mt)),n},Ll=function(){be(this,Me,Dl).call(this);const t=Wr(this.options.staleTime,F(this,_e));if(lr||F(this,gt).isStale||!ni(t))return;const r=zl(F(this,gt).dataUpdatedAt,t)+1;U(this,Dr,setTimeout(()=>{F(this,gt).isStale||this.updateResult()},r))},Ol=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,_e)):this.options.refetchInterval)??!1},Fl=function(t){be(this,Me,Nl).call(this),U(this,Qn,t),!(lr||Wt(this.options.enabled,F(this,_e))===!1||!ni(F(this,Qn))||F(this,Qn)===0)&&U(this,Nr,setInterval(()=>{(this.options.refetchIntervalInBackground||ii.isFocused())&&be(this,Me,hs).call(this)},F(this,Qn)))},kl=function(){be(this,Me,Ll).call(this),be(this,Me,Fl).call(this,be(this,Me,Ol).call(this))},Dl=function(){F(this,Dr)&&(clearTimeout(F(this,Dr)),U(this,Dr,void 0))},Nl=function(){F(this,Nr)&&(clearInterval(F(this,Nr)),U(this,Nr,void 0))},Rl=function(){const t=F(this,It).getQueryCache().build(F(this,It),this.options);if(t===F(this,_e))return;const n=F(this,_e);U(this,_e,t),U(this,ls,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},N2=function(t){tt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,gt))}),F(this,It).getQueryCache().notify({query:F(this,_e),type:"observerResultsUpdated"})})},F2);function uh(e,t){return Wt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function au(e,t){return uh(e,t)||e.state.data!==void 0&&di(e,t,t.refetchOnMount)}function di(e,t,n){if(Wt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&fi(e,t)}return!1}function iu(e,t,n,r){return(e!==t||Wt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&fi(e,n)}function fi(e,t){return Wt(t.enabled,e)!==!1&&e.isStaleByTime(Wr(t.staleTime,e))}function dh(e,t){return!vs(e.getCurrentResult(),t)}var fh=class extends su{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:Ss()},t)}getOptimisticResult(e){return e.behavior=Ss(),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 m,h;const{state:n}=e,r=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:a,isRefetchError:i}=r,c=(h=(m=n.fetchMeta)==null?void 0:m.fetchMore)==null?void 0:h.direction,l=a&&c==="forward",f=o&&c==="forward",g=a&&c==="backward",y=o&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ih(t,n.data),hasPreviousPage:ch(t,n.data),isFetchNextPageError:l,isFetchingNextPage:f,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:i&&!l&&!g,isRefetching:s&&!f&&!y}}},ph=(k2=class extends Hr{constructor(n,r){super();ue(this,An);ue(this,$n);ue(this,Un);ue(this,_t);ue(this,Sn);U(this,$n,n),this.setOptions(r),this.bindMethods(),be(this,An,qa).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=F(this,$n).defaultMutationOptions(n),vs(this.options,r)||F(this,$n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,_t),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ur(r.mutationKey)!==ur(this.options.mutationKey)?this.reset():((o=F(this,_t))==null?void 0:o.state.status)==="pending"&&F(this,_t).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,_t))==null||n.removeObserver(this)}onMutationUpdate(n){be(this,An,qa).call(this),be(this,An,Ml).call(this,n)}getCurrentResult(){return F(this,Un)}reset(){var n;(n=F(this,_t))==null||n.removeObserver(this),U(this,_t,void 0),be(this,An,qa).call(this),be(this,An,Ml).call(this)}mutate(n,r){var o;return U(this,Sn,r),(o=F(this,_t))==null||o.removeObserver(this),U(this,_t,F(this,$n).getMutationCache().build(F(this,$n),this.options)),F(this,_t).addObserver(this),F(this,_t).execute(n)}},$n=new WeakMap,Un=new WeakMap,_t=new WeakMap,Sn=new WeakMap,An=new WeakSet,qa=function(){var r;const n=((r=F(this,_t))==null?void 0:r.state)??ru();U(this,Un,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ml=function(n){tt.batch(()=>{var r,o,s,a,i,c,l,f;if(F(this,Sn)&&this.hasListeners()){const g=F(this,Un).variables,y=F(this,Un).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,Sn)).onSuccess)==null||o.call(r,n.data,g,y),(a=(s=F(this,Sn)).onSettled)==null||a.call(s,n.data,null,g,y)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,Sn)).onError)==null||c.call(i,n.error,g,y),(f=(l=F(this,Sn)).onSettled)==null||f.call(l,void 0,n.error,g,y))}this.listeners.forEach(g=>{g(F(this,Un))})})},k2),cu=T.createContext(void 0),Zr=e=>{const t=T.useContext(cu);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hh=({client:e,children:t})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(cu.Provider,{value:e,children:t})),lu=T.createContext(!1),gh=()=>T.useContext(lu);lu.Provider;function mh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bh=T.createContext(mh()),yh=()=>T.useContext(bh);function uu(e,t){return typeof e=="function"?e(...t):!!e}function pi(){}var xh=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ch=e=>{T.useEffect(()=>{e.clearReset()},[e])},Eh=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||uu(n,[e.error,r])),vh=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)))},wh=(e,t)=>e.isLoading&&e.isFetching&&!t,Ih=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,du=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function fu(e,t,n){var g,y,E,m,h;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Zr(),o=gh(),s=yh(),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",vh(a),xh(a,s),Ch(s);const i=!r.getQueryCache().get(a.queryHash),[c]=T.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),f=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(p=>{const b=f?c.subscribe(tt.batchCalls(p)):pi;return c.updateResult(),b},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),Ih(a,l))throw du(a,c,s);if(Eh({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((m=(E=r.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||m.call(E,a,l),a.experimental_prefetchInRender&&!lr&&wh(l,o)){const p=i?du(a,c,s):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;p==null||p.catch(pi).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Zt(e,t){return fu(e,su)}function Xt(e,t){const n=Zr(),[r]=T.useState(()=>new ph(n,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const o=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(tt.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=T.useCallback((a,i)=>{r.mutate(a,i).catch(pi)},[r]);if(o.error&&uu(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function _h(e,t){return fu(e,fh)}const hi=(e,t)=>t.some(n=>e instanceof n);let pu,hu;function Sh(){return pu||(pu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Ah(){return hu||(hu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const gi=new WeakMap,mi=new WeakMap,As=new WeakMap;function Th(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(dr(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return As.set(t,e),t}function Lh(e){if(gi.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)});gi.set(e,t)}let bi={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return gi.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return dr(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 gu(e){bi=e(bi)}function Oh(e){return Ah().includes(e)?function(...t){return e.apply(yi(this),t),dr(this.request)}:function(...t){return dr(e.apply(yi(this),t))}}function Fh(e){return typeof e=="function"?Oh(e):(e instanceof IDBTransaction&&Lh(e),hi(e,Sh())?new Proxy(e,bi):e)}function dr(e){if(e instanceof IDBRequest)return Th(e);if(mi.has(e))return mi.get(e);const t=Fh(e);return t!==e&&(mi.set(e,t),As.set(t,e)),t}const yi=e=>As.get(e);function kh(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=dr(a);return r&&a.addEventListener("upgradeneeded",c=>{r(dr(a.result),c.oldVersion,c.newVersion,dr(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const Dh=["get","getKey","getAll","getAllKeys","count"],Nh=["put","add","delete","clear"],xi=new Map;function mu(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(xi.get(t))return xi.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Nh.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||Dh.includes(n)))return;const s=async function(a,...i){const c=this.transaction(a,o?"readwrite":"readonly");let l=c.store;return r&&(l=l.index(i.shift())),(await Promise.all([l[n](...i),o&&c.done]))[0]};return xi.set(t,s),s}gu(e=>({...e,get:(t,n,r)=>mu(t,n)||e.get(t,n,r),has:(t,n)=>!!mu(t,n)||e.has(t,n)}));const Rh=["continue","continuePrimaryKey","advance"],bu={},Ci=new WeakMap,yu=new WeakMap,Mh={get(e,t){if(!Rh.includes(t))return e[t];let n=bu[t];return n||(n=bu[t]=function(...r){Ci.set(this,yu.get(this)[t](...r))}),n}};async function*Ph(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,Mh);for(yu.set(n,t),As.set(n,yi(t));t;)yield n,t=await(Ci.get(n)||t.continue()),Ci.delete(n)}function xu(e,t){return t===Symbol.asyncIterator&&hi(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&hi(e,[IDBIndex,IDBObjectStore])}gu(e=>({...e,get(t,n,r){return xu(t,n)?Ph:e.get(t,n,r)},has(t,n){return xu(t,n)||e.has(t,n)}}));const jh="connector-db",Bh=1,Ts={FEEDBACK:"feedback"},No=`${Ts.FEEDBACK}:data`,Ls=`${Ts.FEEDBACK}:last_submitted`,Ro=`${Ts.FEEDBACK}:capture_on_demand`,Mo=`${Ts.FEEDBACK}:show_notification`,Vh=12*60*60*1e3,Ei=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=Vh:!0,Cu=(e,t=!1)=>e.captureFeedback&&(Ei(e.firstViewed)&&(!e.lastSubmittedFeedback||Ei(e.lastSubmittedFeedback))||!!t);let fr=null;const Rn=async()=>{try{fr||(fr=await kh(jh,Bh,{upgrade(e){e.objectStoreNames.contains(No)||e.createObjectStore(No),e.objectStoreNames.contains(Ls)||e.createObjectStore(Ls),e.objectStoreNames.contains(Ro)||e.createObjectStore(Ro),e.objectStoreNames.contains(Mo)||e.createObjectStore(Mo)},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."),fr&&(fr.close(),fr=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),fr=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return fr},vi=async e=>{if(!e)return[];const t=await Rn();if(!t)return[];try{return await t.get(No,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},Gh=async e=>{if(!e)return null;const t=await Rn();if(!t)return null;try{return await t.get(Ls,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},Os=async e=>{if(!e)return;const t=await Rn();if(t)try{return await t.get(Ro,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},Hh=async e=>{if(!e)return!1;const t=await Rn();if(!t)return!1;try{return await t.get(Mo,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},Wh=async(e,t)=>{if(!e||!t||!t.length)return;const n=await Rn();if(n)try{const r=await vi(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(No,a,e),await n.put(Mo,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},Zh=async e=>{if(!e)return;const t=await Rn();if(t)try{const n=await vi(e),r=await Os(e),o=new Date,s=n.map(a=>{const i=Cu(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(No,s,e),await t.put(Ls,o,e),r&&await t.put(Ro,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},Eu=async(e,t)=>{if(!e)return;const n=await Rn();if(n)try{await n.put(Ro,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},Xh=async e=>{if(!e)return;const t=await Rn();if(t)try{await t.put(Mo,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},zh=async e=>{const t=await vi(e),n=await Os(e);return t.filter(o=>Cu(o,n))},wi=async e=>{const t=await Gh(e);return t&&!Ei(t)?!1:await Os(e)&&!t?!0:!!(await zh(e)).length},Yh=async(e,t)=>{await Wh(e,t)},Fs=async e=>{e&&await Zh(e)},Jh=async(e,t)=>{const n=await Os(e);t?n!==!1&&await Eu(e,t):await Eu(e,void 0)},vu=async e=>await Hh(e)&&await wi(e),wu=async e=>{await Xh(e)};var Ii={},pr={};function Iu(e,t){return function(){return e.apply(t,arguments)}}const{toString:qh}=Object.prototype,{getPrototypeOf:_i}=Object,ks=(e=>t=>{const n=qh.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zt=e=>(e=e.toLowerCase(),t=>ks(t)===e),Ds=e=>t=>typeof t===e,{isArray:Xr}=Array,Po=Ds("undefined");function Qh(e){return e!==null&&!Po(e)&&e.constructor!==null&&!Po(e.constructor)&&Tt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _u=zt("ArrayBuffer");function $h(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_u(e.buffer),t}const Uh=Ds("string"),Tt=Ds("function"),Su=Ds("number"),Ns=e=>e!==null&&typeof e=="object",Kh=e=>e===!0||e===!1,Rs=e=>{if(ks(e)!=="object")return!1;const t=_i(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},eg=zt("Date"),tg=zt("File"),ng=zt("Blob"),rg=zt("FileList"),og=e=>Ns(e)&&Tt(e.pipe),sg=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tt(e.append)&&((t=ks(e))==="formdata"||t==="object"&&Tt(e.toString)&&e.toString()==="[object FormData]"))},ag=zt("URLSearchParams"),[ig,cg,lg,ug]=["ReadableStream","Request","Response","Headers"].map(zt),dg=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]),Xr(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 Au(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 hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:pe,Tu=e=>!Po(e)&&e!==hr;function Si(){const{caseless:e}=Tu(this)&&this||{},t={},n=(r,o)=>{const s=e&&Au(t,o)||o;Rs(t[s])&&Rs(r)?t[s]=Si(t[s],r):Rs(r)?t[s]=Si({},r):Xr(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 fg=(e,t,n,{allOwnKeys:r}={})=>(jo(t,(o,s)=>{n&&Tt(o)?e[s]=Iu(o,n):e[s]=o},{allOwnKeys:r}),e),pg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hg=(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)},gg=(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&&_i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},mg=(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},bg=e=>{if(!e)return null;if(Xr(e))return e;let t=e.length;if(!Su(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_i(Uint8Array)),xg=(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])}},Cg=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Eg=zt("HTMLFormElement"),vg=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Lu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wg=zt("RegExp"),Ou=(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)},Ig=e=>{Ou(e,(t,n)=>{if(Tt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Tt(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+"'")})}})},_g=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Xr(e)?r(e):r(String(e).split(t)),n},Sg=()=>{},Ag=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Ai="abcdefghijklmnopqrstuvwxyz",Fu="0123456789",ku={DIGIT:Fu,ALPHA:Ai,ALPHA_DIGIT:Ai+Ai.toUpperCase()+Fu},Tg=(e=16,t=ku.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Lg(e){return!!(e&&Tt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Og=e=>{const t=new Array(10),n=(r,o)=>{if(Ns(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=Xr(r)?[]:{};return jo(r,(a,i)=>{const c=n(a,o+1);!Po(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},Fg=zt("AsyncFunction"),kg=e=>e&&(Ns(e)||Tt(e))&&Tt(e.then)&&Tt(e.catch),Du=((e,t)=>e?setImmediate:t?((n,r)=>(hr.addEventListener("message",({source:o,data:s})=>{o===hr&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),hr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tt(hr.postMessage)),Dg=typeof queueMicrotask<"u"?queueMicrotask.bind(hr):typeof process<"u"&&process.nextTick||Du;var j={isArray:Xr,isArrayBuffer:_u,isBuffer:Qh,isFormData:sg,isArrayBufferView:$h,isString:Uh,isNumber:Su,isBoolean:Kh,isObject:Ns,isPlainObject:Rs,isReadableStream:ig,isRequest:cg,isResponse:lg,isHeaders:ug,isUndefined:Po,isDate:eg,isFile:tg,isBlob:ng,isRegExp:wg,isFunction:Tt,isStream:og,isURLSearchParams:ag,isTypedArray:yg,isFileList:rg,forEach:jo,merge:Si,extend:fg,trim:dg,stripBOM:pg,inherits:hg,toFlatObject:gg,kindOf:ks,kindOfTest:zt,endsWith:mg,toArray:bg,forEachEntry:xg,matchAll:Cg,isHTMLForm:Eg,hasOwnProperty:Lu,hasOwnProp:Lu,reduceDescriptors:Ou,freezeMethods:Ig,toObjectSet:_g,toCamelCase:vg,noop:Sg,toFiniteNumber:Ag,findKey:Au,global:hr,isContextDefined:Tu,ALPHABET:ku,generateString:Tg,isSpecCompliantForm:Lg,toJSONObject:Og,isAsyncFn:Fg,isThenable:kg,setImmediate:Du,asap:Dg};function ge(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)}j.inherits(ge,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:j.toJSONObject(this.config),code:this.code,status:this.status}}});const Nu=ge.prototype,Ru={};["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=>{Ru[e]={value:e}}),Object.defineProperties(ge,Ru),Object.defineProperty(Nu,"isAxiosError",{value:!0}),ge.from=(e,t,n,r,o,s)=>{const a=Object.create(Nu);return j.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),ge.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var Ng=null;function Ti(e){return j.isPlainObject(e)||j.isArray(e)}function Mu(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function Pu(e,t,n){return e?e.concat(t).map(function(o,s){return o=Mu(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Rg(e){return j.isArray(e)&&!e.some(Ti)}const Mg=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function Ms(e,t,n){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=j.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,p){return!j.isUndefined(p[h])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&j.isSpecCompliantForm(t);if(!j.isFunction(o))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(j.isDate(m))return m.toISOString();if(!c&&j.isBlob(m))throw new ge("Blob is not supported. Use a Buffer instead.");return j.isArrayBuffer(m)||j.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,h,p){let b=m;if(m&&!p&&typeof m=="object"){if(j.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(j.isArray(m)&&Rg(m)||(j.isFileList(m)||j.endsWith(h,"[]"))&&(b=j.toArray(m)))return h=Mu(h),b.forEach(function(C,w){!(j.isUndefined(C)||C===null)&&t.append(a===!0?Pu([h],w,s):a===null?h:h+"[]",l(C))}),!1}return Ti(m)?!0:(t.append(Pu(p,h,s),l(m)),!1)}const g=[],y=Object.assign(Mg,{defaultVisitor:f,convertValue:l,isVisitable:Ti});function E(m,h){if(!j.isUndefined(m)){if(g.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));g.push(m),j.forEach(m,function(b,x){(!(j.isUndefined(b)||b===null)&&o.call(t,b,j.isString(x)?x.trim():x,h,y))===!0&&E(b,h?h.concat(x):[x])}),g.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return E(e),t}function ju(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Li(e,t){this._pairs=[],e&&Ms(e,this,t)}const Bu=Li.prototype;Bu.append=function(t,n){this._pairs.push([t,n])},Bu.toString=function(t){const n=t?function(r){return t.call(this,r,ju)}:ju;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Pg(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vu(e,t,n){if(!t)return e;const r=n&&n.encode||Pg,o=n&&n.serialize;let s;if(o?s=o(t,n):s=j.isURLSearchParams(t)?t.toString():new Li(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class jg{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){j.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Gu=jg,Hu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bg=typeof URLSearchParams<"u"?URLSearchParams:Li,Vg=typeof FormData<"u"?FormData:null,Gg=typeof Blob<"u"?Blob:null,Hg={isBrowser:!0,classes:{URLSearchParams:Bg,FormData:Vg,Blob:Gg},protocols:["http","https","file","blob","url","data"]};const Oi=typeof window<"u"&&typeof document<"u",Fi=typeof navigator=="object"&&navigator||void 0,Wg=Oi&&(!Fi||["ReactNative","NativeScript","NS"].indexOf(Fi.product)<0),Zg=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Xg=Oi&&window.location.href||"http://localhost";var zg=Object.freeze({__proto__:null,hasBrowserEnv:Oi,hasStandardBrowserWebWorkerEnv:Zg,hasStandardBrowserEnv:Wg,navigator:Fi,origin:Xg}),yt={...zg,...Hg};function Yg(e,t){return Ms(e,new yt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return yt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Jg(e){return j.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qg(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 Wu(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&&j.isArray(o)?o.length:a,c?(j.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!j.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&j.isArray(o[a])&&(o[a]=qg(o[a])),!i)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,(r,o)=>{t(Jg(r),o,n,0)}),n}return null}function Qg(e,t,n){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ki={transitional:Hu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=j.isObject(t);if(s&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Wu(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Yg(t,this.formSerializer).toString();if((i=j.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ms(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),Qg(t)):t}],transformResponse:[function(t){const n=this.transitional||ki.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.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"?ge.from(i,ge.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:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(["delete","get","head","post","put","patch"],e=>{ki.headers[e]={}});var Di=ki;const $g=j.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 Ug=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]&&$g[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const Zu=Symbol("internals");function Bo(e){return e&&String(e).trim().toLowerCase()}function Ps(e){return e===!1||e==null?e:j.isArray(e)?e.map(Ps):String(e)}function Kg(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 em=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ni(e,t,n,r,o){if(j.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!j.isString(t)){if(j.isString(r))return t.indexOf(r)!==-1;if(j.isRegExp(r))return r.test(t)}}function tm(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function nm(e,t){const n=j.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 js{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const f=Bo(c);if(!f)throw new Error("header name must be a non-empty string");const g=j.findKey(o,f);(!g||o[g]===void 0||l===!0||l===void 0&&o[g]!==!1)&&(o[g||c]=Ps(i))}const a=(i,c)=>j.forEach(i,(l,f)=>s(l,f,c));if(j.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(j.isString(t)&&(t=t.trim())&&!em(t))a(Ug(t),n);else if(j.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=Bo(t),t){const r=j.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Kg(o);if(j.isFunction(n))return n.call(this,o,r);if(j.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Bo(t),t){const r=j.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ni(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=Bo(a),a){const i=j.findKey(r,a);i&&(!n||Ni(r,r[i],i,n))&&(delete r[i],o=!0)}}return j.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||Ni(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return j.forEach(this,(o,s)=>{const a=j.findKey(r,s);if(a){n[a]=Ps(o),delete n[s];return}const i=t?tm(s):String(s).trim();i!==s&&delete n[s],n[i]=Ps(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return j.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&j.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[Zu]=this[Zu]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=Bo(a);r[i]||(nm(o,a),r[i]=!0)}return j.isArray(t)?t.forEach(s):s(t),this}}js.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(js.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),j.freezeMethods(js);var Yt=js;function Ri(e,t){const n=this||Di,r=t||n,o=Yt.from(r.headers);let s=r.data;return j.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Xu(e){return!!(e&&e.__CANCEL__)}function zr(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}j.inherits(zr,ge,{__CANCEL__:!0});function zu(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function rm(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function om(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[s];a||(a=l),n[o]=c,r[o]=l;let g=s,y=0;for(;g!==o;)y+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const E=f&&l-f;return E?Math.round(y*1e3/E):void 0}}function sm(e,t){let n=0,r=1e3/t,o,s;const a=(l,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const f=Date.now(),g=f-n;g>=r?a(l,f):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const Bs=(e,t,n=3)=>{let r=0;const o=om(50,250);return sm(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),f=a<=i;r=a;const g={loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i&&f?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},Yu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Ju=e=>(...t)=>j.asap(()=>e(...t));var am=yt.hasStandardBrowserEnv?function(){const t=yt.navigator&&/(msie|trident)/i.test(yt.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=j.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),im=yt.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];j.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),j.isString(r)&&a.push("path="+r),j.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 cm(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lm(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qu(e,t){return e&&!cm(t)?lm(e,t):t}const Qu=e=>e instanceof Yt?{...e}:e;function gr(e,t){t=t||{};const n={};function r(l,f,g){return j.isPlainObject(l)&&j.isPlainObject(f)?j.merge.call({caseless:g},l,f):j.isPlainObject(f)?j.merge({},f):j.isArray(f)?f.slice():f}function o(l,f,g){if(j.isUndefined(f)){if(!j.isUndefined(l))return r(void 0,l,g)}else return r(l,f,g)}function s(l,f){if(!j.isUndefined(f))return r(void 0,f)}function a(l,f){if(j.isUndefined(f)){if(!j.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function i(l,f,g){if(g in t)return r(l,f);if(g in e)return r(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(l,f)=>o(Qu(l),Qu(f),!0)};return j.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=c[f]||o,y=g(e[f],t[f],f);j.isUndefined(y)&&g!==i||(n[f]=y)}),n}var $u=e=>{const t=gr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Yt.from(a),t.url=Vu(qu(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(j.isFormData(n)){if(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(yt.hasStandardBrowserEnv&&(r&&j.isFunction(r)&&(r=r(t)),r||r!==!1&&am(t.url))){const l=o&&s&&im.read(s);l&&a.set(o,l)}return t},um=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=$u(e);let s=o.data;const a=Yt.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,f,g,y,E,m;function h(){E&&E(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(o.method.toUpperCase(),o.url,!0),p.timeout=o.timeout;function b(){if(!p)return;const C=Yt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),v={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:C,config:e,request:p};zu(function(A){n(A),h()},function(A){r(A),h()},v),p=null}"onloadend"in p?p.onloadend=b:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(b)},p.onabort=function(){p&&(r(new ge("Request aborted",ge.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new ge("Network Error",ge.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let w=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const v=o.transitional||Hu;o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),r(new ge(w,v.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,p)),p=null},s===void 0&&a.setContentType(null),"setRequestHeader"in p&&j.forEach(a.toJSON(),function(w,v){p.setRequestHeader(v,w)}),j.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),i&&i!=="json"&&(p.responseType=o.responseType),l&&([y,m]=Bs(l,!0),p.addEventListener("progress",y)),c&&p.upload&&([g,E]=Bs(c),p.upload.addEventListener("progress",g),p.upload.addEventListener("loadend",E)),(o.cancelToken||o.signal)&&(f=C=>{p&&(r(!C||C.type?new zr(null,e,p):C),p.abort(),p=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=rm(o.url);if(x&&yt.protocols.indexOf(x)===-1){r(new ge("Unsupported protocol "+x+":",ge.ERR_BAD_REQUEST,e));return}p.send(s||null)})},dm=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(l){if(!o){o=!0,i();const f=l instanceof Error?l:this.reason;r.abort(f instanceof ge?f:new zr(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new ge(`timeout ${t} of ms exceeded`,ge.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>j.asap(i),c}};const fm=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},pm=async function*(e,t){for await(const n of hm(e))yield*fm(n,t)},hm=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()}},Uu=(e,t,n,r)=>{const o=pm(e,t);let s=0,a,i=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){i(),c.close();return}let g=f.byteLength;if(n){let y=s+=g;n(y)}c.enqueue(new Uint8Array(f))}catch(l){throw i(l),l}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},Vs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ku=Vs&&typeof ReadableStream=="function",gm=Vs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ed=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mm=Ku&&ed(()=>{let e=!1;const t=new Request(yt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),td=64*1024,Mi=Ku&&ed(()=>j.isReadableStream(new Response("").body)),Gs={stream:Mi&&(e=>e.body)};Vs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Gs[t]&&(Gs[t]=j.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new ge(`Response type '${t}' is not supported`,ge.ERR_NOT_SUPPORT,r)})})})(new Response);const bm=async e=>{if(e==null)return 0;if(j.isBlob(e))return e.size;if(j.isSpecCompliantForm(e))return(await new Request(yt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(j.isArrayBufferView(e)||j.isArrayBuffer(e))return e.byteLength;if(j.isURLSearchParams(e)&&(e=e+""),j.isString(e))return(await gm(e)).byteLength},ym=async(e,t)=>{const n=j.toFiniteNumber(e.getContentLength());return n??bm(t)};var xm=Vs&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:f,withCredentials:g="same-origin",fetchOptions:y}=$u(e);l=l?(l+"").toLowerCase():"text";let E=dm([o,s&&s.toAbortSignal()],a),m;const h=E&&E.unsubscribe&&(()=>{E.unsubscribe()});let p;try{if(c&&mm&&n!=="get"&&n!=="head"&&(p=await ym(f,r))!==0){let v=new Request(t,{method:"POST",body:r,duplex:"half"}),_;if(j.isFormData(r)&&(_=v.headers.get("content-type"))&&f.setContentType(_),v.body){const[A,S]=Yu(p,Bs(Ju(c)));r=Uu(v.body,td,A,S)}}j.isString(g)||(g=g?"include":"omit");const b="credentials"in Request.prototype;m=new Request(t,{...y,signal:E,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:b?g:void 0});let x=await fetch(m);const C=Mi&&(l==="stream"||l==="response");if(Mi&&(i||C&&h)){const v={};["status","statusText","headers"].forEach(L=>{v[L]=x[L]});const _=j.toFiniteNumber(x.headers.get("content-length")),[A,S]=i&&Yu(_,Bs(Ju(i),!0))||[];x=new Response(Uu(x.body,td,A,()=>{S&&S(),h&&h()}),v)}l=l||"text";let w=await Gs[j.findKey(Gs,l)||"text"](x,e);return!C&&h&&h(),await new Promise((v,_)=>{zu(v,_,{data:w,headers:Yt.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(b){throw h&&h(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ge("Network Error",ge.ERR_NETWORK,e,m),{cause:b.cause||b}):ge.from(b,b&&b.code,e,m)}});const Pi={http:Ng,xhr:um,fetch:xm};j.forEach(Pi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nd=e=>`- ${e}`,Cm=e=>j.isFunction(e)||e===null||e===!1;var rd={getAdapter:e=>{e=j.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,!Cm(n)&&(r=Pi[(a=String(n)).toLowerCase()],r===void 0))throw new ge(`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 ge("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Pi};function ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zr(null,e)}function od(e){return ji(e),e.headers=Yt.from(e.headers),e.data=Ri.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rd.getAdapter(e.adapter||Di.adapter)(e).then(function(r){return ji(e),r.data=Ri.call(e,e.transformResponse,r),r.headers=Yt.from(r.headers),r},function(r){return Xu(r)||(ji(e),r&&r.response&&(r.response.data=Ri.call(e,e.transformResponse,r.response),r.response.headers=Yt.from(r.response.headers))),Promise.reject(r)})}const sd="1.7.7",Bi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Bi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ad={};Bi.transitional=function(t,n,r){function o(s,a){return"[Axios v"+sd+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new ge(o(a," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!ad[a]&&(ad[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
|
|
35
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=gr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Vi.assertOptions(r,{silentJSONParsing:Mn.transitional(Mn.boolean),forcedJSONParsing:Mn.transitional(Mn.boolean),clarifyTimeoutError:Mn.transitional(Mn.boolean)},!1),o!=null&&(j.isFunction(o)?n.paramsSerializer={serialize:o}:Vi.assertOptions(o,{encode:Mn.function,serialize:Mn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&j.merge(s.common,s[n.method]);s&&j.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=Yt.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let f,g=0,y;if(!c){const m=[od.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,l),y=m.length,f=Promise.resolve(n);g<y;)f=f.then(m[g++],m[g++]);return f}y=i.length;let E=n;for(g=0;g<y;){const m=i[g++],h=i[g++];try{E=m(E)}catch(p){h.call(this,p);break}}try{f=od.call(this,E)}catch(m){return Promise.reject(m)}for(g=0,y=l.length;g<y;)f=f.then(l[g++],l[g++]);return f}getUri(t){t=gr(this.defaults,t);const n=qu(t.baseURL,t.url);return Vu(n,t.params,t.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(t){Gs.prototype[t]=function(n,r){return this.request(gr(r||{},{method:t,url:n,data:(r||{}).data}))}}),j.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(gr(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Gs.prototype[t]=n(),Gs.prototype[t+"Form"]=n(!0)});var Hs=Gs;class Gi{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 zr(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 Gi(function(o){t=o}),cancel:t}}}var Em=Gi;function vm(e){return function(n){return e.apply(null,n)}}function wm(e){return j.isObject(e)&&e.isAxiosError===!0}const Hi={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(Hi).forEach(([e,t])=>{Hi[t]=e});var Im=Hi;function id(e){const t=new Hs(e),n=Iu(Hs.prototype.request,t);return j.extend(n,Hs.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return id(gr(e,o))},n}const Ue=id(Di);Ue.Axios=Hs,Ue.CanceledError=zr,Ue.CancelToken=Em,Ue.isCancel=Xu,Ue.VERSION=sd,Ue.toFormData=Rs,Ue.AxiosError=ge,Ue.Cancel=Ue.CanceledError,Ue.all=function(t){return Promise.all(t)},Ue.spread=vm,Ue.isAxiosError=wm,Ue.mergeConfig=gr,Ue.AxiosHeaders=Yt,Ue.formToJSON=e=>Wu(j.isHTMLForm(e)?new FormData(e):e),Ue.getAdapter=rd.getAdapter,Ue.HttpStatusCode=Im,Ue.default=Ue;var cd=Ue,Le={},Pn={};(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={}))})(Pn);var Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.getProdHqConfig=Ct.getProdApiConfig=Ct.getSitHqConfig=Ct.getSitApiConfig=Ct.getDevHqConfig=Ct.getDevApiConfig=void 0;var Yr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},_m=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Yr}};Ct.getDevApiConfig=_m;var Sm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Yr}};Ct.getDevHqConfig=Sm;var Am=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:Yr}};Ct.getSitApiConfig=Am;var Tm=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:Yr}};Ct.getSitHqConfig=Tm;var Lm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Yr}};Ct.getProdApiConfig=Lm;var Om=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Yr}};Ct.getProdHqConfig=Om;var an={},cn={};Object.defineProperty(cn,"__esModule",{value:!0}),cn.removeValue=cn.getValue=cn.setValue=void 0;var Wi={};function Fm(e,t){Wi[e]=t}cn.setValue=Fm;function km(e){return Wi[e]}cn.getValue=km;function Dm(e){delete Wi[e]}cn.removeValue=Dm,Object.defineProperty(an,"__esModule",{value:!0}),an.removeItemFromStorage=an.setItemInStorage=an.getItemFromStorage=void 0;var Jr=Pn,qr=cn,Nm=function(e,t){switch(t===void 0&&(t=(0,qr.getValue)("PLATFORM")),t){case Jr.PLATFORM.WEB:return sessionStorage.getItem(e);case Jr.PLATFORM.MOBILE:return(0,qr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};an.getItemFromStorage=Nm;var Rm=function(e,t,n){switch(n===void 0&&(n=(0,qr.getValue)("PLATFORM")),n){case Jr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Jr.PLATFORM.MOBILE:return(0,qr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};an.setItemInStorage=Rm;var Mm=function(e,t){switch(t===void 0&&(t=(0,qr.getValue)("PLATFORM")),t){case Jr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Jr.PLATFORM.MOBILE:(0,qr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};an.removeItemFromStorage=Mm;var Pm=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},jm=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.expireToken=Le.invalidateToken=Le.validateToken=Le.validateAccount=Le.getConfig=Le.introduceDelay=Le.isTokenInExpiryWindow=Le.getStoredAuthData=Le.setUserDetails=Le.getRefreshInterval=Le.setTokenAndExpiry=Le.getRandomDelay=Le.hasValidToken=void 0;var Cn=Pn,Qr=Ct,Lt=an,Zi=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Xi=function(e){var t=parseInt((0,Lt.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,Lt.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Le.validateAccount=Xi;var Bm=function(e){var t=Xi(e);return!ld()&&t};Le.validateToken=Bm;var Vm=function(e){return e.apiRetry?e.apiRetry>0:!1};Le.invalidateToken=Vm;var Gm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Le.expireToken=Gm;var Hm=function(e){var t=(0,Lt.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Zi(),o=Xi(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Le.hasValidToken=Hm;var Wm=function(){return Math.floor(Math.random()*6e4)+6e4};Le.getRandomDelay=Wm;var Zm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,Lt.setItemInStorage)("hiverAuthUserId",e),(0,Lt.setItemInStorage)("hiverAuthUserGroupId",t)};Le.setUserDetails=Zm;var Xm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,Lt.setItemInStorage)("hiverAuthToken",e),(0,Lt.setItemInStorage)("hiverAuthTokenExpiry",t)};Le.setTokenAndExpiry=Xm;var zm=function(){var e=(0,Lt.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,Lt.getItemFromStorage)("hiverAuthToken"),n=(0,Lt.getItemFromStorage)("hiverAuthUserId"),r=(0,Lt.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Le.getStoredAuthData=zm;var ld=function(){var e=(0,Lt.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Zi(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Le.isTokenInExpiryWindow=ld;var Ym=function(e){return Pm(void 0,void 0,void 0,function(){return jm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Le.introduceDelay=Ym;var Jm=function(e,t,n){switch(n===void 0&&(n=!0),t){case Cn.TIERS.SIT:case Cn.TIERS.QA:return n?(0,Qr.getSitApiConfig)(e):(0,Qr.getSitHqConfig)(e);case Cn.TIERS.PRODUCTION:case Cn.TIERS.PROD:return n?(0,Qr.getProdApiConfig)():(0,Qr.getProdHqConfig)();case Cn.TIERS.DEV:default:return n?(0,Qr.getDevApiConfig)():(0,Qr.getDevHqConfig)()}};Le.getConfig=Jm;var qm=function(){try{var e=(0,Lt.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return Cn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Zi();return t.getTime()-n.getTime()>Cn.TWO_MINUTES_IN_MS?t.getTime()-Cn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),Cn.REFETCH_CHECK_DELAY}};Le.getRefreshInterval=qm;var Vo={},Jt={},ud;function dd(){if(ud)return Jt;ud=1;var e=pe&&pe.__awaiter||function(m,h,p,b){function C(x){return x instanceof p?x:new p(function(w){w(x)})}return new(p||(p=Promise))(function(x,w){function v(S){try{A(b.next(S))}catch(L){w(L)}}function _(S){try{A(b.throw(S))}catch(L){w(L)}}function A(S){S.done?x(S.value):C(S.value).then(v,_)}A((b=b.apply(m,h||[])).next())})},t=pe&&pe.__generator||function(m,h){var p={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},b,C,x,w;return w={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function v(A){return function(S){return _([A,S])}}function _(A){if(b)throw new TypeError("Generator is already executing.");for(;w&&(w=0,A[0]&&(p=0)),p;)try{if(b=1,C&&(x=A[0]&2?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[A[0]&2,x.value]),A[0]){case 0:case 1:x=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,C=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(x=p.trys,!(x=x.length>0&&x[x.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){p.label=A[1];break}if(A[0]===6&&p.label<x[1]){p.label=x[1],x=A;break}if(x&&p.label<x[2]){p.label=x[2],p.ops.push(A);break}x[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(m,p)}catch(S){A=[6,S],C=0}finally{b=x=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.logoutFromHeimdall=Jt.getTenantLoginCode=Jt.getLoginToken=Jt.getAccessToken=void 0;var n=Pn,r=md(),o=Le,s=function(m,h,p,b){var C=(0,o.getStoredAuthData)(),x=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:m.heimdallUrl,url:m.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":x},data:{user_id:h.userId,usergroup_id:h.usergroupId,access_token:(C==null?void 0:C.token)||"",source:b}}},a=function(m,h,p,b,C){var x=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:h.heimdallUrl,url:h.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:m},headers:{"x-hiver-tenant":x,"x-hiver-userid":b,"x-hiver-usergroupid":C}}},i=function(m,h){var p=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:m.heimdallUrl,url:m.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":p}}},c=function(m){return parseInt(m,10)},l=function(m,h,p,b){return{root_url:p===n.TENANT_PLATFORM.HIVERWEB?m.hotUrl:m.v2Url,url:p===n.TENANT_PLATFORM.HIVERWEB?m.apiEndpoints.hotLogin:m.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(h.userId),app:b||n.APP_UI.DEFAULT}}},f=function(m,h,p,b,C){return e(void 0,void 0,void 0,function(){var x,w,v,_,A,S,L;return t(this,function(N){switch(N.label){case 0:console.log("GETTOKEN tenantPlatform -> ",b),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"),x=s(h,p,b,C),[4,(0,r.performAxiosCall)(x)]):[3,3];case 2:return w=N.sent(),[2,{atToken:(_=w==null?void 0:w.data.at)===null||_===void 0?void 0:_.token,expiryTime:(A=w==null?void 0:w.data.at)===null||A===void 0?void 0:A.expires_at,userId:(S=w==null?void 0:w.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=w==null?void 0:w.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]}})})};Jt.getAccessToken=f;var g=function(m,h,p,b,C,x){return e(void 0,void 0,void 0,function(){var w,v,_,A,S,L,N;return t(this,function(D){switch(D.label){case 0:w=a(m,p,b,C,x),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(w)];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]}})})};Jt.getLoginToken=g;var y=function(m,h,p,b,C){return e(void 0,void 0,void 0,function(){var x,w,v;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",C),x=l(h,p,b,C),[4,(0,r.performAxiosCall)(x)];case 1:return w=_.sent(),[2,w==null?void 0:w.data.code];case 2:throw v=_.sent(),v;case 3:return[2]}})})};Jt.getTenantLoginCode=y;var E=function(m,h,p){return p===void 0&&(p=0),e(void 0,void 0,void 0,function(){var b,C,x;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,5]),b=i(m,h),[4,(0,r.performAxiosCall)(b)];case 1:return C=w.sent(),[2,C==null?void 0:C.status];case 2:return x=w.sent(),p<2?[4,E(m,h,p+1)]:[3,4];case 3:w.sent(),w.label=4;case 4:throw x;case 5:return[2]}})})};return Jt.logoutFromHeimdall=E,Jt}var Ws={},Qm=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},$m=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.subscribeToOnlineEvent=void 0;var fd=Pn,Um=cn,Km=function(e,t){switch(t===void 0&&(t=(0,Um.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case fd.PLATFORM.WEB:return window.addEventListener("online",function(){return Qm(void 0,void 0,void 0,function(){return $m(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 fd.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};Ws.subscribeToOnlineEvent=Km;var pd;function hd(){if(pd)return Vo;pd=1;var e=pe&&pe.__awaiter||function(m,h,p,b){function C(x){return x instanceof p?x:new p(function(w){w(x)})}return new(p||(p=Promise))(function(x,w){function v(S){try{A(b.next(S))}catch(L){w(L)}}function _(S){try{A(b.throw(S))}catch(L){w(L)}}function A(S){S.done?x(S.value):C(S.value).then(v,_)}A((b=b.apply(m,h||[])).next())})},t=pe&&pe.__generator||function(m,h){var p={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},b,C,x,w;return w={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function v(A){return function(S){return _([A,S])}}function _(A){if(b)throw new TypeError("Generator is already executing.");for(;w&&(w=0,A[0]&&(p=0)),p;)try{if(b=1,C&&(x=A[0]&2?C.return:A[0]?C.throw||((x=C.return)&&x.call(C),0):C.next)&&!(x=x.call(C,A[1])).done)return x;switch(C=0,x&&(A=[A[0]&2,x.value]),A[0]){case 0:case 1:x=A;break;case 4:return p.label++,{value:A[1],done:!1};case 5:p.label++,C=A[1],A=[0];continue;case 7:A=p.ops.pop(),p.trys.pop();continue;default:if(x=p.trys,!(x=x.length>0&&x[x.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!x||A[1]>x[0]&&A[1]<x[3])){p.label=A[1];break}if(A[0]===6&&p.label<x[1]){p.label=x[1],x=A;break}if(x&&p.label<x[2]){p.label=x[2],p.ops.push(A);break}x[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(m,p)}catch(S){A=[6,S],C=0}finally{b=x=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.fetchAccessToken=void 0;var n=dd(),r=Pn,o=Le,s=Ws,a,i,c,l=function(m,h,p,b,C,x){return x===void 0&&(x=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var w,v,_,A,S,L,N,D,k;return t(this,function(M){switch(M.label){case 0:w=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",x,b),v=void 0,C?[4,C()]:[3,3];case 2:return v=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,m,h,b,x)];case 4:v=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(v,r.CONFIG_HIVER,m,b,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,x),k=p,M.label=8;case 8:return k<w?[4,l(m,h,k+1,b,C,x)]:[3,11];case 9:M.sent(),M.label=10;case 10:return k++,[3,8];case 11:throw D;case 12:return[2]}})})},f=function(m,h,p,b,C){return e(void 0,void 0,void 0,function(){var x,w,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,m)})]:[3,3];case 1:return A.sent(),h+=m,m*2<=r.MAX_BACKOFF_LIMIT?m*=2:m=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",m),x=p.retryDelay,w=p.configs,v=p.apiParams,_=p.appUI,[4,g(x,m,h,w,v,b,C,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},g=function(m,h,p,b,C,x,w,v,_){return v===void 0&&(v="default"),e(void 0,void 0,void 0,function(){var A,S,L,N,D,k,M,B,Y,J,H,G,q,oe;return t(this,function(te){switch(te.label){case 0:return te.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,b,C,x,v)];case 1:return A=te.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),m=r.INITIAL_RETRY_DELAY,h=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return k=te.sent(),console.log("ERROR: Heimdall fetch token",k),((Y=k.response)===null||Y===void 0?void 0:Y.status)===401||((J=k.request)===null||J===void 0?void 0:J.status)===401?(M=1,[4,l(b,C,M,x,w,_)]):[3,4];case 3:return te.sent(),[3,11];case 4:return((H=k.response)===null||H===void 0?void 0:H.status)===409||((G=k.request)===null||G===void 0?void 0:G.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),B={retryDelay:m,configs:b,apiParams:C,appUI:_},[4,f(h,p,B,x,w)]):[3,6];case 5:if(te.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw k;return[3,11];case 6:if(!(((q=k.response)===null||q===void 0?void 0:q.status)===422||((oe=k.request)===null||oe===void 0?void 0:oe.status)===422))return[3,7];throw console.log("ERROR: Throwing error",k.response.status),k;case 7:return m<=r.MAX_RETRY_DELAY?[4,new Promise(function(V){return setTimeout(V,m)})]:[3,10];case 8:return te.sent(),m*=2,console.log("Heimdall: Fetch token post doubling retry delay",m),[4,g(m,h,p,b,C,x,w,_)];case 9:return te.sent(),[3,11];case 10:throw k;case 11:return[3,12];case 12:return[2]}})})},y=function(m,h,p,b,C,x,w,v){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),b===void 0&&(b=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,b,C,m,h,x,w,v)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},E=function(m,h,p,b,C,x,w){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=m,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,b,C,x,w)];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,b,C,w)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(k){switch(k.label){case 0:return[4,y(S,p,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,b,C,w)];case 1:return k.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 Vo.fetchAccessToken=E,Vo}var gd;function md(){if(gd)return pr;gd=1;var e=pe&&pe.__assign||function(){return e=Object.assign||function(h){for(var p,b=1,C=arguments.length;b<C;b++){p=arguments[b];for(var x in p)Object.prototype.hasOwnProperty.call(p,x)&&(h[x]=p[x])}return h},e.apply(this,arguments)},t=pe&&pe.__awaiter||function(h,p,b,C){function x(w){return w instanceof b?w:new b(function(v){v(w)})}return new(b||(b=Promise))(function(w,v){function _(L){try{S(C.next(L))}catch(N){v(N)}}function A(L){try{S(C.throw(L))}catch(N){v(N)}}function S(L){L.done?w(L.value):x(L.value).then(_,A)}S((C=C.apply(h,p||[])).next())})},n=pe&&pe.__generator||function(h,p){var b={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},C,x,w,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(C)throw new TypeError("Generator is already executing.");for(;v&&(v=0,S[0]&&(b=0)),b;)try{if(C=1,x&&(w=S[0]&2?x.return:S[0]?x.throw||((w=x.return)&&w.call(x),0):x.next)&&!(w=w.call(x,S[1])).done)return w;switch(x=0,w&&(S=[S[0]&2,w.value]),S[0]){case 0:case 1:w=S;break;case 4:return b.label++,{value:S[1],done:!1};case 5:b.label++,x=S[1],S=[0];continue;case 7:S=b.ops.pop(),b.trys.pop();continue;default:if(w=b.trys,!(w=w.length>0&&w[w.length-1])&&(S[0]===6||S[0]===2)){b=0;continue}if(S[0]===3&&(!w||S[1]>w[0]&&S[1]<w[3])){b.label=S[1];break}if(S[0]===6&&b.label<w[1]){b.label=w[1],w=S;break}if(w&&b.label<w[2]){b.label=w[2],b.ops.push(S);break}w[2]&&b.ops.pop(),b.trys.pop();continue}S=p.call(h,b)}catch(L){S=[6,L],x=0}finally{C=w=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(pr,"__esModule",{value:!0}),pr.hiverAxiosCall=pr.performAxiosCall=void 0;var r=cd,o=Le,s=hd(),a=an,i=Pn,c,l=2,f=function(h,p){var b=p.fetchCsrfToken();h.formData?h.formData.append("_csrf_token",b):(h.data=h.data||{},h.data._csrf_token=b)},g=function(h,p){var b={};!h.method||h.method.toLowerCase()==="get"?b={params:h.params?h.params:h.data}:b=h.params?{params:h,data:h.data}:{data:h.data};var C=e(e({method:h.method,url:"".concat(h.root_url).concat(h.url),headers:h.headers},b),{withCredentials:p,responseType:(h==null?void 0:h.responseType)||""});return C};function y(h,p){return p===void 0&&(p=!0),t(this,void 0,void 0,function(){var b;return n(this,function(C){return b=g(h,p),[2,(0,r.default)(b).then(function(x){return x}).catch(function(x){throw x})]})})}pr.performAxiosCall=y;function E(h,p,b){return t(this,void 0,void 0,function(){var C,x,w;return n(this,function(v){switch(v.label){case 0:return v.trys.push([0,6,,8]),h.authTokenFetchingInProgress?[3,2]:(h.authTokenFetchingInProgress=!0,C=h.appEnv,x=h.tier,[4,(0,s.fetchAccessToken)(C,x,p,h.tenantPlatform,h.getTokenForLogin,b)]);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,E(h,p,b)];case 4:v.sent(),v.label=5;case 5:return[3,8];case 6:return w=v.sent(),console.log("Error while fetching Auth Token :",w),h.authTokenFetchingInProgress=!1,[4,E(h,p,b)];case 7:return v.sent(),[3,8];case 8:return[2]}})})}function m(h,p,b,C,x){var w,v;return x===void 0&&(x=0),t(this,void 0,void 0,function(){var _,A,S,L,N,D,k;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(b.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,E(h,S,C)]):[3,2];case 1:M.sent(),M.label=2;case 2:return h.csrfToken&&f(p,b),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"}),b.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(),k=((w=D.response)===null||w===void 0?void 0:w.status)===403||((v=D.request)===null||v===void 0?void 0:v.status)===403,x<l&&k)return(0,o.expireToken)(),[2,m(h,p,b,C,x+1)];if(x>=l&&k||!k)throw p.onFail&&p.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return pr.hiverAxiosCall=m,pr}var Go={},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 xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.getProdHqConfig=xt.getProdApiConfig=xt.getSitHqConfig=xt.getSitApiConfig=xt.getDevHqConfig=xt.getDevApiConfig=void 0;var $r={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},e3=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:$r}};xt.getDevApiConfig=e3;var t3=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:$r}};xt.getDevHqConfig=t3;var n3=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:$r}};xt.getSitApiConfig=n3;var r3=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:$r}};xt.getSitHqConfig=r3;var o3=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:$r}};xt.getProdApiConfig=o3;var s3=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:$r}};xt.getProdHqConfig=s3;var a3=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},i3=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(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 zi=Xe,mr=xt,bd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Yi=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=Yi;var c3=function(e){var t=Yi(e);return!yd()&&t};Ve.validateToken=c3;var l3=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ve.expireToken=l3;var u3=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=bd(),o=Yi(e);return r<n&&o};Ve.hasValidToken=u3;var d3=function(){return Math.floor(Math.random()*6e4)+6e4};Ve.getRandomDelay=d3;var f3=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=f3;var p3=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Ve.setTokenAndExpiry=p3;var h3=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=h3;var yd=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=bd(),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=yd;var g3=function(e){return a3(void 0,void 0,void 0,function(){return i3(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=g3;var m3=function(e,t,n){switch(t){case zi.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,mr.getSitHqConfig)(e)),n?(0,mr.getSitApiConfig)(e):(0,mr.getSitHqConfig)(e);case zi.TIERS.PROD:return n?(0,mr.getProdApiConfig)():(0,mr.getProdHqConfig)();case zi.TIERS.DEV:default:return n?(0,mr.getDevApiConfig)():(0,mr.getDevHqConfig)()}};Ve.getConfig=m3;var Ho={},xn={},Cd;function b3(){if(Cd)return xn;Cd=1;var e=pe&&pe.__awaiter||function(y,E,m,h){function p(b){return b instanceof m?b:new m(function(C){C(b)})}return new(m||(m=Promise))(function(b,C){function x(_){try{v(h.next(_))}catch(A){C(A)}}function w(_){try{v(h.throw(_))}catch(A){C(A)}}function v(_){_.done?b(_.value):p(_.value).then(x,w)}v((h=h.apply(y,E||[])).next())})},t=pe&&pe.__generator||function(y,E){var m={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},h,p,b,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(v){return function(_){return w([v,_])}}function w(v){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,v[0]&&(m=0)),m;)try{if(h=1,p&&(b=v[0]&2?p.return:v[0]?p.throw||((b=p.return)&&b.call(p),0):p.next)&&!(b=b.call(p,v[1])).done)return b;switch(p=0,b&&(v=[v[0]&2,b.value]),v[0]){case 0:case 1:b=v;break;case 4:return m.label++,{value:v[1],done:!1};case 5:m.label++,p=v[1],v=[0];continue;case 7:v=m.ops.pop(),m.trys.pop();continue;default:if(b=m.trys,!(b=b.length>0&&b[b.length-1])&&(v[0]===6||v[0]===2)){m=0;continue}if(v[0]===3&&(!b||v[1]>b[0]&&v[1]<b[3])){m.label=v[1];break}if(v[0]===6&&m.label<b[1]){m.label=b[1],b=v;break}if(b&&m.label<b[2]){m.label=b[2],m.ops.push(v);break}b[2]&&m.ops.pop(),m.trys.pop();continue}v=E.call(y,m)}catch(_){v=[6,_],p=0}finally{h=b=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty(xn,"__esModule",{value:!0}),xn.getV2LoginCode=xn.getLoginToken=xn.getAccessToken=void 0;var n=Xe,r=wd(),o=Ve,s=function(y,E,m){var h=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:E.userId,usergroup_id:E.usergroupId,access_token:(h==null?void 0:h.token)||"",source:m},withCredentials:!0}},a=function(y,E){return{root_url:E.heimdallUrl,url:E.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,E){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:E||n.APP_UI.DEFAULT}}},l=function(y,E,m,h){return e(void 0,void 0,void 0,function(){var p,b,C,x,w,v,_;return t(this,function(A){switch(A.label){case 0:return A.trys.push([0,4,,5]),(0,o.validateToken)(m)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),p=s(E,m,h),[4,(0,r.makeAxiosCall)(p,y)]);case 1:return b=A.sent(),[2,{atToken:(x=b==null?void 0:b.data.at)===null||x===void 0?void 0:x.token,expiryTime:(w=b==null?void 0:b.data.at)===null||w===void 0?void 0:w.expires_at,userId:(v=b==null?void 0:b.data)===null||v===void 0?void 0:v.user_id,userGroupId:(_=b==null?void 0:b.data)===null||_===void 0?void 0:_.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw C=A.sent(),C;case 5:return[2]}})})};xn.getAccessToken=l;var f=function(y,E,m){return e(void 0,void 0,void 0,function(){var h,p,b,C,x,w,v;return t(this,function(_){switch(_.label){case 0:h=a(y,m),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(h,E)];case 2:return p=_.sent(),[2,{userId:(C=p==null?void 0:p.data)===null||C===void 0?void 0:C.user_id,userGroupId:(x=p==null?void 0:p.data)===null||x===void 0?void 0:x.usergroup_id,atToken:(w=p==null?void 0:p.data.at)===null||w===void 0?void 0:w.token,expiryTime:(v=p==null?void 0:p.data.at)===null||v===void 0?void 0:v.expires_at}];case 3:throw b=_.sent(),b;case 4:return[2]}})})};xn.getLoginToken=f;var g=function(y,E,m){return e(void 0,void 0,void 0,function(){var h,p,b;return t(this,function(C){switch(C.label){case 0:return C.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",m),h=c(E,m),[4,(0,r.makeAxiosCall)(h,y)];case 1:return p=C.sent(),console.log("DEBUG HEIMDALL: local storage:",p==null?void 0:p.data),[2,p==null?void 0:p.data.code];case 2:throw b=C.sent(),b;case 3:return[2]}})})};return xn.getV2LoginCode=g,xn}var xd;function Ed(){if(xd)return Ho;xd=1;var e=pe&&pe.__awaiter||function(E,m,h,p){function b(C){return C instanceof h?C:new h(function(x){x(C)})}return new(h||(h=Promise))(function(C,x){function w(A){try{_(p.next(A))}catch(S){x(S)}}function v(A){try{_(p.throw(A))}catch(S){x(S)}}function _(A){A.done?C(A.value):b(A.value).then(w,v)}_((p=p.apply(E,m||[])).next())})},t=pe&&pe.__generator||function(E,m){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},p,b,C,x;return x={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function w(_){return function(A){return v([_,A])}}function v(_){if(p)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(h=0)),h;)try{if(p=1,b&&(C=_[0]&2?b.return:_[0]?b.throw||((C=b.return)&&C.call(b),0):b.next)&&!(C=C.call(b,_[1])).done)return C;switch(b=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,b=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){h.label=_[1];break}if(_[0]===6&&h.label<C[1]){h.label=C[1],C=_;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(_);break}C[2]&&h.ops.pop(),h.trys.pop();continue}_=m.call(E,h)}catch(A){_=[6,A],b=0}finally{p=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.fetchToken=void 0;var n=b3(),r=Xe,o=Ve,s,a,i,c=function(E,m,h){return h===void 0&&(h=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var p,b,C,x,w,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,E,h)];case 2:return b=L.sent(),[4,(0,n.getLoginToken)(b,r.CONFIG_HIVER,E)];case 3:return C=L.sent(),x=C.userId,w=C.userGroupId,v=C.atToken,_=C.expiryTime,(0,o.setTokenAndExpiry)(v,_),(0,o.setUserDetails)(x,w),[3,9];case 4:A=L.sent(),console.log("ERROR debug: in error login:",A,h),S=m,L.label=5;case 5:return S<p?[4,c(E,S+1,h)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},l=function(E,m,h){return e(void 0,void 0,void 0,function(){var p,b,C,x;return t(this,function(w){switch(w.label){case 0:return m<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(v){return setTimeout(v,E)})]:[3,3];case 1:return w.sent(),m+=E,E*2<=r.MAX_BACKOFF_LIMIT?E*=2:E=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",E),p=h.retryDelay,b=h.configs,C=h.api_params,x=h.appUI,[4,f(p,E,m,b,C,x)];case 2:w.sent(),w.label=3;case 3:return[2]}})})},f=function(E,m,h,p,b,C,x){return C===void 0&&(C="default"),e(void 0,void 0,void 0,function(){var w,v,_,A,S,L,N,D,k,M,B,Y,J,H;return t(this,function(G){switch(G.label){case 0:return G.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,p,b,C)];case 1:return w=G.sent(),v=w.atToken,_=w.expiryTime,A=w.userId,S=w.userGroupId,v&&_&&(0,o.setTokenAndExpiry)(v,_),A&&S&&(0,o.setUserDetails)(A,S),E=r.INITIAL_RETRY_DELAY,m=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return L=G.sent(),console.log("ERROR: Heimdall fetch token",L),((k=L.response)===null||k===void 0?void 0:k.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(N=1,[4,c(p,N,x)]):[3,4];case 3:return G.sent(),[3,11];case 4:return((B=L.response)===null||B===void 0?void 0:B.status)===409||((Y=L.request)===null||Y===void 0?void 0:Y.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:E,configs:p,api_params:b,appUI:x},[4,l(m,h,D)]):[3,6];case 5:if(G.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((J=L.response)===null||J===void 0?void 0:J.status)===422||((H=L.request)===null||H===void 0?void 0:H.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return E<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,E)})]:[3,10];case 8:return G.sent(),E*=2,console.log("Heimdall: Fetch token post doubling retry delay",E),[4,f(E,m,h,p,b,x)];case 9:return G.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(E,m,h,p,b,C){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),p===void 0&&(p=r.INITIAL_RETRY_DELAY),b===void 0&&(b=0),e(void 0,void 0,void 0,function(){var x,w,v;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),x=(0,o.isTokenInExpiryWindow)(),x?(w=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(w)]):[3,3];case 1:return _.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,f(h,p,b,E,m,C)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw v=_.sent(),v;case 5:return[2]}})})},y=function(E,m,h,p,b,C){return e(void 0,void 0,void 0,function(){var x,w,v,_,A;return t(this,function(S){switch(S.label){case 0:s=E,a=m,x=r.INITIAL_RETRY_DELAY,w=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(x,w,v,_,h,b,C)];case 2:return S.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",i),clearInterval(i),i=setInterval(function(){return 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 Ho.fetchToken=y,Ho}var vd;function wd(){if(vd)return Go;vd=1;var e=pe&&pe.__assign||function(){return e=Object.assign||function(y){for(var E,m=1,h=arguments.length;m<h;m++){E=arguments[m];for(var p in E)Object.prototype.hasOwnProperty.call(E,p)&&(y[p]=E[p])}return y},e.apply(this,arguments)},t=pe&&pe.__awaiter||function(y,E,m,h){function p(b){return b instanceof m?b:new m(function(C){C(b)})}return new(m||(m=Promise))(function(b,C){function x(_){try{v(h.next(_))}catch(A){C(A)}}function w(_){try{v(h.throw(_))}catch(A){C(A)}}function v(_){_.done?b(_.value):p(_.value).then(x,w)}v((h=h.apply(y,E||[])).next())})},n=pe&&pe.__generator||function(y,E){var m={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},h,p,b,C;return C={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function x(v){return function(_){return w([v,_])}}function w(v){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,v[0]&&(m=0)),m;)try{if(h=1,p&&(b=v[0]&2?p.return:v[0]?p.throw||((b=p.return)&&b.call(p),0):p.next)&&!(b=b.call(p,v[1])).done)return b;switch(p=0,b&&(v=[v[0]&2,b.value]),v[0]){case 0:case 1:b=v;break;case 4:return m.label++,{value:v[1],done:!1};case 5:m.label++,p=v[1],v=[0];continue;case 7:v=m.ops.pop(),m.trys.pop();continue;default:if(b=m.trys,!(b=b.length>0&&b[b.length-1])&&(v[0]===6||v[0]===2)){m=0;continue}if(v[0]===3&&(!b||v[1]>b[0]&&v[1]<b[3])){m.label=v[1];break}if(v[0]===6&&m.label<b[1]){m.label=b[1],b=v;break}if(b&&m.label<b[2]){m.label=b[2],m.ops.push(v);break}b[2]&&m.ops.pop(),m.trys.pop();continue}v=E.call(y,m)}catch(_){v=[6,_],p=0}finally{h=b=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty(Go,"__esModule",{value:!0}),Go.makeAxiosCall=void 0;var r=cd,o=Ve,s=Ed(),a,i=2,c=function(y,E){var m=E.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",m):(y.data=y.data||{},y.data._csrf_token=m)},l=function(y){var E=!y.method||y.method.toLowerCase()==="get"?{params:y.data}:{data:y.data},m=e(e({method:y.method,url:"".concat(y.root_url).concat(y.url),headers:y.headers},E),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return m};function f(y){return t(this,void 0,void 0,function(){var E;return n(this,function(m){return E=l(y),[2,(0,r.default)(E).then(function(h){return h}).catch(function(h){throw h})]})})}function g(y,E,m,h){var p,b;return h===void 0&&(h=0),t(this,void 0,void 0,function(){var C,x,w,v,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(E.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(C=y.app_env,x=y.tier,!C||!x)throw Error("app_env or tier missing : ".concat(C,"/").concat(x));return"userId"in y&&"usergroupId"in y?(w={userId:y.userId,usergroupId:y.usergroupId},typeof E.isHiverApiDomain!="boolean"&&(E.isHiverApiDomain=!0),[4,(0,s.fetchToken)(C,x,w,E.isHiverApiDomain,m)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,E),E.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||((b=_.request)===null||b===void 0?void 0:b.status)===403,h<i&&A)return(0,o.expireToken)(),[2,g(y,E,m,h+1)];if(h>=i&&A||!A)throw y.onFail&&y.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Go.makeAxiosCall=g,Go}(function(e){var t=pe&&pe.__awaiter||function(E,m,h,p){function b(C){return C instanceof h?C:new h(function(x){x(C)})}return new(h||(h=Promise))(function(C,x){function w(A){try{_(p.next(A))}catch(S){x(S)}}function v(A){try{_(p.throw(A))}catch(S){x(S)}}function _(A){A.done?C(A.value):b(A.value).then(w,v)}_((p=p.apply(E,m||[])).next())})},n=pe&&pe.__generator||function(E,m){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},p,b,C,x;return x={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function w(_){return function(A){return v([_,A])}}function v(_){if(p)throw new TypeError("Generator is already executing.");for(;x&&(x=0,_[0]&&(h=0)),h;)try{if(p=1,b&&(C=_[0]&2?b.return:_[0]?b.throw||((C=b.return)&&C.call(b),0):b.next)&&!(C=C.call(b,_[1])).done)return C;switch(b=0,C&&(_=[_[0]&2,C.value]),_[0]){case 0:case 1:C=_;break;case 4:return h.label++,{value:_[1],done:!1};case 5:h.label++,b=_[1],_=[0];continue;case 7:_=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(_[0]===6||_[0]===2)){h=0;continue}if(_[0]===3&&(!C||_[1]>C[0]&&_[1]<C[3])){h.label=_[1];break}if(_[0]===6&&h.label<C[1]){h.label=C[1],C=_;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(_);break}C[2]&&h.ops.pop(),h.trys.pop();continue}_=m.call(E,h)}catch(A){_=[6,A],b=0}finally{p=C=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_INIT_CONFIG_HIVER=e.TENANT_PLATFORM=e.fetchToken=e.makeAxiosCall=e.Bifrost=void 0;var r=md(),o=hd(),s=Pn;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=dd(),i=Le,c=an,l=wd();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=Ed();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var g=cn,y=function(){function E(m,h,p,b,C,x){p===void 0&&(p=s.TENANT_PLATFORM.GMAIL),b===void 0&&(b=null),C===void 0&&(C=!0),x===void 0&&(x=!1),this.setEnvironment(),this.appEnv=m,this.tier=h,this.tenantPlatform=p,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=b,this.withCredentials=C,this.csrfToken=x}return E.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},E.prototype.hiverAxios=function(m,h,p,b){return h===void 0&&(h=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var C,x;return n(this,function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),b&&b<2?(C={userId:m.userId,usergroupId:m.usergroupId,apiRetry:b},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,C,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:w.sent(),w.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,m,h,p)];case 3:return[2,w.sent()];case 4:throw x=w.sent(),console.log("ERROR: Axios call failed",x),x;case 5:return[2]}})})},E.prototype.fetchAuthToken=function(m,h,p){return t(this,void 0,void 0,function(){var b;return n(this,function(C){switch(C.label){case 0:return C.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,m,this.tenantPlatform,this.getTokenForLogin,h,p)]);case 1:return C.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),C.label=3;case 3:return[3,8];case 4:return b=C.sent(),console.log("ERROR: Fetching token failed",b),this.authTokenFetchingInProgress=!1,[4,new Promise(function(x){return setTimeout(x,100)})];case 5:return C.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(m,h,p)];case 6:return C.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},E.prototype.logout=function(){return t(this,void 0,void 0,function(){var m,h;return n(this,function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),m=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(m,this.tenantPlatform)];case 1:return p.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw h=p.sent(),console.error("Heimdall: Logout failed",h),h;case 3:return[2]}})})},E.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},E}();e.Bifrost=y})(Ii);const qt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Pt=()=>{if(!qt.isInitiated)return null;if(!qt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return qt},y3=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=Ii.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{qt.baseUrl=e,qt.appEnv=t,qt.tier=n,qt.userGroupId=o,qt.userId=r,qt.tenantPlatform=s,qt.bifrost=new Ii.Bifrost(t,n,s,i,a),qt.isInitiated=!0},Ee=(({configHiver:e})=>async n=>{const r=Pt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:a}=r,{url:i,method:c,root_url:l}=n,g={root_url:(l||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(g,{...e,isHiverApiDomain:!0}))}catch(y){throw console.error("API call failed with error: ",y),y}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),C3=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)"})))),x3=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"})),E3=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"})))),v3="Rate your experience with Hiver Apps",w3="Share feedback on Apps",I3="Got any feedback?",Id="https://txeep2wshyx.typeform.com/to/RuOwF9SG",_3="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",S3="https://cdn.hiverhq.com/chat-support/hiver-chat.html",A3="enable_connectors_clicked",T3="learn_more_clicked",L3="connector_card_expand_clicked",O3="connector_card_collapsed_clicked",F3="connector_card_refresh_clicked",k3="connector_cards_loaded",D3="connector_whats_new_card_viewed",N3="connector_whats_new_explore_now_clicked",R3="connector_whats_new_learn_more_clicked",M3="connector_whats_new_dismissed",P3="connector_create_new_object_clicked",j3="connector_link_new_object_clicked",B3="connector_new_object_created_by_form",V3="connector_new_object_linked_by_form",G3="connector_object_unlinked_by_form",H3="connector_link_preview_clicked",W3="connector_create_panel_cancel_clicked",_d="connector_create_panel_back_clicked",Z3="card_loaded_on_click",X3="card_loaded",z3="schedule_call_clicked",Y3="schedule_call_cross_clicked",Sd="CONNECTOR_EDIT_CLICKED",J3="CONNECTOR_EDIT_REQUEST_SEND",q3="CONNECTOR_EDIT_CANCELLED",Ad="CONNECTOR_EDIT_BACK_CLICKED",Q3="CONNECTOR_EDIT_SUCCESS",$3="connector_video_clicked",U3="connector_card_error",Ji="got_any_feedback_clicked",K3="connector_deeplink_clicked",e5="search_bar_tapped",t5="search_suggestions_selected",n5="search_initiated",r5="no_results_found",o5="search_results_found",s5="search_result_selected",a5="search_result_linked",i5="feedback_closed_clicked",c5="help_btn_clicked",l5="connector_chat_support_clicked",u5="add_custom_field_clicked",d5="add_custom_field_success",f5="update_custom_field_success",Td="clicked_on_lookup_config",p5="clicked_on_lookup_field",h5="saved_lookup_config",g5="settings_defaults_modal_opened",m5="defaults_configuration_saved",b5={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},He=I.createContext(b5),Zs="hiver_connectors",qi={NOT_FOUND:404},y5="ftr-connector-blue-dot",Ld="ftr-connectors-write-flow",C5="ftr-connectors-enhancements",x5="ftr-connector-schedule-call-agent",E5="ftr-connectors-edit",v5="enableAllConnectorFtr",w5="ftr-cards-open-state",I5="ftr-connectors-global-search",_5="ftr-connectors-smart-suggestions",S5="ftr-connectors-email-selection",A5="ftr-connector-agent-feedback",Xs="ftr-connector-unified-view",T5="ftr-connectors-expanded-form",Od="ftr-apps-lookup-revamp",L5="ftr-ci-configurable-fields",Fd="Please refresh and try again",O5="No data available",zs="-",kd="Refresh",Dd="Minimize",Qi="Expand",Nd="Connectors",$i="Apps",F5="Collapse",k5="Close",Rd="Link",D5="Create",N5="Update",Md="Unlink",Pd="Edit",Ui="Cancel",Ki="Create new object",jd="Link existing object",R5="Are you sure you want to unlink this object?",M5="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.",P5="Edit card",j5="bullet_list",B5="Expanded",V5="Collapsed",Bd="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Vd="UNKNOWN_ERROR",G5="https://help.hiverhq.com/custom-connectors/common-connector-errors",Gd={MAIN_BUTTON:"main_button",ICON:"create_icon"},H5=" Add custom field",ec=e=>{let t=localStorage.getItem(Zs);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},W5=e=>!!ec(e),Hd=()=>{const{userId:e=""}=Pt()||{};return String(e)},Z5=(e,t=Hd())=>{const n=ec(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},tc=(e,t=!1,n=!1)=>{const r=Hd(),o=ec(e);if(t||!o){localStorage.removeItem(Zs);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Zs,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(Zs,JSON.stringify(i));return}},nt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[v5])===!0:(e==null?void 0:e[t])===!0,rt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Wd=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?B5:V5,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},Zd=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==qi.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)!==qi.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},X5=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)},nc=({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 Xd(e,t){return e.length>t?e.substring(0,t)+"...":e}const z5=e=>T.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1187_180)"},T.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_1187_180"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),Y5=e=>T.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_847_49587)"},T.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),T.createElement("defs",null,T.createElement("clipPath",{id:"clip0_847_49587"},T.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),J5=u.keyframes`
|
|
34
|
+
`):" "+nd(s[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Pi};function ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zr(null,e)}function od(e){return ji(e),e.headers=Yt.from(e.headers),e.data=Ri.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rd.getAdapter(e.adapter||Di.adapter)(e).then(function(r){return ji(e),r.data=Ri.call(e,e.transformResponse,r),r.headers=Yt.from(r.headers),r},function(r){return Xu(r)||(ji(e),r&&r.response&&(r.response.data=Ri.call(e,e.transformResponse,r.response),r.response.headers=Yt.from(r.response.headers))),Promise.reject(r)})}const sd="1.7.7",Bi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Bi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ad={};Bi.transitional=function(t,n,r){function o(s,a){return"[Axios v"+sd+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new ge(o(a," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!ad[a]&&(ad[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 Em(e,t,n){if(typeof e!="object")throw new ge("options must be an object",ge.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 ge("option "+s+" must be "+c,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+s,ge.ERR_BAD_OPTION)}}var Vi={assertOptions:Em,validators:Bi};const Mn=Vi.validators;let Hs=class{constructor(t){this.defaults=t,this.interceptors={request:new Gu,response:new Gu}}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=gr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Vi.assertOptions(r,{silentJSONParsing:Mn.transitional(Mn.boolean),forcedJSONParsing:Mn.transitional(Mn.boolean),clarifyTimeoutError:Mn.transitional(Mn.boolean)},!1),o!=null&&(j.isFunction(o)?n.paramsSerializer={serialize:o}:Vi.assertOptions(o,{encode:Mn.function,serialize:Mn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&j.merge(s.common,s[n.method]);s&&j.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=Yt.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,i.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let f,g=0,y;if(!c){const m=[od.bind(this),void 0];for(m.unshift.apply(m,i),m.push.apply(m,l),y=m.length,f=Promise.resolve(n);g<y;)f=f.then(m[g++],m[g++]);return f}y=i.length;let E=n;for(g=0;g<y;){const m=i[g++],h=i[g++];try{E=m(E)}catch(p){h.call(this,p);break}}try{f=od.call(this,E)}catch(m){return Promise.reject(m)}for(g=0,y=l.length;g<y;)f=f.then(l[g++],l[g++]);return f}getUri(t){t=gr(this.defaults,t);const n=qu(t.baseURL,t.url);return Vu(n,t.params,t.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(t){Hs.prototype[t]=function(n,r){return this.request(gr(r||{},{method:t,url:n,data:(r||{}).data}))}}),j.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(gr(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Hs.prototype[t]=n(),Hs.prototype[t+"Form"]=n(!0)});var Ws=Hs;class Gi{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 zr(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 Gi(function(o){t=o}),cancel:t}}}var vm=Gi;function wm(e){return function(n){return e.apply(null,n)}}function Im(e){return j.isObject(e)&&e.isAxiosError===!0}const Hi={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(Hi).forEach(([e,t])=>{Hi[t]=e});var _m=Hi;function id(e){const t=new Ws(e),n=Iu(Ws.prototype.request,t);return j.extend(n,Ws.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return id(gr(e,o))},n}const Ue=id(Di);Ue.Axios=Ws,Ue.CanceledError=zr,Ue.CancelToken=vm,Ue.isCancel=Xu,Ue.VERSION=sd,Ue.toFormData=Ms,Ue.AxiosError=ge,Ue.Cancel=Ue.CanceledError,Ue.all=function(t){return Promise.all(t)},Ue.spread=wm,Ue.isAxiosError=Im,Ue.mergeConfig=gr,Ue.AxiosHeaders=Yt,Ue.formToJSON=e=>Wu(j.isHTMLForm(e)?new FormData(e):e),Ue.getAdapter=rd.getAdapter,Ue.HttpStatusCode=_m,Ue.default=Ue;var cd=Ue,Le={},Pn={};(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={}))})(Pn);var xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.getProdHqConfig=xt.getProdApiConfig=xt.getSitHqConfig=xt.getSitApiConfig=xt.getDevHqConfig=xt.getDevApiConfig=void 0;var Yr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},Sm=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Yr}};xt.getDevApiConfig=Sm;var Am=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Yr}};xt.getDevHqConfig=Am;var Tm=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:Yr}};xt.getSitApiConfig=Tm;var Lm=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:Yr}};xt.getSitHqConfig=Lm;var Om=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Yr}};xt.getProdApiConfig=Om;var Fm=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Yr}};xt.getProdHqConfig=Fm;var an={},cn={};Object.defineProperty(cn,"__esModule",{value:!0}),cn.removeValue=cn.getValue=cn.setValue=void 0;var Wi={};function km(e,t){Wi[e]=t}cn.setValue=km;function Dm(e){return Wi[e]}cn.getValue=Dm;function Nm(e){delete Wi[e]}cn.removeValue=Nm,Object.defineProperty(an,"__esModule",{value:!0}),an.removeItemFromStorage=an.setItemInStorage=an.getItemFromStorage=void 0;var Jr=Pn,qr=cn,Rm=function(e,t){switch(t===void 0&&(t=(0,qr.getValue)("PLATFORM")),t){case Jr.PLATFORM.WEB:return sessionStorage.getItem(e);case Jr.PLATFORM.MOBILE:return(0,qr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};an.getItemFromStorage=Rm;var Mm=function(e,t,n){switch(n===void 0&&(n=(0,qr.getValue)("PLATFORM")),n){case Jr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Jr.PLATFORM.MOBILE:return(0,qr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};an.setItemInStorage=Mm;var Pm=function(e,t){switch(t===void 0&&(t=(0,qr.getValue)("PLATFORM")),t){case Jr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Jr.PLATFORM.MOBILE:(0,qr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};an.removeItemFromStorage=Pm;var jm=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Bm=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.expireToken=Le.invalidateToken=Le.validateToken=Le.validateAccount=Le.getConfig=Le.introduceDelay=Le.isTokenInExpiryWindow=Le.getStoredAuthData=Le.setUserDetails=Le.getRefreshInterval=Le.setTokenAndExpiry=Le.getRandomDelay=Le.hasValidToken=void 0;var xn=Pn,Qr=xt,Lt=an,Zi=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Xi=function(e){var t=parseInt((0,Lt.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,Lt.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Le.validateAccount=Xi;var Vm=function(e){var t=Xi(e);return!ld()&&t};Le.validateToken=Vm;var Gm=function(e){return e.apiRetry?e.apiRetry>0:!1};Le.invalidateToken=Gm;var Hm=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Le.expireToken=Hm;var Wm=function(e){var t=(0,Lt.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=Zi(),o=Xi(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Le.hasValidToken=Wm;var Zm=function(){return Math.floor(Math.random()*6e4)+6e4};Le.getRandomDelay=Zm;var Xm=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,Lt.setItemInStorage)("hiverAuthUserId",e),(0,Lt.setItemInStorage)("hiverAuthUserGroupId",t)};Le.setUserDetails=Xm;var zm=function(e,t){if(!e)throw new Error("Token not found in the response");(0,Lt.setItemInStorage)("hiverAuthToken",e),(0,Lt.setItemInStorage)("hiverAuthTokenExpiry",t)};Le.setTokenAndExpiry=zm;var Ym=function(){var e=(0,Lt.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,Lt.getItemFromStorage)("hiverAuthToken"),n=(0,Lt.getItemFromStorage)("hiverAuthUserId"),r=(0,Lt.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Le.getStoredAuthData=Ym;var ld=function(){var e=(0,Lt.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Zi(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Le.isTokenInExpiryWindow=ld;var Jm=function(e){return jm(void 0,void 0,void 0,function(){return Bm(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Le.introduceDelay=Jm;var qm=function(e,t,n){switch(n===void 0&&(n=!0),t){case xn.TIERS.SIT:case xn.TIERS.QA:return n?(0,Qr.getSitApiConfig)(e):(0,Qr.getSitHqConfig)(e);case xn.TIERS.PRODUCTION:case xn.TIERS.PROD:return n?(0,Qr.getProdApiConfig)():(0,Qr.getProdHqConfig)();case xn.TIERS.DEV:default:return n?(0,Qr.getDevApiConfig)():(0,Qr.getDevHqConfig)()}};Le.getConfig=qm;var Qm=function(){try{var e=(0,Lt.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return xn.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=Zi();return t.getTime()-n.getTime()>xn.TWO_MINUTES_IN_MS?t.getTime()-xn.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),xn.REFETCH_CHECK_DELAY}};Le.getRefreshInterval=Qm;var Vo={},Jt={},ud;function dd(){if(ud)return Jt;ud=1;var e=pe&&pe.__awaiter||function(m,h,p,b){function x(C){return C instanceof p?C:new p(function(w){w(C)})}return new(p||(p=Promise))(function(C,w){function v(S){try{A(b.next(S))}catch(L){w(L)}}function _(S){try{A(b.throw(S))}catch(L){w(L)}}function A(S){S.done?C(S.value):x(S.value).then(v,_)}A((b=b.apply(m,h||[])).next())})},t=pe&&pe.__generator||function(m,h){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},b,x,C,w;return w={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function v(A){return function(S){return _([A,S])}}function _(A){if(b)throw new TypeError("Generator is already executing.");for(;w&&(w=0,A[0]&&(p=0)),p;)try{if(b=1,x&&(C=A[0]&2?x.return:A[0]?x.throw||((C=x.return)&&C.call(x),0):x.next)&&!(C=C.call(x,A[1])).done)return C;switch(x=0,C&&(A=[A[0]&2,C.value]),A[0]){case 0:case 1:C=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(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!C||A[1]>C[0]&&A[1]<C[3])){p.label=A[1];break}if(A[0]===6&&p.label<C[1]){p.label=C[1],C=A;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(A);break}C[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(m,p)}catch(S){A=[6,S],x=0}finally{b=C=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.logoutFromHeimdall=Jt.getTenantLoginCode=Jt.getLoginToken=Jt.getAccessToken=void 0;var n=Pn,r=md(),o=Le,s=function(m,h,p,b){var x=(0,o.getStoredAuthData)(),C=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:m.heimdallUrl,url:m.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":C},data:{user_id:h.userId,usergroup_id:h.usergroupId,access_token:(x==null?void 0:x.token)||"",source:b}}},a=function(m,h,p,b,x){var C=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:h.heimdallUrl,url:h.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:m},headers:{"x-hiver-tenant":C,"x-hiver-userid":b,"x-hiver-usergroupid":x}}},i=function(m,h){var p=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:m.heimdallUrl,url:m.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":p}}},c=function(m){return parseInt(m,10)},l=function(m,h,p,b){return{root_url:p===n.TENANT_PLATFORM.HIVERWEB?m.hotUrl:m.v2Url,url:p===n.TENANT_PLATFORM.HIVERWEB?m.apiEndpoints.hotLogin:m.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(h.userId),app:b||n.APP_UI.DEFAULT}}},f=function(m,h,p,b,x){return e(void 0,void 0,void 0,function(){var C,w,v,_,A,S,L;return t(this,function(N){switch(N.label){case 0:console.log("GETTOKEN tenantPlatform -> ",b),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"),C=s(h,p,b,x),[4,(0,r.performAxiosCall)(C)]):[3,3];case 2:return w=N.sent(),[2,{atToken:(_=w==null?void 0:w.data.at)===null||_===void 0?void 0:_.token,expiryTime:(A=w==null?void 0:w.data.at)===null||A===void 0?void 0:A.expires_at,userId:(S=w==null?void 0:w.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=w==null?void 0:w.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]}})})};Jt.getAccessToken=f;var g=function(m,h,p,b,x,C){return e(void 0,void 0,void 0,function(){var w,v,_,A,S,L,N;return t(this,function(D){switch(D.label){case 0:w=a(m,p,b,x,C),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(w)];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]}})})};Jt.getLoginToken=g;var y=function(m,h,p,b,x){return e(void 0,void 0,void 0,function(){var C,w,v;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",x),C=l(h,p,b,x),[4,(0,r.performAxiosCall)(C)];case 1:return w=_.sent(),[2,w==null?void 0:w.data.code];case 2:throw v=_.sent(),v;case 3:return[2]}})})};Jt.getTenantLoginCode=y;var E=function(m,h,p){return p===void 0&&(p=0),e(void 0,void 0,void 0,function(){var b,x,C;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,5]),b=i(m,h),[4,(0,r.performAxiosCall)(b)];case 1:return x=w.sent(),[2,x==null?void 0:x.status];case 2:return C=w.sent(),p<2?[4,E(m,h,p+1)]:[3,4];case 3:w.sent(),w.label=4;case 4:throw C;case 5:return[2]}})})};return Jt.logoutFromHeimdall=E,Jt}var Zs={},$m=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Um=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.subscribeToOnlineEvent=void 0;var fd=Pn,Km=cn,e3=function(e,t){switch(t===void 0&&(t=(0,Km.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case fd.PLATFORM.WEB:return window.addEventListener("online",function(){return $m(void 0,void 0,void 0,function(){return Um(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 fd.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};Zs.subscribeToOnlineEvent=e3;var pd;function hd(){if(pd)return Vo;pd=1;var e=pe&&pe.__awaiter||function(m,h,p,b){function x(C){return C instanceof p?C:new p(function(w){w(C)})}return new(p||(p=Promise))(function(C,w){function v(S){try{A(b.next(S))}catch(L){w(L)}}function _(S){try{A(b.throw(S))}catch(L){w(L)}}function A(S){S.done?C(S.value):x(S.value).then(v,_)}A((b=b.apply(m,h||[])).next())})},t=pe&&pe.__generator||function(m,h){var p={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},b,x,C,w;return w={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(w[Symbol.iterator]=function(){return this}),w;function v(A){return function(S){return _([A,S])}}function _(A){if(b)throw new TypeError("Generator is already executing.");for(;w&&(w=0,A[0]&&(p=0)),p;)try{if(b=1,x&&(C=A[0]&2?x.return:A[0]?x.throw||((C=x.return)&&C.call(x),0):x.next)&&!(C=C.call(x,A[1])).done)return C;switch(x=0,C&&(A=[A[0]&2,C.value]),A[0]){case 0:case 1:C=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(C=p.trys,!(C=C.length>0&&C[C.length-1])&&(A[0]===6||A[0]===2)){p=0;continue}if(A[0]===3&&(!C||A[1]>C[0]&&A[1]<C[3])){p.label=A[1];break}if(A[0]===6&&p.label<C[1]){p.label=C[1],C=A;break}if(C&&p.label<C[2]){p.label=C[2],p.ops.push(A);break}C[2]&&p.ops.pop(),p.trys.pop();continue}A=h.call(m,p)}catch(S){A=[6,S],x=0}finally{b=C=0}if(A[0]&5)throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}};Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.fetchAccessToken=void 0;var n=dd(),r=Pn,o=Le,s=Zs,a,i,c,l=function(m,h,p,b,x,C){return C===void 0&&(C=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var w,v,_,A,S,L,N,D,k;return t(this,function(M){switch(M.label){case 0:w=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",C,b),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,m,h,b,C)];case 4:v=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(v,r.CONFIG_HIVER,m,b,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,C),k=p,M.label=8;case 8:return k<w?[4,l(m,h,k+1,b,x,C)]:[3,11];case 9:M.sent(),M.label=10;case 10:return k++,[3,8];case 11:throw D;case 12:return[2]}})})},f=function(m,h,p,b,x){return e(void 0,void 0,void 0,function(){var C,w,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,m)})]:[3,3];case 1:return A.sent(),h+=m,m*2<=r.MAX_BACKOFF_LIMIT?m*=2:m=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",m),C=p.retryDelay,w=p.configs,v=p.apiParams,_=p.appUI,[4,g(C,m,h,w,v,b,x,_)];case 2:A.sent(),A.label=3;case 3:return[2]}})})},g=function(m,h,p,b,x,C,w,v,_){return v===void 0&&(v="default"),e(void 0,void 0,void 0,function(){var A,S,L,N,D,k,M,B,Y,J,H,G,q,oe;return t(this,function(te){switch(te.label){case 0:return te.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,b,x,C,v)];case 1:return A=te.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),m=r.INITIAL_RETRY_DELAY,h=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return k=te.sent(),console.log("ERROR: Heimdall fetch token",k),((Y=k.response)===null||Y===void 0?void 0:Y.status)===401||((J=k.request)===null||J===void 0?void 0:J.status)===401?(M=1,[4,l(b,x,M,C,w,_)]):[3,4];case 3:return te.sent(),[3,11];case 4:return((H=k.response)===null||H===void 0?void 0:H.status)===409||((G=k.request)===null||G===void 0?void 0:G.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),B={retryDelay:m,configs:b,apiParams:x,appUI:_},[4,f(h,p,B,C,w)]):[3,6];case 5:if(te.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw k;return[3,11];case 6:if(!(((q=k.response)===null||q===void 0?void 0:q.status)===422||((oe=k.request)===null||oe===void 0?void 0:oe.status)===422))return[3,7];throw console.log("ERROR: Throwing error",k.response.status),k;case 7:return m<=r.MAX_RETRY_DELAY?[4,new Promise(function(V){return setTimeout(V,m)})]:[3,10];case 8:return te.sent(),m*=2,console.log("Heimdall: Fetch token post doubling retry delay",m),[4,g(m,h,p,b,x,C,w,_)];case 9:return te.sent(),[3,11];case 10:throw k;case 11:return[3,12];case 12:return[2]}})})},y=function(m,h,p,b,x,C,w,v){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),b===void 0&&(b=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,b,x,m,h,C,w,v)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},E=function(m,h,p,b,x,C,w){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=m,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,b,x,C,w)];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,b,x,w)},r.REFETCH_CHECK_DELAY),L=function(){return e(void 0,void 0,void 0,function(){return t(this,function(k){switch(k.label){case 0:return[4,y(S,p,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,b,x,w)];case 1:return k.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 Vo.fetchAccessToken=E,Vo}var gd;function md(){if(gd)return pr;gd=1;var e=pe&&pe.__assign||function(){return e=Object.assign||function(h){for(var p,b=1,x=arguments.length;b<x;b++){p=arguments[b];for(var C in p)Object.prototype.hasOwnProperty.call(p,C)&&(h[C]=p[C])}return h},e.apply(this,arguments)},t=pe&&pe.__awaiter||function(h,p,b,x){function C(w){return w instanceof b?w:new b(function(v){v(w)})}return new(b||(b=Promise))(function(w,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?w(L.value):C(L.value).then(_,A)}S((x=x.apply(h,p||[])).next())})},n=pe&&pe.__generator||function(h,p){var b={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},x,C,w,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]&&(b=0)),b;)try{if(x=1,C&&(w=S[0]&2?C.return:S[0]?C.throw||((w=C.return)&&w.call(C),0):C.next)&&!(w=w.call(C,S[1])).done)return w;switch(C=0,w&&(S=[S[0]&2,w.value]),S[0]){case 0:case 1:w=S;break;case 4:return b.label++,{value:S[1],done:!1};case 5:b.label++,C=S[1],S=[0];continue;case 7:S=b.ops.pop(),b.trys.pop();continue;default:if(w=b.trys,!(w=w.length>0&&w[w.length-1])&&(S[0]===6||S[0]===2)){b=0;continue}if(S[0]===3&&(!w||S[1]>w[0]&&S[1]<w[3])){b.label=S[1];break}if(S[0]===6&&b.label<w[1]){b.label=w[1],w=S;break}if(w&&b.label<w[2]){b.label=w[2],b.ops.push(S);break}w[2]&&b.ops.pop(),b.trys.pop();continue}S=p.call(h,b)}catch(L){S=[6,L],C=0}finally{x=w=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(pr,"__esModule",{value:!0}),pr.hiverAxiosCall=pr.performAxiosCall=void 0;var r=cd,o=Le,s=hd(),a=an,i=Pn,c,l=2,f=function(h,p){var b=p.fetchCsrfToken();h.formData?h.formData.append("_csrf_token",b):(h.data=h.data||{},h.data._csrf_token=b)},g=function(h,p){var b={};!h.method||h.method.toLowerCase()==="get"?b={params:h.params?h.params:h.data}:b=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},b),{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 b;return n(this,function(x){return b=g(h,p),[2,(0,r.default)(b).then(function(C){return C}).catch(function(C){throw C})]})})}pr.performAxiosCall=y;function E(h,p,b){return t(this,void 0,void 0,function(){var x,C,w;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,C=h.tier,[4,(0,s.fetchAccessToken)(x,C,p,h.tenantPlatform,h.getTokenForLogin,b)]);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,E(h,p,b)];case 4:v.sent(),v.label=5;case 5:return[3,8];case 6:return w=v.sent(),console.log("Error while fetching Auth Token :",w),h.authTokenFetchingInProgress=!1,[4,E(h,p,b)];case 7:return v.sent(),[3,8];case 8:return[2]}})})}function m(h,p,b,x,C){var w,v;return C===void 0&&(C=0),t(this,void 0,void 0,function(){var _,A,S,L,N,D,k;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(b.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,E(h,S,x)]):[3,2];case 1:M.sent(),M.label=2;case 2:return h.csrfToken&&f(p,b),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"}),b.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(),k=((w=D.response)===null||w===void 0?void 0:w.status)===403||((v=D.request)===null||v===void 0?void 0:v.status)===403,C<l&&k)return(0,o.expireToken)(),[2,m(h,p,b,x,C+1)];if(C>=l&&k||!k)throw p.onFail&&p.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return pr.hiverAxiosCall=m,pr}var Go={},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 Ct={};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.getProdHqConfig=Ct.getProdApiConfig=Ct.getSitHqConfig=Ct.getSitApiConfig=Ct.getDevHqConfig=Ct.getDevApiConfig=void 0;var $r={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},t3=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:$r}};Ct.getDevApiConfig=t3;var n3=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:$r}};Ct.getDevHqConfig=n3;var r3=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:$r}};Ct.getSitApiConfig=r3;var o3=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:$r}};Ct.getSitHqConfig=o3;var s3=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:$r}};Ct.getProdApiConfig=s3;var a3=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:$r}};Ct.getProdHqConfig=a3;var i3=pe&&pe.__awaiter||function(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(g){a(g)}}function c(f){try{l(r.throw(f))}catch(g){a(g)}}function l(f){f.done?s(f.value):o(f.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},c3=pe&&pe.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,a;return a={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function i(l){return function(f){return c([l,f])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,o&&(s=l[0]&2?o.return:l[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,l[1])).done)return s;switch(o=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,o=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(f){l=[6,f],o=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(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 zi=Xe,mr=Ct,bd=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Yi=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=Yi;var l3=function(e){var t=Yi(e);return!yd()&&t};Ve.validateToken=l3;var u3=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ve.expireToken=u3;var d3=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=bd(),o=Yi(e);return r<n&&o};Ve.hasValidToken=d3;var f3=function(){return Math.floor(Math.random()*6e4)+6e4};Ve.getRandomDelay=f3;var p3=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=p3;var h3=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};Ve.setTokenAndExpiry=h3;var g3=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=g3;var yd=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=bd(),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=yd;var m3=function(e){return i3(void 0,void 0,void 0,function(){return c3(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=m3;var b3=function(e,t,n){switch(t){case zi.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,mr.getSitHqConfig)(e)),n?(0,mr.getSitApiConfig)(e):(0,mr.getSitHqConfig)(e);case zi.TIERS.PROD:return n?(0,mr.getProdApiConfig)():(0,mr.getProdHqConfig)();case zi.TIERS.DEV:default:return n?(0,mr.getDevApiConfig)():(0,mr.getDevHqConfig)()}};Ve.getConfig=b3;var Ho={},Cn={},xd;function y3(){if(xd)return Cn;xd=1;var e=pe&&pe.__awaiter||function(y,E,m,h){function p(b){return b instanceof m?b:new m(function(x){x(b)})}return new(m||(m=Promise))(function(b,x){function C(_){try{v(h.next(_))}catch(A){x(A)}}function w(_){try{v(h.throw(_))}catch(A){x(A)}}function v(_){_.done?b(_.value):p(_.value).then(C,w)}v((h=h.apply(y,E||[])).next())})},t=pe&&pe.__generator||function(y,E){var m={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},h,p,b,x;return x={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function C(v){return function(_){return w([v,_])}}function w(v){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,v[0]&&(m=0)),m;)try{if(h=1,p&&(b=v[0]&2?p.return:v[0]?p.throw||((b=p.return)&&b.call(p),0):p.next)&&!(b=b.call(p,v[1])).done)return b;switch(p=0,b&&(v=[v[0]&2,b.value]),v[0]){case 0:case 1:b=v;break;case 4:return m.label++,{value:v[1],done:!1};case 5:m.label++,p=v[1],v=[0];continue;case 7:v=m.ops.pop(),m.trys.pop();continue;default:if(b=m.trys,!(b=b.length>0&&b[b.length-1])&&(v[0]===6||v[0]===2)){m=0;continue}if(v[0]===3&&(!b||v[1]>b[0]&&v[1]<b[3])){m.label=v[1];break}if(v[0]===6&&m.label<b[1]){m.label=b[1],b=v;break}if(b&&m.label<b[2]){m.label=b[2],m.ops.push(v);break}b[2]&&m.ops.pop(),m.trys.pop();continue}v=E.call(y,m)}catch(_){v=[6,_],p=0}finally{h=b=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.getV2LoginCode=Cn.getLoginToken=Cn.getAccessToken=void 0;var n=Xe,r=wd(),o=Ve,s=function(y,E,m){var h=(0,o.getStoredAuthData)();return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:E.userId,usergroup_id:E.usergroupId,access_token:(h==null?void 0:h.token)||"",source:m},withCredentials:!0}},a=function(y,E){return{root_url:E.heimdallUrl,url:E.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},withCredentials:!0}},i=function(y){return parseInt(y,10)},c=function(y,E){return{root_url:y.v2Url,url:y.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:E||n.APP_UI.DEFAULT}}},l=function(y,E,m,h){return e(void 0,void 0,void 0,function(){var p,b,x,C,w,v,_;return t(this,function(A){switch(A.label){case 0:return A.trys.push([0,4,,5]),(0,o.validateToken)(m)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),p=s(E,m,h),[4,(0,r.makeAxiosCall)(p,y)]);case 1:return b=A.sent(),[2,{atToken:(C=b==null?void 0:b.data.at)===null||C===void 0?void 0:C.token,expiryTime:(w=b==null?void 0:b.data.at)===null||w===void 0?void 0:w.expires_at,userId:(v=b==null?void 0:b.data)===null||v===void 0?void 0:v.user_id,userGroupId:(_=b==null?void 0:b.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]}})})};Cn.getAccessToken=l;var f=function(y,E,m){return e(void 0,void 0,void 0,function(){var h,p,b,x,C,w,v;return t(this,function(_){switch(_.label){case 0:h=a(y,m),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(h,E)];case 2:return p=_.sent(),[2,{userId:(x=p==null?void 0:p.data)===null||x===void 0?void 0:x.user_id,userGroupId:(C=p==null?void 0:p.data)===null||C===void 0?void 0:C.usergroup_id,atToken:(w=p==null?void 0:p.data.at)===null||w===void 0?void 0:w.token,expiryTime:(v=p==null?void 0:p.data.at)===null||v===void 0?void 0:v.expires_at}];case 3:throw b=_.sent(),b;case 4:return[2]}})})};Cn.getLoginToken=f;var g=function(y,E,m){return e(void 0,void 0,void 0,function(){var h,p,b;return t(this,function(x){switch(x.label){case 0:return x.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",m),h=c(E,m),[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 b=x.sent(),b;case 3:return[2]}})})};return Cn.getV2LoginCode=g,Cn}var Cd;function Ed(){if(Cd)return Ho;Cd=1;var e=pe&&pe.__awaiter||function(E,m,h,p){function b(x){return x instanceof h?x:new h(function(C){C(x)})}return new(h||(h=Promise))(function(x,C){function w(A){try{_(p.next(A))}catch(S){C(S)}}function v(A){try{_(p.throw(A))}catch(S){C(S)}}function _(A){A.done?x(A.value):b(A.value).then(w,v)}_((p=p.apply(E,m||[])).next())})},t=pe&&pe.__generator||function(E,m){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},p,b,x,C;return C={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function w(_){return function(A){return v([_,A])}}function v(_){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,_[0]&&(h=0)),h;)try{if(p=1,b&&(x=_[0]&2?b.return:_[0]?b.throw||((x=b.return)&&x.call(b),0):b.next)&&!(x=x.call(b,_[1])).done)return x;switch(b=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++,b=_[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}_=m.call(E,h)}catch(A){_=[6,A],b=0}finally{p=x=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.fetchToken=void 0;var n=y3(),r=Xe,o=Ve,s,a,i,c=function(E,m,h){return h===void 0&&(h=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var p,b,x,C,w,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,E,h)];case 2:return b=L.sent(),[4,(0,n.getLoginToken)(b,r.CONFIG_HIVER,E)];case 3:return x=L.sent(),C=x.userId,w=x.userGroupId,v=x.atToken,_=x.expiryTime,(0,o.setTokenAndExpiry)(v,_),(0,o.setUserDetails)(C,w),[3,9];case 4:A=L.sent(),console.log("ERROR debug: in error login:",A,h),S=m,L.label=5;case 5:return S<p?[4,c(E,S+1,h)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw A;case 9:return[2]}})})},l=function(E,m,h){return e(void 0,void 0,void 0,function(){var p,b,x,C;return t(this,function(w){switch(w.label){case 0:return m<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(v){return setTimeout(v,E)})]:[3,3];case 1:return w.sent(),m+=E,E*2<=r.MAX_BACKOFF_LIMIT?E*=2:E=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",E),p=h.retryDelay,b=h.configs,x=h.api_params,C=h.appUI,[4,f(p,E,m,b,x,C)];case 2:w.sent(),w.label=3;case 3:return[2]}})})},f=function(E,m,h,p,b,x,C){return x===void 0&&(x="default"),e(void 0,void 0,void 0,function(){var w,v,_,A,S,L,N,D,k,M,B,Y,J,H;return t(this,function(G){switch(G.label){case 0:return G.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,p,b,x)];case 1:return w=G.sent(),v=w.atToken,_=w.expiryTime,A=w.userId,S=w.userGroupId,v&&_&&(0,o.setTokenAndExpiry)(v,_),A&&S&&(0,o.setUserDetails)(A,S),E=r.INITIAL_RETRY_DELAY,m=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return L=G.sent(),console.log("ERROR: Heimdall fetch token",L),((k=L.response)===null||k===void 0?void 0:k.status)===401||((M=L.request)===null||M===void 0?void 0:M.status)===401?(N=1,[4,c(p,N,C)]):[3,4];case 3:return G.sent(),[3,11];case 4:return((B=L.response)===null||B===void 0?void 0:B.status)===409||((Y=L.request)===null||Y===void 0?void 0:Y.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:E,configs:p,api_params:b,appUI:C},[4,l(m,h,D)]):[3,6];case 5:if(G.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((J=L.response)===null||J===void 0?void 0:J.status)===422||((H=L.request)===null||H===void 0?void 0:H.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return E<=r.MAX_RETRY_DELAY?[4,new Promise(function(q){return setTimeout(q,E)})]:[3,10];case 8:return G.sent(),E*=2,console.log("Heimdall: Fetch token post doubling retry delay",E),[4,f(E,m,h,p,b,C)];case 9:return G.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(E,m,h,p,b,x){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),p===void 0&&(p=r.INITIAL_RETRY_DELAY),b===void 0&&(b=0),e(void 0,void 0,void 0,function(){var C,w,v;return t(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),C=(0,o.isTokenInExpiryWindow)(),C?(w=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(w)]):[3,3];case 1:return _.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,f(h,p,b,E,m,x)];case 2:_.sent(),_.label=3;case 3:return[3,5];case 4:throw v=_.sent(),v;case 5:return[2]}})})},y=function(E,m,h,p,b,x){return e(void 0,void 0,void 0,function(){var C,w,v,_,A;return t(this,function(S){switch(S.label){case 0:s=E,a=m,C=r.INITIAL_RETRY_DELAY,w=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(C,w,v,_,h,b,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 Ho.fetchToken=y,Ho}var vd;function wd(){if(vd)return Go;vd=1;var e=pe&&pe.__assign||function(){return e=Object.assign||function(y){for(var E,m=1,h=arguments.length;m<h;m++){E=arguments[m];for(var p in E)Object.prototype.hasOwnProperty.call(E,p)&&(y[p]=E[p])}return y},e.apply(this,arguments)},t=pe&&pe.__awaiter||function(y,E,m,h){function p(b){return b instanceof m?b:new m(function(x){x(b)})}return new(m||(m=Promise))(function(b,x){function C(_){try{v(h.next(_))}catch(A){x(A)}}function w(_){try{v(h.throw(_))}catch(A){x(A)}}function v(_){_.done?b(_.value):p(_.value).then(C,w)}v((h=h.apply(y,E||[])).next())})},n=pe&&pe.__generator||function(y,E){var m={label:0,sent:function(){if(b[0]&1)throw b[1];return b[1]},trys:[],ops:[]},h,p,b,x;return x={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function C(v){return function(_){return w([v,_])}}function w(v){if(h)throw new TypeError("Generator is already executing.");for(;x&&(x=0,v[0]&&(m=0)),m;)try{if(h=1,p&&(b=v[0]&2?p.return:v[0]?p.throw||((b=p.return)&&b.call(p),0):p.next)&&!(b=b.call(p,v[1])).done)return b;switch(p=0,b&&(v=[v[0]&2,b.value]),v[0]){case 0:case 1:b=v;break;case 4:return m.label++,{value:v[1],done:!1};case 5:m.label++,p=v[1],v=[0];continue;case 7:v=m.ops.pop(),m.trys.pop();continue;default:if(b=m.trys,!(b=b.length>0&&b[b.length-1])&&(v[0]===6||v[0]===2)){m=0;continue}if(v[0]===3&&(!b||v[1]>b[0]&&v[1]<b[3])){m.label=v[1];break}if(v[0]===6&&m.label<b[1]){m.label=b[1],b=v;break}if(b&&m.label<b[2]){m.label=b[2],m.ops.push(v);break}b[2]&&m.ops.pop(),m.trys.pop();continue}v=E.call(y,m)}catch(_){v=[6,_],p=0}finally{h=b=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}};Object.defineProperty(Go,"__esModule",{value:!0}),Go.makeAxiosCall=void 0;var r=cd,o=Ve,s=Ed(),a,i=2,c=function(y,E){var m=E.fetchCsrfToken();y.formData?y.formData.append("_csrf_token",m):(y.data=y.data||{},y.data._csrf_token=m)},l=function(y){var E=!y.method||y.method.toLowerCase()==="get"?{params:y.data}:{data:y.data},m=e(e({method:y.method,url:"".concat(y.root_url).concat(y.url),headers:y.headers},E),{withCredentials:y.withCredentials,responseType:(y==null?void 0:y.responseType)||""});return m};function f(y){return t(this,void 0,void 0,function(){var E;return n(this,function(m){return E=l(y),[2,(0,r.default)(E).then(function(h){return h}).catch(function(h){throw h})]})})}function g(y,E,m,h){var p,b;return h===void 0&&(h=0),t(this,void 0,void 0,function(){var x,C,w,v,_,A;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(E.getToken&&!(0,o.hasValidToken)(y)))return[3,2];if(x=y.app_env,C=y.tier,!x||!C)throw Error("app_env or tier missing : ".concat(x,"/").concat(C));return"userId"in y&&"usergroupId"in y?(w={userId:y.userId,usergroupId:y.usergroupId},typeof E.isHiverApiDomain!="boolean"&&(E.isHiverApiDomain=!0),[4,(0,s.fetchToken)(x,C,w,E.isHiverApiDomain,m)]):[3,2];case 1:S.sent(),S.label=2;case 2:return y.csrfToken&&c(y,E),E.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||((b=_.request)===null||b===void 0?void 0:b.status)===403,h<i&&A)return(0,o.expireToken)(),[2,g(y,E,m,h+1)];if(h>=i&&A||!A)throw y.onFail&&y.onFail(_),console.log("ERROR: Reached make Axios",_),_;return[3,5];case 5:return[2]}})})}return Go.makeAxiosCall=g,Go}(function(e){var t=pe&&pe.__awaiter||function(E,m,h,p){function b(x){return x instanceof h?x:new h(function(C){C(x)})}return new(h||(h=Promise))(function(x,C){function w(A){try{_(p.next(A))}catch(S){C(S)}}function v(A){try{_(p.throw(A))}catch(S){C(S)}}function _(A){A.done?x(A.value):b(A.value).then(w,v)}_((p=p.apply(E,m||[])).next())})},n=pe&&pe.__generator||function(E,m){var h={label:0,sent:function(){if(x[0]&1)throw x[1];return x[1]},trys:[],ops:[]},p,b,x,C;return C={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function w(_){return function(A){return v([_,A])}}function v(_){if(p)throw new TypeError("Generator is already executing.");for(;C&&(C=0,_[0]&&(h=0)),h;)try{if(p=1,b&&(x=_[0]&2?b.return:_[0]?b.throw||((x=b.return)&&x.call(b),0):b.next)&&!(x=x.call(b,_[1])).done)return x;switch(b=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++,b=_[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}_=m.call(E,h)}catch(A){_=[6,A],b=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=md(),o=hd(),s=Pn;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=dd(),i=Le,c=an,l=wd();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var f=Ed();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return f.fetchToken}});var g=cn,y=function(){function E(m,h,p,b,x,C){p===void 0&&(p=s.TENANT_PLATFORM.GMAIL),b===void 0&&(b=null),x===void 0&&(x=!0),C===void 0&&(C=!1),this.setEnvironment(),this.appEnv=m,this.tier=h,this.tenantPlatform=p,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=b,this.withCredentials=x,this.csrfToken=C}return E.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},E.prototype.hiverAxios=function(m,h,p,b){return h===void 0&&(h=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var x,C;return n(this,function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),b&&b<2?(x={userId:m.userId,usergroupId:m.usergroupId,apiRetry:b},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:w.sent(),w.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,m,h,p)];case 3:return[2,w.sent()];case 4:throw C=w.sent(),console.log("ERROR: Axios call failed",C),C;case 5:return[2]}})})},E.prototype.fetchAuthToken=function(m,h,p){return t(this,void 0,void 0,function(){var b;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,m,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 b=x.sent(),console.log("ERROR: Fetching token failed",b),this.authTokenFetchingInProgress=!1,[4,new Promise(function(C){return setTimeout(C,100)})];case 5:return x.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(m,h,p)];case 6:return x.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},E.prototype.logout=function(){return t(this,void 0,void 0,function(){var m,h;return n(this,function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),m=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(m,this.tenantPlatform)];case 1:return p.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw h=p.sent(),console.error("Heimdall: Logout failed",h),h;case 3:return[2]}})})},E.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},E}();e.Bifrost=y})(Ii);const qt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Pt=()=>{if(!qt.isInitiated)return null;if(!qt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return qt},x3=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=Ii.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{qt.baseUrl=e,qt.appEnv=t,qt.tier=n,qt.userGroupId=o,qt.userId=r,qt.tenantPlatform=s,qt.bifrost=new Ii.Bifrost(t,n,s,i,a),qt.isInitiated=!0},Ee=(({configHiver:e})=>async n=>{const r=Pt();if(!r)throw new Error("Please call initConnectorsBifrost before making any api calls");const{bifrost:o,userGroupId:s,userId:a}=r,{url:i,method:c,root_url:l}=n,g={root_url:(l||r.baseUrl)+((n==null?void 0:n.prefix)||""),url:i,method:c,headers:n==null?void 0:n.headers,onSuccess:n==null?void 0:n.onSuccess,onFail:n==null?void 0:n.onFail,data:n==null?void 0:n.data,params:n==null?void 0:n.params,formData:n==null?void 0:n.formData,responseType:n==null?void 0:n.responseType,userId:Number(a),usergroupId:Number(s)};try{return await(o==null?void 0:o.hiverAxios(g,{...e,isHiverApiDomain:!0}))}catch(y){throw console.error("API call failed with error: ",y),y}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),C3=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)"})))),E3=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"})),v3=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"})))),w3="Rate your experience with Hiver Apps",I3="Share feedback on Apps",_3="Got any feedback?",Id="https://txeep2wshyx.typeform.com/to/RuOwF9SG",S3="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",A3="https://cdn.hiverhq.com/chat-support/hiver-chat.html",T3="enable_connectors_clicked",L3="learn_more_clicked",O3="connector_card_expand_clicked",F3="connector_card_collapsed_clicked",k3="connector_card_refresh_clicked",D3="connector_cards_loaded",N3="connector_whats_new_card_viewed",R3="connector_whats_new_explore_now_clicked",M3="connector_whats_new_learn_more_clicked",P3="connector_whats_new_dismissed",j3="connector_create_new_object_clicked",B3="connector_link_new_object_clicked",V3="connector_new_object_created_by_form",G3="connector_new_object_linked_by_form",H3="connector_object_unlinked_by_form",W3="connector_link_preview_clicked",Z3="connector_create_panel_cancel_clicked",_d="connector_create_panel_back_clicked",X3="card_loaded_on_click",z3="card_loaded",Y3="schedule_call_clicked",J3="schedule_call_cross_clicked",Sd="CONNECTOR_EDIT_CLICKED",q3="CONNECTOR_EDIT_REQUEST_SEND",Q3="CONNECTOR_EDIT_CANCELLED",Ad="CONNECTOR_EDIT_BACK_CLICKED",$3="CONNECTOR_EDIT_SUCCESS",U3="connector_video_clicked",K3="connector_card_error",Ji="got_any_feedback_clicked",e4="connector_deeplink_clicked",t4="search_bar_tapped",n4="search_suggestions_selected",r4="search_initiated",o4="no_results_found",s4="search_results_found",a4="search_result_selected",i4="search_result_linked",c4="feedback_closed_clicked",l4="help_btn_clicked",u4="connector_chat_support_clicked",d4="add_custom_field_clicked",f4="add_custom_field_success",p4="update_custom_field_success",Td="clicked_on_lookup_config",h4="clicked_on_lookup_field",g4="saved_lookup_config",m4="settings_defaults_modal_opened",b4="defaults_configuration_saved",y4={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},He=I.createContext(y4),Xs="hiver_connectors",qi={NOT_FOUND:404},x4="ftr-connector-blue-dot",Ld="ftr-connectors-write-flow",C4="ftr-connectors-enhancements",E4="ftr-connector-schedule-call-agent",v4="ftr-connectors-edit",w4="enableAllConnectorFtr",I4="ftr-cards-open-state",_4="ftr-connectors-global-search",S4="ftr-connectors-smart-suggestions",A4="ftr-connectors-email-selection",T4="ftr-connector-agent-feedback",zs="ftr-connector-unified-view",L4="ftr-connectors-expanded-form",Od="ftr-apps-lookup-revamp",O4="ftr-ci-configurable-fields",Fd="Please refresh and try again",F4="No data available",Ys="-",kd="Refresh",Dd="Minimize",Qi="Expand",Nd="Connectors",$i="Apps",k4="Collapse",D4="Close",Rd="Link",N4="Create",R4="Update",Md="Unlink",Pd="Edit",Ui="Cancel",Ki="Create new object",jd="Link existing object",M4="Are you sure you want to unlink this object?",P4="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.",j4="Edit card",B4="bullet_list",V4="Expanded",G4="Collapsed",Bd="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Vd="UNKNOWN_ERROR",H4="https://help.hiverhq.com/custom-connectors/common-connector-errors",Gd={MAIN_BUTTON:"main_button",ICON:"create_icon"},W4=" Add custom field",ec=e=>{let t=localStorage.getItem(Xs);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},Z4=e=>!!ec(e),Hd=()=>{const{userId:e=""}=Pt()||{};return String(e)},X4=(e,t=Hd())=>{const n=ec(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},tc=(e,t=!1,n=!1)=>{const r=Hd(),o=ec(e);if(t||!o){localStorage.removeItem(Xs);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(Xs,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(Xs,JSON.stringify(i));return}},nt=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[w4])===!0:(e==null?void 0:e[t])===!0,rt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),Wd=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?V4:G4,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},Zd=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==qi.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)!==qi.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},z4=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)},nc=({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 Xd(e,t){return e.length>t?e.substring(0,t)+"...":e}const Y4=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)"})))),J4=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)"})))),q4=u.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
|
+
`,Q4=u.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
|
+
`,$4=u.styled(u.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: ${q4} 0.4s ease-in forwards;
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
`,U4=u.styled(u.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: ${Q4} 0.4s ease-in forwards;
|
|
116
116
|
}
|
|
117
|
-
`,
|
|
117
|
+
`,K4=u.styled(u.IconButton)`
|
|
118
118
|
position: absolute;
|
|
119
119
|
right: -8px;
|
|
120
120
|
top: -5px;
|
|
121
|
-
`,
|
|
121
|
+
`,e5=u.styled(u.Stack)`
|
|
122
122
|
margin-top: 8px;
|
|
123
123
|
flex-direction: row;
|
|
124
124
|
flex-wrap: wrap;
|
|
125
125
|
gap: 12px;
|
|
126
|
-
`,
|
|
126
|
+
`,t5=u.styled(u.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
|
+
`,n5=u.styled(u.Typography)`
|
|
151
151
|
letter-spacing: 0.042px;
|
|
152
|
-
`,
|
|
152
|
+
`,r5=({rating:e,setRating:t,count:n=5})=>{const[r,o]=I.useState(e),s=r??e,a=l=>{t(l)},i=l=>{o(l)},c=()=>{o(0)};return d.jsx(e5,{onMouseLeave:c,children:Array.from({length:n},(l,f)=>{const g=f<s;return d.jsx(t5,{onClick:()=>a(f+1),onMouseEnter:()=>i(f+1),children:d.jsxs("div",{children:[d.jsx(J4,{width:"20px",height:"20px",style:{opacity:g?1:0,zIndex:g?2:1}}),d.jsx(Y4,{width:"20px",height:"20px",style:{opacity:g?0:1,zIndex:g?1:2}})]})},f)})})},o5=({connectors:e,expanded:t=!1})=>{const{currentSmIds:n,sendTrackingEvent:r,userEmail:o}=I.useContext(He),{userGroupId:s,userId:a}=Pt()||{},i=nc({url:Id,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),source:"collapsed_feedback_btn"}}),[c,l]=I.useState(t),[f,g]=I.useState(!1),[y,E]=I.useState(0),m=()=>{window.open(i,"_blank","noopener,noreferrer"),r(Ji,{sm_ids:n,ug_id:s,connector_names:e,source:"collapsed_feedback_btn",star_rating:0}),Fs(a)},h=x=>{r(Ji,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn",star_rating:x});const C=nc({url:S3,params:{email:o,user_id:a,ug_id:s,sm_ids:n.join(","),connector_names:e.join(","),star_rating:String(x)}});E(x),window.open(C,"_blank"),l(!1),Fs(a)},p=()=>{r(c4,{sm_ids:n,ug_id:s,connector_names:e,source:"expanded_feedback_btn"}),g(!0),Fs(a)},b=()=>{f&&(l(!1),g(!1))};return d.jsxs(d.Fragment,{children:[d.jsxs(U4,{className:f||!c?"slide-down-out":"",onAnimationEnd:b,children:[d.jsxs(u.Stack,{width:"100%",direction:"row",gap:"8px",children:[d.jsx(E3,{}),d.jsxs(u.Box,{width:"175px",children:[d.jsx(n5,{variant:"h3",children:w3}),d.jsx(r5,{rating:y,setRating:h})]})]}),d.jsx(u.Box,{position:"relative",children:d.jsx(u.Tooltip,{title:"Close",children:d.jsx(K4,{onClick:p,children:d.jsx(v3,{width:"16px",height:"16px"})})})})]}),d.jsx($4,{className:f||!c?"fade-in":"",children:d.jsxs(u.Button,{size:"small",variant:"outlined",color:"tertiary",onClick:m,children:[d.jsx(C3,{}),I3]})})]})},s5="Need setup help?",a5="Expert setup assistance available! Book a 15 min call with our integration specialist.",i5="Schedule call",c5="https://calendar.app.google/V2cJcwKMV4ax9rpk9",zd="agent_panel",rc="hiver_schedule_call_close_button_click",l5=u.styled(u.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: ${u.theme.palette.gray.white};
|
|
159
159
|
box-shadow: 0px 0px 8px 0px #0000001a;
|
|
160
|
-
`,
|
|
160
|
+
`,u5=u.styled(u.Stack)`
|
|
161
161
|
width: 100%;
|
|
162
162
|
gap: 4px;
|
|
163
163
|
justify-content: space-between;
|
|
164
|
-
`,
|
|
164
|
+
`,d5=u.styled(u.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
|
+
`,f5=u.styled(u.icons.Close)`
|
|
179
179
|
height: 20px;
|
|
180
180
|
width: 20px;
|
|
181
181
|
cursor: pointer;
|
|
182
|
-
`,
|
|
182
|
+
`,p5=u.styled(u.icons.CalendarTodayOutlinedIcon)`
|
|
183
183
|
height: 16px;
|
|
184
184
|
width: 16px;
|
|
185
|
-
`,
|
|
185
|
+
`,h5=u.styled(u.Typography)`
|
|
186
186
|
color: ${u.theme.palette.gray.black};
|
|
187
|
-
`,
|
|
187
|
+
`,g5=u.styled(u.Typography)`
|
|
188
188
|
color: ${u.theme.palette.gray.gray2};
|
|
189
|
-
`,g4=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=I.useContext(He),[r,o]=I.useState(()=>!(localStorage.getItem(rc)==="true")&&nt(e,x5));I.useEffect(()=>{localStorage.getItem(rc)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(rc,"true"),o(!1),t(Y3,{source:zd})},a=()=>{window.open(i4,"_blank"),t(z3,{source:zd})};return!r||!n?null:d.jsxs(c4,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[d.jsxs(l4,{gap:"4px",children:[d.jsxs(u.Stack,{direction:"row",justifyContent:"space-between",children:[d.jsx(p4,{variant:"body1_medium",children:o4}),d.jsx(u.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{children:d.jsx(d4,{})})})})]}),d.jsx(h4,{variant:"body2",children:s4})]}),d.jsx(u.Stack,{onClick:a,direction:"row",alignItems:"center",children:d.jsxs(u4,{variant:"outlined",size:"small",children:[d.jsx(f4,{}),a4]})})]})},m4="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",Yd=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"})),b4="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",y4=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"})))),C4=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"})))),x4="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",Jd=()=>{const{connectorId:e,store:t}=I.useContext(He),[n,r]=I.useState(!e),[o,s]=I.useState("");return I.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}},E4=({options:e,anchor:t,open:n,onClose:r})=>d.jsx(u.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>d.jsxs(u.MenuItem,{onClick:o.onClick,children:[d.jsx(u.ListItemIcon,{children:o.icon}),o.label]},o.id))}),qd="connector-header-stuck",v4=u.styled(u.Stack)`
|
|
189
|
+
`,m5=()=>{const{availableFeatures:e,sendTrackingEvent:t,isAdmin:n}=I.useContext(He),[r,o]=I.useState(()=>!(localStorage.getItem(rc)==="true")&&nt(e,E4));I.useEffect(()=>{localStorage.getItem(rc)==="true"&&o(!1)},[]);const s=()=>{localStorage.setItem(rc,"true"),o(!1),t(J3,{source:zd})},a=()=>{window.open(c5,"_blank"),t(Y3,{source:zd})};return!r||!n?null:d.jsxs(l5,{justifyContent:"space-between",alignItems:"baseline",gap:"16px",children:[d.jsxs(u5,{gap:"4px",children:[d.jsxs(u.Stack,{direction:"row",justifyContent:"space-between",children:[d.jsx(h5,{variant:"body1_medium",children:s5}),d.jsx(u.Stack,{onClick:s,position:"absolute",top:"4px",right:"4px",children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{children:d.jsx(f5,{})})})})]}),d.jsx(g5,{variant:"body2",children:a5})]}),d.jsx(u.Stack,{onClick:a,direction:"row",alignItems:"center",children:d.jsxs(d5,{variant:"outlined",size:"small",children:[d.jsx(p5,{}),i5]})})]})},b5="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",Yd=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"})),y5="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",x5=e=>T.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},T.createElement("g",{clipPath:"url(#clip0_1329_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"})))),C5=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"})))),E5="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",Jd=()=>{const{connectorId:e,store:t}=I.useContext(He),[n,r]=I.useState(!e),[o,s]=I.useState("");return I.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}},v5=({options:e,anchor:t,open:n,onClose:r})=>d.jsx(u.Menu,{id:"help-dropdown",open:n,onClose:r,anchorEl:t,children:e.map(o=>d.jsxs(u.MenuItem,{onClick:o.onClick,children:[d.jsx(u.ListItemIcon,{children:o.icon}),o.label]},o.id))}),qd="connector-header-stuck",w5=u.styled(u.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
|
&.${qd} {
|
|
204
204
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
205
205
|
}
|
|
206
|
-
`,
|
|
206
|
+
`,I5=u.styled(u.Stack)`
|
|
207
207
|
width: 0;
|
|
208
208
|
height: 0;
|
|
209
209
|
`,oc={height:"36px",width:"36px",boxSizing:"border-box !important"},Qd=u.styled(u.brandIcons.Connector)`
|
|
210
210
|
width: 20px;
|
|
211
211
|
height: 20px;
|
|
212
|
-
`,
|
|
212
|
+
`,Js=u.styled(u.Typography)`
|
|
213
213
|
text-align: left;
|
|
214
214
|
color: ${u.theme.palette.gray.black};
|
|
215
215
|
`,$d=u.styled(u.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
|
+
`,_5=u.styled(u.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
|
`;u.styled(u.Box)`
|
|
236
236
|
width: inherit;
|
|
237
237
|
height: inherit;
|
|
238
|
-
`;const
|
|
238
|
+
`;const S5=u.styled(u.Box)`
|
|
239
239
|
margin-top: 12px;
|
|
240
240
|
border: 1px solid ${u.theme.palette.gray.gray5};
|
|
241
241
|
border-radius: 8px;
|
|
242
242
|
width: 100%;
|
|
243
|
-
`,
|
|
243
|
+
`,A5=u.styled(u.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
|
`,Ud=u.styled(u.Stack)`
|
|
256
256
|
flex-direction: row;
|
|
257
257
|
align-items: stretch;
|
|
258
|
-
`,
|
|
258
|
+
`,T5=u.styled(u.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
|
+
`,L5=u.styled(u.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
|
+
`,O5=u.styled(u.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
|
+
`,F5=u.styled(u.Typography)`
|
|
286
286
|
text-transform: uppercase;
|
|
287
287
|
color: ${u.theme.palette.gray.gray3};
|
|
288
288
|
`,Kd=u.styled(u.Typography)`
|
|
289
289
|
color: ${u.theme.palette.gray.gray4};
|
|
290
290
|
overflow: hidden;
|
|
291
291
|
word-break: break-word;
|
|
292
|
-
`,
|
|
292
|
+
`,k5=u.styled(u.Link)`
|
|
293
293
|
color: ${u.theme.palette.blue.primary};
|
|
294
294
|
display: inline;
|
|
295
295
|
whitespace: nowrap;
|
|
296
296
|
cursor: pointer;
|
|
297
297
|
text-decoration: none;
|
|
298
|
-
`,
|
|
298
|
+
`,D5=u.styled(u.Typography)`
|
|
299
299
|
&.ellipsisClass {
|
|
300
300
|
text-overflow: ellipsis;
|
|
301
301
|
white-space: nowrap;
|
|
@@ -309,7 +309,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
309
309
|
text-overflow: ellipsis;
|
|
310
310
|
-webkit-line-clamp: 3;
|
|
311
311
|
cursor: pointer;
|
|
312
|
-
`,
|
|
312
|
+
`,N5=u.styled(u.Typography)`
|
|
313
313
|
display: -webkit-box;
|
|
314
314
|
-webkit-box-orient: vertical;
|
|
315
315
|
overflow: hidden;
|
|
@@ -384,7 +384,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
384
384
|
transform: rotate(360deg);
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
`,
|
|
387
|
+
`,R5=u.styled(u.Stack)`
|
|
388
388
|
flex-direction: row;
|
|
389
389
|
position: relative;
|
|
390
390
|
align-items: center;
|
|
@@ -398,10 +398,10 @@ React keys must be passed directly to JSX without using spread:
|
|
|
398
398
|
opacity: ${e=>e.isHovered?1:0};
|
|
399
399
|
transition: opacity ${e=>e.isHovered?"0.5s":"0.1s"} ease-in;
|
|
400
400
|
}
|
|
401
|
-
`,
|
|
401
|
+
`,M5=u.styled(u.TableHead)`
|
|
402
402
|
background-color: ${u.theme.palette.gray.white};
|
|
403
403
|
border-bottom: 1px solid ${u.theme.palette.gray.gray5};
|
|
404
|
-
`,
|
|
404
|
+
`,P5=u.styled(u.TableCell)`
|
|
405
405
|
height: 12px;
|
|
406
406
|
padding: 12px 16px;
|
|
407
407
|
border-top: 1px solid ${u.theme.palette.gray.gray5};
|
|
@@ -414,7 +414,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
414
414
|
&:nth-last-child(2) {
|
|
415
415
|
border-radius: 0px 5px 0px 0px;
|
|
416
416
|
}
|
|
417
|
-
`,
|
|
417
|
+
`,j5=u.styled(u.TableRow)`
|
|
418
418
|
.row-edit {
|
|
419
419
|
visibility: hidden;
|
|
420
420
|
}
|
|
@@ -431,7 +431,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
431
431
|
border-radius: 0px 0px 5px 0px;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
`,
|
|
434
|
+
`,B5=u.styled(u.TableCell)`
|
|
435
435
|
height: 32px;
|
|
436
436
|
padding: 8px 16px;
|
|
437
437
|
border-right: 1px solid ${u.theme.palette.gray.gray5};
|
|
@@ -439,39 +439,39 @@ React keys must be passed directly to JSX without using spread:
|
|
|
439
439
|
&:first-child {
|
|
440
440
|
border-left: 1px solid ${u.theme.palette.gray.gray5};
|
|
441
441
|
}
|
|
442
|
-
`,
|
|
442
|
+
`,V5=u.styled(u.TableCell)`
|
|
443
443
|
width: 34px;
|
|
444
444
|
position: sticky;
|
|
445
445
|
right: 0px;
|
|
446
446
|
background-color: white;
|
|
447
447
|
border: none;
|
|
448
448
|
padding: 0px 2px;
|
|
449
|
-
`,
|
|
449
|
+
`,G5=u.styled(u.TableCell)`
|
|
450
450
|
padding: 16px 19px;
|
|
451
451
|
position: sticky;
|
|
452
452
|
right: 0px;
|
|
453
453
|
background-color: white;
|
|
454
454
|
border: none;
|
|
455
|
-
`,
|
|
455
|
+
`,H5=u.styled("img")`
|
|
456
456
|
transition: transform 0.3s;
|
|
457
457
|
transform: rotate(${e=>e.transformAngle}deg);
|
|
458
|
-
`,
|
|
458
|
+
`,W5=u.styled(u.Typography)`
|
|
459
459
|
display: flex;
|
|
460
460
|
color: ${u.theme.palette.blue.primary};
|
|
461
461
|
justify-content: flex-end;
|
|
462
462
|
align-items: center;
|
|
463
463
|
margin: 0 12px 12px 12px;
|
|
464
464
|
cursor: pointer;
|
|
465
|
-
`,
|
|
465
|
+
`,Z5=u.styled(u.Typography)`
|
|
466
466
|
display: flex;
|
|
467
467
|
align-items: center;
|
|
468
468
|
line-height: 28px;
|
|
469
469
|
font-weight: 600;
|
|
470
|
-
`,
|
|
470
|
+
`,X5=u.styled(u.Box)`
|
|
471
471
|
margin-top: 12px;
|
|
472
472
|
border: 1px solid ${u.palette.gray.gray5};
|
|
473
473
|
border-radius: 4px;
|
|
474
|
-
`,
|
|
474
|
+
`,z5=u.styled(u.Stack)`
|
|
475
475
|
flex-direction: row;
|
|
476
476
|
align-items: center;
|
|
477
477
|
background-color: #e1e8ff;
|
|
@@ -479,7 +479,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
479
479
|
box-sizing: border-box;
|
|
480
480
|
height: 48px;
|
|
481
481
|
justify-content: space-between;
|
|
482
|
-
`,
|
|
482
|
+
`,Y5=u.styled(u.Box)`
|
|
483
483
|
overflow: hidden;
|
|
484
484
|
transition: max-height 300ms;
|
|
485
485
|
&.slideUp {
|
|
@@ -488,17 +488,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
488
488
|
&.slideDown {
|
|
489
489
|
max-height: ${({height:e})=>e?`${e}px`:"0px"};
|
|
490
490
|
}
|
|
491
|
-
`,
|
|
491
|
+
`,J5=u.styled(u.Box)`
|
|
492
492
|
background-color: #f0f3ff99;
|
|
493
493
|
padding: 14px 12px 8px 12px;
|
|
494
494
|
box-sizing: border-box;
|
|
495
|
-
`,
|
|
495
|
+
`,q5=u.styled(u.Box)`
|
|
496
496
|
margin-bottom: 12px;
|
|
497
497
|
margin-top: 8px;
|
|
498
498
|
li {
|
|
499
499
|
display: list-item;
|
|
500
500
|
}
|
|
501
|
-
`,
|
|
501
|
+
`,Q5=u.styled(u.Stack)`
|
|
502
502
|
margin-bottom: 6px;
|
|
503
503
|
list-style-type: disc;
|
|
504
504
|
margin-left: ${e=>e.marginLeft?`${e.marginLeft}`:"14px"};
|
|
@@ -510,35 +510,35 @@ React keys must be passed directly to JSX without using spread:
|
|
|
510
510
|
height: 20px;
|
|
511
511
|
border-radius: 2px;
|
|
512
512
|
}
|
|
513
|
-
|
|
513
|
+
`,$5=u.styled(u.Button)`
|
|
514
514
|
height: 28px;
|
|
515
515
|
max-width: 115px;
|
|
516
516
|
white-space: pre;
|
|
517
|
-
|
|
517
|
+
`,U5=u.styled(u.Typography)`
|
|
518
518
|
font-weight: 500;
|
|
519
519
|
height: 100%;
|
|
520
|
-
`,
|
|
520
|
+
`,K5=u.styled(u.Box)`
|
|
521
521
|
&:last-child {
|
|
522
522
|
margin-bottom: 16px;
|
|
523
523
|
}
|
|
524
|
-
`,
|
|
524
|
+
`,eb=u.styled(u.Typography)`
|
|
525
525
|
white-space: nowrap;
|
|
526
526
|
overflow: hidden;
|
|
527
527
|
text-overflow: ellipsis;
|
|
528
528
|
max-width: 100%;
|
|
529
529
|
height: 100%;
|
|
530
530
|
color: ${u.theme.palette.gray.gray2};
|
|
531
|
-
`,
|
|
531
|
+
`,tb=u.styled(u.Stack)`
|
|
532
532
|
padding: 8px 16px;
|
|
533
533
|
color: ${u.theme.palette.gray.black};
|
|
534
|
-
`,
|
|
534
|
+
`,nb=u.styled(u.Typography)`
|
|
535
535
|
white-space: nowrap;
|
|
536
536
|
overflow: hidden;
|
|
537
537
|
text-overflow: ellipsis;
|
|
538
538
|
width: calc(100% - 20px);
|
|
539
539
|
display: inline-block;
|
|
540
540
|
color: ${u.theme.palette.gray.gray2};
|
|
541
|
-
`,
|
|
541
|
+
`,rb=({connectors:e,isWriteFlowEnabled:t,haveCreateObjects:n,haveLinkObjects:r,cards:o,handleCreateNewObject:s,handleLinkNewObject:a})=>{const i=I.useRef(null),c=I.useRef(null),[l,f]=I.useState(null),g=!!l,{connectorName:y,connectorId:E,isReady:m}=Jd(),{availableFeatures:h,sendTrackingEvent:p,currentSmIds:b,userEmail:x}=I.useContext(He),{userGroupId:C,userId:w}=Pt()||{},v=nt(h,zs),_=[{id:"rate-experience",label:"Rate your experience",icon:d.jsx(C5,{}),onClick:()=>{f(null);const L=nc({url:Id,params:{email:x,user_id:w,ug_id:C,sm_ids:b.join(","),connector_names:e.join(","),source:"help_drop_down"}});window.open(L,"_blank"),p(Ji,{sm_ids:b,ug_id:C,connector_names:e,source:"help_drop_down"}),Fs(w)}},{id:"instant-chat",label:"Instant chat with support",icon:d.jsx(x5,{}),onClick:()=>{f(null),window.open(A3,"_blank"),p(u4,{sm_ids:b,ug_id:C,connector_names:e,source:"help_drop_down"})}}],A=I.useCallback(L=>{const N=document.getElementById("connector-agent-container");if(!L||!N)return;c.current&&c.current.disconnect();const D=new IntersectionObserver(k=>{const M=i.current;for(const B of k)M==null||M.classList.toggle(qd,B.intersectionRatio===0)},{root:N});D.observe(L),c.current=D},[]),S=L=>{p(l4,{sm_ids:b,ug_id:C,connector_names:e}),f(L.currentTarget)};return m?d.jsxs(d.Fragment,{children:[d.jsx(I5,{ref:A}),d.jsx(v5,{options:_,anchor:l,open:g,onClose:()=>f(null)}),d.jsxs(w5,{ref:i,children:[y&&E?d.jsx(u.Stack,{direction:"row",alignItems:"center",gap:"8px",minHeight:"36px",children:d.jsx(Js,{variant:"body_sm_medium",children:y})}):d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[v?d.jsx(Yd,{width:"20px",height:"20px"}):d.jsx(Qd,{}),d.jsx(Js,{variant:"body_sm_medium",children:v?$i:Nd})]}),d.jsxs(u.Stack,{direction:"row",children:[d.jsx(u.Tooltip,{title:_3,placement:"bottom",children:d.jsx(u.IconButton,{onClick:S,id:"help-button",sx:oc,children:d.jsx("img",{src:y5,alt:"Help",height:"20px"})})}),t&&(o!=null&&o.length)?d.jsxs(d.Fragment,{children:[r?d.jsx(u.Tooltip,{title:jd,placement:"bottom",children:d.jsx(u.IconButton,{onClick:a,sx:oc,children:d.jsx("img",{src:E5,alt:"Link Task",height:"20px"})})}):null,n?d.jsx(u.Tooltip,{title:Ki,placement:"bottom",children:d.jsx(u.IconButton,{onClick:s,sx:oc,children:d.jsx("img",{src:b5,alt:"Add",height:"20px"})})}):null]}):null]})]})]}):null};var ac={exports:{}},ic={};/**
|
|
542
542
|
* @license React
|
|
543
543
|
* use-sync-external-store-with-selector.production.min.js
|
|
544
544
|
*
|
|
@@ -546,7 +546,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
546
546
|
*
|
|
547
547
|
* This source code is licensed under the MIT license found in the
|
|
548
548
|
* LICENSE file in the root directory of this source tree.
|
|
549
|
-
*/var t0;function
|
|
549
|
+
*/var t0;function ob(){if(t0)return ic;t0=1;var e=I;function t(c,l){return c===l&&(c!==0||1/c===1/l)||c!==c&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return ic.useSyncExternalStoreWithSelector=function(c,l,f,g,y){var E=o(null);if(E.current===null){var m={hasValue:!1,value:null};E.current=m}else m=E.current;E=a(function(){function p(v){if(!b){if(b=!0,x=v,v=g(v),y!==void 0&&m.hasValue){var _=m.value;if(y(_,v))return C=_}return C=v}if(_=C,n(x,v))return _;var A=g(v);return y!==void 0&&y(_,A)?_:(x=v,C=A)}var b=!1,x,C,w=f===void 0?null:f;return[function(){return p(l())},w===null?void 0:function(){return p(w())}]},[l,f,g,y]);var h=r(c,E[0],E[1]);return s(function(){m.hasValue=!0,m.value=h},[h]),i(h),h},ic}var cc={};/**
|
|
550
550
|
* @license React
|
|
551
551
|
* use-sync-external-store-with-selector.development.js
|
|
552
552
|
*
|
|
@@ -554,30 +554,30 @@ React keys must be passed directly to JSX without using spread:
|
|
|
554
554
|
*
|
|
555
555
|
* This source code is licensed under the MIT license found in the
|
|
556
556
|
* LICENSE file in the root directory of this source tree.
|
|
557
|
-
*/var n0;function
|
|
558
|
-
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:
|
|
559
|
-
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:x})}y.current&&(y.current=!1)}return p}}[r.name],[r,f,a.stabilityCheck]),m=a0(c.addNestedSub,i.getState,l||i.getState,E,s);return Ot.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var db=ub();function fb(e){e()}function pb(){let e=null,t=null;return{clear(){e=null,t=null},notify(){fb(()=>{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 i0={notify(){},get:()=>[]};function hb(e,t){let n,r=i0,o=0,s=!1;function a(h){f();const p=r.subscribe(h);let b=!1;return()=>{b||(b=!0,p(),g())}}function i(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=pb())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=i0)}function y(){s||(s=!0,f())}function E(){s&&(s=!1,g())}const m={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:y,tryUnsubscribe:E,getListeners:()=>r};return m}var gb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mb=typeof navigator<"u"&&navigator.product==="ReactNative",bb=gb||mb?Ot.useLayoutEffect:Ot.useEffect;function yb({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=Ot.useMemo(()=>{const l=hb(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=Ot.useMemo(()=>e.getState(),[e]);bb(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]);const c=t||Bn;return Ot.createElement(c.Provider,{value:a},n)}var uc=yb;function c0(e=Bn){const t=e===Bn?s0:lc(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Cb=c0();function xb(e=Bn){const t=e===Bn?Cb:c0(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Eb=xb();cb(sb.useSyncExternalStoreWithSelector);const Qt=Eb.withTypes(),Ie=db.withTypes(),Oe={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},K={IDLE:"idle",LOADING:"loading",FAILED:"failed"},vb="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",l0="Show more",wb="Show less",Ib="Show preview",_b="Hide preview",Sb="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 Ab=typeof Symbol=="function"&&Symbol.observable||"@@observable",u0=Ab,dc=()=>Math.random().toString(36).substring(7).split("").join("."),Tb={INIT:`@@redux/INIT${dc()}`,REPLACE:`@@redux/REPLACE${dc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${dc()}`},br=Tb;function Wo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Lb(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(kb(e))return"date";if(Fb(e))return"error";const n=Ob(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 Ob(e){return typeof e.constructor=="function"?e.constructor.name:null}function Fb(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function kb(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Vn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Lb(e)),t}function d0(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: '${Vn(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: '${Vn(n)}'`);return n(d0)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((p,b)=>{a.set(b,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: '${Vn(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 b=!0;l();const C=i++;return a.set(C,p),function(){if(b){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.");b=!1,l(),a.delete(C),s=null}}}function y(p){if(!Wo(p))throw new Error(process.env.NODE_ENV==="production"?at(7):`Actions must be plain objects. Instead, the actual type was: '${Vn(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: '${Vn(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(C=>{C()}),p}function E(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?at(10):`Expected the nextReducer to be a function. Instead, received: '${Vn(p)}`);r=p,y({type:br.REPLACE})}function m(){const p=g;return{subscribe(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?at(11):`Expected the observer to be an object. Instead, received: '${Vn(b)}'`);function C(){const w=b;w.next&&w.next(f())}return C(),{unsubscribe:p(C)}},[u0](){return this}}}return y({type:br.INIT}),{dispatch:y,subscribe:g,getState:f,replaceReducer:E,[u0]:m}}function f0(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Db(e,t,n,r){const o=Object.keys(t),s=n&&n.type===br.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Wo(e))return`The ${s} has unexpected type of "${Vn(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===br.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 Nb(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:br.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:br.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 '${br.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 p0(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"&&f0(`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{Nb(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=Db(i,n,c,o);g&&f0(g)}let l=!1;const f={};for(let g=0;g<r.length;g++){const y=r[g],E=n[y],m=i[y],h=E(m,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,l=l||h!==m}return l=l||r.length!==Object.keys(i).length,l?f:i}}function Js(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Rb(...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,...l)=>s(c,...l)},i=e.map(c=>c(a));return s=Js(...i)(o.dispatch),{...o,dispatch:s}}}function h0(e){return Wo(e)&&"type"in e&&typeof e.type=="string"}var g0=Symbol.for("immer-nothing"),m0=Symbol.for("immer-draftable"),Ft=Symbol.for("immer-state"),Mb=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 Et(e,...t){if(process.env.NODE_ENV!=="production"){const n=Mb[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 Kr=Object.getPrototypeOf;function yr(e){return!!e&&!!e[Ft]}function En(e){var t;return e?b0(e)||Array.isArray(e)||!!e[m0]||!!((t=e.constructor)!=null&&t[m0])||$s(e)||Us(e):!1}var Pb=Object.prototype.constructor.toString();function b0(e){if(!e||typeof e!="object")return!1;const t=Kr(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)===Pb}function qs(e,t){Qs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Qs(e){const t=e[Ft];return t?t.type_:Array.isArray(e)?1:$s(e)?2:Us(e)?3:0}function fc(e,t){return Qs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function y0(e,t,n){const r=Qs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function jb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function $s(e){return e instanceof Map}function Us(e){return e instanceof Set}function Cr(e){return e.copy_||e.base_}function pc(e,t){if($s(e))return new Map(e);if(Us(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=b0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ft];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(Kr(e),r)}else{const r=Kr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function hc(e,t=!1){return Ks(e)||yr(e)||!En(e)||(Qs(e)>1&&(e.set=e.add=e.clear=e.delete=Bb),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>hc(r,!0))),e}function Bb(){Et(2)}function Ks(e){return Object.isFrozen(e)}var Vb={};function xr(e){const t=Vb[e];return t||Et(0,e),t}var Zo;function C0(){return Zo}function Gb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function x0(e,t){t&&(xr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gc(e){mc(e),e.drafts_.forEach(Hb),e.drafts_=null}function mc(e){e===Zo&&(Zo=e.parent_)}function E0(e){return Zo=Gb(Zo,e)}function Hb(e){const t=e[Ft];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function v0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ft].modified_&&(gc(t),Et(4)),En(e)&&(e=ea(t,e),t.parent_||ta(t,e)),t.patches_&&xr("Patches").generateReplacementPatches_(n[Ft].base_,e,t.patches_,t.inversePatches_)):e=ea(t,n,[]),gc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==g0?e:void 0}function ea(e,t,n){if(Ks(t))return t;const r=t[Ft];if(!r)return qs(t,(o,s)=>w0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ta(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),qs(s,(i,c)=>w0(e,r,o,i,c,n,a)),ta(e,o,!1),n&&e.patches_&&xr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function w0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&Et(5),yr(o)){const i=s&&t&&t.type_!==3&&!fc(t.assigned_,r)?s.concat(r):void 0,c=ea(e,o,i);if(y0(n,r,c),yr(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(En(o)&&!Ks(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ea(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ta(e,o)}}function ta(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hc(t,n)}function Wb(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:C0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=bc;n&&(o=[r],s=Xo);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var bc={get(e,t){if(t===Ft)return e;const n=Cr(e);if(!fc(n,t))return Zb(e,n,t);const r=n[t];return e.finalized_||!En(r)?r:r===yc(e.base_,t)?(xc(e),e.copy_[t]=Ec(r,e)):r},has(e,t){return t in Cr(e)},ownKeys(e){return Reflect.ownKeys(Cr(e))},set(e,t,n){const r=I0(Cr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=yc(Cr(e),t),s=o==null?void 0:o[Ft];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(jb(n,o)&&(n!==void 0||fc(e.base_,t)))return!0;xc(e),Cc(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return yc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xc(e),Cc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Cr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Et(11)},getPrototypeOf(e){return Kr(e.base_)},setPrototypeOf(){Et(12)}},Xo={};qs(bc,(e,t)=>{Xo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Et(13),Xo.set.call(this,e,t,void 0)},Xo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Et(14),bc.set.call(this,e[0],t,n,e[0])};function yc(e,t){const n=e[Ft];return(n?Cr(n):e)[t]}function Zb(e,t,n){var o;const r=I0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function I0(e,t){if(!(t in e))return;let n=Kr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Kr(n)}}function Cc(e){e.modified_||(e.modified_=!0,e.parent_&&Cc(e.parent_))}function xc(e){e.copy_||(e.copy_=pc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(c=s,...l){return a.produce(c,f=>n.call(this,f,...l))}}typeof n!="function"&&Et(6),r!==void 0&&typeof r!="function"&&Et(7);let o;if(En(t)){const s=E0(this),a=Ec(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?gc(s):mc(s)}return x0(s,r),v0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===g0&&(o=void 0),this.autoFreeze_&&hc(o,!0),r){const s=[],a=[];xr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else Et(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){En(e)||Et(8),yr(e)&&(e=zb(e));const t=E0(this),n=Ec(e,void 0);return n[Ft].isManual_=!0,mc(t),n}finishDraft(e,t){const n=e&&e[Ft];(!n||!n.isManual_)&&Et(9);const{scope_:r}=n;return x0(r,t),v0(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=xr("Patches").applyPatches_;return yr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ec(e,t){const n=$s(e)?xr("MapSet").proxyMap_(e,t):Us(e)?xr("MapSet").proxySet_(e,t):Wb(e,t);return(t?t.scope_:C0()).drafts_.push(n),n}function zb(e){return yr(e)||Et(10,e),_0(e)}function _0(e){if(!En(e)||Ks(e))return e;const t=e[Ft];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=pc(e,t.scope_.immer_.useStrictShallowCopy_)}else n=pc(e,!0);return qs(n,(r,o)=>{y0(n,r,_0(o))}),t&&(t.finalized_=!1),n}var kt=new Xb,S0=kt.produce;kt.produceWithPatches.bind(kt),kt.setAutoFreeze.bind(kt),kt.setUseStrictShallowCopy.bind(kt),kt.applyPatches.bind(kt),kt.createDraft.bind(kt),kt.finishDraft.bind(kt);var Yb=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
557
|
+
*/var n0;function sb(){return n0||(n0=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=I;function t(l,f){return l===f&&(l!==0||1/l===1/f)||l!==l&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;function c(l,f,g,y,E){var m=o(null),h;m.current===null?(h={hasValue:!1,value:null},m.current=h):h=m.current;var p=a(function(){var w=!1,v,_,A=function(D){if(!w){w=!0,v=D;var k=y(D);if(E!==void 0&&h.hasValue){var M=h.value;if(E(M,k))return _=M,M}return _=k,k}var B=v,Y=_;if(n(B,D))return Y;var J=y(D);return E!==void 0&&E(Y,J)?Y:(v=D,_=J,J)},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,E]),b=p[0],x=p[1],C=r(l,b,x);return s(function(){h.hasValue=!0,h.value=C},[C]),i(C),C}cc.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),cc}process.env.NODE_ENV==="production"?ac.exports=ob():ac.exports=sb();var ab=ac.exports,Ot="default"in T?T.default:T,r0=Symbol.for("react-redux-context"),o0=typeof globalThis<"u"?globalThis:{};function ib(){if(!Ot.createContext)return{};const e=o0[r0]??(o0[r0]=new Map);let t=e.get(Ot.createContext);return t||(t=Ot.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(Ot.createContext,t)),t}var Bn=ib(),cb=()=>{throw new Error("uSES not initialized!")};function lc(e=Bn){return function(){const n=Ot.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 s0=lc(),a0=cb,lb=e=>{a0=e},ub=(e,t)=>e===t;function db(e=Bn){const t=e===Bn?s0:lc(e),n=(r,o={})=>{const{equalityFn:s=ub,devModeChecks:a={}}=typeof o=="function"?{equalityFn:o}:o;if(process.env.NODE_ENV!=="production"){if(!r)throw new Error("You must pass a selector to useSelector");if(typeof r!="function")throw new Error("You must pass a function as a selector to useSelector");if(typeof s!="function")throw new Error("You must pass a function as an equality function to useSelector")}const{store:i,subscription:c,getServerState:l,stabilityCheck:f,identityFunctionCheck:g}=t(),y=Ot.useRef(!0),E=Ot.useCallback({[r.name](h){const p=r(h);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:b,stabilityCheck:x}={stabilityCheck:f,identityFunctionCheck:g,...a};if(x==="always"||x==="once"&&y.current){const C=r(h);if(!s(p,C)){let w;try{throw new Error}catch(v){({stack:w}=v)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
|
|
558
|
+
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:C,stack:w})}}if((b==="always"||b==="once"&&y.current)&&p===h){let C;try{throw new Error}catch(w){({stack:C}=w)}console.warn("Selector "+(r.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
|
|
559
|
+
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:C})}y.current&&(y.current=!1)}return p}}[r.name],[r,f,a.stabilityCheck]),m=a0(c.addNestedSub,i.getState,l||i.getState,E,s);return Ot.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var fb=db();function pb(e){e()}function hb(){let e=null,t=null;return{clear(){e=null,t=null},notify(){pb(()=>{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 i0={notify(){},get:()=>[]};function gb(e,t){let n,r=i0,o=0,s=!1;function a(h){f();const p=r.subscribe(h);let b=!1;return()=>{b||(b=!0,p(),g())}}function i(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function l(){return s}function f(){o++,n||(n=e.subscribe(c),r=hb())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=i0)}function y(){s||(s=!0,f())}function E(){s&&(s=!1,g())}const m={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:y,tryUnsubscribe:E,getListeners:()=>r};return m}var mb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bb=typeof navigator<"u"&&navigator.product==="ReactNative",yb=mb||bb?Ot.useLayoutEffect:Ot.useEffect;function xb({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=Ot.useMemo(()=>{const l=gb(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=Ot.useMemo(()=>e.getState(),[e]);yb(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==e.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]);const c=t||Bn;return Ot.createElement(c.Provider,{value:a},n)}var uc=xb;function c0(e=Bn){const t=e===Bn?s0:lc(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Cb=c0();function Eb(e=Bn){const t=e===Bn?Cb:c0(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var vb=Eb();lb(ab.useSyncExternalStoreWithSelector);const Qt=vb.withTypes(),Ie=fb.withTypes(),Oe={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},K={IDLE:"idle",LOADING:"loading",FAILED:"failed"},wb="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",l0="Show more",Ib="Show less",_b="Show preview",Sb="Hide preview",Ab="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 Tb=typeof Symbol=="function"&&Symbol.observable||"@@observable",u0=Tb,dc=()=>Math.random().toString(36).substring(7).split("").join("."),Lb={INIT:`@@redux/INIT${dc()}`,REPLACE:`@@redux/REPLACE${dc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${dc()}`},br=Lb;function Wo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ob(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(Db(e))return"date";if(kb(e))return"error";const n=Fb(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 Fb(e){return typeof e.constructor=="function"?e.constructor.name:null}function kb(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Db(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Vn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Ob(e)),t}function d0(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: '${Vn(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: '${Vn(n)}'`);return n(d0)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((p,b)=>{a.set(b,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: '${Vn(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 b=!0;l();const x=i++;return a.set(x,p),function(){if(b){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.");b=!1,l(),a.delete(x),s=null}}}function y(p){if(!Wo(p))throw new Error(process.env.NODE_ENV==="production"?at(7):`Actions must be plain objects. Instead, the actual type was: '${Vn(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: '${Vn(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 E(p){if(typeof p!="function")throw new Error(process.env.NODE_ENV==="production"?at(10):`Expected the nextReducer to be a function. Instead, received: '${Vn(p)}`);r=p,y({type:br.REPLACE})}function m(){const p=g;return{subscribe(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?at(11):`Expected the observer to be an object. Instead, received: '${Vn(b)}'`);function x(){const w=b;w.next&&w.next(f())}return x(),{unsubscribe:p(x)}},[u0](){return this}}}return y({type:br.INIT}),{dispatch:y,subscribe:g,getState:f,replaceReducer:E,[u0]:m}}function f0(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Nb(e,t,n,r){const o=Object.keys(t),s=n&&n.type===br.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(o.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!Wo(e))return`The ${s} has unexpected type of "${Vn(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===br.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 Rb(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:br.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:br.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 '${br.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 p0(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"&&f0(`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{Rb(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=Nb(i,n,c,o);g&&f0(g)}let l=!1;const f={};for(let g=0;g<r.length;g++){const y=r[g],E=n[y],m=i[y],h=E(m,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,l=l||h!==m}return l=l||r.length!==Object.keys(i).length,l?f:i}}function qs(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Mb(...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,...l)=>s(c,...l)},i=e.map(c=>c(a));return s=qs(...i)(o.dispatch),{...o,dispatch:s}}}function h0(e){return Wo(e)&&"type"in e&&typeof e.type=="string"}var g0=Symbol.for("immer-nothing"),m0=Symbol.for("immer-draftable"),Ft=Symbol.for("immer-state"),Pb=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 Et(e,...t){if(process.env.NODE_ENV!=="production"){const n=Pb[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 Kr=Object.getPrototypeOf;function yr(e){return!!e&&!!e[Ft]}function En(e){var t;return e?b0(e)||Array.isArray(e)||!!e[m0]||!!((t=e.constructor)!=null&&t[m0])||Us(e)||Ks(e):!1}var jb=Object.prototype.constructor.toString();function b0(e){if(!e||typeof e!="object")return!1;const t=Kr(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)===jb}function Qs(e,t){$s(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function $s(e){const t=e[Ft];return t?t.type_:Array.isArray(e)?1:Us(e)?2:Ks(e)?3:0}function fc(e,t){return $s(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function y0(e,t,n){const r=$s(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Bb(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Us(e){return e instanceof Map}function Ks(e){return e instanceof Set}function xr(e){return e.copy_||e.base_}function pc(e,t){if(Us(e))return new Map(e);if(Ks(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=b0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ft];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(Kr(e),r)}else{const r=Kr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function hc(e,t=!1){return ea(e)||yr(e)||!En(e)||($s(e)>1&&(e.set=e.add=e.clear=e.delete=Vb),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>hc(r,!0))),e}function Vb(){Et(2)}function ea(e){return Object.isFrozen(e)}var Gb={};function Cr(e){const t=Gb[e];return t||Et(0,e),t}var Zo;function x0(){return Zo}function Hb(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function C0(e,t){t&&(Cr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gc(e){mc(e),e.drafts_.forEach(Wb),e.drafts_=null}function mc(e){e===Zo&&(Zo=e.parent_)}function E0(e){return Zo=Hb(Zo,e)}function Wb(e){const t=e[Ft];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function v0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ft].modified_&&(gc(t),Et(4)),En(e)&&(e=ta(t,e),t.parent_||na(t,e)),t.patches_&&Cr("Patches").generateReplacementPatches_(n[Ft].base_,e,t.patches_,t.inversePatches_)):e=ta(t,n,[]),gc(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==g0?e:void 0}function ta(e,t,n){if(ea(t))return t;const r=t[Ft];if(!r)return Qs(t,(o,s)=>w0(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return na(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),Qs(s,(i,c)=>w0(e,r,o,i,c,n,a)),na(e,o,!1),n&&e.patches_&&Cr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function w0(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&Et(5),yr(o)){const i=s&&t&&t.type_!==3&&!fc(t.assigned_,r)?s.concat(r):void 0,c=ta(e,o,i);if(y0(n,r,c),yr(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(En(o)&&!ea(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ta(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&na(e,o)}}function na(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&hc(t,n)}function Zb(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:x0(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=bc;n&&(o=[r],s=Xo);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var bc={get(e,t){if(t===Ft)return e;const n=xr(e);if(!fc(n,t))return Xb(e,n,t);const r=n[t];return e.finalized_||!En(r)?r:r===yc(e.base_,t)?(Cc(e),e.copy_[t]=Ec(r,e)):r},has(e,t){return t in xr(e)},ownKeys(e){return Reflect.ownKeys(xr(e))},set(e,t,n){const r=I0(xr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=yc(xr(e),t),s=o==null?void 0:o[Ft];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Bb(n,o)&&(n!==void 0||fc(e.base_,t)))return!0;Cc(e),xc(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 yc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Cc(e),xc(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=xr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Et(11)},getPrototypeOf(e){return Kr(e.base_)},setPrototypeOf(){Et(12)}},Xo={};Qs(bc,(e,t)=>{Xo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Et(13),Xo.set.call(this,e,t,void 0)},Xo.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Et(14),bc.set.call(this,e[0],t,n,e[0])};function yc(e,t){const n=e[Ft];return(n?xr(n):e)[t]}function Xb(e,t,n){var o;const r=I0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function I0(e,t){if(!(t in e))return;let n=Kr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Kr(n)}}function xc(e){e.modified_||(e.modified_=!0,e.parent_&&xc(e.parent_))}function Cc(e){e.copy_||(e.copy_=pc(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zb=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const a=this;return function(c=s,...l){return a.produce(c,f=>n.call(this,f,...l))}}typeof n!="function"&&Et(6),r!==void 0&&typeof r!="function"&&Et(7);let o;if(En(t)){const s=E0(this),a=Ec(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?gc(s):mc(s)}return C0(s,r),v0(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===g0&&(o=void 0),this.autoFreeze_&&hc(o,!0),r){const s=[],a=[];Cr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else Et(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){En(e)||Et(8),yr(e)&&(e=Yb(e));const t=E0(this),n=Ec(e,void 0);return n[Ft].isManual_=!0,mc(t),n}finishDraft(e,t){const n=e&&e[Ft];(!n||!n.isManual_)&&Et(9);const{scope_:r}=n;return C0(r,t),v0(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Cr("Patches").applyPatches_;return yr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ec(e,t){const n=Us(e)?Cr("MapSet").proxyMap_(e,t):Ks(e)?Cr("MapSet").proxySet_(e,t):Zb(e,t);return(t?t.scope_:x0()).drafts_.push(n),n}function Yb(e){return yr(e)||Et(10,e),_0(e)}function _0(e){if(!En(e)||ea(e))return e;const t=e[Ft];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=pc(e,t.scope_.immer_.useStrictShallowCopy_)}else n=pc(e,!0);return Qs(n,(r,o)=>{y0(n,r,_0(o))}),t&&(t.finalized_=!1),n}var kt=new zb,S0=kt.produce;kt.produceWithPatches.bind(kt),kt.setAutoFreeze.bind(kt),kt.setUseStrictShallowCopy.bind(kt),kt.applyPatches.bind(kt),kt.createDraft.bind(kt),kt.finishDraft.bind(kt);var Jb=(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
|
|
560
560
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
561
561
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
562
|
-
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},
|
|
562
|
+
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},qb=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:s,inputSelectorResultsCopy:a}=e,i=r(()=>({}),...o);if(!(i.apply(null,s)===i.apply(null,a))){let l;try{throw new Error}catch(f){({stack:l}=f)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
563
563
|
This means your output selector will likely run more frequently than intended.
|
|
564
564
|
Avoid returning a new reference inside your input selector, e.g.
|
|
565
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:l})}},
|
|
566
|
-
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
|
|
565
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:s,secondInputs:a,stack:l})}},Qb={inputStabilityCheck:"once",identityFunctionCheck:"once"};function $b(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Ub(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Kb(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 A0=e=>Array.isArray(e)?e:[e];function ey(e){const t=Array.isArray(e[0])?e[0]:e;return Kb(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function T0(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var ty=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...Qb,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:Jb},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:qb}}},ny=class{constructor(e){this.value=e}deref(){return this.value}},ry=typeof WeakRef<"u"?WeakRef:ny,oy=0,L0=1;function ra(){return{s:oy,v:void 0,o:null,p:null}}function O0(e,t={}){let n=ra();const{resultEqualityCheck:r}=t;let o,s=0;function a(){var g;let i=n;const{length:c}=arguments;for(let y=0,E=c;y<E;y++){const m=arguments[y];if(typeof m=="function"||typeof m=="object"&&m!==null){let h=i.o;h===null&&(i.o=h=new WeakMap);const p=h.get(m);p===void 0?(i=ra(),h.set(m,i)):i=p}else{let h=i.p;h===null&&(i.p=h=new Map);const p=h.get(m);p===void 0?(i=ra(),h.set(m,i)):i=p}}const l=i;let f;if(i.s===L0)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 ry(f):f}return l.s=L0,l.v=f,f}return a.clearCache=()=>{n=ra(),a.resetResultsCount()},a.resultsCount=()=>s,a.resetResultsCount=()=>{s=0},a}function sy(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,a=0,i,c={},l=o.pop();typeof l=="object"&&(c=l,l=o.pop()),$b(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const f={...n,...c},{memoize:g,memoizeOptions:y=[],argsMemoize:E=O0,argsMemoizeOptions:m=[],devModeChecks:h={}}=f,p=A0(y),b=A0(m),x=ey(o),C=g(function(){return s++,l.apply(null,arguments)},...p);let w=!0;const v=E(function(){a++;const A=T0(x,arguments);if(i=C.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:S,inputStabilityCheck:L}=ty(w,h);if(S.shouldRun&&S.run(l,A,i),L.shouldRun){const N=T0(x,arguments);L.run({inputSelectorResults:A,inputSelectorResultsCopy:N},{memoize:g,memoizeOptions:p},arguments)}w&&(w=!1)}return i},...b);return Object.assign(v,{resultFunc:l,memoizedResultFunc:C,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>i,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:g,argsMemoize:E})};return Object.assign(r,{withTypes:()=>r}),r}var ay=sy(O0),iy=Object.assign((e,t=ay)=>{Ub(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:()=>iy});function F0(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var cy=F0(),ly=F0,uy=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?qs:qs.apply(null,arguments)},k0=e=>e&&typeof e.match=="function";function zo(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=>h0(r)&&r.type===e,n}function dy(e){return typeof e=="function"&&"type"in e&&k0(e)}function fy(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
566
|
+
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 py(e={}){if(process.env.NODE_ENV==="production")return()=>n=>r=>n(r);const{isActionCreator:t=dy}=e;return()=>n=>r=>(t(r)&&console.warn(fy(r.type)),n(r))}function D0(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.
|
|
567
567
|
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.
|
|
568
|
-
It is disabled in production builds, so you don't need to worry about that.`)}}}var N0=class
|
|
568
|
+
It is disabled in production builds, so you don't need to worry about that.`)}}}var N0=class gs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,gs.prototype)}static get[Symbol.species](){return gs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new gs(...t[0].concat(this)):new gs(...t.concat(this))}};function R0(e){return En(e)?S0(e,()=>{}):e}function M0(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 hy(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function gy(e,t,n){const r=P0(e,t,n);return{detectMutations(){return j0(e,t,r,n)}}}function P0(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]=P0(e,t,n[a],i))}}return s}function j0(e,t=[],n,r,o=!1,s=""){const a=n?n.value:void 0,i=a===r;if(o&&!i&&!Number.isNaN(r))return{wasMutated:!0,path:s};if(e(a)||e(r))return{wasMutated:!1};const c={};for(let f in n.children)c[f]=!0;for(let f in r)c[f]=!0;const l=t.length>0;for(let f in c){const g=s?s+"."+f:f;if(l&&t.some(m=>m instanceof RegExp?m.test(g):g===m))continue;const y=j0(e,t,n.children[f],r[f],i,g);if(y.wasMutated)return y}return{wasMutated:!1}}function my(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{let t=function(i,c,l,f){return JSON.stringify(i,n(c,f),l)},n=function(i,c){let l=[],f=[];return c||(c=function(g,y){return l[0]===y?"[Circular ~]":"[Circular ~."+f.slice(0,l.indexOf(y)).join(".")+"]"}),function(g,y){if(l.length>0){var E=l.indexOf(this);~E?l.splice(E+1):l.push(this),~E?f.splice(E,1/0,g):f.push(g),~l.indexOf(y)&&(y=c.call(this,g,y))}else l.push(y);return i==null?y:i.call(this,g,y)}},{isImmutable:r=hy,ignoredPaths:o,warnAfter:s=32}=e;const a=gy.bind(null,r,o);return({getState:i})=>{let c=i(),l=a(c),f;return g=>y=>{const E=D0(s,"ImmutableStateInvariantMiddleware");E.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=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 m=g(y);return E.measureTime(()=>{if(c=i(),f=l.detectMutations(),l=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)`)}),E.warnIfExceeded(),m}}}}function B0(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||Wo(e)}function vc(e,t="",n=B0,r,o=[],s){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||s!=null&&s.has(e))return!1;const i=r!=null?r(e):Object.entries(e),c=o.length>0;for(const[l,f]of i){const g=t?t+"."+l:l;if(!(c&&o.some(E=>E instanceof RegExp?E.test(g):g===E))){if(!n(f))return{keyPath:g,value:f};if(typeof f=="object"&&(a=vc(f,g,n,r,o,s),a))return a}}return s&&V0(e)&&s.add(e),!1}function V0(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!V0(t))return!1;return!0}function by(e={}){if(process.env.NODE_ENV==="production")return()=>t=>n=>t(n);{const{isSerializable:t=B0,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:s=[],warnAfter:a=32,ignoreState:i=!1,ignoreActions:c=!1,disableCache:l=!1}=e,f=!l&&WeakSet?new WeakSet:void 0;return g=>y=>E=>{if(!h0(E))return y(E);const m=y(E),h=D0(a,"SerializableStateInvariantMiddleware");return!c&&!(r.length&&r.indexOf(E.type)!==-1)&&h.measureTime(()=>{const p=vc(E,"",t,n,o,f);if(p){const{keyPath:b,value:x}=p;console.error(`A non-serializable value was detected in an action, in the path: \`${b}\`. Value:`,x,`
|
|
569
569
|
Take a look at the logic that dispatched this action: `,E,`
|
|
570
570
|
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
|
|
571
|
-
(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(),b=vc(p,"",t,n,s,f);if(b){const{keyPath:
|
|
571
|
+
(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(),b=vc(p,"",t,n,s,f);if(b){const{keyPath:x,value:C}=b;console.error(`A non-serializable value was detected in the state, in the path: \`${x}\`. Value:`,C,`
|
|
572
572
|
Take a look at the reducer(s) handling this action type: ${E.type}.
|
|
573
|
-
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),m}}}function ra(e){return typeof e=="boolean"}var by=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new N0;if(n&&(ra(n)?a.push(iy):a.push(cy(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};ra(r)||(i=r),a.unshift(gy(i))}if(o){let i={};ra(o)||(i=o),a.push(my(i))}if(s){let i={};ra(s)||(i=s),a.unshift(fy(i))}}return a},yy="RTK_autoBatch",G0=e=>t=>{setTimeout(t,e)},Cy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:G0(10),xy=(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"?Cy:e.type==="callback"?e.queueNotification:G0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const g=()=>o&&f(),y=r.subscribe(g);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var g;try{return o=!((g=f==null?void 0:f.meta)!=null&&g[yy]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},Ey=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new N0(e);return r&&o.push(xy(typeof r=="object"?r:void 0)),o};function vy(e){const t=by(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let i;if(typeof n=="function")i=n;else if(Wo(n))i=p0(n);else throw new Error(process.env.NODE_ENV==="production"?je(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"?je(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"?je(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?je(4):"each middleware provided to configureStore must be a function");let l=Js;o&&(l=ly({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=Rb(...c),g=Ey(f);if(process.env.NODE_ENV!=="production"&&a&&typeof a!="function")throw new Error(process.env.NODE_ENV==="production"?je(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"?je(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&y.some(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?je(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 E=l(...y);return d0(i,s,E)}function H0(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"?je(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?je(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"?je(28):"`builder.addCase` cannot be called with an empty action type");if(i in t)throw new Error(process.env.NODE_ENV==="production"?je(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"?je(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"?je(31):"`builder.addDefaultCase` can only be called once");return r=s,o}};return e(o),[t,n,r]}function wy(e){return typeof e=="function"}function Iy(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?je(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]=H0(t),s;if(wy(e))s=()=>R0(e());else{const i=R0(e);s=()=>i}function a(i=s(),c){let l=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return l.filter(f=>!!f).length===0&&(l=[o]),l.reduce((f,g)=>{if(g)if(yr(f)){const E=g(f,c);return E===void 0?f:E}else{if(En(f))return S0(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"?je(9):"A case reducer on a non-draftable value must not return undefined")}return y}}return f},i)}return a.getInitialState=s,a}var _y=(e,t)=>k0(e)?e.match(t):e(t);function Sy(...e){return t=>e.some(n=>_y(n,t))}var Ay="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ty=(e=21)=>{let t="",n=e;for(;n--;)t+=Ay[Math.random()*64|0];return t},Ly=["name","message","stack","code"],wc=class{constructor(e,t){Pe(this,"_type");this.payload=e,this.meta=t}},W0=class{constructor(e,t){Pe(this,"_type");this.payload=e,this.meta=t}},Oy=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Ly)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},$t=(()=>{function e(t,n,r){const o=zo(t+"/fulfilled",(c,l,f,g)=>({payload:c,meta:{...g||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=zo(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=zo(t+"/rejected",(c,l,f,g,y)=>({payload:g,error:(r&&r.serializeError||Oy)(c||"Rejected"),meta:{...y||{},arg:f,requestId:l,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,g)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):Ty(),E=new AbortController;let m,h;function p(C){h=C,E.abort()}const b=async function(){var w,v;let C;try{let _=(w=r==null?void 0:r.condition)==null?void 0:w.call(r,c,{getState:f,extra:g});if(ky(_)&&(_=await _),_===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,L)=>{m=()=>{L({name:"AbortError",message:h||"Aborted"})},E.signal.addEventListener("abort",m)});l(s(y,c,(v=r==null?void 0:r.getPendingMeta)==null?void 0:v.call(r,{requestId:y,arg:c},{getState:f,extra:g}))),C=await Promise.race([A,Promise.resolve(n(c,{dispatch:l,getState:f,extra:g,requestId:y,signal:E.signal,abort:p,rejectWithValue:(S,L)=>new wc(S,L),fulfillWithValue:(S,L)=>new W0(S,L)})).then(S=>{if(S instanceof wc)throw S;return S instanceof W0?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){C=_ instanceof wc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{m&&E.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(C)&&C.meta.condition||l(C),C}();return Object.assign(b,{abort:p,requestId:y,arg:c,unwrap(){return b.then(Fy)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Sy(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Fy(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ky(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Dy=Symbol.for("rtk-slice-createasyncthunk");function Ny(e,t){return`${e}/${t}`}function Ry({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Dy];return function(o){const{name:s,reducerPath:a=s}=o;if(!s)throw new Error(process.env.NODE_ENV==="production"?je(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(Py()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(x,w){const v=typeof x=="string"?x:x.type;if(!v)throw new Error(process.env.NODE_ENV==="production"?je(12):"`context.addCase` cannot be called with an empty action type");if(v in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?je(13):"`context.addCase` cannot be called with two reducers for the same action type: "+v);return l.sliceCaseReducersByType[v]=w,f},addMatcher(x,w){return l.sliceMatchers.push({matcher:x,reducer:w}),f},exposeAction(x,w){return l.actionCreators[x]=w,f},exposeCaseReducer(x,w){return l.sliceCaseReducersByName[x]=w,f}};c.forEach(x=>{const w=i[x],v={reducerName:x,type:Ny(s,x),createNotation:typeof o.reducers=="function"};By(w)?Gy(v,w,f,t):jy(v,w,f)});function g(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?je(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[x={},w=[],v=void 0]=typeof o.extraReducers=="function"?H0(o.extraReducers):[o.extraReducers],_={...x,...l.sliceCaseReducersByType};return Iy(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of l.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of w)A.addMatcher(S.matcher,S.reducer);v&&A.addDefaultCase(v)})}const y=x=>x,E=new Map;let m;function h(x,w){return m||(m=g()),m(x,w)}function p(){return m||(m=g()),m.getInitialState()}function b(x,w=!1){function v(A){let S=A[x];if(typeof S>"u"){if(w)S=p();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?je(15):"selectSlice returned undefined for an uninjected slice reducer")}return S}function _(A=y){const S=M0(E,w,{insert:()=>new WeakMap});return M0(S,A,{insert:()=>{const L={};for(const[N,D]of Object.entries(o.selectors??{}))L[N]=My(D,A,p,w);return L}})}return{reducerPath:x,getSelectors:_,get selectors(){return _(v)},selectSlice:v}}const C={name:s,reducer:h,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:p,...b(a),injectInto(x,{reducerPath:w,...v}={}){const _=w??a;return x.inject({reducerPath:_,reducer:h},v),{...C,...b(_,!0)}}};return C}}function My(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"?je(16):"selectState returned undefined for an uninjected slice reducer")}return e(i,...a)}return o.unwrapped=e,o}var Ic=Ry();function Py(){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 jy({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!Vy(r))throw new Error(process.env.NODE_ENV==="production"?je(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?zo(e,a):zo(e))}function By(e){return e._reducerDefinitionType==="asyncThunk"}function Vy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Gy({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?je(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:s,fulfilled:a,pending:i,rejected:c,settled:l,options:f}=n,g=o(e,s,f);r.exposeAction(t,g),a&&r.addCase(g.fulfilled,a),i&&r.addCase(g.pending,i),c&&r.addCase(g.rejected,c),l&&r.addMatcher(g.settled,l),r.exposeCaseReducer(t,{fulfilled:a||oa,pending:i||oa,rejected:c||oa,settled:l||oa})}function oa(){}function je(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 Ut="success",qe="error",Z0="Some error occured. Please contact support@hiverhq.com",X0="Card refreshed successfully",Hy="Card linked successfully",Wy="Error in linking the card",Zy="Card unlinked successfully",Xy="Failed to unlink the card",vn="Something went wrong",zy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e",Yy=u.styled(u.Box)`
|
|
573
|
+
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),m}}}function oa(e){return typeof e=="boolean"}var yy=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let a=new N0;if(n&&(oa(n)?a.push(cy):a.push(ly(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let i={};oa(r)||(i=r),a.unshift(my(i))}if(o){let i={};oa(o)||(i=o),a.push(by(i))}if(s){let i={};oa(s)||(i=s),a.unshift(py(i))}}return a},xy="RTK_autoBatch",G0=e=>t=>{setTimeout(t,e)},Cy=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:G0(10),Ey=(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"?Cy:e.type==="callback"?e.queueNotification:G0(e.timeout),l=()=>{a=!1,s&&(s=!1,i.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const g=()=>o&&f(),y=r.subscribe(g);return i.add(f),()=>{y(),i.delete(f)}},dispatch(f){var g;try{return o=!((g=f==null?void 0:f.meta)!=null&&g[xy]),s=!o,s&&(a||(a=!0,c(l))),r.dispatch(f)}finally{o=!0}}})},vy=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new N0(e);return r&&o.push(Ey(typeof r=="object"?r:void 0)),o};function wy(e){const t=yy(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:a=void 0}=e||{};let i;if(typeof n=="function")i=n;else if(Wo(n))i=p0(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(m=>typeof m!="function"))throw new Error(process.env.NODE_ENV==="production"?Be(4):"each middleware provided to configureStore must be a function");let l=qs;o&&(l=uy({trace:process.env.NODE_ENV!=="production",...typeof o=="object"&&o}));const f=Mb(...c),g=vy(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(m=>typeof m!="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 E=l(...y);return d0(i,s,E)}function H0(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 Iy(e){return typeof e=="function"}function _y(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]=H0(t),s;if(Iy(e))s=()=>R0(e());else{const i=R0(e);s=()=>i}function a(i=s(),c){let l=[n[c.type],...r.filter(({matcher:f})=>f(c)).map(({reducer:f})=>f)];return l.filter(f=>!!f).length===0&&(l=[o]),l.reduce((f,g)=>{if(g)if(yr(f)){const E=g(f,c);return E===void 0?f:E}else{if(En(f))return S0(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 Sy=(e,t)=>k0(e)?e.match(t):e(t);function Ay(...e){return t=>e.some(n=>Sy(n,t))}var Ty="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ly=(e=21)=>{let t="",n=e;for(;n--;)t+=Ty[Math.random()*64|0];return t},Oy=["name","message","stack","code"],wc=class{constructor(e,t){Pe(this,"_type");this.payload=e,this.meta=t}},W0=class{constructor(e,t){Pe(this,"_type");this.payload=e,this.meta=t}},Fy=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Oy)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},$t=(()=>{function e(t,n,r){const o=zo(t+"/fulfilled",(c,l,f,g)=>({payload:c,meta:{...g||{},arg:f,requestId:l,requestStatus:"fulfilled"}})),s=zo(t+"/pending",(c,l,f)=>({payload:void 0,meta:{...f||{},arg:l,requestId:c,requestStatus:"pending"}})),a=zo(t+"/rejected",(c,l,f,g,y)=>({payload:g,error:(r&&r.serializeError||Fy)(c||"Rejected"),meta:{...y||{},arg:f,requestId:l,rejectedWithValue:!!g,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function i(c){return(l,f,g)=>{const y=r!=null&&r.idGenerator?r.idGenerator(c):Ly(),E=new AbortController;let m,h;function p(x){h=x,E.abort()}const b=async function(){var w,v;let x;try{let _=(w=r==null?void 0:r.condition)==null?void 0:w.call(r,c,{getState:f,extra:g});if(Dy(_)&&(_=await _),_===!1||E.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const A=new Promise((S,L)=>{m=()=>{L({name:"AbortError",message:h||"Aborted"})},E.signal.addEventListener("abort",m)});l(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:l,getState:f,extra:g,requestId:y,signal:E.signal,abort:p,rejectWithValue:(S,L)=>new wc(S,L),fulfillWithValue:(S,L)=>new W0(S,L)})).then(S=>{if(S instanceof wc)throw S;return S instanceof W0?o(S.payload,y,c,S.meta):o(S,y,c)})])}catch(_){x=_ instanceof wc?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{m&&E.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(b,{abort:p,requestId:y,arg:c,unwrap(){return b.then(ky)}})}}return Object.assign(i,{pending:s,rejected:a,fulfilled:o,settled:Ay(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function ky(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Dy(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ny=Symbol.for("rtk-slice-createasyncthunk");function Ry(e,t){return`${e}/${t}`}function My({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Ny];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(jy()):o.reducers)||{},c=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(C,w){const v=typeof C=="string"?C:C.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 l.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 l.sliceCaseReducersByType[v]=w,f},addMatcher(C,w){return l.sliceMatchers.push({matcher:C,reducer:w}),f},exposeAction(C,w){return l.actionCreators[C]=w,f},exposeCaseReducer(C,w){return l.sliceCaseReducersByName[C]=w,f}};c.forEach(C=>{const w=i[C],v={reducerName:C,type:Ry(s,C),createNotation:typeof o.reducers=="function"};Vy(w)?Hy(v,w,f,t):By(v,w,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[C={},w=[],v=void 0]=typeof o.extraReducers=="function"?H0(o.extraReducers):[o.extraReducers],_={...C,...l.sliceCaseReducersByType};return _y(o.initialState,A=>{for(let S in _)A.addCase(S,_[S]);for(let S of l.sliceMatchers)A.addMatcher(S.matcher,S.reducer);for(let S of w)A.addMatcher(S.matcher,S.reducer);v&&A.addDefaultCase(v)})}const y=C=>C,E=new Map;let m;function h(C,w){return m||(m=g()),m(C,w)}function p(){return m||(m=g()),m.getInitialState()}function b(C,w=!1){function v(A){let S=A[C];if(typeof S>"u"){if(w)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=M0(E,w,{insert:()=>new WeakMap});return M0(S,A,{insert:()=>{const L={};for(const[N,D]of Object.entries(o.selectors??{}))L[N]=Py(D,A,p,w);return L}})}return{reducerPath:C,getSelectors:_,get selectors(){return _(v)},selectSlice:v}}const x={name:s,reducer:h,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:p,...b(a),injectInto(C,{reducerPath:w,...v}={}){const _=w??a;return C.inject({reducerPath:_,reducer:h},v),{...x,...b(_,!0)}}};return x}}function Py(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 Ic=My();function jy(){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 By({type:e,reducerName:t,createNotation:n},r,o){let s,a;if("reducer"in r){if(n&&!Gy(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?zo(e,a):zo(e))}function Vy(e){return e._reducerDefinitionType==="asyncThunk"}function Gy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Hy({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:l,options:f}=n,g=o(e,s,f);r.exposeAction(t,g),a&&r.addCase(g.fulfilled,a),i&&r.addCase(g.pending,i),c&&r.addCase(g.rejected,c),l&&r.addMatcher(g.settled,l),r.exposeCaseReducer(t,{fulfilled:a||sa,pending:i||sa,rejected:c||sa,settled:l||sa})}function sa(){}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 Ut="success",qe="error",Z0="Some error occured. Please contact support@hiverhq.com",X0="Card refreshed successfully",Wy="Card linked successfully",Zy="Error in linking the card",Xy="Card unlinked successfully",zy="Failed to unlink the card",vn="Something went wrong",Yy="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='15'%20height='15'%20viewBox='0%200%2015%2015'%3e%3cpath%20fill='%23ffffff'%20fill-rule='nonzero'%20d='M8.821%207.496L14.716%201.6A.937.937%200%201%200%2013.391.275L7.496%206.17%201.6.275A.937.937%200%201%200%20.275%201.601L6.17%207.496.275%2013.39A.937.937%200%201%200%201.6%2014.716L7.496%208.82l5.895%205.895a.935.935%200%200%200%201.325%200%20.937.937%200%200%200%200-1.326L8.821%207.496z'%20opacity='.8'/%3e%3c/svg%3e",Jy=u.styled(u.Box)`
|
|
574
574
|
display: flex;
|
|
575
575
|
flex-direction: row;
|
|
576
576
|
align-items: center;
|
|
577
|
-
`,
|
|
577
|
+
`,qy=u.styled(u.Box)`
|
|
578
578
|
padding: 5px 8px;
|
|
579
579
|
color: white;
|
|
580
|
-
`,
|
|
580
|
+
`,Qy=u.styled(u.brandIcons.Logo)(()=>({height:"26px",width:"26px",color:"#FFFFFF",marginRight:"4px"})),$y=u.styled(u.Stack)`
|
|
581
581
|
flex-direction: row;
|
|
582
582
|
padding: 0 10px;
|
|
583
583
|
img {
|
|
@@ -587,26 +587,26 @@ Take a look at the reducer(s) handling this action type: ${E.type}.
|
|
|
587
587
|
fill: #ffffff;
|
|
588
588
|
width: 10px;
|
|
589
589
|
}
|
|
590
|
-
|
|
591
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(e,t){return
|
|
592
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function no(e){return J6(e)||q6(e)||cf(e)||Q6()}var $6=!1;function U6(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 K6(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 e9=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?!$6: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(K6(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=U6(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-",ca="-moz-",Fe="-webkit-",df="comm",Fc="rule",kc="decl",t9="@import",ff="@keyframes",n9="@layer",r9=Math.abs,la=String.fromCharCode,o9=Object.assign;function s9(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 pf(e){return e.trim()}function a9(e,t){return(e=t.exec(e))?e[0]:e}function ke(e,t,n){return e.replace(t,n)}function Dc(e,t){return e.indexOf(t)}function it(e,t){return e.charCodeAt(t)|0}function Yo(e,t,n){return e.slice(t,n)}function ln(e){return e.length}function Nc(e){return e.length}function ua(e,t){return t.push(e),e}function i9(e,t){return e.map(t).join("")}var da=1,ro=1,hf=0,vt=0,Ke=0,oo="";function fa(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:da,column:ro,length:a,return:""}}function Jo(e,t){return o9(fa("",null,null,"",null,null,0),e,{length:-e.length},t)}function c9(){return Ke}function l9(){return Ke=vt>0?it(oo,--vt):0,ro--,Ke===10&&(ro=1,da--),Ke}function Dt(){return Ke=vt<hf?it(oo,vt++):0,ro++,Ke===10&&(ro=1,da++),Ke}function un(){return it(oo,vt)}function pa(){return vt}function qo(e,t){return Yo(oo,e,t)}function Qo(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 gf(e){return da=ro=1,hf=ln(oo=e),vt=0,[]}function mf(e){return oo="",e}function ha(e){return pf(qo(vt-1,Rc(e===91?e+2:e===40?e+1:e)))}function u9(e){for(;(Ke=un())&&Ke<33;)Dt();return Qo(e)>2||Qo(Ke)>3?"":" "}function d9(e,t){for(;--t&&Dt()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return qo(e,pa()+(t<6&&un()==32&&Dt()==32))}function Rc(e){for(;Dt();)switch(Ke){case e:return vt;case 34:case 39:e!==34&&e!==39&&Rc(Ke);break;case 40:e===41&&Rc(e);break;case 92:Dt();break}return vt}function f9(e,t){for(;Dt()&&e+Ke!==57;)if(e+Ke===84&&un()===47)break;return"/*"+qo(t,vt-1)+"*"+la(e===47?e:Dt())}function p9(e){for(;!Qo(un());)Dt();return qo(e,vt)}function h9(e){return mf(ga("",null,null,null,[""],e=gf(e),0,[0],e))}function ga(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,g=a,y=0,E=0,m=0,h=1,p=1,b=1,C=0,x="",w=o,v=s,_=r,A=x;p;)switch(m=C,C=Dt()){case 40:if(m!=108&&it(A,g-1)==58){Dc(A+=ke(ha(C),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:A+=ha(C);break;case 9:case 10:case 13:case 32:A+=u9(m);break;case 92:A+=d9(pa()-1,7);continue;case 47:switch(un()){case 42:case 47:ua(g9(f9(Dt(),pa()),t,n),c);break;default:A+="/"}break;case 123*h:i[l++]=ln(A)*b;case 125*h:case 59:case 0:switch(C){case 0:case 125:p=0;case 59+f:b==-1&&(A=ke(A,/\f/g,"")),E>0&&ln(A)-g&&ua(E>32?yf(A+";",r,n,g-1):yf(ke(A," ","")+";",r,n,g-2),c);break;case 59:A+=";";default:if(ua(_=bf(A,t,n,l,f,o,i,x,w=[],v=[],g),s),C===123)if(f===0)ga(A,t,_,_,w,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&&ua(bf(e,_,_,0,0,o,i,x,o,w=[],g),v),o,v,g,i,r?w:v);break;default:ga(A,_,_,_,[""],v,0,i,v)}}l=f=E=0,h=b=1,x=A="",g=a;break;case 58:g=1+ln(A),E=m;default:if(h<1){if(C==123)--h;else if(C==125&&h++==0&&l9()==125)continue}switch(A+=la(C),C*h){case 38:b=f>0?1:(A+="\f",-1);break;case 44:i[l++]=(ln(A)-1)*b,b=1;break;case 64:un()===45&&(A+=ha(Dt())),y=un(),f=g=ln(x=A+=p9(pa())),C++;break;case 45:m===45&&ln(A)==2&&(h=0)}}return s}function bf(e,t,n,r,o,s,a,i,c,l,f){for(var g=o-1,y=o===0?s:[""],E=Nc(y),m=0,h=0,p=0;m<r;++m)for(var b=0,C=Yo(e,g+1,g=r9(h=a[m])),x=e;b<E;++b)(x=pf(h>0?y[b]+" "+C:ke(C,/&\f/g,y[b])))&&(c[p++]=x);return fa(e,t,n,o===0?Fc:i,c,l,f)}function g9(e,t,n){return fa(e,t,n,df,la(c9()),Yo(e,2,-2),0)}function yf(e,t,n,r){return fa(e,t,n,kc,Yo(e,0,r),Yo(e,r+1,-1),r)}function so(e,t){for(var n="",r=Nc(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function m9(e,t,n,r){switch(e.type){case n9:if(e.children.length)break;case t9:case kc:return e.return=e.return||e.value;case df:return"";case ff:return e.return=e.value+"{"+so(e.children,r)+"}";case Fc:e.value=e.props.join(",")}return ln(n=so(e.children,r))?e.return=e.value+"{"+n+"}":""}function b9(e){var t=Nc(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 y9(e){return function(t){t.root||(t=t.return)&&e(t)}}function C9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var x9=function(t,n,r){for(var o=0,s=0;o=s,s=un(),o===38&&s===12&&(n[r]=1),!Qo(s);)Dt();return qo(t,vt)},E9=function(t,n){var r=-1,o=44;do switch(Qo(o)){case 0:o===38&&un()===12&&(n[r]=1),t[r]+=x9(vt-1,n,r);break;case 2:t[r]+=ha(o);break;case 4:if(o===44){t[++r]=un()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=la(o)}while(o=Dt());return t},v9=function(t,n){return mf(E9(gf(t),n))},Cf=new WeakMap,w9=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&&!Cf.get(r))&&!o){Cf.set(t,!0);for(var s=[],a=v9(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var f=0;f<i.length;f++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},I9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function xf(e,t){switch(s9(e,t)){case 5103:return Fe+"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 Fe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Fe+e+ca+e+dt+e+e;case 6828:case 4268:return Fe+e+dt+e+e;case 6165:return Fe+e+dt+"flex-"+e+e;case 5187:return Fe+e+ke(e,/(\w+).+(:[^]+)/,Fe+"box-$1$2"+dt+"flex-$1$2")+e;case 5443:return Fe+e+dt+"flex-item-"+ke(e,/flex-|-self/,"")+e;case 4675:return Fe+e+dt+"flex-line-pack"+ke(e,/align-content|flex-|-self/,"")+e;case 5548:return Fe+e+dt+ke(e,"shrink","negative")+e;case 5292:return Fe+e+dt+ke(e,"basis","preferred-size")+e;case 6060:return Fe+"box-"+ke(e,"-grow","")+Fe+e+dt+ke(e,"grow","positive")+e;case 4554:return Fe+ke(e,/([^-])(transform)/g,"$1"+Fe+"$2")+e;case 6187:return ke(ke(ke(e,/(zoom-|grab)/,Fe+"$1"),/(image-set)/,Fe+"$1"),e,"")+e;case 5495:case 3959:return ke(e,/(image-set\([^]*)/,Fe+"$1$`$1");case 4968:return ke(ke(e,/(.+:)(flex-)?(.*)/,Fe+"box-pack:$3"+dt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Fe+e+e;case 4095:case 3583:case 4068:case 2532:return ke(e,/(.+)-inline(.+)/,Fe+"$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(ln(e)-1-t>6)switch(it(e,t+1)){case 109:if(it(e,t+4)!==45)break;case 102:return ke(e,/(.+:)(.+)-([^]+)/,"$1"+Fe+"$2-$3$1"+ca+(it(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Dc(e,"stretch")?xf(ke(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(it(e,t+1)!==115)break;case 6444:switch(it(e,ln(e)-3-(~Dc(e,"!important")&&10))){case 107:return ke(e,":",":"+Fe)+e;case 101:return ke(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Fe+(it(e,14)===45?"inline-":"")+"box$3$1"+Fe+"$2$3$1"+dt+"$2box$3")+e}break;case 5936:switch(it(e,t+11)){case 114:return Fe+e+dt+ke(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Fe+e+dt+ke(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Fe+e+dt+ke(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Fe+e+dt+e+e}return e}var _9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case kc:t.return=xf(t.value,t.length);break;case ff:return so([Jo(t,{value:ke(t.value,"@","@"+Fe)})],o);case Fc:if(t.length)return i9(t.props,function(s){switch(a9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return so([Jo(t,{props:[ke(s,/:(read-\w+)/,":"+ca+"$1")]})],o);case"::placeholder":return so([Jo(t,{props:[ke(s,/:(plac\w+)/,":"+Fe+"input-$1")]}),Jo(t,{props:[ke(s,/:(plac\w+)/,":"+ca+"$1")]}),Jo(t,{props:[ke(s,/:(plac\w+)/,dt+"input-$1")]})],o)}return""})}},S9=[_9],A9=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||S9,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(" "),b=1;b<p.length;b++)s[p[b]]=!0;i.push(h)});var c,l=[w9,I9];{var f,g=[m9,y9(function(h){f.insert(h)})],y=b9(l.concat(o,g)),E=function(p){return so(h9(p),y)};c=function(p,b,C,x){f=C,E(p?p+"{"+b.styles+"}":b.styles),x&&(m.inserted[b.name]=!0)}}var m={key:n,sheet:new e9({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(i),m},Mc={exports:{}},Ne={};/** @license React v16.13.1
|
|
590
|
+
`,Uy=(e,{closeToast:t})=>d.jsx($y,{children:d.jsx("img",{src:Yy,onClick:t})}),aa=({message:e})=>d.jsxs(Jy,{children:[d.jsx(Qy,{}),d.jsx(qy,{children:e})]});function Se(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:d.jsx(Uy,{}),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(d.jsx(aa,{message:t}),{...o,icon:!1});break}case"error":{s=De.error(d.jsx(aa,{message:t}),{...o,icon:!1});break}case"info-dark":{s=De.info(d.jsx(aa,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=De.info(d.jsx(aa,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Ky(s)},r&&!isNaN(r)?Number(r):5e3),s}function Ky(e){De.dismiss(e)}const z0={updateFormApiStatus:K.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:K.IDLE,unlinkCardApiStatus:K.IDLE,linkCardApiStatus:K.IDLE,optionsMap:null,dropdownOptionsApis:K.IDLE,dependentFieldsMap:{},createFormApiStatus:K.IDLE,currentResourceDetailsApiStatus:K.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},e6="/v1/api"+"/templates/metadata",Y0={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},t6="Required Field",n6="Invalid date",J0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,r6=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,q0="Please enter a valid URL",o6="Please enter valid ID",s6="Please enter valid input",a6="URL must start with https://",i6="URL should not end with a slash",c6="Invalid email address",l6="Email must be a string",Q0="Invalid date",u6="Date cannot be in the past",d6="Date cannot be in the future",f6="Invalid number",p6="Invalid text",h6=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)}),Ee({url:`${e6}?${t.toString()}`,method:Y0.GET})},g6="/v1/api/connectors/ug",$0=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=g6+`?${t.toString()}`,r=await Ee({url:n,method:Y0.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 _c=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(_c||{});const m6={[_c.ADD]:(e,t)=>e+t,[_c.MULTIPLY]:(e,t)=>e*t},b6=e=>e,U0=()=>{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}`},K0=(e,t)=>{let n;const r=m6[t]??b6;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},ef=(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},y6=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),tf=e=>typeof e=="object"&&e!==null&&"value"in e&&"label"in e,x6={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},C6="/v1/api/connectors/forms/:formId/get_forms_custom_fields",E6=async({formId:e,args:t})=>{try{const n=await Ee({url:y6(C6,{formId:e}),data:{args:t},method:x6.POST});return(n==null?void 0:n.data).fieldList}catch(n){throw console.error(n),n}},nf=(e,t)=>{if(!t)return{isApiEnabled:!0,args:{},argsMap:t};const n={};for(const r in t){const o=t[r],s=tf(e[o])?e[o].value:e[o];if(!s)return{isApiEnabled:!1,args:{}};n[r]=s}return{isApiEnabled:!0,args:n,argsMap:t}},v6=({formId:e,argsMap:t,formData:n,enabled:r=!0,delay:o=500})=>{const[s,a]=I.useState(()=>nf(n,t));I.useEffect(()=>{const l=setTimeout(()=>{a(nf(n,t))},o);return()=>clearTimeout(l)},[n,t,o]);const i=s.argsMap===t,c=Zt({queryKey:["customFormFields",e,s.args],queryFn:()=>E6({formId:e,args:s.args}),enabled:!!e&&r&&i&&s.isApiEnabled,staleTime:0});return{...c,data:s.isApiEnabled?c.data:void 0}},w6=e=>{const t={current:null};return n=>{t.current&&clearTimeout(t.current),t.current=setTimeout(n,e)}};let eo={};const I6={get length(){return Object.keys(eo).length},getItem(e){return eo[e]??null},setItem(e,t){eo[e]=t},removeItem(e){delete eo[e]},clear(){eo={}},key(e){return Object.keys(eo)[e]}},_6={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},Yo=(e="LOCAL")=>_6[e]??I6,rf=(e="LOCAL")=>{const t=Yo(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)}}}},Sc=Symbol("root"),S6="connectors-store",A6=e=>{const{name:t,initialState:n,persist:r,persistKey:o=`${S6}-${t}`}=e,s=rf("LOCAL"),a={...n},i=r?s.getItem(o)??a:a,c=new Map,l=new Map;l.set(Sc,new Set);const f=(m,h,p=!0)=>{var C;const b=Symbol("callback");c.set(b,m);const x=h||Sc;if(l.has(x)||l.set(x,new Set),(C=l.get(x))==null||C.add(b),p){const w=h?i[h]:i;m(w)}return()=>{var w;c.delete(b),(w=l.get(x))==null||w.delete(b)}},g=(m,h)=>{h?i[h]=m:Object.assign(i,m),E();const p=h||Sc,b=l.get(p);if(b)for(const x of b){const C=c.get(x);C==null||C(h?i[h]:i)}},y=m=>m?i[m]:{...i},E=()=>{r&&s.setItem(o,i)};return{subscribe:f,setData:g,getData:y}},T6=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?i6:J0.test(n)?!0:e||q0:a6}return!1},L6=e=>t=>t&&typeof t=="string"?r6.test(t)?!0:e||c6:l6,O6=e=>t=>t==null||t===""?e||t6:!0,F6=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===n6)return Q0;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||u6:i&&o>s?e||d6:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:Q0},k6=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||f6},Ac=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||p6},D6=e=>t=>typeof t=="string"?t.startsWith("https:")?J0.test(t)?!0:e||q0:t.trim().length>0?!0:e||o6:e||s6,N6=["async-select","select","multi-select"],of=(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??"";if(o.type==="date"){const a=new Date(parseInt(s));n[r]=isNaN(a.getTime())?s:a.toISOString();continue}if(N6.includes(o.type)){n[r]={label:o.label,value:o.value},t&&o.type==="multi-select"&&(n[r]=[n[r]]);continue}n[r]=s}return n},R6=(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];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},M6=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 Er(e){"@babel/helpers - typeof";return Er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Er(e)}function P6(e,t){if(Er(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Er(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sf(e){var t=P6(e,"string");return Er(t)=="symbol"?t:t+""}function to(e,t,n){return(t=sf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function af(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 re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?af(Object(n),!0).forEach(function(r){to(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):af(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j6(e){if(Array.isArray(e))return e}function B6(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,a,i=[],c=!0,l=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);c=!0);}catch(f){l=!0,o=f}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function Tc(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 cf(e,t){if(e){if(typeof e=="string")return Tc(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)?Tc(e,t):void 0}}function V6(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
591
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(e,t){return j6(e)||B6(e,t)||cf(e,t)||V6()}function G6(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 Kt(e,t){if(e==null)return{};var n,r,o=G6(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 H6=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Lc(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,a=s===void 0?null:s,i=e.inputValue,c=e.menuIsOpen,l=e.onChange,f=e.onInputChange,g=e.onMenuClose,y=e.onMenuOpen,E=e.value,m=Kt(e,H6),h=I.useState(i!==void 0?i:n),p=ot(h,2),b=p[0],x=p[1],C=I.useState(c!==void 0?c:o),w=ot(C,2),v=w[0],_=w[1],A=I.useState(E!==void 0?E:a),S=ot(A,2),L=S[0],N=S[1],D=I.useCallback(function(G,q){typeof l=="function"&&l(G,q),N(G)},[l]),k=I.useCallback(function(G,q){var oe;typeof f=="function"&&(oe=f(G,q)),x(oe!==void 0?oe:G)},[f]),M=I.useCallback(function(){typeof y=="function"&&y(),_(!0)},[y]),B=I.useCallback(function(){typeof g=="function"&&g(),_(!1)},[g]),Y=i!==void 0?i:b,J=c!==void 0?c:v,H=E!==void 0?E:L;return re(re({},m),{},{inputValue:Y,menuIsOpen:J,onChange:D,onInputChange:k,onMenuClose:B,onMenuOpen:M,value:H})}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},de.apply(null,arguments)}function W6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lf(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,sf(r.key),r)}}function Z6(e,t,n){return t&&lf(e.prototype,t),n&&lf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oc(e,t){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Oc(e,t)}function X6(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&&Oc(e,t)}function ia(e){return ia=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ia(e)}function uf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uf=function(){return!!e})()}function z6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Y6(e,t){if(t&&(Er(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z6(e)}function J6(e){var t=uf();return function(){var n,r=ia(e);if(t){var o=ia(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Y6(this,n)}}function q6(e){if(Array.isArray(e))return Tc(e)}function Q6(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $6(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
592
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function no(e){return q6(e)||Q6(e)||cf(e)||$6()}var U6=!1;function K6(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 e9(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 t9=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?!U6: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(e9(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=K6(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-",ca="-moz-",Fe="-webkit-",df="comm",Fc="rule",kc="decl",n9="@import",ff="@keyframes",r9="@layer",o9=Math.abs,la=String.fromCharCode,s9=Object.assign;function a9(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 pf(e){return e.trim()}function i9(e,t){return(e=t.exec(e))?e[0]:e}function ke(e,t,n){return e.replace(t,n)}function Dc(e,t){return e.indexOf(t)}function it(e,t){return e.charCodeAt(t)|0}function Jo(e,t,n){return e.slice(t,n)}function ln(e){return e.length}function Nc(e){return e.length}function ua(e,t){return t.push(e),e}function c9(e,t){return e.map(t).join("")}var da=1,ro=1,hf=0,vt=0,Ke=0,oo="";function fa(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:da,column:ro,length:a,return:""}}function qo(e,t){return s9(fa("",null,null,"",null,null,0),e,{length:-e.length},t)}function l9(){return Ke}function u9(){return Ke=vt>0?it(oo,--vt):0,ro--,Ke===10&&(ro=1,da--),Ke}function Dt(){return Ke=vt<hf?it(oo,vt++):0,ro++,Ke===10&&(ro=1,da++),Ke}function un(){return it(oo,vt)}function pa(){return vt}function Qo(e,t){return Jo(oo,e,t)}function $o(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 gf(e){return da=ro=1,hf=ln(oo=e),vt=0,[]}function mf(e){return oo="",e}function ha(e){return pf(Qo(vt-1,Rc(e===91?e+2:e===40?e+1:e)))}function d9(e){for(;(Ke=un())&&Ke<33;)Dt();return $o(e)>2||$o(Ke)>3?"":" "}function f9(e,t){for(;--t&&Dt()&&!(Ke<48||Ke>102||Ke>57&&Ke<65||Ke>70&&Ke<97););return Qo(e,pa()+(t<6&&un()==32&&Dt()==32))}function Rc(e){for(;Dt();)switch(Ke){case e:return vt;case 34:case 39:e!==34&&e!==39&&Rc(Ke);break;case 40:e===41&&Rc(e);break;case 92:Dt();break}return vt}function p9(e,t){for(;Dt()&&e+Ke!==57;)if(e+Ke===84&&un()===47)break;return"/*"+Qo(t,vt-1)+"*"+la(e===47?e:Dt())}function h9(e){for(;!$o(un());)Dt();return Qo(e,vt)}function g9(e){return mf(ga("",null,null,null,[""],e=gf(e),0,[0],e))}function ga(e,t,n,r,o,s,a,i,c){for(var l=0,f=0,g=a,y=0,E=0,m=0,h=1,p=1,b=1,x=0,C="",w=o,v=s,_=r,A=C;p;)switch(m=x,x=Dt()){case 40:if(m!=108&&it(A,g-1)==58){Dc(A+=ke(ha(x),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:A+=ha(x);break;case 9:case 10:case 13:case 32:A+=d9(m);break;case 92:A+=f9(pa()-1,7);continue;case 47:switch(un()){case 42:case 47:ua(m9(p9(Dt(),pa()),t,n),c);break;default:A+="/"}break;case 123*h:i[l++]=ln(A)*b;case 125*h:case 59:case 0:switch(x){case 0:case 125:p=0;case 59+f:b==-1&&(A=ke(A,/\f/g,"")),E>0&&ln(A)-g&&ua(E>32?yf(A+";",r,n,g-1):yf(ke(A," ","")+";",r,n,g-2),c);break;case 59:A+=";";default:if(ua(_=bf(A,t,n,l,f,o,i,C,w=[],v=[],g),s),x===123)if(f===0)ga(A,t,_,_,w,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&&ua(bf(e,_,_,0,0,o,i,C,o,w=[],g),v),o,v,g,i,r?w:v);break;default:ga(A,_,_,_,[""],v,0,i,v)}}l=f=E=0,h=b=1,C=A="",g=a;break;case 58:g=1+ln(A),E=m;default:if(h<1){if(x==123)--h;else if(x==125&&h++==0&&u9()==125)continue}switch(A+=la(x),x*h){case 38:b=f>0?1:(A+="\f",-1);break;case 44:i[l++]=(ln(A)-1)*b,b=1;break;case 64:un()===45&&(A+=ha(Dt())),y=un(),f=g=ln(C=A+=h9(pa())),x++;break;case 45:m===45&&ln(A)==2&&(h=0)}}return s}function bf(e,t,n,r,o,s,a,i,c,l,f){for(var g=o-1,y=o===0?s:[""],E=Nc(y),m=0,h=0,p=0;m<r;++m)for(var b=0,x=Jo(e,g+1,g=o9(h=a[m])),C=e;b<E;++b)(C=pf(h>0?y[b]+" "+x:ke(x,/&\f/g,y[b])))&&(c[p++]=C);return fa(e,t,n,o===0?Fc:i,c,l,f)}function m9(e,t,n){return fa(e,t,n,df,la(l9()),Jo(e,2,-2),0)}function yf(e,t,n,r){return fa(e,t,n,kc,Jo(e,0,r),Jo(e,r+1,-1),r)}function so(e,t){for(var n="",r=Nc(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 r9:if(e.children.length)break;case n9:case kc:return e.return=e.return||e.value;case df:return"";case ff:return e.return=e.value+"{"+so(e.children,r)+"}";case Fc:e.value=e.props.join(",")}return ln(n=so(e.children,r))?e.return=e.value+"{"+n+"}":""}function y9(e){var t=Nc(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 x9(e){return function(t){t.root||(t=t.return)&&e(t)}}function C9(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var E9=function(t,n,r){for(var o=0,s=0;o=s,s=un(),o===38&&s===12&&(n[r]=1),!$o(s);)Dt();return Qo(t,vt)},v9=function(t,n){var r=-1,o=44;do switch($o(o)){case 0:o===38&&un()===12&&(n[r]=1),t[r]+=E9(vt-1,n,r);break;case 2:t[r]+=ha(o);break;case 4:if(o===44){t[++r]=un()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=la(o)}while(o=Dt());return t},w9=function(t,n){return mf(v9(gf(t),n))},xf=new WeakMap,I9=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&&!xf.get(r))&&!o){xf.set(t,!0);for(var s=[],a=w9(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var f=0;f<i.length;f++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[f]):i[f]+" "+a[c]}}},_9=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Cf(e,t){switch(a9(e,t)){case 5103:return Fe+"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 Fe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Fe+e+ca+e+dt+e+e;case 6828:case 4268:return Fe+e+dt+e+e;case 6165:return Fe+e+dt+"flex-"+e+e;case 5187:return Fe+e+ke(e,/(\w+).+(:[^]+)/,Fe+"box-$1$2"+dt+"flex-$1$2")+e;case 5443:return Fe+e+dt+"flex-item-"+ke(e,/flex-|-self/,"")+e;case 4675:return Fe+e+dt+"flex-line-pack"+ke(e,/align-content|flex-|-self/,"")+e;case 5548:return Fe+e+dt+ke(e,"shrink","negative")+e;case 5292:return Fe+e+dt+ke(e,"basis","preferred-size")+e;case 6060:return Fe+"box-"+ke(e,"-grow","")+Fe+e+dt+ke(e,"grow","positive")+e;case 4554:return Fe+ke(e,/([^-])(transform)/g,"$1"+Fe+"$2")+e;case 6187:return ke(ke(ke(e,/(zoom-|grab)/,Fe+"$1"),/(image-set)/,Fe+"$1"),e,"")+e;case 5495:case 3959:return ke(e,/(image-set\([^]*)/,Fe+"$1$`$1");case 4968:return ke(ke(e,/(.+:)(flex-)?(.*)/,Fe+"box-pack:$3"+dt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Fe+e+e;case 4095:case 3583:case 4068:case 2532:return ke(e,/(.+)-inline(.+)/,Fe+"$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(ln(e)-1-t>6)switch(it(e,t+1)){case 109:if(it(e,t+4)!==45)break;case 102:return ke(e,/(.+:)(.+)-([^]+)/,"$1"+Fe+"$2-$3$1"+ca+(it(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Dc(e,"stretch")?Cf(ke(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(it(e,t+1)!==115)break;case 6444:switch(it(e,ln(e)-3-(~Dc(e,"!important")&&10))){case 107:return ke(e,":",":"+Fe)+e;case 101:return ke(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Fe+(it(e,14)===45?"inline-":"")+"box$3$1"+Fe+"$2$3$1"+dt+"$2box$3")+e}break;case 5936:switch(it(e,t+11)){case 114:return Fe+e+dt+ke(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Fe+e+dt+ke(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Fe+e+dt+ke(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Fe+e+dt+e+e}return e}var S9=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case kc:t.return=Cf(t.value,t.length);break;case ff:return so([qo(t,{value:ke(t.value,"@","@"+Fe)})],o);case Fc:if(t.length)return c9(t.props,function(s){switch(i9(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return so([qo(t,{props:[ke(s,/:(read-\w+)/,":"+ca+"$1")]})],o);case"::placeholder":return so([qo(t,{props:[ke(s,/:(plac\w+)/,":"+Fe+"input-$1")]}),qo(t,{props:[ke(s,/:(plac\w+)/,":"+ca+"$1")]}),qo(t,{props:[ke(s,/:(plac\w+)/,dt+"input-$1")]})],o)}return""})}},A9=[S9],T9=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||A9,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(" "),b=1;b<p.length;b++)s[p[b]]=!0;i.push(h)});var c,l=[I9,_9];{var f,g=[b9,x9(function(h){f.insert(h)})],y=y9(l.concat(o,g)),E=function(p){return so(g9(p),y)};c=function(p,b,x,C){f=x,E(p?p+"{"+b.styles+"}":b.styles),C&&(m.inserted[b.name]=!0)}}var m={key:n,sheet:new t9({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(i),m},Mc={exports:{}},Ne={};/** @license React v16.13.1
|
|
593
593
|
* react-is.production.min.js
|
|
594
594
|
*
|
|
595
595
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
596
596
|
*
|
|
597
597
|
* This source code is licensed under the MIT license found in the
|
|
598
598
|
* LICENSE file in the root directory of this source tree.
|
|
599
|
-
*/var Ef;function
|
|
599
|
+
*/var Ef;function L9(){if(Ef)return Ne;Ef=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function C(v){if(typeof v=="object"&&v!==null){var _=v.$$typeof;switch(_){case t:switch(v=v.type,v){case c:case l:case r:case s:case o:case g:return v;default:switch(v=v&&v.$$typeof,v){case i:case f:case m:case E:case a:return v;default:return _}}case n:return _}}}function w(v){return C(v)===l}return Ne.AsyncMode=c,Ne.ConcurrentMode=l,Ne.ContextConsumer=i,Ne.ContextProvider=a,Ne.Element=t,Ne.ForwardRef=f,Ne.Fragment=r,Ne.Lazy=m,Ne.Memo=E,Ne.Portal=n,Ne.Profiler=s,Ne.StrictMode=o,Ne.Suspense=g,Ne.isAsyncMode=function(v){return w(v)||C(v)===c},Ne.isConcurrentMode=w,Ne.isContextConsumer=function(v){return C(v)===i},Ne.isContextProvider=function(v){return C(v)===a},Ne.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},Ne.isForwardRef=function(v){return C(v)===f},Ne.isFragment=function(v){return C(v)===r},Ne.isLazy=function(v){return C(v)===m},Ne.isMemo=function(v){return C(v)===E},Ne.isPortal=function(v){return C(v)===n},Ne.isProfiler=function(v){return C(v)===s},Ne.isStrictMode=function(v){return C(v)===o},Ne.isSuspense=function(v){return C(v)===g},Ne.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===l||v===s||v===o||v===g||v===y||typeof v=="object"&&v!==null&&(v.$$typeof===m||v.$$typeof===E||v.$$typeof===a||v.$$typeof===i||v.$$typeof===f||v.$$typeof===p||v.$$typeof===b||v.$$typeof===x||v.$$typeof===h)},Ne.typeOf=C,Ne}var Re={};/** @license React v16.13.1
|
|
600
600
|
* react-is.development.js
|
|
601
601
|
*
|
|
602
602
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
603
603
|
*
|
|
604
604
|
* This source code is licensed under the MIT license found in the
|
|
605
605
|
* LICENSE file in the root directory of this source tree.
|
|
606
|
-
*/var vf;function L9(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function x(z){return typeof z=="string"||typeof z=="function"||z===r||z===l||z===s||z===o||z===g||z===y||typeof z=="object"&&z!==null&&(z.$$typeof===m||z.$$typeof===E||z.$$typeof===a||z.$$typeof===i||z.$$typeof===f||z.$$typeof===p||z.$$typeof===b||z.$$typeof===C||z.$$typeof===h)}function w(z){if(typeof z=="object"&&z!==null){var Ae=z.$$typeof;switch(Ae){case t:var Ge=z.type;switch(Ge){case c:case l:case r:case s:case o:case g:return Ge;default:var We=Ge&&Ge.$$typeof;switch(We){case i:case f:case m:case E:case a:return We;default:return Ae}}case n:return Ae}}}var v=c,_=l,A=i,S=a,L=t,N=f,D=r,k=m,M=E,B=n,Y=s,J=o,H=g,G=!1;function q(z){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),oe(z)||w(z)===c}function oe(z){return w(z)===l}function te(z){return w(z)===i}function V(z){return w(z)===a}function W(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function R(z){return w(z)===f}function X(z){return w(z)===r}function $(z){return w(z)===m}function ae(z){return w(z)===E}function ie(z){return w(z)===n}function P(z){return w(z)===s}function ee(z){return w(z)===o}function ye(z){return w(z)===g}Re.AsyncMode=v,Re.ConcurrentMode=_,Re.ContextConsumer=A,Re.ContextProvider=S,Re.Element=L,Re.ForwardRef=N,Re.Fragment=D,Re.Lazy=k,Re.Memo=M,Re.Portal=B,Re.Profiler=Y,Re.StrictMode=J,Re.Suspense=H,Re.isAsyncMode=q,Re.isConcurrentMode=oe,Re.isContextConsumer=te,Re.isContextProvider=V,Re.isElement=W,Re.isForwardRef=R,Re.isFragment=X,Re.isLazy=$,Re.isMemo=ae,Re.isPortal=ie,Re.isProfiler=P,Re.isStrictMode=ee,Re.isSuspense=ye,Re.isValidElementType=x,Re.typeOf=w}()),Re}process.env.NODE_ENV==="production"?Mc.exports=T9():Mc.exports=L9();var O9=Mc.exports,wf=O9,F9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},k9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},If={};If[wf.ForwardRef]=F9,If[wf.Memo]=k9;var D9=!0;function N9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var _f=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||D9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},R9=function(t,n,r){_f(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 M9(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 P9={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},j9=!1,B9=/[A-Z]|^ms/g,V9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sf=function(t){return t.charCodeAt(1)===45},Af=function(t){return t!=null&&typeof t!="boolean"},Pc=C9(function(e){return Sf(e)?e:e.replace(B9,"-$&").toLowerCase()}),Tf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(V9,function(r,o,s){return dn={name:o,styles:s,next:dn},o})}return P9[t]!==1&&!Sf(t)&&typeof n=="number"&&n!==0?n+"px":n},G9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function $o(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 dn={name:o.name,styles:o.styles,next:dn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)dn={name:a.name,styles:a.styles,next:dn},a=a.next;var i=s.styles+";";return i}return H9(e,t,n)}case"function":{if(e!==void 0){var c=dn,l=n(e);return dn=c,$o(e,t,l)}break}}var f=n;return f}function H9(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=$o(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;Af(i)&&(r+=Pc(s)+":"+Tf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&j9)throw new Error(G9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)Af(a[c])&&(r+=Pc(s)+":"+Tf(s,a[c])+";");else{var l=$o(e,t,a);switch(s){case"animation":case"animationName":{r+=Pc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var Lf=/label:\s*([^\s;{]+)\s*(;|$)/g,dn;function Of(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="";dn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=$o(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=$o(n,t,e[i]),r){var c=s;o+=c[i]}Lf.lastIndex=0;for(var l="",f;(f=Lf.exec(o))!==null;)l+="-"+f[1];var g=M9(o)+l;return{name:g,styles:o,next:dn}}var W9=function(t){return t()},Z9=T.useInsertionEffect?T.useInsertionEffect:!1,X9=Z9||W9,z9=!1,Ff=T.createContext(typeof HTMLElement<"u"?A9({key:"css"}):null);Ff.Provider;var Y9=function(t){return I.forwardRef(function(n,r){var o=I.useContext(Ff);return t(n,o,r)})},J9=T.createContext({}),jc={}.hasOwnProperty,Bc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",q9=function(t,n){var r={};for(var o in n)jc.call(n,o)&&(r[o]=n[o]);return r[Bc]=t,r},Q9=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return _f(n,r,o),X9(function(){return R9(n,r,o)}),null},$9=Y9(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Bc],s=[r],a="";typeof e.className=="string"?a=N9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=Of(s,void 0,T.useContext(J9));a+=t.key+"-"+i.name;var c={};for(var l in e)jc.call(e,l)&&l!=="css"&&l!==Bc&&!z9&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement(Q9,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),U9=$9,le=function(t,n){var r=arguments;if(n==null||!jc.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=U9,s[1]=q9(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function Vc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Of(t)}var K9=function(){var t=Vc.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 eC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const tC=Math.min,nC=Math.max,ma=Math.round,ba=Math.floor,ya=e=>({x:e,y:e});function rC(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 Ca(){return typeof window<"u"}function kf(e){return Nf(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Df(e){var t;return(t=(Nf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nf(e){return Ca()?e instanceof Node||e instanceof wn(e).Node:!1}function oC(e){return Ca()?e instanceof Element||e instanceof wn(e).Element:!1}function Gc(e){return Ca()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function Rf(e){return!Ca()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}function Mf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Hc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function sC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function aC(e){return["html","body","#document"].includes(kf(e))}function Hc(e){return wn(e).getComputedStyle(e)}function iC(e){if(kf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rf(e)&&e.host||Df(e);return Rf(t)?t.host:t}function Pf(e){const t=iC(e);return aC(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gc(t)&&Mf(t)?t:Pf(t)}function xa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Pf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=wn(o);if(s){const i=Wc(a);return t.concat(a,a.visualViewport||[],Mf(o)?o:[],i&&n?xa(i):[])}return t.concat(o,xa(o,[],n))}function Wc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cC(e){const t=Hc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=ma(n)!==s||ma(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Zc(e){return oC(e)?e:e.contextElement}function jf(e){const t=Zc(e);if(!Gc(t))return ya(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=cC(t);let a=(s?ma(n.width):n.width)/r,i=(s?ma(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const lC=ya(0);function uC(e){const t=wn(e);return!sC()||!t.visualViewport?lC:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dC(e,t,n){return!1}function Bf(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Zc(e);let a=ya(1);t&&(a=jf(e));const i=dC()?uC(s):ya(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,g=o.height/a.y;if(s){const y=wn(s),E=r;let m=y,h=Wc(m);for(;h&&r&&E!==m;){const p=jf(h),b=h.getBoundingClientRect(),C=Hc(h),x=b.left+(h.clientLeft+parseFloat(C.paddingLeft))*p.x,w=b.top+(h.clientTop+parseFloat(C.paddingTop))*p.y;c*=p.x,l*=p.y,f*=p.x,g*=p.y,c+=x,l+=w,m=wn(h),h=Wc(m)}}return rC({width:f,height:g,x:c,y:l})}function fC(e,t){let n=null,r;const o=Df(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const{left:l,top:f,width:g,height:y}=e.getBoundingClientRect();if(i||t(),!g||!y)return;const E=ba(f),m=ba(o.clientWidth-(l+g)),h=ba(o.clientHeight-(f+y)),p=ba(l),C={rootMargin:-E+"px "+-m+"px "+-h+"px "+-p+"px",threshold:nC(0,tC(1,c))||1};let x=!0;function w(v){const _=v[0].intersectionRatio;if(_!==c){if(!x)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(w,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,C)}n.observe(e)}return a(!0),s}function pC(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Zc(e),f=o||s?[...l?xa(l):[],...xa(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const g=l&&i?fC(l,n):null;let y=-1,E=null;a&&(E=new ResizeObserver(b=>{let[C]=b;C&&C.target===l&&E&&(E.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=E)==null||x.observe(t)})),n()}),l&&!c&&E.observe(l),E.observe(t));let m,h=c?Bf(e):null;c&&p();function p(){const b=Bf(e);h&&(b.x!==h.x||b.y!==h.y||b.width!==h.width||b.height!==h.height)&&n(),h=b,m=requestAnimationFrame(p)}return n(),()=>{var b;f.forEach(C=>{o&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),g==null||g(),(b=E)==null||b.disconnect(),E=null,c&&cancelAnimationFrame(m)}}var Xc=I.useLayoutEffect,hC=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ea=function(){};function gC(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function mC(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(gC(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var va=function(t){return SC(t)?t.filter(Boolean):Er(t)==="object"&&t!==null?[t]:[]},Vf=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Kt(t,hC);return re({},n)},ze=function(t,n,r){var o=t.cx,s=t.getStyles,a=t.getClassNames,i=t.className;return{css:s(n,t),className:o(r??{},a(n,t),i)}};function bC(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function wa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function yC(e){return wa(e)?window.innerHeight:e.clientHeight}function Gf(e){return wa(e)?window.pageYOffset:e.scrollTop}function Ia(e,t){if(wa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function CC(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 xC(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]:Ea,o=Gf(e),s=t-o,a=10,i=0;function c(){i+=a;var l=xC(i,o,s,n);Ia(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Hf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Ia(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Ia(e,Math.max(t.offsetTop-o,0))}function EC(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Wf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function vC(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Zf=!1,wC={get passive(){return Zf=!0}},Sa=typeof window<"u"?window:{};Sa.addEventListener&&Sa.removeEventListener&&(Sa.addEventListener("p",Ea,wC),Sa.removeEventListener("p",Ea,!1));var IC=Zf;function _C(e){return e!=null}function SC(e){return Array.isArray(e)}function Uo(e,t,n){return e?t:n}function EL(e){return e}function vL(e){return e}var AC=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=ot(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=ot(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},TC=["children","innerProps"],LC=["children","innerProps"];function OC(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=CC(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),g=f.height,y=n.getBoundingClientRect(),E=y.bottom,m=y.height,h=y.top,p=n.offsetParent.getBoundingClientRect(),b=p.top,C=a?window.innerHeight:yC(c),x=Gf(c),w=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),_=b-v,A=C-h,S=_+x,L=g-x-h,N=E-C+x+w,D=x+h-v,k=160;switch(o){case"auto":case"bottom":if(A>=m)return{placement:"bottom",maxHeight:t};if(L>=m&&!a)return s&&_a(c,N,k),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&_a(c,N,k);var M=a?A-w:L-w;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var B=t,Y=a?_:S;return Y>=r&&(B=Math.min(Y-w-i,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return s&&Ia(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(_>=m)return{placement:"top",maxHeight:t};if(S>=m&&!a)return s&&_a(c,D,k),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var J=t;return(!a&&S>=r||a&&_>=r)&&(J=a?_-v:S-v),s&&_a(c,D,k),{placement:"top",maxHeight:J}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function FC(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Xf=function(t){return t==="auto"?"bottom":t},kC=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return re((r={label:"menu"},to(r,FC(o),"100%"),to(r,"position","absolute"),to(r,"width","100%"),to(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})},zf=I.createContext(null),DC=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,l=I.useContext(zf)||{},f=l.setPortalPlacement,g=I.useRef(null),y=I.useState(o),E=ot(y,2),m=E[0],h=E[1],p=I.useState(null),b=ot(p,2),C=b[0],x=b[1],w=c.spacing.controlHeight;return Xc(function(){var v=g.current;if(v){var _=a==="fixed",A=i&&!_,S=OC({maxHeight:o,menuEl:v,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:w});h(S.maxHeight),x(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,w]),n({ref:g,placerProps:re(re({},t),{},{placement:C||Xf(s),maxHeight:m})})},NC=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return le("div",de({},ze(t,"menu",{menu:!0}),{ref:r},o),n)},RC=NC,MC=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return re({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},PC=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return le("div",de({},ze(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Yf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return re({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},jC=Yf,BC=Yf,VC=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Kt(t,TC);return le("div",de({},ze(re(re({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},GC=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Kt(t,LC);return le("div",de({},ze(re(re({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},HC=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}},WC=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=I.useRef(null),l=I.useRef(null),f=I.useState(Xf(a)),g=ot(f,2),y=g[0],E=g[1],m=I.useMemo(function(){return{setPortalPlacement:E}},[]),h=I.useState(null),p=ot(h,2),b=p[0],C=p[1],x=I.useCallback(function(){if(o){var A=EC(o),S=i==="fixed"?0:window.pageYOffset,L=A[y]+S;(L!==(b==null?void 0:b.offset)||A.left!==(b==null?void 0:b.rect.left)||A.width!==(b==null?void 0:b.rect.width))&&C({offset:L,rect:A})}},[o,i,y,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);Xc(function(){x()},[x]);var w=I.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=pC(o,c.current,x,{elementResize:"ResizeObserver"in window}))},[o,x]);Xc(function(){w()},[w]);var v=I.useCallback(function(A){c.current=A,w()},[w]);if(!n&&i!=="fixed"||!b)return null;var _=le("div",de({ref:v},ze(re(re({},t),{},{offset:b.offset,position:i,rect:b.rect}),"menuPortal",{"menu-portal":!0}),s),r);return le(zf.Provider,{value:m},n?Be.createPortal(_,n):_)},ZC=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},XC=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return le("div",de({},ze(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},zC=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return re({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")})},YC=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return le("div",de({},ze(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},JC=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},qC=function(t){var n=t.children,r=t.innerProps;return le("div",de({},ze(t,"indicatorsContainer",{indicators:!0}),r),n)},Jf,QC=["size"],$C=["innerProps","isRtl","size"];function UC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var KC=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:UC},qf=function(t){var n=t.size,r=Kt(t,QC);return le("svg",de({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:KC},r))},zc=function(t){return le(qf,de({size:20},t),le("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"}))},Qf=function(t){return le(qf,de({size:20},t),le("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"}))},$f=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return re({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},ex=$f,tx=function(t){var n=t.children,r=t.innerProps;return le("div",de({},ze(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||le(Qf,null))},nx=$f,rx=function(t){var n=t.children,r=t.innerProps;return le("div",de({},ze(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||le(zc,null))},ox=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return re({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},sx=function(t){var n=t.innerProps;return le("span",de({},n,ze(t,"indicatorSeparator",{"indicator-separator":!0})))},ax=K9(Jf||(Jf=eC([`
|
|
606
|
+
*/var vf;function O9(){return vf||(vf=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,E=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,p=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function C(z){return typeof z=="string"||typeof z=="function"||z===r||z===l||z===s||z===o||z===g||z===y||typeof z=="object"&&z!==null&&(z.$$typeof===m||z.$$typeof===E||z.$$typeof===a||z.$$typeof===i||z.$$typeof===f||z.$$typeof===p||z.$$typeof===b||z.$$typeof===x||z.$$typeof===h)}function w(z){if(typeof z=="object"&&z!==null){var Ae=z.$$typeof;switch(Ae){case t:var Ge=z.type;switch(Ge){case c:case l:case r:case s:case o:case g:return Ge;default:var We=Ge&&Ge.$$typeof;switch(We){case i:case f:case m:case E:case a:return We;default:return Ae}}case n:return Ae}}}var v=c,_=l,A=i,S=a,L=t,N=f,D=r,k=m,M=E,B=n,Y=s,J=o,H=g,G=!1;function q(z){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),oe(z)||w(z)===c}function oe(z){return w(z)===l}function te(z){return w(z)===i}function V(z){return w(z)===a}function W(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function R(z){return w(z)===f}function X(z){return w(z)===r}function $(z){return w(z)===m}function ae(z){return w(z)===E}function ie(z){return w(z)===n}function P(z){return w(z)===s}function ee(z){return w(z)===o}function ye(z){return w(z)===g}Re.AsyncMode=v,Re.ConcurrentMode=_,Re.ContextConsumer=A,Re.ContextProvider=S,Re.Element=L,Re.ForwardRef=N,Re.Fragment=D,Re.Lazy=k,Re.Memo=M,Re.Portal=B,Re.Profiler=Y,Re.StrictMode=J,Re.Suspense=H,Re.isAsyncMode=q,Re.isConcurrentMode=oe,Re.isContextConsumer=te,Re.isContextProvider=V,Re.isElement=W,Re.isForwardRef=R,Re.isFragment=X,Re.isLazy=$,Re.isMemo=ae,Re.isPortal=ie,Re.isProfiler=P,Re.isStrictMode=ee,Re.isSuspense=ye,Re.isValidElementType=C,Re.typeOf=w}()),Re}process.env.NODE_ENV==="production"?Mc.exports=L9():Mc.exports=O9();var F9=Mc.exports,wf=F9,k9={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},D9={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},If={};If[wf.ForwardRef]=k9,If[wf.Memo]=D9;var N9=!0;function R9(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var _f=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||N9===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},M9=function(t,n,r){_f(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 P9(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 j9={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},B9=!1,V9=/[A-Z]|^ms/g,G9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sf=function(t){return t.charCodeAt(1)===45},Af=function(t){return t!=null&&typeof t!="boolean"},Pc=C9(function(e){return Sf(e)?e:e.replace(V9,"-$&").toLowerCase()}),Tf=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(G9,function(r,o,s){return dn={name:o,styles:s,next:dn},o})}return j9[t]!==1&&!Sf(t)&&typeof n=="number"&&n!==0?n+"px":n},H9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Uo(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 dn={name:o.name,styles:o.styles,next:dn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)dn={name:a.name,styles:a.styles,next:dn},a=a.next;var i=s.styles+";";return i}return W9(e,t,n)}case"function":{if(e!==void 0){var c=dn,l=n(e);return dn=c,Uo(e,t,l)}break}}var f=n;return f}function W9(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Uo(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;Af(i)&&(r+=Pc(s)+":"+Tf(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&B9)throw new Error(H9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)Af(a[c])&&(r+=Pc(s)+":"+Tf(s,a[c])+";");else{var l=Uo(e,t,a);switch(s){case"animation":case"animationName":{r+=Pc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var Lf=/label:\s*([^\s;{]+)\s*(;|$)/g,dn;function Of(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="";dn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Uo(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Uo(n,t,e[i]),r){var c=s;o+=c[i]}Lf.lastIndex=0;for(var l="",f;(f=Lf.exec(o))!==null;)l+="-"+f[1];var g=P9(o)+l;return{name:g,styles:o,next:dn}}var Z9=function(t){return t()},X9=T.useInsertionEffect?T.useInsertionEffect:!1,z9=X9||Z9,Y9=!1,Ff=T.createContext(typeof HTMLElement<"u"?T9({key:"css"}):null);Ff.Provider;var J9=function(t){return I.forwardRef(function(n,r){var o=I.useContext(Ff);return t(n,o,r)})},q9=T.createContext({}),jc={}.hasOwnProperty,Bc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Q9=function(t,n){var r={};for(var o in n)jc.call(n,o)&&(r[o]=n[o]);return r[Bc]=t,r},$9=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return _f(n,r,o),z9(function(){return M9(n,r,o)}),null},U9=J9(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Bc],s=[r],a="";typeof e.className=="string"?a=R9(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=Of(s,void 0,T.useContext(q9));a+=t.key+"-"+i.name;var c={};for(var l in e)jc.call(e,l)&&l!=="css"&&l!==Bc&&!Y9&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),T.createElement(T.Fragment,null,T.createElement($9,{cache:t,serialized:i,isStringTag:typeof o=="string"}),T.createElement(o,c))}),K9=U9,le=function(t,n){var r=arguments;if(n==null||!jc.call(n,"css"))return T.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=K9,s[1]=Q9(t,n);for(var a=2;a<o;a++)s[a]=r[a];return T.createElement.apply(null,s)};function Vc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Of(t)}var ex=function(){var t=Vc.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 tx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const nx=Math.min,rx=Math.max,ma=Math.round,ba=Math.floor,ya=e=>({x:e,y:e});function ox(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 xa(){return typeof window<"u"}function kf(e){return Nf(e)?(e.nodeName||"").toLowerCase():"#document"}function wn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Df(e){var t;return(t=(Nf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nf(e){return xa()?e instanceof Node||e instanceof wn(e).Node:!1}function sx(e){return xa()?e instanceof Element||e instanceof wn(e).Element:!1}function Gc(e){return xa()?e instanceof HTMLElement||e instanceof wn(e).HTMLElement:!1}function Rf(e){return!xa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wn(e).ShadowRoot}function Mf(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Hc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function ax(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ix(e){return["html","body","#document"].includes(kf(e))}function Hc(e){return wn(e).getComputedStyle(e)}function cx(e){if(kf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rf(e)&&e.host||Df(e);return Rf(t)?t.host:t}function Pf(e){const t=cx(e);return ix(t)?e.ownerDocument?e.ownerDocument.body:e.body:Gc(t)&&Mf(t)?t:Pf(t)}function Ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Pf(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=wn(o);if(s){const i=Wc(a);return t.concat(a,a.visualViewport||[],Mf(o)?o:[],i&&n?Ca(i):[])}return t.concat(o,Ca(o,[],n))}function Wc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lx(e){const t=Hc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Gc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=ma(n)!==s||ma(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function Zc(e){return sx(e)?e:e.contextElement}function jf(e){const t=Zc(e);if(!Gc(t))return ya(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=lx(t);let a=(s?ma(n.width):n.width)/r,i=(s?ma(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const ux=ya(0);function dx(e){const t=wn(e);return!ax()||!t.visualViewport?ux:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fx(e,t,n){return!1}function Bf(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=Zc(e);let a=ya(1);t&&(a=jf(e));const i=fx()?dx(s):ya(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,g=o.height/a.y;if(s){const y=wn(s),E=r;let m=y,h=Wc(m);for(;h&&r&&E!==m;){const p=jf(h),b=h.getBoundingClientRect(),x=Hc(h),C=b.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,w=b.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;c*=p.x,l*=p.y,f*=p.x,g*=p.y,c+=C,l+=w,m=wn(h),h=Wc(m)}}return ox({width:f,height:g,x:c,y:l})}function px(e,t){let n=null,r;const o=Df(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),s();const{left:l,top:f,width:g,height:y}=e.getBoundingClientRect();if(i||t(),!g||!y)return;const E=ba(f),m=ba(o.clientWidth-(l+g)),h=ba(o.clientHeight-(f+y)),p=ba(l),x={rootMargin:-E+"px "+-m+"px "+-h+"px "+-p+"px",threshold:rx(0,nx(1,c))||1};let C=!0;function w(v){const _=v[0].intersectionRatio;if(_!==c){if(!C)return a();_?a(!1,_):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(w,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(w,x)}n.observe(e)}return a(!0),s}function hx(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Zc(e),f=o||s?[...l?Ca(l):[],...Ca(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const g=l&&i?px(l,n):null;let y=-1,E=null;a&&(E=new ResizeObserver(b=>{let[x]=b;x&&x.target===l&&E&&(E.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var C;(C=E)==null||C.observe(t)})),n()}),l&&!c&&E.observe(l),E.observe(t));let m,h=c?Bf(e):null;c&&p();function p(){const b=Bf(e);h&&(b.x!==h.x||b.y!==h.y||b.width!==h.width||b.height!==h.height)&&n(),h=b,m=requestAnimationFrame(p)}return n(),()=>{var b;f.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),g==null||g(),(b=E)==null||b.disconnect(),E=null,c&&cancelAnimationFrame(m)}}var Xc=I.useLayoutEffect,gx=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ea=function(){};function mx(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function bx(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(mx(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var va=function(t){return Ax(t)?t.filter(Boolean):Er(t)==="object"&&t!==null?[t]:[]},Vf=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Kt(t,gx);return re({},n)},ze=function(t,n,r){var o=t.cx,s=t.getStyles,a=t.getClassNames,i=t.className;return{css:s(n,t),className:o(r??{},a(n,t),i)}};function yx(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function wa(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function xx(e){return wa(e)?window.innerHeight:e.clientHeight}function Gf(e){return wa(e)?window.pageYOffset:e.scrollTop}function Ia(e,t){if(wa(e)){window.scrollTo(0,t);return}e.scrollTop=t}function Cx(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 Ex(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]:Ea,o=Gf(e),s=t-o,a=10,i=0;function c(){i+=a;var l=Ex(i,o,s,n);Ia(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Hf(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Ia(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Ia(e,Math.max(t.offsetTop-o,0))}function vx(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function Wf(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function wx(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Zf=!1,Ix={get passive(){return Zf=!0}},Sa=typeof window<"u"?window:{};Sa.addEventListener&&Sa.removeEventListener&&(Sa.addEventListener("p",Ea,Ix),Sa.removeEventListener("p",Ea,!1));var _x=Zf;function Sx(e){return e!=null}function Ax(e){return Array.isArray(e)}function Ko(e,t,n){return e?t:n}function ML(e){return e}function PL(e){return e}var Tx=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=ot(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=ot(i,2),l=c[0],f=c[1];return a[l]=f,a},{})},Lx=["children","innerProps"],Ox=["children","innerProps"];function Fx(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=Cx(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var f=c.getBoundingClientRect(),g=f.height,y=n.getBoundingClientRect(),E=y.bottom,m=y.height,h=y.top,p=n.offsetParent.getBoundingClientRect(),b=p.top,x=a?window.innerHeight:xx(c),C=Gf(c),w=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),_=b-v,A=x-h,S=_+C,L=g-C-h,N=E-x+C+w,D=C+h-v,k=160;switch(o){case"auto":case"bottom":if(A>=m)return{placement:"bottom",maxHeight:t};if(L>=m&&!a)return s&&_a(c,N,k),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&A>=r){s&&_a(c,N,k);var M=a?A-w:L-w;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var B=t,Y=a?_:S;return Y>=r&&(B=Math.min(Y-w-i,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return s&&Ia(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(_>=m)return{placement:"top",maxHeight:t};if(S>=m&&!a)return s&&_a(c,D,k),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&_>=r){var J=t;return(!a&&S>=r||a&&_>=r)&&(J=a?_-v:S-v),s&&_a(c,D,k),{placement:"top",maxHeight:J}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function kx(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Xf=function(t){return t==="auto"?"bottom":t},Dx=function(t,n){var r,o=t.placement,s=t.theme,a=s.borderRadius,i=s.spacing,c=s.colors;return re((r={label:"menu"},to(r,kx(o),"100%"),to(r,"position","absolute"),to(r,"width","100%"),to(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})},zf=I.createContext(null),Nx=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,i=t.menuShouldScrollIntoView,c=t.theme,l=I.useContext(zf)||{},f=l.setPortalPlacement,g=I.useRef(null),y=I.useState(o),E=ot(y,2),m=E[0],h=E[1],p=I.useState(null),b=ot(p,2),x=b[0],C=b[1],w=c.spacing.controlHeight;return Xc(function(){var v=g.current;if(v){var _=a==="fixed",A=i&&!_,S=Fx({maxHeight:o,menuEl:v,minHeight:r,placement:s,shouldScroll:A,isFixedPosition:_,controlHeight:w});h(S.maxHeight),C(S.placement),f==null||f(S.placement)}},[o,s,a,i,r,f,w]),n({ref:g,placerProps:re(re({},t),{},{placement:x||Xf(s),maxHeight:m})})},Rx=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return le("div",de({},ze(t,"menu",{menu:!0}),{ref:r},o),n)},Mx=Rx,Px=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return re({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},jx=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return le("div",de({},ze(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},Yf=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return re({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},Bx=Yf,Vx=Yf,Gx=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Kt(t,Lx);return le("div",de({},ze(re(re({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},Hx=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Kt(t,Ox);return le("div",de({},ze(re(re({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},Wx=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}},Zx=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=I.useRef(null),l=I.useRef(null),f=I.useState(Xf(a)),g=ot(f,2),y=g[0],E=g[1],m=I.useMemo(function(){return{setPortalPlacement:E}},[]),h=I.useState(null),p=ot(h,2),b=p[0],x=p[1],C=I.useCallback(function(){if(o){var A=vx(o),S=i==="fixed"?0:window.pageYOffset,L=A[y]+S;(L!==(b==null?void 0:b.offset)||A.left!==(b==null?void 0:b.rect.left)||A.width!==(b==null?void 0:b.rect.width))&&x({offset:L,rect:A})}},[o,i,y,b==null?void 0:b.offset,b==null?void 0:b.rect.left,b==null?void 0:b.rect.width]);Xc(function(){C()},[C]);var w=I.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=hx(o,c.current,C,{elementResize:"ResizeObserver"in window}))},[o,C]);Xc(function(){w()},[w]);var v=I.useCallback(function(A){c.current=A,w()},[w]);if(!n&&i!=="fixed"||!b)return null;var _=le("div",de({ref:v},ze(re(re({},t),{},{offset:b.offset,position:i,rect:b.rect}),"menuPortal",{"menu-portal":!0}),s),r);return le(zf.Provider,{value:m},n?je.createPortal(_,n):_)},Xx=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},zx=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return le("div",de({},ze(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},Yx=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return re({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")})},Jx=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return le("div",de({},ze(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},qx=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Qx=function(t){var n=t.children,r=t.innerProps;return le("div",de({},ze(t,"indicatorsContainer",{indicators:!0}),r),n)},Jf,$x=["size"],Ux=["innerProps","isRtl","size"];function Kx(){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 eC=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:Kx},qf=function(t){var n=t.size,r=Kt(t,$x);return le("svg",de({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:eC},r))},zc=function(t){return le(qf,de({size:20},t),le("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"}))},Qf=function(t){return le(qf,de({size:20},t),le("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"}))},$f=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return re({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2,":hover":{color:r?a.neutral80:a.neutral40}})},tC=$f,nC=function(t){var n=t.children,r=t.innerProps;return le("div",de({},ze(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||le(Qf,null))},rC=$f,oC=function(t){var n=t.children,r=t.innerProps;return le("div",de({},ze(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||le(zc,null))},sC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,a=o.colors;return re({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},aC=function(t){var n=t.innerProps;return le("span",de({},n,ze(t,"indicatorSeparator",{"indicator-separator":!0})))},iC=ex(Jf||(Jf=tx([`
|
|
607
607
|
0%, 80%, 100% { opacity: 0; }
|
|
608
608
|
40% { opacity: 1; }
|
|
609
|
-
`]))),ix=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return re({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})},Yc=function(t){var n=t.delay,r=t.offset;return le("span",{css:Vc({animation:"".concat(ax," 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 */")})},cx=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Kt(t,$C);return le("div",de({},ze(re(re({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),le(Yc,{delay:0,offset:r}),le(Yc,{delay:160,offset:!0}),le(Yc,{delay:320,offset:!r}))},lx=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return re({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}})},ux=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return le("div",de({ref:s},ze(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},dx=ux,fx=["data"],px=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},hx=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,l=t.label,f=t.theme,g=t.selectProps;return le("div",de({},ze(t,"group",{group:!0}),c),le(a,de({},i,{selectProps:g,theme:f,getStyles:o,getClassNames:s,cx:r}),l),le("div",null,n))},gx=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return re({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"})},mx=function(t){var n=Vf(t);n.data;var r=Kt(n,fx);return le("div",de({},ze(t,"groupHeading",{"group-heading":!0}),r))},bx=hx,yx=["innerRef","isDisabled","isHidden","inputClassName"],Cx=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return re(re({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},xx),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},Uf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},xx={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":re({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Uf)},Ex=function(t){return re({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Uf)},vx=function(t){var n=t.cx,r=t.value,o=Vf(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Kt(o,yx);return le("div",de({},ze(t,"input",{"input-container":!0}),{"data-value":r||""}),le("input",de({className:n({input:!0},c),ref:s,style:Ex(i),disabled:a},l)))},wx=vx,Ix=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return re({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},_x=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return re({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})},Sx=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return re({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}})},Kf=function(t){var n=t.children,r=t.innerProps;return le("div",r,n)},Ax=Kf,Tx=Kf;function Lx(e){var t=e.children,n=e.innerProps;return le("div",de({role:"button"},n),t||le(zc,{size:14}))}var Ox=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,l=r.Container,f=r.Label,g=r.Remove;return le(l,{data:o,innerProps:re(re({},ze(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},le(f,{data:o,innerProps:re({},ze(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),le(g,{data:o,innerProps:re(re({},ze(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},Fx=Ox,kx=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return re({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}})},Dx=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return le("div",de({},ze(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},Nx=Dx,Rx=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return re({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Mx=function(t){var n=t.children,r=t.innerProps;return le("div",de({},ze(t,"placeholder",{placeholder:!0}),r),n)},Px=Mx,jx=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return re({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})},Bx=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return le("div",de({},ze(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},Vx=Bx,fn={ClearIndicator:rx,Control:dx,DropdownIndicator:tx,DownChevron:Qf,CrossIcon:zc,Group:bx,GroupHeading:mx,IndicatorsContainer:qC,IndicatorSeparator:sx,Input:wx,LoadingIndicator:cx,Menu:RC,MenuList:PC,MenuPortal:WC,LoadingMessage:GC,NoOptionsMessage:VC,MultiValue:Fx,MultiValueContainer:Ax,MultiValueLabel:Tx,MultiValueRemove:Lx,Option:Nx,Placeholder:Px,SelectContainer:XC,SingleValue:Vx,ValueContainer:YC},Gx=function(t){return re(re({},fn),t.components)},e1=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Hx(e,t){return!!(e===t||e1(e)&&e1(t))}function Wx(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Hx(e[n],t[n]))return!1;return!0}function Zx(e,t){t===void 0&&(t=Wx);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 Xx(){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 zx=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:Xx},Yx=function(t){return le("span",de({css:zx},t))},t1=Yx,Jx={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,a=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,a=s===void 0?"":s,i=t.selectValue,c=t.isDisabled,l=t.isSelected,f=t.isAppleDevice,g=function(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":"",E="".concat(l?" selected":"").concat(y);return"".concat(a).concat(E,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},qx=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,l=t.id,f=t.isAppleDevice,g=c.ariaLiveMessages,y=c.getOptionLabel,E=c.inputValue,m=c.isMulti,h=c.isOptionDisabled,p=c.isSearchable,b=c.menuIsOpen,C=c.options,x=c.screenReaderStatus,w=c.tabSelectsValue,v=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=I.useMemo(function(){return re(re({},Jx),g||{})},[g]),L=I.useMemo(function(){var Y="";if(n&&S.onChange){var J=n.option,H=n.options,G=n.removedValue,q=n.removedValues,oe=n.value,te=function(ie){return Array.isArray(ie)?null:ie},V=G||J||te(oe),W=V?y(V):"",R=H||q||void 0,X=R?R.map(y):[],$=re({isDisabled:V&&h(V,i),label:W,labels:X},n);Y=S.onChange($)}return Y},[n,S,h,i,y]),N=I.useMemo(function(){var Y="",J=r||o,H=!!(r&&i&&i.includes(r));if(J&&S.onFocus){var G={focused:J,label:y(J),isDisabled:h(J,i),isSelected:H,options:s,context:J===r?"menu":"value",selectValue:i,isAppleDevice:f};Y=S.onFocus(G)}return Y},[r,o,y,h,S,s,i,f]),D=I.useMemo(function(){var Y="";if(b&&C.length&&!v&&S.onFilter){var J=x({count:s.length});Y=S.onFilter({inputValue:E,resultsMessage:J})}return Y},[s,E,b,S,C,x,v]),k=(n==null?void 0:n.action)==="initial-input-focus",M=I.useMemo(function(){var Y="";if(S.guidance){var J=o?"value":b?"menu":"input";Y=S.guidance({"aria-label":_,context:J,isDisabled:r&&h(r,i),isMulti:m,isSearchable:p,tabSelectsValue:w,isInitialFocus:k})}return Y},[_,r,o,m,h,p,b,S,i,w,k]),B=le(I.Fragment,null,le("span",{id:"aria-selection"},L),le("span",{id:"aria-focused"},N),le("span",{id:"aria-results"},D),le("span",{id:"aria-guidance"},M));return le(I.Fragment,null,le(t1,{id:l},k&&B),le(t1,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!k&&B))},Qx=qx,Jc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],$x=new RegExp("["+Jc.map(function(e){return e.letters}).join("")+"]","g"),n1={},qc=0;qc<Jc.length;qc++)for(var Qc=Jc[qc],$c=0;$c<Qc.letters.length;$c++)n1[Qc.letters[$c]]=Qc.base;var r1=function(t){return t.replace($x,function(n){return n1[n]})},Ux=Zx(r1),o1=function(t){return t.replace(/^\s+|\s+$/g,"")},Kx=function(t){return"".concat(t.label," ").concat(t.value)},e7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=re({ignoreCase:!0,ignoreAccents:!0,stringify:Kx,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?o1(r):r,g=c?o1(i(n)):i(n);return s&&(f=f.toLowerCase(),g=g.toLowerCase()),a&&(f=Ux(f),g=r1(g)),l==="start"?g.substr(0,f.length)===f:g.indexOf(f)>-1}},t7=["innerRef"];function n7(e){var t=e.innerRef,n=Kt(e,t7),r=AC(n,"onExited","in","enter","exit","appear");return le("input",de({ref:t},r,{css:Vc({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 r7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function o7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=I.useRef(!1),i=I.useRef(!1),c=I.useRef(0),l=I.useRef(null),f=I.useCallback(function(p,b){if(l.current!==null){var C=l.current,x=C.scrollTop,w=C.scrollHeight,v=C.clientHeight,_=l.current,A=b>0,S=w-v-x,L=!1;S>b&&a.current&&(r&&r(p),a.current=!1),A&&i.current&&(s&&s(p),i.current=!1),A&&b>S?(n&&!a.current&&n(p),_.scrollTop=w,L=!0,a.current=!0):!A&&-b>x&&(o&&!i.current&&o(p),_.scrollTop=0,L=!0,i.current=!0),L&&r7(p)}},[n,r,o,s]),g=I.useCallback(function(p){f(p,p.deltaY)},[f]),y=I.useCallback(function(p){c.current=p.changedTouches[0].clientY},[]),E=I.useCallback(function(p){var b=c.current-p.changedTouches[0].clientY;f(p,b)},[f]),m=I.useCallback(function(p){if(p){var b=IC?{passive:!1}:!1;p.addEventListener("wheel",g,b),p.addEventListener("touchstart",y,b),p.addEventListener("touchmove",E,b)}},[E,y,g]),h=I.useCallback(function(p){p&&(p.removeEventListener("wheel",g,!1),p.removeEventListener("touchstart",y,!1),p.removeEventListener("touchmove",E,!1))},[E,y,g]);return I.useEffect(function(){if(t){var p=l.current;return m(p),function(){h(p)}}},[t,m,h]),function(p){l.current=p}}var s1=["boxSizing","height","overflow","paddingRight","position"],a1={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function i1(e){e.preventDefault()}function c1(e){e.stopPropagation()}function l1(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function u1(){return"ontouchstart"in window||navigator.maxTouchPoints}var d1=!!(typeof window<"u"&&window.document&&window.document.createElement),Ko=0,ao={capture:!1,passive:!1};function s7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=I.useRef({}),s=I.useRef(null),a=I.useCallback(function(c){if(d1){var l=document.body,f=l&&l.style;if(r&&s1.forEach(function(m){var h=f&&f[m];o.current[m]=h}),r&&Ko<1){var g=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,E=window.innerWidth-y+g||0;Object.keys(a1).forEach(function(m){var h=a1[m];f&&(f[m]=h)}),f&&(f.paddingRight="".concat(E,"px"))}l&&u1()&&(l.addEventListener("touchmove",i1,ao),c&&(c.addEventListener("touchstart",l1,ao),c.addEventListener("touchmove",c1,ao))),Ko+=1}},[r]),i=I.useCallback(function(c){if(d1){var l=document.body,f=l&&l.style;Ko=Math.max(Ko-1,0),r&&Ko<1&&s1.forEach(function(g){var y=o.current[g];f&&(f[g]=y)}),l&&u1()&&(l.removeEventListener("touchmove",i1,ao),c&&(c.removeEventListener("touchstart",l1,ao),c.removeEventListener("touchmove",c1,ao)))}},[r]);return I.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function a7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var i7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},c7=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:a7};function l7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,c=e.onTopLeave,l=o7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=s7({isEnabled:n}),g=function(E){l(E),f(E)};return le(I.Fragment,null,n&&le("div",{onClick:i7,css:c7}),t(g))}function u7(){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 d7=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:u7},f7=function(t){var n=t.name,r=t.onFocus;return le("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:d7,value:"",onChange:function(){}})},p7=f7;function Uc(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 h7(){return Uc(/^iPhone/i)}function f1(){return Uc(/^Mac/i)}function g7(){return Uc(/^iPad/i)||f1()&&navigator.maxTouchPoints>1}function m7(){return h7()||g7()}function b7(){return f1()||m7()}var y7=function(t){return t.label},p1=function(t){return t.label},h1=function(t){return t.value},C7=function(t){return!!t.isDisabled},x7={clearIndicator:nx,container:ZC,control:lx,dropdownIndicator:ex,group:px,groupHeading:gx,indicatorsContainer:JC,indicatorSeparator:ox,input:Cx,loadingIndicator:ix,loadingMessage:BC,menu:kC,menuList:MC,menuPortal:HC,multiValue:Ix,multiValueLabel:_x,multiValueRemove:Sx,noOptionsMessage:jC,option:kx,placeholder:Rx,singleValue:jx,valueContainer:zC},E7={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%)"},v7=4,g1=4,w7=38,I7=g1*2,_7={baseUnit:g1,controlHeight:w7,menuGutter:I7},Kc={borderRadius:v7,colors:E7,spacing:_7},S7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Wf(),captureMenuScroll:!Wf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:e7(),formatGroupLabel:y7,getOptionLabel:p1,getOptionValue:h1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:C7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!vC(),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 m1(e,t,n,r){var o=E1(e,t,n),s=v1(e,t,n),a=x1(e,t),i=Ta(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function Aa(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return m1(e,a,t,i)}).filter(function(a){return C1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=m1(e,n,t,r);return C1(e,s)?s:void 0}).filter(_C)}function b1(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,no(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function y1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,no(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 A7(e,t){return b1(Aa(e,t))}function C1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!I1(e)||!s)&&w1(e,{label:a,value:i,data:o},r)}function T7(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 L7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var el=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},x1=function(t,n){return t.getOptionLabel(n)},Ta=function(t,n){return t.getOptionValue(n)};function E1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function v1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Ta(e,t);return n.some(function(o){return Ta(e,o)===r})}function w1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var I1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},O7=1,La=function(e){Z6(n,e);var t=Y6(n);function n(r){var o;if(H6(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=b7(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,l){var f=o.props,g=f.onChange,y=f.name;l.name=y,o.ariaOnChange(c,l),g(c,l)},o.setValue=function(c,l,f){var g=o.props,y=g.closeMenuOnSelect,E=g.isMulti,m=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:m}),y&&(o.setState({inputIsHiddenAfterUpdate:!E}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,g=l.isMulti,y=l.name,E=o.state.selectValue,m=g&&o.isOptionSelected(c,E),h=o.isOptionDisabled(c,E);if(m){var p=o.getOptionValue(c);o.setValue(E.filter(function(b){return o.getOptionValue(b)!==p}),"deselect-option",c)}else if(!h)g?o.setValue([].concat(no(E),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:y});return}f&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,f=o.state.selectValue,g=o.getOptionValue(c),y=f.filter(function(m){return o.getOptionValue(m)!==g}),E=Uo(l,y,y[0]||null);o.onChange(E,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Uo(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,l=o.state.selectValue,f=l[l.length-1],g=l.slice(0,l.length-1),y=Uo(c,g,g[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return el(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return y1(Aa(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,l=new Array(c),f=0;f<c;f++)l[f]=arguments[f];return mC.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return x1(o.props,c)},o.getOptionValue=function(c){return Ta(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,g=x7[c](l,f);g.boxSizing="border-box";var y=o.props.styles[c];return y?y(g,l):g},o.getClassNames=function(c,l){var f,g;return(f=(g=o.props.classNames)[c])===null||f===void 0?void 0:f.call(g,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return Gx(o.props)},o.buildCategorizedOptions=function(){return Aa(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return b1(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:re({value:c},l)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var l=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():l&&o.openMenu("first"):(l&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var l=o.props,f=l.isMulti,g=l.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&wa(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var l=c.touches,f=l&&l.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,f=l&&l.item(0);if(f){var g=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),E=5;o.userIsDragging=g>E||y>E}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:l}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var l=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:l}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var l=o.getFocusableOptions(),f=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return I1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,g=l.backspaceRemovesValue,y=l.escapeClearsValue,E=l.inputValue,m=l.isClearable,h=l.isDisabled,p=l.menuIsOpen,b=l.onKeyDown,C=l.tabSelectsValue,x=l.openMenuOnFocus,w=o.state,v=w.focusedOption,_=w.focusedValue,A=w.selectValue;if(!h&&!(typeof b=="function"&&(b(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||E)return;o.focusValue("previous");break;case"ArrowRight":if(!f||E)return;o.focusValue("next");break;case"Delete":case"Backspace":if(E)return;if(_)o.removeValue(_);else{if(!g)return;f?o.popValue():m&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!p||!C||!v||x&&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:E}),o.onMenuClose()):m&&y&&o.clearValue();break;case" ":if(E)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||++O7),o.state.selectValue=va(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=el(s,a[i])}return o}return W6(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&&Hf(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&&(Hf(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,a=this.state,i=a.selectValue,c=a.isFocused,l=this.buildFocusableOptions(),f=o==="first"?0:l.length-1;if(!this.props.isMulti){var g=l.indexOf(i[0]);g>-1&&(f=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[f],focusedOptionId:this.getFocusedOptionId(l[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(i);i||(c=-1);var l=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=l:f=c-1;break;case"next":c>-1&&c<l&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var c=0,l=i.indexOf(a);a||(l=-1),o==="up"?c=l>0?l-1:i.length-1:o==="down"?c=(l+1)%i.length:o==="pageup"?(c=l-s,c<0&&(c=0)):o==="pagedown"?(c=l+s,c>i.length-1&&(c=i.length-1)):o==="last"&&(c=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Kc):re(re({},Kc),this.props.theme):Kc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,f=this.setValue,g=this.props,y=g.isMulti,E=g.isRtl,m=g.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:h,isMulti:y,isRtl:E,options:m,selectOption:l,selectProps:g,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return E1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return v1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return w1(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,a=o.isSearchable,i=o.inputId,c=o.inputValue,l=o.tabIndex,f=o.form,g=o.menuIsOpen,y=o.required,E=this.getComponents(),m=E.Input,h=this.state,p=h.inputIsHidden,b=h.ariaSelection,C=this.commonProps,x=i||this.getElementId("input"),w=re(re(re({"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()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(m,de({},C,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:s,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},w)):T.createElement(n7,de({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ea,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:f,value:""},w))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,f=s.SingleValue,g=s.Placeholder,y=this.commonProps,E=this.props,m=E.controlShouldRenderValue,h=E.isDisabled,p=E.isMulti,b=E.inputValue,C=E.placeholder,x=this.state,w=x.selectValue,v=x.focusedValue,_=x.isFocused;if(!this.hasValue()||!m)return b?null:T.createElement(g,de({},y,{key:"placeholder",isDisabled:h,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),C);if(p)return w.map(function(S,L){var N=S===v,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,de({},y,{components:{Container:i,Label:c,Remove:l},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(b)return null;var A=w[0];return T.createElement(f,de({},y,{data:A,isDisabled:h}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,de({},a,{innerProps:g,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!s||!l)return null;var g={"aria-hidden":"true"};return T.createElement(s,de({},a,{innerProps:g,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return T.createElement(a,de({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,de({},a,{innerProps:l,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,l=s.MenuList,f=s.MenuPortal,g=s.LoadingMessage,y=s.NoOptionsMessage,E=s.Option,m=this.commonProps,h=this.state.focusedOption,p=this.props,b=p.captureMenuScroll,C=p.inputValue,x=p.isLoading,w=p.loadingMessage,v=p.minMenuHeight,_=p.maxMenuHeight,A=p.menuIsOpen,S=p.menuPlacement,L=p.menuPosition,N=p.menuPortalTarget,D=p.menuShouldBlockScroll,k=p.menuShouldScrollIntoView,M=p.noOptionsMessage,B=p.onMenuScrollToTop,Y=p.onMenuScrollToBottom;if(!A)return null;var J=function(W,R){var X=W.type,$=W.data,ae=W.isDisabled,ie=W.isSelected,P=W.label,ee=W.value,ye=h===$,z=ae?void 0:function(){return o.onOptionHover($)},Ae=ae?void 0:function(){return o.selectOption($)},Ge="".concat(o.getElementId("option"),"-").concat(R),We={id:Ge,onClick:Ae,onMouseMove:z,onMouseOver:z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ie};return T.createElement(E,de({},m,{innerProps:We,data:$,isDisabled:ae,isSelected:ie,key:Ge,label:P,type:X,value:ee,isFocused:ye,innerRef:ye?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(W.data,"menu"))},H;if(this.hasOptions())H=this.getCategorizedOptions().map(function(V){if(V.type==="group"){var W=V.data,R=V.options,X=V.index,$="".concat(o.getElementId("group"),"-").concat(X),ae="".concat($,"-heading");return T.createElement(a,de({},m,{key:$,data:W,options:R,Heading:i,headingProps:{id:ae,data:V.data},label:o.formatGroupLabel(V.data)}),V.options.map(function(ie){return J(ie,"".concat(X,"-").concat(ie.index))}))}else if(V.type==="option")return J(V,"".concat(V.index))});else if(x){var G=w({inputValue:C});if(G===null)return null;H=T.createElement(g,m,G)}else{var q=M({inputValue:C});if(q===null)return null;H=T.createElement(y,m,q)}var oe={minMenuHeight:v,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:k},te=T.createElement(DC,de({},m,oe),function(V){var W=V.ref,R=V.placerProps,X=R.placement,$=R.maxHeight;return T.createElement(c,de({},m,oe,{innerRef:W,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:x,placement:X}),T.createElement(l7,{captureEnabled:b,onTopArrive:B,onBottomArrive:Y,lockEnabled:D},function(ae){return T.createElement(l,de({},m,{innerRef:function(P){o.getMenuListRef(P),ae(P)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:o.getElementId("listbox")},isLoading:x,maxHeight:$,focusedOption:h}),H)}))});return N||L==="fixed"?T.createElement(f,de({},m,{appendTo:N,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),te):te}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,f=s.required,g=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(p7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var y=g.map(function(h){return o.getOptionValue(h)}).join(a);return T.createElement("input",{name:l,type:"hidden",value:y})}else{var E=g.length>0?g.map(function(h,p){return T.createElement("input",{key:"i-".concat(p),name:l,type:"hidden",value:o.getOptionValue(h)})}):T.createElement("input",{name:l,type:"hidden",value:""});return T.createElement("div",null,E)}else{var m=g[0]?this.getOptionValue(g[0]):"";return T.createElement("input",{name:l,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,f=s.selectValue,g=this.getFocusableOptions();return T.createElement(Qx,de({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,l=this.props,f=l.className,g=l.id,y=l.isDisabled,E=l.menuIsOpen,m=this.state.isFocused,h=this.commonProps=this.getCommonProps();return T.createElement(i,de({},h,{className:f,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:m}),this.renderLiveRegion(),T.createElement(s,de({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:m,menuIsOpen:E}),T.createElement(c,de({},h,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,de({},h,{isDisabled:y}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,f=s.isFocused,g=s.prevWasFocused,y=s.instancePrefix,E=o.options,m=o.value,h=o.menuIsOpen,p=o.inputValue,b=o.isMulti,C=va(m),x={};if(a&&(m!==a.value||E!==a.options||h!==a.menuIsOpen||p!==a.inputValue)){var w=h?A7(o,C):[],v=h?y1(Aa(o,C),"".concat(y,"-option")):[],_=i?T7(s,C):null,A=L7(s,w),S=el(v,A);x={selectValue:C,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:v,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},N=l,D=f&&g;return f&&!D&&(N={value:Uo(b,C,C[0]||null),options:C,action:"initial-input-focus"},D=!g),(l==null?void 0:l.action)==="initial-input-focus"&&(N=null),re(re(re({},x),L),{},{prevProps:o,ariaSelection:N,prevWasFocused:D})}}]),n}(I.Component);La.defaultProps=S7;var F7=I.forwardRef(function(e,t){var n=Lc(e);return T.createElement(La,de({ref:t},n))}),k7=F7;const D7=u.styled(u.Box)`
|
|
609
|
+
`]))),cC=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,a=s.colors,i=s.spacing.baseUnit;return re({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})},Yc=function(t){var n=t.delay,r=t.offset;return le("span",{css:Vc({animation:"".concat(iC," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process.env.NODE_ENV==="production"?"":";label:LoadingDot;",process.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgUmVhY3ROb2RlIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4LCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmltcG9ydCB7XG4gIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lLFxuICBDU1NPYmplY3RXaXRoTGFiZWwsXG4gIEdyb3VwQmFzZSxcbn0gZnJvbSAnLi4vdHlwZXMnO1xuaW1wb3J0IHsgZ2V0U3R5bGVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEljb25zXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgU3ZnID0gKHtcbiAgc2l6ZSxcbiAgLi4ucHJvcHNcbn06IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU6IG51bWJlciB9KSA9PiAoXG4gIDxzdmdcbiAgICBoZWlnaHQ9e3NpemV9XG4gICAgd2lkdGg9e3NpemV9XG4gICAgdmlld0JveD1cIjAgMCAyMCAyMFwiXG4gICAgYXJpYS1oaWRkZW49XCJ0cnVlXCJcbiAgICBmb2N1c2FibGU9XCJmYWxzZVwiXG4gICAgY3NzPXt7XG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIGZpbGw6ICdjdXJyZW50Q29sb3InLFxuICAgICAgbGluZUhlaWdodDogMSxcbiAgICAgIHN0cm9rZTogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBzdHJva2VXaWR0aDogMCxcbiAgICB9fVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbik7XG5cbmV4cG9ydCB0eXBlIENyb3NzSWNvblByb3BzID0gSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZT86IG51bWJlciB9O1xuZXhwb3J0IGNvbnN0IENyb3NzSWNvbiA9IChwcm9wczogQ3Jvc3NJY29uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTE0LjM0OCAxNC44NDljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDBsLTIuNjUxLTMuMDMwLTIuNjUxIDMuMDI5Yy0wLjQ2OSAwLjQ2OS0xLjIyOSAwLjQ2OS0xLjY5NyAwLTAuNDY5LTAuNDY5LTAuNDY5LTEuMjI5IDAtMS42OTdsMi43NTgtMy4xNS0yLjc1OS0zLjE1MmMtMC40NjktMC40NjktMC40NjktMS4yMjggMC0xLjY5N3MxLjIyOC0wLjQ2OSAxLjY5NyAwbDIuNjUyIDMuMDMxIDIuNjUxLTMuMDMxYzAuNDY5LTAuNDY5IDEuMjI4LTAuNDY5IDEuNjk3IDBzMC40NjkgMS4yMjkgMCAxLjY5N2wtMi43NTggMy4xNTIgMi43NTggMy4xNWMwLjQ2OSAwLjQ2OSAwLjQ2OSAxLjIyOSAwIDEuNjk4elwiIC8+XG4gIDwvU3ZnPlxuKTtcbmV4cG9ydCB0eXBlIERvd25DaGV2cm9uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgRG93bkNoZXZyb24gPSAocHJvcHM6IERvd25DaGV2cm9uUHJvcHMpID0+IChcbiAgPFN2ZyBzaXplPXsyMH0gey4uLnByb3BzfT5cbiAgICA8cGF0aCBkPVwiTTQuNTE2IDcuNTQ4YzAuNDM2LTAuNDQ2IDEuMDQzLTAuNDgxIDEuNTc2IDBsMy45MDggMy43NDcgMy45MDgtMy43NDdjMC41MzMtMC40ODEgMS4xNDEtMC40NDYgMS41NzQgMCAwLjQzNiAwLjQ0NSAwLjQwOCAxLjE5NyAwIDEuNjE1LTAuNDA2IDAuNDE4LTQuNjk1IDQuNTAyLTQuNjk1IDQuNTAyLTAuMjE3IDAuMjIzLTAuNTAyIDAuMzM1LTAuNzg3IDAuMzM1cy0wLjU3LTAuMTEyLTAuNzg5LTAuMzM1YzAgMC00LjI4Ny00LjA4NC00LjY5NS00LjUwMnMtMC40MzYtMS4xNyAwLTEuNjE1elwiIC8+XG4gIDwvU3ZnPlxuKTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBEcm9wZG93biAmIENsZWFyIEJ1dHRvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xufVxuXG5jb25zdCBiYXNlQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTpcbiAgICB8IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbiAgICB8IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JDb250YWluZXInLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICAgICc6aG92ZXInOiB7XG4gICAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsODAgOiBjb2xvcnMubmV1dHJhbDQwLFxuICAgICAgICB9LFxuICAgICAgfSksXG59KTtcblxuZXhwb3J0IGNvbnN0IGRyb3Bkb3duSW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBEcm9wZG93bkluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IERyb3Bkb3duSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2Ryb3Bkb3duSW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdkcm9wZG93bi1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPERvd25DaGV2cm9uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuZXhwb3J0IGludGVyZmFjZSBDbGVhckluZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFRoZSBjaGlsZHJlbiB0byBiZSByZW5kZXJlZCBpbnNpZGUgdGhlIGluZGljYXRvci4gKi9cbiAgY2hpbGRyZW4/OiBSZWFjdE5vZGU7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbn1cblxuZXhwb3J0IGNvbnN0IGNsZWFySW5kaWNhdG9yQ1NTID0gYmFzZUNTUztcbmV4cG9ydCBjb25zdCBDbGVhckluZGljYXRvciA9IDxcbiAgT3B0aW9uLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPlxuPihcbiAgcHJvcHM6IENsZWFySW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGNoaWxkcmVuLCBpbm5lclByb3BzIH0gPSBwcm9wcztcbiAgcmV0dXJuIChcbiAgICA8ZGl2XG4gICAgICB7Li4uZ2V0U3R5bGVQcm9wcyhwcm9wcywgJ2NsZWFySW5kaWNhdG9yJywge1xuICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICdjbGVhci1pbmRpY2F0b3InOiB0cnVlLFxuICAgICAgfSl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICB7Y2hpbGRyZW4gfHwgPENyb3NzSWNvbiAvPn1cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuLy8gU2VwYXJhdG9yXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuZXhwb3J0IGludGVyZmFjZSBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaW5uZXJQcm9wcz86IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3BhbiddO1xufVxuXG5leHBvcnQgY29uc3QgaW5kaWNhdG9yU2VwYXJhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNEaXNhYmxlZCxcbiAgICB0aGVtZToge1xuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgICAgY29sb3JzLFxuICAgIH0sXG4gIH06IEluZGljYXRvclNlcGFyYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+LFxuICB1bnN0eWxlZDogYm9vbGVhblxuKTogQ1NTT2JqZWN0V2l0aExhYmVsID0+ICh7XG4gIGxhYmVsOiAnaW5kaWNhdG9yU2VwYXJhdG9yJyxcbiAgYWxpZ25TZWxmOiAnc3RyZXRjaCcsXG4gIHdpZHRoOiAxLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGJhY2tncm91bmRDb2xvcjogaXNEaXNhYmxlZCA/IGNvbG9ycy5uZXV0cmFsMTAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBtYXJnaW5Cb3R0b206IGJhc2VVbml0ICogMixcbiAgICAgICAgbWFyZ2luVG9wOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgSW5kaWNhdG9yU2VwYXJhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD5cbikgPT4ge1xuICBjb25zdCB7IGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxzcGFuXG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnaW5kaWNhdG9yU2VwYXJhdG9yJywge1xuICAgICAgICAnaW5kaWNhdG9yLXNlcGFyYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAvPlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBMb2FkaW5nXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cblxuY29uc3QgbG9hZGluZ0RvdEFuaW1hdGlvbnMgPSBrZXlmcmFtZXNgXG4gIDAlLCA4MCUsIDEwMCUgeyBvcGFjaXR5OiAwOyB9XG4gIDQwJSB7IG9wYWNpdHk6IDE7IH1cbmA7XG5cbmV4cG9ydCBjb25zdCBsb2FkaW5nSW5kaWNhdG9yQ1NTID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICB7XG4gICAgaXNGb2N1c2VkLFxuICAgIHNpemUsXG4gICAgdGhlbWU6IHtcbiAgICAgIGNvbG9ycyxcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICB9LFxuICB9OiBMb2FkaW5nSW5kaWNhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdsb2FkaW5nSW5kaWNhdG9yJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICB0cmFuc2l0aW9uOiAnY29sb3IgMTUwbXMnLFxuICBhbGlnblNlbGY6ICdjZW50ZXInLFxuICBmb250U2l6ZTogc2l6ZSxcbiAgbGluZUhlaWdodDogMSxcbiAgbWFyZ2luUmlnaHQ6IHNpemUsXG4gIHRleHRBbGlnbjogJ2NlbnRlcicsXG4gIHZlcnRpY2FsQWxpZ246ICdtaWRkbGUnLFxuICAuLi4odW5zdHlsZWRcbiAgICA/IHt9XG4gICAgOiB7XG4gICAgICAgIGNvbG9yOiBpc0ZvY3VzZWQgPyBjb2xvcnMubmV1dHJhbDYwIDogY29sb3JzLm5ldXRyYWwyMCxcbiAgICAgICAgcGFkZGluZzogYmFzZVVuaXQgKiAyLFxuICAgICAgfSksXG59KTtcblxuaW50ZXJmYWNlIExvYWRpbmdEb3RQcm9wcyB7XG4gIGRlbGF5OiBudW1iZXI7XG4gIG9mZnNldDogYm9vbGVhbjtcbn1cbmNvbnN0IExvYWRpbmdEb3QgPSAoeyBkZWxheSwgb2Zmc2V0IH06IExvYWRpbmdEb3RQcm9wcykgPT4gKFxuICA8c3BhblxuICAgIGNzcz17e1xuICAgICAgYW5pbWF0aW9uOiBgJHtsb2FkaW5nRG90QW5pbWF0aW9uc30gMXMgZWFzZS1pbi1vdXQgJHtkZWxheX1tcyBpbmZpbml0ZTtgLFxuICAgICAgYmFja2dyb3VuZENvbG9yOiAnY3VycmVudENvbG9yJyxcbiAgICAgIGJvcmRlclJhZGl1czogJzFlbScsXG4gICAgICBkaXNwbGF5OiAnaW5saW5lLWJsb2NrJyxcbiAgICAgIG1hcmdpbkxlZnQ6IG9mZnNldCA/ICcxZW0nIDogdW5kZWZpbmVkLFxuICAgICAgaGVpZ2h0OiAnMWVtJyxcbiAgICAgIHZlcnRpY2FsQWxpZ246ICd0b3AnLFxuICAgICAgd2lkdGg6ICcxZW0nLFxuICAgIH19XG4gIC8+XG4pO1xuXG5leHBvcnQgaW50ZXJmYWNlIExvYWRpbmdJbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBQcm9wcyB0aGF0IHdpbGwgYmUgcGFzc2VkIG9uIHRvIHRoZSBjaGlsZHJlbi4gKi9cbiAgaW5uZXJQcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydkaXYnXTtcbiAgLyoqIFRoZSBmb2N1c2VkIHN0YXRlIG9mIHRoZSBzZWxlY3QuICovXG4gIGlzRm9jdXNlZDogYm9vbGVhbjtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgLyoqIFNldCBzaXplIG9mIHRoZSBjb250YWluZXIuICovXG4gIHNpemU6IG51bWJlcjtcbn1cbmV4cG9ydCBjb25zdCBMb2FkaW5nSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KHtcbiAgaW5uZXJQcm9wcyxcbiAgaXNSdGwsXG4gIHNpemUgPSA0LFxuICAuLi5yZXN0UHJvcHNcbn06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPikgPT4ge1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKFxuICAgICAgICB7IC4uLnJlc3RQcm9wcywgaW5uZXJQcm9wcywgaXNSdGwsIHNpemUgfSxcbiAgICAgICAgJ2xvYWRpbmdJbmRpY2F0b3InLFxuICAgICAgICB7XG4gICAgICAgICAgaW5kaWNhdG9yOiB0cnVlLFxuICAgICAgICAgICdsb2FkaW5nLWluZGljYXRvcic6IHRydWUsXG4gICAgICAgIH1cbiAgICAgICl9XG4gICAgICB7Li4uaW5uZXJQcm9wc31cbiAgICA+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MH0gb2Zmc2V0PXtpc1J0bH0gLz5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXsxNjB9IG9mZnNldCAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezMyMH0gb2Zmc2V0PXshaXNSdGx9IC8+XG4gICAgPC9kaXY+XG4gICk7XG59O1xuIl19 */")})},lC=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Kt(t,Ux);return le("div",de({},ze(re(re({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),le(Yc,{delay:0,offset:r}),le(Yc,{delay:160,offset:!0}),le(Yc,{delay:320,offset:!r}))},uC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,a=s.colors,i=s.borderRadius,c=s.spacing;return re({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}})},dC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return le("div",de({ref:s},ze(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},fC=dC,pC=["data"],hC=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},gC=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,a=t.Heading,i=t.headingProps,c=t.innerProps,l=t.label,f=t.theme,g=t.selectProps;return le("div",de({},ze(t,"group",{group:!0}),c),le(a,de({},i,{selectProps:g,theme:f,getStyles:o,getClassNames:s,cx:r}),l),le("div",null,n))},mC=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return re({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"})},bC=function(t){var n=Vf(t);n.data;var r=Kt(n,pC);return le("div",de({},ze(t,"groupHeading",{"group-heading":!0}),r))},yC=gC,xC=["innerRef","isDisabled","isHidden","inputClassName"],CC=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,a=s.spacing,i=s.colors;return re(re({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},EC),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},Uf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},EC={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":re({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Uf)},vC=function(t){return re({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Uf)},wC=function(t){var n=t.cx,r=t.value,o=Vf(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Kt(o,xC);return le("div",de({},ze(t,"input",{"input-container":!0}),{"data-value":r||""}),le("input",de({className:n({input:!0},c),ref:s,style:vC(i),disabled:a},l)))},IC=wC,_C=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors;return re({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},SC=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,a=t.cropWithEllipsis;return re({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})},AC=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,a=r.colors,i=t.isFocused;return re({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}})},Kf=function(t){var n=t.children,r=t.innerProps;return le("div",r,n)},TC=Kf,LC=Kf;function OC(e){var t=e.children,n=e.innerProps;return le("div",de({role:"button"},n),t||le(zc,{size:14}))}var FC=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,a=t.isDisabled,i=t.removeProps,c=t.selectProps,l=r.Container,f=r.Label,g=r.Remove;return le(l,{data:o,innerProps:re(re({},ze(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},le(f,{data:o,innerProps:re({},ze(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),le(g,{data:o,innerProps:re(re({},ze(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},kC=FC,DC=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.theme,i=a.spacing,c=a.colors;return re({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}})},NC=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return le("div",de({},ze(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},RC=NC,MC=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return re({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},PC=function(t){var n=t.children,r=t.innerProps;return le("div",de({},ze(t,"placeholder",{placeholder:!0}),r),n)},jC=PC,BC=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,a=o.colors;return re({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})},VC=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return le("div",de({},ze(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},GC=VC,fn={ClearIndicator:oC,Control:fC,DropdownIndicator:nC,DownChevron:Qf,CrossIcon:zc,Group:yC,GroupHeading:bC,IndicatorsContainer:Qx,IndicatorSeparator:aC,Input:IC,LoadingIndicator:lC,Menu:Mx,MenuList:jx,MenuPortal:Zx,LoadingMessage:Hx,NoOptionsMessage:Gx,MultiValue:kC,MultiValueContainer:TC,MultiValueLabel:LC,MultiValueRemove:OC,Option:RC,Placeholder:jC,SelectContainer:zx,SingleValue:GC,ValueContainer:Jx},HC=function(t){return re(re({},fn),t.components)},e1=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function WC(e,t){return!!(e===t||e1(e)&&e1(t))}function ZC(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!WC(e[n],t[n]))return!1;return!0}function XC(e,t){t===void 0&&(t=ZC);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 zC(){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 YC=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:zC},JC=function(t){return le("span",de({css:YC},t))},t1=JC,qC={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,a=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return a?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,a=s===void 0?"":s,i=t.selectValue,c=t.isDisabled,l=t.isSelected,f=t.isAppleDevice,g=function(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":"",E="".concat(l?" selected":"").concat(y);return"".concat(a).concat(E,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},QC=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,a=t.isFocused,i=t.selectValue,c=t.selectProps,l=t.id,f=t.isAppleDevice,g=c.ariaLiveMessages,y=c.getOptionLabel,E=c.inputValue,m=c.isMulti,h=c.isOptionDisabled,p=c.isSearchable,b=c.menuIsOpen,x=c.options,C=c.screenReaderStatus,w=c.tabSelectsValue,v=c.isLoading,_=c["aria-label"],A=c["aria-live"],S=I.useMemo(function(){return re(re({},qC),g||{})},[g]),L=I.useMemo(function(){var Y="";if(n&&S.onChange){var J=n.option,H=n.options,G=n.removedValue,q=n.removedValues,oe=n.value,te=function(ie){return Array.isArray(ie)?null:ie},V=G||J||te(oe),W=V?y(V):"",R=H||q||void 0,X=R?R.map(y):[],$=re({isDisabled:V&&h(V,i),label:W,labels:X},n);Y=S.onChange($)}return Y},[n,S,h,i,y]),N=I.useMemo(function(){var Y="",J=r||o,H=!!(r&&i&&i.includes(r));if(J&&S.onFocus){var G={focused:J,label:y(J),isDisabled:h(J,i),isSelected:H,options:s,context:J===r?"menu":"value",selectValue:i,isAppleDevice:f};Y=S.onFocus(G)}return Y},[r,o,y,h,S,s,i,f]),D=I.useMemo(function(){var Y="";if(b&&x.length&&!v&&S.onFilter){var J=C({count:s.length});Y=S.onFilter({inputValue:E,resultsMessage:J})}return Y},[s,E,b,S,x,C,v]),k=(n==null?void 0:n.action)==="initial-input-focus",M=I.useMemo(function(){var Y="";if(S.guidance){var J=o?"value":b?"menu":"input";Y=S.guidance({"aria-label":_,context:J,isDisabled:r&&h(r,i),isMulti:m,isSearchable:p,tabSelectsValue:w,isInitialFocus:k})}return Y},[_,r,o,m,h,p,b,S,i,w,k]),B=le(I.Fragment,null,le("span",{id:"aria-selection"},L),le("span",{id:"aria-focused"},N),le("span",{id:"aria-results"},D),le("span",{id:"aria-guidance"},M));return le(I.Fragment,null,le(t1,{id:l},k&&B),le(t1,{"aria-live":A,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!k&&B))},$C=QC,Jc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],UC=new RegExp("["+Jc.map(function(e){return e.letters}).join("")+"]","g"),n1={},qc=0;qc<Jc.length;qc++)for(var Qc=Jc[qc],$c=0;$c<Qc.letters.length;$c++)n1[Qc.letters[$c]]=Qc.base;var r1=function(t){return t.replace(UC,function(n){return n1[n]})},KC=XC(r1),o1=function(t){return t.replace(/^\s+|\s+$/g,"")},e7=function(t){return"".concat(t.label," ").concat(t.value)},t7=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=re({ignoreCase:!0,ignoreAccents:!0,stringify:e7,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,f=c?o1(r):r,g=c?o1(i(n)):i(n);return s&&(f=f.toLowerCase(),g=g.toLowerCase()),a&&(f=KC(f),g=r1(g)),l==="start"?g.substr(0,f.length)===f:g.indexOf(f)>-1}},n7=["innerRef"];function r7(e){var t=e.innerRef,n=Kt(e,n7),r=Tx(n,"onExited","in","enter","exit","appear");return le("input",de({ref:t},r,{css:Vc({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 o7=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function s7(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=I.useRef(!1),i=I.useRef(!1),c=I.useRef(0),l=I.useRef(null),f=I.useCallback(function(p,b){if(l.current!==null){var x=l.current,C=x.scrollTop,w=x.scrollHeight,v=x.clientHeight,_=l.current,A=b>0,S=w-v-C,L=!1;S>b&&a.current&&(r&&r(p),a.current=!1),A&&i.current&&(s&&s(p),i.current=!1),A&&b>S?(n&&!a.current&&n(p),_.scrollTop=w,L=!0,a.current=!0):!A&&-b>C&&(o&&!i.current&&o(p),_.scrollTop=0,L=!0,i.current=!0),L&&o7(p)}},[n,r,o,s]),g=I.useCallback(function(p){f(p,p.deltaY)},[f]),y=I.useCallback(function(p){c.current=p.changedTouches[0].clientY},[]),E=I.useCallback(function(p){var b=c.current-p.changedTouches[0].clientY;f(p,b)},[f]),m=I.useCallback(function(p){if(p){var b=_x?{passive:!1}:!1;p.addEventListener("wheel",g,b),p.addEventListener("touchstart",y,b),p.addEventListener("touchmove",E,b)}},[E,y,g]),h=I.useCallback(function(p){p&&(p.removeEventListener("wheel",g,!1),p.removeEventListener("touchstart",y,!1),p.removeEventListener("touchmove",E,!1))},[E,y,g]);return I.useEffect(function(){if(t){var p=l.current;return m(p),function(){h(p)}}},[t,m,h]),function(p){l.current=p}}var s1=["boxSizing","height","overflow","paddingRight","position"],a1={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function i1(e){e.preventDefault()}function c1(e){e.stopPropagation()}function l1(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function u1(){return"ontouchstart"in window||navigator.maxTouchPoints}var d1=!!(typeof window<"u"&&window.document&&window.document.createElement),es=0,ao={capture:!1,passive:!1};function a7(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=I.useRef({}),s=I.useRef(null),a=I.useCallback(function(c){if(d1){var l=document.body,f=l&&l.style;if(r&&s1.forEach(function(m){var h=f&&f[m];o.current[m]=h}),r&&es<1){var g=parseInt(o.current.paddingRight,10)||0,y=document.body?document.body.clientWidth:0,E=window.innerWidth-y+g||0;Object.keys(a1).forEach(function(m){var h=a1[m];f&&(f[m]=h)}),f&&(f.paddingRight="".concat(E,"px"))}l&&u1()&&(l.addEventListener("touchmove",i1,ao),c&&(c.addEventListener("touchstart",l1,ao),c.addEventListener("touchmove",c1,ao))),es+=1}},[r]),i=I.useCallback(function(c){if(d1){var l=document.body,f=l&&l.style;es=Math.max(es-1,0),r&&es<1&&s1.forEach(function(g){var y=o.current[g];f&&(f[g]=y)}),l&&u1()&&(l.removeEventListener("touchmove",i1,ao),c&&(c.removeEventListener("touchstart",l1,ao),c.removeEventListener("touchmove",c1,ao)))}},[r]);return I.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function i7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var c7=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},l7=process.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:i7};function u7(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,a=e.onBottomLeave,i=e.onTopArrive,c=e.onTopLeave,l=s7({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),f=a7({isEnabled:n}),g=function(E){l(E),f(E)};return le(I.Fragment,null,n&&le("div",{onClick:c7,css:l7}),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 f7=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},p7=function(t){var n=t.name,r=t.onFocus;return le("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:f7,value:"",onChange:function(){}})},h7=p7;function Uc(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 g7(){return Uc(/^iPhone/i)}function f1(){return Uc(/^Mac/i)}function m7(){return Uc(/^iPad/i)||f1()&&navigator.maxTouchPoints>1}function b7(){return g7()||m7()}function y7(){return f1()||b7()}var x7=function(t){return t.label},p1=function(t){return t.label},h1=function(t){return t.value},C7=function(t){return!!t.isDisabled},E7={clearIndicator:rC,container:Xx,control:uC,dropdownIndicator:tC,group:hC,groupHeading:mC,indicatorsContainer:qx,indicatorSeparator:sC,input:CC,loadingIndicator:cC,loadingMessage:Vx,menu:Dx,menuList:Px,menuPortal:Wx,multiValue:_C,multiValueLabel:SC,multiValueRemove:AC,noOptionsMessage:Bx,option:DC,placeholder:MC,singleValue:BC,valueContainer:Yx},v7={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%)"},w7=4,g1=4,I7=38,_7=g1*2,S7={baseUnit:g1,controlHeight:I7,menuGutter:_7},Kc={borderRadius:w7,colors:v7,spacing:S7},A7={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Wf(),captureMenuScroll:!Wf(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:t7(),formatGroupLabel:x7,getOptionLabel:p1,getOptionValue:h1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:C7,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!wx(),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 m1(e,t,n,r){var o=E1(e,t,n),s=v1(e,t,n),a=C1(e,t),i=Ta(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function Aa(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return m1(e,a,t,i)}).filter(function(a){return x1(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=m1(e,n,t,r);return x1(e,s)?s:void 0}).filter(Sx)}function b1(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,no(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function y1(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,no(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 T7(e,t){return b1(Aa(e,t))}function x1(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!I1(e)||!s)&&w1(e,{label:a,value:i,data:o},r)}function L7(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 O7(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var el=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},C1=function(t,n){return t.getOptionLabel(n)},Ta=function(t,n){return t.getOptionValue(n)};function E1(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function v1(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Ta(e,t);return n.some(function(o){return Ta(e,o)===r})}function w1(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var I1=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},F7=1,La=function(e){X6(n,e);var t=J6(n);function n(r){var o;if(W6(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=y7(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,l){var f=o.props,g=f.onChange,y=f.name;l.name=y,o.ariaOnChange(c,l),g(c,l)},o.setValue=function(c,l,f){var g=o.props,y=g.closeMenuOnSelect,E=g.isMulti,m=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:m}),y&&(o.setState({inputIsHiddenAfterUpdate:!E}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:f})},o.selectOption=function(c){var l=o.props,f=l.blurInputOnSelect,g=l.isMulti,y=l.name,E=o.state.selectValue,m=g&&o.isOptionSelected(c,E),h=o.isOptionDisabled(c,E);if(m){var p=o.getOptionValue(c);o.setValue(E.filter(function(b){return o.getOptionValue(b)!==p}),"deselect-option",c)}else if(!h)g?o.setValue([].concat(no(E),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:y});return}f&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,f=o.state.selectValue,g=o.getOptionValue(c),y=f.filter(function(m){return o.getOptionValue(m)!==g}),E=Ko(l,y,y[0]||null);o.onChange(E,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Ko(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,l=o.state.selectValue,f=l[l.length-1],g=l.slice(0,l.length-1),y=Ko(c,g,g[0]||null);f&&o.onChange(y,{action:"pop-value",removedValue:f})},o.getFocusedOptionId=function(c){return el(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return y1(Aa(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,l=new Array(c),f=0;f<c;f++)l[f]=arguments[f];return bx.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return C1(o.props,c)},o.getOptionValue=function(c){return Ta(o.props,c)},o.getStyles=function(c,l){var f=o.props.unstyled,g=E7[c](l,f);g.boxSizing="border-box";var y=o.props.styles[c];return y?y(g,l):g},o.getClassNames=function(c,l){var f,g;return(f=(g=o.props.classNames)[c])===null||f===void 0?void 0:f.call(g,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return HC(o.props)},o.buildCategorizedOptions=function(){return Aa(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return b1(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,l){o.setState({ariaSelection:re({value:c},l)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var l=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():l&&o.openMenu("first"):(l&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var l=o.props,f=l.isMulti,g=l.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!f}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&wa(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var l=c.touches,f=l&&l.item(0);f&&(o.initialTouchX=f.clientX,o.initialTouchY=f.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,f=l&&l.item(0);if(f){var g=Math.abs(f.clientX-o.initialTouchX),y=Math.abs(f.clientY-o.initialTouchY),E=5;o.userIsDragging=g>E||y>E}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,f=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(f,{action:"input-change",prevInputValue:l}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var l=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:l}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var l=o.getFocusableOptions(),f=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:f>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return I1(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,f=l.isMulti,g=l.backspaceRemovesValue,y=l.escapeClearsValue,E=l.inputValue,m=l.isClearable,h=l.isDisabled,p=l.menuIsOpen,b=l.onKeyDown,x=l.tabSelectsValue,C=l.openMenuOnFocus,w=o.state,v=w.focusedOption,_=w.focusedValue,A=w.selectValue;if(!h&&!(typeof b=="function"&&(b(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!f||E)return;o.focusValue("previous");break;case"ArrowRight":if(!f||E)return;o.focusValue("next");break;case"Delete":case"Backspace":if(E)return;if(_)o.removeValue(_);else{if(!g)return;f?o.popValue():m&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!p||!x||!v||C&&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:E}),o.onMenuClose()):m&&y&&o.clearValue();break;case" ":if(E)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||++F7),o.state.selectValue=va(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=el(s,a[i])}return o}return Z6(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&&Hf(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&&(Hf(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,a=this.state,i=a.selectValue,c=a.isFocused,l=this.buildFocusableOptions(),f=o==="first"?0:l.length-1;if(!this.props.isMulti){var g=l.indexOf(i[0]);g>-1&&(f=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[f],focusedOptionId:this.getFocusedOptionId(l[f])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,a=s.selectValue,i=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=a.indexOf(i);i||(c=-1);var l=a.length-1,f=-1;if(a.length){switch(o){case"previous":c===0?f=0:c===-1?f=l:f=c-1;break;case"next":c>-1&&c<l&&(f=c+1);break}this.setState({inputIsHidden:f!==-1,focusedValue:a[f]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,a=this.state.focusedOption,i=this.getFocusableOptions();if(i.length){var c=0,l=i.indexOf(a);a||(l=-1),o==="up"?c=l>0?l-1:i.length-1:o==="down"?c=(l+1)%i.length:o==="pageup"?(c=l-s,c<0&&(c=0)):o==="pagedown"?(c=l+s,c>i.length-1&&(c=i.length-1)):o==="last"&&(c=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(i[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Kc):re(re({},Kc),this.props.theme):Kc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,f=this.setValue,g=this.props,y=g.isMulti,E=g.isRtl,m=g.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:h,isMulti:y,isRtl:E,options:m,selectOption:l,selectProps:g,setValue:f,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,a=o.isMulti;return s===void 0?a:s}},{key:"isOptionDisabled",value:function(o,s){return E1(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return v1(this.props,o,s)}},{key:"filterOption",value:function(o,s){return w1(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,i=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:a,selectValue:i})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,a=o.isSearchable,i=o.inputId,c=o.inputValue,l=o.tabIndex,f=o.form,g=o.menuIsOpen,y=o.required,E=this.getComponents(),m=E.Input,h=this.state,p=h.inputIsHidden,b=h.ariaSelection,x=this.commonProps,C=i||this.getElementId("input"),w=re(re(re({"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()?(b==null?void 0:b.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?T.createElement(m,de({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:s,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:f,type:"text",value:c},w)):T.createElement(r7,de({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ea,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:f,value:""},w))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,f=s.SingleValue,g=s.Placeholder,y=this.commonProps,E=this.props,m=E.controlShouldRenderValue,h=E.isDisabled,p=E.isMulti,b=E.inputValue,x=E.placeholder,C=this.state,w=C.selectValue,v=C.focusedValue,_=C.isFocused;if(!this.hasValue()||!m)return b?null:T.createElement(g,de({},y,{key:"placeholder",isDisabled:h,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),x);if(p)return w.map(function(S,L){var N=S===v,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return T.createElement(a,de({},y,{components:{Container:i,Label:c,Remove:l},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(b)return null;var A=w[0];return T.createElement(f,de({},y,{data:A,isDisabled:h}),this.formatOptionLabel(A,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,de({},a,{innerProps:g,isFocused:f}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,f=this.state.isFocused;if(!s||!l)return null;var g={"aria-hidden":"true"};return T.createElement(s,de({},a,{innerProps:g,isDisabled:c,isFocused:f}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return T.createElement(a,de({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return T.createElement(s,de({},a,{innerProps:l,isDisabled:i,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),a=s.Group,i=s.GroupHeading,c=s.Menu,l=s.MenuList,f=s.MenuPortal,g=s.LoadingMessage,y=s.NoOptionsMessage,E=s.Option,m=this.commonProps,h=this.state.focusedOption,p=this.props,b=p.captureMenuScroll,x=p.inputValue,C=p.isLoading,w=p.loadingMessage,v=p.minMenuHeight,_=p.maxMenuHeight,A=p.menuIsOpen,S=p.menuPlacement,L=p.menuPosition,N=p.menuPortalTarget,D=p.menuShouldBlockScroll,k=p.menuShouldScrollIntoView,M=p.noOptionsMessage,B=p.onMenuScrollToTop,Y=p.onMenuScrollToBottom;if(!A)return null;var J=function(W,R){var X=W.type,$=W.data,ae=W.isDisabled,ie=W.isSelected,P=W.label,ee=W.value,ye=h===$,z=ae?void 0:function(){return o.onOptionHover($)},Ae=ae?void 0:function(){return o.selectOption($)},Ge="".concat(o.getElementId("option"),"-").concat(R),We={id:Ge,onClick:Ae,onMouseMove:z,onMouseOver:z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ie};return T.createElement(E,de({},m,{innerProps:We,data:$,isDisabled:ae,isSelected:ie,key:Ge,label:P,type:X,value:ee,isFocused:ye,innerRef:ye?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(W.data,"menu"))},H;if(this.hasOptions())H=this.getCategorizedOptions().map(function(V){if(V.type==="group"){var W=V.data,R=V.options,X=V.index,$="".concat(o.getElementId("group"),"-").concat(X),ae="".concat($,"-heading");return T.createElement(a,de({},m,{key:$,data:W,options:R,Heading:i,headingProps:{id:ae,data:V.data},label:o.formatGroupLabel(V.data)}),V.options.map(function(ie){return J(ie,"".concat(X,"-").concat(ie.index))}))}else if(V.type==="option")return J(V,"".concat(V.index))});else if(C){var G=w({inputValue:x});if(G===null)return null;H=T.createElement(g,m,G)}else{var q=M({inputValue:x});if(q===null)return null;H=T.createElement(y,m,q)}var oe={minMenuHeight:v,maxMenuHeight:_,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:k},te=T.createElement(Nx,de({},m,oe),function(V){var W=V.ref,R=V.placerProps,X=R.placement,$=R.maxHeight;return T.createElement(c,de({},m,oe,{innerRef:W,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:C,placement:X}),T.createElement(u7,{captureEnabled:b,onTopArrive:B,onBottomArrive:Y,lockEnabled:D},function(ae){return T.createElement(l,de({},m,{innerRef:function(P){o.getMenuListRef(P),ae(P)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:o.getElementId("listbox")},isLoading:C,maxHeight:$,focusedOption:h}),H)}))});return N||L==="fixed"?T.createElement(f,de({},m,{appendTo:N,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),te):te}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,f=s.required,g=this.state.selectValue;if(f&&!this.hasValue()&&!i)return T.createElement(h7,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var y=g.map(function(h){return o.getOptionValue(h)}).join(a);return T.createElement("input",{name:l,type:"hidden",value:y})}else{var E=g.length>0?g.map(function(h,p){return T.createElement("input",{key:"i-".concat(p),name:l,type:"hidden",value:o.getOptionValue(h)})}):T.createElement("input",{name:l,type:"hidden",value:""});return T.createElement("div",null,E)}else{var m=g[0]?this.getOptionValue(g[0]):"";return T.createElement("input",{name:l,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,f=s.selectValue,g=this.getFocusableOptions();return T.createElement($C,de({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:f,focusableOptions:g,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,a=o.IndicatorsContainer,i=o.SelectContainer,c=o.ValueContainer,l=this.props,f=l.className,g=l.id,y=l.isDisabled,E=l.menuIsOpen,m=this.state.isFocused,h=this.commonProps=this.getCommonProps();return T.createElement(i,de({},h,{className:f,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:y,isFocused:m}),this.renderLiveRegion(),T.createElement(s,de({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:y,isFocused:m,menuIsOpen:E}),T.createElement(c,de({},h,{isDisabled:y}),this.renderPlaceholderOrValue(),this.renderInput()),T.createElement(a,de({},h,{isDisabled:y}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var a=s.prevProps,i=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,l=s.ariaSelection,f=s.isFocused,g=s.prevWasFocused,y=s.instancePrefix,E=o.options,m=o.value,h=o.menuIsOpen,p=o.inputValue,b=o.isMulti,x=va(m),C={};if(a&&(m!==a.value||E!==a.options||h!==a.menuIsOpen||p!==a.inputValue)){var w=h?T7(o,x):[],v=h?y1(Aa(o,x),"".concat(y,"-option")):[],_=i?L7(s,x):null,A=O7(s,w),S=el(v,A);C={selectValue:x,focusedOption:A,focusedOptionId:S,focusableOptionsWithIds:v,focusedValue:_,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},N=l,D=f&&g;return f&&!D&&(N={value:Ko(b,x,x[0]||null),options:x,action:"initial-input-focus"},D=!g),(l==null?void 0:l.action)==="initial-input-focus"&&(N=null),re(re(re({},C),L),{},{prevProps:o,ariaSelection:N,prevWasFocused:D})}}]),n}(I.Component);La.defaultProps=A7;var k7=I.forwardRef(function(e,t){var n=Lc(e);return T.createElement(La,de({ref:t},n))}),D7=k7;const N7=u.styled(u.Box)`
|
|
610
610
|
display: flex;
|
|
611
611
|
align-items: center;
|
|
612
612
|
gap: 2px;
|
|
@@ -620,12 +620,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
620
620
|
max-width: 100%;
|
|
621
621
|
overflow-wrap: break-word;
|
|
622
622
|
}
|
|
623
|
-
`,
|
|
623
|
+
`,R7=u.styled("img")`
|
|
624
624
|
width: 24px;
|
|
625
625
|
height: 24px;
|
|
626
626
|
border-radius: 50%;
|
|
627
627
|
margin-right: 12px;
|
|
628
|
-
`;function _1(e){const{data:t}=e;return d.jsx(fn.Option,{...e,children:d.jsxs(
|
|
628
|
+
`;function _1(e){const{data:t}=e;return d.jsx(fn.Option,{...e,children:d.jsxs(N7,{children:[t.avatarUrl?d.jsx(R7,{className:"selectField__avatar",src:t.avatarUrl,alt:`${e.label}'s avatar`}):null,d.jsx("span",{children:e.children})]})})}const M7=u.styled(u.Box)`
|
|
629
629
|
height: 24px;
|
|
630
630
|
width: 24px;
|
|
631
631
|
border-radius: 50%;
|
|
@@ -650,27 +650,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
650
650
|
&:after {
|
|
651
651
|
transform: rotate(-45deg);
|
|
652
652
|
}
|
|
653
|
-
`,S1=e=>d.jsx(fn.ClearIndicator,{...e,children:d.jsx(
|
|
653
|
+
`,S1=e=>d.jsx(fn.ClearIndicator,{...e,children:d.jsx(M7,{})}),A1=(e,t)=>({...e,placeholder:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.placeholder)==null?void 0:o.call(e,n,r),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},control:(n,r)=>{var o;return{...n,backgroundColor:"transparent",...(o=e==null?void 0:e.control)==null?void 0:o.call(e,n,r)}},...t?{menuPortal:(n,r)=>{var o;return{...n,...(o=e==null?void 0:e.menuPortal)==null?void 0:o.call(e,n,r),zIndex:t,fontFamily:u.theme.typography.fontFamily,fontSize:"13px"}}}:null}),P7=u.styled(u.Stack)`
|
|
654
654
|
width: 0;
|
|
655
655
|
height: 0;
|
|
656
|
-
`,
|
|
656
|
+
`,j7=({root:e,rootMargin:t,callback:n})=>{const r=I.useRef(null),o=I.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 d.jsx(P7,{ref:o})},T1=({options:e,isMulti:t,isScrollTarget:n})=>{const r=I.useRef(),o=I.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}},B7=e=>d.jsx(fn.DropdownIndicator,{...e,children:d.jsx(u.Icon,{children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{}):d.jsx(u.icons.ArrowDropDown,{})})}),L1=()=>({ClearIndicator:S1,DropdownIndicator:B7,IndicatorSeparator:()=>null,Option:_1}),ts=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=I.useState(!1),c=I.useCallback(g=>{i(!g.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:f}=T1({options:o,isMulti:s,isScrollTarget:t});return d.jsxs(d.Fragment,{children:[n.menuPortalTarget&&n.root?d.jsx(j7,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,d.jsx(D7,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:A1(n.styles,e),components:n.components?n.components:L1(),closeMenuOnScroll:f,...a&&{menuIsOpen:!1}})]})};ts.getDefaultComponents=L1;const O1="Required Field",V7="Validation Failed";var F1=(e=>(e.DATE="DD/MM/YYYY",e))(F1||{}),G7=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function k1(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var a=e.isLoading,i=a===void 0?!1:a,c=e.onInputChange,l=e.filterOption,f=l===void 0?null:l,g=Kt(e,G7),y=g.inputValue,E=I.useRef(void 0),m=I.useRef(!1),h=I.useState(Array.isArray(n)?n:void 0),p=ot(h,2),b=p[0],x=p[1],C=I.useState(typeof y<"u"?y:""),w=ot(C,2),v=w[0],_=w[1],A=I.useState(n===!0),S=ot(A,2),L=S[0],N=S[1],D=I.useState(void 0),k=ot(D,2),M=k[0],B=k[1],Y=I.useState([]),J=ot(Y,2),H=J[0],G=J[1],q=I.useState(!1),oe=ot(q,2),te=oe[0],V=oe[1],W=I.useState({}),R=ot(W,2),X=R[0],$=R[1],ae=I.useState(void 0),ie=ot(ae,2),P=ie[0],ee=ie[1],ye=I.useState(void 0),z=ot(ye,2),Ae=z[0],Ge=z[1];o!==Ae&&($({}),Ge(o)),n!==P&&(x(Array.isArray(n)?n:void 0),ee(n)),I.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var We=I.useCallback(function(et,ct){if(!s)return ct();var Qe=s(et,ct);Qe&&typeof Qe.then=="function"&&Qe.then(ct,function(){return ct()})},[s]);I.useEffect(function(){n===!0&&We(v,function(et){m.current&&(x(et||[]),N(!!E.current))})},[]);var rn=I.useCallback(function(et,ct){var Qe=yx(et,ct,c);if(!Qe){E.current=void 0,_(""),B(""),G([]),N(!1),V(!1);return}if(o&&X[Qe])_(Qe),B(Qe),G(X[Qe]),N(!1),V(!1);else{var Rr=E.current={};_(Qe),N(!0),V(!M),We(Qe,function(Bt){m&&Rr===E.current&&(E.current=void 0,N(!1),B(Qe),G(Bt||[]),V(!1),$(Bt?re(re({},X),{},to({},Qe,Bt)):X))})}},[o,We,M,X,c]),yn=te?[]:v&&M?H:b||[];return re(re({},g),{},{options:yn,isLoading:L||i,onInputChange:rn,filterOption:f})}var H7=I.forwardRef(function(e,t){var n=k1(e),r=Lc(n);return T.createElement(La,de({ref:t},r))}),W7=H7,Z7=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],D1=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 D1(t,s,o)})||r.some(function(s){return D1(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function X7(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,l=e.getNewOptionData,f=l===void 0?tl.getNewOptionData:l,g=e.onCreateOption,y=e.options,E=y===void 0?[]:y,m=e.onChange,h=Kt(e,Z7),p=h.getOptionValue,b=p===void 0?h1:p,x=h.getOptionLabel,C=x===void 0?p1:x,w=h.inputValue,v=h.isLoading,_=h.isMulti,A=h.value,S=h.name,L=I.useMemo(function(){return c(w,va(A),E,{getOptionValue:b,getOptionLabel:C})?f(w,a(w)):void 0},[a,f,C,b,w,c,E,A]),N=I.useMemo(function(){return(n||!v)&&L?o==="first"?[L].concat(no(E)):[].concat(no(E),[L]):E},[n,o,v,L,E]),D=I.useCallback(function(k,M){if(M.action!=="select-option")return m(k,M);var B=Array.isArray(k)?k:[k];if(B[B.length-1]===L){if(g)g(w);else{var Y=f(w,w),J={action:"create-option",name:S,option:Y};m(Ko(_,[].concat(no(va(A)),[Y]),Y),J)}return}m(k,M)},[f,w,_,S,L,g,m,A]);return re(re({},h),{},{options:N,onChange:D})}var z7=I.forwardRef(function(e,t){var n=k1(e),r=Lc(n),o=X7(r);return T.createElement(La,de({ref:t},o))}),Y7=z7;const J7=u.styled(u.Typography)`
|
|
657
657
|
display: block;
|
|
658
658
|
white-space: nowrap;
|
|
659
659
|
overflow: hidden;
|
|
660
660
|
text-overflow: ellipsis;
|
|
661
|
-
`,N1=(e,t)=>{const n=I.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},R1=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
|
|
661
|
+
`,N1=(e,t)=>{const n=I.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},R1=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 q7(e){return d.jsx(fn.DropdownIndicator,{...e,children:d.jsx(u.Icon,{children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{}):d.jsx(u.icons.ArrowDropDown,{})})})}const Q7=e=>d.jsxs(u.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[d.jsx(u.Stack,{flexShrink:0,children:d.jsx(R1,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),d.jsxs(J7,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function $7({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=I.useState([]),[s,a]=I.useState(""),[i,c]=I.useState(!1),l=I.useRef(),{isMulti:f,createOption:g,loadOptions:y,isApiSearchEnabled:E=!1,isInfiniteScrollable:m=!1,loadOptionsOnFocus:h=!1}=n,{getValue:p,closeMenuOnScroll:b}=T1({options:r,isMulti:f,isScrollTarget:t}),x=(M,B,Y)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,y==null?void 0:y(M,B,Y,l.current)),C=N1((M,B)=>{if(a(M),r.length>0&&!E){const J=r.filter(H=>H&&typeof H=="object"&&"label"in H&&typeof H.label=="string"?H.label.toLowerCase().includes(M.toLowerCase()):!1);B(J);return}const Y=J=>{B(J),o(J)};x==null||x(M,Y,!1)},300),w=(M,B)=>{c(!1),!(B&&"isError"in B&&B.isError)&&o(M)},v=M=>{var B;(B=n.onMenuScrollToBottom)==null||B.call(n,M),m&&y&&!i&&(c(!0),x(s,w,!0))},_=(M,B)=>{var Y;(Y=n.onInputChange)==null||Y.call(n,M,B),B.action==="input-change"&&E&&(a(M),o([]),M||(c(!0),C(M,w)))},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,w,!1))},L=M=>B=>{var J;const Y=B.find(H=>H.label===M);!n.isMulti&&Y&&((J=n.onChange)==null||J.call(n,Y,{action:"select-option",name:n.name,option:Y})),o(B),c(!1)},N=M=>{c(!0),g==null||g(M,L(M))},D=()=>{c(!0),x==null||x(s,w,!1)},k=g?Y7:W7;return d.jsx(k,{...n,menuShouldScrollIntoView:!1,value:n.value?p(n.value):null,isDisabled:n.disabled,loadOptions:C,onMenuScrollToBottom:v,onInputChange:_,onBlur:A,onFocus:S,onMenuOpen:D,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:A1(n.styles,e),components:{ClearIndicator:S1,DropdownIndicator:q7,IndicatorSeparator:()=>null,Option:_1},closeMenuOnScroll:b,...g?{formatCreateLabel:Q7,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:N,options:r}:null})}const io="table-cell-form-field",Oa="60px",Fa="24px",U7=u.styled(u.Box)`
|
|
662
662
|
width: 100%;
|
|
663
|
-
`,
|
|
663
|
+
`,K7=u.styled(u.Box)`
|
|
664
664
|
width: 100%;
|
|
665
665
|
overflow-x: auto;
|
|
666
|
-
`,
|
|
666
|
+
`,e8=u.styled(u.Box)`
|
|
667
667
|
--border-color: rgb(214, 221, 232);
|
|
668
668
|
--border-size: 1px;
|
|
669
669
|
display: grid;
|
|
670
670
|
grid-template-columns: ${({gridColumns:e})=>e};
|
|
671
671
|
border: 1px solid var(--border-color);
|
|
672
672
|
border-radius; 4px;
|
|
673
|
-
`,
|
|
673
|
+
`,t8=u.styled(u.Stack)`
|
|
674
674
|
margin-top: 16px;
|
|
675
675
|
flex-direction: row;
|
|
676
676
|
justify-content: space-between;
|
|
@@ -686,7 +686,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
686
686
|
&:last-child {
|
|
687
687
|
border-bottom: 0;
|
|
688
688
|
}
|
|
689
|
-
`,
|
|
689
|
+
`,n8=u.styled(M1)`
|
|
690
690
|
--cell-padding: 10px ${Fa};
|
|
691
691
|
border-bottom: 1px solid var(--border-color);
|
|
692
692
|
`,nl=u.styled(u.Box)`
|
|
@@ -716,7 +716,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
716
716
|
width: 100%;
|
|
717
717
|
height: 100%;
|
|
718
718
|
}
|
|
719
|
-
`,
|
|
719
|
+
`,r8=u.styled(P1)`
|
|
720
720
|
box-sizing: content-box;
|
|
721
721
|
padding: 4px 12px;
|
|
722
722
|
color: rgb(80, 109, 255);
|
|
@@ -738,9 +738,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
738
738
|
width: 20px;
|
|
739
739
|
height: 20px;
|
|
740
740
|
}
|
|
741
|
-
`,
|
|
741
|
+
`,o8=u.styled(u.Box)`
|
|
742
742
|
margin-left: auto;
|
|
743
|
-
`,
|
|
743
|
+
`,s8=u.styled(u.Stack)`
|
|
744
744
|
box-sizing: content-box;
|
|
745
745
|
padding: 4px 0;
|
|
746
746
|
flex-direction: row;
|
|
@@ -750,25 +750,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
750
750
|
min-height: 28px;
|
|
751
751
|
color: ${u.theme.palette.gray.gray1};
|
|
752
752
|
font-weight: bold;
|
|
753
|
-
`,
|
|
753
|
+
`,a8=u.styled(u.DatePicker)`
|
|
754
754
|
&.${io} .MuiInputBase-root {
|
|
755
755
|
height: ${Oa};
|
|
756
756
|
border: 0;
|
|
757
757
|
padding-left: ${Fa};
|
|
758
758
|
}
|
|
759
|
-
`;function
|
|
759
|
+
`;function i8(e){const[t,n]=I.useState(!1),r=I.useRef(null);I.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 d.jsx(a8,{inputFormat:e.inputFormat?e.inputFormat:F1.DATE,...e,value:e.value||null,open:t,onOpen:()=>n(!0),onClose:()=>n(!1),onChange:o,PopperProps:{anchorEl:r.current},renderInput:s=>d.jsx(u.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:d.jsx(u.InputAdornment,{position:"end",sx:{cursor:"pointer"},children:d.jsx(u.icons.CalendarTodayOutlinedIcon,{})})},onClick:()=>{t||n(!0)}})})}const c8=u.styled(u.Checkbox)`
|
|
760
760
|
&.${io} {
|
|
761
761
|
--v-margin: calc((${Oa} - 36px) / 2);
|
|
762
762
|
--h-margin: calc((100% - 36px) / 2);
|
|
763
763
|
margin: var(--v-margin) var(--h-margin);
|
|
764
764
|
}
|
|
765
|
-
`,
|
|
765
|
+
`,l8=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return d.jsx(c8,{onChange:o,onFocus:t,onBlur:n,...r})},j1=({label:e,isRequired:t,prefixNode:n,...r})=>e?d.jsxs(u.Typography,{variant:"body_sm_medium",component:"label",color:u.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?d.jsx("span",{className:"required__star",children:"*"}):null]}):null,u8=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"})),B1=250,vr="__id",ns={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:B1,arithmeticOperation:[]},ka=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=ns.defaultNumberOfRows,fixedRows:a=ns.fixedRows,cellWidth:i=ns.cellWidth,arithmeticOperation:c=ns.arithmeticOperation}=ns,fetchConfig:l={},createConfig:f={},stackIndex:g,onChange:y=()=>{},onFocus:E,onValidationError:m})=>{const h=t??[],p=(o==null?void 0:o.validations)??{},b=I.useRef(),x=I.useRef({}),[C,w]=I.useState({}),{colsLength:v,colsTemplate:_,colWidth:A}=I.useMemo(()=>{let V=0,W="";for(const R of r){let X=R.cols?Number(R.cols):1;isNaN(X)&&(X=1),V+=X,W+=`${R.cols??X}fr `}return a||(V+=.5,W+="0.5fr"),{colsLength:V,colsTemplate:W.trim(),colWidth:`${isNaN(i)?B1:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=I.useMemo(()=>{const V={},W={};for(const R of r){if(!R.valueConfig)continue;W[R.name]=R.valueConfig;const X=R.valueConfig.columnNames;for(const $ of X)V[$]||(V[$]=[]),V[$].push(R.name)}return{fieldDependency:V,fieldConfigs:W}},[r]);I.useEffect(()=>{if(t)return;const V=[];for(let W=0;W<s;W++){const R=U0();V.push({[vr]:R})}y(V)},[t,y,s]);const N=()=>{const V=Object.entries(x.current).filter(W=>!!W[1])[0];return(V==null?void 0:V[1])??""},D=()=>{const V={[vr]:U0()};y([...h,V])},k=V=>{const W=h.filter(R=>R[vr]!==V);y(W),w(R=>({...R,[V]:{}}));for(const R in x.current)R.startsWith(`${V}.`)&&delete x.current[R];m==null||m(e,N())},M=(V,{columnNames:W=[],operationType:R})=>{const X=W.map($=>V[$]);return""+K0(X,R)},B=(V,W)=>{const R=h.map(X=>V!==X[vr]?X:{...X,...W});y(R)},Y=(V,W)=>{const R=h.map(X=>{if(V!==X[vr])return X;const $={...X};for(const ae of W)delete $[ae];return $});y(R)},J=(V,W,R,X)=>{var ie;const $=((ie=X==null?void 0:X.target)==null?void 0:ie.value)??"",ae={...R,[W]:$};if(S[W])for(const P of S[W]){const ee=M(ae,L[P]);ae[P]=ee}B(V,ae)},H=(V,W,R)=>{B(V,{[W]:R})},G=(V,W,R,X)=>{if(R&&typeof R=="object"&&"value"in R&&typeof R.value=="string"&&typeof X.name<"u"){const $="prefillValues"in R&&R.prefillValues,ae={...W,[X.name]:R.value,...$};for(const ie in ae)if(S[ie])for(const P of S[ie]){const ee=M(ae,L[P]);ae[P]=ee}B(V,ae)}(X==null?void 0:X.action)==="clear"&&X.name&&Y(V,[X.name])},q=(V,W,R)=>{B(V,{[W]:(R==null?void 0:R.toISOString())??""})},oe=(V,W,R,X)=>{X&&w($=>{const ae=$[V]??{};return{...$,[V]:{...ae,[W]:R}}}),x.current={...x.current,[`${V}.${W}`]:typeof R=="string"?R:""},m==null||m(e,N())},te=V=>b.current===V;return d.jsxs(U7,{children:[d.jsx(K7,{ref:b,children:d.jsxs(e8,{gridColumns:_,minWidth:`calc( ${v} * ${A} )`,children:[d.jsx(n8,{children:r.map(({name:V,label:W,isRequired:R})=>d.jsx(nl,{children:d.jsx(j1,{label:W,isRequired:R})},V))}),h.map(({[vr]:V,...W})=>d.jsxs(M1,{children:[r.map(({name:R,key:X,...$})=>{var ae;return d.jsx(nl,{hasError:!!((ae=C==null?void 0:C[V])!=null&&ae[R]),children:d.jsx(wr,{name:R,value:W[R],...$,className:io,label:"",hideHelperText:!0,validation:p==null?void 0:p[R],onFocus:E,inputChangeHandler:ie=>J(V,R,W,ie),checkboxChangeHandler:(...ie)=>H(V,R,ie[1]),selectChangeHandler:(...ie)=>G(V,W,...ie),dateChangeHandler:(ie,P)=>q(V,ie,P),onValidationError:(...ie)=>oe(V,...ie),fetchConfig:l==null?void 0:l[R],createConfig:f==null?void 0:f[R],isScrollTarget:te,...g?{menuPortalTarget:document.body,stackIndex:g}:null})},R??X)}),a?null:d.jsx(nl,{children:d.jsx(u.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:d.jsx(P1,{onClick:()=>k(V),children:d.jsx(u8,{})})})})]},V))]})}),d.jsxs(t8,{children:[a?null:d.jsxs(r8,{onClick:D,children:[d.jsx(R1,{}),d.jsx(u.Typography,{children:"Add Line"})]}),c.length?d.jsx(o8,{children:c.map(({label:V,columnName:W,operationType:R,prefix:X="",prefixKey:$,suffix:ae="",suffixKey:ie})=>d.jsxs(s8,{children:[d.jsx(u.Typography,{fontWeight:500,children:V}),d.jsxs(u.Typography,{children:[d.jsxs("span",{children:[n[$]??X," "]}),d.jsx("span",{children:K0(h.map(P=>P[W]),R)}),d.jsx("span",{children:n[ie]??ae})]})]},V))}):null]})]})};ka.ROW_ID=vr;const d8=u.styled(u.Box)`
|
|
766
766
|
box-sizing: border-box;
|
|
767
767
|
&:not(:has(.${io})) {
|
|
768
768
|
transform: translate(0, 5px);
|
|
769
769
|
padding-bottom: 5px;
|
|
770
770
|
}
|
|
771
|
-
`,
|
|
771
|
+
`,f8=u.styled(u.TextField)`
|
|
772
772
|
&.${io} {
|
|
773
773
|
height: ${Oa};
|
|
774
774
|
position: relative;
|
|
@@ -788,7 +788,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
788
788
|
margin-top: 0px;
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
|
-
`,
|
|
791
|
+
`,p8=({inputProps:e,...t})=>{const n=r=>{r.currentTarget&&r.currentTarget.blur(),r.stopPropagation()};return d.jsx(d8,{children:d.jsx(f8,{...t,inputProps:{onWheel:n,...e}})})},h8=u.styled(p8)`
|
|
792
792
|
& .MuiFormHelperText-root {
|
|
793
793
|
position: absolute;
|
|
794
794
|
bottom: -24px;
|
|
@@ -928,7 +928,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
928
928
|
&.helper--error {
|
|
929
929
|
color: #d32f2f;
|
|
930
930
|
}
|
|
931
|
-
`,
|
|
931
|
+
`,g8=u.styled(u.Box)`
|
|
932
932
|
width: 100%;
|
|
933
933
|
position: relative;
|
|
934
934
|
& .MuiInputBase-root {
|
|
@@ -942,7 +942,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
942
942
|
position: absolute;
|
|
943
943
|
margin-left: 5px;
|
|
944
944
|
}
|
|
945
|
-
`,
|
|
945
|
+
`,m8=u.styled(u.Box)`
|
|
946
946
|
display: inline-block;
|
|
947
947
|
margin-right: 9px;
|
|
948
948
|
width: 9px;
|
|
@@ -954,7 +954,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
954
954
|
display: inline-block;
|
|
955
955
|
transition: transform 300ms;
|
|
956
956
|
}
|
|
957
|
-
`,
|
|
957
|
+
`,b8=u.styled(u.Stack)`
|
|
958
958
|
position: relative;
|
|
959
959
|
font-family: ${u.theme.typography.fontFamily};
|
|
960
960
|
&.expandable {
|
|
@@ -985,19 +985,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
985
985
|
overflow: hidden;
|
|
986
986
|
}
|
|
987
987
|
}
|
|
988
|
-
`,
|
|
988
|
+
`,y8=u.styled(u.IconButton)`
|
|
989
989
|
position: absolute;
|
|
990
990
|
top: 0;
|
|
991
991
|
left: 100%;
|
|
992
992
|
transform: translate(5px, 0);
|
|
993
993
|
height: 34px;
|
|
994
994
|
width: 34px;
|
|
995
|
-
`,
|
|
995
|
+
`,x8=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"})),wr=({fetchConfig:e,createConfig:t,menuPortalTarget:n,iconData:r,stackIndex:o,isScrollTarget:s,onValidationError:a,inputChangeHandler:i,selectChangeHandler:c,dateChangeHandler:l,tableChangeHandler:f,checkboxChangeHandler:g,...y})=>{const{validation:E,helperText:m,id:h,label:p,name:b,type:x,validateOnBlur:C=!0,validateOnChange:w=!0,isRequired:v,labelSpacing:_=1,showGlobalLoader:A=!1,hideHelperText:S=!1,meta:{isExpandable:L=x==="table",isExpanded:N=!0}={}}=y,[D,k]=I.useState(!1),[M,B]=I.useState(""),[Y,J]=I.useState(N);I.useEffect(()=>{D||G(y.value,!1)},[D,y.value]);const H=P=>{var ee;P&&!D&&k(!0),(ee=y.onFocus)==null||ee.call(y,P)};function G(P,ee=!0,ye){let z="";if((E!=null&&E.isRequired||v)&&(z=P?"":O1,!P&&typeof(E==null?void 0:E.isRequired)=="function")){const Ge=E.isRequired(P);Ge&&typeof Ge=="boolean"?z=O1:Ge&&(z=Ge)}let Ae={id:h,name:b,label:p};if(y.type==="date"?Ae={...Ae,disableFuture:y.disableFuture,disablePast:y.disablePast}:y.type==="number"?Ae={...Ae,min:y.min,max:y.max}:y.type==="text"&&y.multiline&&(Ae={...Ae,maxCharacters:y.maxCharacters}),P&&!z&&(E!=null&&E.validate)){const Ge=E.validate(P,{...Ae,...ye});typeof Ge=="boolean"&&Ge===!1?z=V7:typeof Ge=="string"&&(z=Ge)}ee&&B(z),a==null||a(b,z,ee)}const q=P=>{var ee;D||k(!0),(ee=y.onBlur)==null||ee.call(y,P),D&&C&&G(y.value)},oe=()=>S?null:y.helperText?d.jsx(G1,{children:m}):D&&M?d.jsx(G1,{className:"helper--error",children:M}):null,te=P=>{P&&!D&&k(!0),i==null||i(P),D&&w&&G(P.target.value)},V=(P,ee)=>{P&&!D&&k(!0),g==null||g(P,ee),D&&w&&G(ee)},W=(P,ee)=>{c==null||c(P,ee),P&&!D&&k(!0),P&&typeof P=="object"&&"value"in P&&D&&w&&G(P.value)},R=(P,ee)=>{l==null||l(b,P,ee),P&&!D&&k(!0),D&&w&&G(P)},X=P=>{f==null||f(b,P)},$=(P,ee)=>{D&&(a==null||a(P,ee),B(typeof ee=="string"?ee:""))},ae=P=>{J(ee=>!ee)},ie=P=>{if(A)return d.jsx(u.Skeleton,{variant:"rounded",height:29.69,animation:"wave"});switch(P.type){case"select":return d.jsx(V1,{children:d.jsx(ts,{...P,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&D?"formField__select--error":""} ${P.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:W,onFocus:H,menuPortalTarget:n})});case"async-select":return d.jsx(V1,{children:d.jsx($7,{...P,stackIndex:o,isScrollTarget:s,className:`formField__select ${M&&D?"formField__select--error":""} ${P.className||""}`,classNamePrefix:"hiverFormField",onBlur:q,onChange:W,onFocus:H,loadOptions:e==null?void 0:e.loadOptions,createOption:t==null?void 0:t.createOption,menuPortalTarget:n})});case"date":return d.jsx(i8,{...P,label:void 0,onBlur:q,onFocus:H,onChange:R,error:!!(M&&D)});case"table":return d.jsx(ka,{...P,value:P.value,onChange:X,onFocus:H,onValidationError:$,fetchConfig:e==null?void 0:e.loadOptionsList,createConfig:t==null?void 0:t.createOptionList,stackIndex:o});case"checkbox":return d.jsx(l8,{...P,onChange:V,onFocus:H,onBlur:q});default:return d.jsx(h8,{variant:"outlined",fullWidth:!0,id:h,...P,value:P.value,label:void 0,onBlur:q,onChange:te,onFocus:H,error:!!(M&&D),inputProps:{type:P.type,min:P.min,max:P.max,...P.inputProps}})}};return d.jsxs(b8,{spacing:_,useFlexGap:!0,...L&&{className:`expandable ${Y?"open":"close"}`},children:[d.jsx(j1,{label:p,htmlFor:h,isRequired:!!(E!=null&&E.isRequired)||v,prefixNode:L?d.jsx(m8,{children:d.jsx(x8,{className:"arrow-icon"})}):null,...L&&{onClick:()=>ae()}}),d.jsxs(g8,{className:"input-wrapper",children:[d.jsx(u.Tooltip,{title:y.toolTipTitle,arrow:!0,placement:"right-end",disableHoverListener:!0,children:ie(y)}),r!=null&&r.icon?d.jsx(u.Tooltip,{title:r.toolTipText,placement:"bottom",children:d.jsx(y8,{className:"form--sideIcon",children:r==null?void 0:r.icon})}):null]}),oe()]})},C8=u.styled(u.Stack)`
|
|
996
996
|
& .authform__section-title {
|
|
997
997
|
margin-top: 32px;
|
|
998
998
|
margin-bottom: -12px;
|
|
999
999
|
}
|
|
1000
|
-
`,
|
|
1000
|
+
`,E8=u.styled(u.Stack)`
|
|
1001
1001
|
${({cols:e,spacing:t,theme:n})=>`
|
|
1002
1002
|
flex-flow: row wrap;
|
|
1003
1003
|
justify-content: flex-start;
|
|
@@ -1005,13 +1005,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1005
1005
|
--field-space: calc( ${e-1} * var(--field-gap));
|
|
1006
1006
|
--field-width: calc( ( 100% - var(--field-space) ) / ${e} );
|
|
1007
1007
|
`}
|
|
1008
|
-
`,
|
|
1008
|
+
`,v8=u.styled(u.Box)`
|
|
1009
1009
|
--cols: ${({cols:e})=>e};
|
|
1010
1010
|
--include-gap: calc((var(--cols) - 1) * var(--field-gap));
|
|
1011
1011
|
--include-width: calc(var(--cols) * var(--field-width));
|
|
1012
1012
|
width: calc(var(--include-width) + var(--include-gap));
|
|
1013
1013
|
max-width: 100%;
|
|
1014
|
-
`,H1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:l,onValidationError:f,stackIndex:g,sectionSpacing:y=3,fieldsSpacing:E=3,labelSpacing:m=1,fetchConfig:h,createConfig:p,showGlobalLoader:b=!1,cols:
|
|
1014
|
+
`,H1=({formConfig:e,icons:t,selectChangeHandler:n,inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,predicates:i,values:c,validations:l,onValidationError:f,stackIndex:g,sectionSpacing:y=3,fieldsSpacing:E=3,labelSpacing:m=1,fetchConfig:h,createConfig:p,showGlobalLoader:b=!1,cols:x=1})=>{const C=w=>(v,_)=>{n==null||n(v,_,w)};return d.jsx(C8,{spacing:y,children:e.map(({id:w,title:v,formFields:_})=>_.every(S=>S.hideInUI)?null:d.jsxs(I.Fragment,{children:[v&&_.length?d.jsx(u.Typography,{variant:"h3",className:"authform__section-title",children:v}):null,d.jsx(E8,{useFlexGap:!0,spacing:E,cols:x,children:_.map(S=>{var L;return i&&typeof i=="object"&&S.name in i&&i[S.name]===!1||S.hideInUI?null:d.jsx(v8,{cols:S.cols??1,children:d.jsx(wr,{value:c==null?void 0:c[S.name],data:c,...S,stackIndex:g,selectChangeHandler:C(S),inputChangeHandler:r,checkboxChangeHandler:o,dateChangeHandler:s,tableChangeHandler:a,validation:l==null?void 0:l[S.name],onValidationError:f,iconData:t==null?void 0:t[S.name],labelSpacing:m,fetchConfig:h==null?void 0:h[S.name],createConfig:p==null?void 0:p[S.name],showGlobalLoader:b})},((L=h==null?void 0:h[S.name])==null?void 0:L.key)||S.name)})})]},w))})},w8=u.styled(u.Box)`
|
|
1015
1015
|
width: 100%;
|
|
1016
1016
|
aspect-ratio: ${({aspectRatio:e})=>e};
|
|
1017
1017
|
border-radius: 8px;
|
|
@@ -1035,7 +1035,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1035
1035
|
width: 40px;
|
|
1036
1036
|
height: 40px;
|
|
1037
1037
|
}
|
|
1038
|
-
`,
|
|
1038
|
+
`,I8=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"})))),_8=({aspectRatio:e="auto",...t})=>{const[n,r]=I.useState(!1);return n?null:d.jsxs(w8,{aspectRatio:e,children:[d.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),d.jsx(I8,{className:"play-icon"})]})},W1=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${u.tooltipClasses.arrow}`]:{...t},[`& .${u.tooltipClasses.tooltip}`]:{...e}})),S8=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"}));function Z1(e){return!!e.interfaceDetails||!!e.searchInterfaceDetails}const X1=e=>!!e&&typeof e=="object"&&"value"in e&&"label"in e,A8=e=>{if(!e)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]}}},T8=e=>e?{label:`${e.name}.${e.option.label}`,value:`${e.id}.${e.option.value}`}:null,L8=/\{\{([^}]*)\}\}/g,O8=/^[a-zA-Z0-9._]+$/,F8="Invalid variable format. Please check inserted variables.",k8=e=>{if(!e)return;const t=e.matchAll(L8);for(const[,n]of[...t])if(!O8.test(n))return F8},D8=({argsMap:e,optionalArgsMap:t,data:n})=>{const{args:r,enabled:o}=I.useMemo(()=>{const s={};for(const a in e){const i=e[a],c=n[i];if(!c)return{args:{},enabled:!1};s[a]=X1(c)?c.value:c}for(const a in t){const i=t[a],c=n[i];s[a]=X1(c)?c.value:c,s[a]||(s[a]=null)}return{args:s,enabled:!0}},[e,t,n]);return{args:r,enabled:o}},N8=({args:e,enabled:t,searchTerm:n,pagination:r,queryKey:o,debounceTime:s=500,fetchOptions:a})=>{const[i,c]=I.useState({args:e,enabled:t,searchTerm:n,pagination:r});I.useEffect(()=>{const x=setTimeout(()=>{c({args:e,enabled:t,searchTerm:n,pagination:r})},s);return()=>clearTimeout(x)},[e,t,n,r,s]);const l=I.useMemo(()=>{var x,C;return{searchTerm:i.searchTerm,limit:((x=i.pagination)==null?void 0:x.limit)??10,enabled:((C=i.pagination)==null?void 0:C.enabled)??!1}},[i]),{data:f,isLoading:g,isError:y,isFetching:E,isFetchingNextPage:m,hasNextPage:h,fetchNextPage:p}=_h({queryKey:["fetch-options",o,i.args,l],queryFn:({pageParam:x})=>a({args:i.args,pagination:{...l,pageNumber:x}}),getNextPageParam:(x,C)=>x.hasMore?C.length+1:void 0,initialPageParam:1,enabled:i.enabled,refetchOnMount:!0});return{options:I.useMemo(()=>(f==null?void 0:f.pages.flatMap(x=>x.options))??[],[f]),isLoading:g,isError:y,isFetching:E,isFetchingNextPage:m,hasNextPage:h,fetchNextPage:p}},rl=e=>e instanceof Element,R8=({onIntersect:e,threshold:t,rootMargin:n,enabled:r=!0})=>{const[o,s]=I.useState(!1),a=I.useRef(null),i=I.useRef(null),c=I.useRef(e);c.current=e;const l=I.useCallback(g=>{rl(g)&&(i.current||(i.current=new IntersectionObserver(y=>{var m;const E=y[y.length-1];E.isIntersecting&&((m=c.current)==null||m.call(c,E))},{root:g,threshold:t,rootMargin:n}),s(!0)))},[t,n]),f=I.useCallback(g=>{var y,E;rl(a.current)&&((y=i.current)==null||y.unobserve(a.current)),rl(g)&&r&&o&&((E=i.current)==null||E.observe(g))},[r,o]);return I.useEffect(()=>()=>{i.current&&(i.current.disconnect(),i.current=null)},[]),{parentRef:l,childRef:f}},M8={borderRadius:"8px",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",mt:.5,backgroundColor:"#FFFFFF"},P8={maxHeight:280,overflow:"auto",paddingTop:0,paddingBottom:1},j8={lineHeight:1,padding:"12px 12px 8px",backgroundColor:"#FFFFFF"},B8={display:"flex",alignItems:"center",gap:"4px",padding:"8px",border:"1px solid #ECEFF6",borderRadius:"6px",width:"100%",boxSizing:"border-box"},V8={flex:1,minWidth:0,fontSize:13,lineHeight:"18px","& .MuiInputBase-input":{padding:0,"&::placeholder":{color:"#97A3B7",opacity:1}}},G8={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"}},H8=e=>({fontSize:14,lineHeight:"18px",minHeight:36,py:.75,pl:1,pr:1.5,mx:1,borderRadius:"4px",color:"#343C45",backgroundColor:e?"#F6F8FC":"transparent","&:hover":{backgroundColor:"#F6F8FC"},"&.Mui-selected":{backgroundColor:"#F6F8FC","&:hover":{backgroundColor:"#F6F8FC"}}}),W8=u.styled(u.Box)`
|
|
1039
1039
|
height: 28px;
|
|
1040
1040
|
width: 28px;
|
|
1041
1041
|
border-radius: 50%;
|
|
@@ -1067,7 +1067,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1067
1067
|
&:after {
|
|
1068
1068
|
transform: translate(-50%, -50%) rotate(-45deg);
|
|
1069
1069
|
}
|
|
1070
|
-
`,z1=String(Symbol("_no_results")),Y1=e=>!!e&&typeof e=="object"&&"label"in e&&"value"in e,
|
|
1070
|
+
`,z1=String(Symbol("_no_results")),Y1=e=>!!e&&typeof e=="object"&&"label"in e&&"value"in e,Z8=({fieldKey:e,value:t,placeholder:n="Select",searchPlaceholder:r="Search",disabled:o=!1,menuZIndex:s=1600,interfaceDetails:a,formData:i,hasApiSearch:c=!1,onChange:l,fetchOptions:f})=>{var J;const[g,y]=I.useState(""),{selectedOption:E,selectedValue:m}=I.useMemo(()=>Y1(t)?{selectedOption:t,selectedValue:t.value}:{selectedOption:null,selectedValue:t},[t]),{args:h,enabled:p}=D8({argsMap:a.args,optionalArgsMap:a.optionalArgs,data:i}),{options:b,fetchNextPage:x,isLoading:C,isFetchingNextPage:w,hasNextPage:v}=N8({args:h,enabled:p,queryKey:e,searchTerm:c?g:"",pagination:a.pagination,fetchOptions:f}),_=!!((J=a.pagination)!=null&&J.enabled),A=_&&!!v,{parentRef:S,childRef:L}=R8({onIntersect:()=>x(),threshold:.1,enabled:A}),N=I.useMemo(()=>{let H=b;E&&(H=[E],H.push(...b.filter(q=>q.value!==E.value)));const G=g.trim().toLowerCase();return!G||c?H:H.filter(q=>String(q.label).toLowerCase().includes(G))},[b,g,E,c]),D=I.useMemo(()=>{const H={};for(const G of b)H[G.value]=G.label;return H},[b]),k=I.useMemo(()=>Y1(t)?t.label:D[String(t)]??String(t),[D,t]),M=H=>{const G=String(H.target.value);if(G===z1)return;const q=D[G];l({value:G,label:q})},B=C&&b.length===0,Y=_&&v&&!B&&!g;return d.jsx(u.FormControl,{fullWidth:!0,disabled:o,sx:{m:0,minWidth:0},children:d.jsxs(u.Select,{displayEmpty:!0,value:m,variant:"outlined",size:"small",sx:G8,onChange:M,onClose:()=>y(""),renderValue:()=>t===""?d.jsx(u.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:u.theme.palette.gray.gray4},children:n}):d.jsx(u.Typography,{component:"span",fontSize:14,noWrap:!0,sx:{color:u.theme.palette.gray.gray1},children:k}),endAdornment:m?d.jsx(W8,{onClick:()=>l()}):null,MenuProps:{autoFocus:!1,sx:{zIndex:s},PaperProps:{sx:M8},MenuListProps:{sx:P8,ref:S}},children:[d.jsx(u.ListSubheader,{sx:j8,children:d.jsxs(u.Box,{sx:B8,children:[d.jsx(u.icons.Search,{sx:{fontSize:18,color:u.theme.palette.gray.gray3,flexShrink:0}}),d.jsx(u.InputBase,{autoFocus:!0,placeholder:r,value:g,onChange:H=>y(H.target.value),onKeyDown:H=>{H.key!=="Escape"&&H.stopPropagation()},sx:V8})]})}),B?d.jsx(u.MenuItem,{disabled:!0,sx:{justifyContent:"center",opacity:1,minHeight:120,cursor:"default"},children:d.jsx(u.CircularProgress,{size:24})}):N.length===0?d.jsx(u.MenuItem,{disabled:!0,value:z1,sx:{opacity:1,color:u.theme.palette.gray.gray3},children:d.jsx(u.Typography,{variant:"body2",fontSize:14,children:"No results found"})}):N.map(H=>{const G=String(H.value);return d.jsxs(u.MenuItem,{value:G,sx:H8(G===String(t)),children:[d.jsx("span",{children:H.label}),G===m?d.jsx(S8,{fill:"#97A3B7",style:{marginLeft:"auto"}}):null]},G)}),Y?d.jsx(u.MenuItem,{disabled:!0,disableRipple:!0,tabIndex:-1,ref:L,sx:{justifyContent:"center",minHeight:40,opacity:1,cursor:"default"},children:w?d.jsx(u.CircularProgress,{size:20}):d.jsx(u.Box,{sx:{minHeight:1,width:"100%"},"aria-hidden":!0})}):null]})})},X8=u.styled(u.TextField)`
|
|
1071
1071
|
width: 100%;
|
|
1072
1072
|
& input {
|
|
1073
1073
|
padding: 13px !important;
|
|
@@ -1101,7 +1101,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1101
1101
|
height: 56px !important;
|
|
1102
1102
|
box-sizing: content-box !important;
|
|
1103
1103
|
}
|
|
1104
|
-
`,
|
|
1104
|
+
`,z8=u.styled(u.Typography)`
|
|
1105
1105
|
position: absolute;
|
|
1106
1106
|
top: 100%;
|
|
1107
1107
|
left: 0;
|
|
@@ -1110,7 +1110,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1110
1110
|
overflow: hidden;
|
|
1111
1111
|
text-overflow: ellipsis;
|
|
1112
1112
|
padding-top: 2px;
|
|
1113
|
-
`,
|
|
1113
|
+
`,Y8=e=>{const t=n=>{var o;const r=n.target;r&&((o=e.onChange)==null||o.call(e,r.value))};return d.jsx(X8,{...e,variant:"outlined",onChange:t,...e.multiline?{rows:4}:null})},J8=u.styled(u.Stack)`
|
|
1114
1114
|
flex-direction: column;
|
|
1115
1115
|
align-items: flex-start;
|
|
1116
1116
|
box-shadow: 0px 3px 15px 0px #00000040;
|
|
@@ -1120,7 +1120,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1120
1120
|
overflow-y: auto;
|
|
1121
1121
|
overflow-x: hidden;
|
|
1122
1122
|
padding: 8px 0 16px;
|
|
1123
|
-
`,
|
|
1123
|
+
`,q8=u.styled(u.Box)`
|
|
1124
1124
|
padding: 8px 20px;
|
|
1125
1125
|
width: 100%;
|
|
1126
1126
|
flex-shrink: 0;
|
|
@@ -1134,7 +1134,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1134
1134
|
&:hover {
|
|
1135
1135
|
background-color: ${({theme:e})=>{var t,n;return((n=(t=e.palette)==null?void 0:t.gray)==null?void 0:n.gray6)||"#f5f5f5"}};
|
|
1136
1136
|
}
|
|
1137
|
-
`,
|
|
1137
|
+
`,Q8=u.styled(u.Typography)`
|
|
1138
1138
|
color: #343c45;
|
|
1139
1139
|
font-size: 14px;
|
|
1140
1140
|
font-weight: 400;
|
|
@@ -1143,7 +1143,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1143
1143
|
overflow: hidden;
|
|
1144
1144
|
text-overflow: ellipsis;
|
|
1145
1145
|
white-space: nowrap;
|
|
1146
|
-
|
|
1146
|
+
`,$8=u.styled(u.Box)`
|
|
1147
1147
|
box-sizing: border-box;
|
|
1148
1148
|
background-color: white;
|
|
1149
1149
|
border: 1px solid #d6dde8;
|
|
@@ -1160,11 +1160,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1160
1160
|
background-color: #f6f8fc;
|
|
1161
1161
|
border-color: #d6dde8;
|
|
1162
1162
|
}
|
|
1163
|
-
|
|
1163
|
+
`,U8=u.styled(u.Stack)`
|
|
1164
1164
|
padding-right: 10px;
|
|
1165
1165
|
justify-content: center;
|
|
1166
1166
|
align-items: center;
|
|
1167
|
-
`,
|
|
1167
|
+
`,K8=u.styled(u.TextField)`
|
|
1168
1168
|
margin: 8px 20px;
|
|
1169
1169
|
& input {
|
|
1170
1170
|
padding: 8px !important;
|
|
@@ -1188,12 +1188,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1188
1188
|
border-radius: 8px;
|
|
1189
1189
|
border: 1px solid #eceff6;
|
|
1190
1190
|
}
|
|
1191
|
-
`,
|
|
1191
|
+
`,eE=u.styled(u.Box)`
|
|
1192
1192
|
padding: 8px 0 8px 8px;
|
|
1193
1193
|
display: flex;
|
|
1194
1194
|
align-items: center;
|
|
1195
1195
|
justify-content: center;
|
|
1196
|
-
`,
|
|
1196
|
+
`,tE=({variables:e,onOptionClick:t})=>{const[n,r]=I.useState(""),o=I.useMemo(()=>e.filter(a=>a.title.toLowerCase().includes(n.toLowerCase())),[e,n]),s=a=>{var i;r(((i=a==null?void 0:a.target)==null?void 0:i.value)||"")};return d.jsxs(J8,{children:[d.jsx(K8,{value:n,onChange:s,InputProps:{startAdornment:d.jsx(eE,{children:d.jsx(u.icons.Search,{sx:{fontSize:18,color:u.theme.palette.gray.gray3,flexShrink:0}})})},placeholder:"Search variables",variant:"outlined"}),o.map(({value:a,title:i},c)=>d.jsx(u.Tooltip,{title:i,placement:"top",arrow:!0,children:d.jsx(q8,{onClick:()=>t({title:i,value:a}),children:d.jsx(Q8,{variant:"body2",children:i})})},`${i}-${a}-${c}`))]})},nE=({setOpen:e})=>{const t=()=>{e(n=>!n)};return d.jsx($8,{onClick:t,tabIndex:0,children:d.jsx(u.icons.Add,{sx:{fontSize:"12px",color:"#4d596c"}})})},rE=({variables:e,onOptionClick:t})=>{const[n,r]=I.useState(!1),o=s=>{r(!1),t(s)};return d.jsx(u.ClickAwayListener,{onClickAway:()=>{r(!1)},children:d.jsx(u.Box,{children:d.jsx(u.Tooltip,{title:d.jsx(tE,{variables:e,onOptionClick:o}),placement:"bottom-end",arrow:!1,open:n,PopperProps:{sx:{"& .MuiTooltip-popper":{zIndex:2e3},"& .MuiTooltip-tooltip":{backgroundColor:"transparent",color:"inherit",padding:0,boxShadow:"none",fontSize:"inherit"}}},children:d.jsx(u.Box,{children:d.jsx(nE,{setOpen:r})})})})})},oE=()=>{const e=I.useRef(0),t=I.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 l;const a=t.current;if(!a)return;const i=e.current+s;(l=a.focus)==null||l.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)}}},sE=({value:e,variables:t,hasError:n,limit:r,multiline:o=!1,onChange:s,setError:a})=>{const{onBlur:i,inputRef:c,focusInput:l,insertVariable:f}=oE(),g=N1(m=>a(k8(m)),1e3),y=m=>{s(m),g(m)},E=({value:m})=>{const h=f(e,m);y(h),l(m==null?void 0:m.length)};return d.jsx(Y8,{inputRef:c,value:e,onChange:y,onBlur:i,placeholder:"Value",hasError:n,limit:r,multiline:o,InputProps:{endAdornment:t.length>0?d.jsx(U8,{style:{justifyContent:o?"flex-end":"center",padding:"10px"},children:d.jsx(rE,{variables:t,onOptionClick:E})}):null}})},aE={borderRadius:"8px",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",mt:.5,backgroundColor:"#FFFFFF",minWidth:337},iE={maxHeight:280,overflow:"auto",paddingTop:0,paddingBottom:1},cE={m:0,minWidth:0,width:"100%"},J1={fontSize:"14px",width:"100%",minWidth:200,height:"40px",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"}},lE={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"},uE=e=>({...lE,backgroundColor:e?"#F6F8FC":"transparent",cursor:"pointer","&:hover":{backgroundColor:"#F6F8FC"}}),dE={fontSize:12,color:"#6F7C90",flexShrink:0},fE={display:"flex",flexDirection:"column",alignItems:"stretch",py:0},pE=e=>({fontSize:14,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"}}),hE={color:"#97A3B7",fontSize:13,px:2,py:1.5},gE=u.styled(u.Stack)`
|
|
1197
1197
|
flex-flow: row nowrap;
|
|
1198
1198
|
align-items: center;
|
|
1199
1199
|
color: #343c45;
|
|
@@ -1204,47 +1204,47 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1204
1204
|
line-height: 36px;
|
|
1205
1205
|
min-height: 36px;
|
|
1206
1206
|
text-align: center;
|
|
1207
|
-
`,
|
|
1207
|
+
`,mE=u.Popper,bE=({name:e,value:t,placeholder:n,fields:r,className:o,zIndex:s=3e3,onChange:a})=>{const[i,c]=I.useState(!1),[l,f]=I.useState(null),[g,y]=I.useState(null),E=I.useRef(null),m=C=>{E.current&&clearTimeout(E.current),C&&(f(C.field),y(C.currentTarget))},h=()=>{E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{f(null),y(null)},100)},p=C=>{a(C),h(),c(!1)},b=Array.isArray(l==null?void 0:l.options)&&l.options.length>0,x=()=>t?d.jsxs(gE,{children:[d.jsx(ol,{children:t.name}),d.jsx(u.icons.ChevronRightOutlined,{sx:{fontSize:"18px"}}),d.jsx(ol,{children:t.option.label})]}):d.jsx(ol,{children:n});return d.jsxs(u.FormControl,{fullWidth:!0,sx:cE,className:o,children:[d.jsx(u.Select,{id:e,displayEmpty:!0,value:t?t.name+"-"+t.option.value:"",variant:"outlined",size:"small",sx:J1,open:i,onOpen:()=>c(!0),onClose:()=>c(!1),renderValue:x,MenuProps:{autoFocus:!1,sx:{zIndex:s},PaperProps:{sx:aE},MenuListProps:{sx:iE}},children:r.map(C=>{const w=C.options.length>0;return d.jsxs(u.ListSubheader,{onPointerEnter:v=>{v.pointerType==="touch"||!w||m({field:C,currentTarget:v.currentTarget})},onPointerLeave:v=>{v.pointerType==="touch"||!w||h()},sx:uE(w&&(l==null?void 0:l.id)===C.id),"data-field-id":C.id,children:[d.jsx("span",{style:{minWidth:0,flex:1,textAlign:"left"},children:C.name}),w?d.jsx(u.icons.PlayArrow,{sx:dE}):null]},C.id)})}),d.jsx(mE,{id:`${e}-popper`,open:b,anchorEl:g,placement:"left-end",sx:{zIndex:s+10},children:d.jsx(u.Paper,{elevation:3,sx:{width:200,maxHeight:"200px",overflow:"auto",borderRadius:"4px"},onPointerEnter:()=>m(),onPointerLeave:()=>h(),children:l&&l.options.length>0?d.jsx(u.Box,{role:"list",sx:fE,children:l.options.map(C=>{var v;const w=(t==null?void 0:t.name)===l.name&&((v=t==null?void 0:t.option)==null?void 0:v.value)===C.value;return d.jsx(u.Button,{size:"small",fullWidth:!0,variant:"text",sx:pE(w),onClick:()=>p({name:l.name,id:l.id,option:C}),children:C.label},C.value)})}):l&&l.options.length===0?d.jsx(u.Box,{sx:hE,children:"No options"}):null})})]})},yE=1600,Da={DEFAULT:"default",CUSTOM:"custom"},xE=["text","multiline"],CE=({field:e,formId:t,value:n,formValues:r,variables:o,customFields:s,errors:a,setError:i,fetchOptions:c,setFormValues:l,onFieldChange:f})=>{var w;const[g,y]=I.useState(Da.DEFAULT),E=I.useMemo(()=>w6(500),[]),m=v=>{l(_=>({..._,[e.name]:v})),E(()=>{f==null||f({name:e.name,value:v,type:e.type})})},h=v=>{m(null),y(v)},p=a[e.name],b=p?d.jsx(u.Tooltip,{title:p,placement:"bottom",children:d.jsx(z8,{variant:"body2",fontSize:"13px",color:u.theme.palette.error.main,children:p})}):null,x=Z1(e)?d.jsx(Z8,{fieldKey:`${t}-${e.name}`,interfaceDetails:e.interfaceDetails??e.searchInterfaceDetails,value:n,fetchOptions:v=>c(v,{formId:t,fieldName:e.name}),disabled:e.disabled,placeholder:e.placeholder??"Select",menuZIndex:yE,formData:r,onChange:m}):d.jsx(sE,{type:e.type,variables:o,value:r[e.name]??"",onChange:m,hasError:!!p,limit:(w=e.validations)==null?void 0:w.maxCharacters,multiline:e.type==="multiline",setError:v=>i({name:e.name,value:v})}),C=d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"4px",position:"relative",children:[x,b]});return!Array.isArray(s)||s.length===0?C:d.jsxs(u.Stack,{direction:"column",alignItems:"center",gap:"12px",flex:1,minWidth:125,children:[d.jsxs(u.Select,{value:g,onChange:v=>h(v.target.value),sx:J1,children:[d.jsx(u.MenuItem,{value:Da.DEFAULT,children:"Default"}),d.jsx(u.MenuItem,{value:Da.CUSTOM,children:"Custom Object"})]}),g===Da.CUSTOM?d.jsx(bE,{fields:s,name:e.name,value:A8(n),placeholder:"Select object",onChange:v=>m(T8(v))}):C]})},EE=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)"})))),sl={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"}}},vE=()=>d.jsx(u.Box,{"aria-hidden":!0,component:"span",sx:sl.outer,children:d.jsx(u.Box,{component:"span",sx:sl.frame,children:d.jsx(u.Box,{component:"span",sx:sl.rotate,children:d.jsx(EE,{})})})}),wE=u.styled("img")`
|
|
1208
1208
|
width: 16px;
|
|
1209
1209
|
height: auto;
|
|
1210
1210
|
object-fit: cover;
|
|
1211
1211
|
margin-right: 8px;
|
|
1212
|
-
`,
|
|
1212
|
+
`,IE=e=>{const[t,n]=I.useState(!1),r=()=>{n(!0)};return t?null:d.jsx(wE,{...e,onError:r})},_E=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:17,height:15,viewBox:"0 0 17 15",fill:"none",...e},T.createElement("path",{d:"M9.17193 1.59562C8.83327 1.17229 8.9019 0.554585 9.32522 0.215925C9.74855 -0.122735 10.3663 -0.0541004 10.7049 0.369224L9.93842 0.982422L9.17193 1.59562ZM15.0918 7.42414L15.8583 6.81094C16.1451 7.16944 16.1451 7.67884 15.8583 8.03734L15.0918 7.42414ZM10.7049 14.4791C10.3663 14.9024 9.74855 14.971 9.32522 14.6324C8.9019 14.2937 8.83327 13.676 9.17193 13.2527L9.93842 13.8659L10.7049 14.4791ZM14.7237 6.3812C15.2658 6.3812 15.7053 6.82068 15.7053 7.3628C15.7053 7.90492 15.2658 8.34439 14.7237 8.34439V7.3628V6.3812ZM0.981368 8.34439C0.439248 8.34439 -0.000226974 7.90492 -0.000226974 7.3628C-0.000226974 6.82068 0.439248 6.3812 0.981368 6.3812V7.3628V8.34439ZM9.93842 0.982422L10.7049 0.369224L15.8583 6.81094L15.0918 7.42414L14.3253 8.03734L9.17193 1.59562L9.93842 0.982422ZM15.0918 7.42414L15.8583 8.03734L10.7049 14.4791L9.93842 13.8659L9.17193 13.2527L14.3253 6.81094L15.0918 7.42414ZM14.7237 7.3628V8.34439H0.981368V7.3628V6.3812H14.7237V7.3628Z",fill:"#D6DDE8"})),SE=u.styled(u.Stack)`
|
|
1213
1213
|
height: 100%;
|
|
1214
1214
|
position: relative;
|
|
1215
1215
|
|
|
1216
1216
|
align-items: stretch;
|
|
1217
1217
|
justify-content: flex-start;
|
|
1218
1218
|
padding: 32px 0 0;
|
|
1219
|
-
`,
|
|
1219
|
+
`,AE=u.styled(u.Stack)`
|
|
1220
1220
|
flex-direction: row;
|
|
1221
1221
|
align-items: center;
|
|
1222
1222
|
justify-content: space-between;
|
|
1223
1223
|
padding: 0 32px 24px;
|
|
1224
1224
|
border-bottom: 1px solid ${({theme:e})=>e.palette.gray.gray5};
|
|
1225
|
-
`,
|
|
1225
|
+
`,TE=u.styled(u.Stack)`
|
|
1226
1226
|
flex-grow: 1;
|
|
1227
1227
|
flex-basis: 0;
|
|
1228
1228
|
min-height: 0;
|
|
1229
1229
|
overflow: auto;
|
|
1230
1230
|
padding-top: 30px;
|
|
1231
|
-
`,
|
|
1231
|
+
`,LE=u.styled(u.Stack)`
|
|
1232
1232
|
border: 1px solid #eceff6;
|
|
1233
1233
|
border-radius: 8px;
|
|
1234
1234
|
margin: 16px 32px;
|
|
1235
|
-
`,
|
|
1235
|
+
`,OE=u.styled(u.Stack)`
|
|
1236
1236
|
flex-direction: row;
|
|
1237
1237
|
justify-content: flex-start;
|
|
1238
1238
|
margin: auto 0 0;
|
|
1239
1239
|
padding: 16px 32px;
|
|
1240
1240
|
gap: 10px;
|
|
1241
1241
|
border-top: 1px solid ${({theme:e})=>e.palette.gray.gray5};
|
|
1242
|
-
`,
|
|
1242
|
+
`,FE=u.styled(u.Box)`
|
|
1243
1243
|
width: 320px;
|
|
1244
1244
|
flex-shrink: 0;
|
|
1245
1245
|
padding-left: 20px;
|
|
1246
1246
|
box-sizing: content-box !important;
|
|
1247
|
-
`,
|
|
1247
|
+
`,kE=u.styled(u.Stack)`
|
|
1248
1248
|
flex-direction: row;
|
|
1249
1249
|
align-items: center;
|
|
1250
1250
|
gap: 8px;
|
|
@@ -1254,10 +1254,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1254
1254
|
width: 170px;
|
|
1255
1255
|
word-break: break-all;
|
|
1256
1256
|
text-wrap: wrap;
|
|
1257
|
-
`,kE={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 DE(e){return e.rowId??e.name}const NE=({open:e,onClose:t,formId:n,fields:r,variables:o,connectorLogo:s,isSaving:a,title:i="Map fields",isLoading:c=!1,defaultValues:l,customFields:f,fetchOptions:g,onSave:y,onCancel:E,onFieldChange:m})=>{const[h,p]=I.useState({}),[b,C]=I.useState({}),x=I.useMemo(()=>{if(!Array.isArray(r)||!r.length)return[];const L=new Set;return r.filter(D=>L.has(D.name)?!1:(L.add(D.name),!0)).sort((D,k)=>D.priority-k.priority)},[r]),w=({name:L,value:N})=>{C(D=>{const k={...D};return N?k[L]=N:delete k[L],k})};I.useEffect(()=>{l&&e&&p({...l})},[l,e]),I.useEffect(()=>()=>{e||(p({}),C({}))},[e]);const v=()=>{t(),p({})},_=()=>{E==null||E(),p({}),t()},A=()=>{const L={...h};for(const N in L)L[N]||delete L[N];y(L)},S=Object.keys(b).length>0;return d.jsx(u.Dialog,{open:e,onClose:v,PaperProps:{sx:kE},maxWidth:!1,children:c?d.jsx(u.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"615px"},children:d.jsx(u.CircularProgress,{})}):d.jsxs(_E,{children:[d.jsxs(SE,{children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:2,children:[d.jsx(EE,{}),d.jsx(u.Stack,{gap:.5,flex:1,minWidth:0,children:d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:.5,children:[d.jsx(u.Typography,{variant:"h6",fontSize:18,fontWeight:600,color:u.theme.palette.gray.gray1,children:i}),d.jsx(u.Tooltip,{title:"Assign default values to create fields",placement:"top",children:d.jsx(u.IconButton,{size:"small","aria-label":"About mapping fields",sx:{padding:"4px"},children:d.jsx(u.icons.InfoOutlined,{sx:{fontSize:18,color:u.theme.palette.gray.gray3}})})})]})})]}),d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{onClick:v,size:"small","aria-label":"Close",children:d.jsx(u.icons.Close,{sx:{fontSize:20}})})})]}),d.jsx(AE,{children:d.jsxs(TE,{children:[d.jsxs(u.Stack,{direction:"row",padding:"16px 24px",sx:{backgroundColor:u.theme.palette.gray.gray6a,borderBottom:"1px solid #ECEFF6",borderRadius:"8px 8px 0 0"},children:[d.jsx(wE,{src:s,alt:"Connector"}),d.jsx(u.Typography,{variant:"caption",fontSize:14,fontWeight:600,color:u.theme.palette.gray.gray3,flex:1,children:"Field"}),d.jsx(u.Typography,{variant:"caption",fontSize:14,fontWeight:600,color:u.theme.palette.gray.gray3,width:320,children:"Map to"})]}),x.map((L,N)=>{const D=DE(L),k=h[D]??"";return!Z1(L)&&!yE.includes(L.type)?null:d.jsxs(u.Stack,{direction:"row",alignItems:"center",padding:"24px",gap:2,sx:{borderBottom:N<x.length-1?"1px solid #F6F8FC":void 0,"&:last-child":{borderBottom:"none"}},children:[d.jsx(FE,{children:d.jsx(u.Typography,{variant:"body2",fontSize:14,color:u.theme.palette.gray.gray2,children:L.label})}),d.jsx(IE,{width:20,height:20}),d.jsx(OE,{children:d.jsx(CE,{field:L,formId:String(n),value:k,formValues:h,variables:o,customFields:f,errors:b,setError:w,fetchOptions:g,setFormValues:p,onFieldChange:m})})]},D)})]})}),d.jsxs(LE,{children:[d.jsx(u.Button,{variant:"contained",onClick:A,sx:{textTransform:"none",padding:"3px 32px !important"},disabled:a||S,children:"Save"}),d.jsx(u.Button,{variant:"outlined",color:"inherit",onClick:_,disabled:a,sx:{textTransform:"none",padding:"3px 12px !important",borderColor:u.theme.palette.gray.gray5},children:"Cancel"})]})]})})},al=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},RE=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],ns=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},il=({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=L6(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let l=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";l=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:l,t[n.name].validate=O6(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=F6();return}if(n.type==="text"&&n.limit){t[n.name].validate=Ac();return}if(n.type==="table"){const l=il({formFields:n.columns??[]});t[n.name].validations=l}if((i=n.validations)!=null&&i.isUrl){const l=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=A6(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=T6(l)}}),t},Na={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[ka.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},rs=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return Na.isMultiSelect(o)?s=o.map(a=>a.value):Na.isTable(o)?s=o.map(({...i})=>(delete i[ka.ROW_ID],i)).filter(i=>Object.keys(i).length>0):Na.isSelect(o)?s=o.value:Na.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),ME=(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},Gn="/v1/api",PE=`${Gn}/connectors/conversation/:conversationId/metadata`,jE=`${Gn}/connectors/forms/:formId/field/:fieldName/data`,BE=`${Gn}/connectors/form/:formId`,VE=`${Gn}/connectors/forms/:id/link`,GE=`${Gn}/connectors/forms/:id/preview`,HE=`${Gn}/connectors/conversation/:conversationId/selected-email`,WE=`${Gn}/connectors/app-cf-values`,ZE=`${Gn}/connectors/deferred-app-cf-values`,Q1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${jE}?${r.toString()}`,e),method:Oe.POST,data:t})},XE=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${BE}?${r.toString()}`,e),method:Oe.POST,data:t})},zE=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:`${GE.replace(":id",e)}?${r.toString()}`,method:Oe.POST,data:{args:t}})},YE="https://avatars.githubusercontent.com/u/62397590",$1={optionsMap:null,createOptionApi:K.IDLE,dropdownOptionsApis:K.IDLE,previewCardData:null,previewCardApiStatus:K.IDLE,selectedSuggestionType:"basic"},U1=Ic({name:"commonSlice",initialState:$1,reducers:{resetState:()=>$1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=K.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.createOptionApi=K.LOADING}).addCase(Ra.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=K.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(Ra.rejected,t=>{t.createOptionApi=K.FAILED}).addCase(Ir.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(Ir.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(Ir.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(co.pending,t=>{t.previewCardApiStatus=K.LOADING}).addCase(co.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=K.IDLE}).addCase(co.rejected,t=>{t.previewCardApiStatus=K.FAILED})}}),Ra=$t("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var h,p,b;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,g=al(c||{},s,r),{common:y}=t(),{options:E=[],...m}=((h=y.optionsMap)==null?void 0:h[g])||{};try{const C=await XE({fieldName:r,formId:a},{args:l,conversation_id:i});if(!C||!("data"in C)||!("output_variables"in C.data)||!("external_resource_id"in C.data.output_variables))throw C;const x=C.data.output_variables,{external_resource_id:w,...v}=x,A=[{label:o,value:w,prefillValues:v},...E],S=ef(A,L=>L.value);return f==null||f(S),{optionsList:S,key:g,...m}}catch(C){f==null||f(E);const x=C,w=(p=x==null?void 0:x.response)==null?void 0:p.data,v=typeof w=="string"?w:(w==null?void 0:w.message)||vn;return Se({message:v,type:qe}),n((b=x==null?void 0:x.response)==null?void 0:b.status)}}),Ir=$t("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:g}=e,y=al(c||{},o,r),{common:E}=t();let m=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(m=a.meta.showAvatar);const h=((A=E.optionsMap)==null?void 0:A[y])||{},p=!e.isScrollToBottomEvent&&(!h||s!==h.searchTerm),b=p?[]:h.options||[],C=p?!0:h.hasMore??!0,x=p?0:h.currentPage??0,{enabled:w,limit:v}=f,_=v||10;try{let N;const D=g==null?void 0:g.signal,k=w?{pageNumber:x+1,searchTerm:s,limit:_,enabled:w}:null;if(C&&(N=await Q1({fieldName:r,formId:o},{pagination:k||{},args:c,interfaceId:l})),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:G}=t(),q=(S=G.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(G=>m?{...G,avatarUrl:G.avatarUrl||YE}:(delete G.avatarUrl,G)),Y=[...b,...B],J=w?B.length>=_:!1,H=ef(Y,G=>G.value);return i==null||i(H),{optionsList:H,fieldName:r,formId:o,searchTerm:s,currentPage:x+1,hasMore:J,key:y}}catch(N){const{common:D}=t(),k=((L=D.optionsMap)==null?void 0:L[y])||{};return i==null||i(k.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=al(a||{},r,n),{common:c}=t(),l=(g=c.optionsMap)==null?void 0:g[i];if((l==null?void 0:l.searchTerm)!==o)return!0;const f=(l==null?void 0:l.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),co=$t("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await zE(e,t,n),i=a==null?void 0:a.data;return i?(r&&Se({message:X0,type:Ut}),{data:Zd(i)}):(r&&Se({message:Z0,type:qe}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:wL,resetPreviewCardData:JE,setSelectedSuggestionType:qE}=U1.actions,QE=U1.reducer,Hn="/v1/api",$E=`${Hn}/connectors/forms/list`,UE=`${Hn}/connectors/cards/:id/unlink`,KE=`${Hn}/connectors/forms/:id/link`,ev=`${Hn}/connectors/form/:formId`,tv=`${Hn}/connectors/forms/:formId/data`,nv=`${Hn}/connectors/forms/:formId/get_forms_custom_fields`,K1=`${Hn}/connectors/forms/:formId/defaults`,rv=`${Hn}/connectors/forms/:formId/default-values`,ov=({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)),Ee({url:`${$E}?${o.toString()}`,method:Oe.GET})},ep=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${ev}?${r.toString()}`,e),method:Oe.POST,data:t})},sv=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),Ee({url:`${UE.replace(":id",e)}?${o.toString()}`,method:Oe.POST,data:{externalResourceId:n,conversationId:r}})},av=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),Ee({url:`${KE.replace(":id",e)}?${s.toString()}`,method:Oe.POST,data:{externalResourceId:t,conversationId:r}})},iv=(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),Ee({url:`${tv.replace(":formId",e)}?${s.toString()}`,method:Oe.GET})},cv="Error in previewing the card",tp="Link format isn't recognized. Please check that you've entered a valid URL",lv="Item already linked",uv="Card linked successfully",dv="Error in linking the card",fv="New card created",pv="Card creation failed",hv="Create and link objects from different apps to this conversation",gv="Are you sure you want to change the primary object?",mv="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",bv="Are you sure you want to leave?",yv=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
|
|
1258
|
-
Do you want to continue?`,Cv="Select an object to create",xv="Select an object to link",np="Select object",Ev="Paste URL or ID",vv="Object ID/Link",wv="Card updated",Iv="Card updation failed",rp=3,_v="Map fields",Sv="Variables linked to inbox may not be available as conversation is linked to multiple inboxes.",cl=(e,t)=>{var r,o,s,a,i,c,l,f,g,y,E,m,h;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((f=(l=e.validations)==null?void 0:l.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((y=(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:((E=e.validations)==null?void 0:E.maxRows)||5,limit:(m=e.validations)==null?void 0:m.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(h=e.validations)==null?void 0:h.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},op=Ic({name:"writeCapability",initialState:z0,reducers:{resetState:()=>z0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=K.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(Ma.pending,t=>{t.objectListApiStatus=K.LOADING}).addCase(Ma.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=K.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=f}).addCase(Ma.rejected,t=>{t.objectListApiStatus=K.FAILED}).addCase(Ir.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(Ir.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(Ir.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(Pa.pending,t=>{t.createFormApiStatus=K.LOADING}).addCase(Pa.fulfilled,t=>{t.createFormApiStatus=K.IDLE}).addCase(Pa.rejected,t=>{t.createFormApiStatus=K.FAILED}).addCase(Va.pending,t=>{t.linkCardApiStatus=K.LOADING}).addCase(Va.fulfilled,t=>{t.linkCardApiStatus=K.IDLE}).addCase(Va.rejected,t=>{t.linkCardApiStatus=K.FAILED}).addCase(Ba.pending,t=>{t.unlinkCardApiStatus=K.LOADING}).addCase(Ba.fulfilled,t=>{t.unlinkCardApiStatus=K.IDLE}).addCase(Ba.rejected,t=>{t.unlinkCardApiStatus=K.FAILED}).addCase(ja.pending,t=>{t.updateFormApiStatus=K.LOADING}).addCase(ja.fulfilled,t=>{t.updateFormApiStatus=K.IDLE}).addCase(ja.rejected,t=>{t.updateFormApiStatus=K.FAILED}).addCase(Ga.pending,t=>{t.currentResourceDetailsApiStatus=K.LOADING}).addCase(Ga.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=K.IDLE}).addCase(Ga.rejected,t=>{t.currentResourceDetailsApiStatus=K.FAILED})}}),Ma=$t("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o,connectorId:s}=e,a=await ov({inboxIds:t,channelType:n,conversationId:r,connectorId:s});if(!a||!a.data||!("formsList"in a.data)||!Array.isArray(a.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const i=a.data.formsList,c={},l=[],f=[],g=[],y=[],E=[],m={},h={};return i==null||i.forEach(p=>{var C,x;if(p.expandedView&&!o)return;const b={...p};"fieldList"in b&&delete b.fieldList,h[p.id]=b,c[p.id]||(c[p.id]={}),m[p.id]||(m[p.id]=[]),p.type==="create"&&p.authenticated?(l.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!f.includes(p.connectorName)&&f.push(p.connectorName)):p.type==="link"&&p.authenticated?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&&E.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(C=p.fieldList)==null||C.sort((w,v)=>w.priority-v.priority),(x=p.fieldList)==null||x.forEach(w=>{const v=cl(w);if(v.columns&&(v.columns=v.columns.map(_=>cl(_,{loadOptionsOnFocus:!0,defaultOptions:!1}))),m[p.id]=[...m[p.id],v],w.interfaceDetails&&(w.interfaceDetails.args||w.interfaceDetails.optionalArgs)){const _={...w.interfaceDetails.args,...w.interfaceDetails.optionalArgs};Object.values(_).forEach(A=>{c[p.id][A]?c[p.id][A]=[...c[p.id][A],w.name]:c[p.id][A]=[w.name]})}})}),{createObjectList:l,createObjectConnectorNamesList:f,linkObjectList:g,editObjectList:y,searchObjectList:E,formFields:m,objectDict:h,dependentFieldsMap:c}}),Pa=$t("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await ep({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),Se({message:fv,type:Ut})}catch(l){const f=l,g=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(g==null?void 0:g.message)??pv;return o==null||o(l),Se({message:y,type:qe}),t(l)}}),ja=$t("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await ep({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),Se({message:wv,type:Ut})}catch(f){return o==null||o(f),Se({message:Iv,type:qe}),t(f)}}),Ba=$t("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await sv(e,t,n,r)}),Va=$t("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await av(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Ga=$t("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await iv(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,y])=>{"label"in y&&(y.type&&y.type==="date"?f.values[g]=y.label?new Date(parseInt(y.label)).toISOString():"":y.type&&y.type==="multi-select"&&"value"in y&&"label"in y&&y.value&&y.label?f.values[g]=[{value:y.value,label:y.label}]:y.value?f.values[g]={value:y.value,label:y.label}:f.values[g]=y.label)}),{data:f,status:l}}catch(i){return Se({message:vn,type:qe}),t(i)}}),{resetState:IL,setCurrentCardInEdit:lo,resetCurrentResourceDetails:Av,setHasUnsavedChanges:sp}=op.actions,Tv=op.reducer,Lv=()=>{const[e,t]=I.useState(null),[n,r]=I.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=I.useCallback(s=>{t(s)},[]);return I.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const a=100;let i=null;const c=150,l=f=>{s||(s=window.setTimeout(()=>{const g=f.target,y=Number(e.dataset.prevScrollLeft)||0,E=Number(e.dataset.prevScrollTop)||0,m=g.scrollLeft,h=g.scrollTop,p=m-y,b=h-E,C=Math.abs(b)>Math.abs(p),x=Math.abs(p)>Math.abs(b);r({isVertical:C,isHorizontal:x,isScrolling:!0}),e.dataset.prevScrollLeft=String(m),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",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},Ov="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",Fv=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=Qt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),{userGroupId:i}=Pt()||{},[c,l]=Lv(),{isScrolling:f,isVertical:g}=c,y=f&&g,E=I.useMemo(()=>(e==null?void 0:e[0].data.map(b=>b.label))||[],[e]),m=I.useMemo(()=>e.map(b=>{const C={cells:{},externalResourceId:b.externalResourceId};return b.data.forEach((x,w)=>{if(E[w]){let v=x.value?x.value:zs;v&&x.type==="date"&&(v=new Date(parseInt(v)).toLocaleDateString(navigator.language)),C.cells[E[w]]={label:v,deepLink:x==null?void 0:x.deepLink}}}),C}),[e,E]),h=(b,C)=>d.jsx(j4,{align:"left",children:b.deepLink?d.jsx(u.Link,{target:"_blank",underline:"none",href:b.deepLink,children:b.label}):d.jsx(u.Typography,{variant:"body2",color:"gray.black",children:b.label})},`${C}_${b.label}`),p=b=>{!b||!n||(r(!1),s(Sd,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(lo({...n,externalResourceId:b})))};return d.jsxs(u.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[d.jsx(u.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),d.jsx(u.TableContainer,{ref:l,children:d.jsxs(u.Table,{stickyHeader:!0,children:[d.jsx(R4,{children:d.jsxs(u.TableRow,{children:[E.map(b=>d.jsx(M4,{sx:{whiteSpace:"nowrap"},children:d.jsx(u.Typography,{variant:"overline",color:"gray.gray3",children:b})},b)),d.jsx(V4,{})]})}),d.jsx(u.TableBody,{children:m.map((b,C)=>d.jsxs(P4,{children:[Object.values(b.cells).map((x,w)=>h(x,w)),d.jsx(B4,{children:!y&&b.externalResourceId&&d.jsx(u.Tooltip,{title:Pd,placement:"bottom",children:d.jsx(u.IconButton,{className:"row-edit",onClick:()=>p(b.externalResourceId),children:d.jsx("img",{src:Ov})})})})]},`id_${C}`))})]})})]})},kv=e=>e.cardList.connectorCards,Dv=e=>e.cardList.connectorsEnabled,Nv=e=>e.cardList.connectorApiStatus,Rv=e=>e.cardList.cardSpecificData,Mv=e=>e.cardList.specificConnectorApiStatus,Pv=e=>e.cardList.specificConnectorErrorCode,jv=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==K.IDLE||!n?!1:Object.values(n).every(r=>r===K.IDLE||r===K.FAILED)},Bv="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",ap=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,ip=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}},Vv=(e,t)=>`${Bd} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),Gv=(e,t,n)=>{var l,f,g,y,E;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((E=(y=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:y[0])!=null&&E.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&ap.test(c)?!0:!cp(e,t,n)&&!i.length},cp=(e,t,n)=>{var f,g;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(g=(f=o.data)==null?void 0:f.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===K.FAILED,c=o.cardErrorMessage,l=c&&ap.test(c);return i||a||c&&!l};function Hv(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const l=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[l],g=(f==null?void 0:f.connectorNames)??[];for(const y of g)r[y]||(r[y]=[],o[y]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[y].push(c),o[y].cards_visible+=1,o[y].card_key.push(c.id),o[y].card_title.push(c.title),Gv(c,t,n)&&(o[y].empty_cards+=1,s+=1),cp(c,t,n)&&(o[y].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,l])=>({app_name:c,...l})),total_empty_cards:s,total_cards_with_errors:a}}const lp=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:g,cardId:y,isCardLevelError:E,fieldName:m,showErrorIcon:h}=e,p=I.useRef(null),b=I.useRef(null),{email:C,currentSmIds:x,conversationId:w,sendTrackingEvent:v,connectorFunctions:_}=I.useContext(He),A=Ie(Pv),S=A==null?void 0:A[y],[L,N]=I.useState(!1),D=I.useMemo(()=>{if(n&&E){const{error_message:q}=ip(n);return q}return c?Bd.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):Fd},[n,c,l,E]),k=I.useCallback(()=>{const q=n||Vv(S,l),{error_code:oe,error_message:te}=ip(q);v==null||v(U3,{sm_ids:x,frontend_req_params:{email:C,conversationId:w,externalResourceId:g==null?void 0:g.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:oe,error_message:te})},[n,S,v,x,C,w,f,l,g==null?void 0:g.externalResourceId]);I.useEffect(()=>{(n&&E||c&&S)&&k()},[k,S,c,n,E]),I.useEffect(()=>{const q=r?b.current:p.current;if(q){const oe=q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth;N(oe)}},[t,r]);const M=o==qi.NOT_FOUND;let B=M?zs:t;a==="date"&&B&&!M&&(B=new Date(parseInt(B)).toLocaleDateString(navigator.language));const Y=!!n||c,J=()=>{i?_==null||_.redirectToAdmin():window.open(G5,"_blank")},H=()=>{v==null||v(K3,{sm_ids:x,card_title:f,field_name:m})},G=q=>{const oe=/<>(.*?)<>/g,te=q.split(oe);return d.jsx(I.Fragment,{children:te.map((V,W)=>W%2===1?d.jsx(F4,{variant:"body2",onClick:J,children:V},W):V)})};return s?d.jsx(jn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):Y?d.jsxs(Ud,{gap:"7px",children:[h?d.jsx(u.Stack,{marginTop:"3px",flexShrink:"0",children:d.jsx("img",{src:Bv,width:"18px",height:"18px"})}):null,d.jsx(Kd,{variant:"body_sm_regular",children:D?G(D):Fd})]}):d.jsx(u.Tooltip,{title:L?B:null,placement:"bottom",children:r?d.jsx(e0,{ref:b,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:H,children:B||zs}):d.jsx(D4,{ref:p,variant:"caption_regular",children:B||zs})})},up="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",_r=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>d.jsx(u.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:d.jsxs(u.Stack,{direction:"row",children:[r&&d.jsx(u.Box,{position:"absolute",right:10,top:10,children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{onClick:()=>t(!1),children:d.jsx("img",{src:up})})})}),n]})}),dp=e=>{var V,W,R;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===K.IDLE,l=(o==null?void 0:o[t])===K.LOADING,f=(o==null?void 0:o[t])===K.FAILED,{cardType:g,data:y,cardErrorMessage:E,redirectToAdminTab:m,connectorNames:h}=(r==null?void 0:r[t])||{},p=g==="flat",[b,C]=I.useState(!1),[x,w]=I.useState(!1),[v,_]=I.useState(!1),[A,S]=I.useState(!1),L=((V=y==null?void 0:y.listItems)==null?void 0:V.statusCode)!==401,N=I.useMemo(()=>{var X,$,ae,ie;return p&&((X=y==null?void 0:y.flatDisplay)!=null&&X.data)?y.flatDisplay.data:!p&&((ie=(ae=($=y==null?void 0:y.listItems)==null?void 0:$.fields)==null?void 0:ae[0])!=null&&ie.data)?y.listItems.fields[0].data:[]},[p,y]),D=I.useMemo(()=>N==null?void 0:N.slice(0,5),[N]),[k,M]=I.useState([]),B=I.useRef(null),[Y,J]=I.useState(0),H=b?-180:0,G=p?!1:!!((W=y==null?void 0:y.listItems)!=null&&W.errorMessage),q=G||f||E,oe=c&&!G&&s&&(v||x);I.useLayoutEffect(()=>{var X;(X=B.current)!=null&&X.scrollHeight&&J(B.current.scrollHeight+i)},[o==null?void 0:o[t],k,B]),I.useEffect(()=>{var ie,P;const X=((N==null?void 0:N.length)||0)>5,$=!p&&(((P=(ie=y==null?void 0:y.listItems)==null?void 0:ie.fields)==null?void 0:P.length)||0)>1;_(X&&!$),w($)},[y,p,N==null?void 0:N.length]),I.useEffect(()=>{M(b?N:D)},[y,b,D,N]);const te=()=>{v?C(X=>!X):S(X=>!X)};return d.jsxs(d.Fragment,{children:[d.jsx(_r,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:d.jsx(Fv,{data:((R=y==null?void 0:y.listItems)==null?void 0:R.fields)||[],title:n,currentCard:a,setShowModal:S})}),d.jsx(L4,{className:s?"":"slideUp",height:Y,children:d.jsx(u.Stack,{ref:B,gap:1,margin:"12px",children:l&&!(k!=null&&k.length)?d.jsxs(d.Fragment,{children:[d.jsx(jn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),d.jsx(jn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):d.jsx(d.Fragment,{children:q?d.jsx(u.Box,{margin:"8px 0",children:d.jsx(lp,{error:E,isLoading:l,redirectToAdminTab:m,isFailed:f,showErrorIcon:!L,connectorNames:h,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):k!=null&&k.length?k==null?void 0:k.map(X=>{const{value:$,label:ae,deepLink:ie,type:P}=X,ee="errorMessage"in X?X.errorMessage:null,ye="statusCode"in X?X.statusCode:null;return d.jsxs("div",{children:[d.jsx(O4,{variant:"overline_medium",children:ae}),d.jsx(lp,{value:$,error:ee,deepLink:ie,statusCode:ye,isLoading:l,type:P,cardTitle:n,currentCard:a,cardId:t,fieldName:ae})]},ae)}):d.jsx(u.Box,{margin:"8px 0",children:d.jsx(Kd,{variant:"body_sm_regular",children:O5})})})})}),!E&&oe&&d.jsx(H4,{variant:"body_xs_medium",onClick:te,children:v?d.jsxs(d.Fragment,{children:[b?wb:l0,d.jsx(G4,{src:vb,transformAngle:H})]}):l0})]})},Wv={connectorCards:null,cardSpecificData:null,connectorApiStatus:K.IDLE,conversationMetaDataApiStatus:K.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},fp="/v1/api",Zv=`${fp}/connectors/cards`,Xv=`${fp}/connectors/cards/:id/data`,zv=({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)),Ee({url:`${Zv}?${o.toString()}`,method:Oe.GET})},Yv=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),Ee({url:`${Xv.replace(":id",e)}?${o.toString()}`,method:Oe.GET})},pp=Ic({name:"connectorCardLibrary",initialState:Wv,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(Ha.pending,t=>{t.connectorApiStatus=K.LOADING}).addCase(Ha.fulfilled,(t,n)=>{t.connectorApiStatus=K.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(Ha.rejected,t=>{t.connectorApiStatus=K.FAILED}).addCase(os.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.LOADING}}).addCase(os.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.IDLE}}).addCase(os.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Vd;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),Ha=$t("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n,connectorId:r})=>{var c;const o=await zv({inboxIds:e,channelType:t,conversationId:n,connectorId:r});if(!Array.isArray((c=o==null?void 0:o.data)==null?void 0:c.cards))return{cards:[],connectorsEnabled:!1};const{cards:s,connectorsEnabled:a=!1}=o.data;return{cards:s.sort((l,f)=>(l==null?void 0:l.priority)-(f==null?void 0:f.priority)),connectorsEnabled:a}}),os=$t("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Yv(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&Se({message:X0,type:Ut}),{data:Zd(i),status:c}):(r&&Se({message:Z0,type:qe}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Vd})}}),Jv=pp.reducer,hp=pp.actions,gp="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",qv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%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",Qv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_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",mp=e=>e.write.createObjectList,$v=e=>e.write.createObjectConnectorNamesList,bp=e=>e.write.linkObjectList,Uv=e=>e.write.editObjectList,Kv=e=>e.write.objectDict,ew=e=>e.write.formFields,tw=e=>e.write.linkCardApiStatus,nw=e=>e.write.unlinkCardApiStatus,rw=e=>e.write.dependentFieldsMap,ow=e=>e.write.createFormApiStatus,sw=e=>e.write.updateFormApiStatus,aw=e=>e.write.currentResourceDetails,iw=e=>e.write.currentResourceDetailsApiStatus,yp=e=>e.write.currentCardInEdit,Cp=e=>e.write.hasUnsavedChanges,cw=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,xp=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)&&cw(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),Ep=(e,t)=>JSON.stringify(xp(e))===JSON.stringify(xp(t)),lw=e=>M5.replace("{{connectorName}}",e),uw=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=Qt(),{sendTrackingEvent:c}=I.useContext(He),f=Ie(nw)===K.LOADING,g=()=>{s&&o&&i(Ba({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(G3,{connector_name:a,conversation_id:s}),t(!1),r(),Se({message:Zy,type:Ut})}).catch(()=>{Se({message:Xy,type:Ut})})};return d.jsx(_r,{shown:e,setShown:t,showCloseButton:!0,children:d.jsxs(u.Stack,{width:"400px",padding:"20px",gap:"8px",children:[d.jsx(u.Typography,{variant:"h2",children:R5}),d.jsx(u.Typography,{variant:"body2",children:lw(a)}),d.jsxs(u.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[d.jsx(u.Button,{variant:"text",onClick:()=>t(!1),children:Ui}),d.jsx(u.Button,{disabled:f,color:"error",onClick:g,children:Md})]})]})})},dw=({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 d.jsxs(N4,{width:a,isHovered:t,children:[d.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:g})=>d.jsx(u.Tooltip,{title:l,placement:"bottom",children:d.jsx(Ur,{onClick:g,disabled:c,children:d.jsx("img",{src:f})})},i))}),o&&d.jsx(u.Tooltip,{title:o.label,placement:"bottom",children:d.jsx(Ur,{onClick:o.action,disabled:o.disabled,children:d.jsx("img",{src:o.iconSrc})})},o.id)]})},fw=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=Qt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:g}=I.useContext(He),{userGroupId:y}=Pt()||{},[E,m]=I.useState(!!s),[h,p]=I.useState(!1),[b,C]=I.useState(!1),[x,w]=I.useState(!1),{id:v,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let N=v;A&&(N=`${N}_${A}`);const{data:D,cardType:k,cardErrorMessage:M,connectorNames:B}=(n==null?void 0:n[N])??{},Y=(B==null?void 0:B[0])||"",J=(o==null?void 0:o[N])===K.LOADING,H=(o==null?void 0:o[N])===K.FAILED,G=!!(nt(c,Ld)&&A),q=I.useMemo(()=>{var P,ee;if(M||H||!(nt(c,E5)&&S.some(ye=>ye.type==="edit")))return!1;switch(k){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((P=D==null?void 0:D.listItems)==null?void 0:P.fields.length)===1?(ee=D==null?void 0:D.listItems)==null?void 0:ee.fields.some(ye=>ye.externalResourceId):!1;default:return!1}},[D,k,c,S,t,M,H]),oe=I.useCallback((P=!1)=>{const ee=P?X3:Z3;r&&v&&f&&i(os({id:v,email:r,conversationId:f,externalResourceId:A})).unwrap().then(ye=>{const z={...Wd(ye,_,P,!0),sm_ids:g};l(ee,z)}).catch(ye=>{const z={...Wd(ye,_,P,!1),sm_ids:g};l(ee,z)})},[i,r,v,_,l,f,A,g]);I.useEffect(()=>{E&&oe(!0)},[E,oe]);const te=(P,ee)=>{var z;P==null||P.stopPropagation(),i(os({id:ee,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{l(F3,{id:ee})});const ye=P.target.tagName==="BUTTON"?(z=P.target)==null?void 0:z.firstChild:P.target;ye.className&&(ye.className=""),setTimeout(()=>ye.className="selected",1)},V=(P,ee)=>{P.stopPropagation(),!(n!=null&&n[ee])&&!J&&oe(),l(E?O3:L3,{id:ee}),m(ye=>!ye)},W=P=>{P.stopPropagation();const ee=P.currentTarget.offsetWidth<P.currentTarget.scrollWidth;p(!!ee)},R=P=>{var ye,z;P.stopPropagation(),l(Sd,{card_title:_,connector_name:Y,ug_id:y,sm_ids:g});let ee;k==="flat"?ee=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:k==="flat_with_list"&&(ee=(z=(ye=D==null?void 0:D.listItems)==null?void 0:ye.fields[0])==null?void 0:z.externalResourceId),ee?i(lo({...t,externalResourceId:ee})):Se({message:vn,type:qe})},X=P=>{P.stopPropagation(),C(!0)},$=()=>{w(!0)},ae=()=>{w(!1)},ie=[{id:"unlink",label:Md,disabled:J,shown:G,iconSrc:qv,action:P=>X(P)},{id:"refresh",label:kd,disabled:J,shown:!0,iconSrc:gp,action:P=>te(P,v)},{id:"edit",label:Pd,disabled:J,shown:q,iconSrc:Qv,action:P=>R(P)}];return d.jsxs(_4,{"data-testid":`test_${v}`,onMouseEnter:$,onMouseLeave:ae,children:[d.jsxs(S4,{className:E?"hiver-card-expanded":"",onClick:P=>V(P,N),children:[d.jsxs(A4,{children:[L&&d.jsx("img",{src:L,alt:_}),d.jsx(u.Tooltip,{title:h?_:"",placement:"bottom",children:d.jsx(T4,{variant:"body_sm_regular",onMouseOver:P=>W(P),onMouseLeave:P=>W(P),children:_})})]}),d.jsxs(Ud,{children:[d.jsx(dw,{actions:ie,isHovered:x}),d.jsx(u.Tooltip,{title:E?Dd:Qi,placement:"bottom",children:d.jsx(Ur,{onClick:P=>V(P,N),children:d.jsx(sc,{className:E?"":"hiver-up"})})})]})]}),d.jsx(dp,{id:N,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:E}),d.jsx(uw,{showUnlinkModal:b,setShowUnlinkModal:C,cardId:v,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:Y})]})},pw=Number.MAX_SAFE_INTEGER,hw=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=I.useContext(He),i=nt(s,w5)?pw:1;return d.jsx(u.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:g}=c;let y=f;return g&&(y=`${y}_${g}`),d.jsx("div",{children:d.jsx(fw,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},y)})})},uo=({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 In({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}uo.CaseView=In;const gw="Bring your favourite tools into Hiver",mw="Plugin image",bw="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",yw="Enable Connectors",Cw="Enable Apps",xw="Enable Cards",Ew="Learn more",vw="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",ww="Contact your admin to enable this",Iw="https://youtu.be/ODcJnzZLb50",_w="connectors-module/assets/connectors-images/connector-mainpage.png",Sw="connectors-module/assets/connectors-images/connector-mainpage-apps.png",Aw="Explore connectors",Tw="Connectors",Lw=u.styled(u.Box)`
|
|
1257
|
+
`,DE={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 NE(e){return e.rowId??e.name}const RE=({open:e,onClose:t,formId:n,fields:r,variables:o,connectorLogo:s,isSaving:a,title:i="Map fields",isLoading:c=!1,defaultValues:l,customFields:f,fetchOptions:g,onSave:y,onCancel:E,onFieldChange:m})=>{const[h,p]=I.useState({}),[b,x]=I.useState({}),C=I.useMemo(()=>{if(!Array.isArray(r)||!r.length)return[];const L=new Set;return r.filter(D=>L.has(D.name)?!1:(L.add(D.name),!0)).sort((D,k)=>D.priority-k.priority)},[r]),w=({name:L,value:N})=>{x(D=>{const k={...D};return N?k[L]=N:delete k[L],k})};I.useEffect(()=>{l&&e&&p({...l})},[l,e]),I.useEffect(()=>()=>{e||(p({}),x({}))},[e]);const v=()=>{t(),p({})},_=()=>{E==null||E(),p({}),t()},A=()=>{const L={...h};for(const N in L)L[N]||delete L[N];y(L)},S=Object.keys(b).length>0;return d.jsx(u.Dialog,{open:e,onClose:v,PaperProps:{sx:DE},maxWidth:!1,children:c?d.jsx(u.Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"615px"},children:d.jsx(u.CircularProgress,{})}):d.jsxs(SE,{children:[d.jsxs(AE,{children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:2,children:[d.jsx(vE,{}),d.jsx(u.Stack,{gap:.5,flex:1,minWidth:0,children:d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:.5,children:[d.jsx(u.Typography,{variant:"h6",fontSize:18,fontWeight:600,color:u.theme.palette.gray.gray1,children:i}),d.jsx(u.Tooltip,{title:"Assign default values to create fields",placement:"top",children:d.jsx(u.IconButton,{size:"small","aria-label":"About mapping fields",sx:{padding:"4px"},children:d.jsx(u.icons.InfoOutlined,{sx:{fontSize:18,color:u.theme.palette.gray.gray3}})})})]})})]}),d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{onClick:v,size:"small","aria-label":"Close",children:d.jsx(u.icons.Close,{sx:{fontSize:20}})})})]}),d.jsx(TE,{children:d.jsxs(LE,{children:[d.jsxs(u.Stack,{direction:"row",padding:"16px 24px",sx:{backgroundColor:u.theme.palette.gray.gray6a,borderBottom:"1px solid #ECEFF6",borderRadius:"8px 8px 0 0"},children:[d.jsx(IE,{src:s,alt:"Connector"}),d.jsx(u.Typography,{variant:"caption",fontSize:14,fontWeight:600,color:u.theme.palette.gray.gray3,flex:1,children:"Field"}),d.jsx(u.Typography,{variant:"caption",fontSize:14,fontWeight:600,color:u.theme.palette.gray.gray3,width:320,children:"Map to"})]}),C.map((L,N)=>{const D=NE(L),k=h[D]??"";return!Z1(L)&&!xE.includes(L.type)?null:d.jsxs(u.Stack,{direction:"row",alignItems:"center",padding:"24px",gap:2,sx:{borderBottom:N<C.length-1?"1px solid #F6F8FC":void 0,"&:last-child":{borderBottom:"none"}},children:[d.jsx(kE,{children:d.jsx(u.Typography,{variant:"body2",fontSize:14,color:u.theme.palette.gray.gray2,children:L.label})}),d.jsx(_E,{width:20,height:20}),d.jsx(FE,{children:d.jsx(CE,{field:L,formId:String(n),value:k,formValues:h,variables:o,customFields:f,errors:b,setError:w,fetchOptions:g,setFormValues:p,onFieldChange:m})})]},D)})]})}),d.jsxs(OE,{children:[d.jsx(u.Button,{variant:"contained",onClick:A,sx:{textTransform:"none",padding:"3px 32px !important"},disabled:a||S,children:"Save"}),d.jsx(u.Button,{variant:"outlined",color:"inherit",onClick:_,disabled:a,sx:{textTransform:"none",padding:"3px 12px !important",borderColor:u.theme.palette.gray.gray5},children:"Cancel"})]})]})})},ME=u.styled(u.Box)`
|
|
1258
|
+
position: fixed;
|
|
1259
|
+
inset: 0;
|
|
1260
|
+
z-index: ${({zIndex:e})=>e};
|
|
1261
|
+
`,PE=u.styled(u.Box)`
|
|
1262
|
+
position: fixed;
|
|
1263
|
+
top: ${({top:e})=>`${e}px`};
|
|
1264
|
+
left: ${({left:e})=>`${e}px`};
|
|
1265
|
+
width: ${({width:e})=>`${e}px`};
|
|
1266
|
+
height: ${({height:e})=>`${e}px`};
|
|
1267
|
+
border-radius: 10px;
|
|
1268
|
+
pointer-events: auto;
|
|
1269
|
+
box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
|
|
1270
|
+
`,jE=e=>e,BE=({open:e,targetRef:t,endElRef:n,padding:r=8,zIndex:o=1300,renderHighlight:s=jE,onClose:a})=>{const[i,c]=I.useState(null);if(I.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(),E=g.getBoundingClientRect(),m=window.innerWidth,h=window.innerHeight,p=Math.max(0,y.left-r),b=Math.max(0,y.top-r),x=Math.min(h,y.bottom+r),C=Math.min(m,E.right+r),w=Math.max(0,C-p),v=Math.max(0,x-b);if(!w||!v){c(null);return}c({top:b,left:p,width:w,height:v,right:C,bottom:x})},[e,r,t,n]),!e||!i||typeof document>"u")return null;const l=d.jsx(PE,{top:i.top,left:i.left,width:i.width,height:i.height,onClick:f=>f.stopPropagation()});return je.createPortal(d.jsx(ME,{zIndex:o,onClick:a,children:s(l)}),document.body)},al=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},VE=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],rs=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},il=({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=O6(n.validations.isRequired.msg):t[n.name].isRequired=!0),n.type==="date"){let l=typeof((o=n.validations)==null?void 0:o.disableFuture)=="object"?n.validations.disableFuture.msg:"";l=typeof((s=n.validations)==null?void 0:s.disablePast)=="object"?n.validations.disablePast.msg:l,t[n.name].validate=F6(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=k6();return}if(n.type==="text"&&n.limit){t[n.name].validate=Ac();return}if(n.type==="table"){const l=il({formFields:n.columns??[]});t[n.name].validations=l}if((i=n.validations)!=null&&i.isUrl){const l=typeof n.validations.isUrl=="object"?n.validations.isUrl.msg:"";t[n.name].validate=T6(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=L6(l)}}),t},Na={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[ka.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},os=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return Na.isMultiSelect(o)?s=o.map(a=>a.value):Na.isTable(o)?s=o.map(({...i})=>(delete i[ka.ROW_ID],i)).filter(i=>Object.keys(i).length>0):Na.isSelect(o)?s=o.value:Na.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),GE=(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},Gn="/v1/api",HE=`${Gn}/connectors/conversation/:conversationId/metadata`,WE=`${Gn}/connectors/forms/:formId/field/:fieldName/data`,ZE=`${Gn}/connectors/form/:formId`,XE=`${Gn}/connectors/forms/:id/link`,zE=`${Gn}/connectors/forms/:id/preview`,YE=`${Gn}/connectors/conversation/:conversationId/selected-email`,JE=`${Gn}/connectors/app-cf-values`,qE=`${Gn}/connectors/deferred-app-cf-values`,Q1=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${WE}?${r.toString()}`,e),method:Oe.POST,data:t})},QE=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${ZE}?${r.toString()}`,e),method:Oe.POST,data:t})},$E=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:`${zE.replace(":id",e)}?${r.toString()}`,method:Oe.POST,data:{args:t}})},UE="https://avatars.githubusercontent.com/u/62397590",$1={optionsMap:null,createOptionApi:K.IDLE,dropdownOptionsApis:K.IDLE,previewCardData:null,previewCardApiStatus:K.IDLE,selectedSuggestionType:"basic"},U1=Ic({name:"commonSlice",initialState:$1,reducers:{resetState:()=>$1,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=K.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.createOptionApi=K.LOADING}).addCase(Ra.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=K.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(Ra.rejected,t=>{t.createOptionApi=K.FAILED}).addCase(Ir.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(Ir.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(Ir.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(co.pending,t=>{t.previewCardApiStatus=K.LOADING}).addCase(co.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=K.IDLE}).addCase(co.rejected,t=>{t.previewCardApiStatus=K.FAILED})}}),Ra=$t("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var h,p,b;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:f}=e,g=al(c||{},s,r),{common:y}=t(),{options:E=[],...m}=((h=y.optionsMap)==null?void 0:h[g])||{};try{const x=await QE({fieldName:r,formId:a},{args:l,conversation_id:i});if(!x||!("data"in x)||!("output_variables"in x.data)||!("external_resource_id"in x.data.output_variables))throw x;const C=x.data.output_variables,{external_resource_id:w,...v}=C,A=[{label:o,value:w,prefillValues:v},...E],S=ef(A,L=>L.value);return f==null||f(S),{optionsList:S,key:g,...m}}catch(x){f==null||f(E);const C=x,w=(p=C==null?void 0:C.response)==null?void 0:p.data,v=typeof w=="string"?w:(w==null?void 0:w.message)||vn;return Se({message:v,type:qe}),n((b=C==null?void 0:C.response)==null?void 0:b.status)}}),Ir=$t("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var A,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:f={enabled:!1},controller:g}=e,y=al(c||{},o,r),{common:E}=t();let m=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(m=a.meta.showAvatar);const h=((A=E.optionsMap)==null?void 0:A[y])||{},p=!e.isScrollToBottomEvent&&(!h||s!==h.searchTerm),b=p?[]:h.options||[],x=p?!0:h.hasMore??!0,C=p?0:h.currentPage??0,{enabled:w,limit:v}=f,_=v||10;try{let N;const D=g==null?void 0:g.signal,k=w?{pageNumber:C+1,searchTerm:s,limit:_,enabled:w}:null;if(x&&(N=await Q1({fieldName:r,formId:o},{pagination:k||{},args:c,interfaceId:l})),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:G}=t(),q=(S=G.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(G=>m?{...G,avatarUrl:G.avatarUrl||UE}:(delete G.avatarUrl,G)),Y=[...b,...B],J=w?B.length>=_:!1,H=ef(Y,G=>G.value);return i==null||i(H),{optionsList:H,fieldName:r,formId:o,searchTerm:s,currentPage:C+1,hasMore:J,key:y}}catch(N){const{common:D}=t(),k=((L=D.optionsMap)==null?void 0:L[y])||{};return i==null||i(k.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=al(a||{},r,n),{common:c}=t(),l=(g=c.optionsMap)==null?void 0:g[i];if((l==null?void 0:l.searchTerm)!==o)return!0;const f=(l==null?void 0:l.options)||[];return f&&f.length?(s==null||s(f),!1):!0}}),co=$t("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await $E(e,t,n),i=a==null?void 0:a.data;return i?(r&&Se({message:X0,type:Ut}),{data:Zd(i)}):(r&&Se({message:Z0,type:qe}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:jL,resetPreviewCardData:KE,setSelectedSuggestionType:ev}=U1.actions,tv=U1.reducer,Hn="/v1/api",nv=`${Hn}/connectors/forms/list`,rv=`${Hn}/connectors/cards/:id/unlink`,ov=`${Hn}/connectors/forms/:id/link`,sv=`${Hn}/connectors/form/:formId`,av=`${Hn}/connectors/forms/:formId/data`,iv=`${Hn}/connectors/forms/:formId/get_forms_custom_fields`,K1=`${Hn}/connectors/forms/:formId/defaults`,cv=`${Hn}/connectors/forms/:formId/default-values`,lv=({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)),Ee({url:`${nv}?${o.toString()}`,method:Oe.GET})},ep=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ee({url:rt(`${sv}?${r.toString()}`,e),method:Oe.POST,data:t})},uv=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),Ee({url:`${rv.replace(":id",e)}?${o.toString()}`,method:Oe.POST,data:{externalResourceId:n,conversationId:r}})},dv=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),Ee({url:`${ov.replace(":id",e)}?${s.toString()}`,method:Oe.POST,data:{externalResourceId:t,conversationId:r}})},fv=(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),Ee({url:`${av.replace(":formId",e)}?${s.toString()}`,method:Oe.GET})},pv="Error in previewing the card",tp="Link format isn't recognized. Please check that you've entered a valid URL",hv="Item already linked",gv="Card linked successfully",mv="Error in linking the card",bv="New card created",yv="Card creation failed",xv="Create and link objects from different apps to this conversation",Cv="Are you sure you want to change the primary object?",Ev="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",vv="Are you sure you want to leave?",wv=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
|
|
1271
|
+
Do you want to continue?`,Iv="Select an object to create",_v="Select an object to link",np="Select object",Sv="Paste URL or ID",Av="Object ID/Link",Tv="Card updated",Lv="Card updation failed",rp=3,Ov="Map fields",Fv="Variables linked to inbox may not be available as conversation is linked to multiple inboxes.",cl=(e,t)=>{var r,o,s,a,i,c,l,f,g,y,E,m,h;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((f=(l=e.validations)==null?void 0:l.range)==null?void 0:f.min)||Number.MIN_SAFE_INTEGER,max:((y=(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:((E=e.validations)==null?void 0:E.maxRows)||5,limit:(m=e.validations)==null?void 0:m.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(h=e.validations)==null?void 0:h.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},op=Ic({name:"writeCapability",initialState:z0,reducers:{resetState:()=>z0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=K.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(Ma.pending,t=>{t.objectListApiStatus=K.LOADING}).addCase(Ma.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:f}=n.payload;t.objectListApiStatus=K.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=f}).addCase(Ma.rejected,t=>{t.objectListApiStatus=K.FAILED}).addCase(Ir.pending,t=>{t.dropdownOptionsApis=K.LOADING}).addCase(Ir.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=K.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(Ir.rejected,t=>{t.dropdownOptionsApis=K.FAILED}).addCase(Pa.pending,t=>{t.createFormApiStatus=K.LOADING}).addCase(Pa.fulfilled,t=>{t.createFormApiStatus=K.IDLE}).addCase(Pa.rejected,t=>{t.createFormApiStatus=K.FAILED}).addCase(Va.pending,t=>{t.linkCardApiStatus=K.LOADING}).addCase(Va.fulfilled,t=>{t.linkCardApiStatus=K.IDLE}).addCase(Va.rejected,t=>{t.linkCardApiStatus=K.FAILED}).addCase(Ba.pending,t=>{t.unlinkCardApiStatus=K.LOADING}).addCase(Ba.fulfilled,t=>{t.unlinkCardApiStatus=K.IDLE}).addCase(Ba.rejected,t=>{t.unlinkCardApiStatus=K.FAILED}).addCase(ja.pending,t=>{t.updateFormApiStatus=K.LOADING}).addCase(ja.fulfilled,t=>{t.updateFormApiStatus=K.IDLE}).addCase(ja.rejected,t=>{t.updateFormApiStatus=K.FAILED}).addCase(Ga.pending,t=>{t.currentResourceDetailsApiStatus=K.LOADING}).addCase(Ga.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=K.IDLE}).addCase(Ga.rejected,t=>{t.currentResourceDetailsApiStatus=K.FAILED})}}),Ma=$t("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o,connectorId:s}=e,a=await lv({inboxIds:t,channelType:n,conversationId:r,connectorId:s});if(!a||!a.data||!("formsList"in a.data)||!Array.isArray(a.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const i=a.data.formsList,c={},l=[],f=[],g=[],y=[],E=[],m={},h={};return i==null||i.forEach(p=>{var x,C;if(p.expandedView&&!o)return;const b={...p};"fieldList"in b&&delete b.fieldList,h[p.id]=b,c[p.id]||(c[p.id]={}),m[p.id]||(m[p.id]=[]),p.type==="create"&&p.authenticated?(l.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!f.includes(p.connectorName)&&f.push(p.connectorName)):p.type==="link"&&p.authenticated?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&&E.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(x=p.fieldList)==null||x.sort((w,v)=>w.priority-v.priority),(C=p.fieldList)==null||C.forEach(w=>{const v=cl(w);if(v.columns&&(v.columns=v.columns.map(_=>cl(_,{loadOptionsOnFocus:!0,defaultOptions:!1}))),m[p.id]=[...m[p.id],v],w.interfaceDetails&&(w.interfaceDetails.args||w.interfaceDetails.optionalArgs)){const _={...w.interfaceDetails.args,...w.interfaceDetails.optionalArgs};Object.values(_).forEach(A=>{c[p.id][A]?c[p.id][A]=[...c[p.id][A],w.name]:c[p.id][A]=[w.name]})}})}),{createObjectList:l,createObjectConnectorNamesList:f,linkObjectList:g,editObjectList:y,searchObjectList:E,formFields:m,objectDict:h,dependentFieldsMap:c}}),Pa=$t("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await ep({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),Se({message:bv,type:Ut})}catch(l){const f=l,g=(c=f==null?void 0:f.response)==null?void 0:c.data,y=(g==null?void 0:g.message)??yv;return o==null||o(l),Se({message:y,type:qe}),t(l)}}),ja=$t("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await ep({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),Se({message:Tv,type:Ut})}catch(f){return o==null||o(f),Se({message:Lv,type:qe}),t(f)}}),Ba=$t("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await uv(e,t,n,r)}),Va=$t("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await dv(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),Ga=$t("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await fv(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,f={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,y])=>{"label"in y&&(y.type&&y.type==="date"?f.values[g]=y.label?new Date(parseInt(y.label)).toISOString():"":y.type&&y.type==="multi-select"&&"value"in y&&"label"in y&&y.value&&y.label?f.values[g]=[{value:y.value,label:y.label}]:y.value?f.values[g]={value:y.value,label:y.label}:f.values[g]=y.label)}),{data:f,status:l}}catch(i){return Se({message:vn,type:qe}),t(i)}}),{resetState:BL,setCurrentCardInEdit:lo,resetCurrentResourceDetails:kv,setHasUnsavedChanges:sp}=op.actions,Dv=op.reducer,Nv=()=>{const[e,t]=I.useState(null),[n,r]=I.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=I.useCallback(s=>{t(s)},[]);return I.useEffect(()=>{if(!e)return;e.dataset.prevScrollLeft="0",e.dataset.prevScrollTop="0";let s=null;const a=100;let i=null;const c=150,l=f=>{s||(s=window.setTimeout(()=>{const g=f.target,y=Number(e.dataset.prevScrollLeft)||0,E=Number(e.dataset.prevScrollTop)||0,m=g.scrollLeft,h=g.scrollTop,p=m-y,b=h-E,x=Math.abs(b)>Math.abs(p),C=Math.abs(p)>Math.abs(b);r({isVertical:x,isHorizontal:C,isScrolling:!0}),e.dataset.prevScrollLeft=String(m),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",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},Rv="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",Mv=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=Qt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),{userGroupId:i}=Pt()||{},[c,l]=Nv(),{isScrolling:f,isVertical:g}=c,y=f&&g,E=I.useMemo(()=>(e==null?void 0:e[0].data.map(b=>b.label))||[],[e]),m=I.useMemo(()=>e.map(b=>{const x={cells:{},externalResourceId:b.externalResourceId};return b.data.forEach((C,w)=>{if(E[w]){let v=C.value?C.value:Ys;v&&C.type==="date"&&(v=new Date(parseInt(v)).toLocaleDateString(navigator.language)),x.cells[E[w]]={label:v,deepLink:C==null?void 0:C.deepLink}}}),x}),[e,E]),h=(b,x)=>d.jsx(B5,{align:"left",children:b.deepLink?d.jsx(u.Link,{target:"_blank",underline:"none",href:b.deepLink,children:b.label}):d.jsx(u.Typography,{variant:"body2",color:"gray.black",children:b.label})},`${x}_${b.label}`),p=b=>{!b||!n||(r(!1),s(Sd,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(lo({...n,externalResourceId:b})))};return d.jsxs(u.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[d.jsx(u.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),d.jsx(u.TableContainer,{ref:l,children:d.jsxs(u.Table,{stickyHeader:!0,children:[d.jsx(M5,{children:d.jsxs(u.TableRow,{children:[E.map(b=>d.jsx(P5,{sx:{whiteSpace:"nowrap"},children:d.jsx(u.Typography,{variant:"overline",color:"gray.gray3",children:b})},b)),d.jsx(G5,{})]})}),d.jsx(u.TableBody,{children:m.map((b,x)=>d.jsxs(j5,{children:[Object.values(b.cells).map((C,w)=>h(C,w)),d.jsx(V5,{children:!y&&b.externalResourceId&&d.jsx(u.Tooltip,{title:Pd,placement:"bottom",children:d.jsx(u.IconButton,{className:"row-edit",onClick:()=>p(b.externalResourceId),children:d.jsx("img",{src:Rv})})})})]},`id_${x}`))})]})})]})},Pv=e=>e.cardList.connectorCards,jv=e=>e.cardList.connectorsEnabled,Bv=e=>e.cardList.connectorApiStatus,Vv=e=>e.cardList.cardSpecificData,Gv=e=>e.cardList.specificConnectorApiStatus,Hv=e=>e.cardList.specificConnectorErrorCode,Wv=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==K.IDLE||!n?!1:Object.values(n).every(r=>r===K.IDLE||r===K.FAILED)},Zv="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",ap=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,ip=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}},Xv=(e,t)=>`${Bd} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),zv=(e,t,n)=>{var l,f,g,y,E;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((f=a==null?void 0:a.flatDisplay)!=null&&f.data)?a.flatDisplay.data:!s&&((E=(y=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:y[0])!=null&&E.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&ap.test(c)?!0:!cp(e,t,n)&&!i.length},cp=(e,t,n)=>{var f,g;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!1;const a=o.cardType==="flat"||(g=(f=o.data)==null?void 0:f.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===K.FAILED,c=o.cardErrorMessage,l=c&&ap.test(c);return i||a||c&&!l};function Yv(e,t,n){const r={},o={};let s=0,a=0;for(const c of e){const l=c.externalResourceId?`${c.id}_${c.externalResourceId}`:c.id,f=t==null?void 0:t[l],g=(f==null?void 0:f.connectorNames)??[];for(const y of g)r[y]||(r[y]=[],o[y]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[y].push(c),o[y].cards_visible+=1,o[y].card_key.push(c.id),o[y].card_title.push(c.title),zv(c,t,n)&&(o[y].empty_cards+=1,s+=1),cp(c,t,n)&&(o[y].cards_with_error+=1,a+=1)}return{cards_per_app:Object.entries(o).map(([c,l])=>({app_name:c,...l})),total_empty_cards:s,total_cards_with_errors:a}}const lp=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:f,currentCard:g,cardId:y,isCardLevelError:E,fieldName:m,showErrorIcon:h}=e,p=I.useRef(null),b=I.useRef(null),{email:x,currentSmIds:C,conversationId:w,sendTrackingEvent:v,connectorFunctions:_}=I.useContext(He),A=Ie(Hv),S=A==null?void 0:A[y],[L,N]=I.useState(!1),D=I.useMemo(()=>{if(n&&E){const{error_message:q}=ip(n);return q}return c?Bd.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):Fd},[n,c,l,E]),k=I.useCallback(()=>{const q=n||Xv(S,l),{error_code:oe,error_message:te}=ip(q);v==null||v(K3,{sm_ids:C,frontend_req_params:{email:x,conversationId:w,externalResourceId:g==null?void 0:g.externalResourceId},card_title:f,connector_name:l!=null&&l.length?l:"",error_code:oe,error_message:te})},[n,S,v,C,x,w,f,l,g==null?void 0:g.externalResourceId]);I.useEffect(()=>{(n&&E||c&&S)&&k()},[k,S,c,n,E]),I.useEffect(()=>{const q=r?b.current:p.current;if(q){const oe=q.scrollHeight>q.clientHeight||q.scrollWidth>q.clientWidth;N(oe)}},[t,r]);const M=o==qi.NOT_FOUND;let B=M?Ys:t;a==="date"&&B&&!M&&(B=new Date(parseInt(B)).toLocaleDateString(navigator.language));const Y=!!n||c,J=()=>{i?_==null||_.redirectToAdmin():window.open(H4,"_blank")},H=()=>{v==null||v(e4,{sm_ids:C,card_title:f,field_name:m})},G=q=>{const oe=/<>(.*?)<>/g,te=q.split(oe);return d.jsx(I.Fragment,{children:te.map((V,W)=>W%2===1?d.jsx(k5,{variant:"body2",onClick:J,children:V},W):V)})};return s?d.jsx(jn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):Y?d.jsxs(Ud,{gap:"7px",children:[h?d.jsx(u.Stack,{marginTop:"3px",flexShrink:"0",children:d.jsx("img",{src:Zv,width:"18px",height:"18px"})}):null,d.jsx(Kd,{variant:"body_sm_regular",children:D?G(D):Fd})]}):d.jsx(u.Tooltip,{title:L?B:null,placement:"bottom",children:r?d.jsx(e0,{ref:b,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:H,children:B||Ys}):d.jsx(N5,{ref:p,variant:"caption_regular",children:B||Ys})})},up="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",_r=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>d.jsx(u.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:d.jsxs(u.Stack,{direction:"row",children:[r&&d.jsx(u.Box,{position:"absolute",right:10,top:10,children:d.jsx(u.Tooltip,{title:"Close",placement:"bottom",children:d.jsx(u.IconButton,{onClick:()=>t(!1),children:d.jsx("img",{src:up})})})}),n]})}),dp=e=>{var V,W,R;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===K.IDLE,l=(o==null?void 0:o[t])===K.LOADING,f=(o==null?void 0:o[t])===K.FAILED,{cardType:g,data:y,cardErrorMessage:E,redirectToAdminTab:m,connectorNames:h}=(r==null?void 0:r[t])||{},p=g==="flat",[b,x]=I.useState(!1),[C,w]=I.useState(!1),[v,_]=I.useState(!1),[A,S]=I.useState(!1),L=((V=y==null?void 0:y.listItems)==null?void 0:V.statusCode)!==401,N=I.useMemo(()=>{var X,$,ae,ie;return p&&((X=y==null?void 0:y.flatDisplay)!=null&&X.data)?y.flatDisplay.data:!p&&((ie=(ae=($=y==null?void 0:y.listItems)==null?void 0:$.fields)==null?void 0:ae[0])!=null&&ie.data)?y.listItems.fields[0].data:[]},[p,y]),D=I.useMemo(()=>N==null?void 0:N.slice(0,5),[N]),[k,M]=I.useState([]),B=I.useRef(null),[Y,J]=I.useState(0),H=b?-180:0,G=p?!1:!!((W=y==null?void 0:y.listItems)!=null&&W.errorMessage),q=G||f||E,oe=c&&!G&&s&&(v||C);I.useLayoutEffect(()=>{var X;(X=B.current)!=null&&X.scrollHeight&&J(B.current.scrollHeight+i)},[o==null?void 0:o[t],k,B]),I.useEffect(()=>{var ie,P;const X=((N==null?void 0:N.length)||0)>5,$=!p&&(((P=(ie=y==null?void 0:y.listItems)==null?void 0:ie.fields)==null?void 0:P.length)||0)>1;_(X&&!$),w($)},[y,p,N==null?void 0:N.length]),I.useEffect(()=>{M(b?N:D)},[y,b,D,N]);const te=()=>{v?x(X=>!X):S(X=>!X)};return d.jsxs(d.Fragment,{children:[d.jsx(_r,{shown:A,setShown:S,showCloseButton:!0,borderRadius:12,children:d.jsx(Mv,{data:((R=y==null?void 0:y.listItems)==null?void 0:R.fields)||[],title:n,currentCard:a,setShowModal:S})}),d.jsx(O5,{className:s?"":"slideUp",height:Y,children:d.jsx(u.Stack,{ref:B,gap:1,margin:"12px",children:l&&!(k!=null&&k.length)?d.jsxs(d.Fragment,{children:[d.jsx(jn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),d.jsx(jn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):d.jsx(d.Fragment,{children:q?d.jsx(u.Box,{margin:"8px 0",children:d.jsx(lp,{error:E,isLoading:l,redirectToAdminTab:m,isFailed:f,showErrorIcon:!L,connectorNames:h,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):k!=null&&k.length?k==null?void 0:k.map(X=>{const{value:$,label:ae,deepLink:ie,type:P}=X,ee="errorMessage"in X?X.errorMessage:null,ye="statusCode"in X?X.statusCode:null;return d.jsxs("div",{children:[d.jsx(F5,{variant:"overline_medium",children:ae}),d.jsx(lp,{value:$,error:ee,deepLink:ie,statusCode:ye,isLoading:l,type:P,cardTitle:n,currentCard:a,cardId:t,fieldName:ae})]},ae)}):d.jsx(u.Box,{margin:"8px 0",children:d.jsx(Kd,{variant:"body_sm_regular",children:F4})})})})}),!E&&oe&&d.jsx(W5,{variant:"body_xs_medium",onClick:te,children:v?d.jsxs(d.Fragment,{children:[b?Ib:l0,d.jsx(H5,{src:wb,transformAngle:H})]}):l0})]})},Jv={connectorCards:null,cardSpecificData:null,connectorApiStatus:K.IDLE,conversationMetaDataApiStatus:K.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},fp="/v1/api",qv=`${fp}/connectors/cards`,Qv=`${fp}/connectors/cards/:id/data`,$v=({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)),Ee({url:`${qv}?${o.toString()}`,method:Oe.GET})},Uv=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),Ee({url:`${Qv.replace(":id",e)}?${o.toString()}`,method:Oe.GET})},pp=Ic({name:"connectorCardLibrary",initialState:Jv,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(Ha.pending,t=>{t.connectorApiStatus=K.LOADING}).addCase(Ha.fulfilled,(t,n)=>{t.connectorApiStatus=K.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(Ha.rejected,t=>{t.connectorApiStatus=K.FAILED}).addCase(ss.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.LOADING}}).addCase(ss.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.IDLE}}).addCase(ss.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:K.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Vd;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),Ha=$t("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n,connectorId:r})=>{var c;const o=await $v({inboxIds:e,channelType:t,conversationId:n,connectorId:r});if(!Array.isArray((c=o==null?void 0:o.data)==null?void 0:c.cards))return{cards:[],connectorsEnabled:!1};const{cards:s,connectorsEnabled:a=!1}=o.data;return{cards:s.sort((l,f)=>(l==null?void 0:l.priority)-(f==null?void 0:f.priority)),connectorsEnabled:a}}),ss=$t("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await Uv(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&Se({message:X0,type:Ut}),{data:Zd(i),status:c}):(r&&Se({message:Z0,type:qe}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Vd})}}),Kv=pp.reducer,hp=pp.actions,gp="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",ew="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",tw="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",mp=e=>e.write.createObjectList,nw=e=>e.write.createObjectConnectorNamesList,bp=e=>e.write.linkObjectList,rw=e=>e.write.editObjectList,ow=e=>e.write.objectDict,sw=e=>e.write.formFields,aw=e=>e.write.linkCardApiStatus,iw=e=>e.write.unlinkCardApiStatus,cw=e=>e.write.dependentFieldsMap,lw=e=>e.write.createFormApiStatus,uw=e=>e.write.updateFormApiStatus,dw=e=>e.write.currentResourceDetails,fw=e=>e.write.currentResourceDetailsApiStatus,yp=e=>e.write.currentCardInEdit,xp=e=>e.write.hasUnsavedChanges,pw=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,Cp=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)&&pw(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),Ep=(e,t)=>JSON.stringify(Cp(e))===JSON.stringify(Cp(t)),hw=e=>P4.replace("{{connectorName}}",e),gw=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=Qt(),{sendTrackingEvent:c}=I.useContext(He),f=Ie(iw)===K.LOADING,g=()=>{s&&o&&i(Ba({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(H3,{connector_name:a,conversation_id:s}),t(!1),r(),Se({message:Xy,type:Ut})}).catch(()=>{Se({message:zy,type:Ut})})};return d.jsx(_r,{shown:e,setShown:t,showCloseButton:!0,children:d.jsxs(u.Stack,{width:"400px",padding:"20px",gap:"8px",children:[d.jsx(u.Typography,{variant:"h2",children:M4}),d.jsx(u.Typography,{variant:"body2",children:hw(a)}),d.jsxs(u.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[d.jsx(u.Button,{variant:"text",onClick:()=>t(!1),children:Ui}),d.jsx(u.Button,{disabled:f,color:"error",onClick:g,children:Md})]})]})})},mw=({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 d.jsxs(R5,{width:a,isHovered:t,children:[d.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:f,action:g})=>d.jsx(u.Tooltip,{title:l,placement:"bottom",children:d.jsx(Ur,{onClick:g,disabled:c,children:d.jsx("img",{src:f})})},i))}),o&&d.jsx(u.Tooltip,{title:o.label,placement:"bottom",children:d.jsx(Ur,{onClick:o.action,disabled:o.disabled,children:d.jsx("img",{src:o.iconSrc})})},o.id)]})},bw=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=Qt(),{availableFeatures:c,sendTrackingEvent:l,conversationId:f,currentSmIds:g}=I.useContext(He),{userGroupId:y}=Pt()||{},[E,m]=I.useState(!!s),[h,p]=I.useState(!1),[b,x]=I.useState(!1),[C,w]=I.useState(!1),{id:v,title:_,externalResourceId:A="",forms:S=[],logoUrl:L}=t;let N=v;A&&(N=`${N}_${A}`);const{data:D,cardType:k,cardErrorMessage:M,connectorNames:B}=(n==null?void 0:n[N])??{},Y=(B==null?void 0:B[0])||"",J=(o==null?void 0:o[N])===K.LOADING,H=(o==null?void 0:o[N])===K.FAILED,G=!!(nt(c,Ld)&&A),q=I.useMemo(()=>{var P,ee;if(M||H||!(nt(c,v4)&&S.some(ye=>ye.type==="edit")))return!1;switch(k){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((P=D==null?void 0:D.listItems)==null?void 0:P.fields.length)===1?(ee=D==null?void 0:D.listItems)==null?void 0:ee.fields.some(ye=>ye.externalResourceId):!1;default:return!1}},[D,k,c,S,t,M,H]),oe=I.useCallback((P=!1)=>{const ee=P?z3:X3;r&&v&&f&&i(ss({id:v,email:r,conversationId:f,externalResourceId:A})).unwrap().then(ye=>{const z={...Wd(ye,_,P,!0),sm_ids:g};l(ee,z)}).catch(ye=>{const z={...Wd(ye,_,P,!1),sm_ids:g};l(ee,z)})},[i,r,v,_,l,f,A,g]);I.useEffect(()=>{E&&oe(!0)},[E,oe]);const te=(P,ee)=>{var z;P==null||P.stopPropagation(),i(ss({id:ee,email:r,conversationId:f,isRefresh:!0,externalResourceId:A})).unwrap().then(()=>{l(k3,{id:ee})});const ye=P.target.tagName==="BUTTON"?(z=P.target)==null?void 0:z.firstChild:P.target;ye.className&&(ye.className=""),setTimeout(()=>ye.className="selected",1)},V=(P,ee)=>{P.stopPropagation(),!(n!=null&&n[ee])&&!J&&oe(),l(E?F3:O3,{id:ee}),m(ye=>!ye)},W=P=>{P.stopPropagation();const ee=P.currentTarget.offsetWidth<P.currentTarget.scrollWidth;p(!!ee)},R=P=>{var ye,z;P.stopPropagation(),l(Sd,{card_title:_,connector_name:Y,ug_id:y,sm_ids:g});let ee;k==="flat"?ee=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:k==="flat_with_list"&&(ee=(z=(ye=D==null?void 0:D.listItems)==null?void 0:ye.fields[0])==null?void 0:z.externalResourceId),ee?i(lo({...t,externalResourceId:ee})):Se({message:vn,type:qe})},X=P=>{P.stopPropagation(),x(!0)},$=()=>{w(!0)},ae=()=>{w(!1)},ie=[{id:"unlink",label:Md,disabled:J,shown:G,iconSrc:ew,action:P=>X(P)},{id:"refresh",label:kd,disabled:J,shown:!0,iconSrc:gp,action:P=>te(P,v)},{id:"edit",label:Pd,disabled:J,shown:q,iconSrc:tw,action:P=>R(P)}];return d.jsxs(S5,{"data-testid":`test_${v}`,onMouseEnter:$,onMouseLeave:ae,children:[d.jsxs(A5,{className:E?"hiver-card-expanded":"",onClick:P=>V(P,N),children:[d.jsxs(T5,{children:[L&&d.jsx("img",{src:L,alt:_}),d.jsx(u.Tooltip,{title:h?_:"",placement:"bottom",children:d.jsx(L5,{variant:"body_sm_regular",onMouseOver:P=>W(P),onMouseLeave:P=>W(P),children:_})})]}),d.jsxs(Ud,{children:[d.jsx(mw,{actions:ie,isHovered:C}),d.jsx(u.Tooltip,{title:E?Dd:Qi,placement:"bottom",children:d.jsx(Ur,{onClick:P=>V(P,N),children:d.jsx(sc,{className:E?"":"hiver-up"})})})]})]}),d.jsx(dp,{id:N,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:E}),d.jsx(gw,{showUnlinkModal:b,setShowUnlinkModal:x,cardId:v,onCardUnlinking:a,conversationId:f,externalResourceId:A,connectorName:Y})]})},yw=Number.MAX_SAFE_INTEGER,xw=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=I.useContext(He),i=nt(s,I4)?yw:1;return d.jsx(u.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:f,externalResourceId:g}=c;let y=f;return g&&(y=`${y}_${g}`),d.jsx("div",{children:d.jsx(bw,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},y)})})},uo=({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 In({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}uo.CaseView=In;const Cw="Bring your favourite tools into Hiver",Ew="Plugin image",vw="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",ww="Enable Connectors",Iw="Enable Apps",_w="Enable Cards",Sw="Learn more",Aw="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",Tw="Contact your admin to enable this",Lw="https://youtu.be/ODcJnzZLb50",Ow="connectors-module/assets/connectors-images/connector-mainpage.png",Fw="connectors-module/assets/connectors-images/connector-mainpage-apps.png",kw="Explore connectors",Dw="Connectors",Nw=u.styled(u.Box)`
|
|
1259
1272
|
padding-top: 20px;
|
|
1260
|
-
`,
|
|
1273
|
+
`,Rw=u.styled(u.Stack)`
|
|
1261
1274
|
width: 100%;
|
|
1262
1275
|
height: 97px;
|
|
1263
1276
|
background-color: ${u.theme.palette.purple.light};
|
|
@@ -1273,17 +1286,17 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1273
1286
|
height: 56px;
|
|
1274
1287
|
width: 102px;
|
|
1275
1288
|
}
|
|
1276
|
-
`,
|
|
1289
|
+
`,Mw=u.styled(u.Typography)`
|
|
1277
1290
|
color: ${u.theme.palette.gray.gray1};
|
|
1278
1291
|
height: 54px;
|
|
1279
1292
|
width: 120px;
|
|
1280
1293
|
line-height: 18px;
|
|
1281
|
-
`,
|
|
1294
|
+
`,Pw=u.styled(u.Link)`
|
|
1282
1295
|
display: block;
|
|
1283
1296
|
width: 100%;
|
|
1284
1297
|
margin-bottom: 20px;
|
|
1285
1298
|
margin-top: 12px;
|
|
1286
|
-
`,
|
|
1299
|
+
`,jw=u.styled(u.Typography)`
|
|
1287
1300
|
color: ${u.theme.palette.gray.gray1};
|
|
1288
1301
|
font-size: 13px;
|
|
1289
1302
|
margin-bottom: 24px;
|
|
@@ -1297,17 +1310,17 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1297
1310
|
background-color: #e3dfff;
|
|
1298
1311
|
border: 1px solid ${u.theme.palette.purple.primary};
|
|
1299
1312
|
}
|
|
1300
|
-
`,
|
|
1313
|
+
`,Bw=u.styled(u.Stack)`
|
|
1301
1314
|
margin-top: 16px;
|
|
1302
1315
|
justify-content: center;
|
|
1303
1316
|
align-items: center;
|
|
1304
1317
|
gap: 8px;
|
|
1305
|
-
`,
|
|
1318
|
+
`,Vw=u.styled(u.icons.InfoOutlined)`
|
|
1306
1319
|
width: 18px;
|
|
1307
1320
|
color: ${u.theme.palette.gray.gray3};
|
|
1308
|
-
`,
|
|
1321
|
+
`,Gw=u.styled(u.Typography)`
|
|
1309
1322
|
color: ${u.theme.palette.gray.gray3};
|
|
1310
|
-
`,
|
|
1323
|
+
`,Hw="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",Ww={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:Zw}=Ww,wp=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o,connectorId:s}=I.useContext(He),a=nt(r,C4),i=nt(r,zs),c=y=>{y.stopPropagation(),n(T3),s?o==null||o.redirectToAdmin(s,{isEdit:!0,tabIndex:2}):o==null||o.redirectToAdmin()},l=y=>{y.stopPropagation(),n(L3),window.open(Aw,"_blank")},f=()=>{n(U3,{source:"main_tab"})},g=i?Fw:Ow;return d.jsxs(Nw,{"data-testid":"noConnectors",children:[a?d.jsxs(d.Fragment,{children:[t?null:d.jsx(u.Typography,{variant:"h2",children:i?$i:Dw}),d.jsx(Pw,{onClick:f,href:Lw,target:"_blank",children:d.jsx(_8,{src:Zw+g,alt:kw,aspectRatio:"1000/783"})})]}):d.jsxs(Rw,{children:[d.jsx(Mw,{variant:"body1_medium",children:Cw}),d.jsx("img",{src:Hw,alt:Ew})]}),d.jsx(jw,{variant:"body2",children:vw}),e?d.jsx(vp,{endIcon:d.jsx(u.icons.ArrowForward,{}),onClick:c,...a&&{size:"medium"},children:s?_w:i?Iw:ww}):d.jsxs(d.Fragment,{children:[d.jsx(vp,{onClick:l,children:Sw}),d.jsxs(Bw,{direction:"row",children:[d.jsx(Vw,{}),d.jsx(Gw,{variant:"caption",children:Tw})]})]})]})},Xw=()=>{const{availableFeatures:e}=I.useContext(He),t=nt(e,zs),{connectorName:n,connectorId:r,isReady:o}=Jd();return o?d.jsxs($d,{children:[d.jsx(u.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:n&&r?d.jsx(Js,{variant:"body_sm_medium",children:n}):d.jsxs(d.Fragment,{children:[t?d.jsx(Yd,{width:"20px",height:"20px"}):d.jsx(Qd,{}),d.jsx(Js,{variant:"body_sm_medium",children:t?$i:Nd})]})}),d.jsxs(u.Stack,{gap:"12px",children:[d.jsx(jn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),d.jsx(jn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),d.jsx(jn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]}):null},zw=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=I.useContext(He),[o,s]=I.useState(!1),a=I.useRef(null),[i,c]=I.useState(0),{templateUpdates:l}=e||{},{sections:f=[],actionButtons:g=[],title:y}=l||{},{version:E=""}=l||{},m=X4(E),h=I.useMemo(()=>Z4(E),[E]),p=I.useMemo(()=>(g==null?void 0:g.filter(({isAdminPanelLink:w})=>!(!n&&w)))??[],[g,n]);if(I.useEffect(()=>{!h&&l&&tc(E,!0)},[h,E,l]),I.useLayoutEffect(()=>{var w;(w=a.current)!=null&&w.scrollHeight&&c(a.current.scrollHeight)},[a]),I.useEffect(()=>{l&&!m&&t(N3,{update_version_id:E})},[]),!l||m)return null;const b=w=>{var v;w.stopPropagation(),s(_=>!_),(v=a.current)!=null&&v.scrollHeight&&c(a.current.scrollHeight),tc(E,!1,!0)},x=(w,v="",_=!1,A=!1)=>{var S;if(w.stopPropagation(),_&&A?t(R3,{update_version_id:E}):A&&t(M3,{update_version_id:E}),!_&&v){(S=window.open(v,"_blank"))==null||S.focus();return}C(w,!1),r==null||r.redirectToAdmin()},C=(w,v=!0)=>{w.stopPropagation(),tc(E,!1),s(!1),v&&t(P3,{update_version_id:E})};return d.jsxs(X5,{children:[d.jsxs(z5,{children:[d.jsx(Z5,{variant:"h3",children:y}),d.jsxs(u.Box,{children:[o?d.jsx(u.Tooltip,{title:D4,placement:"bottom",children:d.jsx(u.IconButton,{onClick:C,children:d.jsx(u.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,d.jsx(u.Tooltip,{title:o?k4:Qi,placement:"bottom",children:d.jsx(Ur,{onClick:b,children:d.jsx(sc,{className:o?"":"hiver-up"})})})]})]}),d.jsx(Y5,{className:o?"slideDown":"slideUp",ref:a,height:i,children:d.jsxs(J5,{children:[f.map(({title:w,items:v,type:_})=>d.jsxs(K5,{children:[d.jsx(u.Typography,{variant:"body2_medium",children:w}),v.map(A=>{const S=_===B4,{deeplink:L,textHtml:N,imageUrl:D}=A,k=()=>d.jsx(D5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:N}});return d.jsx(q5,{component:"ul",children:d.jsxs(Q5,{component:S?"li":"div",marginLeft:D?"0":"14px",children:[D?d.jsx("img",{src:D}):null,L?d.jsx(e0,{target:"_blank",underline:"none",onClick:M=>x(M,L),fontSize:"13px",children:k()}):k()]})},N)})]},w)),d.jsx(u.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:p.map(({text:w,link:v,isAdminPanelLink:_})=>d.jsx($5,{variant:_?"contained":"text",children:d.jsx(U5,{variant:"caption",onClick:A=>x(A,v,_,!0),children:w})},w))})]})})]})},Yw=({selectedEmail:e,conversationId:t})=>Ee({url:YE.replace(":conversationId",""+t),method:Oe.PATCH,data:{selectedEmail:e}}),Jw="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",Ip=e=>{const t=I.useRef(null),[n,r]=I.useState(!1);return I.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},qw=e=>{const{textRef:t,isOverflow:n}=Ip(e.data.label);return d.jsx(u.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:d.jsx(eb,{ref:t,variant:"body_sm_regular",paddingTop:n?"5px":"0px",children:e.data.label})})},Qw=e=>d.jsxs(fn.MenuList,{...e,children:[d.jsx(tb,{children:d.jsx(u.Typography,{variant:"body_sm_medium",children:Ab})}),e.children]}),$w=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=Ip(e.data.label);return d.jsx(fn.Option,{...e,children:d.jsxs(u.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[d.jsx(u.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:d.jsx(nb,{ref:n,className:"dropdown-item-text",variant:"body_sm_regular",children:e.data.label})}),t?d.jsx("img",{src:Jw,width:"14px",height:"14px"}):null]})})},Uw=e=>d.jsx(fn.ValueContainer,{...e,children:d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"4px",children:[d.jsx(u.icons.AccountCircle,{sx:{height:"20px",width:"20px",color:u.theme.palette.gray.gray3,flexShrink:0}}),d.jsx(u.Stack,{direction:"row",alignItems:"center",sx:{flex:1,minWidth:0,overflow:"hidden"},children:e.children})]})}),Kw=e=>d.jsx(fn.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?d.jsx(u.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:u.theme.palette.gray.gray3}}):d.jsx(u.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:u.theme.palette.gray.gray3}})}),eI={control:(e,t)=>({...e,border:`1px solid ${t.isFocused?u.theme.palette.gray.gray3:u.theme.palette.gray.gray5}`,borderRadius:"8px",boxShadow:t.isFocused?`0 0 0 1px ${u.theme.palette.gray.gray3}`:"none",backgroundColor:u.theme.palette.gray.gray7,cursor:"pointer","& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:u.theme.palette.gray.white,color:u.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?u.theme.palette.gray.gray7:u.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"})},tI=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=I.useContext(He),a=t?Object.entries(t).map(([c])=>({value:c,label:c})):e?[{value:e,label:e}]:[];I.useEffect(()=>{if(!e&&!r&&t&&Object.keys(t).length>0){const c=Object.keys(t)[0];c&&o(c)}},[t,o,e,r]);const i=c=>{const l=String((c==null?void 0:c.value)||"");l&&s&&Yw({selectedEmail:l,conversationId:s}),o(l)};return d.jsx(u.Tooltip,{title:"Selected email",placement:"top",children:d.jsx("div",{style:{marginTop:"12px"},children:d.jsx(ts,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...ts.getDefaultComponents(),MenuList:Qw,Option:$w,SingleValue:qw,DropdownIndicator:Kw,ValueContainer:Uw},root:n,styles:eI,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})})})};u.styled(u.Paper)`
|
|
1311
1324
|
width: stretch;
|
|
1312
1325
|
height: 100%;
|
|
1313
1326
|
position: absolute;
|
|
@@ -1317,7 +1330,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1317
1330
|
padding: 20px 14px;
|
|
1318
1331
|
box-sizing: border-box;
|
|
1319
1332
|
overflow: hidden;
|
|
1320
|
-
`;const
|
|
1333
|
+
`;const nI=u.styled(u.Paper)`
|
|
1321
1334
|
width: stretch;
|
|
1322
1335
|
height: 100%;
|
|
1323
1336
|
top: 0px;
|
|
@@ -1325,17 +1338,17 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1325
1338
|
padding: 0;
|
|
1326
1339
|
box-sizing: border-box;
|
|
1327
1340
|
overflow: hidden;
|
|
1328
|
-
`,
|
|
1341
|
+
`,rI=u.styled("img")`
|
|
1329
1342
|
height: 16px;
|
|
1330
1343
|
width: 16px;
|
|
1331
|
-
`,
|
|
1344
|
+
`,oI=u.styled(u.Box)`
|
|
1332
1345
|
margin-top: 12px;
|
|
1333
1346
|
height: 100%;
|
|
1334
|
-
`,
|
|
1347
|
+
`,sI="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",ll=({children:e,rightNode:t,title:n="Back",backButtonTooltip:r,onClose:o})=>d.jsxs(nI,{children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[d.jsxs(u.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[d.jsx(u.Tooltip,{title:r,placement:"bottom",children:d.jsx(u.IconButton,{onClick:o,children:d.jsx(rI,{src:sI})})}),d.jsx(u.Typography,{children:n})]}),d.jsx(u.Stack,{direction:"row",alignItems:"center",children:t})]}),d.jsx(oI,{children:e})]}),_p=e=>e.common.previewCardData,Sp=e=>e.common.previewCardApiStatus,aI=e=>e.common.selectedSuggestionType,iI=u.styled(u.Stack)`
|
|
1335
1348
|
width: 100%;
|
|
1336
1349
|
border-radius: 8px;
|
|
1337
1350
|
border: 1px solid ${u.theme.palette.gray.gray5};
|
|
1338
|
-
`,
|
|
1351
|
+
`,cI=u.styled(u.Stack)`
|
|
1339
1352
|
padding: 11px;
|
|
1340
1353
|
height: 46px;
|
|
1341
1354
|
background: ${u.theme.palette.gray.gray6};
|
|
@@ -1345,7 +1358,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1345
1358
|
white-space: nowrap;
|
|
1346
1359
|
overflow: hidden;
|
|
1347
1360
|
}
|
|
1348
|
-
`,
|
|
1361
|
+
`,lI=u.styled(u.Button)`
|
|
1349
1362
|
&:hover {
|
|
1350
1363
|
background-color: #e3e9ff !important;
|
|
1351
1364
|
color: ${u.theme.palette.purple.primary} !important;
|
|
@@ -1353,7 +1366,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1353
1366
|
}
|
|
1354
1367
|
margin-top: 10px;
|
|
1355
1368
|
display: block;
|
|
1356
|
-
`,
|
|
1369
|
+
`,uI=u.styled(u.Stack)`
|
|
1357
1370
|
flex-direction: row;
|
|
1358
1371
|
flex-grow: 1;
|
|
1359
1372
|
align-items: center;
|
|
@@ -1364,7 +1377,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1364
1377
|
height: 20px;
|
|
1365
1378
|
flex-shrink: 0;
|
|
1366
1379
|
}
|
|
1367
|
-
`,Ap=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=Qt(),[s,a]=I.useState(!1),[i,c]=I.useState(!0),{id:l="",cardTitle:f="",logoUrl:g}=e||{},y=t===K.LOADING,E=h=>{h.stopPropagation();const p=h.currentTarget.offsetWidth<h.currentTarget.scrollWidth;a(!!p)},m=h=>{var b;o(co({id:n,args:r,isRefresh:!0}));const p=h.target.tagName==="BUTTON"?(b=h.target)==null?void 0:b.firstChild:h.target;p.className&&(p.className=""),setTimeout(()=>p.className="selected",1)};return d.jsxs(nI,{children:[d.jsxs(rI,{direction:"row",justifyContent:"space-between",children:[y?d.jsxs(u.Stack,{gap:"6px",direction:"row",children:[d.jsx(jn,{width:"16px",height:"24px"}),d.jsx(jn,{width:"100px",height:"24px"})]}):d.jsxs(sI,{children:[g&&d.jsx("img",{src:g,alt:f}),d.jsx(u.Tooltip,{title:s?f:"",children:d.jsx(u.Typography,{variant:"h4",onMouseOver:h=>E(h),onMouseLeave:h=>E(h),children:f})})]}),d.jsxs(u.Stack,{direction:"row",alignItems:"center",children:[i?d.jsx(u.Tooltip,{title:kd,placement:"bottom",children:d.jsx(Ur,{onClick:h=>m(h),children:d.jsx("img",{src:gp})})}):null,d.jsx(u.Tooltip,{title:i?Dd:Qi,placement:"bottom",children:d.jsx(Ur,{onClick:()=>c(h=>!h),children:d.jsx(sc,{className:i?"":"hiver-up"})})})]})]}),d.jsx(dp,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},Tp={values:{},errors:{}},wt={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"},aI=(e,t)=>{const{type:n,payload:r}=t;switch(n){case wt.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 wt.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 wt.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case wt.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case wt.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 wt.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 wt.RESET_STATE:return Tp}return e},Lp=()=>I.useReducer(aI,Tp),Op=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(E,m)=>{t({type:wt.SET_FIELD_VALUE,payload:{value:{value:m,name:E}}})},a=I.useCallback(E=>{t({type:wt.SET_FORM_DEFAULTS,payload:{values:E}})},[t]),i=I.useCallback(()=>Object.keys(o).filter(m=>!!o[m]).length>0,[o]),c=E=>{E.stopPropagation();const{name:m,value:h}=(E==null?void 0:E.target)||{};s(m,h)},l=(E,m)=>{E.stopPropagation();const{name:h}=(E==null?void 0:E.target)||{};s(h,m)},f=(E,m)=>{s(E,m||"")},g=(E,m)=>{e.errors[E]!==m&&t({type:wt.SET_FIELD_ERROR,payload:{value:{name:E,value:m}}})},y=(E,m)=>{if(m){const h=m[E];h==null||h.forEach(p=>{var b;s(p,""),m[p]&&y(p,m),(b=n[p])!=null&&b.isRequired&&g(p,!0)})}};return I.useEffect(()=>{if(Array.isArray(r))return()=>{const E=r.map(m=>m.name);t({type:wt.CLEAR_FIELDS,payload:{fieldNames:E}})}},[r,t]),{setValue:s,setFormDefaults:a,isErrorInValidations:i,inputChangeHandler:c,checkboxChangeHandler:l,dateChangeHandler:f,handleValidationError:g,clearDependentFields:y}},Fp=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const a=s.interfaceDetails,i={loadOptions:(c,l,f,g)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const E=RE(n,y==null?void 0:y.args),m=Object.values((y==null?void 0:y.args)||{});if(E.length===m.length){r(Ir({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:y==null?void 0:y.id,pagination:y==null?void 0:y.pagination,callback:l,args:{...ns(n,y==null?void 0:y.args),...ns(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:g}));return}return l([])}};return{...o,[s.name]:i}},{}),kp=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,a)=>{if(!a.createOptionInterfaceDetails)return s;const i=a.createOptionInterfaceDetails;return{...s,[a.name]:{createOption:(c,l)=>{var g,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(Ra({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...ns(n,(g=a==null?void 0:a.interfaceDetails)==null?void 0:g.args),...ns(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...ns(f,i.args)}}))}}}},{}),Dp=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=Qt(),s=I.useMemo(()=>{if(e&&e.length){const i=Fp({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=Fp({formFields:g,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=I.useMemo(()=>{const i=kp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=kp({formFields:g,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[f.name]:{createOptionList:y}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},iI=async({formId:e})=>{try{const t=await Ee({url:rt(K1,{formId:e}),method:Oe.GET}),n=t==null?void 0:t.data;return n.enabled?of(n.defaults):{}}catch(t){throw console.error(t),t}},Np=({formId:e})=>["Global","WriteForm","FormDefaults",e],cI=({formId:e,enabled:t})=>{const n=I.useRef(!1),r=I.useRef(void 0);e&&e!==r.current&&(n.current=!0,r.current=e);const o=Zt({queryKey:Np({formId:e}),queryFn:async()=>{const s=await iI({formId:e});return n.current=!1,s},refetchOnMount:!0,enabled:n.current&&t,staleTime:0});return{enabledRef:n,...o}},Rp=e=>Array.isArray(e)&&e.length>0,lI=async({formId:e,conversationId:t,inboxIds:n})=>{try{const r=new URLSearchParams;if(t&&r.set("conversation_id",String(t)),Rp(n))for(const a of n)r.append("inbox_id",String(a));const o=await Ee({url:rt(rv,{formId:e})+"?"+r.toString(),method:Oe.GET}),s=o==null?void 0:o.data;if(!s.enabled)throw new Error("Form default values are not enabled");return of(s.defaults,!0)}catch(r){throw console.error(r),r}},Mp=({formId:e,conversationId:t,inboxIds:n})=>["Global","WriteForm","FormDefaults",e,t,n],Pp=({formId:e,conversationId:t,inboxIds:n,enabled:r,fetchOnMount:o=!0})=>{const s=I.useRef(!0),a=Zt({queryKey:Mp({formId:e,conversationId:t,inboxIds:n}),queryFn:async()=>{const c=await lI({formId:e,conversationId:t,inboxIds:n});return s.current=!1,c},refetchOnMount:o,enabled:s.current&&!!e&&!!t&&Rp(n)&&r,staleTime:0}),i=I.useMemo(()=>{if(Object.keys(a.data??{}).length===0&&a.isSuccess)return!0},[a.data,a.isSuccess]);return{enabledRef:s,isNudgeRequired:i,...a}},uI=async({formId:e,data:t})=>{try{return await Ee({url:rt(K1,{formId:e}),data:{defaults:t},method:Oe.PUT}),{formId:e,data:t}}catch(n){throw console.error(n),n}},dI=({formId:e,conversationId:t,inboxIds:n,onSuccess:r,onError:o})=>{const s=Zr();return Xt({mutationFn:a=>uI({formId:e,data:a}),onSuccess:a=>{s.invalidateQueries({queryKey:Np({formId:e})}),s.invalidateQueries({queryKey:Mp({formId:e,conversationId:t,inboxIds:n})}),r==null||r(a),Se({message:"Form defaults updated successfully",type:Ut})},onError:()=>{o==null||o(),Se({message:"Failed to update form defaults",type:qe})}})},fI=({open:e,isEdit:t,formId:n,fields:r,connectorLogo:o,variables:s,customFormArgsEnabled:a,customFormArgsMap:i,title:c="Map fields",isLoading:l=!1,onSuccess:f,onClose:g})=>{const[y,E]=I.useState({}),{conversationId:m,currentSmIds:h}=I.useContext(He),{data:p}=E6({formId:n,formData:y,argsMap:i??{},enabled:!!n&&!!a,delay:500}),{data:b,isLoading:C,enabledRef:x}=cI({formId:n,enabled:!t&&!!e&&!!n}),{mutate:w,isPending:v}=dI({formId:n,conversationId:m,inboxIds:h,onSuccess:N=>{x.current=!0,f==null||f(N)}}),_=I.useMemo(()=>p!=null&&p.length?[...r,...p]:r,[r,p]);I.useEffect(()=>{b&&E(b)},[b]);const A=N=>{const D=_.map(M=>({name:M.name,type:M.isMultiSelect?"multi-select":M.type})),k=N6(N,D);w(k)},S=async({args:N,pagination:D},{formId:k,fieldName:M})=>{const B=await Q1({formId:k,fieldName:M},{pagination:D,args:N}),Y=Array.isArray(B==null?void 0:B.data.data)?B.data.data:[];return{options:Y,hasMore:!!Y.length}},L=N=>{const D=tf(N.value)?N.value.value:N.value,k=D&&N.type==="multi-select"?[D]:D;E(M=>({...M,[N.name]:k}))};return d.jsx(NE,{open:e,defaultValues:b,formId:n,fields:_,connectorLogo:o,variables:s,title:c,isLoading:l||C,isSaving:v,fetchOptions:S,onSave:A,onClose:()=>g==null?void 0:g(),onCancel:()=>g==null?void 0:g(),onFieldChange:L})},pI=async({formId:e,args:t})=>{try{const n=await Ee({url:rt(nv,{formId:e}),data:{args:t},method:Oe.POST});return(n==null?void 0:n.data).fieldList.map(o=>cl(o))}catch(n){throw console.error(n),n}},hI=({formId:e,args:t,enabled:n,delay:r=500})=>{const[o,s]=I.useState(t);return I.useEffect(()=>{const a=setTimeout(()=>s(t),r);return()=>clearTimeout(a)},[t,r]),Zt({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>pI({formId:e,args:t}),refetchOnMount:!1,enabled:n})},jp="connector-agent_auto_fill_nudge",gI=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 275 81",fill:"none","aria-hidden":"true",...e},T.createElement("defs",null,T.createElement("filter",{id:"autofillCardShadow",x:"-30%",y:"-30%",width:"160%",height:"160%"},T.createElement("feDropShadow",{dx:0,dy:1,stdDeviation:2,floodColor:"#000",floodOpacity:.08})),T.createElement("linearGradient",{id:"autofillHoneycomb",x1:0,y1:0,x2:1,y2:1,gradientUnits:"objectBoundingBox"},T.createElement("stop",{offset:0,stopColor:"#FFD54F"}),T.createElement("stop",{offset:1,stopColor:"#FFB300"}))),T.createElement("g",{transform:"translate(14 10) rotate(-2.75 44 29)",filter:"url(#autofillCardShadow)"},T.createElement("rect",{width:88,height:56,rx:6,fill:"#fff",stroke:"#EEE",strokeWidth:.75}),T.createElement("circle",{cx:14,cy:6,r:8,fill:"#fff",stroke:"#EEE",strokeWidth:.6}),T.createElement("path",{d:"M10.5 6l2.2 2.5L15.5 4",stroke:"#506DFF",strokeWidth:1.1,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("rect",{x:10,y:18,width:68,height:14,rx:7,fill:"#fff",stroke:"#D1D8FA",strokeWidth:.5}),T.createElement("text",{x:14,y:27.5,fill:"#334155",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:600},"Source field 1"),T.createElement("rect",{x:10,y:36,width:68,height:14,rx:7,fill:"#fff",stroke:"#F5F5F5",strokeWidth:.5}),T.createElement("text",{x:14,y:45.5,fill:"#6F7C90",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:500},"Source field 2")),T.createElement("path",{d:"M108 40H175",stroke:"#9CA3AF",strokeWidth:.9,strokeDasharray:"3 3",strokeLinecap:"round"}),T.createElement("circle",{cx:142,cy:40,r:9,fill:"#fff",stroke:"#E5E7EB",strokeWidth:.75}),T.createElement("path",{d:"M137.5 40h9M135 40l2.5-2M135 40l2.5 2M149.5 40l-2.5-2M149.5 40l-2.5 2",stroke:"#506DFF",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("g",{transform:"translate(186 18)",filter:"url(#autofillCardShadow)"},T.createElement("rect",{width:72,height:46,rx:5,fill:"#fff",stroke:"#EEE",strokeWidth:.75}),T.createElement("circle",{cx:12,cy:5,r:7,fill:"#fff",stroke:"#EEE",strokeWidth:.6}),T.createElement("circle",{cx:12,cy:5,r:4,fill:"url(#autofillHoneycomb)"}),T.createElement("rect",{x:8,y:16,width:56,height:13,rx:6.5,fill:"#fff",stroke:"#D1D8FA",strokeWidth:.5}),T.createElement("text",{x:12,y:24.5,fill:"#334155",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:600},"Target field"))),mI=u.styled(u.Stack)`
|
|
1380
|
+
`,Ap=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=Qt(),[s,a]=I.useState(!1),[i,c]=I.useState(!0),{id:l="",cardTitle:f="",logoUrl:g}=e||{},y=t===K.LOADING,E=h=>{h.stopPropagation();const p=h.currentTarget.offsetWidth<h.currentTarget.scrollWidth;a(!!p)},m=h=>{var b;o(co({id:n,args:r,isRefresh:!0}));const p=h.target.tagName==="BUTTON"?(b=h.target)==null?void 0:b.firstChild:h.target;p.className&&(p.className=""),setTimeout(()=>p.className="selected",1)};return d.jsxs(iI,{children:[d.jsxs(cI,{direction:"row",justifyContent:"space-between",children:[y?d.jsxs(u.Stack,{gap:"6px",direction:"row",children:[d.jsx(jn,{width:"16px",height:"24px"}),d.jsx(jn,{width:"100px",height:"24px"})]}):d.jsxs(uI,{children:[g&&d.jsx("img",{src:g,alt:f}),d.jsx(u.Tooltip,{title:s?f:"",children:d.jsx(u.Typography,{variant:"h4",onMouseOver:h=>E(h),onMouseLeave:h=>E(h),children:f})})]}),d.jsxs(u.Stack,{direction:"row",alignItems:"center",children:[i?d.jsx(u.Tooltip,{title:kd,placement:"bottom",children:d.jsx(Ur,{onClick:h=>m(h),children:d.jsx("img",{src:gp})})}):null,d.jsx(u.Tooltip,{title:i?Dd:Qi,placement:"bottom",children:d.jsx(Ur,{onClick:()=>c(h=>!h),children:d.jsx(sc,{className:i?"":"hiver-up"})})})]})]}),d.jsx(dp,{id:l,cardTitle:f,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},Tp={values:{},errors:{}},wt={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"},dI=(e,t)=>{const{type:n,payload:r}=t;switch(n){case wt.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 wt.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 wt.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case wt.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case wt.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 wt.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 wt.RESET_STATE:return Tp}return e},Lp=()=>I.useReducer(dI,Tp),Op=({state:e,dispatch:t,validations:n,dynamicFields:r})=>{const o=e.errors,s=(E,m)=>{t({type:wt.SET_FIELD_VALUE,payload:{value:{value:m,name:E}}})},a=I.useCallback(E=>{t({type:wt.SET_FORM_DEFAULTS,payload:{values:E}})},[t]),i=I.useCallback(()=>Object.keys(o).filter(m=>!!o[m]).length>0,[o]),c=E=>{E.stopPropagation();const{name:m,value:h}=(E==null?void 0:E.target)||{};s(m,h)},l=(E,m)=>{E.stopPropagation();const{name:h}=(E==null?void 0:E.target)||{};s(h,m)},f=(E,m)=>{s(E,m||"")},g=(E,m)=>{e.errors[E]!==m&&t({type:wt.SET_FIELD_ERROR,payload:{value:{name:E,value:m}}})},y=(E,m)=>{if(m){const h=m[E];h==null||h.forEach(p=>{var b;s(p,""),m[p]&&y(p,m),(b=n[p])!=null&&b.isRequired&&g(p,!0)})}};return I.useEffect(()=>{if(Array.isArray(r))return()=>{const E=r.map(m=>m.name);t({type:wt.CLEAR_FIELDS,payload:{fieldNames:E}})}},[r,t]),{setValue:s,setFormDefaults:a,isErrorInValidations:i,inputChangeHandler:c,checkboxChangeHandler:l,dateChangeHandler:f,handleValidationError:g,clearDependentFields:y}},Fp=({formFields:e,formId:t,formState:n,appDispatch:r})=>e.reduce((o,s)=>{if(s.type!=="async-select"||!s.interfaceDetails)return o;const a=s.interfaceDetails,i={loadOptions:(c,l,f,g)=>{let y=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!f&&(y=s.searchInterfaceDetails);const E=VE(n,y==null?void 0:y.args),m=Object.values((y==null?void 0:y.args)||{});if(E.length===m.length){r(Ir({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:y==null?void 0:y.id,pagination:y==null?void 0:y.pagination,callback:l,args:{...rs(n,y==null?void 0:y.args),...rs(n,y==null?void 0:y.optionalArgs)},isScrollToBottomEvent:f,controller:g}));return}return l([])}};return{...o,[s.name]:i}},{}),kp=({formFields:e,formId:t,formState:n,conversationId:r,appDispatch:o})=>e.reduce((s,a)=>{if(!a.createOptionInterfaceDetails)return s;const i=a.createOptionInterfaceDetails;return{...s,[a.name]:{createOption:(c,l)=>{var g,y;if(!c)return;const f={values:{name:a.name,value:c},errors:{}};o(Ra({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...rs(n,(g=a==null?void 0:a.interfaceDetails)==null?void 0:g.args),...rs(n,(y=a==null?void 0:a.interfaceDetails)==null?void 0:y.optionalArgs)},createArgs:{...rs(f,i.args)}}))}}}},{}),Dp=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=Qt(),s=I.useMemo(()=>{if(e&&e.length){const i=Fp({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=Fp({formFields:g,formId:n,formState:t,appDispatch:o});return{...l,[f.name]:{loadOptionsList:y}}},i)}return null},[e,t,n,o]),a=I.useMemo(()=>{const i=kp({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,f)=>{const g=f.columns;if(!g)return l;const y=kp({formFields:g,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[f.name]:{createOptionList:y}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},fI=async({formId:e})=>{try{const t=await Ee({url:rt(K1,{formId:e}),method:Oe.GET}),n=t==null?void 0:t.data;return n.enabled?of(n.defaults):{}}catch(t){throw console.error(t),t}},Np=({formId:e})=>["Global","WriteForm","FormDefaults",e],pI=({formId:e,enabled:t})=>{const n=I.useRef(!1),r=I.useRef(void 0);e&&e!==r.current&&(n.current=!0,r.current=e);const o=Zt({queryKey:Np({formId:e}),queryFn:async()=>{const s=await fI({formId:e});return n.current=!1,s},refetchOnMount:!0,enabled:n.current&&t,staleTime:0});return{enabledRef:n,...o}},Rp=e=>Array.isArray(e)&&e.length>0,hI=async({formId:e,conversationId:t,inboxIds:n})=>{try{const r=new URLSearchParams;if(t&&r.set("conversation_id",String(t)),Rp(n))for(const a of n)r.append("inbox_id",String(a));const o=await Ee({url:rt(cv,{formId:e})+"?"+r.toString(),method:Oe.GET}),s=o==null?void 0:o.data;if(!s.enabled)throw new Error("Form default values are not enabled");return of(s.defaults,!0)}catch(r){throw console.error(r),r}},Mp=({formId:e,conversationId:t,inboxIds:n})=>["Global","WriteForm","FormDefaults",e,t,n],Pp=({formId:e,conversationId:t,inboxIds:n,enabled:r,fetchOnMount:o=!0})=>{const s=I.useRef(!0),a=Zt({queryKey:Mp({formId:e,conversationId:t,inboxIds:n}),queryFn:async()=>{const c=await hI({formId:e,conversationId:t,inboxIds:n});return s.current=!1,c},refetchOnMount:o,enabled:s.current&&!!e&&!!t&&Rp(n)&&r,staleTime:0}),i=I.useMemo(()=>{if(Object.keys(a.data??{}).length===0&&a.isSuccess)return!0},[a.data,a.isSuccess]);return{enabledRef:s,isNudgeRequired:i,...a}},gI=async({formId:e,data:t})=>{try{return await Ee({url:rt(K1,{formId:e}),data:{defaults:t},method:Oe.PUT}),{formId:e,data:t}}catch(n){throw console.error(n),n}},mI=({formId:e,conversationId:t,inboxIds:n,onSuccess:r,onError:o})=>{const s=Zr();return Xt({mutationFn:a=>gI({formId:e,data:a}),onSuccess:a=>{s.invalidateQueries({queryKey:Np({formId:e})}),s.invalidateQueries({queryKey:Mp({formId:e,conversationId:t,inboxIds:n})}),r==null||r(a),Se({message:"Form defaults updated successfully",type:Ut})},onError:()=>{o==null||o(),Se({message:"Failed to update form defaults",type:qe})}})},bI=({open:e,isEdit:t,formId:n,fields:r,connectorLogo:o,variables:s,customFormArgsEnabled:a,customFormArgsMap:i,title:c="Map fields",isLoading:l=!1,onSuccess:f,onClose:g})=>{const[y,E]=I.useState({}),{conversationId:m,currentSmIds:h}=I.useContext(He),{data:p}=v6({formId:n,formData:y,argsMap:i??{},enabled:!!n&&!!a,delay:500}),{data:b,isLoading:x,enabledRef:C}=pI({formId:n,enabled:!t&&!!e&&!!n}),{mutate:w,isPending:v}=mI({formId:n,conversationId:m,inboxIds:h,onSuccess:N=>{C.current=!0,f==null||f(N)}}),_=I.useMemo(()=>p!=null&&p.length?[...r,...p]:r,[r,p]);I.useEffect(()=>{b&&E(b)},[b]);const A=N=>{const D=_.map(M=>({name:M.name,type:M.isMultiSelect?"multi-select":M.type})),k=R6(N,D);w(k)},S=async({args:N,pagination:D},{formId:k,fieldName:M})=>{const B=await Q1({formId:k,fieldName:M},{pagination:D,args:N}),Y=Array.isArray(B==null?void 0:B.data.data)?B.data.data:[];return{options:Y,hasMore:!!Y.length}},L=N=>{const D=tf(N.value)?N.value.value:N.value,k=D&&N.type==="multi-select"?[D]:D;E(M=>({...M,[N.name]:k}))};return d.jsx(RE,{open:e,defaultValues:b,formId:n,fields:_,connectorLogo:o,variables:s,title:c,isLoading:l||x,isSaving:v,fetchOptions:S,onSave:A,onClose:()=>g==null?void 0:g(),onCancel:()=>g==null?void 0:g(),onFieldChange:L})},yI=async({formId:e,args:t})=>{try{const n=await Ee({url:rt(iv,{formId:e}),data:{args:t},method:Oe.POST});return(n==null?void 0:n.data).fieldList.map(o=>cl(o))}catch(n){throw console.error(n),n}},xI=({formId:e,args:t,enabled:n,delay:r=500})=>{const[o,s]=I.useState(t);return I.useEffect(()=>{const a=setTimeout(()=>s(t),r);return()=>clearTimeout(a)},[t,r]),Zt({queryKey:["Global","WriteForm","CustomFields",e,o],queryFn:()=>yI({formId:e,args:t}),refetchOnMount:!1,enabled:n})},jp="connector-agent_auto_fill_nudge",CI=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 275 81",fill:"none","aria-hidden":"true",...e},T.createElement("defs",null,T.createElement("filter",{id:"autofillCardShadow",x:"-30%",y:"-30%",width:"160%",height:"160%"},T.createElement("feDropShadow",{dx:0,dy:1,stdDeviation:2,floodColor:"#000",floodOpacity:.08})),T.createElement("linearGradient",{id:"autofillHoneycomb",x1:0,y1:0,x2:1,y2:1,gradientUnits:"objectBoundingBox"},T.createElement("stop",{offset:0,stopColor:"#FFD54F"}),T.createElement("stop",{offset:1,stopColor:"#FFB300"}))),T.createElement("g",{transform:"translate(14 10) rotate(-2.75 44 29)",filter:"url(#autofillCardShadow)"},T.createElement("rect",{width:88,height:56,rx:6,fill:"#fff",stroke:"#EEE",strokeWidth:.75}),T.createElement("circle",{cx:14,cy:6,r:8,fill:"#fff",stroke:"#EEE",strokeWidth:.6}),T.createElement("path",{d:"M10.5 6l2.2 2.5L15.5 4",stroke:"#506DFF",strokeWidth:1.1,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("rect",{x:10,y:18,width:68,height:14,rx:7,fill:"#fff",stroke:"#D1D8FA",strokeWidth:.5}),T.createElement("text",{x:14,y:27.5,fill:"#334155",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:600},"Source field 1"),T.createElement("rect",{x:10,y:36,width:68,height:14,rx:7,fill:"#fff",stroke:"#F5F5F5",strokeWidth:.5}),T.createElement("text",{x:14,y:45.5,fill:"#6F7C90",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:500},"Source field 2")),T.createElement("path",{d:"M108 40H175",stroke:"#9CA3AF",strokeWidth:.9,strokeDasharray:"3 3",strokeLinecap:"round"}),T.createElement("circle",{cx:142,cy:40,r:9,fill:"#fff",stroke:"#E5E7EB",strokeWidth:.75}),T.createElement("path",{d:"M137.5 40h9M135 40l2.5-2M135 40l2.5 2M149.5 40l-2.5-2M149.5 40l-2.5 2",stroke:"#506DFF",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),T.createElement("g",{transform:"translate(186 18)",filter:"url(#autofillCardShadow)"},T.createElement("rect",{width:72,height:46,rx:5,fill:"#fff",stroke:"#EEE",strokeWidth:.75}),T.createElement("circle",{cx:12,cy:5,r:7,fill:"#fff",stroke:"#EEE",strokeWidth:.6}),T.createElement("circle",{cx:12,cy:5,r:4,fill:"url(#autofillHoneycomb)"}),T.createElement("rect",{x:8,y:16,width:56,height:13,rx:6.5,fill:"#fff",stroke:"#D1D8FA",strokeWidth:.5}),T.createElement("text",{x:12,y:24.5,fill:"#334155",fontFamily:"system-ui, -apple-system, sans-serif",fontSize:5.5,fontWeight:600},"Target field"))),EI=u.styled(u.Stack)`
|
|
1368
1381
|
gap: 12px;
|
|
1369
1382
|
align-items: stretch;
|
|
1370
1383
|
background-color: #f3f8ff;
|
|
@@ -1373,7 +1386,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1373
1386
|
padding: 8px;
|
|
1374
1387
|
padding-bottom: 12px;
|
|
1375
1388
|
margin-bottom: 20px;
|
|
1376
|
-
`,
|
|
1389
|
+
`,vI=u.styled(u.Box)`
|
|
1377
1390
|
display: flex;
|
|
1378
1391
|
align-items: center;
|
|
1379
1392
|
justify-content: center;
|
|
@@ -1389,20 +1402,20 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1389
1402
|
height: 100%;
|
|
1390
1403
|
object-fit: cover;
|
|
1391
1404
|
}
|
|
1392
|
-
`,
|
|
1405
|
+
`,wI=u.styled(u.Stack)`
|
|
1393
1406
|
gap: 16px;
|
|
1394
1407
|
align-items: flex-start;
|
|
1395
1408
|
width: 100%;
|
|
1396
|
-
`,
|
|
1409
|
+
`,II=u.styled(u.Stack)`
|
|
1397
1410
|
gap: 2px;
|
|
1398
1411
|
align-items: flex-start;
|
|
1399
1412
|
width: 100%;
|
|
1400
|
-
`,
|
|
1413
|
+
`,_I=u.styled(u.Stack)`
|
|
1401
1414
|
flex-direction: row;
|
|
1402
1415
|
gap: 12px;
|
|
1403
1416
|
align-items: center;
|
|
1404
|
-
`,
|
|
1405
|
-
`).map((s,a)=>d.jsx(u.Typography,{variant:"body2",children:s},a))}),d.jsx(u.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>d.jsx(u.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),Vp="connector-agent-expanded-write-form",Gp=({metaData:e,isEdit:t=!1,defaultOption:n,mapFormOpen:r,onClose:o,onCreateSuccess:s,setMetaData:a,setMapFormOpen:i,setCreateFormId:c,syncCurrentObject:l})=>{var Vr,Gr;const{userGroupId:f}=Pt()||{},[g,y]=I.useState(null),[E,m]=I.useState(!1),[h,p]=I.useState(!1),b=I.useRef(null),{conversationId:
|
|
1417
|
+
`,SI=({onPrimaryClick:e})=>{const[t,n]=I.useState(()=>Yo().getItem(jp)==="true");if(t)return null;const r=()=>{Yo().setItem(jp,"true"),n(!0)};return d.jsxs(EI,{children:[d.jsx(vI,{children:d.jsx(CI,{style:{backgroundColor:"#FFDD57"}})}),d.jsxs(wI,{children:[d.jsxs(II,{children:[d.jsx(u.Typography,{variant:"body2",sx:{fontWeight:600,color:u.theme.palette.gray.black,lineHeight:"18px"},children:"Autofill data with Map fields"}),d.jsx(u.Typography,{variant:"caption",color:u.theme.palette.gray.gray3,sx:{letterSpacing:"0.2px",lineHeight:"16px"},children:"Now you can configure what data to auto fill these fields"})]}),d.jsxs(_I,{children:[d.jsx(u.Button,{size:"small",onClick:e,children:"Checkout"}),d.jsx(u.Button,{variant:"text",size:"small",sx:{color:u.theme.palette.gray.gray2},onClick:r,children:"Dismiss"})]})]})]})},Bp=({setShown:e,shown:t,title:n,description:r,buttons:o})=>d.jsx(_r,{shown:t,setShown:e,showCloseButton:!0,children:d.jsxs(u.Stack,{width:"400px",padding:"20px",children:[d.jsx(u.Typography,{variant:"h2",marginBottom:"8px",children:n}),d.jsx(u.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
|
|
1418
|
+
`).map((s,a)=>d.jsx(u.Typography,{variant:"body2",children:s},a))}),d.jsx(u.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>d.jsx(u.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),Vp="connector-agent-expanded-write-form",Gp=({metaData:e,isEdit:t=!1,defaultOption:n,mapFormOpen:r,onClose:o,onCreateSuccess:s,setMetaData:a,setMapFormOpen:i,setCreateFormId:c,syncCurrentObject:l})=>{var Vr,Gr;const{userGroupId:f}=Pt()||{},[g,y]=I.useState(null),[E,m]=I.useState(!1),[h,p]=I.useState(!1),b=I.useRef(null),{conversationId:x,availableFeatures:C,sendTrackingEvent:w,currentSmIds:v,connectorFunctions:{redirectToAdmin:_,getFormElement:A,toggleFormElement:S},stackingContext:L,isAdmin:N,variables:D}=I.useContext(He),[k,M]=Lp(),B=Ie(yp),Y=Ie(t?rw:mp),J=Ie(sw),H=Ie(ow),G=Ie(cw),q=Ie(lw),oe=Ie(uw),te=Ie(dw),V=Ie(fw),W=Ie(xp),R=H==null?void 0:H[(g==null?void 0:g.value)??""];l==null||l(R);const X=nt(C,O4),$=(R==null?void 0:R.hasCustomFields)??!1,{customFieldsArgsPresent:ae,customFieldsArgs:ie}=I.useMemo(()=>{if(!$)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const fe=Object.values((R==null?void 0:R.customFieldsArgs)??{}).every(lt=>!!k.values[lt]);if(!fe)return{customFieldsArgsPresent:!1,customFieldsArgs:{}};const he=(R==null?void 0:R.customFieldsArgs)??{},$e=os(k,he);return{customFieldsArgsPresent:fe,customFieldsArgs:$e}},[$,k,R==null?void 0:R.customFieldsArgs]),P=$&&ae&&X,{data:ee}=xI({formId:String(g==null?void 0:g.value),args:ie,enabled:P}),ye=I.useMemo(()=>P?ee??[]:[],[P,ee]),z=R==null?void 0:R.expandedView,{formConfigs:Ae,formViewConfigs:Ge}=I.useMemo(()=>{if(g&&"value"in g&&J&&J[g.value]&&Array.isArray(J[g.value])){const he=[...J[g.value],...ye],$e=[{id:g.value,formFields:he}];return{formConfigs:$e,formViewConfigs:z?GE(he,rp):$e}}const fe=[{id:"emptyFormId",formFields:[]}];return{formConfigs:fe,formViewConfigs:fe}},[J,ye,g,z]),We=(Vr=Ae[0])==null?void 0:Vr.formFields,rn=I.useMemo(()=>(We??[]).filter(he=>!he.isFieldCustom),[We]),yn=I.useMemo(()=>{var he;const fe=((he=Ae==null?void 0:Ae[0])==null?void 0:he.formFields)||[];return il({formFields:fe})},[Ae]),{setValue:et,setFormDefaults:ct,inputChangeHandler:Qe,checkboxChangeHandler:Rr,dateChangeHandler:Bt,clearDependentFields:Kn,handleValidationError:er,isErrorInValidations:tr}=Op({state:k,dispatch:M,validations:yn,dynamicFields:ye}),nr=Ae[0].id!=="emptyFormId"?Ae[0].id:g==null?void 0:g.value,{data:mt,isNudgeRequired:Tn,enabledRef:Mr}=Pp({formId:nr,conversationId:x,inboxIds:v,enabled:!t});I.useEffect(()=>{mt&&ct(mt)},[mt,ct]),I.useEffect(()=>{g&&(c==null||c(g.value))},[g,c]);const{userGroupId:Ln}=Pt()||{},{fetchConfig:Vt,createConfig:ds}=Dp({formFields:Ae[0].formFields,formId:Ae[0].id,formState:k,conversationId:x}),Gt=(Gr=B==null?void 0:B.forms.find(fe=>fe.type==="edit"))==null?void 0:Gr.id,{externalResourceId:rr}=B??{},On=[q,oe,V].includes(K.LOADING),_o=I.useMemo(()=>!z||!A?null:A(),[z,A]),Ht=Qt();I.useEffect(()=>(z&&S&&S(!0),()=>{z&&S&&S(!1)}),[z,S]),I.useEffect(()=>{Ht(sp(t?!(te&&"values"in te&&"values"in k&&Ep(k.values,te.values)):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,te,k,Ht]),I.useEffect(()=>(t&&te&&M({type:wt.SET_FIELDS,payload:te}),()=>{M({type:wt.SET_FIELDS,payload:{values:{}}})}),[t,M,te]),I.useEffect(()=>{g!==null&&a(fe=>({...fe,object_type:g.label}))},[g,a]),I.useEffect(()=>{if(k.values){const fe=q1(Ae[0].formFields,k.values);a(he=>({...he,fields_filled:fe}))}},[k,Ae,a]),I.useEffect(()=>{if(n&&!t)return y(n);Y&&Y.length&&y(t&&Gt?Y.find(fe=>fe.value===Gt)??null:fe=>fe||!H?fe:Y.length===1?Y[0]:Y.find($e=>!H[$e.value].expandedView)??null)},[Y,H,t,Gt,n]);const So=()=>{y(b.current),m(!1),M({type:wt.RESET_STATE})},or=(fe,he)=>{et(fe,he)},sr=(fe,he,$e)=>{if(he.action==="clear"&&he.name&&(et(he.name,""),g!=null&&g.value&&Kn(he.name,G==null?void 0:G[g.value]),yn[he.name].isRequired&&er(he.name,!0)),fe&&typeof fe=="object"&&"label"in fe&&typeof fe.label=="string"&&"value"in fe&&(typeof fe.value=="string"||typeof fe.value=="number")&&typeof he.name<"u")if(he.name==="form-object"){if(b.current={value:fe.value,label:fe.label},k.values&&fe.value!==(g==null?void 0:g.value)){const lt=Object.values(k.values).filter(St=>St!=="").length;(Object.values(mt??{}).filter(St=>!!St).length>0?!Ep(k.values,mt):lt>0)?m(!0):So()}}else{let lt=!1;$e&&(lt=$e.isMultiSelect||!1);const Rt=!lt&&"prefillValues"in fe&&fe.prefillValues,sn=lt?[{value:fe.value,label:fe.label}]:{value:fe.value,label:fe.label};if(et(he.name,sn),Rt)for(const St in Rt)et(St,Rt[St]);g!=null&&g.value&&Kn(he.name,G==null?void 0:G[g.value])}},on=()=>{if(!tr()&&Gt&&(H!=null&&H[Gt])&&x&&rr){const{connectorName:fe,title:he}=B;w(q3,{connector_name:fe,card_title:he,sm_ids:v,ug_id:Ln});const $e=H[Gt].interfaceDetails;if(!$e||!te)return;const{id:lt,args:Rt={},previousArgs:sn={}}=$e,St=os(te,sn),O=os(k,Rt);Ht(ja({formId:String(Gt),conversationId:x,args:O,previousArgs:St,externalResourceId:rr,interfaceId:lt,successCallback:()=>{s()}})).unwrap().then(()=>{var ve;w($3,{connector_name:fe,card_title:he,sm_ids:v,ug_id:Ln});const Z=((ve=Ae[0].formFields)==null?void 0:ve.filter(we=>we.isFieldCustom))??[],Q=Z.length>0,ne=Z.some(we=>k.values[we.name]);w(p4,{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:Q,custom_fields_used:ne})}).finally(()=>{Ht(lo(null))})}},ar=()=>{if(!tr()&&g&&(H!=null&&H[g.value])&&x){const fe=H==null?void 0:H[g.value].interfaceDetails;if(!fe)return;const{id:he,args:$e={}}=fe,lt=os(k,$e);Ht(Pa({formId:String(g.value),conversationId:x,args:lt,interfaceId:he,successCallback:()=>{s()}})).unwrap().then(()=>{var Q;w(V3,{object_type:g});const Rt=((Q=Ae[0].formFields)==null?void 0:Q.filter(ne=>ne.isFieldCustom))??[],sn=Rt.length>0,St=Rt.some(ne=>k.values[ne.name]),Z=Object.entries(mt??{}).filter(([ne,ve])=>{if(k.values[ne]===ve)return!0}).map(([ne])=>ne);w(f4,{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:sn,custom_fields_used:St,...Z.length?{fields_with_defaults_used:Z.join(",")}:{}})})}},Pr=[{label:"Cancel",action:()=>m(!1),variant:"text"},{label:"Continue",action:So}],Ao=()=>{_(R==null?void 0:R.connectorId,{isEdit:!0,tabIndex:2,editCard:(R==null?void 0:R.cardId)??""}),w(d4,{sm_ids:v,ug_id:f,connector_name:R==null?void 0:R.connectorName,form_object:R==null?void 0:R.name})},fs=({data:fe})=>{Mr.current=!0,i==null||i(!1);const{fields_configured_count:he,has_system_variable:$e}=M6(fe);w(b4,{app_name:R==null?void 0:R.connectorName,object_type:R==null?void 0:R.name,fields_configured_count:he,has_system_variable:$e})},jr=N&&X&&(R==null?void 0:R.cardAccessMode)==="read_write",ps=!h&&(v==null?void 0:v.length)>1&&Object.keys(mt??{}).length>0,Br=d.jsxs(Xp,{className:z?Vp:"",children:[i&&d.jsx(bI,{open:r??!1,isEdit:t,fields:rn,variables:D??[],title:(R==null?void 0:R.name)||"Map Fields",connectorLogo:(R==null?void 0:R.logoUrl)??"",formId:nr,customFormArgsEnabled:(R==null?void 0:R.hasCustomFields)??!1,customFormArgsMap:(R==null?void 0:R.customFieldsArgs)??void 0,onSuccess:fs,onClose:()=>i==null?void 0:i(!1)}),Tn?d.jsx(SI,{onPrimaryClick:()=>{i==null||i(!0)}}):null,d.jsx(Bp,{shown:E,setShown:m,title:Cv,description:Ev,buttons:Pr}),z?d.jsxs(TI,{children:[d.jsxs(u.Typography,{variant:"body_sm_medium",children:[t?"Edit":"Add"," to ",R.connectorName]}),d.jsx(u.Tooltip,{title:"Close Popup",placement:"bottom",children:d.jsx(u.IconButton,{onClick:o,children:d.jsx(LI,{src:up})})})]}):null,d.jsxs(Zp,{spacing:3,children:[!t&&!z?d.jsx(wr,{type:"select",placeholder:np,options:Y,value:g,name:"form-object",selectChangeHandler:sr,label:Iv,labelSpacing:.5,validation:{isRequired:!0}}):null,d.jsx(H1,{showGlobalLoader:V===K.LOADING,formConfig:Ge,selectChangeHandler:sr,inputChangeHandler:Qe,checkboxChangeHandler:Rr,dateChangeHandler:Bt,tableChangeHandler:or,onValidationError:er,fieldsSpacing:3,labelSpacing:.5,fetchConfig:Vt,createConfig:ds,values:k.values,validations:yn,...z?{cols:rp,stackIndex:L.expandedForm}:null}),jr?d.jsx(u.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:d.jsx(u.Button,{variant:"text",startIcon:d.jsx(OI,{}),onClick:Ao,size:"small",children:W4})}):null]}),ps?d.jsxs(AI,{children:[d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray1,children:Fv}),d.jsx(u.IconButton,{onClick:()=>p(!0),children:d.jsx(u.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})]}):null,d.jsxs(Wp,{children:[d.jsx(u.Button,{disabled:tr()||On||!W,onClick:t?on:ar,size:"small",...z?{style:{order:2}}:null,children:t?R4:N4}),d.jsx(zp,{variant:"outlined",color:"tertiary",size:"small",onClick:o,disabled:On,children:Ui})]})]});return z&&_o?je.createPortal(Br,_o):Br},Hp=e=>T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},T.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),AI=u.styled(u.Stack)`
|
|
1406
1419
|
box-sizing: border-box;
|
|
1407
1420
|
width: 100%;
|
|
1408
1421
|
flex-flow: row nowrap;
|
|
@@ -1462,7 +1475,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1462
1475
|
color: ${u.theme.palette.purple.primary} !important;
|
|
1463
1476
|
border: 1px solid ${u.theme.palette.purple.primary} !important;
|
|
1464
1477
|
}
|
|
1465
|
-
`,
|
|
1478
|
+
`,TI=u.styled(u.Stack)`
|
|
1466
1479
|
box-sizing: border-box;
|
|
1467
1480
|
flex-flow: row nowrap;
|
|
1468
1481
|
justify-content: space-between;
|
|
@@ -1474,7 +1487,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1474
1487
|
background-color: var(--form-background-color, inherit);
|
|
1475
1488
|
padding-top: 20px;
|
|
1476
1489
|
padding-bottom: 10px;
|
|
1477
|
-
`,
|
|
1490
|
+
`,LI=u.styled("img")`
|
|
1478
1491
|
height: 16px;
|
|
1479
1492
|
width: 16px;
|
|
1480
1493
|
`;u.styled(u.Button)`
|
|
@@ -1482,12 +1495,12 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1482
1495
|
&:hover {
|
|
1483
1496
|
color: ${u.theme.palette.purple.primary};
|
|
1484
1497
|
}
|
|
1485
|
-
`;const
|
|
1498
|
+
`;const OI=u.styled(Hp)`
|
|
1486
1499
|
fill: ${u.theme.palette.purple.primary};
|
|
1487
1500
|
path {
|
|
1488
1501
|
fill: ${u.theme.palette.purple.primary} !important;
|
|
1489
1502
|
}
|
|
1490
|
-
`,
|
|
1503
|
+
`,FI=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=Qt(),r=Ie(_p),o=Ie(Sp),s=Ie(aw),a=Ie(bp),[i,c]=I.useState(!1),[l,f]=I.useState(null),[g,y]=I.useState(""),[E,m]=I.useState({}),{conversationId:h,sendTrackingEvent:p,email:b}=I.useContext(He);I.useEffect(()=>{a&&a.length&&f(a[0])},[a]);const x={externalResourceId:g},C=o===K.LOADING,w=s===K.LOADING,v=()=>{!i&&l&&"value"in l&&(p(W3,{object_type:l.label}),n(co({id:String(l==null?void 0:l.value),args:x})).unwrap().catch(k=>{(k==null?void 0:k.status)===400?Se({message:tp,type:qe}):Se({message:pv,type:qe})})),c(k=>!k)},_=()=>{l&&"value"in l&&h&&n(Va({id:String(l.value),externalResourceId:g,conversationId:h,email:b})).unwrap().then(()=>{p(G3,{object_type:l.label,input_type:g}),Se({message:gv,type:Ut}),e(!1),t()}).catch(k=>{(k==null?void 0:k.status)===400?Se({message:tp,type:qe}):(k==null?void 0:k.status)===409?Se({message:hv,type:qe}):Se({message:mv,type:qe})})},A=()=>{e(!1),c(!1)},S=(k,M)=>{k&&typeof k=="object"&&"label"in k&&typeof k.label=="string"&&"value"in k&&(typeof k.value=="string"||typeof k.value=="number")&&typeof M.name<"u"&&(f({value:k.value,label:k.label}),y(""))},L=k=>{k.stopPropagation();const{value:M}=(k==null?void 0:k.target)||{};y(M),c(!1)},N=(k,M)=>{m(B=>({...B,[k]:!!M}))},D=()=>Object.keys(E).filter(M=>E[M]).length>0;return d.jsxs(Xp,{children:[d.jsxs(Zp,{spacing:3,children:[d.jsx(wr,{type:"select",placeholder:np,options:a,value:l,name:"form-object",selectChangeHandler:S,label:_v,labelSpacing:.5,validation:{isRequired:!0},onValidationError:N}),d.jsx(wr,{type:"text",placeholder:Sv,value:g,name:"resourceId",inputChangeHandler:L,label:Av,labelSpacing:.5,validation:{isRequired:!0,validate:D6()},onValidationError:N}),i?d.jsx(Ap,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:x}):null,d.jsx(lI,{fullWidth:!0,disabled:D()||C,color:"tertiary",variant:"outlined",size:"small",onClick:v,children:i?Sb:_b})]}),d.jsxs(Wp,{children:[d.jsx(u.Button,{onClick:_,disabled:D()||w,size:"small",children:Rd}),d.jsx(zp,{color:"tertiary",variant:"outlined",onClick:A,disabled:w,size:"small",children:Ui})]})]})},kI=({formId:e,enabled:t,conversationId:n,inboxIds:r,setMapFormOpen:o})=>{const{isSuccess:s}=Pp({formId:e,conversationId:n,inboxIds:r,enabled:t,fetchOnMount:!1});return s?d.jsx(u.Typography,{variant:"body2",color:"primary.main",fontSize:14,fontWeight:500,lineHeight:"20px",paddingRight:"8px",onClick:()=>o(),style:{cursor:"pointer"},children:Ov}):null},DI=u.styled(u.Button)`
|
|
1491
1504
|
&:hover {
|
|
1492
1505
|
background-color: #e3e9ff !important;
|
|
1493
1506
|
color: ${u.theme.palette.purple.primary} !important;
|
|
@@ -1501,14 +1514,14 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1501
1514
|
& .content__btn {
|
|
1502
1515
|
margin-left: 8px;
|
|
1503
1516
|
}
|
|
1504
|
-
`,
|
|
1517
|
+
`,NI=u.styled(u.Button)`
|
|
1505
1518
|
& path {
|
|
1506
1519
|
fill: #fff;
|
|
1507
1520
|
}
|
|
1508
1521
|
& .content__btn {
|
|
1509
1522
|
margin-left: 8px;
|
|
1510
1523
|
}
|
|
1511
|
-
`,
|
|
1524
|
+
`,RI=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"}))),MI=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"})),PI=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>d.jsxs(u.Stack,{gap:2,marginTop:"12px",children:[d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray1,children:xv}),d.jsxs(u.Stack,{gap:"12px",children:[n?d.jsxs(NI,{fullWidth:!0,onClick:e,size:"medium",children:[d.jsx(RI,{}),d.jsx("span",{className:"content__btn",children:Ki})]}):null,r?d.jsxs(DI,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[d.jsx(MI,{}),d.jsx("span",{className:"content__btn",children:jd})]}):null]})]}),jI=e=>e.write.searchObjectList,Yp=e=>e.write.objectDict,BI=e=>e.write.formFields,VI=e=>e.write.dependentFieldsMap,GI="Search in Connectors",HI="Search in Apps",WI="Start typing to search..",ZI="Smart search suggestions",XI=":count result:countSuffix found for :searchObject in :connectorName",zI="Back to search results",YI="No search results found",Jp=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"}))),JI=u.styled(u.Stack)`
|
|
1512
1525
|
flex-flow: row nowrap;
|
|
1513
1526
|
align-items: center;
|
|
1514
1527
|
column-gap: 12px;
|
|
@@ -1518,28 +1531,28 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1518
1531
|
&:hover {
|
|
1519
1532
|
background-color: ${({isSelected:e})=>e?"rgb(80, 109, 255, 0.12)":"rgba(0, 0, 0, 0.04)"};
|
|
1520
1533
|
}
|
|
1521
|
-
`,
|
|
1534
|
+
`,qI=u.styled("img")`
|
|
1522
1535
|
flex-shrink: 0;
|
|
1523
1536
|
display: block;
|
|
1524
1537
|
width: 24px;
|
|
1525
1538
|
height: 24px;
|
|
1526
1539
|
border-radius: 50%;
|
|
1527
|
-
`,qp=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=Qt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),{label:i,description:c,avatarUrl:l,connectorName:f}=e,g=()=>{s(
|
|
1540
|
+
`,qp=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=Qt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),{label:i,description:c,avatarUrl:l,connectorName:f}=e,g=()=>{s(n4,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:f}),r(e,t),o(ev(t))};return d.jsxs(JI,{isSelected:n,onClick:g,children:[d.jsx(qI,{src:l,alt:"option"}),d.jsxs(u.Stack,{children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray1,children:i}),d.jsx(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:"12px",children:c})]})]})},QI=u.styled(u.Stack)`
|
|
1528
1541
|
padding: 10px 0 10px 10px;
|
|
1529
|
-
`,{Control
|
|
1542
|
+
`,{Control:$I}=fn,UI=({children:e,...t})=>d.jsxs($I,{...t,children:[d.jsx(QI,{children:d.jsx(Jp,{})}),e]}),KI=e=>{const{data:t,isSelected:n,selectOption:r}=e;return d.jsx(qp,{data:t,isSelected:n,onSelect:r})},e_={control:(e,{isFocused:t})=>({...e,cursor:"pointer",boxShadow:"none",borderColor:t?"#196FE0 !important":"#D6DDE8",borderWidth:"1px"}),menu:e=>({...e,marginTop:0,padding:0,borderRadius:"4px",background:"#fff",boxShadow:"0px 3px 15px 0px rgba(0, 0, 0, 0.25)",zIndex:3}),input:e=>({...e,"& input":{opacity:"1 !important"}}),menuPortal:e=>({...e,zIndex:3})},t_=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:f,currentSmIds:g}=I.useContext(He),y=nt(l,zs),E=(p,{action:b})=>{b==="input-change"&&(s(p),p||a())},m=p=>{o(p),p||(s(""),a())},h=()=>{const p=[...new Set(e.map(b=>b.connectorName))];f(t4,{connector_names:p,sm_ids:g})};return d.jsx(ts,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:y?HI:GI,isSearchable:!0,filterOption:null,styles:e_,onInputChange:E,onChange:m,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:h,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:KI,Control:UI,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},n_=u.styled(u.Stack)`
|
|
1530
1543
|
margin: ${({isEmpty:e})=>e?"0":"12px 0"};
|
|
1531
|
-
`,
|
|
1544
|
+
`,r_=({objectId:e,searchString:t,fetchSearchResults:n})=>{var w;const[r,o]=Lp(),s=I.useRef(null),a=Ie(Yp),i=Ie(BI),c=Ie(VI),l=I.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),f=I.useMemo(()=>{const v=(l==null?void 0:l.formFields)||[];return il({formFields:v})},[l]),{setValue:g,inputChangeHandler:y,dateChangeHandler:E,clearDependentFields:m,handleValidationError:h,isErrorInValidations:p}=Op({state:r,dispatch:o,validations:f}),{fetchConfig:b}=Dp({formState:r,formFields:l.formFields,formId:l.id}),x=I.useCallback(v=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(v)},500)},[n]);I.useEffect(()=>{const v=r.values,_=l.id,A=l.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,k=os(r,D);x({id:_,interfaceId:N,searchString:t,connectorName:L,args:k})},[r,l,a,e,t,p,x]),I.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const C=(v,_,A)=>{if(_.action==="clear"&&_.name&&(g(_.name,""),m(_.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),m(_.name,c[e])}};return d.jsx(n_,{isEmpty:((w=l.formFields)==null?void 0:w.length)===0,children:d.jsx(H1,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:C,inputChangeHandler:y,dateChangeHandler:E,onValidationError:h,labelSpacing:.5,fetchConfig:b,values:r.values,validations:f})})},ul="@connector-agent-global-search-priority",dl=rf(),o_=({objectList:e})=>({sortedObjectList:I.useMemo(()=>{const r=dl.getItem(ul);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=dl.getItem(ul)??{};o[r]||(o[r]=0),o[r]++,dl.setItem(ul,o)}}),s_=u.styled(u.Stack)`
|
|
1532
1545
|
padding: 8px 0;
|
|
1533
|
-
`,
|
|
1546
|
+
`,a_=u.styled(u.Typography)`
|
|
1534
1547
|
padding: 6px 16px;
|
|
1535
1548
|
color: ${u.theme.palette.gray.gray4};
|
|
1536
1549
|
font-size: 13px;
|
|
1537
|
-
`,
|
|
1550
|
+
`,i_=u.styled(u.Typography)`
|
|
1538
1551
|
padding: 6px 16px;
|
|
1539
1552
|
color: ${u.theme.palette.gray.gray3};
|
|
1540
1553
|
font-size: 11px;
|
|
1541
1554
|
text-transform: uppercase;
|
|
1542
|
-
`,
|
|
1555
|
+
`,c_=({onSelect:e,selectedOption:t,options:n})=>n.length?d.jsxs(s_,{children:[d.jsx(a_,{children:WI}),d.jsx(i_,{children:ZI}),n.map(r=>d.jsx(qp,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null,l_=e=>new Promise(t=>setTimeout(t,e)),Qp=({apiFn:e,intervalMillis:t,maxRetries:n,increaseIntervalMillis:r=0,isSatisfied:o,pushIntermediateResults:s=()=>{}})=>(...i)=>{const c=async(l=0)=>{const f=await e(...i);if(s(f),o(f))return s(null),f;if(l>=n)throw f;return l++,t+=r,l_(t).then(()=>c(l))};return c()},u_=async({conversationId:e,senderEmail:t})=>{try{const n=await Ee({url:rt(HE,{conversationId:e}),params:{senderEmail:t},method:Oe.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},$p=({conversationId:e,senderEmail:t,enabled:n})=>Zt({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>u_({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),Up="/v1/api",d_=`${Up}/connectors/forms/:formId/search`,f_=`${Up}/connectors/conversation/:conversationId/smart-suggestions`,p_=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}},h_=Qp({apiFn:async({conversationId:e})=>{try{const t=await Ee({url:rt(f_,{conversationId:e}),method:Oe.GET}),n=t==null?void 0:t.data;return p_(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),g_=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=$p({conversationId:e,senderEmail:t,enabled:n});return Zt({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>h_({conversationId:e}),enabled:n&&r})},m_=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=I.useState(""),{conversationId:i,email:c,availableFeatures:l}=I.useContext(He),f=Ie(jI),g=Ie(Yp),y=nt(l,S4),{sortedObjectList:E,updatePriority:m}=o_({objectList:f}),{data:h}=g_({enabled:y&&!!i,conversationId:String(i),senderEmail:c}),p=(h==null?void 0:h.suggestedOptions)??[],b=I.useMemo(()=>!g||!E.length?[]:E.map(({value:C})=>{const w=g[C];return w?{description:`${w.connectorName??""} - ${w.searchObject}`,avatarUrl:w.logoUrl,label:"",value:C,connectorName:w.connectorName,objectName:w.searchObject}:null}).filter(C=>!!C),[E,g]),x=C=>{n(C),C&&m(""+C.value)};return b.length?d.jsxs(u.Stack,{children:[d.jsx(t_,{value:e,options:b.map(C=>({...C,label:s})),inputValue:s,root:t,onInputChange:a,onChange:x,onReset:o,NoOptionsMessage:({selectOption:C})=>d.jsx(c_,{selectedOption:e,onSelect:C,options:p}),menuOpen:!s&&!p.length?!1:void 0}),e?d.jsx(r_,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},b_="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",y_=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 Ee({url:`${XE.replace(":id",e)}?${s.toString()}`,method:Oe.POST,data:{externalResourceId:t,conversationId:n}})},x_=({onSuccess:e})=>Xt({mutationFn:y_,onSuccess:()=>{Se({message:Wy,type:Ut}),e==null||e()},onError:()=>{Se({message:Zy,type:qe})}}),C_="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",E_=u.styled(u.Stack)`
|
|
1543
1556
|
width: fit-content;
|
|
1544
1557
|
cursor: pointer;
|
|
1545
1558
|
gap: 8px;
|
|
@@ -1551,7 +1564,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1551
1564
|
letter-spacing: 0.4px;
|
|
1552
1565
|
text-align: center;
|
|
1553
1566
|
vertical-align: middle;
|
|
1554
|
-
`,
|
|
1567
|
+
`,v_=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=Qt(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:f}=I.useContext(He),g=Ie(_p),y=Ie(Sp),{mutate:E,isPending:m}=x_({onSuccess:s}),h=y===K.LOADING,p={externalResourceId:e};I.useEffect(()=>{a(co({id:t,args:{externalResourceId:e}}))},[e,t,a]);const b=()=>{l(i4,{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}),E({id:t,externalResourceId:e,conversationId:i,email:f})};return d.jsxs(u.Stack,{gap:"12px",marginTop:"12px",children:[d.jsxs(E_,{onClick:o,children:[d.jsx("img",{src:C_,width:"16px",height:"16px"}),d.jsx(u.Typography,{children:zI})]}),d.jsxs(u.Stack,{gap:"24px",children:[d.jsx(Ap,{cardData:g,cardDataApiStatus:y,objectToLink:t,args:p}),d.jsx(u.Stack,{alignItems:"flex-end",children:d.jsx(u.Button,{size:"small",disabled:h||m,onClick:b,children:Rd})})]})]})},Kp=u.styled(u.Stack)`
|
|
1555
1568
|
padding: 12px 12px 12px 11px;
|
|
1556
1569
|
border: 1px solid ${u.theme.palette.gray.gray5};
|
|
1557
1570
|
border-radius: 8px;
|
|
@@ -1567,10 +1580,10 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1567
1580
|
}
|
|
1568
1581
|
}
|
|
1569
1582
|
`};
|
|
1570
|
-
`,y_="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",C_=()=>d.jsxs(u.Box,{justifyItems:"center",marginTop:"40px",children:[d.jsx("img",{src:y_,width:124,height:107}),d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:HI})]}),x_=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=Qt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),[i,c]=I.useState(null),l=rt(VI,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(E,m)=>{s(s5,{search_keyword:t.label,search_result_label:m,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:E,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:m})},g=()=>{c(null),o(JE())},y=()=>{n(),r(),g()};return e.length?i?d.jsx(b_,{meta:i,onBack:g,onLink:y}):d.jsxs(u.Stack,{gap:"14px",marginTop:"12px",children:[d.jsx(u.Typography,{variant:"body2",children:l}),d.jsx(u.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:E,name:m,description:h})=>d.jsxs(Kp,{onClick:()=>f(E,m),direction:"row",children:[d.jsxs(u.Stack,{flexGrow:1,children:[d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray1,children:m}),d.jsx(u.Typography,{variant:"caption",color:u.theme.palette.gray.gray3,children:h})]}),d.jsx(u.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:d.jsx("img",{src:f_})})]},E))})]}):d.jsx(C_,{})},fl=u.styled(u.Skeleton)`
|
|
1583
|
+
`,w_="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",I_=()=>d.jsxs(u.Box,{justifyItems:"center",marginTop:"40px",children:[d.jsx("img",{src:w_,width:124,height:107}),d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:YI})]}),__=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=Qt(),{sendTrackingEvent:s,currentSmIds:a}=I.useContext(He),[i,c]=I.useState(null),l=rt(XI,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),f=(E,m)=>{s(a4,{search_keyword:t.label,search_result_label:m,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:E,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:m})},g=()=>{c(null),o(KE())},y=()=>{n(),r(),g()};return e.length?i?d.jsx(v_,{meta:i,onBack:g,onLink:y}):d.jsxs(u.Stack,{gap:"14px",marginTop:"12px",children:[d.jsx(u.Typography,{variant:"body2",children:l}),d.jsx(u.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:E,name:m,description:h})=>d.jsxs(Kp,{onClick:()=>f(E,m),direction:"row",children:[d.jsxs(u.Stack,{flexGrow:1,children:[d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray1,children:m}),d.jsx(u.Typography,{variant:"caption",color:u.theme.palette.gray.gray3,children:h})]}),d.jsx(u.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:d.jsx("img",{src:b_})})]},E))})]}):d.jsx(I_,{})},fl=u.styled(u.Skeleton)`
|
|
1571
1584
|
display: block;
|
|
1572
1585
|
margin: ${e=>e.margin?e.margin:0};
|
|
1573
|
-
`,E_=()=>d.jsxs(u.Stack,{marginTop:"12px",children:[d.jsx(fl,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),d.jsx(u.Stack,{gap:"17px",children:d.jsxs(Kp,{gap:"8px",disableHover:!0,children:[d.jsx(fl,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),d.jsx(fl,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let pl={};const hl=new Set,v_=(e,t)=>{pl={...pl,[e]:t},hl.forEach(n=>n())},w_=e=>(hl.add(e),()=>hl.delete(e)),I_=e=>I.useSyncExternalStore(w_,()=>pl)[e],__=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await Ee({url:a_.replace(":formId",e.toString()),method:Oe.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){Se({message:vn,type:qe}),console.error(r)}},S_=(e,t)=>Xt({mutationFn:__,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),gl={OPEN_FORM_VIEW:"connector-agent-open-form-view"},A_=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=I.useRef(!1),o=I.useRef(void 0),s=I.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=I.useCallback((c,l="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(l),r.current=!0},n)))},[s,n]),i=I.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return I.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},T_=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"})))),L_="/v1/api/connectors/lookup/bulk",O_="/v1/api/connectors/lookup/bulk",F_=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${L_}?${t.toString()}`,r=await Ee({url:n,method:Oe.GET});return r==null?void 0:r.data},k_=async e=>{const t=await Ee({url:O_,method:Oe.PUT,data:{entries:e}});return t==null?void 0:t.data},D_={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},N_={border:`1px solid ${u.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},e2={flex:1,height:"1px",backgroundColor:u.theme.palette.gray.gray6},R_={flexShrink:0,border:`1px solid ${u.theme.palette.gray.gray6}`,borderRadius:"15px"},M_={border:`1px solid ${u.theme.palette.gray.gray6}`,backgroundColor:u.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},P_=I.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=I.useCallback(c=>{o(p5,{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 d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[d.jsx(u.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:D_,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(g=>g.hiverParam===c))==null?void 0:f.label)??"";return d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[d.jsx(T_,{width:18,height:18}),d.jsx("span",{children:l})]})},children:(t.presets??[]).map(c=>d.jsx(u.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),d.jsx(u.Box,{sx:e2}),d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:R_,children:[t.logo&&d.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),d.jsxs(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),d.jsx(u.Box,{sx:e2}),d.jsx(u.Box,{sx:M_,children:d.jsx(u.Typography,{variant:"body2",fontSize:14,children:s})})]})}),j_=I.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=I.useContext(He),[a,i]=I.useState({});I.useEffect(()=>{if(t&&r.length>0){const m={};r.filter(h=>{var p;return((p=h.presets)==null?void 0:p.length)>1}).forEach(h=>{m[h.connectorId]=h.hiverParam}),i(m)}},[t,r]);const c=Zr(),{mutate:l,isPending:f}=Xt({mutationFn:k_,onSuccess:m=>{const h={};m.results.forEach(({connectorId:p,hiverParam:b})=>{h[p]=b}),c.setQueriesData({queryKey:["lookup","bulk"]},p=>p&&{...p,connectors:p.connectors.map(b=>h[b.connectorId]!==void 0?{...b,hiverParam:h[b.connectorId]}:b)}),s(h5,{page:"agent_connector_panel"}),Se({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{Se({message:"Failed to save identity mapping",type:"error"})}}),g=I.useCallback(()=>{const m=Object.entries(a).map(([h,p])=>({connector_id:h,hiver_param:p}));l(m)},[a,l]),y=I.useCallback((m,h)=>{i(p=>({...p,[m]:h}))},[]),E=I.useCallback(m=>{m||n()},[n]);return d.jsx(_r,{shown:t,setShown:E,showCloseButton:!1,children:d.jsxs(u.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[d.jsx(u.Typography,{variant:"h2",children:"Customer identity mapping"}),d.jsx(u.Typography,{variant:"body2",children:"Choose how Hiver should identify customers when fetching data from connected apps."}),r.some(m=>{var h;return((h=m.presets)==null?void 0:h.length)>1})&&d.jsx(u.Stack,{gap:"8px",sx:N_,children:r.filter(m=>{var h;return((h=m.presets)==null?void 0:h.length)>1}).map(m=>d.jsx(P_,{connector:m,selectedHiverParam:a[m.connectorId]??m.hiverParam,onChange:y,sendTrackingEvent:s},m.connectorId))}),d.jsxs(u.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[d.jsx(u.Button,{variant:"text",onClick:n,children:"Cancel"}),d.jsx(u.Button,{variant:"contained",onClick:g,disabled:f,children:"Save"})]})]})})}),B_=({enabled:e,...t})=>{const{actionQueue:n}=I.useContext(He);n&&e&&n.register(t),I.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},V_=({isAdmin:e=!1})=>{var bt,Fn;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s,connectorId:a}=I.useContext(He),i=Qt(),{userGroupId:c,userId:l}=Pt()||{},f=I.useRef(!1),g=I.useRef(null),y=I.useRef(null),E=I.useRef(null),[m,h]=I.useState({}),[p,b]=I.useState(!1),[C,x]=I.useState(!1),[w,v]=I.useState(!1),[_,A]=I.useState(!1),[S,L]=I.useState(),[N,D]=I.useState(!1),[k,M]=I.useState(null),[B,Y]=I.useState(),[J,H]=I.useState(null),[G,q]=I.useState(!1),[oe,te]=I.useState(!1),[V,W]=I.useState(!1),[R,X]=I.useState(!1),[$,ae]=I.useState(void 0),ie=I.useRef(),P=Ie(kv),ee=Ie(Dv),ye=Ie(Rv),z=Ie(Mv),Ae=Ie(jv),Ge=Ie(Nv),We=Ie(mp),rn=Ie($v),yn=Ie(bp),et=Ie(yp),ct=Ie(Cp),Qe=Ie(tI),Rr=nt(o,y5),Bt=nt(o,Ld),Kn=nt(o,I5),er=nt(o,S5),tr=nt(o,A5),nr=nt(o,T5),mt=(bt=Pt())==null?void 0:bt.tenantPlatform,Tn=nt(o,mt==="HIVERWEB"?`hot-${Od}`:Od),{data:Mr}=Zt({queryKey:["connectors","enabledAuthenticated"],queryFn:()=>$0(),enabled:Tn&&e}),Ln=I.useMemo(()=>(Mr??[]).map(se=>se.id),[Mr]),{data:Vt,isSuccess:us}=Zt({queryKey:["lookup","bulk",Ln.join(",")],queryFn:()=>F_(Ln),enabled:Ln.length>0&&Tn&&e,refetchOnMount:!1}),Gt=us&&((Vt==null?void 0:Vt.connectors)??[]).some(se=>{var me;return(((me=se.presets)==null?void 0:me.length)??0)>1});B_({conversationId:s,openCreateForm:()=>v(!0),enabled:ee});const rr=I.useMemo(()=>!P||!P.length?null:Hv(P,ye,z),[P,ye,z]),On=X5(ye),{data:_o,isLoading:Ht}=$p({senderEmail:t,conversationId:String(s),enabled:er&&!!t}),{emailHeaders:So,selectedEmail:or}=_o??{},{scrollOnceAfterLoad:sr,resetScrollState:on}=A_(y),ar=Ge!==K.LOADING&&(!z||!Object.values(z).some(se=>se===K.LOADING))&&P&&P.length>0;I.useLayoutEffect(()=>{var se;G&&!p&&oe&&((se=E==null?void 0:E.current)!=null&&se.scrollHeight)&&sr(!!ar,"smooth")},[G,p,oe,ar,sr,(Fn=E==null?void 0:E.current)==null?void 0:Fn.scrollHeight,l]);const Pr=(se,me)=>{r(n5,{search_keyword:se,sm_ids:n,connector_name:me,suggestion_type:Qe})},Ao=(se,me,st)=>{!Array.isArray(me)||!me.length?r(r5,{search_keyword:se,sm_ids:n,connector_name:st,suggestion_type:Qe}):me.length&&r(o5,{num_of_results:me.length,search_keyword:se,sm_ids:n,connector_name:st,suggestion_type:Qe})},{mutate:ds,reset:jr,data:fs,isPending:Br,isIdle:Vr}=S_(Pr,Ao),Gr=I.useCallback(()=>{jr(),M(null)},[jr,M]),fe=Zr(),he=I.useCallback(()=>{if(t&&n.length&&s){const se=i(Ha({inboxIds:n,conversationId:s,connectorId:a}));return()=>se.abort()}},[i,t,n,s,a]),$e=I.useCallback(()=>{fe.invalidateQueries({queryKey:["lookup","bulk"]}),he()},[fe,he]),lt=I.useCallback((se,me)=>{se&&s&&me&&i(Ga({id:se,channelType:"email",conversationId:s,externalResourceId:me,contactEmail:t})).unwrap().catch(()=>{i(lo(null))})},[i,s,t]);if(I.useEffect(()=>{(async()=>{l&&(q(await wi(l)),te(await vu(l)))})()},[l]),I.useEffect(()=>{Ht||Y(or||t)},[t,or,Ht]),I.useEffect(()=>{B&&s&&v_(String(s),B)},[B,s]),I.useEffect(()=>{oe&&l&&wu(l)},[oe,l]),I.useEffect(()=>{var se;if(et){x(!0);const{externalResourceId:me}=et,st=(se=et.forms.find(kn=>kn.type==="edit"))==null?void 0:se.id;lt(st,me)}else x(!1),i(Av())},[et,lt,i]),I.useEffect(()=>(he(),on(),()=>{i(hp.clearConnectorList())}),[i,he,on]),I.useEffect(()=>{if(Ae&&P&&P.length&&rr&&!f.current){const{cards_per_app:se,total_empty_cards:me,total_cards_with_errors:st}=rr;r(k3,{numOfCards:P.length,total_cards_loaded:P.length,total_empty_cards:me,total_cards_with_errors:st,cards_per_app:se,sm_ids:n}),f.current=!0}return()=>{f.current=!1}},[Ae,P,rr,r,n]),I.useEffect(()=>{if(s&&n&&n.length){const se=i(Ma({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:nr,connectorId:a}));return()=>se.abort()}},[i,n,s,nr,a]),I.useEffect(()=>{const se=me=>{var kn;if(!(me instanceof CustomEvent))return;const st=(kn=me.detail)==null?void 0:kn.connectorKey;h({connectorKey:st})};return window.addEventListener(gl.OPEN_FORM_VIEW,se),()=>{window.removeEventListener(gl.OPEN_FORM_VIEW,se)}},[]),I.useEffect(()=>{if(!(We!=null&&We.length)||!m.connectorKey)return;const se=m.connectorKey;h({});const me=We.find(st=>{var kn;return((kn=st.connectorKey)==null?void 0:kn.toLowerCase())===(se==null?void 0:se.toLowerCase())});me&&(H(me),v(!0))},[We,m]),!t.length||Ge===K.LOADING)return d.jsx(Vw,{});const Rt=se=>{r(P3,{connector_name:rn,source:se,sm_ids:n})},sn=se=>{v(!0),Rt(se)},St=()=>{A(!0),O(_d),Z(Ad),r(j3)},O=se=>{r(se,S),ct?D(!0):(v(!1),H(null))},Z=se=>{if(et){const{connectorName:me,title:st}=et;r(se,{connector_name:me,card_title:st,sm_ids:n,ug_id:c})}ct?D(!0):i(lo(null))},Q=()=>{v(!1),i(lo(null)),L(void 0),D(!1)},ne=()=>{he(),v(!1),x(!1),i(hp.clearConnectorList())},ve=[{label:"Go back",variant:"text",action:Q},{label:"Stay",variant:"contained",action:()=>D(!1)}],we=We.length>0,Ce=yn.length>0,xe=w||C||_,ut=()=>we||Ce?d.jsx(kI,{haveCreateObjects:we,haveLinkObjects:Ce,onCreateClick:()=>sn(Gd.MAIN_BUTTON),onLinkClick:()=>A(!0)}):d.jsx(wp,{isAdmin:e,hideHeading:!0}),Ze=()=>{W(!0);const se=ie.current,me=se==null?void 0:se.connectorName,st=se==null?void 0:se.name;r(g5,{entry_point:"agent",app_name:me,object_type:st})},Je=se=>{ie.current=se};return d.jsxs($d,{ref:g,"data-testid":Array.isArray(P)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:w||_,children:[d.jsx(Bp,{shown:N,setShown:D,title:bv,description:yv,buttons:ve}),d.jsx(I4,{onWheel:()=>b(!0),ref:E,children:ee?d.jsxs(d.Fragment,{children:[d.jsx(nb,{connectors:On,isWriteFlowEnabled:Bt,haveCreateObjects:we,haveLinkObjects:Ce,cards:P,handleCreateNewObject:()=>sn(Gd.ICON),handleLinkNewObject:St}),Kn&&!xe?d.jsx(d_,{selectedObject:k,setSelectedObject:M,fetchSearchResults:ds,onReset:Gr,root:g.current}):null,d.jsxs(uo,{children:[d.jsx(In,{condition:Kn&&Br,children:d.jsx(E_,{})},"search"),d.jsx(In,{condition:Kn&&!!k&&!Vr,children:d.jsx(x_,{searchResults:fs??[],selectedObject:k,onReset:Gr,fetchCards:he})},"results"),d.jsx(In,{condition:w,children:d.jsx(ll,{onClose:()=>O(_d),title:Ki,rightNode:d.jsx(AI,{formId:$,conversationId:s,inboxIds:n,enabled:w&&!!$,setMapFormOpen:Ze}),children:d.jsx(Gp,{onClose:()=>O(W3),onCreateSuccess:ne,metaData:S,setMetaData:L,defaultOption:J,connectors:On,mapFormOpen:V,setMapFormOpen:W,setCreateFormId:ae,syncCurrentObject:Je})})},"create-form"),d.jsx(In,{condition:C,children:d.jsx(ll,{onClose:()=>Z(Ad),title:P5,backButtonTooltip:"Back",children:d.jsx(Gp,{isEdit:!0,onClose:()=>Z(q3),onCreateSuccess:ne,metaData:S,setMetaData:L,connectors:On})})},"edit-form"),d.jsx(In,{condition:_,children:d.jsx(ll,{onClose:()=>A(!1),children:d.jsx(SI,{setOpenTaskLinking:A,onLinkingSuccess:he})})},"link-form"),d.jsxs(In,{fallback:!0,children:[er&&(P!=null&&P.length)?d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[d.jsx(u.Stack,{sx:{flex:1,minWidth:0},children:d.jsx(Qw,{emailHeaders:So,selectedEmail:B,root:g.current,isLoading:Ht,setSelectedEmail:Y})}),Tn&&Gt&&e&&d.jsx(u.Tooltip,{title:"Update customer identity mapping",placement:"top",children:d.jsx(u.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(Td,{page:"agent_connector_panel"}),X(!0)},children:d.jsx(u.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!er&&Tn&&Gt&&e&&(P!=null&&P.length)?d.jsx(u.Button,{fullWidth:!0,variant:"contained",startIcon:d.jsx(u.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(Td,{page:"agent_connector_panel"}),X(!0)},children:"Customer identity mapping"}):null,Rr?d.jsx(Gw,{}):null,d.jsxs(uo,{children:[d.jsxs(In,{condition:!!P&&P.length>0,children:[d.jsx(hw,{cards:P,specificCardData:ye,email:B??"",specificConnectorApiStatus:z,onCardUnlinking:he}),d.jsx("div",{ref:y,children:tr?d.jsx(r4,{connectors:On,expanded:G}):null})]},"cards-list"),d.jsx(In,{condition:!(P!=null&&P.length)&&Bt,children:ut()},"create-banner")]})]},"cards")]})]}):d.jsx(wp,{isAdmin:e})}),!ee&&d.jsx(g4,{}),Tn&&d.jsx(j_,{open:R,onClose:()=>X(!1),connectors:(Vt==null?void 0:Vt.connectors)??[],onSaveSuccess:$e})]})},G_=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:g=!1,actionQueue:y,store:E,connectorId:m,variables:h})=>{const p=I.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:l,stackingContext:f,actionQueue:y,store:E,connectorId:m,variables:h}),[s,n,r,t,o,a,i,c,g,l,f,y,E,m,h]);return d.jsx(He.Provider,{value:p,children:e})},ml=({children:e})=>{const[t]=I.useState(()=>new ch);return d.jsx(ph,{client:t,children:e})},H_=p0({cardList:Jv,write:Tv,common:QE}),bl=vy({reducer:H_,devTools:!0}),W_=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c,store:l,connectorId:f})=>d.jsx(uc,{store:bl,children:d.jsx(u.HiverProvider,{inter:!0,children:d.jsx(ml,{children:d.jsx(G_,{...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:l,connectorId:f,children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:e})})})})}),yl=u.styled(u.Box)`
|
|
1586
|
+
`,S_=()=>d.jsxs(u.Stack,{marginTop:"12px",children:[d.jsx(fl,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),d.jsx(u.Stack,{gap:"17px",children:d.jsxs(Kp,{gap:"8px",disableHover:!0,children:[d.jsx(fl,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),d.jsx(fl,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]});let pl={};const hl=new Set,A_=(e,t)=>{pl={...pl,[e]:t},hl.forEach(n=>n())},T_=e=>(hl.add(e),()=>hl.delete(e)),L_=e=>I.useSyncExternalStore(T_,()=>pl)[e],O_=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await Ee({url:d_.replace(":formId",e.toString()),method:Oe.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){Se({message:vn,type:qe}),console.error(r)}},F_=(e,t)=>Xt({mutationFn:O_,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),gl={OPEN_FORM_VIEW:"connector-agent-open-form-view"},k_=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=I.useRef(!1),o=I.useRef(void 0),s=I.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=I.useCallback((c,l="smooth")=>{r.current||(o.current!==void 0&&clearTimeout(o.current),c&&(o.current=setTimeout(()=>{s(l),r.current=!0},n)))},[s,n]),i=I.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return I.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},D_=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"})))),N_="/v1/api/connectors/lookup/bulk",R_="/v1/api/connectors/lookup/bulk",M_=async e=>{const t=new URLSearchParams;e.forEach(o=>t.append("connector_ids",o));const n=`${N_}?${t.toString()}`,r=await Ee({url:n,method:Oe.GET});return r==null?void 0:r.data},P_=async e=>{const t=await Ee({url:R_,method:Oe.PUT,data:{entries:e}});return t==null?void 0:t.data},j_={fontSize:"14px",width:"209px",height:"40px",background:"#F6F8FC",borderRadius:"8px",fontWeight:400,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#ECEFF6"}},B_={border:`1px solid ${u.theme.palette.gray.gray5}`,borderRadius:"8px",padding:"12px"},e2={flex:1,height:"1px",backgroundColor:u.theme.palette.gray.gray6},V_={flexShrink:0,border:`1px solid ${u.theme.palette.gray.gray6}`,borderRadius:"15px"},G_={border:`1px solid ${u.theme.palette.gray.gray6}`,backgroundColor:u.theme.palette.gray.gray6a,borderRadius:"8px",padding:"8px 10px"},H_=I.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=I.useCallback(c=>{o(h4,{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 d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"0px",justifyContent:"space-between",children:[d.jsx(u.Select,{value:n,onChange:a,size:"small",variant:"outlined",sx:j_,MenuProps:{sx:{zIndex:1500}},renderValue:c=>{var f;const l=((f=(t.presets??[]).find(g=>g.hiverParam===c))==null?void 0:f.label)??"";return d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[d.jsx(D_,{width:18,height:18}),d.jsx("span",{children:l})]})},children:(t.presets??[]).map(c=>d.jsx(u.MenuItem,{value:c.hiverParam,sx:{fontSize:"14px"},children:c.label},c.hiverParam))}),d.jsx(u.Box,{sx:e2}),d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"4px",padding:"4px 12px",sx:V_,children:[t.logo&&d.jsx("img",{src:t.logo,width:16,height:16,alt:t.connectorName}),d.jsxs(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:["Matches with ",t.connectorName,"'s"]})]}),d.jsx(u.Box,{sx:e2}),d.jsx(u.Box,{sx:G_,children:d.jsx(u.Typography,{variant:"body2",fontSize:14,children:s})})]})}),W_=I.memo(function({open:t,onClose:n,connectors:r,onSaveSuccess:o}){const{sendTrackingEvent:s}=I.useContext(He),[a,i]=I.useState({});I.useEffect(()=>{if(t&&r.length>0){const m={};r.filter(h=>{var p;return((p=h.presets)==null?void 0:p.length)>1}).forEach(h=>{m[h.connectorId]=h.hiverParam}),i(m)}},[t,r]);const c=Zr(),{mutate:l,isPending:f}=Xt({mutationFn:P_,onSuccess:m=>{const h={};m.results.forEach(({connectorId:p,hiverParam:b})=>{h[p]=b}),c.setQueriesData({queryKey:["lookup","bulk"]},p=>p&&{...p,connectors:p.connectors.map(b=>h[b.connectorId]!==void 0?{...b,hiverParam:h[b.connectorId]}:b)}),s(g4,{page:"agent_connector_panel"}),Se({message:"Identity mapping saved successfully",type:"success"}),o==null||o(),n()},onError:()=>{Se({message:"Failed to save identity mapping",type:"error"})}}),g=I.useCallback(()=>{const m=Object.entries(a).map(([h,p])=>({connector_id:h,hiver_param:p}));l(m)},[a,l]),y=I.useCallback((m,h)=>{i(p=>({...p,[m]:h}))},[]),E=I.useCallback(m=>{m||n()},[n]);return d.jsx(_r,{shown:t,setShown:E,showCloseButton:!1,children:d.jsxs(u.Stack,{padding:"24px 20px",gap:"16px",sx:{minWidth:"800px"},children:[d.jsx(u.Typography,{variant:"h2",children:"Customer identity mapping"}),d.jsx(u.Typography,{variant:"body2",children:"Choose how Hiver should identify customers when fetching data from connected apps."}),r.some(m=>{var h;return((h=m.presets)==null?void 0:h.length)>1})&&d.jsx(u.Stack,{gap:"8px",sx:B_,children:r.filter(m=>{var h;return((h=m.presets)==null?void 0:h.length)>1}).map(m=>d.jsx(H_,{connector:m,selectedHiverParam:a[m.connectorId]??m.hiverParam,onChange:y,sendTrackingEvent:s},m.connectorId))}),d.jsxs(u.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:[d.jsx(u.Button,{variant:"text",onClick:n,children:"Cancel"}),d.jsx(u.Button,{variant:"contained",onClick:g,disabled:f,children:"Save"})]})]})})}),Z_=({enabled:e,...t})=>{const{actionQueue:n}=I.useContext(He);n&&e&&n.register(t),I.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},X_=({isAdmin:e=!1})=>{var bt,Fn;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s,connectorId:a}=I.useContext(He),i=Qt(),{userGroupId:c,userId:l}=Pt()||{},f=I.useRef(!1),g=I.useRef(null),y=I.useRef(null),E=I.useRef(null),[m,h]=I.useState({}),[p,b]=I.useState(!1),[x,C]=I.useState(!1),[w,v]=I.useState(!1),[_,A]=I.useState(!1),[S,L]=I.useState(),[N,D]=I.useState(!1),[k,M]=I.useState(null),[B,Y]=I.useState(),[J,H]=I.useState(null),[G,q]=I.useState(!1),[oe,te]=I.useState(!1),[V,W]=I.useState(!1),[R,X]=I.useState(!1),[$,ae]=I.useState(void 0),ie=I.useRef(),P=Ie(Pv),ee=Ie(jv),ye=Ie(Vv),z=Ie(Gv),Ae=Ie(Wv),Ge=Ie(Bv),We=Ie(mp),rn=Ie(nw),yn=Ie(bp),et=Ie(yp),ct=Ie(xp),Qe=Ie(aI),Rr=nt(o,x4),Bt=nt(o,Ld),Kn=nt(o,_4),er=nt(o,A4),tr=nt(o,T4),nr=nt(o,L4),mt=(bt=Pt())==null?void 0:bt.tenantPlatform,Tn=nt(o,mt==="HIVERWEB"?`hot-${Od}`:Od),{data:Mr}=Zt({queryKey:["connectors","enabledAuthenticated"],queryFn:()=>$0(),enabled:Tn&&e}),Ln=I.useMemo(()=>(Mr??[]).map(se=>se.id),[Mr]),{data:Vt,isSuccess:ds}=Zt({queryKey:["lookup","bulk",Ln.join(",")],queryFn:()=>M_(Ln),enabled:Ln.length>0&&Tn&&e,refetchOnMount:!1}),Gt=ds&&((Vt==null?void 0:Vt.connectors)??[]).some(se=>{var me;return(((me=se.presets)==null?void 0:me.length)??0)>1});Z_({conversationId:s,openCreateForm:()=>v(!0),enabled:ee});const rr=I.useMemo(()=>!P||!P.length?null:Yv(P,ye,z),[P,ye,z]),On=z4(ye),{data:_o,isLoading:Ht}=$p({senderEmail:t,conversationId:String(s),enabled:er&&!!t}),{emailHeaders:So,selectedEmail:or}=_o??{},{scrollOnceAfterLoad:sr,resetScrollState:on}=k_(y),ar=Ge!==K.LOADING&&(!z||!Object.values(z).some(se=>se===K.LOADING))&&P&&P.length>0;I.useLayoutEffect(()=>{var se;G&&!p&&oe&&((se=E==null?void 0:E.current)!=null&&se.scrollHeight)&&sr(!!ar,"smooth")},[G,p,oe,ar,sr,(Fn=E==null?void 0:E.current)==null?void 0:Fn.scrollHeight,l]);const Pr=(se,me)=>{r(r4,{search_keyword:se,sm_ids:n,connector_name:me,suggestion_type:Qe})},Ao=(se,me,st)=>{!Array.isArray(me)||!me.length?r(o4,{search_keyword:se,sm_ids:n,connector_name:st,suggestion_type:Qe}):me.length&&r(s4,{num_of_results:me.length,search_keyword:se,sm_ids:n,connector_name:st,suggestion_type:Qe})},{mutate:fs,reset:jr,data:ps,isPending:Br,isIdle:Vr}=F_(Pr,Ao),Gr=I.useCallback(()=>{jr(),M(null)},[jr,M]),fe=Zr(),he=I.useCallback(()=>{if(t&&n.length&&s){const se=i(Ha({inboxIds:n,conversationId:s,connectorId:a}));return()=>se.abort()}},[i,t,n,s,a]),$e=I.useCallback(()=>{fe.invalidateQueries({queryKey:["lookup","bulk"]}),he()},[fe,he]),lt=I.useCallback((se,me)=>{se&&s&&me&&i(Ga({id:se,channelType:"email",conversationId:s,externalResourceId:me,contactEmail:t})).unwrap().catch(()=>{i(lo(null))})},[i,s,t]);if(I.useEffect(()=>{(async()=>{l&&(q(await wi(l)),te(await vu(l)))})()},[l]),I.useEffect(()=>{Ht||Y(or||t)},[t,or,Ht]),I.useEffect(()=>{B&&s&&A_(String(s),B)},[B,s]),I.useEffect(()=>{oe&&l&&wu(l)},[oe,l]),I.useEffect(()=>{var se;if(et){C(!0);const{externalResourceId:me}=et,st=(se=et.forms.find(kn=>kn.type==="edit"))==null?void 0:se.id;lt(st,me)}else C(!1),i(kv())},[et,lt,i]),I.useEffect(()=>(he(),on(),()=>{i(hp.clearConnectorList())}),[i,he,on]),I.useEffect(()=>{if(Ae&&P&&P.length&&rr&&!f.current){const{cards_per_app:se,total_empty_cards:me,total_cards_with_errors:st}=rr;r(D3,{numOfCards:P.length,total_cards_loaded:P.length,total_empty_cards:me,total_cards_with_errors:st,cards_per_app:se,sm_ids:n}),f.current=!0}return()=>{f.current=!1}},[Ae,P,rr,r,n]),I.useEffect(()=>{if(s&&n&&n.length){const se=i(Ma({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:nr,connectorId:a}));return()=>se.abort()}},[i,n,s,nr,a]),I.useEffect(()=>{const se=me=>{var kn;if(!(me instanceof CustomEvent))return;const st=(kn=me.detail)==null?void 0:kn.connectorKey;h({connectorKey:st})};return window.addEventListener(gl.OPEN_FORM_VIEW,se),()=>{window.removeEventListener(gl.OPEN_FORM_VIEW,se)}},[]),I.useEffect(()=>{if(!(We!=null&&We.length)||!m.connectorKey)return;const se=m.connectorKey;h({});const me=We.find(st=>{var kn;return((kn=st.connectorKey)==null?void 0:kn.toLowerCase())===(se==null?void 0:se.toLowerCase())});me&&(H(me),v(!0))},[We,m]),!t.length||Ge===K.LOADING)return d.jsx(Xw,{});const Rt=se=>{r(j3,{connector_name:rn,source:se,sm_ids:n})},sn=se=>{v(!0),Rt(se)},St=()=>{A(!0),O(_d),Z(Ad),r(B3)},O=se=>{r(se,S),ct?D(!0):(v(!1),H(null))},Z=se=>{if(et){const{connectorName:me,title:st}=et;r(se,{connector_name:me,card_title:st,sm_ids:n,ug_id:c})}ct?D(!0):i(lo(null))},Q=()=>{v(!1),i(lo(null)),L(void 0),D(!1)},ne=()=>{he(),v(!1),C(!1),i(hp.clearConnectorList())},ve=[{label:"Go back",variant:"text",action:Q},{label:"Stay",variant:"contained",action:()=>D(!1)}],we=We.length>0,xe=yn.length>0,Ce=w||x||_,ut=()=>we||xe?d.jsx(PI,{haveCreateObjects:we,haveLinkObjects:xe,onCreateClick:()=>sn(Gd.MAIN_BUTTON),onLinkClick:()=>A(!0)}):d.jsx(wp,{isAdmin:e,hideHeading:!0}),Ze=()=>{W(!0);const se=ie.current,me=se==null?void 0:se.connectorName,st=se==null?void 0:se.name;r(m4,{entry_point:"agent",app_name:me,object_type:st})},Je=se=>{ie.current=se};return d.jsxs($d,{ref:g,"data-testid":Array.isArray(P)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:w||_,children:[d.jsx(Bp,{shown:N,setShown:D,title:vv,description:wv,buttons:ve}),d.jsx(_5,{onWheel:()=>b(!0),ref:E,children:ee?d.jsxs(d.Fragment,{children:[d.jsx(rb,{connectors:On,isWriteFlowEnabled:Bt,haveCreateObjects:we,haveLinkObjects:xe,cards:P,handleCreateNewObject:()=>sn(Gd.ICON),handleLinkNewObject:St}),Kn&&!Ce?d.jsx(m_,{selectedObject:k,setSelectedObject:M,fetchSearchResults:fs,onReset:Gr,root:g.current}):null,d.jsxs(uo,{children:[d.jsx(In,{condition:Kn&&Br,children:d.jsx(S_,{})},"search"),d.jsx(In,{condition:Kn&&!!k&&!Vr,children:d.jsx(__,{searchResults:ps??[],selectedObject:k,onReset:Gr,fetchCards:he})},"results"),d.jsx(In,{condition:w,children:d.jsx(ll,{onClose:()=>O(_d),title:Ki,rightNode:d.jsx(kI,{formId:$,conversationId:s,inboxIds:n,enabled:w&&!!$,setMapFormOpen:Ze}),children:d.jsx(Gp,{onClose:()=>O(Z3),onCreateSuccess:ne,metaData:S,setMetaData:L,defaultOption:J,connectors:On,mapFormOpen:V,setMapFormOpen:W,setCreateFormId:ae,syncCurrentObject:Je})})},"create-form"),d.jsx(In,{condition:x,children:d.jsx(ll,{onClose:()=>Z(Ad),title:j4,backButtonTooltip:"Back",children:d.jsx(Gp,{isEdit:!0,onClose:()=>Z(Q3),onCreateSuccess:ne,metaData:S,setMetaData:L,connectors:On})})},"edit-form"),d.jsx(In,{condition:_,children:d.jsx(ll,{onClose:()=>A(!1),children:d.jsx(FI,{setOpenTaskLinking:A,onLinkingSuccess:he})})},"link-form"),d.jsxs(In,{fallback:!0,children:[er&&(P!=null&&P.length)?d.jsxs(u.Stack,{direction:"row",alignItems:"center",gap:"8px",children:[d.jsx(u.Stack,{sx:{flex:1,minWidth:0},children:d.jsx(tI,{emailHeaders:So,selectedEmail:B,root:g.current,isLoading:Ht,setSelectedEmail:Y})}),Tn&&Gt&&e&&d.jsx(u.Tooltip,{title:"Update customer identity mapping",placement:"top",children:d.jsx(u.IconButton,{"aria-label":"Open customer identity mapping settings",sx:{height:"32px",width:"32px",marginTop:"12px",flexShrink:0},onClick:()=>{r(Td,{page:"agent_connector_panel"}),X(!0)},children:d.jsx(u.icons.SettingsOutlined,{sx:{height:"20px",width:"20px"}})})})]}):null,!er&&Tn&&Gt&&e&&(P!=null&&P.length)?d.jsx(u.Button,{fullWidth:!0,variant:"contained",startIcon:d.jsx(u.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(Td,{page:"agent_connector_panel"}),X(!0)},children:"Customer identity mapping"}):null,Rr?d.jsx(zw,{}):null,d.jsxs(uo,{children:[d.jsxs(In,{condition:!!P&&P.length>0,children:[d.jsx(xw,{cards:P,specificCardData:ye,email:B??"",specificConnectorApiStatus:z,onCardUnlinking:he}),d.jsx("div",{ref:y,children:tr?d.jsx(o5,{connectors:On,expanded:G}):null})]},"cards-list"),d.jsx(In,{condition:!(P!=null&&P.length)&&Bt,children:ut()},"create-banner")]})]},"cards")]})]}):d.jsx(wp,{isAdmin:e})}),!ee&&d.jsx(m5,{}),Tn&&d.jsx(W_,{open:R,onClose:()=>X(!1),connectors:(Vt==null?void 0:Vt.connectors)??[],onSaveSuccess:$e})]})},z_=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:f,isAdmin:g=!1,actionQueue:y,store:E,connectorId:m,variables:h})=>{const p=I.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:l,stackingContext:f,actionQueue:y,store:E,connectorId:m,variables:h}),[s,n,r,t,o,a,i,c,g,l,f,y,E,m,h]);return d.jsx(He.Provider,{value:p,children:e})},ml=({children:e})=>{const[t]=I.useState(()=>new lh);return d.jsx(hh,{client:t,children:e})},Y_=p0({cardList:Kv,write:Dv,common:tv}),bl=wy({reducer:Y_,devTools:!0}),J_=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c,store:l,connectorId:f})=>d.jsx(uc,{store:bl,children:d.jsx(u.HiverProvider,{inter:!0,children:d.jsx(ml,{children:d.jsx(z_,{...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:l,connectorId:f,children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:e})})})})}),yl=u.styled(u.Box)`
|
|
1574
1587
|
height: inherit;
|
|
1575
1588
|
.MuiScopedCssBaseline-root {
|
|
1576
1589
|
height: inherit;
|
|
@@ -1678,7 +1691,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
1678
1691
|
[hidden] {
|
|
1679
1692
|
display: none;
|
|
1680
1693
|
}
|
|
1681
|
-
`,
|
|
1694
|
+
`,q_=u.styled(u.Box)`
|
|
1682
1695
|
:root {
|
|
1683
1696
|
--toastify-color-light: #fff;
|
|
1684
1697
|
--toastify-color-dark: #121212;
|
|
@@ -2409,7 +2422,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2409
2422
|
transform: rotate(360deg);
|
|
2410
2423
|
}
|
|
2411
2424
|
}
|
|
2412
|
-
`,
|
|
2425
|
+
`,xl=u.styled(q_)`
|
|
2413
2426
|
.Toastify__toast-container {
|
|
2414
2427
|
min-width: 320px !important;
|
|
2415
2428
|
font-size: 16px;
|
|
@@ -2458,7 +2471,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2458
2471
|
align-self: auto !important;
|
|
2459
2472
|
margin-left: 12px;
|
|
2460
2473
|
}
|
|
2461
|
-
`,
|
|
2474
|
+
`,Q_=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i,store:c})=>{const[l,f]=I.useState(void 0);return I.useEffect(()=>{if(!c)return;const g=c.subscribe(y=>{f(y)},"connectorId");return()=>g()},[c]),d.jsx(yl,{children:d.jsxs(J_,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,store:c,connectorId:l,children:[d.jsx(X_,{isAdmin:r==null?void 0:r.isAdmin},l||"root"),je.createPortal(d.jsx(xl,{id:"toast-message",children:d.jsx(ti,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!a.toastMessage&&{style:{zIndex:a.toastMessage}}})}),document.body),d.jsx("div",{"data-connectorid":"connector-layover-portal"})]})})},t2="/v1/api",$_=`${t2}/connector/conversation/:conversationId/data`,U_=`${t2}/connector/feedback/conversation/:conversationId`,K_=async(e,t)=>{try{let n=$_.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 Ee({url:n,method:Oe.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 eS(e,t,n){return Zt({queryKey:["connector-analytics",e,t,n],queryFn:async()=>!t||!e?null:await K_(e,n),enabled:!!t&&!!e})}class tS{constructor(t=[],n=null){Pe(this,"highlightTerms");Pe(this,"observer");Pe(this,"isHighlighting");Pe(this,"debounceTimer");Pe(this,"debounceDelay");Pe(this,"onHighlightsUpdated");this.highlightTerms=t,this.observer=null,this.isHighlighting=!1,this.debounceTimer=null,this.debounceDelay=500,this.onHighlightsUpdated=n,this.init()}init(){this.highlightAllEmails(),this.startObserver()}startObserver(){const t=this.findGmailContainer();if(!t){console.warn("Gmail container not found");return}this.observer=new MutationObserver(n=>{if(this.isHighlighting)return;let r=!1;n.forEach(o=>{o.type==="childList"&&Array.from(o.addedNodes).some(i=>{var c,l,f,g;return i.nodeType===1&&i instanceof Element&&(((c=i.classList)==null?void 0:c.contains("a3s"))||((l=i.classList)==null?void 0:l.contains("ii"))||((f=i.querySelector)==null?void 0:f.call(i,".a3s"))||((g=i.querySelector)==null?void 0:g.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
|
|
2462
2475
|
.gmail-highlight {
|
|
2463
2476
|
background-color: #ECEFF6 !important;
|
|
2464
2477
|
color: #2c3e50 !important;
|
|
@@ -2488,7 +2501,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2488
2501
|
transform: translateY(0) !important;
|
|
2489
2502
|
box-shadow: none !important;
|
|
2490
2503
|
}
|
|
2491
|
-
`,document.head.appendChild(e)}function
|
|
2504
|
+
`,document.head.appendChild(e)}function nS(){return Xt({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await Ee({url:U_.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const rS="Everything looks good",oS="Something is not working",sS="Share feedback",aS="Manage Smart Previews",iS="Reach out to your admin to disable this feature",cS="Go to Apps",lS="Disable Feature",uS="Tell us what went wrong",dS="Please provide feedback",fS=[{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"}],pS="Tell us more (optional)",hS="Enter your feedback",Cl=40,gS="Feedback submitted",mS="Failed to submit feedback",pn={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"},n2=e=>d.jsx(u.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?d.jsx(u.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),bS=u.styled(u.Box)`
|
|
2492
2505
|
max-height: 340px;
|
|
2493
2506
|
width: 440px;
|
|
2494
2507
|
border-radius: 12px;
|
|
@@ -2502,15 +2515,15 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2502
2515
|
flex-direction: row;
|
|
2503
2516
|
margin-bottom: 12px;
|
|
2504
2517
|
}
|
|
2505
|
-
`,
|
|
2518
|
+
`,yS=u.styled(u.Box)`
|
|
2506
2519
|
border-bottom: 1px solid ${u.theme.palette.gray.gray6};
|
|
2507
2520
|
margin: 12px -16px;
|
|
2508
|
-
`,
|
|
2521
|
+
`,xS=u.styled(u.Box)`
|
|
2509
2522
|
display: flex;
|
|
2510
2523
|
justify-content: flex-end;
|
|
2511
2524
|
margin-top: 30px;
|
|
2512
2525
|
gap: 8px;
|
|
2513
|
-
`,r2=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=I.useState(""),[i,c]=I.useState(""),l=m=>{a(m.target.value)},f=m=>{m.stopPropagation();const{value:h}=(m==null?void 0:m.target)||{};c(h)},g=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},E=r?!s:!i;return d.jsxs(
|
|
2526
|
+
`,r2=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=I.useState(""),[i,c]=I.useState(""),l=m=>{a(m.target.value)},f=m=>{m.stopPropagation();const{value:h}=(m==null?void 0:m.target)||{};c(h)},g=()=>{t({feedbackOption:s,feedbackComment:i})},y=()=>{e==null||e()},E=r?!s:!i;return d.jsxs(bS,{children:[d.jsx(u.Typography,{variant:"h3",children:o}),d.jsx(yS,{}),r?d.jsx(u.FormControl,{children:d.jsx(u.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:l,children:fS.map(m=>d.jsx(u.FormControlLabel,{value:m.value,control:d.jsx(u.Radio,{}),label:m.label},m.value))})}):null,d.jsx(wr,{type:"text",placeholder:r?pS:hS,value:i,name:"feedbackComment",inputChangeHandler:f,multiline:!0,rows:5,limit:250,validation:{validate:Ac()}}),d.jsxs(xS,{children:[d.jsx(u.Button,{variant:"text",color:"primary",style:{color:u.theme.palette.gray.gray3},disabled:n,onClick:y,children:"Cancel"}),d.jsx(n2,{variant:"contained",color:"primary",isLoading:n,disabled:E,label:"Submit",onClick:g})]})]})},CS=u.styled(u.Box)`
|
|
2514
2527
|
border-radius: 12px;
|
|
2515
2528
|
max-height: 298px;
|
|
2516
2529
|
width: 288px;
|
|
@@ -2520,29 +2533,29 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2520
2533
|
& > * {
|
|
2521
2534
|
box-sizing: border-box;
|
|
2522
2535
|
}
|
|
2523
|
-
`,
|
|
2536
|
+
`,ES=u.styled(u.Box)`
|
|
2524
2537
|
height: 24px;
|
|
2525
2538
|
display: flex;
|
|
2526
2539
|
align-items: center;
|
|
2527
2540
|
justify-content: space-between;
|
|
2528
2541
|
padding: 12px 0px;
|
|
2529
|
-
`,
|
|
2542
|
+
`,vS=u.styled(u.Typography)`
|
|
2530
2543
|
white-space: nowrap;
|
|
2531
2544
|
overflow: hidden;
|
|
2532
2545
|
text-overflow: ellipsis;
|
|
2533
2546
|
width: ${e=>e.width||"200px"};
|
|
2534
2547
|
line-height: 18px;
|
|
2535
|
-
`,
|
|
2548
|
+
`,wS=u.styled(u.Box)`
|
|
2536
2549
|
height: 1px;
|
|
2537
2550
|
background-color: ${u.theme.palette.gray.gray6};
|
|
2538
2551
|
margin: 0 -16px;
|
|
2539
|
-
`,
|
|
2552
|
+
`,IS=u.styled(u.Box)`
|
|
2540
2553
|
padding: 0px 16px;
|
|
2541
2554
|
border-radius: 12px;
|
|
2542
2555
|
height: calc(100% - 82px);
|
|
2543
2556
|
overflow-y: auto;
|
|
2544
2557
|
scrollbar-width: thin;
|
|
2545
|
-
`,
|
|
2558
|
+
`,_S=u.styled(u.Typography)`
|
|
2546
2559
|
font-size: 12px;
|
|
2547
2560
|
font-weight: 400;
|
|
2548
2561
|
color: ${u.theme.palette.gray.gray1};
|
|
@@ -2550,7 +2563,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2550
2563
|
min-width: 80px;
|
|
2551
2564
|
margin-right: 12px;
|
|
2552
2565
|
text-align: left;
|
|
2553
|
-
`,
|
|
2566
|
+
`,SS=u.styled(u.Typography)`
|
|
2554
2567
|
font-size: 12px;
|
|
2555
2568
|
font-weight: 400;
|
|
2556
2569
|
color: ${u.theme.palette.gray.black};
|
|
@@ -2559,11 +2572,11 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2559
2572
|
margin-right: 0px;
|
|
2560
2573
|
word-break: 'break-word';
|
|
2561
2574
|
text-align: right;
|
|
2562
|
-
`,
|
|
2575
|
+
`,AS=u.styled(u.Box)`
|
|
2563
2576
|
display: flex;
|
|
2564
2577
|
justify-content: space-between;
|
|
2565
2578
|
margin-bottom: 20px;
|
|
2566
|
-
`,
|
|
2579
|
+
`,TS=u.styled(u.Box)`
|
|
2567
2580
|
display: flex;
|
|
2568
2581
|
justify-content: space-between;
|
|
2569
2582
|
align-items: center;
|
|
@@ -2571,16 +2584,16 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2571
2584
|
width: 100%;
|
|
2572
2585
|
min-height: 40px;
|
|
2573
2586
|
background-color: ${u.theme.palette.gray.gray6a};
|
|
2574
|
-
`,
|
|
2587
|
+
`,as=u.styled(u.Tooltip)`
|
|
2575
2588
|
padding: 6px;
|
|
2576
2589
|
border-radius: 6px;
|
|
2577
|
-
`,
|
|
2590
|
+
`,LS=u.styled(u.Button)`
|
|
2578
2591
|
background-color: #f3f8ff;
|
|
2579
2592
|
border-radius: 360px;
|
|
2580
2593
|
color: #196fe0;
|
|
2581
2594
|
padding: 5px 12px;
|
|
2582
2595
|
min-width: 100px;
|
|
2583
|
-
`,o2=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"})),s2=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"})),_S=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"})),SS=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)"})))),AS=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"})))),TS=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,f]=I.useState(!1),g=I.useRef(!1),[y,E]=I.useState(!1),[m,h]=I.useState([]),{mutate:p,isPending:b}=$_(),{logoUrl:C,cardTitle:x,id:w,externalResourceId:v,connectorId:_,textToHighlight:A}=e.cardData||{},S=I.useMemo(()=>({key:A,card_id:w,card_title:x,connector_id:_,external_resource_id:v,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,w,x,_,v,r,n]);if(I.useEffect(()=>{const G=Date.now();return()=>{c(pn.DATA_CARD_DURATION,{...S,duration:Date.now()-G})}},[c]),I.useEffect(()=>{var q,oe,te;const G=(te=(oe=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:oe.flatDetails)==null?void 0:te.data;if(G){const V=G.sort((W,R)=>W.priority-R.priority);h(V),c(pn.OBJECT_HOVERED,S)}},[e,c,S]),!m||m.length===0)return null;const L=()=>{f(!0),c(pn.FEEDBACK_OPTION_CLICKED,S)},N=()=>{E(!0),c(pn.NEGATIVE_FEEDBACK_CLICKED,S)},D=G=>{const q={card_id:w,entity_id:v,comment:G.feedbackComment,option:G.feedbackOption,feedback_type:"entity_extraction"};typeof G.isThumbsUp<"u"&&(q.positive_feedback=G.isThumbsUp),p({conversationId:r,feedbackData:q},{onSuccess:()=>{l?c(pn.FEEDBACK_OPTION_SUBMITTED,S):y&&c(pn.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),E(!1),Se({message:uS,type:Ut})},onError:()=>{Se({message:dS,type:qe})}})},k=()=>{D({isThumbsUp:!0}),c(pn.POSITIVE_FEEDBACK_CLICKED,S)},M=G=>{D({...G,isThumbsUp:!1})},B=()=>{s==null||s(_),i()},Y=()=>{a==null||a()},J=G=>{c(pn.PERMALINK_CLICKED,{...S,clicked_value:G})},H=()=>{g.current||(c(pn.DATA_CARD_SCROLLED,S),g.current=!0)};return d.jsxs(d.Fragment,{children:[d.jsxs(gS,{children:[d.jsxs(CS,{onScroll:H,children:[d.jsxs(mS,{children:[d.jsxs(u.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[C&&d.jsx("img",{src:C,alt:"Logo",style:{marginRight:8},height:18,width:18}),d.jsx(u.Tooltip,{title:x,arrow:!0,placement:"top",children:d.jsx(bS,{variant:"h3",color:u.theme.palette.gray.black,width:o?"100px":"200px",children:x})})]}),o?d.jsx(IS,{variant:"text",size:"small",endIcon:d.jsx(u.icons.ArrowForward,{}),onClick:Y,children:rS}):null]}),d.jsx(yS,{}),d.jsx(u.Box,{paddingY:"16px",children:m.map(({key:G,value:q,label:oe,deepLink:te})=>d.jsxs(vS,{children:[d.jsxs(xS,{children:[oe,":"]}),d.jsx(u.Tooltip,{title:(q==null?void 0:q.length)>xl?q:"",arrow:!0,placement:"top",children:te?d.jsx(u.Link,{href:te,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:u.theme.palette.primary.main},onClick:()=>J(q),children:Xd(q||"N/A",xl)}):d.jsx(ES,{children:Xd(q||"N/A",xl)})})]},G))})]}),d.jsxs(wS,{children:[d.jsx(u.Stack,{flexDirection:"row",alignItems:"center",children:t?d.jsx(ss,{arrow:!0,title:tS,placement:"top",children:d.jsx(u.IconButton,{onClick:B,children:d.jsx(_S,{})})}):d.jsxs(d.Fragment,{children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:12,children:oS}),d.jsx(ss,{arrow:!0,title:nS,placement:"top",children:d.jsx(u.IconButton,{size:"small",children:d.jsx(AS,{})})})]})}),d.jsxs(u.Stack,{flexDirection:"row",alignItems:"center",children:[d.jsx(ss,{arrow:!0,title:U_,placement:"top",children:d.jsx(u.IconButton,{size:"small",disabled:b,onClick:k,children:d.jsx(o2,{})})}),d.jsx(ss,{arrow:!0,title:K_,placement:"top",children:d.jsx(u.IconButton,{size:"small",disabled:b,onClick:N,children:d.jsx(s2,{})})}),d.jsx(ss,{arrow:!0,title:eS,placement:"top",children:d.jsx(u.IconButton,{onClick:L,size:"small",disabled:b,children:d.jsx(SS,{})})})]})]})]}),d.jsx(_r,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:d.jsx(r2,{onCancel:()=>f(!1),onSubmit:D,isLoading:b,showOptions:!1,title:aS})}),d.jsx(_r,{shown:y,setShown:E,borderRadius:12,sx:{zIndex:15002},children:d.jsx(r2,{onCancel:()=>E(!1),onSubmit:M,isLoading:b,title:sS})})]})},a2=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,i2=(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"},LS=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${u.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 ${u.theme.palette.gray.gray6}`,position:"relative"}}));function OS({elements:e,title:t,onKeyChange:n}){const[r,o]=I.useState(!1),[s,a]=I.useState(null),[i,c]=I.useState(""),[l,f]=I.useState("bottom"),[g,y]=I.useState(!1),E=I.useRef(null),m=I.useRef({x:0,y:0}),h=I.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null)},[]);I.useEffect(()=>{if(e&&e.length>0){const v=S=>{const L=S.currentTarget,N=L.textContent||"",D=i2(L);f(D),c(N),n&&n(N),a(L),o(!0)},_=()=>{if(r&&s){const S=i2(s);f(S)}},A=S=>{if(m.current={x:S.clientX,y:S.clientY},!r||g)return;const L=S.clientX,N=S.clientY;let D=!1;for(const k of e)if(a2(L,N,k.getBoundingClientRect())){D=!0;break}if(!D){const k=document.querySelector(`.${u.tooltipClasses.tooltip}`);k&&a2(L,N,k.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()},b=()=>{y(!1),E.current=setTimeout(()=>{o(!1),a(null)},150)},x=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,w=d.jsx("div",{onMouseEnter:p,onMouseLeave:b,children:x});return d.jsx(LS,{title:w,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:d.jsx("span",{})})}const FS=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=I.useState(null),[l,f]=I.useState([]),{data:g,isError:y}=q_(e,t,n);return I.useEffect(()=>{g?c(g):y&&c(null)},[g,y]),I.useEffect(()=>{let E=null;if(i&&Object.keys(i).length&&e){E=new Q_(Object.keys(i)||[],f);const m=Object.keys(i).map(h=>{var b;const p=((b=i[h])==null?void 0:b.cardData)||{};return{key:h,card_title:p.cardTitle,connector_id:p.connectorId}});a(pn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:m})}return()=>{E&&E.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),d.jsx("div",{children:d.jsx(OS,{elements:l,title:(E,m)=>{var h;return!i||!E||!((h=i[E])!=null&&h.cardData)?d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray6,children:"Loading data..."}):d.jsx(TS,{smIds:n,conversationId:e||"",analysisData:i[E],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:m,sendTrackingEvent:a})}})})},kS=({children:e})=>d.jsx(uc,{store:bl,children:d.jsx(u.HiverProvider,{inter:!0,children:d.jsx(ml,{children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:e})})})}),DS=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>d.jsx(yl,{children:d.jsxs(kS,{children:[d.jsx(FS,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Be.createPortal(d.jsx(Cl,{id:"toast-message",children:d.jsx(ti,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),c2={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},NS=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class RS{constructor({processDelay:t=1e3}){Pe(this,"_processDelay");Pe(this,"initialized",!1);Pe(this,"_queue",[]);Pe(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});Pe(this,"ACTIONS",c2);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 c2.OPEN_CREATE_FORM:NS(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var Te=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(Te||{}),Wa=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Wa||{});const MS=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},PS=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Wa.UNAUTHENTICATED?Te.UNAUTHENTICATED:n.pending>0?Te.PENDING:n.failed?Te.ERROR:r.length===0?Te.NOT_LOGGED:o?Te.LOGGED:Te.PAUSED},El=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"})),jS=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"})),BS=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)"})))),VS=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"})))),Za=u.keyframes`
|
|
2596
|
+
`,o2=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"})),s2=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"})),OS=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"})),FS=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)"})))),kS=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"})))),DS=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,f]=I.useState(!1),g=I.useRef(!1),[y,E]=I.useState(!1),[m,h]=I.useState([]),{mutate:p,isPending:b}=nS(),{logoUrl:x,cardTitle:C,id:w,externalResourceId:v,connectorId:_,textToHighlight:A}=e.cardData||{},S=I.useMemo(()=>({key:A,card_id:w,card_title:C,connector_id:_,external_resource_id:v,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[A,w,C,_,v,r,n]);if(I.useEffect(()=>{const G=Date.now();return()=>{c(pn.DATA_CARD_DURATION,{...S,duration:Date.now()-G})}},[c]),I.useEffect(()=>{var q,oe,te;const G=(te=(oe=(q=e==null?void 0:e.cardData)==null?void 0:q.data)==null?void 0:oe.flatDetails)==null?void 0:te.data;if(G){const V=G.sort((W,R)=>W.priority-R.priority);h(V),c(pn.OBJECT_HOVERED,S)}},[e,c,S]),!m||m.length===0)return null;const L=()=>{f(!0),c(pn.FEEDBACK_OPTION_CLICKED,S)},N=()=>{E(!0),c(pn.NEGATIVE_FEEDBACK_CLICKED,S)},D=G=>{const q={card_id:w,entity_id:v,comment:G.feedbackComment,option:G.feedbackOption,feedback_type:"entity_extraction"};typeof G.isThumbsUp<"u"&&(q.positive_feedback=G.isThumbsUp),p({conversationId:r,feedbackData:q},{onSuccess:()=>{l?c(pn.FEEDBACK_OPTION_SUBMITTED,S):y&&c(pn.NEGATIVE_FEEDBACK_SUBMITTED,S),f(!1),E(!1),Se({message:gS,type:Ut})},onError:()=>{Se({message:mS,type:qe})}})},k=()=>{D({isThumbsUp:!0}),c(pn.POSITIVE_FEEDBACK_CLICKED,S)},M=G=>{D({...G,isThumbsUp:!1})},B=()=>{s==null||s(_),i()},Y=()=>{a==null||a()},J=G=>{c(pn.PERMALINK_CLICKED,{...S,clicked_value:G})},H=()=>{g.current||(c(pn.DATA_CARD_SCROLLED,S),g.current=!0)};return d.jsxs(d.Fragment,{children:[d.jsxs(CS,{children:[d.jsxs(IS,{onScroll:H,children:[d.jsxs(ES,{children:[d.jsxs(u.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[x&&d.jsx("img",{src:x,alt:"Logo",style:{marginRight:8},height:18,width:18}),d.jsx(u.Tooltip,{title:C,arrow:!0,placement:"top",children:d.jsx(vS,{variant:"h3",color:u.theme.palette.gray.black,width:o?"100px":"200px",children:C})})]}),o?d.jsx(LS,{variant:"text",size:"small",endIcon:d.jsx(u.icons.ArrowForward,{}),onClick:Y,children:cS}):null]}),d.jsx(wS,{}),d.jsx(u.Box,{paddingY:"16px",children:m.map(({key:G,value:q,label:oe,deepLink:te})=>d.jsxs(AS,{children:[d.jsxs(_S,{children:[oe,":"]}),d.jsx(u.Tooltip,{title:(q==null?void 0:q.length)>Cl?q:"",arrow:!0,placement:"top",children:te?d.jsx(u.Link,{href:te,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:u.theme.palette.primary.main},onClick:()=>J(q),children:Xd(q||"N/A",Cl)}):d.jsx(SS,{children:Xd(q||"N/A",Cl)})})]},G))})]}),d.jsxs(TS,{children:[d.jsx(u.Stack,{flexDirection:"row",alignItems:"center",children:t?d.jsx(as,{arrow:!0,title:aS,placement:"top",children:d.jsx(u.IconButton,{onClick:B,children:d.jsx(OS,{})})}):d.jsxs(d.Fragment,{children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:12,children:lS}),d.jsx(as,{arrow:!0,title:iS,placement:"top",children:d.jsx(u.IconButton,{size:"small",children:d.jsx(kS,{})})})]})}),d.jsxs(u.Stack,{flexDirection:"row",alignItems:"center",children:[d.jsx(as,{arrow:!0,title:rS,placement:"top",children:d.jsx(u.IconButton,{size:"small",disabled:b,onClick:k,children:d.jsx(o2,{})})}),d.jsx(as,{arrow:!0,title:oS,placement:"top",children:d.jsx(u.IconButton,{size:"small",disabled:b,onClick:N,children:d.jsx(s2,{})})}),d.jsx(as,{arrow:!0,title:sS,placement:"top",children:d.jsx(u.IconButton,{onClick:L,size:"small",disabled:b,children:d.jsx(FS,{})})})]})]})]}),d.jsx(_r,{shown:l,setShown:f,borderRadius:12,sx:{zIndex:15002},children:d.jsx(r2,{onCancel:()=>f(!1),onSubmit:D,isLoading:b,showOptions:!1,title:dS})}),d.jsx(_r,{shown:y,setShown:E,borderRadius:12,sx:{zIndex:15002},children:d.jsx(r2,{onCancel:()=>E(!1),onSubmit:M,isLoading:b,title:uS})})]})},a2=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,i2=(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"},NS=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${u.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 ${u.theme.palette.gray.gray6}`,position:"relative"}}));function RS({elements:e,title:t,onKeyChange:n}){const[r,o]=I.useState(!1),[s,a]=I.useState(null),[i,c]=I.useState(""),[l,f]=I.useState("bottom"),[g,y]=I.useState(!1),E=I.useRef(null),m=I.useRef({x:0,y:0}),h=I.useCallback(()=>{E.current&&(clearTimeout(E.current),E.current=null)},[]);I.useEffect(()=>{if(e&&e.length>0){const v=S=>{const L=S.currentTarget,N=L.textContent||"",D=i2(L);f(D),c(N),n&&n(N),a(L),o(!0)},_=()=>{if(r&&s){const S=i2(s);f(S)}},A=S=>{if(m.current={x:S.clientX,y:S.clientY},!r||g)return;const L=S.clientX,N=S.clientY;let D=!1;for(const k of e)if(a2(L,N,k.getBoundingClientRect())){D=!0;break}if(!D){const k=document.querySelector(`.${u.tooltipClasses.tooltip}`);k&&a2(L,N,k.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()},b=()=>{y(!1),E.current=setTimeout(()=>{o(!1),a(null)},150)},C=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,w=d.jsx("div",{onMouseEnter:p,onMouseLeave:b,children:C});return d.jsx(NS,{title:w,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:d.jsx("span",{})})}const MS=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=I.useState(null),[l,f]=I.useState([]),{data:g,isError:y}=eS(e,t,n);return I.useEffect(()=>{g?c(g):y&&c(null)},[g,y]),I.useEffect(()=>{let E=null;if(i&&Object.keys(i).length&&e){E=new tS(Object.keys(i)||[],f);const m=Object.keys(i).map(h=>{var b;const p=((b=i[h])==null?void 0:b.cardData)||{};return{key:h,card_title:p.cardTitle,connector_id:p.connectorId}});a(pn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:m})}return()=>{E&&E.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),d.jsx("div",{children:d.jsx(RS,{elements:l,title:(E,m)=>{var h;return!i||!E||!((h=i[E])!=null&&h.cardData)?d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray6,children:"Loading data..."}):d.jsx(DS,{smIds:n,conversationId:e||"",analysisData:i[E],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:m,sendTrackingEvent:a})}})})},PS=({children:e})=>d.jsx(uc,{store:bl,children:d.jsx(u.HiverProvider,{inter:!0,children:d.jsx(ml,{children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:e})})})}),jS=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>d.jsx(yl,{children:d.jsxs(PS,{children:[d.jsx(MS,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),je.createPortal(d.jsx(xl,{id:"toast-message",children:d.jsx(ti,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),c2={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},BS=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class VS{constructor({processDelay:t=1e3}){Pe(this,"_processDelay");Pe(this,"initialized",!1);Pe(this,"_queue",[]);Pe(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});Pe(this,"ACTIONS",c2);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 c2.OPEN_CREATE_FORM:BS(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var Te=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(Te||{}),Wa=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Wa||{});const GS=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},HS=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Wa.UNAUTHENTICATED?Te.UNAUTHENTICATED:n.pending>0?Te.PENDING:n.failed?Te.ERROR:r.length===0?Te.NOT_LOGGED:o?Te.LOGGED:Te.PAUSED},El=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"})),WS=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"})),ZS=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)"})))),XS=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"})))),Za=u.keyframes`
|
|
2584
2597
|
from {
|
|
2585
2598
|
transform: rotate(0deg);
|
|
2586
2599
|
}
|
|
@@ -2593,73 +2606,73 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2593
2606
|
border-radius: 50%;
|
|
2594
2607
|
justify-content: center;
|
|
2595
2608
|
align-items: center;
|
|
2596
|
-
`,
|
|
2609
|
+
`,zS=u.styled(vl)`
|
|
2597
2610
|
background-color: #ffe250;
|
|
2598
|
-
`,
|
|
2611
|
+
`,YS=u.styled(vl)`
|
|
2599
2612
|
background-color: #00bc7e;
|
|
2600
|
-
`,
|
|
2613
|
+
`,JS=u.styled(vl)`
|
|
2601
2614
|
animation: ${Za} 1s linear infinite;
|
|
2602
2615
|
animation-fill-mode: backwards;
|
|
2603
2616
|
animation-direction: reverse;
|
|
2604
|
-
`,
|
|
2617
|
+
`,qS={[Te.NOT_LOGGED]:d.jsx(zS,{children:d.jsx(Hp,{})}),[Te.PENDING]:d.jsx(JS,{children:d.jsx(ZS,{})}),[Te.LOGGED]:d.jsx(YS,{children:d.jsx(WS,{})}),[Te.ERROR]:d.jsx(El,{}),[Te.UNAUTHENTICATED]:d.jsx(El,{}),[Te.PAUSED]:d.jsx(XS,{})},l2=u.styled(u.Typography)`
|
|
2605
2618
|
font-size: 12px;
|
|
2606
2619
|
line-height: 14px;
|
|
2607
2620
|
font-weight: 500;
|
|
2608
2621
|
color: #4d596c;
|
|
2609
|
-
`,
|
|
2622
|
+
`,QS=u.styled(l2)`
|
|
2610
2623
|
color: #6f7c90;
|
|
2611
|
-
`,wl=e=>d.jsx(l2,{children:e}),Il=e=>d.jsx(
|
|
2624
|
+
`,wl=e=>d.jsx(l2,{children:e}),Il=e=>d.jsx(QS,{children:e}),$S={[Te.NOT_LOGGED]:wl,[Te.PENDING]:Il,[Te.LOGGED]:wl,[Te.PAUSED]:wl,[Te.ERROR]:Il,[Te.UNAUTHENTICATED]:Il},US={[Te.NOT_LOGGED]:"Sync conversation",[Te.PENDING]:"Syncing in progress",[Te.LOGGED]:"Synced",[Te.PAUSED]:"Synced",[Te.ERROR]:"Syncing failed",[Te.UNAUTHENTICATED]:"Sync conversation"},en=I.createContext({}),KS=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${u.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 ${u.theme.palette.gray.gray6}`,position:"relative"}})),eA=u.styled(u.Box)`
|
|
2612
2625
|
width: fit-content;
|
|
2613
2626
|
height: fit-content;
|
|
2614
|
-
`,
|
|
2627
|
+
`,tA=({children:e,renderTooltip:t,defaultOpen:n})=>{const[r,o]=I.useState(n),s=()=>o(!1),a=()=>o(!0),i=c=>{c.stopPropagation()};return d.jsx(u.ClickAwayListener,{onClickAway:s,children:d.jsx(eA,{onClick:a,children:d.jsx(KS,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:d.jsx(u.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},nA="Turn off to stop syncing this conversation.",rA="Turn on to continue syncing this conversation.",oA="Authentication failed",sA="Retry authentication to use this functionality and save in ':connectorName'",aA="Reach out to your admin to reauthenticate :connectorName",iA="Syncing this conversation to :connectorName. Refresh the page to see updates.",cA="Something went wrong while syncing this conversation. Please try again.",lA="No recommendations found",uA="Already synced email cannot be removed",dA="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",fA="Log this email thread to your CRM",pA="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",u2="connector-agent_email-logger_welcomed",d2="connector-agent_email-logger_welcome_shown",hA="Tell us how we can improve",gA="Everything looks good",mA="Something is not working",bA="Please provide your feedback",yA="Feedback submitted",xA="Failed to submit feedback",f2="email-logging",CA=[{label:"Records are not accurate",value:"not_accurate"},{label:"Search is not working",value:"search_not_working"},{label:"Other",value:"other"}],Nt={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"},EA={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:u.theme.palette.gray.gray3,padding:"0px"},vA={color:"#fff !important"},wA=u.styled(u.Stack)`
|
|
2615
2628
|
box-sizing: border-box;
|
|
2616
2629
|
padding: 16px;
|
|
2617
|
-
`,
|
|
2630
|
+
`,IA=u.styled("img")`
|
|
2618
2631
|
display: block;
|
|
2619
2632
|
width: 100%;
|
|
2620
2633
|
aspect-ratio: 3 / 2;
|
|
2621
2634
|
border-radius: 8px;
|
|
2622
2635
|
background: #ecedff;
|
|
2623
2636
|
object-fit: cover;
|
|
2624
|
-
`,
|
|
2637
|
+
`,_A=u.styled(u.Typography)`
|
|
2625
2638
|
margin-top: 10px;
|
|
2626
2639
|
color: #343c45;
|
|
2627
2640
|
font-size: 14px;
|
|
2628
2641
|
font-weight: 600;
|
|
2629
2642
|
line-height: 18px;
|
|
2630
2643
|
letter-spacing: -0.28px;
|
|
2631
|
-
`,
|
|
2644
|
+
`,SA=u.styled(u.Typography)`
|
|
2632
2645
|
margin-top: 6px;
|
|
2633
2646
|
color: #3e4c5a;
|
|
2634
2647
|
font-size: 13px;
|
|
2635
2648
|
font-weight: 400;
|
|
2636
2649
|
line-height: 18px;
|
|
2637
2650
|
letter-spacing: -0.13px;
|
|
2638
|
-
`,
|
|
2651
|
+
`,AA=u.styled(u.Stack)`
|
|
2639
2652
|
margin-top: 20px;
|
|
2640
2653
|
flex-flow: row nowrap;
|
|
2641
2654
|
justify-content: flex-end;
|
|
2642
2655
|
column-gap: 8px;
|
|
2643
|
-
`,p2=
|
|
2656
|
+
`,p2=Yo(),TA=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=I.useContext(en),r=n==null?void 0:n.sendTrackingEvent;return I.useEffect(()=>{const o=p2.getItem(d2);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(Nt.email_logging_intro_popup_shown,{app_name:t}),p2.setItem(d2,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),d.jsxs(wA,{children:[d.jsx(IA,{src:dA,alt:"Welcome"}),d.jsx(_A,{children:fA}),d.jsx(SA,{children:pA}),d.jsx(AA,{children:e?d.jsx(u.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},LA=({children:e,onContinue:t,connectorName:n})=>d.jsx(W1,{title:d.jsx(TA,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:EA,arrowStyle:vA,children:e}),OA={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:u.theme.palette.gray.gray3,padding:"0px"},FA={color:"#fff !important"},kA=u.styled(u.Box)`
|
|
2644
2657
|
padding: 16px;
|
|
2645
|
-
`,
|
|
2658
|
+
`,DA=u.styled(u.Typography)`
|
|
2646
2659
|
font-weight: 600;
|
|
2647
2660
|
font-size: 14px;
|
|
2648
2661
|
line-height: 130%;
|
|
2649
2662
|
color: ${u.theme.palette.gray.gray1};
|
|
2650
|
-
`,
|
|
2663
|
+
`,NA=u.styled(u.Typography)`
|
|
2651
2664
|
font-weight: 400;
|
|
2652
2665
|
font-size: 13px;
|
|
2653
2666
|
line-height: 135%;
|
|
2654
2667
|
color: ${u.theme.palette.gray.gray3};
|
|
2655
2668
|
margin-top: 6px;
|
|
2656
|
-
`,
|
|
2669
|
+
`,RA=u.styled(u.Box)`
|
|
2657
2670
|
display: flex;
|
|
2658
2671
|
justify-content: space-between;
|
|
2659
2672
|
align-items: center;
|
|
2660
2673
|
margin-top: 20px;
|
|
2661
2674
|
width: 100%;
|
|
2662
|
-
`,FA=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"})),kA=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?eA:tA,{connectorFunctions:s}=I.useContext(en),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return d.jsxs(AA,{children:[d.jsx(TA,{children:KS}),d.jsx(LA,{children:rt(o,{connectorName:n})}),d.jsxs(OA,{children:[d.jsx("div",{children:d.jsx(FA,{})}),e?d.jsx(u.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},DA=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=I.useState(!0),i=()=>a(!0),c=()=>a(!1);return d.jsx(W1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?d.jsx(kA,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:_A,arrowStyle:SA,children:o})},NA=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=I.useContext(en),i=a==null?void 0:a.sendTrackingEvent,[c,l]=I.useState(()=>localStorage.getItem(u2)==="true"),[f,g]=I.useState(!1),{connectorId:y,connectorName:E,connectorStatus:m}=n??{},h=t||m!==Wa.DISABLED,p=m===Wa.UNAUTHENTICATED,b=r===Te.PENDING,C=()=>{localStorage.setItem(u2,"true"),l(!0),g(!0),i==null||i(Nt.email_logging_intro_popup_continue_clicked,{app_name:E})};return c?p?d.jsx(DA,{connectorId:y,connectorName:E,isAdmin:t,isAuthenticated:!1,children:e}):o?d.jsx(u.Tooltip,{title:rA,children:e}):b?d.jsx(u.Tooltip,{title:nA.replace(":connectorName",E),children:e}):s?d.jsx(QS,{defaultOpen:f,renderTooltip:s,children:e}):d.jsx(d.Fragment,{children:e}):d.jsx(IA,{onContinue:h?C:void 0,connectorName:E,children:e})},RA=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"})))),_l=({message:e})=>d.jsxs(u.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[d.jsx(RA,{width:124,height:107}),d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:e})]}),Wn="/v1/api",MA=`${Wn}/connector/conversation/:conversationId/email_log_status`,PA=`${Wn}/connector/conversation/:conversationId/entity_recommendations`,jA=`${Wn}/connector/conversation/:conversationId/retry_emails_log`,BA=`${Wn}/connector/conversation/:conversationId/validate_entity`,VA=`${Wn}/connectors/forms/:formId/search`,GA=`${Wn}/connector/conversation/:conversationId/log_emails`,HA=`${Wn}/connector/feedback/conversation/:conversationId`,WA=`${Wn}/connector/conversation/:conversationId/log_emails`,ZA=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 Ee({url:rt(BA,{conversationId:n}),data:e,method:Oe.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}},XA=({onSuccess:e,onError:t})=>Xt({mutationFn:ZA,onSuccess:e,onError:t}),Sl=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"})),zA=u.styled(u.Stack)`
|
|
2675
|
+
`,MA=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"})),PA=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?sA:aA,{connectorFunctions:s}=I.useContext(en),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return d.jsxs(kA,{children:[d.jsx(DA,{children:oA}),d.jsx(NA,{children:rt(o,{connectorName:n})}),d.jsxs(RA,{children:[d.jsx("div",{children:d.jsx(MA,{})}),e?d.jsx(u.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},jA=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=I.useState(!0),i=()=>a(!0),c=()=>a(!1);return d.jsx(W1,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?d.jsx(PA,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:OA,arrowStyle:FA,children:o})},BA=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=I.useContext(en),i=a==null?void 0:a.sendTrackingEvent,[c,l]=I.useState(()=>localStorage.getItem(u2)==="true"),[f,g]=I.useState(!1),{connectorId:y,connectorName:E,connectorStatus:m}=n??{},h=t||m!==Wa.DISABLED,p=m===Wa.UNAUTHENTICATED,b=r===Te.PENDING,x=()=>{localStorage.setItem(u2,"true"),l(!0),g(!0),i==null||i(Nt.email_logging_intro_popup_continue_clicked,{app_name:E})};return c?p?d.jsx(jA,{connectorId:y,connectorName:E,isAdmin:t,isAuthenticated:!1,children:e}):o?d.jsx(u.Tooltip,{title:cA,children:e}):b?d.jsx(u.Tooltip,{title:iA.replace(":connectorName",E),children:e}):s?d.jsx(tA,{defaultOpen:f,renderTooltip:s,children:e}):d.jsx(d.Fragment,{children:e}):d.jsx(LA,{onContinue:h?x:void 0,connectorName:E,children:e})},VA=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"})))),_l=({message:e})=>d.jsxs(u.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[d.jsx(VA,{width:124,height:107}),d.jsx(u.Typography,{variant:"body2",color:u.theme.palette.gray.gray3,children:e})]}),Wn="/v1/api",GA=`${Wn}/connector/conversation/:conversationId/email_log_status`,HA=`${Wn}/connector/conversation/:conversationId/entity_recommendations`,WA=`${Wn}/connector/conversation/:conversationId/retry_emails_log`,ZA=`${Wn}/connector/conversation/:conversationId/validate_entity`,XA=`${Wn}/connectors/forms/:formId/search`,zA=`${Wn}/connector/conversation/:conversationId/log_emails`,YA=`${Wn}/connector/feedback/conversation/:conversationId`,JA=`${Wn}/connector/conversation/:conversationId/log_emails`,qA=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 Ee({url:rt(ZA,{conversationId:n}),data:e,method:Oe.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}},QA=({onSuccess:e,onError:t})=>Xt({mutationFn:qA,onSuccess:e,onError:t}),Sl=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"})),$A=u.styled(u.Stack)`
|
|
2663
2676
|
display: flex;
|
|
2664
2677
|
flex-flow: row nowrap;
|
|
2665
2678
|
justify-content: flex-start;
|
|
@@ -2675,7 +2688,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2675
2688
|
cursor: not-allowed;
|
|
2676
2689
|
}
|
|
2677
2690
|
`:null}
|
|
2678
|
-
`,
|
|
2691
|
+
`,UA=u.styled(u.Checkbox)`
|
|
2679
2692
|
padding: 0;
|
|
2680
2693
|
margin: 0;
|
|
2681
2694
|
svg {
|
|
@@ -2691,12 +2704,12 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2691
2704
|
input:checked:disabled ~ svg {
|
|
2692
2705
|
fill: #d6dde8;
|
|
2693
2706
|
}
|
|
2694
|
-
`,
|
|
2707
|
+
`,KA=u.styled(Sl)`
|
|
2695
2708
|
width: 16px;
|
|
2696
2709
|
height: 16px;
|
|
2697
2710
|
fill: #506dff;
|
|
2698
2711
|
animation: ${Za} 1s linear infinite;
|
|
2699
|
-
`,
|
|
2712
|
+
`,eT=u.styled(u.Typography)`
|
|
2700
2713
|
font-size: 13px;
|
|
2701
2714
|
overflow: hidden;
|
|
2702
2715
|
text-overflow: ellipsis;
|
|
@@ -2704,7 +2717,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2704
2717
|
`,h2=u.styled(u.Stack)`
|
|
2705
2718
|
margin-left: auto;
|
|
2706
2719
|
flex-shrink: 0;
|
|
2707
|
-
`,
|
|
2720
|
+
`,tT=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=I.useContext(en),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:f}=t,g=b=>{o==null||o(x=>({...x,[l+c]:b})),i==null||i(Nt.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},y=()=>{i==null||i(Nt.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:E,isPending:m,isError:h}=QA({onSuccess:g,onError:y}),p=()=>{!o||m||r||h||(n?o(b=>{const x={...b};return delete x[l+c],x}):(i==null||i(Nt.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),E({entity:t,payload:{entityType:l,searchString:c,cardId:f},conversationId:s})))};return d.jsx(u.Tooltip,{title:r?uA:"",placement:"top",children:d.jsxs($A,{disabled:m||h,onClick:p,children:[d.jsx(UA,{value:n,checked:n,disabled:r}),d.jsx(u.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:d.jsx(eT,{variant:"body2",children:c})}),m?d.jsx(h2,{children:d.jsx(KA,{})}):null,h?d.jsx(u.Tooltip,{title:"Record not found in "+e,children:d.jsx(h2,{children:d.jsx(El,{})})}):null]})})},nT=u.styled(u.Stack)`
|
|
2708
2721
|
color: #343c45;
|
|
2709
2722
|
padding: 18px 0;
|
|
2710
2723
|
box-sizing: border-box;
|
|
@@ -2715,7 +2728,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2715
2728
|
overflow-y: auto;
|
|
2716
2729
|
scrollbar-width: thin;
|
|
2717
2730
|
scrollbar-color: #97a3b7 transparent;
|
|
2718
|
-
`;const
|
|
2731
|
+
`;const rT=u.styled(u.Stack)`
|
|
2719
2732
|
display: grid;
|
|
2720
2733
|
grid-template-rows: max-content 0fr;
|
|
2721
2734
|
transition: grid-template-rows 300ms ease-out;
|
|
@@ -2728,7 +2741,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2728
2741
|
transform: rotate(-90deg);
|
|
2729
2742
|
}
|
|
2730
2743
|
}
|
|
2731
|
-
`,
|
|
2744
|
+
`,oT=u.styled(u.Stack)`
|
|
2732
2745
|
cursor: pointer;
|
|
2733
2746
|
flex-flow: row nowrap;
|
|
2734
2747
|
justify-content: space-between;
|
|
@@ -2741,19 +2754,19 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2741
2754
|
transform-origin: center;
|
|
2742
2755
|
transition: transform 300ms ease-out;
|
|
2743
2756
|
}
|
|
2744
|
-
`,
|
|
2757
|
+
`,sT=u.styled(u.Typography)`
|
|
2745
2758
|
font-size: 13px;
|
|
2746
2759
|
line-height: 18px;
|
|
2747
2760
|
font-weight: 400;
|
|
2748
2761
|
color: #6f7c90;
|
|
2749
2762
|
text-transform: capitalize;
|
|
2750
|
-
`,
|
|
2763
|
+
`,aT=u.styled(u.Stack)`
|
|
2751
2764
|
overflow: hidden;
|
|
2752
|
-
`,g2=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"})),m2=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=I.useMemo(()=>
|
|
2765
|
+
`,g2=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"})),m2=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=I.useMemo(()=>GS(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const l=c.parentElement;l&&l.classList.toggle("expanded")};return t!=null&&t.length?d.jsx(nT,{children:s.map(i=>d.jsxs(rT,{className:"expanded",children:[d.jsxs(oT,{onClick:a,children:[d.jsx(sT,{variant:"body2",children:i.type}),d.jsx(g2,{className:"toggle-arrow-icon"})]}),d.jsx(aT,{children:i.entities.map(c=>d.jsx(tT,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):d.jsx(_l,{message:lA})},iT=u.styled(u.Stack)`
|
|
2753
2766
|
padding: 18px 0;
|
|
2754
2767
|
row-gap: 12px;
|
|
2755
2768
|
box-sizing: border-box;
|
|
2756
|
-
`,
|
|
2769
|
+
`,cT=u.styled(u.Stack)`
|
|
2757
2770
|
cursor: pointer;
|
|
2758
2771
|
position: relative;
|
|
2759
2772
|
z-index: 1;
|
|
@@ -2764,7 +2777,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2764
2777
|
background-color: rgba(0, 0, 0, 0.04);
|
|
2765
2778
|
z-index: -1;
|
|
2766
2779
|
}
|
|
2767
|
-
`,
|
|
2780
|
+
`,lT=({searchText:e,connectorName:t,formData:n,onClick:r})=>d.jsxs(cT,{onClick:r,children:[d.jsx(u.Typography,{color:u.theme.palette.gray.gray1,children:e}),d.jsxs(u.Typography,{color:u.theme.palette.gray.gray3,fontSize:"12px",textTransform:"capitalize",children:[t," - ",n==null?void 0:n.searchObject]})]}),uT=({searchText:e,connectorName:t,options:n,onSearch:r})=>{const o=s=>{r({formId:s.id,searchObject:s.searchObject,searchText:e})};return d.jsx(iT,{children:n.map(s=>d.jsx(lT,{searchText:e,connectorName:t,formData:s,onClick:()=>o(s)},t+(s==null?void 0:s.searchObject)))})},dT=u.styled(u.Stack)`
|
|
2768
2781
|
padding: 12px 12px 12px 11px;
|
|
2769
2782
|
border: 1px solid ${u.theme.palette.gray.gray5};
|
|
2770
2783
|
border-radius: 8px;
|
|
@@ -2778,26 +2791,26 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2778
2791
|
transform: translateX(6px);
|
|
2779
2792
|
}
|
|
2780
2793
|
}
|
|
2781
|
-
`,
|
|
2794
|
+
`,fT=u.styled(u.Stack)`
|
|
2782
2795
|
padding: 14px 0;
|
|
2783
2796
|
row-gap: 12px;
|
|
2784
2797
|
column-gap: 16px;
|
|
2785
2798
|
box-sizing: border-box;
|
|
2786
|
-
`,
|
|
2799
|
+
`,pT=u.styled(u.Stack)`
|
|
2787
2800
|
padding: 8px 0;
|
|
2788
2801
|
row-gap: 12px;
|
|
2789
2802
|
box-sizing: border-box;
|
|
2790
|
-
`,
|
|
2803
|
+
`,hT=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return d.jsxs(dT,{onClick:t,direction:"row",children:[d.jsx(u.Stack,{flexGrow:1,children:d.jsx(u.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),d.jsx(g2,{})]},n)},gT=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=I.useContext(en),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return d.jsx(_l,{message:"No results found"});const c=l=>{o(l),i==null||i(Nt.email_logging_search_result_selected,{app_name:e,object_name:l.displayValue,object_key:l.entityType})};return d.jsxs(fT,{children:[d.jsxs(u.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),d.jsx(pT,{children:t.map(l=>d.jsx(hT,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},mT=u.styled(u.Stack)`
|
|
2791
2804
|
height: 100%;
|
|
2792
2805
|
row-gap: 8px;
|
|
2793
2806
|
align-items: center;
|
|
2794
2807
|
justify-content: center;
|
|
2795
|
-
`,
|
|
2808
|
+
`,bT=u.styled(Sl)`
|
|
2796
2809
|
width: 32px;
|
|
2797
2810
|
height: 32px;
|
|
2798
2811
|
fill: #506dff;
|
|
2799
2812
|
animation: ${Za} 1s linear infinite;
|
|
2800
|
-
`,
|
|
2813
|
+
`,yT=({message:e="Fetching details"})=>d.jsxs(mT,{children:[d.jsx(bT,{}),d.jsx(u.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),xT=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await Ee({url:rt(GA,{conversationId:e}),method:Oe.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},CT=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},Xa=({conversationId:e})=>{const t=Zr(),{queryKey:n,polledLogsStatus:r}=I.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=Qp({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:xT,isSatisfied:CT,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return Zt({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},ET=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await Ee({url:rt(zA,{conversationId:t}),data:e,method:Oe.POST});return n==null?void 0:n.data}catch(n){throw Se({message:vn,type:qe}),console.error(n),n}},vT=({onSuccess:e})=>Xt({mutationFn:ET,onSuccess:e}),wT=u.styled(u.Stack)`
|
|
2801
2814
|
padding: 12px;
|
|
2802
2815
|
flex-flow: row nowrap;
|
|
2803
2816
|
justify-content: flex-end;
|
|
@@ -2814,7 +2827,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2814
2827
|
padding: 7px 10px;
|
|
2815
2828
|
}
|
|
2816
2829
|
}
|
|
2817
|
-
`,
|
|
2830
|
+
`,IT=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=I.useContext(en),{refetch:a}=Xa({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const m=Object.values(e),h=m.map(b=>b.displayValue).join(", "),p=Array.from(new Set(m.map(b=>b==null?void 0:b.entityType)));i==null||i(Nt.email_logging_log_config_saved,{app_name:n,num_of_keys_selected:m.length,list_of_keys:h,list_of_objects:p.join(", "),num_of_objects_selected:p.length})},{mutate:l,isPending:f}=vT({onSuccess:c}),g=Object.keys(e).length>0,y=()=>{const m=Object.values(e);l({conversationId:o,payload:{selectedEntities:m,connectorId:r,autoLogEnabled:!0}})},E=()=>{t==null||t(),i==null||i(Nt.email_logging_log_config_canceled,{app_name:n})};return d.jsxs(wT,{children:[d.jsx(u.Button,{variant:"text",size:"small",onClick:E,children:"Cancel"}),d.jsxs(u.Button,{variant:"contained",size:"small",className:"primary-action",disabled:f||!g,onClick:y,children:[f?d.jsx(u.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},_T="Tell us more (optional)",ST=u.styled(u.Box)`
|
|
2818
2831
|
width: ${({width:e})=>e||"440px"};
|
|
2819
2832
|
border-radius: 12px;
|
|
2820
2833
|
padding: 16px;
|
|
@@ -2827,15 +2840,15 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2827
2840
|
flex-direction: row;
|
|
2828
2841
|
margin-bottom: 12px;
|
|
2829
2842
|
}
|
|
2830
|
-
`,
|
|
2843
|
+
`,AT=u.styled(u.Box)`
|
|
2831
2844
|
border-bottom: 1px solid ${u.theme.palette.gray.gray6};
|
|
2832
2845
|
margin: 12px -16px;
|
|
2833
|
-
`,
|
|
2846
|
+
`,TT=u.styled(u.Box)`
|
|
2834
2847
|
display: flex;
|
|
2835
2848
|
justify-content: flex-end;
|
|
2836
2849
|
margin-top: 30px;
|
|
2837
2850
|
gap: 8px;
|
|
2838
|
-
`,
|
|
2851
|
+
`,LT=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=_T})=>{const[c,l]=I.useState(""),[f,g]=I.useState(""),y=b=>{l(b.target.value)},E=b=>{b.stopPropagation();const{value:x}=(b==null?void 0:b.target)||{};g(x)},m=()=>{t({feedbackOption:c,feedbackComment:f})},h=()=>{e==null||e()},p=r?!c:!f;return d.jsxs(ST,{width:s,children:[d.jsx(u.Typography,{variant:"h3",children:o}),d.jsx(AT,{}),r?d.jsx(u.FormControl,{children:d.jsx(u.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:y,children:a.map(b=>d.jsx(u.FormControlLabel,{value:b.value,control:d.jsx(u.Radio,{}),label:b.label},b.value))})}):null,d.jsx(wr,{type:"text",placeholder:i,value:f,name:"feedbackComment",inputChangeHandler:E,multiline:!0,rows:5,limit:250,validation:{validate:Ac()}}),d.jsxs(TT,{children:[d.jsx(u.Button,{variant:"text",color:"primary",style:{color:u.theme.palette.gray.gray3},disabled:n,onClick:h,children:"Cancel"}),d.jsx(n2,{variant:"contained",color:"primary",isLoading:n,disabled:p,label:"Submit",onClick:m})]})]})},OT=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await Ee({url:YA.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return Se({message:yA,type:Ut}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),Se({message:xA,type:qe}),n}};function FT({onSuccess:e}){return Xt({mutationFn:OT,onSuccess:e})}const kT=u.styled(u.Stack)`
|
|
2839
2852
|
flex-flow: row nowrap;
|
|
2840
2853
|
justify-content: space-between;
|
|
2841
2854
|
align-items: center;
|
|
@@ -2847,7 +2860,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2847
2860
|
&:disabled {
|
|
2848
2861
|
opacity: 0.4;
|
|
2849
2862
|
}
|
|
2850
|
-
`,
|
|
2863
|
+
`,DT=u.styled(u.Typography)`
|
|
2851
2864
|
color: #6f7c90;
|
|
2852
2865
|
font-size: 11px;
|
|
2853
2866
|
font-weight: 400;
|
|
@@ -2856,51 +2869,51 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2856
2869
|
`,y2=u.styled(u.Tooltip)`
|
|
2857
2870
|
padding: 6px;
|
|
2858
2871
|
border-radius: 6px;
|
|
2859
|
-
`,
|
|
2872
|
+
`,NT=()=>{const{conversationId:e}=I.useContext(en),[t,n]=I.useState(!1),r=()=>{n(!1)},{mutate:o,isPending:s}=FT({onSuccess:r}),a=()=>{o({conversationId:e,feedbackData:{feedback_type:f2,positive_feedback:!1}})},i=()=>{n(!0)},c=({feedbackComment:l,feedbackOption:f})=>{o({conversationId:e,feedbackData:{feedback_type:f2,comment:l,option:f,positive_feedback:!1}})};return d.jsxs(kT,{children:[d.jsx(DT,{children:bA}),d.jsxs(u.Stack,{flexDirection:"row",alignItems:"flex-end",children:[d.jsx(y2,{arrow:!0,title:gA,placement:"top",children:d.jsx(b2,{className:"feedback-button",size:"small",onClick:a,disabled:s,children:d.jsx(o2,{})})}),d.jsx(y2,{arrow:!0,title:mA,placement:"top",children:d.jsx(b2,{className:"feedback-button",size:"small",onClick:i,disabled:s,children:d.jsx(s2,{})})})]}),d.jsx(_r,{shown:t,setShown:n,borderRadius:12,sx:{zIndex:15002},children:d.jsx(LT,{onCancel:()=>n(!1),onSubmit:c,isLoading:s,title:hA,feedbackOptions:CA,width:"440px"})})]})},RT=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await Ee({url:rt(HA,{conversationId:e}),method:Oe.GET}),n=t==null?void 0:t.data;return(n==null?void 0:n.results)??[]}catch(t){throw console.error(t),t}},MT=({conversationId:e,enabled:t=!0})=>Zt({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>RT({conversationId:e}),enabled:!!e&&t}),PT=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await Ee({url:rt(XA,{formId:e}),data:{search_string:n,args:{}},method:Oe.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 Se({message:vn,type:qe}),console.error(r),r}},jT=({onSuccess:e})=>Xt({mutationFn:PT,onSuccess:e}),BT=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await Ee({url:rt(JA,{conversationId:t}),data:e,method:Oe.PATCH});return n==null?void 0:n.data}catch(n){throw Se({message:vn,type:qe}),console.error(n),n}},VT=({onSuccess:e})=>Xt({mutationFn:BT,onSuccess:e}),GT=u.styled(u.Stack)`
|
|
2860
2873
|
color: #343c45;
|
|
2861
2874
|
height: 100%;
|
|
2862
2875
|
box-sizing: border-box;
|
|
2863
|
-
`,
|
|
2876
|
+
`,HT=u.styled(u.Stack)`
|
|
2864
2877
|
flex-flow: row nowrap;
|
|
2865
2878
|
justify-content: space-between;
|
|
2866
2879
|
align-items: center;
|
|
2867
2880
|
column-gap: 8px;
|
|
2868
2881
|
padding: 12px 16px;
|
|
2869
2882
|
background-color: #f6f8fc;
|
|
2870
|
-
`,
|
|
2883
|
+
`,WT=u.styled(u.Stack)`
|
|
2871
2884
|
flex-flow: row nowrap;
|
|
2872
2885
|
justify-content: flex-start;
|
|
2873
2886
|
align-items: center;
|
|
2874
2887
|
column-gap: 8px;
|
|
2875
|
-
`,
|
|
2888
|
+
`,ZT=u.styled(u.Stack)`
|
|
2876
2889
|
flex-flow: row nowrap;
|
|
2877
2890
|
justify-content: flex-end;
|
|
2878
2891
|
align-items: center;
|
|
2879
2892
|
column-gap: 6px;
|
|
2880
|
-
`,
|
|
2893
|
+
`,XT=u.styled(u.Stack)`
|
|
2881
2894
|
padding: 4px;
|
|
2882
2895
|
background-color: #ffffff;
|
|
2883
2896
|
border-radius: 50%;
|
|
2884
|
-
`,
|
|
2897
|
+
`,zT=u.styled("img")`
|
|
2885
2898
|
width: 16px;
|
|
2886
2899
|
height: 16px;
|
|
2887
|
-
`,
|
|
2900
|
+
`,YT=u.styled(u.Stack)`
|
|
2888
2901
|
flex-grow: 1;
|
|
2889
|
-
`,
|
|
2902
|
+
`,x2=u.styled(u.Stack)`
|
|
2890
2903
|
flex-grow: 1;
|
|
2891
2904
|
flex-basis: 0;
|
|
2892
2905
|
min-height: 0;
|
|
2893
|
-
`,
|
|
2906
|
+
`,C2=u.styled(u.Stack)`
|
|
2894
2907
|
padding: 0 16px;
|
|
2895
2908
|
min-height: 100%;
|
|
2896
2909
|
max-height: 100%;
|
|
2897
2910
|
overflow-y: auto;
|
|
2898
2911
|
scrollbar-width: thin;
|
|
2899
2912
|
scrollbar-color: #97a3b7 transparent;
|
|
2900
|
-
`,
|
|
2913
|
+
`,JT=u.styled(u.Stack)`
|
|
2901
2914
|
padding: 12px 16px 0;
|
|
2902
2915
|
position: relative;
|
|
2903
|
-
`,
|
|
2916
|
+
`,qT=u.styled(u.OutlinedInput)`
|
|
2904
2917
|
padding: 0;
|
|
2905
2918
|
fieldset {
|
|
2906
2919
|
border-radius: 4px;
|
|
@@ -2919,7 +2932,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2919
2932
|
border-width: 1px !important;
|
|
2920
2933
|
}
|
|
2921
2934
|
}
|
|
2922
|
-
`,
|
|
2935
|
+
`,QT=u.styled(u.Stack)`
|
|
2923
2936
|
padding: 8px 0 8px 12px;
|
|
2924
2937
|
justify-content: center;
|
|
2925
2938
|
align-items: center;
|
|
@@ -2928,12 +2941,12 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2928
2941
|
height: 15px;
|
|
2929
2942
|
fill: #4d596c;
|
|
2930
2943
|
}
|
|
2931
|
-
|
|
2944
|
+
`,$T=e=>d.jsx(u.Switch,{disableRipple:!0,...e}),UT=u.styled($T)(({disabled:e})=>({padding:0,width:"32px",height:"16px","& .MuiSwitch-switchBase":{padding:2,margin:0,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:e?"#d6dde8":"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:e?"#4d596c":"#506DFF"}}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:12,height:12},"& .MuiSwitch-track":{borderRadius:8}})),KT=u.styled(Sl)`
|
|
2932
2945
|
width: 14px;
|
|
2933
2946
|
height: 14px;
|
|
2934
2947
|
fill: #4d596c;
|
|
2935
2948
|
animation: ${Za} 1s linear infinite;
|
|
2936
|
-
`,Sr=uo.CaseView,
|
|
2949
|
+
`,Sr=uo.CaseView,eL=({emailLogStatus:e,close:t})=>{const{emailLogSettings:n,autoLogEnabled:r,selectedEntities:o,formList:s}=e,{connectorName:a,connectorId:i,logoUrl:c}=n??{},l=(o==null?void 0:o.length)>0,[f,g]=I.useState(""),[y,E]=I.useState([]),[m,h]=I.useState({}),{conversationId:p,connectorFunctions:b}=I.useContext(en),x=b==null?void 0:b.sendTrackingEvent,{data:C,isError:w,isLoading:v}=MT({conversationId:p,enabled:!l}),{refetch:_}=Xa({conversationId:p}),A=()=>{x==null||x(Nt.email_logging_search_results_found,{app_name:a,search_keyword:f})},{mutate:S,data:L,isPending:N,isIdle:D,reset:k}=jT({onSuccess:A}),{mutate:M,isPending:B}=VT({onSuccess:_}),{results:Y=[],...J}=L??{},H=I.useMemo(()=>{const W={},R=[];for(const X of y){const $=X.entityType+X.displayValue;W[$]||R.push(X),W[$]=X}for(const X of C??[]){const $=X.entityType+X.displayValue;W[$]||R.push(X),W[$]=X}return R},[C,y]),G=W=>{g(W.target.value),D||k()},q=W=>{const{entityType:R,displayValue:X}=W;h($=>({...$,[R+X]:W})),E($=>[W,...$]),g(""),k()},oe=()=>{x==null||x(Nt.email_logging_search_initiated,{app_name:a})},te=()=>{M({payload:{autoLogEnabled:!r},conversationId:p});const W=r?Nt.email_logging_auto_log_disabled:Nt.email_logging_auto_log_enabled;x==null||x(W,{app_name:a})},V=v||N;return d.jsxs(GT,{children:[d.jsxs(HT,{children:[d.jsxs(WT,{children:[d.jsx(XT,{children:d.jsx(zT,{src:c,alt:"connector"})}),d.jsx(u.Typography,{children:"Sync conversation"})]}),d.jsxs(ZT,{children:[B?d.jsx(KT,{}):null,l?d.jsx(u.Tooltip,{arrow:!0,title:r?nA:rA,children:d.jsx(u.Stack,{children:d.jsx(UT,{checked:r,value:r,onClick:te,disabled:B})})}):null]})]}),d.jsx(YT,{children:d.jsxs(uo,{children:[d.jsxs(Sr,{condition:l,children:[d.jsx(x2,{children:d.jsx(C2,{children:d.jsx(m2,{connectorName:a,entities:o,disabled:!0})})}),d.jsx(NT,{})]},"disabled-view"),d.jsxs(Sr,{fallback:!0,children:[d.jsx(JT,{children:d.jsx(qT,{type:"text",name:"search",value:f,onChange:G,onFocus:oe,startAdornment:d.jsx(QT,{children:d.jsx(Jp,{})}),size:"small"})}),d.jsx(x2,{children:d.jsx(C2,{children:d.jsxs(uo,{children:[d.jsx(Sr,{condition:V,children:d.jsx(yT,{message:N?"Searching...":"Loading..."})},"loading"),d.jsx(Sr,{condition:f===""&&H.length>0,children:d.jsx(m2,{connectorName:a,checkedEntities:m,setCheckedEntities:h,entities:H??[]})},"entity-suggestions"),d.jsx(Sr,{condition:!!f&&D,children:d.jsx(uT,{searchText:f,connectorName:a,options:s,onSearch:S})},"search-options"),d.jsx(Sr,{condition:!!f&&!D,children:d.jsx(gT,{connectorName:a,results:Y,...J,addEntity:q})},"search-results"),d.jsx(Sr,{condition:!H.length&&w,children:d.jsx(_l,{message:vn})},"error")]})})}),f?null:d.jsx(IT,{connectorName:a,connectorId:i,checkedEntities:m,close:t})]},"select-logs")]})})]})},tL=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await Ee({url:rt(WA,{conversationId:e}),method:Oe.POST});return t==null?void 0:t.data}catch(t){throw Se({message:vn,type:qe}),console.error(t),t}},nL=({onSuccess:e})=>Xt({mutationFn:tL,onSuccess:e}),rL=u.styled(u.Stack)`
|
|
2937
2950
|
border-radius: 100px;
|
|
2938
2951
|
background: #f6f8fc;
|
|
2939
2952
|
flex-flow: row nowrap;
|
|
@@ -2942,7 +2955,7 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2942
2955
|
padding: 8px;
|
|
2943
2956
|
width: fit-content;
|
|
2944
2957
|
cursor: pointer;
|
|
2945
|
-
`,
|
|
2958
|
+
`,oL=u.styled(u.Button)`
|
|
2946
2959
|
padding: 0;
|
|
2947
2960
|
background: none;
|
|
2948
2961
|
border: none;
|
|
@@ -2951,4 +2964,35 @@ Do you want to continue?`,Cv="Select an object to create",xv="Select an object t
|
|
|
2951
2964
|
line-height: 14px;
|
|
2952
2965
|
color: #506dff;
|
|
2953
2966
|
margin-left: 6px;
|
|
2954
|
-
`,
|
|
2967
|
+
`,sL=[Te.PENDING,Te.LOGGED,Te.NOT_LOGGED,Te.PAUSED],aL=[Te.LOGGED,Te.PAUSED],iL=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=I.useContext(en),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=Xa({conversationId:r}),{mutate:i,isPending:c}=nL({onSuccess:a}),l=qS[e],f=US[e],g=$S[e],{emailLogSettings:y,messageLogStatus:E}=t,{connectorName:m}=y??{},{logged:h,total:p}=E??{},b=aL.includes(e)&&p?` (${h}/${p})`:"",x=e===Te.ERROR,C=sL.includes(e),w=({close:_})=>d.jsx(eL,{close:_,emailLogStatus:t}),v=()=>{i({conversationId:r}),s==null||s(Nt.email_logging_failed_clicked,{app_name:m})};return d.jsx(BA,{logSettings:y,status:e,isAdmin:n,retry:x,renderEntities:C?w:void 0,children:d.jsxs(rL,{style:{cursor:C?"pointer":"not-allowed"},children:[l,g?g(`${f} ${b}`):null,x?d.jsx(oL,{variant:"text",disabled:c,onClick:v,children:"Retry"}):null]})})},Al=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=HS(e);return je.createPortal(d.jsx(iL,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},cL=({observer:e})=>{var E;const[t,n]=I.useState({}),[r,o]=I.useState({}),[s,a]=I.useState({}),{conversationId:i}=I.useContext(en),{data:c}=Xa({conversationId:i}),l=(E=c==null?void 0:c.emailLogSettings)==null?void 0:E.enabled,f=m=>{n(h=>({...h,...m}))},g=m=>{o(h=>({...h,...m}))},y=m=>{a(m)};return I.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:f,setComposeButtonContainers:g,setSubjectButtonContainers:y}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?d.jsxs(d.Fragment,{children:[Object.entries(t).map(([m,h])=>d.jsx(Al,{emailLogStatus:c,containerElement:h.element,messageId:h.messageId,legacyMessageId:h.legacyMessageId},m)),Object.entries(r).map(([m,h])=>d.jsx(Al,{emailLogStatus:c,containerElement:h.element},m)),Object.entries(s).map(([m,h])=>d.jsx(Al,{emailLogStatus:c,containerElement:h.element},m))]}):null},lL=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=I.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return d.jsx(en.Provider,{value:o,children:r})},uL=({children:e,...t})=>d.jsx(uc,{store:bl,children:d.jsx(u.HiverProvider,{inter:!0,children:d.jsx(ml,{children:d.jsx(I.Suspense,{fallback:d.jsx(d.Fragment,{}),children:d.jsx(lL,{...t,children:e})})})})}),za=".hiver-log-crm-button",Ya=".hiver-log-crm-compose-button",E2=".hiver-log-crm-subject-button";class dL{constructor({emailNodeFilter:t,composeNodeFilter:n,emailHeaderTargetSelector:r=".gE.iv.gt .c2",composeHeaderTargetSelector:o=".aoD.hl .bgW",emailMessageContainerSelector:s=".adn.ads",subjectContainer:a=null,disableAutoLogInEmail:i=!1,disableAutoLogInCompose:c=!1,disableAutoLogInSubject:l=!1}={}){Pe(this,"observer",null);Pe(this,"setComposeButtonContainers",null);Pe(this,"setEmailButtonContainers",null);Pe(this,"setSubjectButtonContainers",null);Pe(this,"emailNodeFilter");Pe(this,"composeNodeFilter");Pe(this,"emailHeaderTargetSelector");Pe(this,"composeHeaderTargetSelector");Pe(this,"emailMessageContainerSelector");Pe(this,"disableAutoLogInEmail");Pe(this,"disableAutoLogInCompose");Pe(this,"disableAutoLogInSubject");Pe(this,"subjectContainer",null);Pe(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(za).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(za))return;const i=document.createElement("div");i.classList.add(za.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}})})});Pe(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Ya).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Ya))return;const s=document.createElement("div");s.classList.add(Ya.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});Pe(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(E2);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(E2.slice(1)),n.style.display="inline-block",(o=this.subjectContainer)==null||o.appendChild(n),(s=this.setSubjectButtonContainers)==null||s.call(this,{crm_subject:{element:n}})});this.emailNodeFilter=t||this._defaultEmailNodeFilter,this.composeNodeFilter=n||this._defaultComposeNodeFilter,this.emailHeaderTargetSelector=r,this.composeHeaderTargetSelector=o,this.emailMessageContainerSelector=s,this.subjectContainer=a,this.disableAutoLogInEmail=i,this.disableAutoLogInCompose=c,this.disableAutoLogInSubject=l}_defaultEmailNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("a3s")||(r=t.classList)!=null&&r.contains("ii")||typeof t.querySelector=="function"&&t.querySelector(".a3s")))}_defaultComposeNodeFilter(t){var n,r;return!!(t.nodeType===1&&t instanceof Element&&((n=t.classList)!=null&&n.contains("hiver-new-email-top-div")||(r=t.classList)!=null&&r.contains("hiver-compose-bar")))}_initMutationObserver(){this.observer&&this.observer.disconnect(),this.observer=new MutationObserver(t=>{let n=!1,r=!1;t.forEach(o=>{if(o.type==="childList"){const s=Array.from(o.addedNodes);this.disableAutoLogInEmail||s.some(this.emailNodeFilter)&&(n=!0),this.disableAutoLogInCompose||s.some(this.composeNodeFilter)&&(r=!0)}}),n&&setTimeout(()=>this._addLogButtonsOnEmail(),100),r&&setTimeout(()=>this._addLogButtonsOnCompose(),100)}),this.observer.observe(document.body,{childList:!0,subtree:!0})}_init(){this._addLogButtonsOnEmail(),this._addLogButtonsOnCompose(),this._addLogButtonOnSubject()}observe({setComposeButtonContainers:t,setEmailButtonContainers:n,setSubjectButtonContainers:r}){this.setComposeButtonContainers=t,this.setEmailButtonContainers=n,this.setSubjectButtonContainers=r,this._init(),(!this.disableAutoLogInEmail||!this.disableAutoLogInCompose)&&this._initMutationObserver()}destroy(){document.querySelectorAll(za).forEach(r=>r.remove()),document.querySelectorAll(Ya).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const fL=({observer:e,...t})=>d.jsx(yl,{children:d.jsxs(uL,{...t,children:[d.jsx(cL,{observer:e}),je.createPortal(d.jsx(xl,{id:"toast-message",children:d.jsx(ti,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),pL=e=>Ee({url:JE,method:Oe.POST,data:e}),hL=e=>Ee({url:qE,method:Oe.POST,data:e}),gL=(...e)=>{},mL=e=>{const t=new AbortController,n=async(r=0)=>{try{gL("getConnectorsList",r);const o=await $0(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)}},bL=()=>{const e={connectorApiPending:!1,connectorApiAbort:null};if(!Pt())throw new Error("Please initiate bifrost by calling initConnectorsBifrost function before creating app store");const n=A6({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:l,abort:f}=mL(c);e.connectorApiAbort=f,l().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,l=[...i].sort((f,g)=>{const y=f.lastAccessed??0,E=g.lastAccessed??0;return y===E?0:y>E?-1:1}).map((f,g)=>({...f,sidebarView:g<c}));n.setData(l,"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"),l=c==null?void 0:c.find(g=>g.id===i);if(!l||l.sidebarView)return;const f=new Date().getTime();l.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},yL=({children:e})=>d.jsx(u.HiverProvider,{inter:!0,children:e}),xL=u.styled(({className:e,...t})=>d.jsx(u.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${u.tooltipClasses.tooltip}`]:{backgroundColor:"#fff",padding:0,width:"min-content",borderRadius:"12px",maxWidth:"90vw",boxShadow:"0px 3px 15px 0px #00000040",color:"#000"},[`& .${u.tooltipClasses.arrow}`]:{color:"#fff !important"}})),CL=u.styled(u.Stack)`
|
|
2968
|
+
box-sizing: content-box !important;
|
|
2969
|
+
display: flex;
|
|
2970
|
+
flex-direction: column;
|
|
2971
|
+
gap: 6px;
|
|
2972
|
+
width: 290px;
|
|
2973
|
+
padding: 16px;
|
|
2974
|
+
`,EL=u.styled(u.Typography)`
|
|
2975
|
+
font-size: 14px;
|
|
2976
|
+
font-weight: 600;
|
|
2977
|
+
line-height: 20px;
|
|
2978
|
+
letter-spacing: -0.28px;
|
|
2979
|
+
`,vL=u.styled(u.Typography)`
|
|
2980
|
+
font-size: 13px;
|
|
2981
|
+
font-weight: 400;
|
|
2982
|
+
line-height: 20px;
|
|
2983
|
+
letter-spacing: -0.13px;
|
|
2984
|
+
`,wL=u.styled(u.Button)`
|
|
2985
|
+
align-self: flex-end;
|
|
2986
|
+
display: flex;
|
|
2987
|
+
padding: 4px 12px;
|
|
2988
|
+
align-items: center;
|
|
2989
|
+
gap: 6px;
|
|
2990
|
+
border-radius: 4px;
|
|
2991
|
+
background: ${u.theme.palette.purple.primary};
|
|
2992
|
+
color: ${u.theme.palette.gray.white};
|
|
2993
|
+
font-size: 12px;
|
|
2994
|
+
font-weight: 500;
|
|
2995
|
+
letter-spacing: 0.4px;
|
|
2996
|
+
line-height: 20px;
|
|
2997
|
+
margin-top: 14px;
|
|
2998
|
+
`,IL=({children:e,zIndex:t,onClose:n})=>{const r=d.jsxs(CL,{children:[d.jsx(EL,{variant:"h2",color:"text.primary",children:"Split apps view"}),d.jsx(vL,{variant:"body2",color:"text.secondary",children:"Each connected app now has its own tab, making it easier to view app-specific data"}),d.jsx(wL,{variant:"contained",color:"primary",onClick:n,children:"Dismiss"})]});return d.jsx(xL,{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})},v2=Yo("LOCAL"),_L="connector-library-split-apps-nudge",SL=({open:e,targetRef:t,endElRef:n,zIndex:r,storageKey:o=_L,onClose:s})=>{const[a,i]=I.useState(()=>v2.getItem(o)==="true"),c=()=>{v2.setItem(o,"true"),i(!0),s()},l=f=>d.jsx(IL,{zIndex:r,onClose:c,children:f});return a?null:d.jsx(BE,{open:e,targetRef:t,endElRef:n,padding:8,zIndex:r,renderHighlight:l})},AL=e=>d.jsx(yL,{children:d.jsx(SL,{...e})});ce.ActionQueue=VS,ce.CONNECTORS_AGENT_EVENTS=gl,ce.ConnectorCardList=Q_,ce.EmailLogger=fL,ce.GmailLogObserver=dL,ce.HiverConnectorBifrostAuth=Ee,ce.IntegrationSense=jS,ce.SplitAppsNudge=AL,ce.addNewConnectors=Yh,ce.createAppStore=bL,ce.dismissNotification=wu,ce.fetchAppCfValues=pL,ce.fetchDeferredAppCfValues=hL,ce.getConnectorsBifrostConfigs=Pt,ce.getMetaData=h6,ce.initConnectorsBifrost=x3,ce.setCaptureFeedbackOnDemand=Jh,ce.shouldCaptureFeedback=wi,ce.shouldShowNotification=vu,ce.useConnectorSelectedEmail=L_,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})});
|