@hiver/connector-agent 4.6.0 → 4.6.1-cfApps-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/appCustomField.d.ts +12 -0
- package/api/appCustomField.d.ts.map +1 -0
- package/constants/endpoints.d.ts +1 -0
- package/constants/endpoints.d.ts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.es.js +850 -845
- package/index.umd.js +123 -123
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(le,_){typeof exports=="object"&&typeof module<"u"?_(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"],_):(le=typeof globalThis<"u"?globalThis:le||self,_(le["@hiver/connector-agent"]={},le.React,le.ReactDOM,le.hiverUiKit))})(this,function(le,_,
|
|
1
|
+
(function(le,_){typeof exports=="object"&&typeof module<"u"?_(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"],_):(le=typeof globalThis<"u"?globalThis:le||self,_(le["@hiver/connector-agent"]={},le.React,le.ReactDOM,le.hiverUiKit))})(this,function(le,_,Ne,f){"use strict";var vS=Object.defineProperty;var Wp=le=>{throw TypeError(le)};var xS=(le,_,Ne)=>_ in le?vS(le,_,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):le[_]=Ne;var De=(le,_,Ne)=>xS(le,typeof _!="symbol"?_+"":_,Ne),ll=(le,_,Ne)=>_.has(le)||Wp("Cannot "+Ne);var F=(le,_,Ne)=>(ll(le,_,"read from private field"),Ne?Ne.call(le):_.get(le)),ie=(le,_,Ne)=>_.has(le)?Wp("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(le):_.set(le,Ne),K=(le,_,Ne,f)=>(ll(le,_,"write to private field"),f?f.call(le,Ne):_.set(le,Ne),Ne),he=(le,_,Ne)=>(ll(le,_,"access private method"),Ne);var Ma=(le,_,Ne,f)=>({set _(ja){K(le,_,ja,Ne)},get _(){return F(le,_,f)}});var ur,Fn,Xr,kp,zr,Dn,Yr,Np,dr,Rp,Jr,qr,Mt,fr,ct,Wo,pr,Yt,En,Mp,on,Pp,sn,ut,hr,an,Zn,jp,bn,Jt,Zo,Bp,Ze,kn,Nn,$r,Qr,Rn,Ur,Kr,Vp,vt,be,Xo,dt,gr,eo,Mn,cn,zo,to,no,mr,br,Pn,ro,Le,es,ul,dl,fl,pl,hl,gl,ml,Zp,Gp,jn,Bn,xt,yn,Cn,Pa,bl,Hp;function ja(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=ja(_);var fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ba={exports:{}},lo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -18,21 +18,21 @@
|
|
|
18
18
|
`+ne+O}}var j=!1,te;{var Ce=typeof WeakMap=="function"?WeakMap:Map;te=new Ce}function Z(O,W){if(!O||j)return"";{var U=te.get(O);if(U!==void 0)return U}var de;j=!0;var Fe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Pe;Pe=J.current,J.current=null,V();try{if(W){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(wt){de=wt}Reflect.construct(O,[],ve)}else{try{ve.call()}catch(wt){de=wt}O.call(ve.prototype)}}else{try{throw Error()}catch(wt){de=wt}O()}}catch(wt){if(wt&&de&&typeof wt.stack=="string"){for(var ge=wt.stack.split(`
|
|
19
19
|
`),pt=de.stack.split(`
|
|
20
20
|
`),Ye=ge.length-1,Ue=pt.length-1;Ye>=1&&Ue>=0&&ge[Ye]!==pt[Ue];)Ue--;for(;Ye>=1&&Ue>=0;Ye--,Ue--)if(ge[Ye]!==pt[Ue]){if(Ye!==1||Ue!==1)do if(Ye--,Ue--,Ue<0||ge[Ye]!==pt[Ue]){var Pt=`
|
|
21
|
-
`+ge[Ye].replace(" at new "," at ");return O.displayName&&Pt.includes("<anonymous>")&&(Pt=Pt.replace("<anonymous>",O.displayName)),typeof O=="function"&&te.set(O,Pt),Pt}while(Ye>=1&&Ue>=0);break}}}finally{j=!1,J.current=Pe,H(),Error.prepareStackTrace=Fe}var co=O?O.displayName||O.name:"",
|
|
21
|
+
`+ge[Ye].replace(" at new "," at ");return O.displayName&&Pt.includes("<anonymous>")&&(Pt=Pt.replace("<anonymous>",O.displayName)),typeof O=="function"&&te.set(O,Pt),Pt}while(Ye>=1&&Ue>=0);break}}}finally{j=!1,J.current=Pe,H(),Error.prepareStackTrace=Fe}var co=O?O.displayName||O.name:"",vr=co?se(co):"";return typeof O=="function"&&te.set(O,vr),vr}function Xe(O,W,U){return Z(O,!1)}function Me(O){var W=O.prototype;return!!(W&&W.isReactComponent)}function Qe(O,W,U){if(O==null)return"";if(typeof O=="function")return Z(O,Me(O));if(typeof O=="string")return se(O);switch(O){case l:return se("Suspense");case d:return se("SuspenseList")}if(typeof O=="object")switch(O.$$typeof){case c:return Xe(O.render);case g:return Qe(O.type,W,U);case b:{var de=O,Fe=de._payload,Pe=de._init;try{return Qe(Pe(Fe),W,U)}catch{}}}return""}var ot=Object.prototype.hasOwnProperty,vn={},kt=m.ReactDebugCurrentFrame;function tt(O){if(O){var W=O._owner,U=Qe(O.type,O._source,W?W.type:null);kt.setExtraStackFrame(U)}else kt.setExtraStackFrame(null)}function ze(O,W,U,de,Fe){{var Pe=Function.call.bind(ot);for(var ve in O)if(Pe(O,ve)){var ge=void 0;try{if(typeof O[ve]!="function"){var pt=Error((de||"React class")+": "+U+" type `"+ve+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof O[ve]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw pt.name="Invariant Violation",pt}ge=O[ve](W,ve,de,U,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ye){ge=Ye}ge&&!(ge instanceof Error)&&(tt(Fe),v("%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).",de||"React class",U,ve,typeof ge),tt(null)),ge instanceof Error&&!(ge.message in vn)&&(vn[ge.message]=!0,tt(Fe),v("Failed %s type: %s",U,ge.message),tt(null))}}}var yr=Array.isArray;function Nt(O){return yr(O)}function Yo(O){{var W=typeof Symbol=="function"&&Symbol.toStringTag,U=W&&O[Symbol.toStringTag]||O.constructor.name||"Object";return U}}function oo(O){try{return Vn(O),!1}catch{return!0}}function Vn(O){return""+O}function Gn(O){if(oo(O))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Yo(O)),Vn(O)}var ue=m.ReactCurrentOwner,Oe={key:!0,ref:!0,__self:!0,__source:!0},st,Et,It;It={};function Cr(O){if(ot.call(O,"ref")){var W=Object.getOwnPropertyDescriptor(O,"ref").get;if(W&&W.isReactWarning)return!1}return O.ref!==void 0}function Hn(O){if(ot.call(O,"key")){var W=Object.getOwnPropertyDescriptor(O,"key").get;if(W&&W.isReactWarning)return!1}return O.key!==void 0}function Jo(O,W){if(typeof O.ref=="string"&&ue.current&&W&&ue.current.stateNode!==W){var U=M(ue.current.type);It[U]||(v('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(ue.current.type),O.ref),It[U]=!0)}}function Da(O,W){{var U=function(){st||(st=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};U.isReactWarning=!0,Object.defineProperty(O,"key",{get:U,configurable:!0})}}function Wn(O,W){{var U=function(){Et||(Et=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};U.isReactWarning=!0,Object.defineProperty(O,"ref",{get:U,configurable:!0})}}var ka=function(O,W,U,de,Fe,Pe,ve){var ge={$$typeof:t,type:O,key:W,ref:U,props:ve,_owner:Pe};return ge._store={},Object.defineProperty(ge._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ge,"_self",{configurable:!1,enumerable:!1,writable:!1,value:de}),Object.defineProperty(ge,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Fe}),Object.freeze&&(Object.freeze(ge.props),Object.freeze(ge)),ge};function al(O,W,U,de,Fe){{var Pe,ve={},ge=null,pt=null;U!==void 0&&(Gn(U),ge=""+U),Hn(W)&&(Gn(W.key),ge=""+W.key),Cr(W)&&(pt=W.ref,Jo(W,Fe));for(Pe in W)ot.call(W,Pe)&&!Oe.hasOwnProperty(Pe)&&(ve[Pe]=W[Pe]);if(O&&O.defaultProps){var Ye=O.defaultProps;for(Pe in Ye)ve[Pe]===void 0&&(ve[Pe]=Ye[Pe])}if(ge||pt){var Ue=typeof O=="function"?O.displayName||O.name||"Unknown":O;ge&&Da(ve,Ue),pt&&Wn(ve,Ue)}return ka(O,ge,pt,Fe,de,ue.current,ve)}}var so=m.ReactCurrentOwner,Na=m.ReactDebugCurrentFrame;function xn(O){if(O){var W=O._owner,U=Qe(O.type,O._source,W?W.type:null);Na.setExtraStackFrame(U)}else Na.setExtraStackFrame(null)}var ao;ao=!1;function qo(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function $o(){{if(so.current){var O=M(so.current.type);if(O)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+O+"`."}return""}}function il(O){return""}var io={};function Qo(O){{var W=$o();if(!W){var U=typeof O=="string"?O:O.displayName||O.name;U&&(W=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+U+">.")}return W}}function Ra(O,W){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var U=Qo(W);if(io[U])return;io[U]=!0;var de="";O&&O._owner&&O._owner!==so.current&&(de=" It was passed a child from "+M(O._owner.type)+"."),xn(O),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',U,de),xn(null)}}function Uo(O,W){{if(typeof O!="object")return;if(Nt(O))for(var U=0;U<O.length;U++){var de=O[U];qo(de)&&Ra(de,W)}else if(qo(O))O._store&&(O._store.validated=!0);else if(O){var Fe=h(O);if(typeof Fe=="function"&&Fe!==O.entries)for(var Pe=Fe.call(O),ve;!(ve=Pe.next()).done;)qo(ve.value)&&Ra(ve.value,W)}}}function ye(O){{var W=O.type;if(W==null||typeof W=="string")return;var U;if(typeof W=="function")U=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===c||W.$$typeof===g))U=W.propTypes;else return;if(U){var de=M(W);ze(U,O.props,"prop",de,O)}else if(W.PropTypes!==void 0&&!ao){ao=!0;var Fe=M(W);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Fe||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function
|
|
25
|
+
Check the top-level render call using <`+U+">.")}return W}}function Ra(O,W){{if(!O._store||O._store.validated||O.key!=null)return;O._store.validated=!0;var U=Qo(W);if(io[U])return;io[U]=!0;var de="";O&&O._owner&&O._owner!==so.current&&(de=" It was passed a child from "+M(O._owner.type)+"."),xn(O),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',U,de),xn(null)}}function Uo(O,W){{if(typeof O!="object")return;if(Nt(O))for(var U=0;U<O.length;U++){var de=O[U];qo(de)&&Ra(de,W)}else if(qo(O))O._store&&(O._store.validated=!0);else if(O){var Fe=h(O);if(typeof Fe=="function"&&Fe!==O.entries)for(var Pe=Fe.call(O),ve;!(ve=Pe.next()).done;)qo(ve.value)&&Ra(ve.value,W)}}}function ye(O){{var W=O.type;if(W==null||typeof W=="string")return;var U;if(typeof W=="function")U=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===c||W.$$typeof===g))U=W.propTypes;else return;if(U){var de=M(W);ze(U,O.props,"prop",de,O)}else if(W.PropTypes!==void 0&&!ao){ao=!0;var Fe=M(W);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Fe||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ve(O){{for(var W=Object.keys(O.props),U=0;U<W.length;U++){var de=W[U];if(de!=="children"&&de!=="key"){xn(O),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",de),xn(null);break}}O.ref!==null&&(xn(O),v("Invalid attribute `ref` supplied to `React.Fragment`."),xn(null))}}var ft={};function ln(O,W,U,de,Fe,Pe){{var ve=N(O);if(!ve){var ge="";(O===void 0||typeof O=="object"&&O!==null&&Object.keys(O).length===0)&&(ge+=" 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 pt=il();pt?ge+=pt:ge+=$o();var Ye;O===null?Ye="null":Nt(O)?Ye="array":O!==void 0&&O.$$typeof===t?(Ye="<"+(M(O.type)||"Unknown")+" />",ge=" Did you accidentally export a JSX literal instead of a component?"):Ye=typeof O,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ye,ge)}var Ue=al(O,W,U,Fe,Pe);if(Ue==null)return Ue;if(ve){var Pt=W.children;if(Pt!==void 0)if(de)if(Nt(Pt)){for(var co=0;co<Pt.length;co++)Uo(Pt[co],O);Object.freeze&&Object.freeze(Pt)}else v("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 Uo(Pt,O)}if(ot.call(W,"key")){var vr=M(O),wt=Object.keys(W).filter(function(CS){return CS!=="key"}),cl=wt.length>0?"{key: someKey, "+wt.join(": ..., ")+": ...}":"{key: someKey}";if(!ft[vr+cl]){var yS=wt.length>0?"{"+wt.join(": ..., ")+": ...}":"{}";v(`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} />`,cl,Cr,mS,Cr),ft[Cr+cl]=!0}}return O===r?Be(Ue):ye(Ue),Ue}}function fS(O,W,U){return ln(O,W,U,!0)}function pS(O,W,U){return ln(O,W,U,!1)}var hS=pS,gS=fS;uo.Fragment=r,uo.jsx=hS,uo.jsxs=gS}()),uo}process.env.NODE_ENV==="production"?Ba.exports=Xp():Ba.exports=zp();var u=Ba.exports;function vl(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=vl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function In(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=vl(e))&&(r&&(r+=" "),r+=t);return r}const fo=e=>typeof e=="number"&&!isNaN(e),Xn=e=>typeof e=="string",_t=e=>typeof e=="function",ts=e=>Xn(e)||_t(e)?e:null,Va=e=>_.isValidElement(e)||Xn(e)||_t(e)||fo(e);function Yp(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 ns(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:d,nodeRef:g,isIn:b,playToast:x}=a;const y=r?`${t}--${c}`:t,p=r?`${n}--${c}`:n,h=_.useRef(0);return _.useLayoutEffect(()=>{const m=g.current,v=y.split(" "),C=I=>{I.target===g.current&&(x(),m.removeEventListener("animationend",C),m.removeEventListener("animationcancel",C),h.current===0&&I.type!=="animationcancel"&&m.classList.remove(...v))};m.classList.add(...v),m.addEventListener("animationend",C),m.addEventListener("animationcancel",C)},[]),_.useEffect(()=>{const m=g.current,v=()=>{m.removeEventListener("animationend",v),o?Yp(m,d,s):d()};b||(l?v():(h.current=1,m.className+=` ${p}`,m.addEventListener("animationend",v)))},[b]),_.createElement(_.Fragment,null,i)}}function xl(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 lt=new Map;let po=[];const Ga=new Set,Jp=e=>Ga.forEach(t=>t(e)),El=()=>lt.size>0;function Il(e,t){var n;if(t)return!((n=lt.get(t))==null||!n.isToastActive(e));let r=!1;return lt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function wl(e,t){Va(e)&&(El()||po.push({content:e,options:t}),lt.forEach(n=>{n.buildToast(e,t)}))}function _l(e,t){lt.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 qp(e){const{subscribe:t,getSnapshot:n,setProps:r}=_.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(d,g,b){let x=1,y=0,p=[],h=[],m=[],v=g;const C=new Map,I=new Set,E=()=>{m=Array.from(C.values()),I.forEach(S=>S())},w=S=>{h=S==null?[]:h.filter(L=>L!==S),E()},T=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),h=[...h,S.props.toastId].filter(B=>B!==S.staleId),E(),b(xl(S,M?"added":"updated")),M&&_t(N)&&N(_.isValidElement(k)&&k.props)};return{id:d,props:v,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{C.forEach(N=>{L!=null&&L!==N.props.toastId||_t(N.toggle)&&N.toggle(S)})},removeToast:w,toasts:C,clearQueue:()=>{y-=p.length,p=[]},buildToast:(S,L)=>{if((P=>{let{containerId:G,toastId:V,updateId:H}=P;const J=G?G!==d:d!==1,ne=C.has(V)&&H==null;return J||ne})(L))return;const{toastId:N,updateId:D,data:k,staleId:M,delay:B}=L,z=()=>{w(N)},q=D==null;q&&y++;const Q={...v,style:v.toastStyle,key:x++,...Object.fromEntries(Object.entries(L).filter(P=>{let[G,V]=P;return V!=null})),toastId:N,updateId:D,data:k,closeToast:z,isIn:!1,className:ts(L.className||v.toastClassName),bodyClassName:ts(L.bodyClassName||v.bodyClassName),progressClassName:ts(L.progressClassName||v.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,Y=v.autoClose,X===!1||fo(X)&&X>0?X:Y),deleteToast(){const P=C.get(N),{onClose:G,children:V}=P.props;_t(G)&&G(_.isValidElement(V)&&V.props),b(xl(P,"removed")),C.delete(N),y--,y<0&&(y=0),p.length>0?T(p.shift()):E()}};var X,Y;Q.closeButton=v.closeButton,L.closeButton===!1||Va(L.closeButton)?Q.closeButton=L.closeButton:L.closeButton===!0&&(Q.closeButton=!Va(v.closeButton)||v.closeButton);let oe=S;_.isValidElement(S)&&!Xn(S.type)?oe=_.cloneElement(S,{closeToast:z,toastProps:Q,data:k}):_t(S)&&(oe=S({closeToast:z,toastProps:Q,data:k}));const $={content:oe,props:Q,staleId:M};v.limit&&v.limit>0&&y>v.limit&&q?p.push($):fo(B)?setTimeout(()=>{T($)},B):T($)},setProps(S){v=S},setToggle:(S,L)=>{C.get(S).toggle=L},isToastActive:S=>h.some(L=>L===S),getSnapshot:()=>v.newestOnTop?m.reverse():m}}(a,s,Jp);lt.set(a,c);const l=c.observe(i);return po.forEach(d=>wl(d.content,d.options)),po=[],()=>{l(),lt.delete(a)}},setProps(i){var c;(c=lt.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=lt.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=_.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:Il,count:o==null?void 0:o.length}}function $p(e){const[t,n]=_.useState(!1),[r,o]=_.useState(!1),s=_.useRef(null),a=_.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:d,closeOnClick:g}=e;var b,x;function y(){n(!0)}function p(){n(!1)}function h(C){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?C.clientX-a.start:C.clientY-a.start,a.start!==C.clientX&&(a.canCloseOnClick=!1),I.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,I.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function m(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",m);const C=s.current;if(a.canDrag&&a.didMove&&C){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}(x=lt.get((b={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||x.setToggle(b.id,b.fn),_.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",y),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const v={onPointerDown:function(C){if(e.draggable===!0||e.draggable===C.pointerType){a.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",m);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=C.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=C.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(C){const{top:I,bottom:E,left:w,right:T}=s.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=w&&C.clientX<=T&&C.clientY>=I&&C.clientY<=E?p():y()}};return i&&c&&(v.onMouseEnter=p,e.stacked||(v.onMouseLeave=y)),g&&(v.onClick=C=>{d&&d(C),a.canCloseOnClick&&l()}),{playToast:y,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:v}}function Qp(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:d,isIn:g,theme:b}=e;const x=s||c&&l===0,y={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(y.transform=`scaleX(${l})`);const p=In("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${b}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":d}),h=_t(a)?a({rtl:d,type:o,defaultClassName:p}):In(p,a),m={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{g&&r()}};return _.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},_.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${b} Toastify__progress-bar--${o}`}),_.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer",className:h,style:y,...m}))}let Up=1;const Sl=()=>""+Up++;function Kp(e){return e&&(Xn(e.toastId)||fo(e.toastId))?e.toastId:Sl()}function ho(e,t){return wl(e,t),t.toastId}function rs(e,t){return{...t,type:t&&t.type||e,toastId:Kp(t)}}function os(e){return(t,n)=>ho(t,rs(e,n))}function _e(e,t){return ho(e,rs("default",t))}_e.loading=(e,t)=>ho(e,rs("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),_e.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=Xn(o)?_e.loading(o,n):_e.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(d,g,b)=>{if(g==null)return void _e.dismiss(r);const x={type:d,...i,...n,data:b},y=Xn(g)?{render:g}:g;return r?_e.update(r,{...x,...y}):_e(y.render,{...x,...y}),b},l=_t(e)?e():e;return l.then(d=>c("success",a,d)).catch(d=>c("error",s,d)),l},_e.success=os("success"),_e.info=os("info"),_e.error=os("error"),_e.warning=os("warning"),_e.warn=_e.warning,_e.dark=(e,t)=>ho(e,rs("default",{theme:"dark",...t})),_e.dismiss=function(e){(function(t){var n;if(El()){if(t==null||Xn(n=t)||fo(n))lt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=lt.get(t.containerId);r?r.removeToast(t.id):lt.forEach(o=>{o.removeToast(t.id)})}}else po=po.filter(r=>t!=null&&r.options.toastId!==t)})(e)},_e.clearWaitingQueue=function(e){e===void 0&&(e={}),lt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},_e.isActive=Il,_e.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=lt.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:Sl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,ho(a,s)}},_e.done=e=>{_e.update(e,{progress:1})},_e.onChange=function(e){return Ga.add(e),()=>{Ga.delete(e)}},_e.play=e=>_l(!0,e),_e.pause=e=>_l(!1,e);const e2=typeof window<"u"?_.useLayoutEffect:_.useEffect,ss=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return _.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},Ha={info:function(e){return _.createElement(ss,{...e},_.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 _.createElement(ss,{...e},_.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 _.createElement(ss,{...e},_.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 _.createElement(ss,{...e},_.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 _.createElement("div",{className:"Toastify__spinner"})}},t2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=$p(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:d,hideProgressBar:g,closeToast:b,transition:x,position:y,className:p,style:h,bodyClassName:m,bodyStyle:v,progressClassName:C,progressStyle:I,updateId:E,role:w,progress:T,rtl:S,toastId:L,deleteToast:N,isIn:D,isLoading:k,closeOnClick:M,theme:B}=e,z=In("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${d}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),q=_t(p)?p({rtl:S,position:y,type:d,defaultClassName:z}):In(z,p),Q=function($){let{theme:P,type:G,isLoading:V,icon:H}=$,J=null;const ne={theme:P,type:G};return H===!1||(_t(H)?J=H({...ne,isLoading:V}):_.isValidElement(H)?J=_.cloneElement(H,ne):V?J=Ha.spinner():(se=>se in Ha)(G)&&(J=Ha[G](ne))),J}(e),X=!!T||!c,Y={closeToast:b,type:d,theme:B};let oe=null;return a===!1||(oe=_t(a)?a(Y):_.isValidElement(a)?_.cloneElement(a,Y):function($){let{closeToast:P,theme:G,ariaLabel:V="close"}=$;return _.createElement("button",{className:`Toastify__close-button Toastify__close-button--${G}`,type:"button",onClick:H=>{H.stopPropagation(),P(H)},"aria-label":V},_.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},_.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"})))}(Y)),_.createElement(x,{isIn:D,done:N,position:y,preventExitTransition:n,nodeRef:r,playToast:s},_.createElement("div",{id:L,onClick:l,"data-in":D,className:q,...o,style:h,ref:r},_.createElement("div",{...D&&{role:w},className:_t(m)?m({type:d}):In("Toastify__toast-body",m),style:v},Q!=null&&_.createElement("div",{className:In("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!k})},Q),_.createElement("div",null,i)),oe,_.createElement(Qp,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:B,delay:c,isRunning:t,isIn:D,closeToast:b,hide:g,type:d,style:I,className:C,controlledProgress:X,progress:T||0})))},as=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},n2=ns(as("bounce",!0));ns(as("slide",!0)),ns(as("zoom")),ns(as("flip"));const r2={position:"top-right",transition:n2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Wa(e){let t={...r2,...e};const n=e.stacked,[r,o]=_.useState(!0),s=_.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=qp(t),{className:l,style:d,rtl:g,containerId:b}=t;function x(p){const h=In("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":g});return _t(l)?l({position:p,rtl:g,defaultClassName:h}):In(h,ts(l))}function y(){n&&(o(!0),_e.play())}return e2(()=>{if(n){var p;const h=s.current.querySelectorAll('[data-in="true"]'),m=12,v=(p=t.position)==null?void 0:p.includes("top");let C=0,I=0;Array.from(h).reverse().forEach((E,w)=>{const T=E;T.classList.add("Toastify__toast--stacked"),w>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=v?"top":"bot");const S=C*(r?.2:1)+(r?0:m*w);T.style.setProperty("--y",`${v?S:-1*S}px`),T.style.setProperty("--g",`${m}`),T.style.setProperty("--s",""+(1-(r?I:0))),C+=T.offsetHeight,I+=.025})}},[r,c,n]),_.createElement("div",{ref:s,className:"Toastify",id:b,onMouseEnter:()=>{n&&(o(!1),_e.pause())},onMouseLeave:y},a((p,h)=>{const m=h.length?{...d}:{...d,pointerEvents:"none"};return _.createElement("div",{className:x(p),style:m,key:`container-${p}`},h.map(v=>{let{content:C,props:I}=v;return _.createElement(t2,{...I,stacked:n,collapseAll:y,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},C)}))}))}const Za=(e,t)=>t.some(n=>e instanceof n);let Tl,Al;function o2(){return Tl||(Tl=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function s2(){return Al||(Al=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xa=new WeakMap,za=new WeakMap,is=new WeakMap;function a2(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(zn(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return is.set(t,e),t}function i2(e){if(Xa.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)});Xa.set(e,t)}let Ya={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Xa.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return zn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Ll(e){Ya=e(Ya)}function c2(e){return s2().includes(e)?function(...t){return e.apply(Ja(this),t),zn(this.request)}:function(...t){return zn(e.apply(Ja(this),t))}}function l2(e){return typeof e=="function"?c2(e):(e instanceof IDBTransaction&&i2(e),Za(e,o2())?new Proxy(e,Ya):e)}function zn(e){if(e instanceof IDBRequest)return a2(e);if(za.has(e))return za.get(e);const t=l2(e);return t!==e&&(za.set(e,t),is.set(t,e)),t}const Ja=e=>is.get(e);function u2(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=zn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(zn(a.result),c.oldVersion,c.newVersion,zn(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const d2=["get","getKey","getAll","getAllKeys","count"],f2=["put","add","delete","clear"],qa=new Map;function Ol(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(qa.get(t))return qa.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=f2.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||d2.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 qa.set(t,s),s}Ll(e=>({...e,get:(t,n,r)=>Ol(t,n)||e.get(t,n,r),has:(t,n)=>!!Ol(t,n)||e.has(t,n)}));const p2=["continue","continuePrimaryKey","advance"],Fl={},$a=new WeakMap,Dl=new WeakMap,h2={get(e,t){if(!p2.includes(t))return e[t];let n=Fl[t];return n||(n=Fl[t]=function(...r){$a.set(this,Dl.get(this)[t](...r))}),n}};async function*g2(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,h2);for(Dl.set(n,t),is.set(n,Ja(t));t;)yield n,t=await($a.get(n)||t.continue()),$a.delete(n)}function kl(e,t){return t===Symbol.asyncIterator&&Za(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Za(e,[IDBIndex,IDBObjectStore])}Ll(e=>({...e,get(t,n,r){return kl(t,n)?g2:e.get(t,n,r)},has(t,n){return kl(t,n)||e.has(t,n)}}));const m2="connector-db",b2=1,cs={FEEDBACK:"feedback"},go=`${cs.FEEDBACK}:data`,ls=`${cs.FEEDBACK}:last_submitted`,mo=`${cs.FEEDBACK}:capture_on_demand`,bo=`${cs.FEEDBACK}:show_notification`,y2=12*60*60*1e3,Qa=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=y2:!0,Nl=(e,t=!1)=>e.captureFeedback&&(Qa(e.firstViewed)&&(!e.lastSubmittedFeedback||Qa(e.lastSubmittedFeedback))||!!t);let Yn=null;const wn=async()=>{try{Yn||(Yn=await u2(m2,b2,{upgrade(e){e.objectStoreNames.contains(go)||e.createObjectStore(go),e.objectStoreNames.contains(ls)||e.createObjectStore(ls),e.objectStoreNames.contains(mo)||e.createObjectStore(mo),e.objectStoreNames.contains(bo)||e.createObjectStore(bo)},blocked(){console.warn("Upgrade blocked! Close other tabs using this DB.")},blocking(){console.warn("Another tab is trying to upgrade. Closing connection to allow upgrade."),Yn&&(Yn.close(),Yn=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Yn=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Yn},Ua=async e=>{if(!e)return[];const t=await wn();if(!t)return[];try{return await t.get(go,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},C2=async e=>{if(!e)return null;const t=await wn();if(!t)return null;try{return await t.get(ls,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},us=async e=>{if(!e)return;const t=await wn();if(t)try{return await t.get(mo,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},v2=async e=>{if(!e)return!1;const t=await wn();if(!t)return!1;try{return await t.get(bo,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},x2=async(e,t)=>{if(!e||!t||!t.length)return;const n=await wn();if(n)try{const r=await Ua(e),o=new Set(r.map(a=>a.connectorId)),s=t.filter(a=>!o.has(a.connector_id)).map(a=>({connectorId:a.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const a=[...r,...s];await n.put(go,a,e),await n.put(bo,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},E2=async e=>{if(!e)return;const t=await wn();if(t)try{const n=await Ua(e),r=await us(e),o=new Date,s=n.map(a=>{const i=Nl(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(go,s,e),await t.put(ls,o,e),r&&await t.put(mo,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},Rl=async(e,t)=>{if(!e)return;const n=await wn();if(n)try{await n.put(mo,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},I2=async e=>{if(!e)return;const t=await wn();if(t)try{await t.put(bo,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},w2=async e=>{const t=await Ua(e),n=await us(e);return t.filter(o=>Nl(o,n))},Ka=async e=>{const t=await C2(e);return t&&!Qa(t)?!1:await us(e)&&!t?!0:!!(await w2(e)).length},_2=async(e,t)=>{await x2(e,t)},ds=async e=>{e&&await E2(e)},S2=async(e,t)=>{const n=await us(e);t?n!==!1&&await Rl(e,t):await Rl(e,void 0)},Ml=async e=>await v2(e)&&await Ka(e),Pl=async e=>{await I2(e)};var ei={},Jn={};function jl(e,t){return function(){return e.apply(t,arguments)}}const{toString:T2}=Object.prototype,{getPrototypeOf:ti}=Object,fs=(e=>t=>{const n=T2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),jt=e=>(e=e.toLowerCase(),t=>fs(t)===e),ps=e=>t=>typeof t===e,{isArray:vr}=Array,yo=ps("undefined");function A2(e){return e!==null&&!yo(e)&&e.constructor!==null&&!yo(e.constructor)&&St(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Bl=jt("ArrayBuffer");function L2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Bl(e.buffer),t}const O2=ps("string"),St=ps("function"),Vl=ps("number"),hs=e=>e!==null&&typeof e=="object",F2=e=>e===!0||e===!1,gs=e=>{if(fs(e)!=="object")return!1;const t=ti(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},D2=jt("Date"),k2=jt("File"),N2=jt("Blob"),R2=jt("FileList"),M2=e=>hs(e)&&St(e.pipe),P2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||St(e.append)&&((t=fs(e))==="formdata"||t==="object"&&St(e.toString)&&e.toString()==="[object FormData]"))},j2=jt("URLSearchParams"),[B2,V2,G2,H2]=["ReadableStream","Request","Response","Headers"].map(jt),W2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Co(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),vr(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 Gl(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 qn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:fe,Hl=e=>!yo(e)&&e!==qn;function ni(){const{caseless:e}=Hl(this)&&this||{},t={},n=(r,o)=>{const s=e&&Gl(t,o)||o;gs(t[s])&&gs(r)?t[s]=ni(t[s],r):gs(r)?t[s]=ni({},r):vr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Co(arguments[r],n);return t}const Z2=(e,t,n,{allOwnKeys:r}={})=>(Co(t,(o,s)=>{n&&St(o)?e[s]=jl(o,n):e[s]=o},{allOwnKeys:r}),e),X2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),z2=(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)},Y2=(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&&ti(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},J2=(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},q2=e=>{if(!e)return null;if(vr(e))return e;let t=e.length;if(!Vl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ti(Uint8Array)),Q2=(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])}},U2=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},K2=jt("HTMLFormElement"),eh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Wl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),th=jt("RegExp"),Zl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Co(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},nh=e=>{Zl(e,(t,n)=>{if(St(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(St(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+"'")})}})},rh=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return vr(e)?r(e):r(String(e).split(t)),n},oh=()=>{},sh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ri="abcdefghijklmnopqrstuvwxyz",Xl="0123456789",zl={DIGIT:Xl,ALPHA:ri,ALPHA_DIGIT:ri+ri.toUpperCase()+Xl},ah=(e=16,t=zl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function ih(e){return!!(e&&St(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ch=e=>{const t=new Array(10),n=(r,o)=>{if(hs(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=vr(r)?[]:{};return Co(r,(a,i)=>{const c=n(a,o+1);!yo(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},lh=jt("AsyncFunction"),uh=e=>e&&(hs(e)||St(e))&&St(e.then)&&St(e.catch),Yl=((e,t)=>e?setImmediate:t?((n,r)=>(qn.addEventListener("message",({source:o,data:s})=>{o===qn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),qn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",St(qn.postMessage)),dh=typeof queueMicrotask<"u"?queueMicrotask.bind(qn):typeof process<"u"&&process.nextTick||Yl;var R={isArray:vr,isArrayBuffer:Bl,isBuffer:A2,isFormData:P2,isArrayBufferView:L2,isString:O2,isNumber:Vl,isBoolean:F2,isObject:hs,isPlainObject:gs,isReadableStream:B2,isRequest:V2,isResponse:G2,isHeaders:H2,isUndefined:yo,isDate:D2,isFile:k2,isBlob:N2,isRegExp:th,isFunction:St,isStream:M2,isURLSearchParams:j2,isTypedArray:$2,isFileList:R2,forEach:Co,merge:ni,extend:Z2,trim:W2,stripBOM:X2,inherits:z2,toFlatObject:Y2,kindOf:fs,kindOfTest:jt,endsWith:J2,toArray:q2,forEachEntry:Q2,matchAll:U2,isHTMLForm:K2,hasOwnProperty:Wl,hasOwnProp:Wl,reduceDescriptors:Zl,freezeMethods:nh,toObjectSet:rh,toCamelCase:eh,noop:oh,toFiniteNumber:sh,findKey:Gl,global:qn,isContextDefined:Hl,ALPHABET:zl,generateString:ah,isSpecCompliantForm:ih,toJSONObject:ch,isAsyncFn:lh,isThenable:uh,setImmediate:Yl,asap:dh};function pe(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const Jl=pe.prototype,ql={};["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=>{ql[e]={value:e}}),Object.defineProperties(pe,ql),Object.defineProperty(Jl,"isAxiosError",{value:!0}),pe.from=(e,t,n,r,o,s)=>{const a=Object.create(Jl);return R.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),pe.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var fh=null;function oi(e){return R.isPlainObject(e)||R.isArray(e)}function $l(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Ql(e,t,n){return e?e.concat(t).map(function(o,s){return o=$l(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function ph(e){return R.isArray(e)&&!e.some(oi)}const hh=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function ms(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!R.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(R.isDate(y))return y.toISOString();if(!c&&R.isBlob(y))throw new pe("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(y)||R.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,p,h){let m=y;if(y&&!h&&typeof y=="object"){if(R.endsWith(p,"{}"))p=r?p:p.slice(0,-2),y=JSON.stringify(y);else if(R.isArray(y)&&ph(y)||(R.isFileList(y)||R.endsWith(p,"[]"))&&(m=R.toArray(y)))return p=$l(p),m.forEach(function(C,I){!(R.isUndefined(C)||C===null)&&t.append(a===!0?Ql([p],I,s):a===null?p:p+"[]",l(C))}),!1}return oi(y)?!0:(t.append(Ql(h,p,s),l(y)),!1)}const g=[],b=Object.assign(hh,{defaultVisitor:d,convertValue:l,isVisitable:oi});function x(y,p){if(!R.isUndefined(y)){if(g.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));g.push(y),R.forEach(y,function(m,v){(!(R.isUndefined(m)||m===null)&&o.call(t,m,R.isString(v)?v.trim():v,p,b))===!0&&x(m,p?p.concat(v):[v])}),g.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return x(e),t}function Ul(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function si(e,t){this._pairs=[],e&&ms(e,this,t)}const Kl=si.prototype;Kl.append=function(t,n){this._pairs.push([t,n])},Kl.toString=function(t){const n=t?function(r){return t.call(this,r,Ul)}:Ul;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function gh(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eu(e,t,n){if(!t)return e;const r=n&&n.encode||gh,o=n&&n.serialize;let s;if(o?s=o(t,n):s=R.isURLSearchParams(t)?t.toString():new si(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class mh{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}var tu=mh,nu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bh=typeof URLSearchParams<"u"?URLSearchParams:si,yh=typeof FormData<"u"?FormData:null,Ch=typeof Blob<"u"?Blob:null,vh={isBrowser:!0,classes:{URLSearchParams:bh,FormData:yh,Blob:Ch},protocols:["http","https","file","blob","url","data"]};const ai=typeof window<"u"&&typeof document<"u",ii=typeof navigator=="object"&&navigator||void 0,xh=ai&&(!ii||["ReactNative","NativeScript","NS"].indexOf(ii.product)<0),Eh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ih=ai&&window.location.href||"http://localhost";var wh=Object.freeze({__proto__:null,hasBrowserEnv:ai,hasStandardBrowserWebWorkerEnv:Eh,hasStandardBrowserEnv:xh,navigator:ii,origin:Ih}),ht={...wh,...vh};function _h(e,t){return ms(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ht.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Sh(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Th(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 ru(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=s>=n.length;return a=!a&&R.isArray(o)?o.length:a,c?(R.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&R.isArray(o[a])&&(o[a]=Th(o[a])),!i)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(Sh(r),o,n,0)}),n}return null}function Ah(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ci={transitional:nu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=R.isObject(t);if(s&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(ru(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _h(t,this.formSerializer).toString();if((i=R.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),Ah(t)):t}],transformResponse:[function(t){const n=this.transitional||ci.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?pe.from(i,pe.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:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{ci.headers[e]={}});var li=ci;const Lh=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Oh=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
30
|
+
<%s key={someKey} {...props} />`,cl,vr,yS,vr),ft[vr+cl]=!0}}return O===r?Ve(Ue):ye(Ue),Ue}}function hS(O,W,U){return ln(O,W,U,!0)}function gS(O,W,U){return ln(O,W,U,!1)}var mS=gS,bS=hS;uo.Fragment=r,uo.jsx=mS,uo.jsxs=bS}()),uo}process.env.NODE_ENV==="production"?Ba.exports=Xp():Ba.exports=zp();var u=Ba.exports;function vl(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=vl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function In(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=vl(e))&&(r&&(r+=" "),r+=t);return r}const fo=e=>typeof e=="number"&&!isNaN(e),Xn=e=>typeof e=="string",_t=e=>typeof e=="function",ts=e=>Xn(e)||_t(e)?e:null,Va=e=>_.isValidElement(e)||Xn(e)||_t(e)||fo(e);function Yp(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 ns(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:d,nodeRef:g,isIn:b,playToast:x}=a;const y=r?`${t}--${c}`:t,p=r?`${n}--${c}`:n,h=_.useRef(0);return _.useLayoutEffect(()=>{const m=g.current,v=y.split(" "),C=I=>{I.target===g.current&&(x(),m.removeEventListener("animationend",C),m.removeEventListener("animationcancel",C),h.current===0&&I.type!=="animationcancel"&&m.classList.remove(...v))};m.classList.add(...v),m.addEventListener("animationend",C),m.addEventListener("animationcancel",C)},[]),_.useEffect(()=>{const m=g.current,v=()=>{m.removeEventListener("animationend",v),o?Yp(m,d,s):d()};b||(l?v():(h.current=1,m.className+=` ${p}`,m.addEventListener("animationend",v)))},[b]),_.createElement(_.Fragment,null,i)}}function xl(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 lt=new Map;let po=[];const Ga=new Set,Jp=e=>Ga.forEach(t=>t(e)),El=()=>lt.size>0;function Il(e,t){var n;if(t)return!((n=lt.get(t))==null||!n.isToastActive(e));let r=!1;return lt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function wl(e,t){Va(e)&&(El()||po.push({content:e,options:t}),lt.forEach(n=>{n.buildToast(e,t)}))}function _l(e,t){lt.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 qp(e){const{subscribe:t,getSnapshot:n,setProps:r}=_.useRef(function(s){const a=s.containerId||1;return{subscribe(i){const c=function(d,g,b){let x=1,y=0,p=[],h=[],m=[],v=g;const C=new Map,I=new Set,E=()=>{m=Array.from(C.values()),I.forEach(S=>S())},w=S=>{h=S==null?[]:h.filter(L=>L!==S),E()},T=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),h=[...h,S.props.toastId].filter(B=>B!==S.staleId),E(),b(xl(S,M?"added":"updated")),M&&_t(N)&&N(_.isValidElement(k)&&k.props)};return{id:d,props:v,observe:S=>(I.add(S),()=>I.delete(S)),toggle:(S,L)=>{C.forEach(N=>{L!=null&&L!==N.props.toastId||_t(N.toggle)&&N.toggle(S)})},removeToast:w,toasts:C,clearQueue:()=>{y-=p.length,p=[]},buildToast:(S,L)=>{if((P=>{let{containerId:G,toastId:V,updateId:H}=P;const J=G?G!==d:d!==1,ne=C.has(V)&&H==null;return J||ne})(L))return;const{toastId:N,updateId:D,data:k,staleId:M,delay:B}=L,z=()=>{w(N)},q=D==null;q&&y++;const Q={...v,style:v.toastStyle,key:x++,...Object.fromEntries(Object.entries(L).filter(P=>{let[G,V]=P;return V!=null})),toastId:N,updateId:D,data:k,closeToast:z,isIn:!1,className:ts(L.className||v.toastClassName),bodyClassName:ts(L.bodyClassName||v.bodyClassName),progressClassName:ts(L.progressClassName||v.progressClassName),autoClose:!L.isLoading&&(X=L.autoClose,Y=v.autoClose,X===!1||fo(X)&&X>0?X:Y),deleteToast(){const P=C.get(N),{onClose:G,children:V}=P.props;_t(G)&&G(_.isValidElement(V)&&V.props),b(xl(P,"removed")),C.delete(N),y--,y<0&&(y=0),p.length>0?T(p.shift()):E()}};var X,Y;Q.closeButton=v.closeButton,L.closeButton===!1||Va(L.closeButton)?Q.closeButton=L.closeButton:L.closeButton===!0&&(Q.closeButton=!Va(v.closeButton)||v.closeButton);let oe=S;_.isValidElement(S)&&!Xn(S.type)?oe=_.cloneElement(S,{closeToast:z,toastProps:Q,data:k}):_t(S)&&(oe=S({closeToast:z,toastProps:Q,data:k}));const $={content:oe,props:Q,staleId:M};v.limit&&v.limit>0&&y>v.limit&&q?p.push($):fo(B)?setTimeout(()=>{T($)},B):T($)},setProps(S){v=S},setToggle:(S,L)=>{C.get(S).toggle=L},isToastActive:S=>h.some(L=>L===S),getSnapshot:()=>v.newestOnTop?m.reverse():m}}(a,s,Jp);lt.set(a,c);const l=c.observe(i);return po.forEach(d=>wl(d.content,d.options)),po=[],()=>{l(),lt.delete(a)}},setProps(i){var c;(c=lt.get(a))==null||c.setProps(i)},getSnapshot(){var i;return(i=lt.get(a))==null?void 0:i.getSnapshot()}}}(e)).current;r(e);const o=_.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:Il,count:o==null?void 0:o.length}}function $p(e){const[t,n]=_.useState(!1),[r,o]=_.useState(!1),s=_.useRef(null),a=_.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:i,pauseOnHover:c,closeToast:l,onClick:d,closeOnClick:g}=e;var b,x;function y(){n(!0)}function p(){n(!1)}function h(C){const I=s.current;a.canDrag&&I&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?C.clientX-a.start:C.clientY-a.start,a.start!==C.clientX&&(a.canCloseOnClick=!1),I.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,I.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function m(){document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",m);const C=s.current;if(a.canDrag&&a.didMove&&C){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();C.style.transition="transform 0.2s, opacity 0.2s",C.style.removeProperty("transform"),C.style.removeProperty("opacity")}}(x=lt.get((b={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||x.setToggle(b.id,b.fn),_.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",y),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",y),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const v={onPointerDown:function(C){if(e.draggable===!0||e.draggable===C.pointerType){a.didMove=!1,document.addEventListener("pointermove",h),document.addEventListener("pointerup",m);const I=s.current;a.canCloseOnClick=!0,a.canDrag=!0,I.style.transition="none",e.draggableDirection==="x"?(a.start=C.clientX,a.removalDistance=I.offsetWidth*(e.draggablePercent/100)):(a.start=C.clientY,a.removalDistance=I.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(C){const{top:I,bottom:E,left:w,right:T}=s.current.getBoundingClientRect();C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&C.clientX>=w&&C.clientX<=T&&C.clientY>=I&&C.clientY<=E?p():y()}};return i&&c&&(v.onMouseEnter=p,e.stacked||(v.onMouseLeave=y)),g&&(v.onClick=C=>{d&&d(C),a.canCloseOnClick&&l()}),{playToast:y,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:s,eventHandlers:v}}function Qp(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:s,className:a,style:i,controlledProgress:c,progress:l,rtl:d,isIn:g,theme:b}=e;const x=s||c&&l===0,y={...i,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};c&&(y.transform=`scaleX(${l})`);const p=In("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${b}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":d}),h=_t(a)?a({rtl:d,type:o,defaultClassName:p}):In(p,a),m={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{g&&r()}};return _.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":x},_.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${b} Toastify__progress-bar--${o}`}),_.createElement("div",{role:"progressbar","aria-hidden":x?"true":"false","aria-label":"notification timer",className:h,style:y,...m}))}let Up=1;const Sl=()=>""+Up++;function Kp(e){return e&&(Xn(e.toastId)||fo(e.toastId))?e.toastId:Sl()}function ho(e,t){return wl(e,t),t.toastId}function rs(e,t){return{...t,type:t&&t.type||e,toastId:Kp(t)}}function os(e){return(t,n)=>ho(t,rs(e,n))}function _e(e,t){return ho(e,rs("default",t))}_e.loading=(e,t)=>ho(e,rs("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),_e.promise=function(e,t,n){let r,{pending:o,error:s,success:a}=t;o&&(r=Xn(o)?_e.loading(o,n):_e.loading(o.render,{...n,...o}));const i={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(d,g,b)=>{if(g==null)return void _e.dismiss(r);const x={type:d,...i,...n,data:b},y=Xn(g)?{render:g}:g;return r?_e.update(r,{...x,...y}):_e(y.render,{...x,...y}),b},l=_t(e)?e():e;return l.then(d=>c("success",a,d)).catch(d=>c("error",s,d)),l},_e.success=os("success"),_e.info=os("info"),_e.error=os("error"),_e.warning=os("warning"),_e.warn=_e.warning,_e.dark=(e,t)=>ho(e,rs("default",{theme:"dark",...t})),_e.dismiss=function(e){(function(t){var n;if(El()){if(t==null||Xn(n=t)||fo(n))lt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=lt.get(t.containerId);r?r.removeToast(t.id):lt.forEach(o=>{o.removeToast(t.id)})}}else po=po.filter(r=>t!=null&&r.options.toastId!==t)})(e)},_e.clearWaitingQueue=function(e){e===void 0&&(e={}),lt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},_e.isActive=Il,_e.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var s;let{containerId:a}=o;return(s=lt.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:Sl()};s.toastId!==e&&(s.staleId=e);const a=s.render||o;delete s.render,ho(a,s)}},_e.done=e=>{_e.update(e,{progress:1})},_e.onChange=function(e){return Ga.add(e),()=>{Ga.delete(e)}},_e.play=e=>_l(!0,e),_e.pause=e=>_l(!1,e);const e2=typeof window<"u"?_.useLayoutEffect:_.useEffect,ss=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return _.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},Ha={info:function(e){return _.createElement(ss,{...e},_.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 _.createElement(ss,{...e},_.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 _.createElement(ss,{...e},_.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 _.createElement(ss,{...e},_.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 _.createElement("div",{className:"Toastify__spinner"})}},t2=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:s}=$p(e),{closeButton:a,children:i,autoClose:c,onClick:l,type:d,hideProgressBar:g,closeToast:b,transition:x,position:y,className:p,style:h,bodyClassName:m,bodyStyle:v,progressClassName:C,progressStyle:I,updateId:E,role:w,progress:T,rtl:S,toastId:L,deleteToast:N,isIn:D,isLoading:k,closeOnClick:M,theme:B}=e,z=In("Toastify__toast",`Toastify__toast-theme--${B}`,`Toastify__toast--${d}`,{"Toastify__toast--rtl":S},{"Toastify__toast--close-on-click":M}),q=_t(p)?p({rtl:S,position:y,type:d,defaultClassName:z}):In(z,p),Q=function($){let{theme:P,type:G,isLoading:V,icon:H}=$,J=null;const ne={theme:P,type:G};return H===!1||(_t(H)?J=H({...ne,isLoading:V}):_.isValidElement(H)?J=_.cloneElement(H,ne):V?J=Ha.spinner():(se=>se in Ha)(G)&&(J=Ha[G](ne))),J}(e),X=!!T||!c,Y={closeToast:b,type:d,theme:B};let oe=null;return a===!1||(oe=_t(a)?a(Y):_.isValidElement(a)?_.cloneElement(a,Y):function($){let{closeToast:P,theme:G,ariaLabel:V="close"}=$;return _.createElement("button",{className:`Toastify__close-button Toastify__close-button--${G}`,type:"button",onClick:H=>{H.stopPropagation(),P(H)},"aria-label":V},_.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},_.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"})))}(Y)),_.createElement(x,{isIn:D,done:N,position:y,preventExitTransition:n,nodeRef:r,playToast:s},_.createElement("div",{id:L,onClick:l,"data-in":D,className:q,...o,style:h,ref:r},_.createElement("div",{...D&&{role:w},className:_t(m)?m({type:d}):In("Toastify__toast-body",m),style:v},Q!=null&&_.createElement("div",{className:In("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!k})},Q),_.createElement("div",null,i)),oe,_.createElement(Qp,{...E&&!X?{key:`pb-${E}`}:{},rtl:S,theme:B,delay:c,isRunning:t,isIn:D,closeToast:b,hide:g,type:d,style:I,className:C,controlledProgress:X,progress:T||0})))},as=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},n2=ns(as("bounce",!0));ns(as("slide",!0)),ns(as("zoom")),ns(as("flip"));const r2={position:"top-right",transition:n2,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Wa(e){let t={...r2,...e};const n=e.stacked,[r,o]=_.useState(!0),s=_.useRef(null),{getToastToRender:a,isToastActive:i,count:c}=qp(t),{className:l,style:d,rtl:g,containerId:b}=t;function x(p){const h=In("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":g});return _t(l)?l({position:p,rtl:g,defaultClassName:h}):In(h,ts(l))}function y(){n&&(o(!0),_e.play())}return e2(()=>{if(n){var p;const h=s.current.querySelectorAll('[data-in="true"]'),m=12,v=(p=t.position)==null?void 0:p.includes("top");let C=0,I=0;Array.from(h).reverse().forEach((E,w)=>{const T=E;T.classList.add("Toastify__toast--stacked"),w>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=v?"top":"bot");const S=C*(r?.2:1)+(r?0:m*w);T.style.setProperty("--y",`${v?S:-1*S}px`),T.style.setProperty("--g",`${m}`),T.style.setProperty("--s",""+(1-(r?I:0))),C+=T.offsetHeight,I+=.025})}},[r,c,n]),_.createElement("div",{ref:s,className:"Toastify",id:b,onMouseEnter:()=>{n&&(o(!1),_e.pause())},onMouseLeave:y},a((p,h)=>{const m=h.length?{...d}:{...d,pointerEvents:"none"};return _.createElement("div",{className:x(p),style:m,key:`container-${p}`},h.map(v=>{let{content:C,props:I}=v;return _.createElement(t2,{...I,stacked:n,collapseAll:y,isIn:i(I.toastId,I.containerId),style:I.style,key:`toast-${I.key}`},C)}))}))}const Za=(e,t)=>t.some(n=>e instanceof n);let Tl,Al;function o2(){return Tl||(Tl=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function s2(){return Al||(Al=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Xa=new WeakMap,za=new WeakMap,is=new WeakMap;function a2(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",a)},s=()=>{n(zn(e.result)),o()},a=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",a)});return is.set(t,e),t}function i2(e){if(Xa.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)});Xa.set(e,t)}let Ya={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Xa.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return zn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Ll(e){Ya=e(Ya)}function c2(e){return s2().includes(e)?function(...t){return e.apply(Ja(this),t),zn(this.request)}:function(...t){return zn(e.apply(Ja(this),t))}}function l2(e){return typeof e=="function"?c2(e):(e instanceof IDBTransaction&&i2(e),Za(e,o2())?new Proxy(e,Ya):e)}function zn(e){if(e instanceof IDBRequest)return a2(e);if(za.has(e))return za.get(e);const t=l2(e);return t!==e&&(za.set(e,t),is.set(t,e)),t}const Ja=e=>is.get(e);function u2(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const a=indexedDB.open(e,t),i=zn(a);return r&&a.addEventListener("upgradeneeded",c=>{r(zn(a.result),c.oldVersion,c.newVersion,zn(a.transaction),c)}),n&&a.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),i.then(c=>{s&&c.addEventListener("close",()=>s()),o&&c.addEventListener("versionchange",l=>o(l.oldVersion,l.newVersion,l))}).catch(()=>{}),i}const d2=["get","getKey","getAll","getAllKeys","count"],f2=["put","add","delete","clear"],qa=new Map;function Ol(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(qa.get(t))return qa.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=f2.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||d2.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 qa.set(t,s),s}Ll(e=>({...e,get:(t,n,r)=>Ol(t,n)||e.get(t,n,r),has:(t,n)=>!!Ol(t,n)||e.has(t,n)}));const p2=["continue","continuePrimaryKey","advance"],Fl={},$a=new WeakMap,Dl=new WeakMap,h2={get(e,t){if(!p2.includes(t))return e[t];let n=Fl[t];return n||(n=Fl[t]=function(...r){$a.set(this,Dl.get(this)[t](...r))}),n}};async function*g2(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const n=new Proxy(t,h2);for(Dl.set(n,t),is.set(n,Ja(t));t;)yield n,t=await($a.get(n)||t.continue()),$a.delete(n)}function kl(e,t){return t===Symbol.asyncIterator&&Za(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Za(e,[IDBIndex,IDBObjectStore])}Ll(e=>({...e,get(t,n,r){return kl(t,n)?g2:e.get(t,n,r)},has(t,n){return kl(t,n)||e.has(t,n)}}));const m2="connector-db",b2=1,cs={FEEDBACK:"feedback"},go=`${cs.FEEDBACK}:data`,ls=`${cs.FEEDBACK}:last_submitted`,mo=`${cs.FEEDBACK}:capture_on_demand`,bo=`${cs.FEEDBACK}:show_notification`,y2=12*60*60*1e3,Qa=(e,t=new Date)=>e?Math.abs(t.getTime()-e.getTime())>=y2:!0,Nl=(e,t=!1)=>e.captureFeedback&&(Qa(e.firstViewed)&&(!e.lastSubmittedFeedback||Qa(e.lastSubmittedFeedback))||!!t);let Yn=null;const wn=async()=>{try{Yn||(Yn=await u2(m2,b2,{upgrade(e){e.objectStoreNames.contains(go)||e.createObjectStore(go),e.objectStoreNames.contains(ls)||e.createObjectStore(ls),e.objectStoreNames.contains(mo)||e.createObjectStore(mo),e.objectStoreNames.contains(bo)||e.createObjectStore(bo)},blocked(){console.warn("Upgrade blocked! Close other tabs using this DB.")},blocking(){console.warn("Another tab is trying to upgrade. Closing connection to allow upgrade."),Yn&&(Yn.close(),Yn=null)},terminated(){console.error("DB connection unexpectedly closed. Resetting connection."),Yn=null}}))}catch(e){console.error("Error opening IndexedDB connection:",e)}return Yn},Ua=async e=>{if(!e)return[];const t=await wn();if(!t)return[];try{return await t.get(go,e)||[]}catch(n){return console.error("Error fetching user feedback data:",n),[]}},C2=async e=>{if(!e)return null;const t=await wn();if(!t)return null;try{return await t.get(ls,e)||null}catch(n){return console.error("Error fetching last submitted feedback:",n),null}},us=async e=>{if(!e)return;const t=await wn();if(t)try{return await t.get(mo,e)}catch(n){console.error("Error fetching capture on demand status:",n);return}},v2=async e=>{if(!e)return!1;const t=await wn();if(!t)return!1;try{return await t.get(bo,e)??!1}catch(n){return console.error("Error fetching show notification status:",n),!1}},x2=async(e,t)=>{if(!e||!t||!t.length)return;const n=await wn();if(n)try{const r=await Ua(e),o=new Set(r.map(a=>a.connectorId)),s=t.filter(a=>!o.has(a.connector_id)).map(a=>({connectorId:a.connector_id,captureFeedback:!0,firstViewed:new Date}));if(s.length>0){const a=[...r,...s];await n.put(go,a,e),await n.put(bo,!0,e)}}catch(r){console.error("Error updating connectors feedback data:",r)}},E2=async e=>{if(!e)return;const t=await wn();if(t)try{const n=await Ua(e),r=await us(e),o=new Date,s=n.map(a=>{const i=Nl(a,r);return{...a,lastSubmittedFeedback:i?o:a.lastSubmittedFeedback,captureFeedback:a.captureFeedback!==i}});await t.put(go,s,e),await t.put(ls,o,e),r&&await t.put(mo,!1,e)}catch(n){console.error("Error updating feedback submission date:",n)}},Rl=async(e,t)=>{if(!e)return;const n=await wn();if(n)try{await n.put(mo,t,e)}catch(r){console.error("Error updating capture on demand:",r)}},I2=async e=>{if(!e)return;const t=await wn();if(t)try{await t.put(bo,!1,e)}catch(n){console.error("Error resetting show notification status:",n)}},w2=async e=>{const t=await Ua(e),n=await us(e);return t.filter(o=>Nl(o,n))},Ka=async e=>{const t=await C2(e);return t&&!Qa(t)?!1:await us(e)&&!t?!0:!!(await w2(e)).length},_2=async(e,t)=>{await x2(e,t)},ds=async e=>{e&&await E2(e)},S2=async(e,t)=>{const n=await us(e);t?n!==!1&&await Rl(e,t):await Rl(e,void 0)},Ml=async e=>await v2(e)&&await Ka(e),Pl=async e=>{await I2(e)};var ei={},Jn={};function jl(e,t){return function(){return e.apply(t,arguments)}}const{toString:T2}=Object.prototype,{getPrototypeOf:ti}=Object,fs=(e=>t=>{const n=T2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),jt=e=>(e=e.toLowerCase(),t=>fs(t)===e),ps=e=>t=>typeof t===e,{isArray:xr}=Array,yo=ps("undefined");function A2(e){return e!==null&&!yo(e)&&e.constructor!==null&&!yo(e.constructor)&&St(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Bl=jt("ArrayBuffer");function L2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Bl(e.buffer),t}const O2=ps("string"),St=ps("function"),Vl=ps("number"),hs=e=>e!==null&&typeof e=="object",F2=e=>e===!0||e===!1,gs=e=>{if(fs(e)!=="object")return!1;const t=ti(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},D2=jt("Date"),k2=jt("File"),N2=jt("Blob"),R2=jt("FileList"),M2=e=>hs(e)&&St(e.pipe),P2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||St(e.append)&&((t=fs(e))==="formdata"||t==="object"&&St(e.toString)&&e.toString()==="[object FormData]"))},j2=jt("URLSearchParams"),[B2,V2,G2,H2]=["ReadableStream","Request","Response","Headers"].map(jt),W2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Co(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),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 Gl(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 qn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:fe,Hl=e=>!yo(e)&&e!==qn;function ni(){const{caseless:e}=Hl(this)&&this||{},t={},n=(r,o)=>{const s=e&&Gl(t,o)||o;gs(t[s])&&gs(r)?t[s]=ni(t[s],r):gs(r)?t[s]=ni({},r):xr(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Co(arguments[r],n);return t}const Z2=(e,t,n,{allOwnKeys:r}={})=>(Co(t,(o,s)=>{n&&St(o)?e[s]=jl(o,n):e[s]=o},{allOwnKeys:r}),e),X2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),z2=(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)},Y2=(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&&ti(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},J2=(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},q2=e=>{if(!e)return null;if(xr(e))return e;let t=e.length;if(!Vl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ti(Uint8Array)),Q2=(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])}},U2=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},K2=jt("HTMLFormElement"),eh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Wl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),th=jt("RegExp"),Zl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Co(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},nh=e=>{Zl(e,(t,n)=>{if(St(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(St(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+"'")})}})},rh=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return xr(e)?r(e):r(String(e).split(t)),n},oh=()=>{},sh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ri="abcdefghijklmnopqrstuvwxyz",Xl="0123456789",zl={DIGIT:Xl,ALPHA:ri,ALPHA_DIGIT:ri+ri.toUpperCase()+Xl},ah=(e=16,t=zl.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function ih(e){return!!(e&&St(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ch=e=>{const t=new Array(10),n=(r,o)=>{if(hs(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=xr(r)?[]:{};return Co(r,(a,i)=>{const c=n(a,o+1);!yo(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},lh=jt("AsyncFunction"),uh=e=>e&&(hs(e)||St(e))&&St(e.then)&&St(e.catch),Yl=((e,t)=>e?setImmediate:t?((n,r)=>(qn.addEventListener("message",({source:o,data:s})=>{o===qn&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),qn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",St(qn.postMessage)),dh=typeof queueMicrotask<"u"?queueMicrotask.bind(qn):typeof process<"u"&&process.nextTick||Yl;var R={isArray:xr,isArrayBuffer:Bl,isBuffer:A2,isFormData:P2,isArrayBufferView:L2,isString:O2,isNumber:Vl,isBoolean:F2,isObject:hs,isPlainObject:gs,isReadableStream:B2,isRequest:V2,isResponse:G2,isHeaders:H2,isUndefined:yo,isDate:D2,isFile:k2,isBlob:N2,isRegExp:th,isFunction:St,isStream:M2,isURLSearchParams:j2,isTypedArray:$2,isFileList:R2,forEach:Co,merge:ni,extend:Z2,trim:W2,stripBOM:X2,inherits:z2,toFlatObject:Y2,kindOf:fs,kindOfTest:jt,endsWith:J2,toArray:q2,forEachEntry:Q2,matchAll:U2,isHTMLForm:K2,hasOwnProperty:Wl,hasOwnProp:Wl,reduceDescriptors:Zl,freezeMethods:nh,toObjectSet:rh,toCamelCase:eh,noop:oh,toFiniteNumber:sh,findKey:Gl,global:qn,isContextDefined:Hl,ALPHABET:zl,generateString:ah,isSpecCompliantForm:ih,toJSONObject:ch,isAsyncFn:lh,isThenable:uh,setImmediate:Yl,asap:dh};function pe(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(pe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const Jl=pe.prototype,ql={};["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=>{ql[e]={value:e}}),Object.defineProperties(pe,ql),Object.defineProperty(Jl,"isAxiosError",{value:!0}),pe.from=(e,t,n,r,o,s)=>{const a=Object.create(Jl);return R.toFlatObject(e,a,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),pe.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};var fh=null;function oi(e){return R.isPlainObject(e)||R.isArray(e)}function $l(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Ql(e,t,n){return e?e.concat(t).map(function(o,s){return o=$l(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function ph(e){return R.isArray(e)&&!e.some(oi)}const hh=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function ms(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,h){return!R.isUndefined(h[p])});const r=n.metaTokens,o=n.visitor||d,s=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function l(y){if(y===null)return"";if(R.isDate(y))return y.toISOString();if(!c&&R.isBlob(y))throw new pe("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(y)||R.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,p,h){let m=y;if(y&&!h&&typeof y=="object"){if(R.endsWith(p,"{}"))p=r?p:p.slice(0,-2),y=JSON.stringify(y);else if(R.isArray(y)&&ph(y)||(R.isFileList(y)||R.endsWith(p,"[]"))&&(m=R.toArray(y)))return p=$l(p),m.forEach(function(C,I){!(R.isUndefined(C)||C===null)&&t.append(a===!0?Ql([p],I,s):a===null?p:p+"[]",l(C))}),!1}return oi(y)?!0:(t.append(Ql(h,p,s),l(y)),!1)}const g=[],b=Object.assign(hh,{defaultVisitor:d,convertValue:l,isVisitable:oi});function x(y,p){if(!R.isUndefined(y)){if(g.indexOf(y)!==-1)throw Error("Circular reference detected in "+p.join("."));g.push(y),R.forEach(y,function(m,v){(!(R.isUndefined(m)||m===null)&&o.call(t,m,R.isString(v)?v.trim():v,p,b))===!0&&x(m,p?p.concat(v):[v])}),g.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return x(e),t}function Ul(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function si(e,t){this._pairs=[],e&&ms(e,this,t)}const Kl=si.prototype;Kl.append=function(t,n){this._pairs.push([t,n])},Kl.toString=function(t){const n=t?function(r){return t.call(this,r,Ul)}:Ul;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function gh(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eu(e,t,n){if(!t)return e;const r=n&&n.encode||gh,o=n&&n.serialize;let s;if(o?s=o(t,n):s=R.isURLSearchParams(t)?t.toString():new si(t,n).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class mh{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}var tu=mh,nu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bh=typeof URLSearchParams<"u"?URLSearchParams:si,yh=typeof FormData<"u"?FormData:null,Ch=typeof Blob<"u"?Blob:null,vh={isBrowser:!0,classes:{URLSearchParams:bh,FormData:yh,Blob:Ch},protocols:["http","https","file","blob","url","data"]};const ai=typeof window<"u"&&typeof document<"u",ii=typeof navigator=="object"&&navigator||void 0,xh=ai&&(!ii||["ReactNative","NativeScript","NS"].indexOf(ii.product)<0),Eh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ih=ai&&window.location.href||"http://localhost";var wh=Object.freeze({__proto__:null,hasBrowserEnv:ai,hasStandardBrowserWebWorkerEnv:Eh,hasStandardBrowserEnv:xh,navigator:ii,origin:Ih}),ht={...wh,...vh};function _h(e,t){return ms(e,new ht.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return ht.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function Sh(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Th(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 ru(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),c=s>=n.length;return a=!a&&R.isArray(o)?o.length:a,c?(R.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!R.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&R.isArray(o[a])&&(o[a]=Th(o[a])),!i)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(Sh(r),o,n,0)}),n}return null}function Ah(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ci={transitional:nu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=R.isObject(t);if(s&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(ru(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _h(t,this.formSerializer).toString();if((i=R.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),Ah(t)):t}],transformResponse:[function(t){const n=this.transitional||ci.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(a)throw i.name==="SyntaxError"?pe.from(i,pe.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:ht.classes.FormData,Blob:ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{ci.headers[e]={}});var li=ci;const Lh=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Oh=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
31
31
|
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&Lh[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const ou=Symbol("internals");function vo(e){return e&&String(e).trim().toLowerCase()}function bs(e){return e===!1||e==null?e:R.isArray(e)?e.map(bs):String(e)}function Fh(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 Dh=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ui(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function kh(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Nh(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}class ys{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,l){const d=vo(c);if(!d)throw new Error("header name must be a non-empty string");const g=R.findKey(o,d);(!g||o[g]===void 0||l===!0||l===void 0&&o[g]!==!1)&&(o[g||c]=bs(i))}const a=(i,c)=>R.forEach(i,(l,d)=>s(l,d,c));if(R.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(R.isString(t)&&(t=t.trim())&&!Dh(t))a(Oh(t),n);else if(R.isHeaders(t))for(const[i,c]of t.entries())s(c,i,r);else t!=null&&s(n,t,r);return this}get(t,n){if(t=vo(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Fh(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=vo(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ui(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=vo(a),a){const i=R.findKey(r,a);i&&(!n||ui(r,r[i],i,n))&&(delete r[i],o=!0)}}return R.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||ui(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,s)=>{const a=R.findKey(r,s);if(a){n[a]=bs(o),delete n[s];return}const i=t?kh(s):String(s).trim();i!==s&&delete n[s],n[i]=bs(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
32
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[ou]=this[ou]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=vo(a);r[i]||(Nh(o,a),r[i]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}}ys.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(ys.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(ys);var Bt=ys;function di(e,t){const n=this||li,r=t||n,o=Bt.from(r.headers);let s=r.data;return R.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function su(e){return!!(e&&e.__CANCEL__)}function xr(e,t,n){pe.call(this,e??"canceled",pe.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(xr,pe,{__CANCEL__:!0});function au(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pe("Request failed with status code "+n.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Rh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Mh(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(),d=r[s];a||(a=l),n[o]=c,r[o]=l;let g=s,b=0;for(;g!==o;)b+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const x=d&&l-d;return x?Math.round(b*1e3/x):void 0}}function Ph(e,t){let n=0,r=1e3/t,o,s;const a=(l,d=Date.now())=>{n=d,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const d=Date.now(),g=d-n;g>=r?a(l,d):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const Cs=(e,t,n=3)=>{let r=0;const o=Mh(50,250);return Ph(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),d=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&&d?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},iu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},cu=e=>(...t)=>R.asap(()=>e(...t));var jh=ht.hasStandardBrowserEnv?function(){const t=ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const i=R.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Bh=ht.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gh(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lu(e,t){return e&&!Vh(t)?Gh(e,t):t}const uu=e=>e instanceof Bt?{...e}:e;function $n(e,t){t=t||{};const n={};function r(l,d,g){return R.isPlainObject(l)&&R.isPlainObject(d)?R.merge.call({caseless:g},l,d):R.isPlainObject(d)?R.merge({},d):R.isArray(d)?d.slice():d}function o(l,d,g){if(R.isUndefined(d)){if(!R.isUndefined(l))return r(void 0,l,g)}else return r(l,d,g)}function s(l,d){if(!R.isUndefined(d))return r(void 0,d)}function a(l,d){if(R.isUndefined(d)){if(!R.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function i(l,d,g){if(g in t)return r(l,d);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,d)=>o(uu(l),uu(d),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(d){const g=c[d]||o,b=g(e[d],t[d],d);R.isUndefined(b)&&g!==i||(n[d]=b)}),n}var du=e=>{const t=$n({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Bt.from(a),t.url=eu(lu(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(R.isFormData(n)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...d]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...d].join("; "))}}if(ht.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&jh(t.url))){const l=o&&s&&Bh.read(s);l&&a.set(o,l)}return t},Hh=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=du(e);let s=o.data;const a=Bt.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,d,g,b,x,y;function p(){x&&x(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function m(){if(!h)return;const C=Bt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:e,request:h};au(function(T){n(T),p()},function(T){r(T),p()},E),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(m)},h.onabort=function(){h&&(r(new pe("Request aborted",pe.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new pe("Network Error",pe.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||nu;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new pe(I,E.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&R.forEach(a.toJSON(),function(I,E){h.setRequestHeader(E,I)}),R.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),l&&([b,y]=Cs(l,!0),h.addEventListener("progress",b)),c&&h.upload&&([g,x]=Cs(c),h.upload.addEventListener("progress",g),h.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(d=C=>{h&&(r(!C||C.type?new xr(null,e,h):C),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const v=Rh(o.url);if(v&&ht.protocols.indexOf(v)===-1){r(new pe("Unsupported protocol "+v+":",pe.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Wh=(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 d=l instanceof Error?l:this.reason;r.abort(d instanceof pe?d:new xr(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,s(new pe(`timeout ${t} of ms exceeded`,pe.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>R.asap(i),c}};const Zh=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},Xh=async function*(e,t){for await(const n of zh(e))yield*Zh(n,t)},zh=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()}},fu=(e,t,n,r)=>{const o=Xh(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:d}=await o.next();if(l){i(),c.close();return}let g=d.byteLength;if(n){let b=s+=g;n(b)}c.enqueue(new Uint8Array(d))}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",pu=vs&&typeof ReadableStream=="function",Yh=vs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),hu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jh=pu&&hu(()=>{let e=!1;const t=new Request(ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gu=64*1024,fi=pu&&hu(()=>R.isReadableStream(new Response("").body)),xs={stream:fi&&(e=>e.body)};vs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xs[t]&&(xs[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new pe(`Response type '${t}' is not supported`,pe.ERR_NOT_SUPPORT,r)})})})(new Response);const qh=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(ht.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await Yh(e)).byteLength},$h=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??qh(t)};var Qh=vs&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:d,withCredentials:g="same-origin",fetchOptions:b}=du(e);l=l?(l+"").toLowerCase():"text";let x=Wh([o,s&&s.toAbortSignal()],a),y;const p=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let h;try{if(c&&Jh&&n!=="get"&&n!=="head"&&(h=await $h(d,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),w;if(R.isFormData(r)&&(w=E.headers.get("content-type"))&&d.setContentType(w),E.body){const[T,S]=iu(h,Cs(cu(c)));r=fu(E.body,gu,T,S)}}R.isString(g)||(g=g?"include":"omit");const m="credentials"in Request.prototype;y=new Request(t,{...b,signal:x,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:m?g:void 0});let v=await fetch(y);const C=fi&&(l==="stream"||l==="response");if(fi&&(i||C&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=v[L]});const w=R.toFiniteNumber(v.headers.get("content-length")),[T,S]=i&&iu(w,Cs(cu(i),!0))||[];v=new Response(fu(v.body,gu,T,()=>{S&&S(),p&&p()}),E)}l=l||"text";let I=await xs[R.findKey(xs,l)||"text"](v,e);return!C&&p&&p(),await new Promise((E,w)=>{au(E,w,{data:I,headers:Bt.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:y})})}catch(m){throw p&&p(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,e,y),{cause:m.cause||m}):pe.from(m,m&&m.code,e,y)}});const pi={http:fh,xhr:Hh,fetch:Qh};R.forEach(pi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mu=e=>`- ${e}`,Uh=e=>R.isFunction(e)||e===null||e===!1;var bu={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!Uh(n)&&(r=pi[(a=String(n)).toLowerCase()],r===void 0))throw new pe(`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 :
|
|
32
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[ou]=this[ou]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=vo(a);r[i]||(Nh(o,a),r[i]=!0)}return R.isArray(t)?t.forEach(s):s(t),this}}ys.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),R.reduceDescriptors(ys.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),R.freezeMethods(ys);var Bt=ys;function di(e,t){const n=this||li,r=t||n,o=Bt.from(r.headers);let s=r.data;return R.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function su(e){return!!(e&&e.__CANCEL__)}function Er(e,t,n){pe.call(this,e??"canceled",pe.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(Er,pe,{__CANCEL__:!0});function au(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pe("Request failed with status code "+n.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Rh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Mh(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(),d=r[s];a||(a=l),n[o]=c,r[o]=l;let g=s,b=0;for(;g!==o;)b+=n[g++],g=g%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),l-a<t)return;const x=d&&l-d;return x?Math.round(b*1e3/x):void 0}}function Ph(e,t){let n=0,r=1e3/t,o,s;const a=(l,d=Date.now())=>{n=d,o=null,s&&(clearTimeout(s),s=null),e.apply(null,l)};return[(...l)=>{const d=Date.now(),g=d-n;g>=r?a(l,d):(o=l,s||(s=setTimeout(()=>{s=null,a(o)},r-g)))},()=>o&&a(o)]}const Cs=(e,t,n=3)=>{let r=0;const o=Mh(50,250);return Ph(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,c=a-r,l=o(c),d=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&&d?(i-a)/l:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(g)},n)},iu=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},cu=e=>(...t)=>R.asap(()=>e(...t));var jh=ht.hasStandardBrowserEnv?function(){const t=ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent),n=document.createElement("a");let r;function o(s){let a=s;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const i=R.isString(a)?o(a):a;return i.protocol===r.protocol&&i.host===r.host}}():function(){return function(){return!0}}(),Bh=ht.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const a=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),R.isString(r)&&a.push("path="+r),R.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gh(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lu(e,t){return e&&!Vh(t)?Gh(e,t):t}const uu=e=>e instanceof Bt?{...e}:e;function $n(e,t){t=t||{};const n={};function r(l,d,g){return R.isPlainObject(l)&&R.isPlainObject(d)?R.merge.call({caseless:g},l,d):R.isPlainObject(d)?R.merge({},d):R.isArray(d)?d.slice():d}function o(l,d,g){if(R.isUndefined(d)){if(!R.isUndefined(l))return r(void 0,l,g)}else return r(l,d,g)}function s(l,d){if(!R.isUndefined(d))return r(void 0,d)}function a(l,d){if(R.isUndefined(d)){if(!R.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function i(l,d,g){if(g in t)return r(l,d);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,d)=>o(uu(l),uu(d),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(d){const g=c[d]||o,b=g(e[d],t[d],d);R.isUndefined(b)&&g!==i||(n[d]=b)}),n}var du=e=>{const t=$n({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;t.headers=a=Bt.from(a),t.url=eu(lu(t.baseURL,t.url),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(R.isFormData(n)){if(ht.hasStandardBrowserEnv||ht.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...d]=c?c.split(";").map(g=>g.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...d].join("; "))}}if(ht.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&jh(t.url))){const l=o&&s&&Bh.read(s);l&&a.set(o,l)}return t},Hh=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=du(e);let s=o.data;const a=Bt.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:l}=o,d,g,b,x,y;function p(){x&&x(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(d),o.signal&&o.signal.removeEventListener("abort",d)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function m(){if(!h)return;const C=Bt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!i||i==="text"||i==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:C,config:e,request:h};au(function(T){n(T),p()},function(T){r(T),p()},E),h=null}"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(m)},h.onabort=function(){h&&(r(new pe("Request aborted",pe.ECONNABORTED,e,h)),h=null)},h.onerror=function(){r(new pe("Network Error",pe.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let I=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||nu;o.timeoutErrorMessage&&(I=o.timeoutErrorMessage),r(new pe(I,E.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,e,h)),h=null},s===void 0&&a.setContentType(null),"setRequestHeader"in h&&R.forEach(a.toJSON(),function(I,E){h.setRequestHeader(E,I)}),R.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),i&&i!=="json"&&(h.responseType=o.responseType),l&&([b,y]=Cs(l,!0),h.addEventListener("progress",b)),c&&h.upload&&([g,x]=Cs(c),h.upload.addEventListener("progress",g),h.upload.addEventListener("loadend",x)),(o.cancelToken||o.signal)&&(d=C=>{h&&(r(!C||C.type?new Er(null,e,h):C),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(d),o.signal&&(o.signal.aborted?d():o.signal.addEventListener("abort",d)));const v=Rh(o.url);if(v&&ht.protocols.indexOf(v)===-1){r(new pe("Unsupported protocol "+v+":",pe.ERR_BAD_REQUEST,e));return}h.send(s||null)})},Wh=(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 d=l instanceof Error?l:this.reason;r.abort(d instanceof pe?d:new Er(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,s(new pe(`timeout ${t} of ms exceeded`,pe.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>R.asap(i),c}};const Zh=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},Xh=async function*(e,t){for await(const n of zh(e))yield*Zh(n,t)},zh=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()}},fu=(e,t,n,r)=>{const o=Xh(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:d}=await o.next();if(l){i(),c.close();return}let g=d.byteLength;if(n){let b=s+=g;n(b)}c.enqueue(new Uint8Array(d))}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",pu=vs&&typeof ReadableStream=="function",Yh=vs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),hu=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Jh=pu&&hu(()=>{let e=!1;const t=new Request(ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gu=64*1024,fi=pu&&hu(()=>R.isReadableStream(new Response("").body)),xs={stream:fi&&(e=>e.body)};vs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xs[t]&&(xs[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new pe(`Response type '${t}' is not supported`,pe.ERR_NOT_SUPPORT,r)})})})(new Response);const qh=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(ht.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await Yh(e)).byteLength},$h=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??qh(t)};var Qh=vs&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:i,onUploadProgress:c,responseType:l,headers:d,withCredentials:g="same-origin",fetchOptions:b}=du(e);l=l?(l+"").toLowerCase():"text";let x=Wh([o,s&&s.toAbortSignal()],a),y;const p=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let h;try{if(c&&Jh&&n!=="get"&&n!=="head"&&(h=await $h(d,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),w;if(R.isFormData(r)&&(w=E.headers.get("content-type"))&&d.setContentType(w),E.body){const[T,S]=iu(h,Cs(cu(c)));r=fu(E.body,gu,T,S)}}R.isString(g)||(g=g?"include":"omit");const m="credentials"in Request.prototype;y=new Request(t,{...b,signal:x,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:m?g:void 0});let v=await fetch(y);const C=fi&&(l==="stream"||l==="response");if(fi&&(i||C&&p)){const E={};["status","statusText","headers"].forEach(L=>{E[L]=v[L]});const w=R.toFiniteNumber(v.headers.get("content-length")),[T,S]=i&&iu(w,Cs(cu(i),!0))||[];v=new Response(fu(v.body,gu,T,()=>{S&&S(),p&&p()}),E)}l=l||"text";let I=await xs[R.findKey(xs,l)||"text"](v,e);return!C&&p&&p(),await new Promise((E,w)=>{au(E,w,{data:I,headers:Bt.from(v.headers),status:v.status,statusText:v.statusText,config:e,request:y})})}catch(m){throw p&&p(),m&&m.name==="TypeError"&&/fetch/i.test(m.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,e,y),{cause:m.cause||m}):pe.from(m,m&&m.code,e,y)}});const pi={http:fh,xhr:Hh,fetch:Qh};R.forEach(pi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mu=e=>`- ${e}`,Uh=e=>R.isFunction(e)||e===null||e===!1;var bu={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let a;if(r=n,!Uh(n)&&(r=pi[(a=String(n)).toLowerCase()],r===void 0))throw new pe(`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(mu).join(`
|
|
34
|
-
`):" "+mu(s[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:pi};function hi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new
|
|
35
|
-
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$n(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&mi.assertOptions(r,{silentJSONParsing:_n.transitional(_n.boolean),forcedJSONParsing:_n.transitional(_n.boolean),clarifyTimeoutError:_n.transitional(_n.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:mi.assertOptions(o,{encode:_n.function,serialize:_n.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=Bt.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let d,g=0,b;if(!c){const y=[yu.bind(this),void 0];for(y.unshift.apply(y,i),y.push.apply(y,l),b=y.length,d=Promise.resolve(n);g<b;)d=d.then(y[g++],y[g++]);return d}b=i.length;let x=n;for(g=0;g<b;){const y=i[g++],p=i[g++];try{x=y(x)}catch(h){p.call(this,h);break}}try{d=yu.call(this,x)}catch(y){return Promise.reject(y)}for(g=0,b=l.length;g<b;)d=d.then(l[g++],l[g++]);return d}getUri(t){t=$n(this.defaults,t);const n=lu(t.baseURL,t.url);return eu(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){Es.prototype[t]=function(n,r){return this.request($n(r||{},{method:t,url:n,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request($n(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Es.prototype[t]=n(),Es.prototype[t+"Form"]=n(!0)});var Is=Es;class bi{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 xr(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 bi(function(o){t=o}),cancel:t}}}var eg=bi;function tg(e){return function(n){return e.apply(null,n)}}function ng(e){return R.isObject(e)&&e.isAxiosError===!0}const yi={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(yi).forEach(([e,t])=>{yi[t]=e});var rg=yi;function xu(e){const t=new Is(e),n=jl(Is.prototype.request,t);return R.extend(n,Is.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return xu($n(e,o))},n}const Je=xu(li);Je.Axios=Is,Je.CanceledError=xr,Je.CancelToken=eg,Je.isCancel=su,Je.VERSION=Cu,Je.toFormData=ms,Je.AxiosError=pe,Je.Cancel=Je.CanceledError,Je.all=function(t){return Promise.all(t)},Je.spread=tg,Je.isAxiosError=ng,Je.mergeConfig=$n,Je.AxiosHeaders=Bt,Je.formToJSON=e=>ru(R.isHTMLForm(e)?new FormData(e):e),Je.getAdapter=bu.getAdapter,Je.HttpStatusCode=rg,Je.default=Je;var Eu=Je,Ee={},Sn={};(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={}))})(Sn);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.getProdHqConfig=gt.getProdApiConfig=gt.getSitHqConfig=gt.getSitApiConfig=gt.getDevHqConfig=gt.getDevApiConfig=void 0;var Er={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},og=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Er}};gt.getDevApiConfig=og;var sg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Er}};gt.getDevHqConfig=sg;var ag=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:Er}};gt.getSitApiConfig=ag;var ig=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:Er}};gt.getSitHqConfig=ig;var cg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Er}};gt.getProdApiConfig=cg;var lg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Er}};gt.getProdHqConfig=lg;var qt={},$t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.removeValue=$t.getValue=$t.setValue=void 0;var Ci={};function ug(e,t){Ci[e]=t}$t.setValue=ug;function dg(e){return Ci[e]}$t.getValue=dg;function fg(e){delete Ci[e]}$t.removeValue=fg,Object.defineProperty(qt,"__esModule",{value:!0}),qt.removeItemFromStorage=qt.setItemInStorage=qt.getItemFromStorage=void 0;var Ir=Sn,wr=$t,pg=function(e,t){switch(t===void 0&&(t=(0,wr.getValue)("PLATFORM")),t){case Ir.PLATFORM.WEB:return sessionStorage.getItem(e);case Ir.PLATFORM.MOBILE:return(0,wr.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};qt.getItemFromStorage=pg;var hg=function(e,t,n){switch(n===void 0&&(n=(0,wr.getValue)("PLATFORM")),n){case Ir.PLATFORM.WEB:return sessionStorage.setItem(e,t);case Ir.PLATFORM.MOBILE:return(0,wr.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};qt.setItemInStorage=hg;var gg=function(e,t){switch(t===void 0&&(t=(0,wr.getValue)("PLATFORM")),t){case Ir.PLATFORM.WEB:sessionStorage.removeItem(e);break;case Ir.PLATFORM.MOBILE:(0,wr.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};qt.removeItemFromStorage=gg;var mg=fe&&fe.__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(d){try{l(r.next(d))}catch(g){a(g)}}function c(d){try{l(r.throw(d))}catch(g){a(g)}}function l(d){d.done?s(d.value):o(d.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},bg=fe&&fe.__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(d){return c([l,d])}}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(d){l=[6,d],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(Ee,"__esModule",{value:!0}),Ee.expireToken=Ee.invalidateToken=Ee.validateToken=Ee.validateAccount=Ee.getConfig=Ee.introduceDelay=Ee.isTokenInExpiryWindow=Ee.getStoredAuthData=Ee.setUserDetails=Ee.getRefreshInterval=Ee.setTokenAndExpiry=Ee.getRandomDelay=Ee.hasValidToken=void 0;var un=Sn,_r=gt,Tt=qt,vi=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},xi=function(e){var t=parseInt((0,Tt.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,Tt.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Ee.validateAccount=xi;var yg=function(e){var t=xi(e);return!Iu()&&t};Ee.validateToken=yg;var Cg=function(e){return e.apiRetry?e.apiRetry>0:!1};Ee.invalidateToken=Cg;var vg=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ee.expireToken=vg;var xg=function(e){var t=(0,Tt.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=vi(),o=xi(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Ee.hasValidToken=xg;var Eg=function(){return Math.floor(Math.random()*6e4)+6e4};Ee.getRandomDelay=Eg;var Ig=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,Tt.setItemInStorage)("hiverAuthUserId",e),(0,Tt.setItemInStorage)("hiverAuthUserGroupId",t)};Ee.setUserDetails=Ig;var wg=function(e,t){if(!e)throw new Error("Token not found in the response");(0,Tt.setItemInStorage)("hiverAuthToken",e),(0,Tt.setItemInStorage)("hiverAuthTokenExpiry",t)};Ee.setTokenAndExpiry=wg;var _g=function(){var e=(0,Tt.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,Tt.getItemFromStorage)("hiverAuthToken"),n=(0,Tt.getItemFromStorage)("hiverAuthUserId"),r=(0,Tt.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Ee.getStoredAuthData=_g;var Iu=function(){var e=(0,Tt.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=vi(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Ee.isTokenInExpiryWindow=Iu;var Sg=function(e){return mg(void 0,void 0,void 0,function(){return bg(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Ee.introduceDelay=Sg;var Tg=function(e,t,n){switch(n===void 0&&(n=!0),t){case un.TIERS.SIT:case un.TIERS.QA:return n?(0,_r.getSitApiConfig)(e):(0,_r.getSitHqConfig)(e);case un.TIERS.PRODUCTION:case un.TIERS.PROD:return n?(0,_r.getProdApiConfig)():(0,_r.getProdHqConfig)();case un.TIERS.DEV:default:return n?(0,_r.getDevApiConfig)():(0,_r.getDevHqConfig)()}};Ee.getConfig=Tg;var Ag=function(){try{var e=(0,Tt.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return un.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=vi();return t.getTime()-n.getTime()>un.TWO_MINUTES_IN_MS?t.getTime()-un.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),un.REFETCH_CHECK_DELAY}};Ee.getRefreshInterval=Ag;var xo={},Vt={},wu;function _u(){if(wu)return Vt;wu=1;var e=fe&&fe.__awaiter||function(y,p,h,m){function v(C){return C instanceof h?C:new h(function(I){I(C)})}return new(h||(h=Promise))(function(C,I){function E(S){try{T(m.next(S))}catch(L){I(L)}}function w(S){try{T(m.throw(S))}catch(L){I(L)}}function T(S){S.done?C(S.value):v(S.value).then(E,w)}T((m=m.apply(y,p||[])).next())})},t=fe&&fe.__generator||function(y,p){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},m,v,C,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(T){return function(S){return w([T,S])}}function w(T){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,T[0]&&(h=0)),h;)try{if(m=1,v&&(C=T[0]&2?v.return:T[0]?v.throw||((C=v.return)&&C.call(v),0):v.next)&&!(C=C.call(v,T[1])).done)return C;switch(v=0,C&&(T=[T[0]&2,C.value]),T[0]){case 0:case 1:C=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,v=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!C||T[1]>C[0]&&T[1]<C[3])){h.label=T[1];break}if(T[0]===6&&h.label<C[1]){h.label=C[1],C=T;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(T);break}C[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(y,h)}catch(S){T=[6,S],v=0}finally{m=C=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.logoutFromHeimdall=Vt.getTenantLoginCode=Vt.getLoginToken=Vt.getAccessToken=void 0;var n=Sn,r=Ou(),o=Ee,s=function(y,p,h,m){var v=(0,o.getStoredAuthData)(),C=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":C},data:{user_id:p.userId,usergroup_id:p.usergroupId,access_token:(v==null?void 0:v.token)||"",source:m}}},a=function(y,p,h,m,v){var C=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:p.heimdallUrl,url:p.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},headers:{"x-hiver-tenant":C,"x-hiver-userid":m,"x-hiver-usergroupid":v}}},i=function(y,p){var h=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":h}}},c=function(y){return parseInt(y,10)},l=function(y,p,h,m){return{root_url:h===n.TENANT_PLATFORM.HIVERWEB?y.hotUrl:y.v2Url,url:h===n.TENANT_PLATFORM.HIVERWEB?y.apiEndpoints.hotLogin:y.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(p.userId),app:m||n.APP_UI.DEFAULT}}},d=function(y,p,h,m,v){return e(void 0,void 0,void 0,function(){var C,I,E,w,T,S,L;return t(this,function(N){switch(N.label){case 0:console.log("GETTOKEN tenantPlatform -> ",m),N.label=1;case 1:return N.trys.push([1,5,,6]),!(0,o.validateToken)(h)||(0,o.invalidateToken)(h)?(console.log("HEIMDALL: No valid token, fetching token"),C=s(p,h,m,v),[4,(0,r.performAxiosCall)(C)]):[3,3];case 2:return I=N.sent(),[2,{atToken:(w=I==null?void 0:I.data.at)===null||w===void 0?void 0:w.token,expiryTime:(T=I==null?void 0:I.data.at)===null||T===void 0?void 0:T.expires_at,userId:(S=I==null?void 0:I.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=I==null?void 0:I.data)===null||L===void 0?void 0:L.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw E=N.sent(),E;case 6:return[2]}})})};Vt.getAccessToken=d;var g=function(y,p,h,m,v,C){return e(void 0,void 0,void 0,function(){var I,E,w,T,S,L,N;return t(this,function(D){switch(D.label){case 0:I=a(y,h,m,v,C),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return E=D.sent(),[2,{userId:(T=E==null?void 0:E.data)===null||T===void 0?void 0:T.user_id,userGroupId:(S=E==null?void 0:E.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=E==null?void 0:E.data.at)===null||L===void 0?void 0:L.token,expiryTime:(N=E==null?void 0:E.data.at)===null||N===void 0?void 0:N.expires_at}];case 3:throw w=D.sent(),w;case 4:return[2]}})})};Vt.getLoginToken=g;var b=function(y,p,h,m,v){return e(void 0,void 0,void 0,function(){var C,I,E;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",v),C=l(p,h,m,v),[4,(0,r.performAxiosCall)(C)];case 1:return I=w.sent(),[2,I==null?void 0:I.data.code];case 2:throw E=w.sent(),E;case 3:return[2]}})})};Vt.getTenantLoginCode=b;var x=function(y,p,h){return h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var m,v,C;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),m=i(y,p),[4,(0,r.performAxiosCall)(m)];case 1:return v=I.sent(),[2,v==null?void 0:v.status];case 2:return C=I.sent(),h<2?[4,x(y,p,h+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw C;case 5:return[2]}})})};return Vt.logoutFromHeimdall=x,Vt}var ws={},Lg=fe&&fe.__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(d){try{l(r.next(d))}catch(g){a(g)}}function c(d){try{l(r.throw(d))}catch(g){a(g)}}function l(d){d.done?s(d.value):o(d.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Og=fe&&fe.__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(d){return c([l,d])}}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(d){l=[6,d],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 Su=Sn,Fg=$t,Dg=function(e,t){switch(t===void 0&&(t=(0,Fg.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Su.PLATFORM.WEB:return window.addEventListener("online",function(){return Lg(void 0,void 0,void 0,function(){return Og(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 Su.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};ws.subscribeToOnlineEvent=Dg;var Tu;function Au(){if(Tu)return xo;Tu=1;var e=fe&&fe.__awaiter||function(y,p,h,m){function v(C){return C instanceof h?C:new h(function(I){I(C)})}return new(h||(h=Promise))(function(C,I){function E(S){try{T(m.next(S))}catch(L){I(L)}}function w(S){try{T(m.throw(S))}catch(L){I(L)}}function T(S){S.done?C(S.value):v(S.value).then(E,w)}T((m=m.apply(y,p||[])).next())})},t=fe&&fe.__generator||function(y,p){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},m,v,C,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(T){return function(S){return w([T,S])}}function w(T){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,T[0]&&(h=0)),h;)try{if(m=1,v&&(C=T[0]&2?v.return:T[0]?v.throw||((C=v.return)&&C.call(v),0):v.next)&&!(C=C.call(v,T[1])).done)return C;switch(v=0,C&&(T=[T[0]&2,C.value]),T[0]){case 0:case 1:C=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,v=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!C||T[1]>C[0]&&T[1]<C[3])){h.label=T[1];break}if(T[0]===6&&h.label<C[1]){h.label=C[1],C=T;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(T);break}C[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(y,h)}catch(S){T=[6,S],v=0}finally{m=C=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(xo,"__esModule",{value:!0}),xo.fetchAccessToken=void 0;var n=_u(),r=Sn,o=Ee,s=ws,a,i,c,l=function(y,p,h,m,v,C){return C===void 0&&(C=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,E,w,T,S,L,N,D,k;return t(this,function(M){switch(M.label){case 0:I=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",C,m),E=void 0,v?[4,v()]:[3,3];case 2:return E=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,y,p,m,C)];case 4:E=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,y,m,p.userId,p.usergroupId)];case 6:return w=M.sent(),T=w.userId,S=w.userGroupId,L=w.atToken,N=w.expiryTime,(0,o.setTokenAndExpiry)(L,N),(0,o.setUserDetails)(T,S),[3,12];case 7:D=M.sent(),console.log("ERROR debug: in error login:",D,C),k=h,M.label=8;case 8:return k<I?[4,l(y,p,k+1,m,v,C)]:[3,11];case 9:M.sent(),M.label=10;case 10:return k++,[3,8];case 11:throw D;case 12:return[2]}})})},d=function(y,p,h,m,v){return e(void 0,void 0,void 0,function(){var C,I,E,w;return t(this,function(T){switch(T.label){case 0:return p<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,y)})]:[3,3];case 1:return T.sent(),p+=y,y*2<=r.MAX_BACKOFF_LIMIT?y*=2:y=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",y),C=h.retryDelay,I=h.configs,E=h.apiParams,w=h.appUI,[4,g(C,y,p,I,E,m,v,w)];case 2:T.sent(),T.label=3;case 3:return[2]}})})},g=function(y,p,h,m,v,C,I,E,w){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var T,S,L,N,D,k,M,B,z,q,Q,X,Y,oe;return t(this,function($){switch($.label){case 0:return $.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,m,v,C,E)];case 1:return T=$.sent(),S=T.atToken,L=T.expiryTime,N=T.userId,D=T.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),N&&D&&(0,o.setUserDetails)(N,D),y=r.INITIAL_RETRY_DELAY,p=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return k=$.sent(),console.log("ERROR: Heimdall fetch token",k),((z=k.response)===null||z===void 0?void 0:z.status)===401||((q=k.request)===null||q===void 0?void 0:q.status)===401?(M=1,[4,l(m,v,M,C,I,w)]):[3,4];case 3:return $.sent(),[3,11];case 4:return((Q=k.response)===null||Q===void 0?void 0:Q.status)===409||((X=k.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),B={retryDelay:y,configs:m,apiParams:v,appUI:w},[4,d(p,h,B,C,I)]):[3,6];case 5:if($.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw k;return[3,11];case 6:if(!(((Y=k.response)===null||Y===void 0?void 0:Y.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 y<=r.MAX_RETRY_DELAY?[4,new Promise(function(P){return setTimeout(P,y)})]:[3,10];case 8:return $.sent(),y*=2,console.log("Heimdall: Fetch token post doubling retry delay",y),[4,g(y,p,h,m,v,C,I,w)];case 9:return $.sent(),[3,11];case 10:throw k;case 11:return[3,12];case 12:return[2]}})})},b=function(y,p,h,m,v,C,I,E){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var w,T,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),w=(0,o.isTokenInExpiryWindow)(),w?(T=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(T)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,g(h,m,v,y,p,C,I,E)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},x=function(y,p,h,m,v,C,I){return e(void 0,void 0,void 0,function(){var E,w,T,S,L,N;return t(this,function(D){switch(D.label){case 0:a=y,i=p,E=r.INITIAL_RETRY_DELAY,w=r.INITIAL_RETRY_DELAY,T=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(E,w,T,S,h,m,v,C,I)];case 2:return D.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return b(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,v,I)},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,b(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,v,I)];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 xo.fetchAccessToken=x,xo}var Lu;function Ou(){if(Lu)return Jn;Lu=1;var e=fe&&fe.__assign||function(){return e=Object.assign||function(p){for(var h,m=1,v=arguments.length;m<v;m++){h=arguments[m];for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(p[C]=h[C])}return p},e.apply(this,arguments)},t=fe&&fe.__awaiter||function(p,h,m,v){function C(I){return I instanceof m?I:new m(function(E){E(I)})}return new(m||(m=Promise))(function(I,E){function w(L){try{S(v.next(L))}catch(N){E(N)}}function T(L){try{S(v.throw(L))}catch(N){E(N)}}function S(L){L.done?I(L.value):C(L.value).then(w,T)}S((v=v.apply(p,h||[])).next())})},n=fe&&fe.__generator||function(p,h){var m={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},v,C,I,E;return E={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function w(S){return function(L){return T([S,L])}}function T(S){if(v)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(m=0)),m;)try{if(v=1,C&&(I=S[0]&2?C.return:S[0]?C.throw||((I=C.return)&&I.call(C),0):C.next)&&!(I=I.call(C,S[1])).done)return I;switch(C=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,C=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(I=m.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){m.label=S[1];break}if(S[0]===6&&m.label<I[1]){m.label=I[1],I=S;break}if(I&&m.label<I[2]){m.label=I[2],m.ops.push(S);break}I[2]&&m.ops.pop(),m.trys.pop();continue}S=h.call(p,m)}catch(L){S=[6,L],C=0}finally{v=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.hiverAxiosCall=Jn.performAxiosCall=void 0;var r=Eu,o=Ee,s=Au(),a=qt,i=Sn,c,l=2,d=function(p,h){var m=h.fetchCsrfToken();p.formData?p.formData.append("_csrf_token",m):(p.data=p.data||{},p.data._csrf_token=m)},g=function(p,h){var m={};!p.method||p.method.toLowerCase()==="get"?m={params:p.params?p.params:p.data}:m=p.params?{params:p,data:p.data}:{data:p.data};var v=e(e({method:p.method,url:"".concat(p.root_url).concat(p.url),headers:p.headers},m),{withCredentials:h,responseType:(p==null?void 0:p.responseType)||""});return v};function b(p,h){return h===void 0&&(h=!0),t(this,void 0,void 0,function(){var m;return n(this,function(v){return m=g(p,h),[2,(0,r.default)(m).then(function(C){return C}).catch(function(C){throw C})]})})}Jn.performAxiosCall=b;function x(p,h,m){return t(this,void 0,void 0,function(){var v,C,I;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),p.authTokenFetchingInProgress?[3,2]:(p.authTokenFetchingInProgress=!0,v=p.appEnv,C=p.tier,[4,(0,s.fetchAccessToken)(v,C,h,p.tenantPlatform,p.getTokenForLogin,m)]);case 1:return E.sent(),p.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(w){return setTimeout(w,100)})];case 3:return E.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,x(p,h,m)];case 4:E.sent(),E.label=5;case 5:return[3,8];case 6:return I=E.sent(),console.log("Error while fetching Auth Token :",I),p.authTokenFetchingInProgress=!1,[4,x(p,h,m)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function y(p,h,m,v,C){var I,E;return C===void 0&&(C=0),t(this,void 0,void 0,function(){var w,T,S,L,N,D,k;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(m.getToken&&!(0,o.hasValidToken)(h)))return[3,2];if(w=p.appEnv,T=p.tier,!w||!T)throw Error("appEnv or tier missing : ".concat(w,"/").concat(T));return"userId"in h&&"usergroupId"in h?(S={userId:h.userId,usergroupId:h.usergroupId},[4,x(p,S,v)]):[3,2];case 1:M.sent(),M.label=2;case 2:return p.csrfToken&&d(h,m),L=p.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,h.headers=e(e({},h.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),m.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",h.headers=e(e({},h.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",h),[4,b(h,p.withCredentials)];case 3:return N=M.sent(),h.onSuccess&&h.onSuccess(N),[2,N];case 4:if(D=M.sent(),k=((I=D.response)===null||I===void 0?void 0:I.status)===403||((E=D.request)===null||E===void 0?void 0:E.status)===403,C<l&&k)return(0,o.expireToken)(),[2,y(p,h,m,v,C+1)];if(C>=l&&k||!k)throw h.onFail&&h.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return Jn.hiverAxiosCall=y,Jn}var Eo={},je={},Ge={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.TIERS=Ge.APP_UI=Ge.CONFIG_HIVER=Ge.REFETCH_CHECK_DELAY=Ge.INITIAL_RETRY_DELAY=Ge.MAX_BACKOFF_LIMIT=Ge.MAX_CONFLICT_RETRY_DELAY=Ge.MAX_RETRY_DELAY=Ge.GET_METHOD=void 0,Ge.GET_METHOD="GET",Ge.MAX_RETRY_DELAY=18e4,Ge.MAX_CONFLICT_RETRY_DELAY=63e3,Ge.MAX_BACKOFF_LIMIT=8e3,Ge.INITIAL_RETRY_DELAY=1e3,Ge.REFETCH_CHECK_DELAY=168e4,Ge.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Ge.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Ge.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.getProdHqConfig=mt.getProdApiConfig=mt.getSitHqConfig=mt.getSitApiConfig=mt.getDevHqConfig=mt.getDevApiConfig=void 0;var Sr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},kg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:Sr}};mt.getDevApiConfig=kg;var Ng=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:Sr}};mt.getDevHqConfig=Ng;var Rg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:Sr}};mt.getSitApiConfig=Rg;var Mg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:Sr}};mt.getSitHqConfig=Mg;var Pg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:Sr}};mt.getProdApiConfig=Pg;var jg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:Sr}};mt.getProdHqConfig=jg;var Bg=fe&&fe.__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(d){try{l(r.next(d))}catch(g){a(g)}}function c(d){try{l(r.throw(d))}catch(g){a(g)}}function l(d){d.done?s(d.value):o(d.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Vg=fe&&fe.__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(d){return c([l,d])}}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(d){l=[6,d],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(je,"__esModule",{value:!0}),je.expireToken=je.validateToken=je.validateAccount=je.getConfig=je.introduceDelay=je.isTokenInExpiryWindow=je.getStoredAuthData=je.setUserDetails=je.setTokenAndExpiry=je.getRandomDelay=je.hasValidToken=void 0;var Ei=Ge,Qn=mt,Fu=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Ii=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};je.validateAccount=Ii;var Gg=function(e){var t=Ii(e);return!Du()&&t};je.validateToken=Gg;var Hg=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};je.expireToken=Hg;var Wg=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=Fu(),o=Ii(e);return r<n&&o};je.hasValidToken=Wg;var Zg=function(){return Math.floor(Math.random()*6e4)+6e4};je.getRandomDelay=Zg;var Xg=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)};je.setUserDetails=Xg;var zg=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};je.setTokenAndExpiry=zg;var Yg=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}};je.getStoredAuthData=Yg;var Du=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Fu(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};je.isTokenInExpiryWindow=Du;var Jg=function(e){return Bg(void 0,void 0,void 0,function(){return Vg(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};je.introduceDelay=Jg;var qg=function(e,t,n){switch(t){case Ei.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,Qn.getSitHqConfig)(e)),n?(0,Qn.getSitApiConfig)(e):(0,Qn.getSitHqConfig)(e);case Ei.TIERS.PROD:return n?(0,Qn.getProdApiConfig)():(0,Qn.getProdHqConfig)();case Ei.TIERS.DEV:default:return n?(0,Qn.getDevApiConfig)():(0,Qn.getDevHqConfig)()}};je.getConfig=qg;var Io={},dn={},ku;function $g(){if(ku)return dn;ku=1;var e=fe&&fe.__awaiter||function(b,x,y,p){function h(m){return m instanceof y?m:new y(function(v){v(m)})}return new(y||(y=Promise))(function(m,v){function C(w){try{E(p.next(w))}catch(T){v(T)}}function I(w){try{E(p.throw(w))}catch(T){v(T)}}function E(w){w.done?m(w.value):h(w.value).then(C,I)}E((p=p.apply(b,x||[])).next())})},t=fe&&fe.__generator||function(b,x){var y={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,v;return v={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function C(E){return function(w){return I([E,w])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;v&&(v=0,E[0]&&(y=0)),y;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,h=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(m=y.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){y.label=E[1];break}if(E[0]===6&&y.label<m[1]){y.label=m[1],m=E;break}if(m&&y.label<m[2]){y.label=m[2],y.ops.push(E);break}m[2]&&y.ops.pop(),y.trys.pop();continue}E=x.call(b,y)}catch(w){E=[6,w],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(dn,"__esModule",{value:!0}),dn.getV2LoginCode=dn.getLoginToken=dn.getAccessToken=void 0;var n=Ge,r=Pu(),o=je,s=function(b,x,y){var p=(0,o.getStoredAuthData)();return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:x.userId,usergroup_id:x.usergroupId,access_token:(p==null?void 0:p.token)||"",source:y},withCredentials:!0}},a=function(b,x){return{root_url:x.heimdallUrl,url:x.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},withCredentials:!0}},i=function(b){return parseInt(b,10)},c=function(b,x){return{root_url:b.v2Url,url:b.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:x||n.APP_UI.DEFAULT}}},l=function(b,x,y,p){return e(void 0,void 0,void 0,function(){var h,m,v,C,I,E,w;return t(this,function(T){switch(T.label){case 0:return T.trys.push([0,4,,5]),(0,o.validateToken)(y)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),h=s(x,y,p),[4,(0,r.makeAxiosCall)(h,b)]);case 1:return m=T.sent(),[2,{atToken:(C=m==null?void 0:m.data.at)===null||C===void 0?void 0:C.token,expiryTime:(I=m==null?void 0:m.data.at)===null||I===void 0?void 0:I.expires_at,userId:(E=m==null?void 0:m.data)===null||E===void 0?void 0:E.user_id,userGroupId:(w=m==null?void 0:m.data)===null||w===void 0?void 0:w.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw v=T.sent(),v;case 5:return[2]}})})};dn.getAccessToken=l;var d=function(b,x,y){return e(void 0,void 0,void 0,function(){var p,h,m,v,C,I,E;return t(this,function(w){switch(w.label){case 0:p=a(b,y),w.label=1;case 1:return w.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(p,x)];case 2:return h=w.sent(),[2,{userId:(v=h==null?void 0:h.data)===null||v===void 0?void 0:v.user_id,userGroupId:(C=h==null?void 0:h.data)===null||C===void 0?void 0:C.usergroup_id,atToken:(I=h==null?void 0:h.data.at)===null||I===void 0?void 0:I.token,expiryTime:(E=h==null?void 0:h.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw m=w.sent(),m;case 4:return[2]}})})};dn.getLoginToken=d;var g=function(b,x,y){return e(void 0,void 0,void 0,function(){var p,h,m;return t(this,function(v){switch(v.label){case 0:return v.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",y),p=c(x,y),[4,(0,r.makeAxiosCall)(p,b)];case 1:return h=v.sent(),console.log("DEBUG HEIMDALL: local storage:",h==null?void 0:h.data),[2,h==null?void 0:h.data.code];case 2:throw m=v.sent(),m;case 3:return[2]}})})};return dn.getV2LoginCode=g,dn}var Nu;function Ru(){if(Nu)return Io;Nu=1;var e=fe&&fe.__awaiter||function(x,y,p,h){function m(v){return v instanceof p?v:new p(function(C){C(v)})}return new(p||(p=Promise))(function(v,C){function I(T){try{w(h.next(T))}catch(S){C(S)}}function E(T){try{w(h.throw(T))}catch(S){C(S)}}function w(T){T.done?v(T.value):m(T.value).then(I,E)}w((h=h.apply(x,y||[])).next())})},t=fe&&fe.__generator||function(x,y){var p={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},h,m,v,C;return C={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function I(w){return function(T){return E([w,T])}}function E(w){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,w[0]&&(p=0)),p;)try{if(h=1,m&&(v=w[0]&2?m.return:w[0]?m.throw||((v=m.return)&&v.call(m),0):m.next)&&!(v=v.call(m,w[1])).done)return v;switch(m=0,v&&(w=[w[0]&2,v.value]),w[0]){case 0:case 1:v=w;break;case 4:return p.label++,{value:w[1],done:!1};case 5:p.label++,m=w[1],w=[0];continue;case 7:w=p.ops.pop(),p.trys.pop();continue;default:if(v=p.trys,!(v=v.length>0&&v[v.length-1])&&(w[0]===6||w[0]===2)){p=0;continue}if(w[0]===3&&(!v||w[1]>v[0]&&w[1]<v[3])){p.label=w[1];break}if(w[0]===6&&p.label<v[1]){p.label=v[1],v=w;break}if(v&&p.label<v[2]){p.label=v[2],p.ops.push(w);break}v[2]&&p.ops.pop(),p.trys.pop();continue}w=y.call(x,p)}catch(T){w=[6,T],m=0}finally{h=v=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}};Object.defineProperty(Io,"__esModule",{value:!0}),Io.fetchToken=void 0;var n=$g(),r=Ge,o=je,s,a,i,c=function(x,y,p){return p===void 0&&(p=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var h,m,v,C,I,E,w,T,S;return t(this,function(L){switch(L.label){case 0:h=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",p),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,x,p)];case 2:return m=L.sent(),[4,(0,n.getLoginToken)(m,r.CONFIG_HIVER,x)];case 3:return v=L.sent(),C=v.userId,I=v.userGroupId,E=v.atToken,w=v.expiryTime,(0,o.setTokenAndExpiry)(E,w),(0,o.setUserDetails)(C,I),[3,9];case 4:T=L.sent(),console.log("ERROR debug: in error login:",T,p),S=y,L.label=5;case 5:return S<h?[4,c(x,S+1,p)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw T;case 9:return[2]}})})},l=function(x,y,p){return e(void 0,void 0,void 0,function(){var h,m,v,C;return t(this,function(I){switch(I.label){case 0:return y<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,x)})]:[3,3];case 1:return I.sent(),y+=x,x*2<=r.MAX_BACKOFF_LIMIT?x*=2:x=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",x),h=p.retryDelay,m=p.configs,v=p.api_params,C=p.appUI,[4,d(h,x,y,m,v,C)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},d=function(x,y,p,h,m,v,C){return v===void 0&&(v="default"),e(void 0,void 0,void 0,function(){var I,E,w,T,S,L,N,D,k,M,B,z,q,Q;return t(this,function(X){switch(X.label){case 0:return X.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,m,v)];case 1:return I=X.sent(),E=I.atToken,w=I.expiryTime,T=I.userId,S=I.userGroupId,E&&w&&(0,o.setTokenAndExpiry)(E,w),T&&S&&(0,o.setUserDetails)(T,S),x=r.INITIAL_RETRY_DELAY,y=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return L=X.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(h,N,C)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((B=L.response)===null||B===void 0?void 0:B.status)===409||((z=L.request)===null||z===void 0?void 0:z.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:x,configs:h,api_params:m,appUI:C},[4,l(y,p,D)]):[3,6];case 5:if(X.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((q=L.response)===null||q===void 0?void 0:q.status)===422||((Q=L.request)===null||Q===void 0?void 0:Q.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return x<=r.MAX_RETRY_DELAY?[4,new Promise(function(Y){return setTimeout(Y,x)})]:[3,10];case 8:return X.sent(),x*=2,console.log("Heimdall: Fetch token post doubling retry delay",x),[4,d(x,y,p,h,m,C)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(x,y,p,h,m,v){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=0),e(void 0,void 0,void 0,function(){var C,I,E;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),C=(0,o.isTokenInExpiryWindow)(),C?(I=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(I)]):[3,3];case 1:return w.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,d(p,h,m,x,y,v)];case 2:w.sent(),w.label=3;case 3:return[3,5];case 4:throw E=w.sent(),E;case 5:return[2]}})})},b=function(x,y,p,h,m,v){return e(void 0,void 0,void 0,function(){var C,I,E,w,T;return t(this,function(S){switch(S.label){case 0:s=x,a=y,C=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,E=0,w=(0,o.getConfig)(s,a,h),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,d(C,I,E,w,p,m,v)];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(w,p)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",i),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(L){switch(L.label){case 0:return console.log("Online status detected. Fetching token..."),[4,g(w,p)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw T=S.sent(),T;case 4:return[2]}})})};return Io.fetchToken=b,Io}var Mu;function Pu(){if(Mu)return Eo;Mu=1;var e=fe&&fe.__assign||function(){return e=Object.assign||function(b){for(var x,y=1,p=arguments.length;y<p;y++){x=arguments[y];for(var h in x)Object.prototype.hasOwnProperty.call(x,h)&&(b[h]=x[h])}return b},e.apply(this,arguments)},t=fe&&fe.__awaiter||function(b,x,y,p){function h(m){return m instanceof y?m:new y(function(v){v(m)})}return new(y||(y=Promise))(function(m,v){function C(w){try{E(p.next(w))}catch(T){v(T)}}function I(w){try{E(p.throw(w))}catch(T){v(T)}}function E(w){w.done?m(w.value):h(w.value).then(C,I)}E((p=p.apply(b,x||[])).next())})},n=fe&&fe.__generator||function(b,x){var y={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,v;return v={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function C(E){return function(w){return I([E,w])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;v&&(v=0,E[0]&&(y=0)),y;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,h=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(m=y.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){y.label=E[1];break}if(E[0]===6&&y.label<m[1]){y.label=m[1],m=E;break}if(m&&y.label<m[2]){y.label=m[2],y.ops.push(E);break}m[2]&&y.ops.pop(),y.trys.pop();continue}E=x.call(b,y)}catch(w){E=[6,w],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.makeAxiosCall=void 0;var r=Eu,o=je,s=Ru(),a,i=2,c=function(b,x){var y=x.fetchCsrfToken();b.formData?b.formData.append("_csrf_token",y):(b.data=b.data||{},b.data._csrf_token=y)},l=function(b){var x=!b.method||b.method.toLowerCase()==="get"?{params:b.data}:{data:b.data},y=e(e({method:b.method,url:"".concat(b.root_url).concat(b.url),headers:b.headers},x),{withCredentials:b.withCredentials,responseType:(b==null?void 0:b.responseType)||""});return y};function d(b){return t(this,void 0,void 0,function(){var x;return n(this,function(y){return x=l(b),[2,(0,r.default)(x).then(function(p){return p}).catch(function(p){throw p})]})})}function g(b,x,y,p){var h,m;return p===void 0&&(p=0),t(this,void 0,void 0,function(){var v,C,I,E,w,T;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(x.getToken&&!(0,o.hasValidToken)(b)))return[3,2];if(v=b.app_env,C=b.tier,!v||!C)throw Error("app_env or tier missing : ".concat(v,"/").concat(C));return"userId"in b&&"usergroupId"in b?(I={userId:b.userId,usergroupId:b.usergroupId},typeof x.isHiverApiDomain!="boolean"&&(x.isHiverApiDomain=!0),[4,(0,s.fetchToken)(v,C,I,x.isHiverApiDomain,y)]):[3,2];case 1:S.sent(),S.label=2;case 2:return b.csrfToken&&c(b,x),x.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",b.headers=e(e({},b.headers),{Authorization:"Bearer ".concat(a)})),[4,d(b)];case 3:return E=S.sent(),b.onSuccess&&b.onSuccess(E),[2,E];case 4:if(w=S.sent(),T=((h=w.response)===null||h===void 0?void 0:h.status)===403||((m=w.request)===null||m===void 0?void 0:m.status)===403,p<i&&T)return(0,o.expireToken)(),[2,g(b,x,y,p+1)];if(p>=i&&T||!T)throw b.onFail&&b.onFail(w),console.log("ERROR: Reached make Axios",w),w;return[3,5];case 5:return[2]}})})}return Eo.makeAxiosCall=g,Eo}(function(e){var t=fe&&fe.__awaiter||function(x,y,p,h){function m(v){return v instanceof p?v:new p(function(C){C(v)})}return new(p||(p=Promise))(function(v,C){function I(T){try{w(h.next(T))}catch(S){C(S)}}function E(T){try{w(h.throw(T))}catch(S){C(S)}}function w(T){T.done?v(T.value):m(T.value).then(I,E)}w((h=h.apply(x,y||[])).next())})},n=fe&&fe.__generator||function(x,y){var p={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},h,m,v,C;return C={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function I(w){return function(T){return E([w,T])}}function E(w){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,w[0]&&(p=0)),p;)try{if(h=1,m&&(v=w[0]&2?m.return:w[0]?m.throw||((v=m.return)&&v.call(m),0):m.next)&&!(v=v.call(m,w[1])).done)return v;switch(m=0,v&&(w=[w[0]&2,v.value]),w[0]){case 0:case 1:v=w;break;case 4:return p.label++,{value:w[1],done:!1};case 5:p.label++,m=w[1],w=[0];continue;case 7:w=p.ops.pop(),p.trys.pop();continue;default:if(v=p.trys,!(v=v.length>0&&v[v.length-1])&&(w[0]===6||w[0]===2)){p=0;continue}if(w[0]===3&&(!v||w[1]>v[0]&&w[1]<v[3])){p.label=w[1];break}if(w[0]===6&&p.label<v[1]){p.label=v[1],v=w;break}if(v&&p.label<v[2]){p.label=v[2],p.ops.push(w);break}v[2]&&p.ops.pop(),p.trys.pop();continue}w=y.call(x,p)}catch(T){w=[6,T],m=0}finally{h=v=0}if(w[0]&5)throw w[1];return{value:w[0]?w[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=Ou(),o=Au(),s=Sn;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=_u(),i=Ee,c=qt,l=Pu();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var d=Ru();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return d.fetchToken}});var g=$t,b=function(){function x(y,p,h,m,v,C){h===void 0&&(h=s.TENANT_PLATFORM.GMAIL),m===void 0&&(m=null),v===void 0&&(v=!0),C===void 0&&(C=!1),this.setEnvironment(),this.appEnv=y,this.tier=p,this.tenantPlatform=h,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=m,this.withCredentials=v,this.csrfToken=C}return x.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},x.prototype.hiverAxios=function(y,p,h,m){return p===void 0&&(p=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var v,C;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),m&&m<2?(v={userId:y.userId,usergroupId:y.usergroupId,apiRetry:m},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,v,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:I.sent(),I.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,y,p,h)];case 3:return[2,I.sent()];case 4:throw C=I.sent(),console.log("ERROR: Axios call failed",C),C;case 5:return[2]}})})},x.prototype.fetchAuthToken=function(y,p,h){return t(this,void 0,void 0,function(){var m;return n(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,y,this.tenantPlatform,this.getTokenForLogin,p,h)]);case 1:return v.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),v.label=3;case 3:return[3,8];case 4:return m=v.sent(),console.log("ERROR: Fetching token failed",m),this.authTokenFetchingInProgress=!1,[4,new Promise(function(C){return setTimeout(C,100)})];case 5:return v.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(y,p,h)];case 6:return v.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},x.prototype.logout=function(){return t(this,void 0,void 0,function(){var y,p;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),y=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(y,this.tenantPlatform)];case 1:return h.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw p=h.sent(),console.error("Heimdall: Logout failed",p),p;case 3:return[2]}})})},x.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},x}();e.Bifrost=b})(ei);const Gt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Qt=()=>{if(!Gt.isInitiated)return null;if(!Gt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Gt},Qg=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=ei.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Gt.baseUrl=e,Gt.appEnv=t,Gt.tier=n,Gt.userGroupId=o,Gt.userId=r,Gt.tenantPlatform=s,Gt.bifrost=new ei.Bifrost(t,n,s,i,a),Gt.isInitiated=!0},Ne=(({configHiver:e})=>async n=>{const r=Qt();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(b){throw console.error("API call failed with error: ",b),b}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Ug=e=>A.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1180_840)"},A.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1180_840"},A.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Kg=e=>A.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),A.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),em=e=>A.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_825_73646)"},A.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_825_73646"},A.createElement("rect",{width:24,height:24,fill:"white"})))),tm="Rate your experience with Hiver Apps",nm="Share feedback on Apps",rm="Got any feedback?",ju="https://txeep2wshyx.typeform.com/to/RuOwF9SG",om="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",sm="https://txeep2wshyx.typeform.com/to/bqhVSfDk",am="https://cdn.hiverhq.com/chat-support/hiver-chat.html",im="enable_connectors_clicked",cm="learn_more_clicked",lm="connector_card_expand_clicked",um="connector_card_collapsed_clicked",dm="connector_card_refresh_clicked",fm="connector_cards_loaded",pm="connector_whats_new_card_viewed",hm="connector_whats_new_explore_now_clicked",gm="connector_whats_new_learn_more_clicked",mm="connector_whats_new_dismissed",bm="connector_create_new_object_clicked",ym="connector_link_new_object_clicked",Cm="connector_new_object_created_by_form",vm="connector_new_object_linked_by_form",xm="connector_object_unlinked_by_form",Em="connector_link_preview_clicked",Im="connector_create_panel_cancel_clicked",wm="connector_create_panel_back_clicked",_m="card_loaded_on_click",Sm="card_loaded",Tm="schedule_call_clicked",Am="schedule_call_cross_clicked",Bu="CONNECTOR_EDIT_CLICKED",Lm="CONNECTOR_EDIT_REQUEST_SEND",Om="CONNECTOR_EDIT_CANCELLED",Fm="CONNECTOR_EDIT_BACK_CLICKED",Dm="CONNECTOR_EDIT_SUCCESS",km="connector_video_clicked",Nm="connector_card_error",wi="got_any_feedback_clicked",Rm="connector_deeplink_clicked",Mm="search_bar_tapped",Pm="search_suggestions_selected",jm="search_initiated",Bm="no_results_found",Vm="search_results_found",Gm="search_result_selected",Hm="search_result_linked",Wm="feedback_closed_clicked",Zm="help_btn_clicked",Xm="connector_chat_support_clicked",zm="missing_field_clicked",Ym={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},He=_.createContext(Ym),_s="hiver_connectors",_i={NOT_FOUND:404},Jm="ftr-connector-blue-dot",Vu="ftr-connectors-write-flow",qm="ftr-connectors-enhancements",$m="ftr-connector-schedule-call-agent",Qm="ftr-connectors-edit",Um="enableAllConnectorFtr",Km="ftr-cards-open-state",e3="ftr-connectors-global-search",t3="ftr-connectors-smart-suggestions",n3="ftr-connectors-email-selection",r3="ftr-connector-agent-feedback",Ss="ftr-connector-unified-view",o3="ftr-connectors-expanded-form",Gu="Please refresh and try again",s3="No data available",Ts="-",Hu="Refresh",Wu="Minimize",Si="Expand",Zu="Connectors",Ti="Apps",a3="Collapse",i3="Close",Xu="Link",c3="Create",l3="Update",zu="Unlink",Yu="Edit",Ai="Cancel",Ju="Create new object",qu="Link existing object",u3="Are you sure you want to unlink this object?",d3="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.",f3="Edit card",p3="bullet_list",h3="Expanded",g3="Collapsed",$u="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Qu="UNKNOWN_ERROR",m3="https://help.hiverhq.com/custom-connectors/common-connector-errors",Uu={MAIN_BUTTON:"main_button",ICON:"create_icon"},b3="Missing any fields? Inform us.",Li=e=>{let t=localStorage.getItem(_s);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},y3=e=>!!Li(e),Ku=()=>{const{userId:e=""}=Qt()||{};return String(e)},C3=(e,t=Ku())=>{const n=Li(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Oi=(e,t=!1,n=!1)=>{const r=Ku(),o=Li(e);if(t||!o){localStorage.removeItem(_s);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(_s,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(_s,JSON.stringify(i));return}},at=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[Um])===!0:(e==null?void 0:e[t])===!0,bt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),ed=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?h3:g3,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},td=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==_i.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)!==_i.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},v3=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)},As=({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 nd(e,t){return e.length>t?e.substring(0,t)+"...":e}const x3=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1187_180)"},A.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1187_180"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),E3=e=>A.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_847_49587)"},A.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_847_49587"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),I3=f.keyframes`
|
|
34
|
+
`):" "+mu(s[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:pi};function hi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Er(null,e)}function yu(e){return hi(e),e.headers=Bt.from(e.headers),e.data=di.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bu.getAdapter(e.adapter||li.adapter)(e).then(function(r){return hi(e),r.data=di.call(e,e.transformResponse,r),r.headers=Bt.from(r.headers),r},function(r){return su(r)||(hi(e),r&&r.response&&(r.response.data=di.call(e,e.transformResponse,r.response),r.response.headers=Bt.from(r.response.headers))),Promise.reject(r)})}const Cu="1.7.7",gi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const vu={};gi.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Cu+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new pe(o(a," has been removed"+(n?" in "+n:"")),pe.ERR_DEPRECATED);return n&&!vu[a]&&(vu[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 Kh(e,t,n){if(typeof e!="object")throw new pe("options must be an object",pe.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 pe("option "+s+" must be "+c,pe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new pe("Unknown option "+s,pe.ERR_BAD_OPTION)}}var mi={assertOptions:Kh,validators:gi};const _n=mi.validators;let Es=class{constructor(t){this.defaults=t,this.interceptors={request:new tu,response:new tu}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
35
|
+
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$n(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&mi.assertOptions(r,{silentJSONParsing:_n.transitional(_n.boolean),forcedJSONParsing:_n.transitional(_n.boolean),clarifyTimeoutError:_n.transitional(_n.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:mi.assertOptions(o,{encode:_n.function,serialize:_n.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=Bt.concat(a,s);const i=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,i.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let d,g=0,b;if(!c){const y=[yu.bind(this),void 0];for(y.unshift.apply(y,i),y.push.apply(y,l),b=y.length,d=Promise.resolve(n);g<b;)d=d.then(y[g++],y[g++]);return d}b=i.length;let x=n;for(g=0;g<b;){const y=i[g++],p=i[g++];try{x=y(x)}catch(h){p.call(this,h);break}}try{d=yu.call(this,x)}catch(y){return Promise.reject(y)}for(g=0,b=l.length;g<b;)d=d.then(l[g++],l[g++]);return d}getUri(t){t=$n(this.defaults,t);const n=lu(t.baseURL,t.url);return eu(n,t.params,t.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(t){Es.prototype[t]=function(n,r){return this.request($n(r||{},{method:t,url:n,data:(r||{}).data}))}}),R.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request($n(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Es.prototype[t]=n(),Es.prototype[t+"Form"]=n(!0)});var Is=Es;class bi{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 Er(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 bi(function(o){t=o}),cancel:t}}}var eg=bi;function tg(e){return function(n){return e.apply(null,n)}}function ng(e){return R.isObject(e)&&e.isAxiosError===!0}const yi={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(yi).forEach(([e,t])=>{yi[t]=e});var rg=yi;function xu(e){const t=new Is(e),n=jl(Is.prototype.request,t);return R.extend(n,Is.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return xu($n(e,o))},n}const Je=xu(li);Je.Axios=Is,Je.CanceledError=Er,Je.CancelToken=eg,Je.isCancel=su,Je.VERSION=Cu,Je.toFormData=ms,Je.AxiosError=pe,Je.Cancel=Je.CanceledError,Je.all=function(t){return Promise.all(t)},Je.spread=tg,Je.isAxiosError=ng,Je.mergeConfig=$n,Je.AxiosHeaders=Bt,Je.formToJSON=e=>ru(R.isHTMLForm(e)?new FormData(e):e),Je.getAdapter=bu.getAdapter,Je.HttpStatusCode=rg,Je.default=Je;var Eu=Je,Ee={},Sn={};(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={}))})(Sn);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.getProdHqConfig=gt.getProdApiConfig=gt.getSitHqConfig=gt.getSitApiConfig=gt.getDevHqConfig=gt.getDevApiConfig=void 0;var Ir={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",heimdallLogout:"/v1/logout",v2Login:"/api/auth/login/code",hotLogin:"/api/auth/login/code"},og=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Ir}};gt.getDevApiConfig=og;var sg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",hotUrl:"http://local.hiverhq.co.in:3000",apiEndpoints:Ir}};gt.getDevHqConfig=sg;var ag=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:Ir}};gt.getSitApiConfig=ag;var ig=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:Ir}};gt.getSitHqConfig=ig;var cg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Ir}};gt.getProdApiConfig=cg;var lg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",hotUrl:"https://app.hiverhq.com",apiEndpoints:Ir}};gt.getProdHqConfig=lg;var qt={},$t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.removeValue=$t.getValue=$t.setValue=void 0;var Ci={};function ug(e,t){Ci[e]=t}$t.setValue=ug;function dg(e){return Ci[e]}$t.getValue=dg;function fg(e){delete Ci[e]}$t.removeValue=fg,Object.defineProperty(qt,"__esModule",{value:!0}),qt.removeItemFromStorage=qt.setItemInStorage=qt.getItemFromStorage=void 0;var wr=Sn,_r=$t,pg=function(e,t){switch(t===void 0&&(t=(0,_r.getValue)("PLATFORM")),t){case wr.PLATFORM.WEB:return sessionStorage.getItem(e);case wr.PLATFORM.MOBILE:return(0,_r.getValue)(e);default:throw Error("Invalid PLATFORM ".concat(t))}};qt.getItemFromStorage=pg;var hg=function(e,t,n){switch(n===void 0&&(n=(0,_r.getValue)("PLATFORM")),n){case wr.PLATFORM.WEB:return sessionStorage.setItem(e,t);case wr.PLATFORM.MOBILE:return(0,_r.setValue)(e,t);default:throw Error("Invalid PLATFORM ".concat(n))}};qt.setItemInStorage=hg;var gg=function(e,t){switch(t===void 0&&(t=(0,_r.getValue)("PLATFORM")),t){case wr.PLATFORM.WEB:sessionStorage.removeItem(e);break;case wr.PLATFORM.MOBILE:(0,_r.removeValue)(e);break;default:throw Error("Invalid PLATFORM ".concat(t))}};qt.removeItemFromStorage=gg;var mg=fe&&fe.__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(d){try{l(r.next(d))}catch(g){a(g)}}function c(d){try{l(r.throw(d))}catch(g){a(g)}}function l(d){d.done?s(d.value):o(d.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},bg=fe&&fe.__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(d){return c([l,d])}}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(d){l=[6,d],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(Ee,"__esModule",{value:!0}),Ee.expireToken=Ee.invalidateToken=Ee.validateToken=Ee.validateAccount=Ee.getConfig=Ee.introduceDelay=Ee.isTokenInExpiryWindow=Ee.getStoredAuthData=Ee.setUserDetails=Ee.getRefreshInterval=Ee.setTokenAndExpiry=Ee.getRandomDelay=Ee.hasValidToken=void 0;var un=Sn,Sr=gt,Tt=qt,vi=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},xi=function(e){var t=parseInt((0,Tt.getItemFromStorage)("hiverAuthUserId")||"0"),n=parseInt((0,Tt.getItemFromStorage)("hiverAuthUserGroupId")||"0"),r=e.userId,o=e.usergroupId;return t===r&&o===n};Ee.validateAccount=xi;var yg=function(e){var t=xi(e);return!Iu()&&t};Ee.validateToken=yg;var Cg=function(e){return e.apiRetry?e.apiRetry>0:!1};Ee.invalidateToken=Cg;var vg=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};Ee.expireToken=vg;var xg=function(e){var t=(0,Tt.getItemFromStorage)("hiverAuthTokenExpiry")||"",n=new Date(t),r=vi(),o=xi(e);return console.log("Heimdall: checking if there is a valid token",r<n&&o),r<n&&o};Ee.hasValidToken=xg;var Eg=function(){return Math.floor(Math.random()*6e4)+6e4};Ee.getRandomDelay=Eg;var Ig=function(e,t){if(!e||!t)throw new Error("User Id or user group Id not found in the response");(0,Tt.setItemInStorage)("hiverAuthUserId",e),(0,Tt.setItemInStorage)("hiverAuthUserGroupId",t)};Ee.setUserDetails=Ig;var wg=function(e,t){if(!e)throw new Error("Token not found in the response");(0,Tt.setItemInStorage)("hiverAuthToken",e),(0,Tt.setItemInStorage)("hiverAuthTokenExpiry",t)};Ee.setTokenAndExpiry=wg;var _g=function(){var e=(0,Tt.getItemFromStorage)("hiverAuthTokenExpiry"),t=(0,Tt.getItemFromStorage)("hiverAuthToken"),n=(0,Tt.getItemFromStorage)("hiverAuthUserId"),r=(0,Tt.getItemFromStorage)("hiverAuthUserGroupId");return{token:t,expiryTime:e,userId:n,usergroupId:r}};Ee.getStoredAuthData=_g;var Iu=function(){var e=(0,Tt.getItemFromStorage)("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=vi(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};Ee.isTokenInExpiryWindow=Iu;var Sg=function(e){return mg(void 0,void 0,void 0,function(){return bg(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};Ee.introduceDelay=Sg;var Tg=function(e,t,n){switch(n===void 0&&(n=!0),t){case un.TIERS.SIT:case un.TIERS.QA:return n?(0,Sr.getSitApiConfig)(e):(0,Sr.getSitHqConfig)(e);case un.TIERS.PRODUCTION:case un.TIERS.PROD:return n?(0,Sr.getProdApiConfig)():(0,Sr.getProdHqConfig)();case un.TIERS.DEV:default:return n?(0,Sr.getDevApiConfig)():(0,Sr.getDevHqConfig)()}};Ee.getConfig=Tg;var Ag=function(){try{var e=(0,Tt.getItemFromStorage)("hiverAuthTokenExpiry");if(!e)return un.RETRY_DELAY_IN_CASE_OF_CORRUPTED_EXPIRY;var t=new Date(e),n=vi();return t.getTime()-n.getTime()>un.TWO_MINUTES_IN_MS?t.getTime()-un.TWO_MINUTES_IN_MS:t.getTime()-n.getTime()}catch(r){return console.error("Heimdall: Error in getRefreshInterval",r),un.REFETCH_CHECK_DELAY}};Ee.getRefreshInterval=Ag;var xo={},Vt={},wu;function _u(){if(wu)return Vt;wu=1;var e=fe&&fe.__awaiter||function(y,p,h,m){function v(C){return C instanceof h?C:new h(function(I){I(C)})}return new(h||(h=Promise))(function(C,I){function E(S){try{T(m.next(S))}catch(L){I(L)}}function w(S){try{T(m.throw(S))}catch(L){I(L)}}function T(S){S.done?C(S.value):v(S.value).then(E,w)}T((m=m.apply(y,p||[])).next())})},t=fe&&fe.__generator||function(y,p){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},m,v,C,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(T){return function(S){return w([T,S])}}function w(T){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,T[0]&&(h=0)),h;)try{if(m=1,v&&(C=T[0]&2?v.return:T[0]?v.throw||((C=v.return)&&C.call(v),0):v.next)&&!(C=C.call(v,T[1])).done)return C;switch(v=0,C&&(T=[T[0]&2,C.value]),T[0]){case 0:case 1:C=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,v=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!C||T[1]>C[0]&&T[1]<C[3])){h.label=T[1];break}if(T[0]===6&&h.label<C[1]){h.label=C[1],C=T;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(T);break}C[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(y,h)}catch(S){T=[6,S],v=0}finally{m=C=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.logoutFromHeimdall=Vt.getTenantLoginCode=Vt.getLoginToken=Vt.getAccessToken=void 0;var n=Sn,r=Ou(),o=Ee,s=function(y,p,h,m){var v=(0,o.getStoredAuthData)(),C=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,headers:{"x-hiver-tenant":C},data:{user_id:p.userId,usergroup_id:p.usergroupId,access_token:(v==null?void 0:v.token)||"",source:m}}},a=function(y,p,h,m,v){var C=h===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:p.heimdallUrl,url:p.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:y},headers:{"x-hiver-tenant":C,"x-hiver-userid":m,"x-hiver-usergroupid":v}}},i=function(y,p){var h=p===n.TENANT_PLATFORM.HIVERWEB?n.TENANT_PLATFORM.HIVERWEB:n.TENANT_PLATFORM.GMAIL;return{root_url:y.heimdallUrl,url:y.apiEndpoints.heimdallLogout,method:n.GET_METHOD,headers:{"x-hiver-tenant":h}}},c=function(y){return parseInt(y,10)},l=function(y,p,h,m){return{root_url:h===n.TENANT_PLATFORM.HIVERWEB?y.hotUrl:y.v2Url,url:h===n.TENANT_PLATFORM.HIVERWEB?y.apiEndpoints.hotLogin:y.apiEndpoints.v2Login,method:n.GET_METHOD,data:{usersession:c(p.userId),app:m||n.APP_UI.DEFAULT}}},d=function(y,p,h,m,v){return e(void 0,void 0,void 0,function(){var C,I,E,w,T,S,L;return t(this,function(N){switch(N.label){case 0:console.log("GETTOKEN tenantPlatform -> ",m),N.label=1;case 1:return N.trys.push([1,5,,6]),!(0,o.validateToken)(h)||(0,o.invalidateToken)(h)?(console.log("HEIMDALL: No valid token, fetching token"),C=s(p,h,m,v),[4,(0,r.performAxiosCall)(C)]):[3,3];case 2:return I=N.sent(),[2,{atToken:(w=I==null?void 0:I.data.at)===null||w===void 0?void 0:w.token,expiryTime:(T=I==null?void 0:I.data.at)===null||T===void 0?void 0:T.expires_at,userId:(S=I==null?void 0:I.data)===null||S===void 0?void 0:S.user_id,userGroupId:(L=I==null?void 0:I.data)===null||L===void 0?void 0:L.usergroup_id}];case 3:return console.log("Heimdall: Valid token already exists"),[2,{}];case 4:return[3,6];case 5:throw E=N.sent(),E;case 6:return[2]}})})};Vt.getAccessToken=d;var g=function(y,p,h,m,v,C){return e(void 0,void 0,void 0,function(){var I,E,w,T,S,L,N;return t(this,function(D){switch(D.label){case 0:I=a(y,h,m,v,C),D.label=1;case 1:return D.trys.push([1,3,,4]),[4,(0,r.performAxiosCall)(I)];case 2:return E=D.sent(),[2,{userId:(T=E==null?void 0:E.data)===null||T===void 0?void 0:T.user_id,userGroupId:(S=E==null?void 0:E.data)===null||S===void 0?void 0:S.usergroup_id,atToken:(L=E==null?void 0:E.data.at)===null||L===void 0?void 0:L.token,expiryTime:(N=E==null?void 0:E.data.at)===null||N===void 0?void 0:N.expires_at}];case 3:throw w=D.sent(),w;case 4:return[2]}})})};Vt.getLoginToken=g;var b=function(y,p,h,m,v){return e(void 0,void 0,void 0,function(){var C,I,E;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,2,,3]),console.log("ERROR debug: in getTenantLoginCode:",v),C=l(p,h,m,v),[4,(0,r.performAxiosCall)(C)];case 1:return I=w.sent(),[2,I==null?void 0:I.data.code];case 2:throw E=w.sent(),E;case 3:return[2]}})})};Vt.getTenantLoginCode=b;var x=function(y,p,h){return h===void 0&&(h=0),e(void 0,void 0,void 0,function(){var m,v,C;return t(this,function(I){switch(I.label){case 0:return I.trys.push([0,2,,5]),m=i(y,p),[4,(0,r.performAxiosCall)(m)];case 1:return v=I.sent(),[2,v==null?void 0:v.status];case 2:return C=I.sent(),h<2?[4,x(y,p,h+1)]:[3,4];case 3:I.sent(),I.label=4;case 4:throw C;case 5:return[2]}})})};return Vt.logoutFromHeimdall=x,Vt}var ws={},Lg=fe&&fe.__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(d){try{l(r.next(d))}catch(g){a(g)}}function c(d){try{l(r.throw(d))}catch(g){a(g)}}function l(d){d.done?s(d.value):o(d.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Og=fe&&fe.__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(d){return c([l,d])}}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(d){l=[6,d],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 Su=Sn,Fg=$t,Dg=function(e,t){switch(t===void 0&&(t=(0,Fg.getValue)("PLATFORM")),console.log("Online status detected. Fetching token..."),t){case Su.PLATFORM.WEB:return window.addEventListener("online",function(){return Lg(void 0,void 0,void 0,function(){return Og(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 Su.PLATFORM.MOBILE:e();return;default:throw Error("Invalid PLATFORM ".concat(t))}};ws.subscribeToOnlineEvent=Dg;var Tu;function Au(){if(Tu)return xo;Tu=1;var e=fe&&fe.__awaiter||function(y,p,h,m){function v(C){return C instanceof h?C:new h(function(I){I(C)})}return new(h||(h=Promise))(function(C,I){function E(S){try{T(m.next(S))}catch(L){I(L)}}function w(S){try{T(m.throw(S))}catch(L){I(L)}}function T(S){S.done?C(S.value):v(S.value).then(E,w)}T((m=m.apply(y,p||[])).next())})},t=fe&&fe.__generator||function(y,p){var h={label:0,sent:function(){if(C[0]&1)throw C[1];return C[1]},trys:[],ops:[]},m,v,C,I;return I={next:E(0),throw:E(1),return:E(2)},typeof Symbol=="function"&&(I[Symbol.iterator]=function(){return this}),I;function E(T){return function(S){return w([T,S])}}function w(T){if(m)throw new TypeError("Generator is already executing.");for(;I&&(I=0,T[0]&&(h=0)),h;)try{if(m=1,v&&(C=T[0]&2?v.return:T[0]?v.throw||((C=v.return)&&C.call(v),0):v.next)&&!(C=C.call(v,T[1])).done)return C;switch(v=0,C&&(T=[T[0]&2,C.value]),T[0]){case 0:case 1:C=T;break;case 4:return h.label++,{value:T[1],done:!1};case 5:h.label++,v=T[1],T=[0];continue;case 7:T=h.ops.pop(),h.trys.pop();continue;default:if(C=h.trys,!(C=C.length>0&&C[C.length-1])&&(T[0]===6||T[0]===2)){h=0;continue}if(T[0]===3&&(!C||T[1]>C[0]&&T[1]<C[3])){h.label=T[1];break}if(T[0]===6&&h.label<C[1]){h.label=C[1],C=T;break}if(C&&h.label<C[2]){h.label=C[2],h.ops.push(T);break}C[2]&&h.ops.pop(),h.trys.pop();continue}T=p.call(y,h)}catch(S){T=[6,S],v=0}finally{m=C=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}};Object.defineProperty(xo,"__esModule",{value:!0}),xo.fetchAccessToken=void 0;var n=_u(),r=Sn,o=Ee,s=ws,a,i,c,l=function(y,p,h,m,v,C){return C===void 0&&(C=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var I,E,w,T,S,L,N,D,k;return t(this,function(M){switch(M.label){case 0:I=2,M.label=1;case 1:return M.trys.push([1,7,,12]),console.log("ERROR debug: in login:",C,m),E=void 0,v?[4,v()]:[3,3];case 2:return E=M.sent(),[3,5];case 3:return[4,(0,n.getTenantLoginCode)(r.CONFIG_HIVER,y,p,m,C)];case 4:E=M.sent(),M.label=5;case 5:return[4,(0,n.getLoginToken)(E,r.CONFIG_HIVER,y,m,p.userId,p.usergroupId)];case 6:return w=M.sent(),T=w.userId,S=w.userGroupId,L=w.atToken,N=w.expiryTime,(0,o.setTokenAndExpiry)(L,N),(0,o.setUserDetails)(T,S),[3,12];case 7:D=M.sent(),console.log("ERROR debug: in error login:",D,C),k=h,M.label=8;case 8:return k<I?[4,l(y,p,k+1,m,v,C)]:[3,11];case 9:M.sent(),M.label=10;case 10:return k++,[3,8];case 11:throw D;case 12:return[2]}})})},d=function(y,p,h,m,v){return e(void 0,void 0,void 0,function(){var C,I,E,w;return t(this,function(T){switch(T.label){case 0:return p<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(S){return setTimeout(S,y)})]:[3,3];case 1:return T.sent(),p+=y,y*2<=r.MAX_BACKOFF_LIMIT?y*=2:y=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",y),C=h.retryDelay,I=h.configs,E=h.apiParams,w=h.appUI,[4,g(C,y,p,I,E,m,v,w)];case 2:T.sent(),T.label=3;case 3:return[2]}})})},g=function(y,p,h,m,v,C,I,E,w){return E===void 0&&(E="default"),e(void 0,void 0,void 0,function(){var T,S,L,N,D,k,M,B,z,q,Q,X,Y,oe;return t(this,function($){switch($.label){case 0:return $.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",c),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,m,v,C,E)];case 1:return T=$.sent(),S=T.atToken,L=T.expiryTime,N=T.userId,D=T.userGroupId,S&&L&&(0,o.setTokenAndExpiry)(S,L),N&&D&&(0,o.setUserDetails)(N,D),y=r.INITIAL_RETRY_DELAY,p=r.INITIAL_RETRY_DELAY,h=0,[3,12];case 2:return k=$.sent(),console.log("ERROR: Heimdall fetch token",k),((z=k.response)===null||z===void 0?void 0:z.status)===401||((q=k.request)===null||q===void 0?void 0:q.status)===401?(M=1,[4,l(m,v,M,C,I,w)]):[3,4];case 3:return $.sent(),[3,11];case 4:return((Q=k.response)===null||Q===void 0?void 0:Q.status)===409||((X=k.request)===null||X===void 0?void 0:X.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),B={retryDelay:y,configs:m,apiParams:v,appUI:w},[4,d(p,h,B,C,I)]):[3,6];case 5:if($.sent(),h>=r.MAX_CONFLICT_RETRY_DELAY)throw k;return[3,11];case 6:if(!(((Y=k.response)===null||Y===void 0?void 0:Y.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 y<=r.MAX_RETRY_DELAY?[4,new Promise(function(P){return setTimeout(P,y)})]:[3,10];case 8:return $.sent(),y*=2,console.log("Heimdall: Fetch token post doubling retry delay",y),[4,g(y,p,h,m,v,C,I,w)];case 9:return $.sent(),[3,11];case 10:throw k;case 11:return[3,12];case 12:return[2]}})})},b=function(y,p,h,m,v,C,I,E){return h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=r.INITIAL_RETRY_DELAY),e(void 0,void 0,void 0,function(){var w,T,S;return t(this,function(L){switch(L.label){case 0:return L.trys.push([0,4,,5]),w=(0,o.isTokenInExpiryWindow)(),w?(T=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(T)]):[3,3];case 1:return L.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,g(h,m,v,y,p,C,I,E)];case 2:L.sent(),L.label=3;case 3:return[3,5];case 4:throw S=L.sent(),S;case 5:return[2]}})})},x=function(y,p,h,m,v,C,I){return e(void 0,void 0,void 0,function(){var E,w,T,S,L,N;return t(this,function(D){switch(D.label){case 0:a=y,i=p,E=r.INITIAL_RETRY_DELAY,w=r.INITIAL_RETRY_DELAY,T=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(E,w,T,S,h,m,v,C,I)];case 2:return D.sent(),console.log("Heimdall: Interval Set on fetch token when fetch token is called:",c),clearInterval(c),c=setInterval(function(){return b(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,v,I)},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,b(S,h,r.INITIAL_RETRY_DELAY,r.INITIAL_RETRY_DELAY,0,m,v,I)];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 xo.fetchAccessToken=x,xo}var Lu;function Ou(){if(Lu)return Jn;Lu=1;var e=fe&&fe.__assign||function(){return e=Object.assign||function(p){for(var h,m=1,v=arguments.length;m<v;m++){h=arguments[m];for(var C in h)Object.prototype.hasOwnProperty.call(h,C)&&(p[C]=h[C])}return p},e.apply(this,arguments)},t=fe&&fe.__awaiter||function(p,h,m,v){function C(I){return I instanceof m?I:new m(function(E){E(I)})}return new(m||(m=Promise))(function(I,E){function w(L){try{S(v.next(L))}catch(N){E(N)}}function T(L){try{S(v.throw(L))}catch(N){E(N)}}function S(L){L.done?I(L.value):C(L.value).then(w,T)}S((v=v.apply(p,h||[])).next())})},n=fe&&fe.__generator||function(p,h){var m={label:0,sent:function(){if(I[0]&1)throw I[1];return I[1]},trys:[],ops:[]},v,C,I,E;return E={next:w(0),throw:w(1),return:w(2)},typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function w(S){return function(L){return T([S,L])}}function T(S){if(v)throw new TypeError("Generator is already executing.");for(;E&&(E=0,S[0]&&(m=0)),m;)try{if(v=1,C&&(I=S[0]&2?C.return:S[0]?C.throw||((I=C.return)&&I.call(C),0):C.next)&&!(I=I.call(C,S[1])).done)return I;switch(C=0,I&&(S=[S[0]&2,I.value]),S[0]){case 0:case 1:I=S;break;case 4:return m.label++,{value:S[1],done:!1};case 5:m.label++,C=S[1],S=[0];continue;case 7:S=m.ops.pop(),m.trys.pop();continue;default:if(I=m.trys,!(I=I.length>0&&I[I.length-1])&&(S[0]===6||S[0]===2)){m=0;continue}if(S[0]===3&&(!I||S[1]>I[0]&&S[1]<I[3])){m.label=S[1];break}if(S[0]===6&&m.label<I[1]){m.label=I[1],I=S;break}if(I&&m.label<I[2]){m.label=I[2],m.ops.push(S);break}I[2]&&m.ops.pop(),m.trys.pop();continue}S=h.call(p,m)}catch(L){S=[6,L],C=0}finally{v=I=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}};Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.hiverAxiosCall=Jn.performAxiosCall=void 0;var r=Eu,o=Ee,s=Au(),a=qt,i=Sn,c,l=2,d=function(p,h){var m=h.fetchCsrfToken();p.formData?p.formData.append("_csrf_token",m):(p.data=p.data||{},p.data._csrf_token=m)},g=function(p,h){var m={};!p.method||p.method.toLowerCase()==="get"?m={params:p.params?p.params:p.data}:m=p.params?{params:p,data:p.data}:{data:p.data};var v=e(e({method:p.method,url:"".concat(p.root_url).concat(p.url),headers:p.headers},m),{withCredentials:h,responseType:(p==null?void 0:p.responseType)||""});return v};function b(p,h){return h===void 0&&(h=!0),t(this,void 0,void 0,function(){var m;return n(this,function(v){return m=g(p,h),[2,(0,r.default)(m).then(function(C){return C}).catch(function(C){throw C})]})})}Jn.performAxiosCall=b;function x(p,h,m){return t(this,void 0,void 0,function(){var v,C,I;return n(this,function(E){switch(E.label){case 0:return E.trys.push([0,6,,8]),p.authTokenFetchingInProgress?[3,2]:(p.authTokenFetchingInProgress=!0,v=p.appEnv,C=p.tier,[4,(0,s.fetchAccessToken)(v,C,h,p.tenantPlatform,p.getTokenForLogin,m)]);case 1:return E.sent(),p.authTokenFetchingInProgress=!1,[3,5];case 2:return[4,new Promise(function(w){return setTimeout(w,100)})];case 3:return E.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,x(p,h,m)];case 4:E.sent(),E.label=5;case 5:return[3,8];case 6:return I=E.sent(),console.log("Error while fetching Auth Token :",I),p.authTokenFetchingInProgress=!1,[4,x(p,h,m)];case 7:return E.sent(),[3,8];case 8:return[2]}})})}function y(p,h,m,v,C){var I,E;return C===void 0&&(C=0),t(this,void 0,void 0,function(){var w,T,S,L,N,D,k;return n(this,function(M){switch(M.label){case 0:if(M.trys.push([0,4,,5]),!(m.getToken&&!(0,o.hasValidToken)(h)))return[3,2];if(w=p.appEnv,T=p.tier,!w||!T)throw Error("appEnv or tier missing : ".concat(w,"/").concat(T));return"userId"in h&&"usergroupId"in h?(S={userId:h.userId,usergroupId:h.usergroupId},[4,x(p,S,v)]):[3,2];case 1:M.sent(),M.label=2;case 2:return p.csrfToken&&d(h,m),L=p.tenantPlatform===i.TENANT_PLATFORM.HIVERWEB?i.TENANT_PLATFORM.HIVERWEB:i.TENANT_PLATFORM.GMAIL,h.headers=e(e({},h.headers),{"x-hiver-tenant":L,"x-hiver-userid":(0,a.getItemFromStorage)("hiverAuthUserId")||"0","x-hiver-usergroupid":(0,a.getItemFromStorage)("hiverAuthUserGroupId")||"0"}),m.getToken&&(c=(0,a.getItemFromStorage)("hiverAuthToken")||"",h.headers=e(e({},h.headers),{Authorization:"Bearer ".concat(c)})),console.log("Performing axios call for:",h),[4,b(h,p.withCredentials)];case 3:return N=M.sent(),h.onSuccess&&h.onSuccess(N),[2,N];case 4:if(D=M.sent(),k=((I=D.response)===null||I===void 0?void 0:I.status)===403||((E=D.request)===null||E===void 0?void 0:E.status)===403,C<l&&k)return(0,o.expireToken)(),[2,y(p,h,m,v,C+1)];if(C>=l&&k||!k)throw h.onFail&&h.onFail(D),console.log("ERROR: Reached make Axios",D),D;return[3,5];case 5:return[2]}})})}return Jn.hiverAxiosCall=y,Jn}var Eo={},je={},Ge={};Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.TIERS=Ge.APP_UI=Ge.CONFIG_HIVER=Ge.REFETCH_CHECK_DELAY=Ge.INITIAL_RETRY_DELAY=Ge.MAX_BACKOFF_LIMIT=Ge.MAX_CONFLICT_RETRY_DELAY=Ge.MAX_RETRY_DELAY=Ge.GET_METHOD=void 0,Ge.GET_METHOD="GET",Ge.MAX_RETRY_DELAY=18e4,Ge.MAX_CONFLICT_RETRY_DELAY=63e3,Ge.MAX_BACKOFF_LIMIT=8e3,Ge.INITIAL_RETRY_DELAY=1e3,Ge.REFETCH_CHECK_DELAY=168e4,Ge.CONFIG_HIVER={getToken:!1,fetchCsrfToken:function(){return""},isHiverApiDomain:!0},Ge.APP_UI={COLLAB_SPACE:"collab-space",DEFAULT:"default"},Ge.TIERS={DEV:"dev",SIT:"sit",PROD:"production"};var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.getProdHqConfig=mt.getProdApiConfig=mt.getSitHqConfig=mt.getSitApiConfig=mt.getDevHqConfig=mt.getDevApiConfig=void 0;var Tr={heimdallTokenFetch:"/v1/token/get",heimdallLogin:"/v1/login/code",v2Login:"/api/auth/login/code"},kg=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api",apiEndpoints:Tr}};mt.getDevApiConfig=kg;var Ng=function(){return{v2Url:"https://v2dev.hiver.space",heimdallUrl:"https://dev.hiver.space/api/heimdall-api2",apiEndpoints:Tr}};mt.getDevHqConfig=Ng;var Rg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api"),apiEndpoints:Tr}};mt.getSitApiConfig=Rg;var Mg=function(e){return{v2Url:"https://v2".concat(e,".hiver.space"),heimdallUrl:"https://".concat(e,".hiver.space/api/heimdall-api2"),apiEndpoints:Tr}};mt.getSitHqConfig=Mg;var Pg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall.hiverapi.com",apiEndpoints:Tr}};mt.getProdApiConfig=Pg;var jg=function(){return{v2Url:"https://v2.hiverhq.com",heimdallUrl:"https://heimdall2.hiverhq.com",apiEndpoints:Tr}};mt.getProdHqConfig=jg;var Bg=fe&&fe.__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(d){try{l(r.next(d))}catch(g){a(g)}}function c(d){try{l(r.throw(d))}catch(g){a(g)}}function l(d){d.done?s(d.value):o(d.value).then(i,c)}l((r=r.apply(e,t||[])).next())})},Vg=fe&&fe.__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(d){return c([l,d])}}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(d){l=[6,d],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(je,"__esModule",{value:!0}),je.expireToken=je.validateToken=je.validateAccount=je.getConfig=je.introduceDelay=je.isTokenInExpiryWindow=je.getStoredAuthData=je.setUserDetails=je.setTokenAndExpiry=je.getRandomDelay=je.hasValidToken=void 0;var Ei=Ge,Qn=mt,Fu=function(){var e=new Date,t=new Date(e.getTime()+e.getTimezoneOffset()*6e4);return t},Ii=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};je.validateAccount=Ii;var Gg=function(e){var t=Ii(e);return!Du()&&t};je.validateToken=Gg;var Hg=function(){try{sessionStorage.removeItem("hiverAuthTokenExpiry")}catch{console.log("Heimdall: Unable to Remove token.")}};je.expireToken=Hg;var Wg=function(e){console.log("Heimdall: checking if there is a valid token");var t=sessionStorage.getItem("hiverAuthTokenExpiry")||"",n=new Date(t),r=Fu(),o=Ii(e);return r<n&&o};je.hasValidToken=Wg;var Zg=function(){return Math.floor(Math.random()*6e4)+6e4};je.getRandomDelay=Zg;var Xg=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)};je.setUserDetails=Xg;var zg=function(e,t){if(!e)throw new Error("Token not found in the response");sessionStorage.setItem("hiverAuthToken",e),sessionStorage.setItem("hiverAuthTokenExpiry",t)};je.setTokenAndExpiry=zg;var Yg=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}};je.getStoredAuthData=Yg;var Du=function(){var e=sessionStorage.getItem("hiverAuthTokenExpiry")||"";if(!e)return!0;var t=Fu(),n=new Date(e),r=4*60*1e3,o=n.getTime()-t.getTime()<r;return console.log({currentTime:t,expiry:n,isInExpiryWindow:o}),o};je.isTokenInExpiryWindow=Du;var Jg=function(e){return Bg(void 0,void 0,void 0,function(){return Vg(this,function(t){switch(t.label){case 0:return[4,new Promise(function(n){return setTimeout(n,e)})];case 1:return t.sent(),[2]}})})};je.introduceDelay=Jg;var qg=function(e,t,n){switch(t){case Ei.TIERS.SIT:return console.log("ISHIVERAPIDOMAIN:",n,(0,Qn.getSitHqConfig)(e)),n?(0,Qn.getSitApiConfig)(e):(0,Qn.getSitHqConfig)(e);case Ei.TIERS.PROD:return n?(0,Qn.getProdApiConfig)():(0,Qn.getProdHqConfig)();case Ei.TIERS.DEV:default:return n?(0,Qn.getDevApiConfig)():(0,Qn.getDevHqConfig)()}};je.getConfig=qg;var Io={},dn={},ku;function $g(){if(ku)return dn;ku=1;var e=fe&&fe.__awaiter||function(b,x,y,p){function h(m){return m instanceof y?m:new y(function(v){v(m)})}return new(y||(y=Promise))(function(m,v){function C(w){try{E(p.next(w))}catch(T){v(T)}}function I(w){try{E(p.throw(w))}catch(T){v(T)}}function E(w){w.done?m(w.value):h(w.value).then(C,I)}E((p=p.apply(b,x||[])).next())})},t=fe&&fe.__generator||function(b,x){var y={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,v;return v={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function C(E){return function(w){return I([E,w])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;v&&(v=0,E[0]&&(y=0)),y;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,h=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(m=y.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){y.label=E[1];break}if(E[0]===6&&y.label<m[1]){y.label=m[1],m=E;break}if(m&&y.label<m[2]){y.label=m[2],y.ops.push(E);break}m[2]&&y.ops.pop(),y.trys.pop();continue}E=x.call(b,y)}catch(w){E=[6,w],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(dn,"__esModule",{value:!0}),dn.getV2LoginCode=dn.getLoginToken=dn.getAccessToken=void 0;var n=Ge,r=Pu(),o=je,s=function(b,x,y){var p=(0,o.getStoredAuthData)();return{root_url:b.heimdallUrl,url:b.apiEndpoints.heimdallTokenFetch,method:n.GET_METHOD,data:{user_id:x.userId,usergroup_id:x.usergroupId,access_token:(p==null?void 0:p.token)||"",source:y},withCredentials:!0}},a=function(b,x){return{root_url:x.heimdallUrl,url:x.apiEndpoints.heimdallLogin,method:n.GET_METHOD,data:{code:b},withCredentials:!0}},i=function(b){return parseInt(b,10)},c=function(b,x){return{root_url:b.v2Url,url:b.apiEndpoints.v2Login,method:n.GET_METHOD,withCredentials:!0,data:{usersession:i(localStorage.getItem("hiver-config.usersession")),app:x||n.APP_UI.DEFAULT}}},l=function(b,x,y,p){return e(void 0,void 0,void 0,function(){var h,m,v,C,I,E,w;return t(this,function(T){switch(T.label){case 0:return T.trys.push([0,4,,5]),(0,o.validateToken)(y)?[3,2]:(console.log("HEIMDALL: No valid token, fetching token"),h=s(x,y,p),[4,(0,r.makeAxiosCall)(h,b)]);case 1:return m=T.sent(),[2,{atToken:(C=m==null?void 0:m.data.at)===null||C===void 0?void 0:C.token,expiryTime:(I=m==null?void 0:m.data.at)===null||I===void 0?void 0:I.expires_at,userId:(E=m==null?void 0:m.data)===null||E===void 0?void 0:E.user_id,userGroupId:(w=m==null?void 0:m.data)===null||w===void 0?void 0:w.usergroup_id}];case 2:return console.log("Heimdall: Valid token already exists"),[2,{}];case 3:return[3,5];case 4:throw v=T.sent(),v;case 5:return[2]}})})};dn.getAccessToken=l;var d=function(b,x,y){return e(void 0,void 0,void 0,function(){var p,h,m,v,C,I,E;return t(this,function(w){switch(w.label){case 0:p=a(b,y),w.label=1;case 1:return w.trys.push([1,3,,4]),[4,(0,r.makeAxiosCall)(p,x)];case 2:return h=w.sent(),[2,{userId:(v=h==null?void 0:h.data)===null||v===void 0?void 0:v.user_id,userGroupId:(C=h==null?void 0:h.data)===null||C===void 0?void 0:C.usergroup_id,atToken:(I=h==null?void 0:h.data.at)===null||I===void 0?void 0:I.token,expiryTime:(E=h==null?void 0:h.data.at)===null||E===void 0?void 0:E.expires_at}];case 3:throw m=w.sent(),m;case 4:return[2]}})})};dn.getLoginToken=d;var g=function(b,x,y){return e(void 0,void 0,void 0,function(){var p,h,m;return t(this,function(v){switch(v.label){case 0:return v.trys.push([0,2,,3]),console.log("ERROR debug: in getV2loginCode:",y),p=c(x,y),[4,(0,r.makeAxiosCall)(p,b)];case 1:return h=v.sent(),console.log("DEBUG HEIMDALL: local storage:",h==null?void 0:h.data),[2,h==null?void 0:h.data.code];case 2:throw m=v.sent(),m;case 3:return[2]}})})};return dn.getV2LoginCode=g,dn}var Nu;function Ru(){if(Nu)return Io;Nu=1;var e=fe&&fe.__awaiter||function(x,y,p,h){function m(v){return v instanceof p?v:new p(function(C){C(v)})}return new(p||(p=Promise))(function(v,C){function I(T){try{w(h.next(T))}catch(S){C(S)}}function E(T){try{w(h.throw(T))}catch(S){C(S)}}function w(T){T.done?v(T.value):m(T.value).then(I,E)}w((h=h.apply(x,y||[])).next())})},t=fe&&fe.__generator||function(x,y){var p={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},h,m,v,C;return C={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function I(w){return function(T){return E([w,T])}}function E(w){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,w[0]&&(p=0)),p;)try{if(h=1,m&&(v=w[0]&2?m.return:w[0]?m.throw||((v=m.return)&&v.call(m),0):m.next)&&!(v=v.call(m,w[1])).done)return v;switch(m=0,v&&(w=[w[0]&2,v.value]),w[0]){case 0:case 1:v=w;break;case 4:return p.label++,{value:w[1],done:!1};case 5:p.label++,m=w[1],w=[0];continue;case 7:w=p.ops.pop(),p.trys.pop();continue;default:if(v=p.trys,!(v=v.length>0&&v[v.length-1])&&(w[0]===6||w[0]===2)){p=0;continue}if(w[0]===3&&(!v||w[1]>v[0]&&w[1]<v[3])){p.label=w[1];break}if(w[0]===6&&p.label<v[1]){p.label=v[1],v=w;break}if(v&&p.label<v[2]){p.label=v[2],p.ops.push(w);break}v[2]&&p.ops.pop(),p.trys.pop();continue}w=y.call(x,p)}catch(T){w=[6,T],m=0}finally{h=v=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}};Object.defineProperty(Io,"__esModule",{value:!0}),Io.fetchToken=void 0;var n=$g(),r=Ge,o=je,s,a,i,c=function(x,y,p){return p===void 0&&(p=r.APP_UI.DEFAULT),e(void 0,void 0,void 0,function(){var h,m,v,C,I,E,w,T,S;return t(this,function(L){switch(L.label){case 0:h=2,L.label=1;case 1:return L.trys.push([1,4,,9]),console.log("ERROR debug: in login:",p),[4,(0,n.getV2LoginCode)(r.CONFIG_HIVER,x,p)];case 2:return m=L.sent(),[4,(0,n.getLoginToken)(m,r.CONFIG_HIVER,x)];case 3:return v=L.sent(),C=v.userId,I=v.userGroupId,E=v.atToken,w=v.expiryTime,(0,o.setTokenAndExpiry)(E,w),(0,o.setUserDetails)(C,I),[3,9];case 4:T=L.sent(),console.log("ERROR debug: in error login:",T,p),S=y,L.label=5;case 5:return S<h?[4,c(x,S+1,p)]:[3,8];case 6:L.sent(),L.label=7;case 7:return S++,[3,5];case 8:throw T;case 9:return[2]}})})},l=function(x,y,p){return e(void 0,void 0,void 0,function(){var h,m,v,C;return t(this,function(I){switch(I.label){case 0:return y<r.MAX_CONFLICT_RETRY_DELAY?[4,new Promise(function(E){return setTimeout(E,x)})]:[3,3];case 1:return I.sent(),y+=x,x*2<=r.MAX_BACKOFF_LIMIT?x*=2:x=r.MAX_BACKOFF_LIMIT,console.log("Heimdall: Fetch token post doubling conflict retry delay",x),h=p.retryDelay,m=p.configs,v=p.api_params,C=p.appUI,[4,d(h,x,y,m,v,C)];case 2:I.sent(),I.label=3;case 3:return[2]}})})},d=function(x,y,p,h,m,v,C){return v===void 0&&(v="default"),e(void 0,void 0,void 0,function(){var I,E,w,T,S,L,N,D,k,M,B,z,q,Q;return t(this,function(X){switch(X.label){case 0:return X.trys.push([0,2,,12]),console.log("Heimdall: Interval Set on fetch token in fetchAndSaveToken:",i),[4,(0,n.getAccessToken)(r.CONFIG_HIVER,h,m,v)];case 1:return I=X.sent(),E=I.atToken,w=I.expiryTime,T=I.userId,S=I.userGroupId,E&&w&&(0,o.setTokenAndExpiry)(E,w),T&&S&&(0,o.setUserDetails)(T,S),x=r.INITIAL_RETRY_DELAY,y=r.INITIAL_RETRY_DELAY,p=0,[3,12];case 2:return L=X.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(h,N,C)]):[3,4];case 3:return X.sent(),[3,11];case 4:return((B=L.response)===null||B===void 0?void 0:B.status)===409||((z=L.request)===null||z===void 0?void 0:z.status)===409?(console.log("Heimdall: Fetching token post 409 in fetch And Save Token"),D={retryDelay:x,configs:h,api_params:m,appUI:C},[4,l(y,p,D)]):[3,6];case 5:if(X.sent(),p>=r.MAX_CONFLICT_RETRY_DELAY)throw L;return[3,11];case 6:if(!(((q=L.response)===null||q===void 0?void 0:q.status)===422||((Q=L.request)===null||Q===void 0?void 0:Q.status)===422))return[3,7];throw console.log("ERROR: Throwing error",L.response.status),L;case 7:return x<=r.MAX_RETRY_DELAY?[4,new Promise(function(Y){return setTimeout(Y,x)})]:[3,10];case 8:return X.sent(),x*=2,console.log("Heimdall: Fetch token post doubling retry delay",x),[4,d(x,y,p,h,m,C)];case 9:return X.sent(),[3,11];case 10:throw L;case 11:return[3,12];case 12:return[2]}})})},g=function(x,y,p,h,m,v){return p===void 0&&(p=r.INITIAL_RETRY_DELAY),h===void 0&&(h=r.INITIAL_RETRY_DELAY),m===void 0&&(m=0),e(void 0,void 0,void 0,function(){var C,I,E;return t(this,function(w){switch(w.label){case 0:return w.trys.push([0,4,,5]),C=(0,o.isTokenInExpiryWindow)(),C?(I=(0,o.getRandomDelay)(),[4,(0,o.introduceDelay)(I)]):[3,3];case 1:return w.sent(),console.log("Heimdall: Fetching token - in expiry window"),[4,d(p,h,m,x,y,v)];case 2:w.sent(),w.label=3;case 3:return[3,5];case 4:throw E=w.sent(),E;case 5:return[2]}})})},b=function(x,y,p,h,m,v){return e(void 0,void 0,void 0,function(){var C,I,E,w,T;return t(this,function(S){switch(S.label){case 0:s=x,a=y,C=r.INITIAL_RETRY_DELAY,I=r.INITIAL_RETRY_DELAY,E=0,w=(0,o.getConfig)(s,a,h),S.label=1;case 1:return S.trys.push([1,3,,4]),[4,d(C,I,E,w,p,m,v)];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(w,p)},r.REFETCH_CHECK_DELAY),console.log("Heimdall: Interval Set on fetch token:",i),window.addEventListener("online",function(){return e(void 0,void 0,void 0,function(){return t(this,function(L){switch(L.label){case 0:return console.log("Online status detected. Fetching token..."),[4,g(w,p)];case 1:return L.sent(),[2]}})})}),[3,4];case 3:throw T=S.sent(),T;case 4:return[2]}})})};return Io.fetchToken=b,Io}var Mu;function Pu(){if(Mu)return Eo;Mu=1;var e=fe&&fe.__assign||function(){return e=Object.assign||function(b){for(var x,y=1,p=arguments.length;y<p;y++){x=arguments[y];for(var h in x)Object.prototype.hasOwnProperty.call(x,h)&&(b[h]=x[h])}return b},e.apply(this,arguments)},t=fe&&fe.__awaiter||function(b,x,y,p){function h(m){return m instanceof y?m:new y(function(v){v(m)})}return new(y||(y=Promise))(function(m,v){function C(w){try{E(p.next(w))}catch(T){v(T)}}function I(w){try{E(p.throw(w))}catch(T){v(T)}}function E(w){w.done?m(w.value):h(w.value).then(C,I)}E((p=p.apply(b,x||[])).next())})},n=fe&&fe.__generator||function(b,x){var y={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},p,h,m,v;return v={next:C(0),throw:C(1),return:C(2)},typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function C(E){return function(w){return I([E,w])}}function I(E){if(p)throw new TypeError("Generator is already executing.");for(;v&&(v=0,E[0]&&(y=0)),y;)try{if(p=1,h&&(m=E[0]&2?h.return:E[0]?h.throw||((m=h.return)&&m.call(h),0):h.next)&&!(m=m.call(h,E[1])).done)return m;switch(h=0,m&&(E=[E[0]&2,m.value]),E[0]){case 0:case 1:m=E;break;case 4:return y.label++,{value:E[1],done:!1};case 5:y.label++,h=E[1],E=[0];continue;case 7:E=y.ops.pop(),y.trys.pop();continue;default:if(m=y.trys,!(m=m.length>0&&m[m.length-1])&&(E[0]===6||E[0]===2)){y=0;continue}if(E[0]===3&&(!m||E[1]>m[0]&&E[1]<m[3])){y.label=E[1];break}if(E[0]===6&&y.label<m[1]){y.label=m[1],m=E;break}if(m&&y.label<m[2]){y.label=m[2],y.ops.push(E);break}m[2]&&y.ops.pop(),y.trys.pop();continue}E=x.call(b,y)}catch(w){E=[6,w],h=0}finally{p=m=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.makeAxiosCall=void 0;var r=Eu,o=je,s=Ru(),a,i=2,c=function(b,x){var y=x.fetchCsrfToken();b.formData?b.formData.append("_csrf_token",y):(b.data=b.data||{},b.data._csrf_token=y)},l=function(b){var x=!b.method||b.method.toLowerCase()==="get"?{params:b.data}:{data:b.data},y=e(e({method:b.method,url:"".concat(b.root_url).concat(b.url),headers:b.headers},x),{withCredentials:b.withCredentials,responseType:(b==null?void 0:b.responseType)||""});return y};function d(b){return t(this,void 0,void 0,function(){var x;return n(this,function(y){return x=l(b),[2,(0,r.default)(x).then(function(p){return p}).catch(function(p){throw p})]})})}function g(b,x,y,p){var h,m;return p===void 0&&(p=0),t(this,void 0,void 0,function(){var v,C,I,E,w,T;return n(this,function(S){switch(S.label){case 0:if(S.trys.push([0,4,,5]),!(x.getToken&&!(0,o.hasValidToken)(b)))return[3,2];if(v=b.app_env,C=b.tier,!v||!C)throw Error("app_env or tier missing : ".concat(v,"/").concat(C));return"userId"in b&&"usergroupId"in b?(I={userId:b.userId,usergroupId:b.usergroupId},typeof x.isHiverApiDomain!="boolean"&&(x.isHiverApiDomain=!0),[4,(0,s.fetchToken)(v,C,I,x.isHiverApiDomain,y)]):[3,2];case 1:S.sent(),S.label=2;case 2:return b.csrfToken&&c(b,x),x.getToken&&(a=sessionStorage.getItem("hiverAuthToken")||"",b.headers=e(e({},b.headers),{Authorization:"Bearer ".concat(a)})),[4,d(b)];case 3:return E=S.sent(),b.onSuccess&&b.onSuccess(E),[2,E];case 4:if(w=S.sent(),T=((h=w.response)===null||h===void 0?void 0:h.status)===403||((m=w.request)===null||m===void 0?void 0:m.status)===403,p<i&&T)return(0,o.expireToken)(),[2,g(b,x,y,p+1)];if(p>=i&&T||!T)throw b.onFail&&b.onFail(w),console.log("ERROR: Reached make Axios",w),w;return[3,5];case 5:return[2]}})})}return Eo.makeAxiosCall=g,Eo}(function(e){var t=fe&&fe.__awaiter||function(x,y,p,h){function m(v){return v instanceof p?v:new p(function(C){C(v)})}return new(p||(p=Promise))(function(v,C){function I(T){try{w(h.next(T))}catch(S){C(S)}}function E(T){try{w(h.throw(T))}catch(S){C(S)}}function w(T){T.done?v(T.value):m(T.value).then(I,E)}w((h=h.apply(x,y||[])).next())})},n=fe&&fe.__generator||function(x,y){var p={label:0,sent:function(){if(v[0]&1)throw v[1];return v[1]},trys:[],ops:[]},h,m,v,C;return C={next:I(0),throw:I(1),return:I(2)},typeof Symbol=="function"&&(C[Symbol.iterator]=function(){return this}),C;function I(w){return function(T){return E([w,T])}}function E(w){if(h)throw new TypeError("Generator is already executing.");for(;C&&(C=0,w[0]&&(p=0)),p;)try{if(h=1,m&&(v=w[0]&2?m.return:w[0]?m.throw||((v=m.return)&&v.call(m),0):m.next)&&!(v=v.call(m,w[1])).done)return v;switch(m=0,v&&(w=[w[0]&2,v.value]),w[0]){case 0:case 1:v=w;break;case 4:return p.label++,{value:w[1],done:!1};case 5:p.label++,m=w[1],w=[0];continue;case 7:w=p.ops.pop(),p.trys.pop();continue;default:if(v=p.trys,!(v=v.length>0&&v[v.length-1])&&(w[0]===6||w[0]===2)){p=0;continue}if(w[0]===3&&(!v||w[1]>v[0]&&w[1]<v[3])){p.label=w[1];break}if(w[0]===6&&p.label<v[1]){p.label=v[1],v=w;break}if(v&&p.label<v[2]){p.label=v[2],p.ops.push(w);break}v[2]&&p.ops.pop(),p.trys.pop();continue}w=y.call(x,p)}catch(T){w=[6,T],m=0}finally{h=v=0}if(w[0]&5)throw w[1];return{value:w[0]?w[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=Ou(),o=Au(),s=Sn;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=_u(),i=Ee,c=qt,l=Pu();Object.defineProperty(e,"makeAxiosCall",{enumerable:!0,get:function(){return l.makeAxiosCall}});var d=Ru();Object.defineProperty(e,"fetchToken",{enumerable:!0,get:function(){return d.fetchToken}});var g=$t,b=function(){function x(y,p,h,m,v,C){h===void 0&&(h=s.TENANT_PLATFORM.GMAIL),m===void 0&&(m=null),v===void 0&&(v=!0),C===void 0&&(C=!1),this.setEnvironment(),this.appEnv=y,this.tier=p,this.tenantPlatform=h,this.authTokenFetchingInProgress=!1,this.getTokenForLogin=m,this.withCredentials=v,this.csrfToken=C}return x.prototype.setEnvironment=function(){typeof window<"u"&&window.document?(0,g.setValue)("PLATFORM",s.PLATFORM.WEB):(0,g.setValue)("PLATFORM",s.PLATFORM.MOBILE)},x.prototype.hiverAxios=function(y,p,h,m){return p===void 0&&(p=s.DEFAULT_INIT_CONFIG_HIVER),t(this,void 0,void 0,function(){var v,C;return n(this,function(I){switch(I.label){case 0:return I.trys.push([0,4,,5]),m&&m<2?(v={userId:y.userId,usergroupId:y.usergroupId,apiRetry:m},console.log("THIS IS THE TENNANTPLAORM -> ",this.tenantPlatform),[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,v,this.tenantPlatform,this.getTokenForLogin,s.API_CALL_ORIGIN.API_RETRY)]):[3,2];case 1:I.sent(),I.label=2;case 2:return[4,(0,r.hiverAxiosCall)(this,y,p,h)];case 3:return[2,I.sent()];case 4:throw C=I.sent(),console.log("ERROR: Axios call failed",C),C;case 5:return[2]}})})},x.prototype.fetchAuthToken=function(y,p,h){return t(this,void 0,void 0,function(){var m;return n(this,function(v){switch(v.label){case 0:return v.trys.push([0,4,7,8]),this.authTokenFetchingInProgress?[3,2]:(this.authTokenFetchingInProgress=!0,[4,(0,o.fetchAccessToken)(this.appEnv,this.tier,y,this.tenantPlatform,this.getTokenForLogin,p,h)]);case 1:return v.sent(),[3,3];case 2:console.log("Heimdall: AuthToken Fetching InProgress",this.authTokenFetchingInProgress),v.label=3;case 3:return[3,8];case 4:return m=v.sent(),console.log("ERROR: Fetching token failed",m),this.authTokenFetchingInProgress=!1,[4,new Promise(function(C){return setTimeout(C,100)})];case 5:return v.sent(),console.log("Heimdall: Retrying fetchAccessToken after 100ms..."),[4,this.fetchAuthToken(y,p,h)];case 6:return v.sent(),[3,8];case 7:return this.authTokenFetchingInProgress=!1,[7];case 8:return[2]}})})},x.prototype.logout=function(){return t(this,void 0,void 0,function(){var y,p;return n(this,function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),y=(0,i.getConfig)(this.appEnv,this.tier),[4,(0,a.logoutFromHeimdall)(y,this.tenantPlatform)];case 1:return h.sent(),(0,c.removeItemFromStorage)("hiverAuthToken"),(0,c.removeItemFromStorage)("hiverAuthTokenExpiry"),(0,c.removeItemFromStorage)("hiverAuthUserId"),(0,c.removeItemFromStorage)("hiverAuthUserGroupId"),[3,3];case 2:throw p=h.sent(),console.error("Heimdall: Logout failed",p),p;case 3:return[2]}})})},x.prototype.isTokenFetchingInProgress=function(){return this.authTokenFetchingInProgress},x}();e.Bifrost=b})(ei);const Gt={userId:"",userGroupId:"",baseUrl:"",appEnv:"",tier:"",bifrost:null,isInitiated:!1},Qt=()=>{if(!Gt.isInitiated)return null;if(!Gt.baseUrl)throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");return Gt},Qg=({baseUrl:e,appEnv:t,tier:n,userId:r,userGroupId:o,tenantPlatform:s=ei.TENANT_PLATFORM.GMAIL,withCredentials:a=!0,getTokenForLogin:i})=>{Gt.baseUrl=e,Gt.appEnv=t,Gt.tier=n,Gt.userGroupId=o,Gt.userId=r,Gt.tenantPlatform=s,Gt.bifrost=new ei.Bifrost(t,n,s,i,a),Gt.isInitiated=!0},ke=(({configHiver:e})=>async n=>{const r=Qt();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(b){throw console.error("API call failed with error: ",b),b}})({configHiver:{getToken:!0,fetchCsrfToken:()=>"",isHiverApiDomain:!0},withCredentials:!0}),Ug=e=>A.createElement("svg",{width:17,height:17,viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1180_840)"},A.createElement("path",{d:"M5.16667 10.12H9.83333V11.4533H5.16667V10.12ZM5.16667 7.45329H11.8333V8.78662H5.16667V7.45329ZM5.16667 4.78662H11.8333V6.11995H5.16667V4.78662ZM13.1667 2.11995H10.38C10.1 1.34662 9.36667 0.786621 8.5 0.786621C7.63333 0.786621 6.9 1.34662 6.62 2.11995H3.83333C3.74 2.11995 3.65333 2.12662 3.56667 2.14662C3.30667 2.19995 3.07333 2.33329 2.89333 2.51329C2.77333 2.63329 2.67333 2.77995 2.60667 2.93995C2.54 3.09329 2.5 3.26662 2.5 3.45329V12.7866C2.5 12.9666 2.54 13.1466 2.60667 13.3066C2.67333 13.4666 2.77333 13.6066 2.89333 13.7333C3.07333 13.9133 3.30667 14.0466 3.56667 14.1C3.65333 14.1133 3.74 14.12 3.83333 14.12H13.1667C13.9 14.12 14.5 13.52 14.5 12.7866V3.45329C14.5 2.71995 13.9 2.11995 13.1667 2.11995ZM8.5 1.95329C8.77333 1.95329 9 2.17995 9 2.45329C9 2.72662 8.77333 2.95329 8.5 2.95329C8.22667 2.95329 8 2.72662 8 2.45329C8 2.17995 8.22667 1.95329 8.5 1.95329ZM13.1667 12.7866H3.83333V3.45329H13.1667V12.7866Z",fill:"#343C45"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1180_840"},A.createElement("rect",{width:16,height:16,fill:"white",transform:"translate(0.5 0.120117)"})))),Kg=e=>A.createElement("svg",{width:24,height:22,viewBox:"0 0 24 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:3.63636,y:2.27393,width:15.2727,height:17.2308,rx:2.90909,fill:"#F6C035"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.4621 12.0506C22.1745 11.7669 21.7845 11.6074 21.3779 11.6074C20.9712 11.6074 20.5812 11.7669 20.2937 12.0506L19.9323 12.4079L22.4626 14.9057L22.8235 14.549C22.9659 14.4084 23.0789 14.2415 23.156 14.0578C23.2331 13.8741 23.2727 13.6773 23.2727 13.4784C23.2727 13.2796 23.2331 13.0827 23.156 12.8991C23.0789 12.7154 22.9659 12.5485 22.8235 12.4079L22.4621 12.0506ZM21.7393 15.6192L19.209 13.1214L14.5624 17.7088C14.4607 17.8092 14.3897 17.9358 14.3574 18.0742L13.8314 20.3222C13.8118 20.4056 13.814 20.4927 13.8379 20.575C13.8618 20.6574 13.9065 20.7324 13.9679 20.793C14.0293 20.8535 14.1052 20.8977 14.1887 20.9213C14.2721 20.9448 14.3603 20.9471 14.4448 20.9277L16.7226 20.409C16.8626 20.377 16.9906 20.3069 17.0922 20.2066L21.7393 15.6192Z",fill:"#FFE298"}),A.createElement("rect",{x:6.54546,y:6.58154,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:10.1714,width:10.1818,height:1.4359,rx:.717949,fill:"#FFDC83"}),A.createElement("rect",{x:6.54546,y:13.7612,width:6.54545,height:1.4359,rx:.717949,fill:"#FFDC83"})),em=e=>A.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_825_73646)"},A.createElement("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_825_73646"},A.createElement("rect",{width:24,height:24,fill:"white"})))),tm="Rate your experience with Hiver Apps",nm="Share feedback on Apps",rm="Got any feedback?",ju="https://txeep2wshyx.typeform.com/to/RuOwF9SG",om="https://txeep2wshyx.typeform.com/to/Tfa8IrCd",sm="https://txeep2wshyx.typeform.com/to/bqhVSfDk",am="https://cdn.hiverhq.com/chat-support/hiver-chat.html",im="enable_connectors_clicked",cm="learn_more_clicked",lm="connector_card_expand_clicked",um="connector_card_collapsed_clicked",dm="connector_card_refresh_clicked",fm="connector_cards_loaded",pm="connector_whats_new_card_viewed",hm="connector_whats_new_explore_now_clicked",gm="connector_whats_new_learn_more_clicked",mm="connector_whats_new_dismissed",bm="connector_create_new_object_clicked",ym="connector_link_new_object_clicked",Cm="connector_new_object_created_by_form",vm="connector_new_object_linked_by_form",xm="connector_object_unlinked_by_form",Em="connector_link_preview_clicked",Im="connector_create_panel_cancel_clicked",wm="connector_create_panel_back_clicked",_m="card_loaded_on_click",Sm="card_loaded",Tm="schedule_call_clicked",Am="schedule_call_cross_clicked",Bu="CONNECTOR_EDIT_CLICKED",Lm="CONNECTOR_EDIT_REQUEST_SEND",Om="CONNECTOR_EDIT_CANCELLED",Fm="CONNECTOR_EDIT_BACK_CLICKED",Dm="CONNECTOR_EDIT_SUCCESS",km="connector_video_clicked",Nm="connector_card_error",wi="got_any_feedback_clicked",Rm="connector_deeplink_clicked",Mm="search_bar_tapped",Pm="search_suggestions_selected",jm="search_initiated",Bm="no_results_found",Vm="search_results_found",Gm="search_result_selected",Hm="search_result_linked",Wm="feedback_closed_clicked",Zm="help_btn_clicked",Xm="connector_chat_support_clicked",zm="missing_field_clicked",Ym={userEmail:"",email:"",baseUrls:{},currentSmIds:[],metaData:void 0,availableFeatures:{},sendTrackingEvent:()=>{},conversationId:void 0,isAdmin:!1,connectorFunctions:{redirectToAdmin:()=>{}},stackingContext:{}},He=_.createContext(Ym),_s="hiver_connectors",_i={NOT_FOUND:404},Jm="ftr-connector-blue-dot",Vu="ftr-connectors-write-flow",qm="ftr-connectors-enhancements",$m="ftr-connector-schedule-call-agent",Qm="ftr-connectors-edit",Um="enableAllConnectorFtr",Km="ftr-cards-open-state",e3="ftr-connectors-global-search",t3="ftr-connectors-smart-suggestions",n3="ftr-connectors-email-selection",r3="ftr-connector-agent-feedback",Ss="ftr-connector-unified-view",o3="ftr-connectors-expanded-form",Gu="Please refresh and try again",s3="No data available",Ts="-",Hu="Refresh",Wu="Minimize",Si="Expand",Zu="Connectors",Ti="Apps",a3="Collapse",i3="Close",Xu="Link",c3="Create",l3="Update",zu="Unlink",Yu="Edit",Ai="Cancel",Ju="Create new object",qu="Link existing object",u3="Are you sure you want to unlink this object?",d3="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.",f3="Edit card",p3="bullet_list",h3="Expanded",g3="Collapsed",$u="Something is wrong with the {{connector_name}} Connector setup. Please check our help guide <>here<>.",Qu="UNKNOWN_ERROR",m3="https://help.hiverhq.com/custom-connectors/common-connector-errors",Uu={MAIN_BUTTON:"main_button",ICON:"create_icon"},b3="Missing any fields? Inform us.",Li=e=>{let t=localStorage.getItem(_s);return t=t?JSON.parse(t):!1,t==null?void 0:t[e]},y3=e=>!!Li(e),Ku=()=>{const{userId:e=""}=Qt()||{};return String(e)},C3=(e,t=Ku())=>{const n=Li(e);return((n==null?void 0:n.isExtensionNew)??[]).includes(t)},Oi=(e,t=!1,n=!1)=>{const r=Ku(),o=Li(e);if(t||!o){localStorage.removeItem(_s);const s={[e]:{...!n&&{isExtensionNew:t?[]:[r]},...n&&{extensionExpand:[r]}}};localStorage.setItem(_s,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(_s,JSON.stringify(i));return}},at=(e={},t)=>e&&typeof e[t]>"u"?(e==null?void 0:e[Um])===!0:(e==null?void 0:e[t])===!0,bt=(e,t)=>e.replace(/:(\w+)/g,(n,r)=>String(t[r])||""),ed=(e,t,n,r=!1)=>{var s;const o={};return o.card_title=t,o.card_state=n?h3:g3,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},td=e=>{switch(e.cardType){case"flat":if(Array.isArray(e.data.flatDisplay)){const t=e.data.flatDisplay.filter(n=>Number(n.statusCode)!==_i.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)!==_i.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},v3=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)},As=({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 nd(e,t){return e.length>t?e.substring(0,t)+"...":e}const x3=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_1187_180)"},A.createElement("path",{d:"M18.3333 7.81995L12.3417 7.30329L10 1.78662L7.65833 7.31162L1.66666 7.81995L6.21666 11.7616L4.85 17.62L10 14.5116L15.15 17.62L13.7917 11.7616L18.3333 7.81995ZM10 12.9533L6.86666 14.845L7.7 11.2783L4.93333 8.87829L8.58333 8.56162L10 5.20329L11.425 8.56995L15.075 8.88662L12.3083 11.2866L13.1417 14.8533L10 12.9533Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1187_180"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0 0.120117)"})))),E3=e=>A.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_847_49587)"},A.createElement("path",{d:"M10.6668 14.392L15.8168 17.5003L14.4502 11.642L19.0002 7.70033L13.0085 7.19199L10.6668 1.66699L8.32516 7.19199L2.3335 7.70033L6.8835 11.642L5.51683 17.5003L10.6668 14.392Z",fill:"#FFE250"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_847_49587"},A.createElement("rect",{width:20,height:20,fill:"white",transform:"translate(0.666992)"})))),I3=f.keyframes`
|
|
36
36
|
from {
|
|
37
37
|
transform: translateY(-100%);
|
|
38
38
|
opacity: 0;
|
|
@@ -363,7 +363,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
363
363
|
`,Tn=f.styled(f.Skeleton)`
|
|
364
364
|
display: block;
|
|
365
365
|
margin: ${e=>e.margin?e.margin:0};
|
|
366
|
-
`,
|
|
366
|
+
`,Ar=f.styled(f.IconButton)`
|
|
367
367
|
${e=>e.disabled?"opacity: 0.5;":""}
|
|
368
368
|
width: 32px;
|
|
369
369
|
height: 32px;
|
|
@@ -561,7 +561,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
561
561
|
* LICENSE file in the root directory of this source tree.
|
|
562
562
|
*/var pd;function k5(){return pd||(pd=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=_;function t(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;function c(l,d,g,b,x){var y=o(null),p;y.current===null?(p={hasValue:!1,value:null},y.current=p):p=y.current;var h=a(function(){var I=!1,E,w,T=function(D){if(!I){I=!0,E=D;var k=b(D);if(x!==void 0&&p.hasValue){var M=p.value;if(x(M,k))return w=M,M}return w=k,k}var B=E,z=w;if(n(B,D))return z;var q=b(D);return x!==void 0&&x(z,q)?z:(E=D,w=q,q)},S=g===void 0?null:g,L=function(){return T(d())},N=S===null?void 0:function(){return T(S())};return[L,N]},[d,g,b,x]),m=h[0],v=h[1],C=r(l,m,v);return s(function(){p.hasValue=!0,p.value=C},[C]),i(C),C}Ri.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ri}process.env.NODE_ENV==="production"?ki.exports=D5():ki.exports=k5();var N5=ki.exports,At="default"in A?A.default:A,hd=Symbol.for("react-redux-context"),gd=typeof globalThis<"u"?globalThis:{};function R5(){if(!At.createContext)return{};const e=gd[hd]??(gd[hd]=new Map);let t=e.get(At.createContext);return t||(t=At.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(At.createContext,t)),t}var An=R5(),M5=()=>{throw new Error("uSES not initialized!")};function Mi(e=An){return function(){const n=At.useContext(e);if(process.env.NODE_ENV!=="production"&&!n)throw new Error("could not find react-redux context value; please ensure the component is wrapped in a <Provider>");return n}}var md=Mi(),bd=M5,P5=e=>{bd=e},j5=(e,t)=>e===t;function B5(e=An){const t=e===An?md:Mi(e),n=(r,o={})=>{const{equalityFn:s=j5,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:d,identityFunctionCheck:g}=t(),b=At.useRef(!0),x=At.useCallback({[r.name](p){const h=r(p);if(process.env.NODE_ENV!=="production"){const{identityFunctionCheck:m,stabilityCheck:v}={stabilityCheck:d,identityFunctionCheck:g,...a};if(v==="always"||v==="once"&&b.current){const C=r(p);if(!s(h,C)){let I;try{throw new Error}catch(E){({stack:I}=E)}console.warn("Selector "+(r.name||"unknown")+` returned a different result when called with the same parameters. This can lead to unnecessary rerenders.
|
|
563
563
|
Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`,{state:p,selected:h,selected2:C,stack:I})}}if((m==="always"||m==="once"&&b.current)&&h===p){let C;try{throw new Error}catch(I){({stack:C}=I)}console.warn("Selector "+(r.name||"unknown")+` returned the root state when called. This can lead to unnecessary rerenders.
|
|
564
|
-
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:C})}b.current&&(b.current=!1)}return h}}[r.name],[r,d,a.stabilityCheck]),y=bd(c.addNestedSub,i.getState,l||i.getState,x,s);return At.useDebugValue(y),y};return Object.assign(n,{withTypes:()=>n}),n}var V5=B5();function G5(e){e()}function H5(){let e=null,t=null;return{clear(){e=null,t=null},notify(){G5(()=>{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 yd={notify(){},get:()=>[]};function W5(e,t){let n,r=yd,o=0,s=!1;function a(p){d();const h=r.subscribe(p);let m=!1;return()=>{m||(m=!0,h(),g())}}function i(){r.notify()}function c(){y.onStateChange&&y.onStateChange()}function l(){return s}function d(){o++,n||(n=e.subscribe(c),r=H5())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=yd)}function b(){s||(s=!0,d())}function x(){s&&(s=!1,g())}const y={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:b,tryUnsubscribe:x,getListeners:()=>r};return y}var Z5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",X5=typeof navigator<"u"&&navigator.product==="ReactNative",z5=Z5||X5?At.useLayoutEffect:At.useEffect;function Y5({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=At.useMemo(()=>{const l=W5(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=At.useMemo(()=>e.getState(),[e]);z5(()=>{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||An;return At.createElement(c.Provider,{value:a},n)}var Pi=Y5;function Cd(e=An){const t=e===An?md:Mi(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var J5=Cd();function q5(e=An){const t=e===An?J5:Cd(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var $5=q5();P5(N5.useSyncExternalStoreWithSelector);const Ht=$5.withTypes(),me=V5.withTypes(),Ve={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},ee={IDLE:"idle",LOADING:"loading",FAILED:"failed"},Q5="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",vd="Show more",U5="Show less",K5="Show preview",e4="Hide preview",t4="Select email";function nt(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 n4=typeof Symbol=="function"&&Symbol.observable||"@@observable",xd=n4,ji=()=>Math.random().toString(36).substring(7).split("").join("."),r4={INIT:`@@redux/INIT${ji()}`,REPLACE:`@@redux/REPLACE${ji()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ji()}`},Un=r4;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 o4(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(i4(e))return"date";if(a4(e))return"error";const n=s4(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 s4(e){return typeof e.constructor=="function"?e.constructor.name:null}function a4(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function i4(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Ln(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=o4(e)),t}function Ed(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?nt(2):`Expected the root reducer to be a function. Instead, received: '${Ln(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?nt(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"?nt(1):`Expected the enhancer to be a function. Instead, received: '${Ln(n)}'`);return n(Ed)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((h,m)=>{a.set(m,h)}))}function d(){if(c)throw new Error(process.env.NODE_ENV==="production"?nt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?nt(4):`Expected the listener to be a function. Instead, received: '${Ln(h)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?nt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;l();const v=i++;return a.set(v,h),function(){if(m){if(c)throw new Error(process.env.NODE_ENV==="production"?nt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,l(),a.delete(v),s=null}}}function b(h){if(!wo(h))throw new Error(process.env.NODE_ENV==="production"?nt(7):`Actions must be plain objects. Instead, the actual type was: '${Ln(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?nt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?nt(17):`Action "type" property must be a string. Instead, the actual type was: '${Ln(h.type)}'. Value was: '${h.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?nt(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,h)}finally{c=!1}return(s=a).forEach(v=>{v()}),h}function x(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?nt(10):`Expected the nextReducer to be a function. Instead, received: '${Ln(h)}`);r=h,b({type:Un.REPLACE})}function y(){const h=g;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?nt(11):`Expected the observer to be an object. Instead, received: '${Ln(m)}'`);function v(){const I=m;I.next&&I.next(d())}return v(),{unsubscribe:h(v)}},[xd](){return this}}}return b({type:Un.INIT}),{dispatch:b,subscribe:g,getState:d,replaceReducer:x,[xd]:y}}function Id(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function c4(e,t,n,r){const o=Object.keys(t),s=n&&n.type===Un.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 "${Ln(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===Un.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 l4(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Un.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?nt(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:Un.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?nt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Un.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 wd(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"&&Id(`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{l4(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=c4(i,n,c,o);g&&Id(g)}let l=!1;const d={};for(let g=0;g<r.length;g++){const b=r[g],x=n[b],y=i[b],p=x(y,c);if(typeof p>"u"){const h=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?nt(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${b}" 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.`)}d[b]=p,l=l||p!==y}return l=l||r.length!==Object.keys(i).length,l?d:i}}function Ls(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function u4(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?nt(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=Ls(...i)(o.dispatch),{...o,dispatch:s}}}function _d(e){return wo(e)&&"type"in e&&typeof e.type=="string"}var Sd=Symbol.for("immer-nothing"),Td=Symbol.for("immer-draftable"),Lt=Symbol.for("immer-state"),d4=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 yt(e,...t){if(process.env.NODE_ENV!=="production"){const n=d4[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 Ar=Object.getPrototypeOf;function Kn(e){return!!e&&!!e[Lt]}function fn(e){var t;return e?Ad(e)||Array.isArray(e)||!!e[Td]||!!((t=e.constructor)!=null&&t[Td])||Ds(e)||ks(e):!1}var f4=Object.prototype.constructor.toString();function Ad(e){if(!e||typeof e!="object")return!1;const t=Ar(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)===f4}function Os(e,t){Fs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Fs(e){const t=e[Lt];return t?t.type_:Array.isArray(e)?1:Ds(e)?2:ks(e)?3:0}function Bi(e,t){return Fs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ld(e,t,n){const r=Fs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function p4(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ds(e){return e instanceof Map}function ks(e){return e instanceof Set}function er(e){return e.copy_||e.base_}function Vi(e,t){if(Ds(e))return new Map(e);if(ks(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Ad(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Lt];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(Ar(e),r)}else{const r=Ar(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function Gi(e,t=!1){return Ns(e)||Kn(e)||!fn(e)||(Fs(e)>1&&(e.set=e.add=e.clear=e.delete=h4),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Gi(r,!0))),e}function h4(){yt(2)}function Ns(e){return Object.isFrozen(e)}var g4={};function tr(e){const t=g4[e];return t||yt(0,e),t}var _o;function Od(){return _o}function m4(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Fd(e,t){t&&(tr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Hi(e){Wi(e),e.drafts_.forEach(b4),e.drafts_=null}function Wi(e){e===_o&&(_o=e.parent_)}function Dd(e){return _o=m4(_o,e)}function b4(e){const t=e[Lt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function kd(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Lt].modified_&&(Hi(t),yt(4)),fn(e)&&(e=Rs(t,e),t.parent_||Ms(t,e)),t.patches_&&tr("Patches").generateReplacementPatches_(n[Lt].base_,e,t.patches_,t.inversePatches_)):e=Rs(t,n,[]),Hi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Sd?e:void 0}function Rs(e,t,n){if(Ns(t))return t;const r=t[Lt];if(!r)return Os(t,(o,s)=>Nd(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ms(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),Os(s,(i,c)=>Nd(e,r,o,i,c,n,a)),Ms(e,o,!1),n&&e.patches_&&tr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Nd(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&yt(5),Kn(o)){const i=s&&t&&t.type_!==3&&!Bi(t.assigned_,r)?s.concat(r):void 0,c=Rs(e,o,i);if(Ld(n,r,c),Kn(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(fn(o)&&!Ns(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Rs(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ms(e,o)}}function Ms(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Gi(t,n)}function y4(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Od(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=Zi;n&&(o=[r],s=So);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var Zi={get(e,t){if(t===Lt)return e;const n=er(e);if(!Bi(n,t))return C4(e,n,t);const r=n[t];return e.finalized_||!fn(r)?r:r===Xi(e.base_,t)?(Yi(e),e.copy_[t]=Ji(r,e)):r},has(e,t){return t in er(e)},ownKeys(e){return Reflect.ownKeys(er(e))},set(e,t,n){const r=Rd(er(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Xi(er(e),t),s=o==null?void 0:o[Lt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(p4(n,o)&&(n!==void 0||Bi(e.base_,t)))return!0;Yi(e),zi(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 Xi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yi(e),zi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=er(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){yt(11)},getPrototypeOf(e){return Ar(e.base_)},setPrototypeOf(){yt(12)}},So={};Os(Zi,(e,t)=>{So[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),So.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&yt(13),So.set.call(this,e,t,void 0)},So.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&yt(14),Zi.set.call(this,e[0],t,n,e[0])};function Xi(e,t){const n=e[Lt];return(n?er(n):e)[t]}function C4(e,t,n){var o;const r=Rd(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Rd(e,t){if(!(t in e))return;let n=Ar(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ar(n)}}function zi(e){e.modified_||(e.modified_=!0,e.parent_&&zi(e.parent_))}function Yi(e){e.copy_||(e.copy_=Vi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var v4=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,d=>n.call(this,d,...l))}}typeof n!="function"&&yt(6),r!==void 0&&typeof r!="function"&&yt(7);let o;if(fn(t)){const s=Dd(this),a=Ji(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?Hi(s):Wi(s)}return Fd(s,r),kd(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Sd&&(o=void 0),this.autoFreeze_&&Gi(o,!0),r){const s=[],a=[];tr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else yt(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){fn(e)||yt(8),Kn(e)&&(e=x4(e));const t=Dd(this),n=Ji(e,void 0);return n[Lt].isManual_=!0,Wi(t),n}finishDraft(e,t){const n=e&&e[Lt];(!n||!n.isManual_)&&yt(9);const{scope_:r}=n;return Fd(r,t),kd(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=tr("Patches").applyPatches_;return Kn(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ji(e,t){const n=Ds(e)?tr("MapSet").proxyMap_(e,t):ks(e)?tr("MapSet").proxySet_(e,t):y4(e,t);return(t?t.scope_:Od()).drafts_.push(n),n}function x4(e){return Kn(e)||yt(10,e),Md(e)}function Md(e){if(!fn(e)||Ns(e))return e;const t=e[Lt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vi(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vi(e,!0);return Os(n,(r,o)=>{Ld(n,r,Md(o))}),t&&(t.finalized_=!1),n}var Ot=new v4,Pd=Ot.produce;Ot.produceWithPatches.bind(Ot),Ot.setAutoFreeze.bind(Ot),Ot.setUseStrictShallowCopy.bind(Ot),Ot.applyPatches.bind(Ot),Ot.createDraft.bind(Ot),Ot.finishDraft.bind(Ot);var E4=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
564
|
+
Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`,{stack:C})}b.current&&(b.current=!1)}return h}}[r.name],[r,d,a.stabilityCheck]),y=bd(c.addNestedSub,i.getState,l||i.getState,x,s);return At.useDebugValue(y),y};return Object.assign(n,{withTypes:()=>n}),n}var V5=B5();function G5(e){e()}function H5(){let e=null,t=null;return{clear(){e=null,t=null},notify(){G5(()=>{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 yd={notify(){},get:()=>[]};function W5(e,t){let n,r=yd,o=0,s=!1;function a(p){d();const h=r.subscribe(p);let m=!1;return()=>{m||(m=!0,h(),g())}}function i(){r.notify()}function c(){y.onStateChange&&y.onStateChange()}function l(){return s}function d(){o++,n||(n=e.subscribe(c),r=H5())}function g(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=yd)}function b(){s||(s=!0,d())}function x(){s&&(s=!1,g())}const y={addNestedSub:a,notifyNestedSubs:i,handleChangeWrapper:c,isSubscribed:l,trySubscribe:b,tryUnsubscribe:x,getListeners:()=>r};return y}var Z5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",X5=typeof navigator<"u"&&navigator.product==="ReactNative",z5=Z5||X5?At.useLayoutEffect:At.useEffect;function Y5({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const a=At.useMemo(()=>{const l=W5(e);return{store:e,subscription:l,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),i=At.useMemo(()=>e.getState(),[e]);z5(()=>{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||An;return At.createElement(c.Provider,{value:a},n)}var Pi=Y5;function Cd(e=An){const t=e===An?md:Mi(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var J5=Cd();function q5(e=An){const t=e===An?J5:Cd(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var $5=q5();P5(N5.useSyncExternalStoreWithSelector);const Ht=$5.withTypes(),me=V5.withTypes(),Be={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},ee={IDLE:"idle",LOADING:"loading",FAILED:"failed"},Q5="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",vd="Show more",U5="Show less",K5="Show preview",e4="Hide preview",t4="Select email";function nt(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 n4=typeof Symbol=="function"&&Symbol.observable||"@@observable",xd=n4,ji=()=>Math.random().toString(36).substring(7).split("").join("."),r4={INIT:`@@redux/INIT${ji()}`,REPLACE:`@@redux/REPLACE${ji()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ji()}`},Un=r4;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 o4(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(i4(e))return"date";if(a4(e))return"error";const n=s4(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 s4(e){return typeof e.constructor=="function"?e.constructor.name:null}function a4(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function i4(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Ln(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=o4(e)),t}function Ed(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?nt(2):`Expected the root reducer to be a function. Instead, received: '${Ln(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?nt(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"?nt(1):`Expected the enhancer to be a function. Instead, received: '${Ln(n)}'`);return n(Ed)(e,t)}let r=e,o=t,s=new Map,a=s,i=0,c=!1;function l(){a===s&&(a=new Map,s.forEach((h,m)=>{a.set(m,h)}))}function d(){if(c)throw new Error(process.env.NODE_ENV==="production"?nt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?nt(4):`Expected the listener to be a function. Instead, received: '${Ln(h)}'`);if(c)throw new Error(process.env.NODE_ENV==="production"?nt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let m=!0;l();const v=i++;return a.set(v,h),function(){if(m){if(c)throw new Error(process.env.NODE_ENV==="production"?nt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");m=!1,l(),a.delete(v),s=null}}}function b(h){if(!wo(h))throw new Error(process.env.NODE_ENV==="production"?nt(7):`Actions must be plain objects. Instead, the actual type was: '${Ln(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?nt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?nt(17):`Action "type" property must be a string. Instead, the actual type was: '${Ln(h.type)}'. Value was: '${h.type}' (stringified)`);if(c)throw new Error(process.env.NODE_ENV==="production"?nt(9):"Reducers may not dispatch actions.");try{c=!0,o=r(o,h)}finally{c=!1}return(s=a).forEach(v=>{v()}),h}function x(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?nt(10):`Expected the nextReducer to be a function. Instead, received: '${Ln(h)}`);r=h,b({type:Un.REPLACE})}function y(){const h=g;return{subscribe(m){if(typeof m!="object"||m===null)throw new Error(process.env.NODE_ENV==="production"?nt(11):`Expected the observer to be an object. Instead, received: '${Ln(m)}'`);function v(){const I=m;I.next&&I.next(d())}return v(),{unsubscribe:h(v)}},[xd](){return this}}}return b({type:Un.INIT}),{dispatch:b,subscribe:g,getState:d,replaceReducer:x,[xd]:y}}function Id(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function c4(e,t,n,r){const o=Object.keys(t),s=n&&n.type===Un.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 "${Ln(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===Un.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 l4(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Un.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?nt(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:Un.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?nt(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${Un.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 wd(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"&&Id(`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{l4(n)}catch(a){s=a}return function(i={},c){if(s)throw s;if(process.env.NODE_ENV!=="production"){const g=c4(i,n,c,o);g&&Id(g)}let l=!1;const d={};for(let g=0;g<r.length;g++){const b=r[g],x=n[b],y=i[b],p=x(y,c);if(typeof p>"u"){const h=c&&c.type;throw new Error(process.env.NODE_ENV==="production"?nt(14):`When called with an action of type ${h?`"${String(h)}"`:"(unknown type)"}, the slice reducer for key "${b}" 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.`)}d[b]=p,l=l||p!==y}return l=l||r.length!==Object.keys(i).length,l?d:i}}function Ls(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function u4(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(process.env.NODE_ENV==="production"?nt(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=Ls(...i)(o.dispatch),{...o,dispatch:s}}}function _d(e){return wo(e)&&"type"in e&&typeof e.type=="string"}var Sd=Symbol.for("immer-nothing"),Td=Symbol.for("immer-draftable"),Lt=Symbol.for("immer-state"),d4=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 yt(e,...t){if(process.env.NODE_ENV!=="production"){const n=d4[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 Lr=Object.getPrototypeOf;function Kn(e){return!!e&&!!e[Lt]}function fn(e){var t;return e?Ad(e)||Array.isArray(e)||!!e[Td]||!!((t=e.constructor)!=null&&t[Td])||Ds(e)||ks(e):!1}var f4=Object.prototype.constructor.toString();function Ad(e){if(!e||typeof e!="object")return!1;const t=Lr(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)===f4}function Os(e,t){Fs(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Fs(e){const t=e[Lt];return t?t.type_:Array.isArray(e)?1:Ds(e)?2:ks(e)?3:0}function Bi(e,t){return Fs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ld(e,t,n){const r=Fs(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function p4(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ds(e){return e instanceof Map}function ks(e){return e instanceof Set}function er(e){return e.copy_||e.base_}function Vi(e,t){if(Ds(e))return new Map(e);if(ks(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Ad(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Lt];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(Lr(e),r)}else{const r=Lr(e);if(r!==null&&n)return{...e};const o=Object.create(r);return Object.assign(o,e)}}function Gi(e,t=!1){return Ns(e)||Kn(e)||!fn(e)||(Fs(e)>1&&(e.set=e.add=e.clear=e.delete=h4),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Gi(r,!0))),e}function h4(){yt(2)}function Ns(e){return Object.isFrozen(e)}var g4={};function tr(e){const t=g4[e];return t||yt(0,e),t}var _o;function Od(){return _o}function m4(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Fd(e,t){t&&(tr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Hi(e){Wi(e),e.drafts_.forEach(b4),e.drafts_=null}function Wi(e){e===_o&&(_o=e.parent_)}function Dd(e){return _o=m4(_o,e)}function b4(e){const t=e[Lt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function kd(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Lt].modified_&&(Hi(t),yt(4)),fn(e)&&(e=Rs(t,e),t.parent_||Ms(t,e)),t.patches_&&tr("Patches").generateReplacementPatches_(n[Lt].base_,e,t.patches_,t.inversePatches_)):e=Rs(t,n,[]),Hi(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Sd?e:void 0}function Rs(e,t,n){if(Ns(t))return t;const r=t[Lt];if(!r)return Os(t,(o,s)=>Nd(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ms(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),Os(s,(i,c)=>Nd(e,r,o,i,c,n,a)),Ms(e,o,!1),n&&e.patches_&&tr("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Nd(e,t,n,r,o,s,a){if(process.env.NODE_ENV!=="production"&&o===n&&yt(5),Kn(o)){const i=s&&t&&t.type_!==3&&!Bi(t.assigned_,r)?s.concat(r):void 0,c=Rs(e,o,i);if(Ld(n,r,c),Kn(c))e.canAutoFreeze_=!1;else return}else a&&n.add(o);if(fn(o)&&!Ns(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Rs(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ms(e,o)}}function Ms(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Gi(t,n)}function y4(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Od(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=Zi;n&&(o=[r],s=So);const{revoke:a,proxy:i}=Proxy.revocable(o,s);return r.draft_=i,r.revoke_=a,i}var Zi={get(e,t){if(t===Lt)return e;const n=er(e);if(!Bi(n,t))return C4(e,n,t);const r=n[t];return e.finalized_||!fn(r)?r:r===Xi(e.base_,t)?(Yi(e),e.copy_[t]=Ji(r,e)):r},has(e,t){return t in er(e)},ownKeys(e){return Reflect.ownKeys(er(e))},set(e,t,n){const r=Rd(er(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Xi(er(e),t),s=o==null?void 0:o[Lt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(p4(n,o)&&(n!==void 0||Bi(e.base_,t)))return!0;Yi(e),zi(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 Xi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Yi(e),zi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=er(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){yt(11)},getPrototypeOf(e){return Lr(e.base_)},setPrototypeOf(){yt(12)}},So={};Os(Zi,(e,t)=>{So[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),So.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&yt(13),So.set.call(this,e,t,void 0)},So.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&yt(14),Zi.set.call(this,e[0],t,n,e[0])};function Xi(e,t){const n=e[Lt];return(n?er(n):e)[t]}function C4(e,t,n){var o;const r=Rd(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Rd(e,t){if(!(t in e))return;let n=Lr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Lr(n)}}function zi(e){e.modified_||(e.modified_=!0,e.parent_&&zi(e.parent_))}function Yi(e){e.copy_||(e.copy_=Vi(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var v4=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,d=>n.call(this,d,...l))}}typeof n!="function"&&yt(6),r!==void 0&&typeof r!="function"&&yt(7);let o;if(fn(t)){const s=Dd(this),a=Ji(t,void 0);let i=!0;try{o=n(a),i=!1}finally{i?Hi(s):Wi(s)}return Fd(s,r),kd(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Sd&&(o=void 0),this.autoFreeze_&&Gi(o,!0),r){const s=[],a=[];tr("Patches").generateReplacementPatches_(t,o,s,a),r(s,a)}return o}else yt(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){fn(e)||yt(8),Kn(e)&&(e=x4(e));const t=Dd(this),n=Ji(e,void 0);return n[Lt].isManual_=!0,Wi(t),n}finishDraft(e,t){const n=e&&e[Lt];(!n||!n.isManual_)&&yt(9);const{scope_:r}=n;return Fd(r,t),kd(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=tr("Patches").applyPatches_;return Kn(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ji(e,t){const n=Ds(e)?tr("MapSet").proxyMap_(e,t):ks(e)?tr("MapSet").proxySet_(e,t):y4(e,t);return(t?t.scope_:Od()).drafts_.push(n),n}function x4(e){return Kn(e)||yt(10,e),Md(e)}function Md(e){if(!fn(e)||Ns(e))return e;const t=e[Lt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Vi(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Vi(e,!0);return Os(n,(r,o)=>{Ld(n,r,Md(o))}),t&&(t.finalized_=!1),n}var Ot=new v4,Pd=Ot.produce;Ot.produceWithPatches.bind(Ot),Ot.setAutoFreeze.bind(Ot),Ot.setUseStrictShallowCopy.bind(Ot),Ot.applyPatches.bind(Ot),Ot.createDraft.bind(Ot),Ot.finishDraft.bind(Ot);var E4=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(s){({stack:o}=s)}console.warn(`The result function returned its own inputs without modification. e.g
|
|
565
565
|
\`createSelector([state => state.todos], todos => todos)\`
|
|
566
566
|
This could lead to inefficient memoization and unnecessary re-renders.
|
|
567
567
|
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},I4=(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(d){({stack:l}=d)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
@@ -592,9 +592,9 @@ Take a look at the reducer(s) handling this action type: ${x.type}.
|
|
|
592
592
|
fill: #ffffff;
|
|
593
593
|
width: 10px;
|
|
594
594
|
}
|
|
595
|
-
`,Sb=(e,{closeToast:t})=>u.jsx(_b,{children:u.jsx("img",{src:xb,onClick:t})}),Vs=({message:e})=>u.jsxs(Eb,{children:[u.jsx(wb,{}),u.jsx(Ib,{children:e})]});function Se(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:u.jsx(Sb,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=_e.success(u.jsx(Vs,{message:t}),{...o,icon:!1});break}case"error":{s=_e.error(u.jsx(Vs,{message:t}),{...o,icon:!1});break}case"info-dark":{s=_e.info(u.jsx(Vs,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=_e.info(u.jsx(Vs,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Tb(s)},r&&!isNaN(r)?Number(r):5e3),s}function Tb(e){_e.dismiss(e)}const r0={updateFormApiStatus:ee.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:ee.IDLE,unlinkCardApiStatus:ee.IDLE,linkCardApiStatus:ee.IDLE,optionsMap:null,dropdownOptionsApis:ee.IDLE,dependentFieldsMap:{},createFormApiStatus:ee.IDLE,currentResourceDetailsApiStatus:ee.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},Ab="/v1/api"+"/templates/metadata",Lb={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},Ob="Required Field",Fb="Invalid date",o0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Db=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,s0="Please enter a valid URL",kb="Please enter valid ID",Nb="Please enter valid input",Rb="URL must start with https://",Mb="URL should not end with a slash",Pb="Invalid email address",jb="Email must be a string",a0="Invalid date",Bb="Date cannot be in the past",Vb="Date cannot be in the future",Gb="Invalid number",Hb="Invalid text",Wb=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)}),
|
|
595
|
+
`,Sb=(e,{closeToast:t})=>u.jsx(_b,{children:u.jsx("img",{src:xb,onClick:t})}),Vs=({message:e})=>u.jsxs(Eb,{children:[u.jsx(wb,{}),u.jsx(Ib,{children:e})]});function Se(e){const{message:t,type:n,autoClose:r}=e,o={closeButton:u.jsx(Sb,{}),autoClose:r??5e3,pauseOnHover:!0,position:"bottom-left",rtl:!1,draggable:!0,closeOnClick:!0,hideProgressBar:!0};let s;switch(n){case"success":{s=_e.success(u.jsx(Vs,{message:t}),{...o,icon:!1});break}case"error":{s=_e.error(u.jsx(Vs,{message:t}),{...o,icon:!1});break}case"info-dark":{s=_e.info(u.jsx(Vs,{message:t}),{...o,icon:!1,className:"toast_dark"});break}default:{s=_e.info(u.jsx(Vs,{message:t}),{...o,icon:!1});break}}return setTimeout(()=>{Tb(s)},r&&!isNaN(r)?Number(r):5e3),s}function Tb(e){_e.dismiss(e)}const r0={updateFormApiStatus:ee.IDLE,createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],objectDict:null,formFields:null,objectListApiStatus:ee.IDLE,unlinkCardApiStatus:ee.IDLE,linkCardApiStatus:ee.IDLE,optionsMap:null,dropdownOptionsApis:ee.IDLE,dependentFieldsMap:{},createFormApiStatus:ee.IDLE,currentResourceDetailsApiStatus:ee.IDLE,currentResourceDetails:null,currentCardInEdit:null,hasUnsavedChanges:!1},Ab="/v1/api"+"/templates/metadata",Lb={GET:"GET",POST:"POST",DELETE:"DELETE",PATCH:"PATCH",PUT:"PUT"},Ob="Required Field",Fb="Invalid date",o0=/^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i,Db=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,s0="Please enter a valid URL",kb="Please enter valid ID",Nb="Please enter valid input",Rb="URL must start with https://",Mb="URL should not end with a slash",Pb="Invalid email address",jb="Email must be a string",a0="Invalid date",Bb="Date cannot be in the past",Vb="Date cannot be in the future",Gb="Invalid number",Hb="Invalid text",Wb=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)}),ke({url:`${Ab}?${t.toString()}`,method:Lb.GET})};let Or={};const Zb={get length(){return Object.keys(Or).length},getItem(e){return Or[e]??null},setItem(e,t){Or[e]=t},removeItem(e){delete Or[e]},clear(){Or={}},key(e){return Object.keys(Or)[e]}},Xb={LOCAL:window==null?void 0:window.localStorage,SESSION:window==null?void 0:window.sessionStorage},i0=(e="LOCAL")=>Xb[e]??Zb,zb=(e="LOCAL")=>{const t=i0(e);return{...t,getItem(n){const r=t.getItem(n);if(!r)return r;try{return JSON.parse(r)}catch(o){return console.warn(o),r}},setItem(n,r){try{const o=JSON.stringify(r);t.setItem(n,o)}catch(o){console.warn(o)}}}};var Ui=(e=>(e.ADD="ADD",e.MULTIPLY="MULTIPLY",e))(Ui||{});const Yb={[Ui.ADD]:(e,t)=>e+t,[Ui.MULTIPLY]:(e,t)=>e*t},Jb=e=>e,c0=()=>{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}`},l0=(e,t)=>{let n;const r=Yb[t]??Jb;for(const o of e){const s=Number(o);isNaN(s)||(n=n===void 0?s:r(n,s))}return(n??0).toFixed(2)},u0=(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},qb=e=>t=>{if(t&&typeof t=="string"){const n=t.replace(/\/$/,"");return n.startsWith("https://")?t.endsWith("/")?Mb:o0.test(n)?!0:e||s0:Rb}return!1},$b=e=>t=>t&&typeof t=="string"?Db.test(t)?!0:e||Pb:jb,Qb=e=>t=>t==null||t===""?e||Ob:!0,Ub=e=>(t,n)=>{var r;if(!t||(t==null?void 0:t.toString())===Fb)return a0;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||Bb:i&&o>s?e||Vb:!0}return typeof t=="string"&&((r=new Date(t))==null?void 0:r.toString())!=="Invalid Date"?!0:a0},Kb=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||Gb},Ki=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||Hb},ey=e=>t=>typeof t=="string"?t.startsWith("https:")?o0.test(t)?!0:e||s0:t.trim().length>0?!0:e||kb:e||Nb;function nr(e){"@babel/helpers - typeof";return nr=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},nr(e)}function ty(e,t){if(nr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(nr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d0(e){var t=ty(e,"string");return nr(t)=="symbol"?t:t+""}function Fr(e,t,n){return(t=d0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f0(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?f0(Object(n),!0).forEach(function(r){Fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ny(e){if(Array.isArray(e))return e}function ry(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(d){l=!0,o=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return i}}function ec(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 p0(e,t){if(e){if(typeof e=="string")return ec(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)?ec(e,t):void 0}}function oy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
596
596
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function et(e,t){return ny(e)||ry(e,t)||p0(e,t)||oy()}function sy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Zt(e,t){if(e==null)return{};var n,r,o=sy(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 ay=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function tc(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,d=e.onInputChange,g=e.onMenuClose,b=e.onMenuOpen,x=e.value,y=Zt(e,ay),p=_.useState(i!==void 0?i:n),h=et(p,2),m=h[0],v=h[1],C=_.useState(c!==void 0?c:o),I=et(C,2),E=I[0],w=I[1],T=_.useState(x!==void 0?x:a),S=et(T,2),L=S[0],N=S[1],D=_.useCallback(function(X,Y){typeof l=="function"&&l(X,Y),N(X)},[l]),k=_.useCallback(function(X,Y){var oe;typeof d=="function"&&(oe=d(X,Y)),v(oe!==void 0?oe:X)},[d]),M=_.useCallback(function(){typeof b=="function"&&b(),w(!0)},[b]),B=_.useCallback(function(){typeof g=="function"&&g(),w(!1)},[g]),z=i!==void 0?i:m,q=c!==void 0?c:E,Q=x!==void 0?x:L;return re(re({},y),{},{inputValue:z,menuIsOpen:q,onChange:D,onInputChange:k,onMenuClose:B,onMenuOpen:M,value:Q})}function ce(){return ce=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},ce.apply(null,arguments)}function iy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d0(r.key),r)}}function cy(e,t,n){return t&&h0(e.prototype,t),n&&h0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function nc(e,t){return nc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},nc(e,t)}function ly(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&&nc(e,t)}function Gs(e){return Gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gs(e)}function g0(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g0=function(){return!!e})()}function uy(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dy(e,t){if(t&&(nr(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uy(e)}function fy(e){var t=g0();return function(){var n,r=Gs(e);if(t){var o=Gs(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return dy(this,n)}}function py(e){if(Array.isArray(e))return ec(e)}function hy(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gy(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
597
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fr(e){return py(e)||hy(e)||p0(e)||gy()}var my=!1;function by(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 yy(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 Cy=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?!my: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(yy(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=by(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}(),it="-ms-",Hs="-moz-",Ie="-webkit-",m0="comm",rc="rule",oc="decl",vy="@import",b0="@keyframes",xy="@layer",Ey=Math.abs,Ws=String.fromCharCode,Iy=Object.assign;function wy(e,t){return rt(e,0)^45?(((t<<2^rt(e,0))<<2^rt(e,1))<<2^rt(e,2))<<2^rt(e,3):0}function y0(e){return e.trim()}function _y(e,t){return(e=t.exec(e))?e[0]:e}function we(e,t,n){return e.replace(t,n)}function sc(e,t){return e.indexOf(t)}function rt(e,t){return e.charCodeAt(t)|0}function Ao(e,t,n){return e.slice(t,n)}function Kt(e){return e.length}function ac(e){return e.length}function Zs(e,t){return t.push(e),e}function Sy(e,t){return e.map(t).join("")}var Xs=1,Dr=1,C0=0,Ct=0,$e=0,kr="";function zs(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Xs,column:Dr,length:a,return:""}}function Lo(e,t){return Iy(zs("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ty(){return $e}function Ay(){return $e=Ct>0?rt(kr,--Ct):0,Dr--,$e===10&&(Dr=1,Xs--),$e}function Ft(){return $e=Ct<C0?rt(kr,Ct++):0,Dr++,$e===10&&(Dr=1,Xs++),$e}function en(){return rt(kr,Ct)}function Ys(){return Ct}function Oo(e,t){return Ao(kr,e,t)}function Fo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function v0(e){return Xs=Dr=1,C0=Kt(kr=e),Ct=0,[]}function x0(e){return kr="",e}function Js(e){return y0(Oo(Ct-1,ic(e===91?e+2:e===40?e+1:e)))}function Ly(e){for(;($e=en())&&$e<33;)Ft();return Fo(e)>2||Fo($e)>3?"":" "}function Oy(e,t){for(;--t&&Ft()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return Oo(e,Ys()+(t<6&&en()==32&&Ft()==32))}function ic(e){for(;Ft();)switch($e){case e:return Ct;case 34:case 39:e!==34&&e!==39&&ic($e);break;case 40:e===41&&ic(e);break;case 92:Ft();break}return Ct}function Fy(e,t){for(;Ft()&&e+$e!==57;)if(e+$e===84&&en()===47)break;return"/*"+Oo(t,Ct-1)+"*"+Ws(e===47?e:Ft())}function Dy(e){for(;!Fo(en());)Ft();return Oo(e,Ct)}function ky(e){return x0(qs("",null,null,null,[""],e=v0(e),0,[0],e))}function qs(e,t,n,r,o,s,a,i,c){for(var l=0,d=0,g=a,b=0,x=0,y=0,p=1,h=1,m=1,v=0,C="",I=o,E=s,w=r,T=C;h;)switch(y=v,v=Ft()){case 40:if(y!=108&&rt(T,g-1)==58){sc(T+=we(Js(v),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:T+=Js(v);break;case 9:case 10:case 13:case 32:T+=Ly(y);break;case 92:T+=Oy(Ys()-1,7);continue;case 47:switch(en()){case 42:case 47:Zs(Ny(Fy(Ft(),Ys()),t,n),c);break;default:T+="/"}break;case 123*p:i[l++]=Kt(T)*m;case 125*p:case 59:case 0:switch(v){case 0:case 125:h=0;case 59+d:m==-1&&(T=we(T,/\f/g,"")),x>0&&Kt(T)-g&&Zs(x>32?I0(T+";",r,n,g-1):I0(we(T," ","")+";",r,n,g-2),c);break;case 59:T+=";";default:if(Zs(w=E0(T,t,n,l,d,o,i,C,I=[],E=[],g),s),v===123)if(d===0)qs(T,t,w,w,I,s,g,i,E);else switch(b===99&&rt(T,3)===110?100:b){case 100:case 108:case 109:case 115:qs(e,w,w,r&&Zs(E0(e,w,w,0,0,o,i,C,o,I=[],g),E),o,E,g,i,r?I:E);break;default:qs(T,w,w,w,[""],E,0,i,E)}}l=d=x=0,p=m=1,C=T="",g=a;break;case 58:g=1+Kt(T),x=y;default:if(p<1){if(v==123)--p;else if(v==125&&p++==0&&Ay()==125)continue}switch(T+=Ws(v),v*p){case 38:m=d>0?1:(T+="\f",-1);break;case 44:i[l++]=(Kt(T)-1)*m,m=1;break;case 64:en()===45&&(T+=Js(Ft())),b=en(),d=g=Kt(C=T+=Dy(Ys())),v++;break;case 45:y===45&&Kt(T)==2&&(p=0)}}return s}function E0(e,t,n,r,o,s,a,i,c,l,d){for(var g=o-1,b=o===0?s:[""],x=ac(b),y=0,p=0,h=0;y<r;++y)for(var m=0,v=Ao(e,g+1,g=Ey(p=a[y])),C=e;m<x;++m)(C=y0(p>0?b[m]+" "+v:we(v,/&\f/g,b[m])))&&(c[h++]=C);return zs(e,t,n,o===0?rc:i,c,l,d)}function Ny(e,t,n){return zs(e,t,n,m0,Ws(Ty()),Ao(e,2,-2),0)}function I0(e,t,n,r){return zs(e,t,n,oc,Ao(e,0,r),Ao(e,r+1,-1),r)}function Nr(e,t){for(var n="",r=ac(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ry(e,t,n,r){switch(e.type){case xy:if(e.children.length)break;case vy:case oc:return e.return=e.return||e.value;case m0:return"";case b0:return e.return=e.value+"{"+Nr(e.children,r)+"}";case rc:e.value=e.props.join(",")}return Kt(n=Nr(e.children,r))?e.return=e.value+"{"+n+"}":""}function My(e){var t=ac(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 Py(e){return function(t){t.root||(t=t.return)&&e(t)}}function jy(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var By=function(t,n,r){for(var o=0,s=0;o=s,s=en(),o===38&&s===12&&(n[r]=1),!Fo(s);)Ft();return Oo(t,Ct)},Vy=function(t,n){var r=-1,o=44;do switch(Fo(o)){case 0:o===38&&en()===12&&(n[r]=1),t[r]+=By(Ct-1,n,r);break;case 2:t[r]+=Js(o);break;case 4:if(o===44){t[++r]=en()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ws(o)}while(o=Ft());return t},Gy=function(t,n){return x0(Vy(v0(t),n))},w0=new WeakMap,Hy=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&&!w0.get(r))&&!o){w0.set(t,!0);for(var s=[],a=Gy(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var d=0;d<i.length;d++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[d]):i[d]+" "+a[c]}}},Wy=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function _0(e,t){switch(wy(e,t)){case 5103:return Ie+"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 Ie+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ie+e+Hs+e+it+e+e;case 6828:case 4268:return Ie+e+it+e+e;case 6165:return Ie+e+it+"flex-"+e+e;case 5187:return Ie+e+we(e,/(\w+).+(:[^]+)/,Ie+"box-$1$2"+it+"flex-$1$2")+e;case 5443:return Ie+e+it+"flex-item-"+we(e,/flex-|-self/,"")+e;case 4675:return Ie+e+it+"flex-line-pack"+we(e,/align-content|flex-|-self/,"")+e;case 5548:return Ie+e+it+we(e,"shrink","negative")+e;case 5292:return Ie+e+it+we(e,"basis","preferred-size")+e;case 6060:return Ie+"box-"+we(e,"-grow","")+Ie+e+it+we(e,"grow","positive")+e;case 4554:return Ie+we(e,/([^-])(transform)/g,"$1"+Ie+"$2")+e;case 6187:return we(we(we(e,/(zoom-|grab)/,Ie+"$1"),/(image-set)/,Ie+"$1"),e,"")+e;case 5495:case 3959:return we(e,/(image-set\([^]*)/,Ie+"$1$`$1");case 4968:return we(we(e,/(.+:)(flex-)?(.*)/,Ie+"box-pack:$3"+it+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ie+e+e;case 4095:case 3583:case 4068:case 2532:return we(e,/(.+)-inline(.+)/,Ie+"$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(Kt(e)-1-t>6)switch(rt(e,t+1)){case 109:if(rt(e,t+4)!==45)break;case 102:return we(e,/(.+:)(.+)-([^]+)/,"$1"+Ie+"$2-$3$1"+Hs+(rt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~sc(e,"stretch")?_0(we(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(rt(e,t+1)!==115)break;case 6444:switch(rt(e,Kt(e)-3-(~sc(e,"!important")&&10))){case 107:return we(e,":",":"+Ie)+e;case 101:return we(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ie+(rt(e,14)===45?"inline-":"")+"box$3$1"+Ie+"$2$3$1"+it+"$2box$3")+e}break;case 5936:switch(rt(e,t+11)){case 114:return Ie+e+it+we(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ie+e+it+we(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ie+e+it+we(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ie+e+it+e+e}return e}var Zy=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case oc:t.return=_0(t.value,t.length);break;case b0:return Nr([Lo(t,{value:we(t.value,"@","@"+Ie)})],o);case rc:if(t.length)return Sy(t.props,function(s){switch(_y(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Nr([Lo(t,{props:[we(s,/:(read-\w+)/,":"+Hs+"$1")]})],o);case"::placeholder":return Nr([Lo(t,{props:[we(s,/:(plac\w+)/,":"+Ie+"input-$1")]}),Lo(t,{props:[we(s,/:(plac\w+)/,":"+Hs+"$1")]}),Lo(t,{props:[we(s,/:(plac\w+)/,it+"input-$1")]})],o)}return""})}},Xy=[Zy],zy=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var h=p.getAttribute("data-emotion");h.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||Xy,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var h=p.getAttribute("data-emotion").split(" "),m=1;m<h.length;m++)s[h[m]]=!0;i.push(p)});var c,l=[Hy,Wy];{var d,g=[Ry,Py(function(p){d.insert(p)})],b=My(l.concat(o,g)),x=function(h){return Nr(ky(h),b)};c=function(h,m,v,C){d=v,x(h?h+"{"+m.styles+"}":m.styles),C&&(y.inserted[m.name]=!0)}}var y={key:n,sheet:new Cy({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 y.sheet.hydrate(i),y},cc={exports:{}},Te={};/** @license React v16.13.1
|
|
597
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dr(e){return py(e)||hy(e)||p0(e)||gy()}var my=!1;function by(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 yy(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 Cy=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?!my: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(yy(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=by(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}(),it="-ms-",Hs="-moz-",Ie="-webkit-",m0="comm",rc="rule",oc="decl",vy="@import",b0="@keyframes",xy="@layer",Ey=Math.abs,Ws=String.fromCharCode,Iy=Object.assign;function wy(e,t){return rt(e,0)^45?(((t<<2^rt(e,0))<<2^rt(e,1))<<2^rt(e,2))<<2^rt(e,3):0}function y0(e){return e.trim()}function _y(e,t){return(e=t.exec(e))?e[0]:e}function we(e,t,n){return e.replace(t,n)}function sc(e,t){return e.indexOf(t)}function rt(e,t){return e.charCodeAt(t)|0}function Ao(e,t,n){return e.slice(t,n)}function Kt(e){return e.length}function ac(e){return e.length}function Zs(e,t){return t.push(e),e}function Sy(e,t){return e.map(t).join("")}var Xs=1,kr=1,C0=0,Ct=0,$e=0,Nr="";function zs(e,t,n,r,o,s,a){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Xs,column:kr,length:a,return:""}}function Lo(e,t){return Iy(zs("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ty(){return $e}function Ay(){return $e=Ct>0?rt(Nr,--Ct):0,kr--,$e===10&&(kr=1,Xs--),$e}function Ft(){return $e=Ct<C0?rt(Nr,Ct++):0,kr++,$e===10&&(kr=1,Xs++),$e}function en(){return rt(Nr,Ct)}function Ys(){return Ct}function Oo(e,t){return Ao(Nr,e,t)}function Fo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function v0(e){return Xs=kr=1,C0=Kt(Nr=e),Ct=0,[]}function x0(e){return Nr="",e}function Js(e){return y0(Oo(Ct-1,ic(e===91?e+2:e===40?e+1:e)))}function Ly(e){for(;($e=en())&&$e<33;)Ft();return Fo(e)>2||Fo($e)>3?"":" "}function Oy(e,t){for(;--t&&Ft()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return Oo(e,Ys()+(t<6&&en()==32&&Ft()==32))}function ic(e){for(;Ft();)switch($e){case e:return Ct;case 34:case 39:e!==34&&e!==39&&ic($e);break;case 40:e===41&&ic(e);break;case 92:Ft();break}return Ct}function Fy(e,t){for(;Ft()&&e+$e!==57;)if(e+$e===84&&en()===47)break;return"/*"+Oo(t,Ct-1)+"*"+Ws(e===47?e:Ft())}function Dy(e){for(;!Fo(en());)Ft();return Oo(e,Ct)}function ky(e){return x0(qs("",null,null,null,[""],e=v0(e),0,[0],e))}function qs(e,t,n,r,o,s,a,i,c){for(var l=0,d=0,g=a,b=0,x=0,y=0,p=1,h=1,m=1,v=0,C="",I=o,E=s,w=r,T=C;h;)switch(y=v,v=Ft()){case 40:if(y!=108&&rt(T,g-1)==58){sc(T+=we(Js(v),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:T+=Js(v);break;case 9:case 10:case 13:case 32:T+=Ly(y);break;case 92:T+=Oy(Ys()-1,7);continue;case 47:switch(en()){case 42:case 47:Zs(Ny(Fy(Ft(),Ys()),t,n),c);break;default:T+="/"}break;case 123*p:i[l++]=Kt(T)*m;case 125*p:case 59:case 0:switch(v){case 0:case 125:h=0;case 59+d:m==-1&&(T=we(T,/\f/g,"")),x>0&&Kt(T)-g&&Zs(x>32?I0(T+";",r,n,g-1):I0(we(T," ","")+";",r,n,g-2),c);break;case 59:T+=";";default:if(Zs(w=E0(T,t,n,l,d,o,i,C,I=[],E=[],g),s),v===123)if(d===0)qs(T,t,w,w,I,s,g,i,E);else switch(b===99&&rt(T,3)===110?100:b){case 100:case 108:case 109:case 115:qs(e,w,w,r&&Zs(E0(e,w,w,0,0,o,i,C,o,I=[],g),E),o,E,g,i,r?I:E);break;default:qs(T,w,w,w,[""],E,0,i,E)}}l=d=x=0,p=m=1,C=T="",g=a;break;case 58:g=1+Kt(T),x=y;default:if(p<1){if(v==123)--p;else if(v==125&&p++==0&&Ay()==125)continue}switch(T+=Ws(v),v*p){case 38:m=d>0?1:(T+="\f",-1);break;case 44:i[l++]=(Kt(T)-1)*m,m=1;break;case 64:en()===45&&(T+=Js(Ft())),b=en(),d=g=Kt(C=T+=Dy(Ys())),v++;break;case 45:y===45&&Kt(T)==2&&(p=0)}}return s}function E0(e,t,n,r,o,s,a,i,c,l,d){for(var g=o-1,b=o===0?s:[""],x=ac(b),y=0,p=0,h=0;y<r;++y)for(var m=0,v=Ao(e,g+1,g=Ey(p=a[y])),C=e;m<x;++m)(C=y0(p>0?b[m]+" "+v:we(v,/&\f/g,b[m])))&&(c[h++]=C);return zs(e,t,n,o===0?rc:i,c,l,d)}function Ny(e,t,n){return zs(e,t,n,m0,Ws(Ty()),Ao(e,2,-2),0)}function I0(e,t,n,r){return zs(e,t,n,oc,Ao(e,0,r),Ao(e,r+1,-1),r)}function Rr(e,t){for(var n="",r=ac(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ry(e,t,n,r){switch(e.type){case xy:if(e.children.length)break;case vy:case oc:return e.return=e.return||e.value;case m0:return"";case b0:return e.return=e.value+"{"+Rr(e.children,r)+"}";case rc:e.value=e.props.join(",")}return Kt(n=Rr(e.children,r))?e.return=e.value+"{"+n+"}":""}function My(e){var t=ac(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 Py(e){return function(t){t.root||(t=t.return)&&e(t)}}function jy(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var By=function(t,n,r){for(var o=0,s=0;o=s,s=en(),o===38&&s===12&&(n[r]=1),!Fo(s);)Ft();return Oo(t,Ct)},Vy=function(t,n){var r=-1,o=44;do switch(Fo(o)){case 0:o===38&&en()===12&&(n[r]=1),t[r]+=By(Ct-1,n,r);break;case 2:t[r]+=Js(o);break;case 4:if(o===44){t[++r]=en()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ws(o)}while(o=Ft());return t},Gy=function(t,n){return x0(Vy(v0(t),n))},w0=new WeakMap,Hy=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&&!w0.get(r))&&!o){w0.set(t,!0);for(var s=[],a=Gy(n,s),i=r.props,c=0,l=0;c<a.length;c++)for(var d=0;d<i.length;d++,l++)t.props[l]=s[c]?a[c].replace(/&\f/g,i[d]):i[d]+" "+a[c]}}},Wy=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function _0(e,t){switch(wy(e,t)){case 5103:return Ie+"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 Ie+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ie+e+Hs+e+it+e+e;case 6828:case 4268:return Ie+e+it+e+e;case 6165:return Ie+e+it+"flex-"+e+e;case 5187:return Ie+e+we(e,/(\w+).+(:[^]+)/,Ie+"box-$1$2"+it+"flex-$1$2")+e;case 5443:return Ie+e+it+"flex-item-"+we(e,/flex-|-self/,"")+e;case 4675:return Ie+e+it+"flex-line-pack"+we(e,/align-content|flex-|-self/,"")+e;case 5548:return Ie+e+it+we(e,"shrink","negative")+e;case 5292:return Ie+e+it+we(e,"basis","preferred-size")+e;case 6060:return Ie+"box-"+we(e,"-grow","")+Ie+e+it+we(e,"grow","positive")+e;case 4554:return Ie+we(e,/([^-])(transform)/g,"$1"+Ie+"$2")+e;case 6187:return we(we(we(e,/(zoom-|grab)/,Ie+"$1"),/(image-set)/,Ie+"$1"),e,"")+e;case 5495:case 3959:return we(e,/(image-set\([^]*)/,Ie+"$1$`$1");case 4968:return we(we(e,/(.+:)(flex-)?(.*)/,Ie+"box-pack:$3"+it+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ie+e+e;case 4095:case 3583:case 4068:case 2532:return we(e,/(.+)-inline(.+)/,Ie+"$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(Kt(e)-1-t>6)switch(rt(e,t+1)){case 109:if(rt(e,t+4)!==45)break;case 102:return we(e,/(.+:)(.+)-([^]+)/,"$1"+Ie+"$2-$3$1"+Hs+(rt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~sc(e,"stretch")?_0(we(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(rt(e,t+1)!==115)break;case 6444:switch(rt(e,Kt(e)-3-(~sc(e,"!important")&&10))){case 107:return we(e,":",":"+Ie)+e;case 101:return we(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ie+(rt(e,14)===45?"inline-":"")+"box$3$1"+Ie+"$2$3$1"+it+"$2box$3")+e}break;case 5936:switch(rt(e,t+11)){case 114:return Ie+e+it+we(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ie+e+it+we(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ie+e+it+we(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ie+e+it+e+e}return e}var Zy=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case oc:t.return=_0(t.value,t.length);break;case b0:return Rr([Lo(t,{value:we(t.value,"@","@"+Ie)})],o);case rc:if(t.length)return Sy(t.props,function(s){switch(_y(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Rr([Lo(t,{props:[we(s,/:(read-\w+)/,":"+Hs+"$1")]})],o);case"::placeholder":return Rr([Lo(t,{props:[we(s,/:(plac\w+)/,":"+Ie+"input-$1")]}),Lo(t,{props:[we(s,/:(plac\w+)/,":"+Hs+"$1")]}),Lo(t,{props:[we(s,/:(plac\w+)/,it+"input-$1")]})],o)}return""})}},Xy=[Zy],zy=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(p){var h=p.getAttribute("data-emotion");h.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var o=t.stylisPlugins||Xy,s={},a,i=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var h=p.getAttribute("data-emotion").split(" "),m=1;m<h.length;m++)s[h[m]]=!0;i.push(p)});var c,l=[Hy,Wy];{var d,g=[Ry,Py(function(p){d.insert(p)})],b=My(l.concat(o,g)),x=function(h){return Rr(ky(h),b)};c=function(h,m,v,C){d=v,x(h?h+"{"+m.styles+"}":m.styles),C&&(y.inserted[m.name]=!0)}}var y={key:n,sheet:new Cy({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 y.sheet.hydrate(i),y},cc={exports:{}},Te={};/** @license React v16.13.1
|
|
598
598
|
* react-is.production.min.js
|
|
599
599
|
*
|
|
600
600
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -608,10 +608,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
608
608
|
*
|
|
609
609
|
* This source code is licensed under the MIT license found in the
|
|
610
610
|
* LICENSE file in the root directory of this source tree.
|
|
611
|
-
*/var T0;function Jy(){return T0||(T0=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,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,v=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===b||typeof Z=="object"&&Z!==null&&(Z.$$typeof===y||Z.$$typeof===x||Z.$$typeof===a||Z.$$typeof===i||Z.$$typeof===d||Z.$$typeof===h||Z.$$typeof===m||Z.$$typeof===v||Z.$$typeof===p)}function I(Z){if(typeof Z=="object"&&Z!==null){var Xe=Z.$$typeof;switch(Xe){case t:var Me=Z.type;switch(Me){case c:case l:case r:case s:case o:case g:return Me;default:var Qe=Me&&Me.$$typeof;switch(Qe){case i:case d:case y:case x:case a:return Qe;default:return Xe}}case n:return Xe}}}var E=c,w=l,T=i,S=a,L=t,N=d,D=r,k=y,M=x,B=n,z=s,q=o,Q=g,X=!1;function Y(Z){return X||(X=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),oe(Z)||I(Z)===c}function oe(Z){return I(Z)===l}function $(Z){return I(Z)===i}function P(Z){return I(Z)===a}function G(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function V(Z){return I(Z)===d}function H(Z){return I(Z)===r}function J(Z){return I(Z)===y}function ne(Z){return I(Z)===x}function se(Z){return I(Z)===n}function j(Z){return I(Z)===s}function te(Z){return I(Z)===o}function Ce(Z){return I(Z)===g}Ae.AsyncMode=E,Ae.ConcurrentMode=w,Ae.ContextConsumer=T,Ae.ContextProvider=S,Ae.Element=L,Ae.ForwardRef=N,Ae.Fragment=D,Ae.Lazy=k,Ae.Memo=M,Ae.Portal=B,Ae.Profiler=z,Ae.StrictMode=q,Ae.Suspense=Q,Ae.isAsyncMode=Y,Ae.isConcurrentMode=oe,Ae.isContextConsumer=$,Ae.isContextProvider=P,Ae.isElement=G,Ae.isForwardRef=V,Ae.isFragment=H,Ae.isLazy=J,Ae.isMemo=ne,Ae.isPortal=se,Ae.isProfiler=j,Ae.isStrictMode=te,Ae.isSuspense=Ce,Ae.isValidElementType=C,Ae.typeOf=I}()),Ae}process.env.NODE_ENV==="production"?cc.exports=Yy():cc.exports=Jy();var qy=cc.exports,A0=qy,$y={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Qy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L0={};L0[A0.ForwardRef]=$y,L0[A0.Memo]=Qy;var Uy=!0;function Ky(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var O0=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||Uy===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},e9=function(t,n,r){O0(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 t9(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 n9={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},r9=!1,o9=/[A-Z]|^ms/g,s9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,F0=function(t){return t.charCodeAt(1)===45},D0=function(t){return t!=null&&typeof t!="boolean"},lc=jy(function(e){return F0(e)?e:e.replace(o9,"-$&").toLowerCase()}),k0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(s9,function(r,o,s){return tn={name:o,styles:s,next:tn},o})}return n9[t]!==1&&!F0(t)&&typeof n=="number"&&n!==0?n+"px":n},a9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Do(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 tn={name:o.name,styles:o.styles,next:tn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)tn={name:a.name,styles:a.styles,next:tn},a=a.next;var i=s.styles+";";return i}return i9(e,t,n)}case"function":{if(e!==void 0){var c=tn,l=n(e);return tn=c,Do(e,t,l)}break}}var d=n;return d}function i9(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Do(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;D0(i)&&(r+=lc(s)+":"+k0(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&r9)throw new Error(a9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)D0(a[c])&&(r+=lc(s)+":"+k0(s,a[c])+";");else{var l=Do(e,t,a);switch(s){case"animation":case"animationName":{r+=lc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var N0=/label:\s*([^\s;{]+)\s*(;|$)/g,tn;function R0(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="";tn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Do(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Do(n,t,e[i]),r){var c=s;o+=c[i]}N0.lastIndex=0;for(var l="",d;(d=N0.exec(o))!==null;)l+="-"+d[1];var g=t9(o)+l;return{name:g,styles:o,next:tn}}var c9=function(t){return t()},l9=A.useInsertionEffect?A.useInsertionEffect:!1,u9=l9||c9,d9=!1,M0=A.createContext(typeof HTMLElement<"u"?zy({key:"css"}):null);M0.Provider;var f9=function(t){return _.forwardRef(function(n,r){var o=_.useContext(M0);return t(n,o,r)})},p9=A.createContext({}),uc={}.hasOwnProperty,dc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",h9=function(t,n){var r={};for(var o in n)uc.call(n,o)&&(r[o]=n[o]);return r[dc]=t,r},g9=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return O0(n,r,o),u9(function(){return e9(n,r,o)}),null},m9=f9(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[dc],s=[r],a="";typeof e.className=="string"?a=Ky(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=R0(s,void 0,A.useContext(p9));a+=t.key+"-"+i.name;var c={};for(var l in e)uc.call(e,l)&&l!=="css"&&l!==dc&&!d9&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),A.createElement(A.Fragment,null,A.createElement(g9,{cache:t,serialized:i,isStringTag:typeof o=="string"}),A.createElement(o,c))}),b9=m9,ae=function(t,n){var r=arguments;if(n==null||!uc.call(n,"css"))return A.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=b9,s[1]=h9(t,n);for(var a=2;a<o;a++)s[a]=r[a];return A.createElement.apply(null,s)};function fc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R0(t)}var y9=function(){var t=fc.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 C9(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const v9=Math.min,x9=Math.max,$s=Math.round,Qs=Math.floor,Us=e=>({x:e,y:e});function E9(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 Ks(){return typeof window<"u"}function P0(e){return B0(e)?(e.nodeName||"").toLowerCase():"#document"}function hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function j0(e){var t;return(t=(B0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B0(e){return Ks()?e instanceof Node||e instanceof hn(e).Node:!1}function I9(e){return Ks()?e instanceof Element||e instanceof hn(e).Element:!1}function pc(e){return Ks()?e instanceof HTMLElement||e instanceof hn(e).HTMLElement:!1}function V0(e){return!Ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hn(e).ShadowRoot}function G0(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 w9(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _9(e){return["html","body","#document"].includes(P0(e))}function hc(e){return hn(e).getComputedStyle(e)}function S9(e){if(P0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||V0(e)&&e.host||j0(e);return V0(t)?t.host:t}function H0(e){const t=S9(e);return _9(t)?e.ownerDocument?e.ownerDocument.body:e.body:pc(t)&&G0(t)?t:H0(t)}function ea(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=H0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=hn(o);if(s){const i=gc(a);return t.concat(a,a.visualViewport||[],G0(o)?o:[],i&&n?ea(i):[])}return t.concat(o,ea(o,[],n))}function gc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function T9(e){const t=hc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=pc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=$s(n)!==s||$s(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function mc(e){return I9(e)?e:e.contextElement}function W0(e){const t=mc(e);if(!pc(t))return Us(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=T9(t);let a=(s?$s(n.width):n.width)/r,i=(s?$s(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const A9=Us(0);function L9(e){const t=hn(e);return!w9()||!t.visualViewport?A9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function O9(e,t,n){return!1}function Z0(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=mc(e);let a=Us(1);t&&(a=W0(e));const i=O9()?L9(s):Us(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,d=o.width/a.x,g=o.height/a.y;if(s){const b=hn(s),x=r;let y=b,p=gc(y);for(;p&&r&&x!==y;){const h=W0(p),m=p.getBoundingClientRect(),v=hc(p),C=m.left+(p.clientLeft+parseFloat(v.paddingLeft))*h.x,I=m.top+(p.clientTop+parseFloat(v.paddingTop))*h.y;c*=h.x,l*=h.y,d*=h.x,g*=h.y,c+=C,l+=I,y=hn(p),p=gc(y)}}return E9({width:d,height:g,x:c,y:l})}function F9(e,t){let n=null,r;const o=j0(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:d,width:g,height:b}=e.getBoundingClientRect();if(i||t(),!g||!b)return;const x=Qs(d),y=Qs(o.clientWidth-(l+g)),p=Qs(o.clientHeight-(d+b)),h=Qs(l),v={rootMargin:-x+"px "+-y+"px "+-p+"px "+-h+"px",threshold:x9(0,v9(1,c))||1};let C=!0;function I(E){const w=E[0].intersectionRatio;if(w!==c){if(!C)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(I,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,v)}n.observe(e)}return a(!0),s}function D9(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=mc(e),d=o||s?[...l?ea(l):[],...ea(t)]:[];d.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const g=l&&i?F9(l,n):null;let b=-1,x=null;a&&(x=new ResizeObserver(m=>{let[v]=m;v&&v.target===l&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=x)==null||C.observe(t)})),n()}),l&&!c&&x.observe(l),x.observe(t));let y,p=c?Z0(e):null;c&&h();function h(){const m=Z0(e);p&&(m.x!==p.x||m.y!==p.y||m.width!==p.width||m.height!==p.height)&&n(),p=m,y=requestAnimationFrame(h)}return n(),()=>{var m;d.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),g==null||g(),(m=x)==null||m.disconnect(),x=null,c&&cancelAnimationFrame(y)}}var bc=_.useLayoutEffect,k9=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ta=function(){};function N9(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function R9(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(N9(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var na=function(t){return X9(t)?t.filter(Boolean):nr(t)==="object"&&t!==null?[t]:[]},X0=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Zt(t,k9);return re({},n)},We=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 M9(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function ra(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function P9(e){return ra(e)?window.innerHeight:e.clientHeight}function z0(e){return ra(e)?window.pageYOffset:e.scrollTop}function oa(e,t){if(ra(e)){window.scrollTo(0,t);return}e.scrollTop=t}function j9(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 B9(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function sa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ta,o=z0(e),s=t-o,a=10,i=0;function c(){i+=a;var l=B9(i,o,s,n);oa(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Y0(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?oa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&oa(e,Math.max(t.offsetTop-o,0))}function V9(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 J0(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function G9(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var q0=!1,H9={get passive(){return q0=!0}},aa=typeof window<"u"?window:{};aa.addEventListener&&aa.removeEventListener&&(aa.addEventListener("p",ta,H9),aa.removeEventListener("p",ta,!1));var W9=q0;function Z9(e){return e!=null}function X9(e){return Array.isArray(e)}function ko(e,t,n){return e?t:n}function wS(e){return e}function _S(e){return e}var z9=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=et(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=et(i,2),l=c[0],d=c[1];return a[l]=d,a},{})},Y9=["children","innerProps"],J9=["children","innerProps"];function q9(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=j9(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var d=c.getBoundingClientRect(),g=d.height,b=n.getBoundingClientRect(),x=b.bottom,y=b.height,p=b.top,h=n.offsetParent.getBoundingClientRect(),m=h.top,v=a?window.innerHeight:P9(c),C=z0(c),I=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),w=m-E,T=v-p,S=w+C,L=g-C-p,N=x-v+C+I,D=C+p-E,k=160;switch(o){case"auto":case"bottom":if(T>=y)return{placement:"bottom",maxHeight:t};if(L>=y&&!a)return s&&sa(c,N,k),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&T>=r){s&&sa(c,N,k);var M=a?T-I:L-I;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var B=t,z=a?w:S;return z>=r&&(B=Math.min(z-I-i,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return s&&oa(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(w>=y)return{placement:"top",maxHeight:t};if(S>=y&&!a)return s&&sa(c,D,k),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var q=t;return(!a&&S>=r||a&&w>=r)&&(q=a?w-E:S-E),s&&sa(c,D,k),{placement:"top",maxHeight:q}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function $9(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var $0=function(t){return t==="auto"?"bottom":t},Q9=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"},Or(r,$9(o),"100%"),Or(r,"position","absolute"),Or(r,"width","100%"),Or(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})},Q0=_.createContext(null),U9=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=_.useContext(Q0)||{},d=l.setPortalPlacement,g=_.useRef(null),b=_.useState(o),x=et(b,2),y=x[0],p=x[1],h=_.useState(null),m=et(h,2),v=m[0],C=m[1],I=c.spacing.controlHeight;return bc(function(){var E=g.current;if(E){var w=a==="fixed",T=i&&!w,S=q9({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:T,isFixedPosition:w,controlHeight:I});p(S.maxHeight),C(S.placement),d==null||d(S.placement)}},[o,s,a,i,r,d,I]),n({ref:g,placerProps:re(re({},t),{},{placement:v||$0(s),maxHeight:y})})},K9=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ae("div",ce({},We(t,"menu",{menu:!0}),{ref:r},o),n)},e6=K9,t6=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})},n6=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ae("div",ce({},We(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},U0=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")})},r6=U0,o6=U0,s6=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Zt(t,Y9);return ae("div",ce({},We(re(re({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},a6=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Zt(t,J9);return ae("div",ce({},We(re(re({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},i6=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}},c6=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=_.useRef(null),l=_.useRef(null),d=_.useState($0(a)),g=et(d,2),b=g[0],x=g[1],y=_.useMemo(function(){return{setPortalPlacement:x}},[]),p=_.useState(null),h=et(p,2),m=h[0],v=h[1],C=_.useCallback(function(){if(o){var T=V9(o),S=i==="fixed"?0:window.pageYOffset,L=T[b]+S;(L!==(m==null?void 0:m.offset)||T.left!==(m==null?void 0:m.rect.left)||T.width!==(m==null?void 0:m.rect.width))&&v({offset:L,rect:T})}},[o,i,b,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);bc(function(){C()},[C]);var I=_.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=D9(o,c.current,C,{elementResize:"ResizeObserver"in window}))},[o,C]);bc(function(){I()},[I]);var E=_.useCallback(function(T){c.current=T,I()},[I]);if(!n&&i!=="fixed"||!m)return null;var w=ae("div",ce({ref:E},We(re(re({},t),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ae(Q0.Provider,{value:y},n?ke.createPortal(w,n):w)},l6=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},u6=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ae("div",ce({},We(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},d6=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")})},f6=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ae("div",ce({},We(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},p6=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},h6=function(t){var n=t.children,r=t.innerProps;return ae("div",ce({},We(t,"indicatorsContainer",{indicators:!0}),r),n)},K0,g6=["size"],m6=["innerProps","isRtl","size"];function b6(){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 y6=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:b6},ef=function(t){var n=t.size,r=Zt(t,g6);return ae("svg",ce({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:y6},r))},yc=function(t){return ae(ef,ce({size:20},t),ae("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"}))},tf=function(t){return ae(ef,ce({size:20},t),ae("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"}))},nf=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}})},C6=nf,v6=function(t){var n=t.children,r=t.innerProps;return ae("div",ce({},We(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ae(tf,null))},x6=nf,E6=function(t){var n=t.children,r=t.innerProps;return ae("div",ce({},We(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ae(yc,null))},I6=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})},w6=function(t){var n=t.innerProps;return ae("span",ce({},n,We(t,"indicatorSeparator",{"indicator-separator":!0})))},_6=y9(K0||(K0=C9([`
|
|
611
|
+
*/var T0;function Jy(){return T0||(T0=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,d=e?Symbol.for("react.forward_ref"):60112,g=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,x=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,v=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===b||typeof Z=="object"&&Z!==null&&(Z.$$typeof===y||Z.$$typeof===x||Z.$$typeof===a||Z.$$typeof===i||Z.$$typeof===d||Z.$$typeof===h||Z.$$typeof===m||Z.$$typeof===v||Z.$$typeof===p)}function I(Z){if(typeof Z=="object"&&Z!==null){var Xe=Z.$$typeof;switch(Xe){case t:var Me=Z.type;switch(Me){case c:case l:case r:case s:case o:case g:return Me;default:var Qe=Me&&Me.$$typeof;switch(Qe){case i:case d:case y:case x:case a:return Qe;default:return Xe}}case n:return Xe}}}var E=c,w=l,T=i,S=a,L=t,N=d,D=r,k=y,M=x,B=n,z=s,q=o,Q=g,X=!1;function Y(Z){return X||(X=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),oe(Z)||I(Z)===c}function oe(Z){return I(Z)===l}function $(Z){return I(Z)===i}function P(Z){return I(Z)===a}function G(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function V(Z){return I(Z)===d}function H(Z){return I(Z)===r}function J(Z){return I(Z)===y}function ne(Z){return I(Z)===x}function se(Z){return I(Z)===n}function j(Z){return I(Z)===s}function te(Z){return I(Z)===o}function Ce(Z){return I(Z)===g}Ae.AsyncMode=E,Ae.ConcurrentMode=w,Ae.ContextConsumer=T,Ae.ContextProvider=S,Ae.Element=L,Ae.ForwardRef=N,Ae.Fragment=D,Ae.Lazy=k,Ae.Memo=M,Ae.Portal=B,Ae.Profiler=z,Ae.StrictMode=q,Ae.Suspense=Q,Ae.isAsyncMode=Y,Ae.isConcurrentMode=oe,Ae.isContextConsumer=$,Ae.isContextProvider=P,Ae.isElement=G,Ae.isForwardRef=V,Ae.isFragment=H,Ae.isLazy=J,Ae.isMemo=ne,Ae.isPortal=se,Ae.isProfiler=j,Ae.isStrictMode=te,Ae.isSuspense=Ce,Ae.isValidElementType=C,Ae.typeOf=I}()),Ae}process.env.NODE_ENV==="production"?cc.exports=Yy():cc.exports=Jy();var qy=cc.exports,A0=qy,$y={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Qy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},L0={};L0[A0.ForwardRef]=$y,L0[A0.Memo]=Qy;var Uy=!0;function Ky(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var O0=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||Uy===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},e9=function(t,n,r){O0(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 t9(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 n9={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},r9=!1,o9=/[A-Z]|^ms/g,s9=/_EMO_([^_]+?)_([^]*?)_EMO_/g,F0=function(t){return t.charCodeAt(1)===45},D0=function(t){return t!=null&&typeof t!="boolean"},lc=jy(function(e){return F0(e)?e:e.replace(o9,"-$&").toLowerCase()}),k0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(s9,function(r,o,s){return tn={name:o,styles:s,next:tn},o})}return n9[t]!==1&&!F0(t)&&typeof n=="number"&&n!==0?n+"px":n},a9="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Do(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 tn={name:o.name,styles:o.styles,next:tn},o.name;var s=n;if(s.styles!==void 0){var a=s.next;if(a!==void 0)for(;a!==void 0;)tn={name:a.name,styles:a.styles,next:tn},a=a.next;var i=s.styles+";";return i}return i9(e,t,n)}case"function":{if(e!==void 0){var c=tn,l=n(e);return tn=c,Do(e,t,l)}break}}var d=n;return d}function i9(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Do(e,t,n[o])+";";else for(var s in n){var a=n[s];if(typeof a!="object"){var i=a;D0(i)&&(r+=lc(s)+":"+k0(s,i)+";")}else{if(s==="NO_COMPONENT_SELECTOR"&&r9)throw new Error(a9);if(Array.isArray(a)&&typeof a[0]=="string"&&t==null)for(var c=0;c<a.length;c++)D0(a[c])&&(r+=lc(s)+":"+k0(s,a[c])+";");else{var l=Do(e,t,a);switch(s){case"animation":case"animationName":{r+=lc(s)+":"+l+";";break}default:r+=s+"{"+l+"}"}}}}return r}var N0=/label:\s*([^\s;{]+)\s*(;|$)/g,tn;function R0(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="";tn=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,o+=Do(n,t,s);else{var a=s;o+=a[0]}for(var i=1;i<e.length;i++)if(o+=Do(n,t,e[i]),r){var c=s;o+=c[i]}N0.lastIndex=0;for(var l="",d;(d=N0.exec(o))!==null;)l+="-"+d[1];var g=t9(o)+l;return{name:g,styles:o,next:tn}}var c9=function(t){return t()},l9=A.useInsertionEffect?A.useInsertionEffect:!1,u9=l9||c9,d9=!1,M0=A.createContext(typeof HTMLElement<"u"?zy({key:"css"}):null);M0.Provider;var f9=function(t){return _.forwardRef(function(n,r){var o=_.useContext(M0);return t(n,o,r)})},p9=A.createContext({}),uc={}.hasOwnProperty,dc="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",h9=function(t,n){var r={};for(var o in n)uc.call(n,o)&&(r[o]=n[o]);return r[dc]=t,r},g9=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return O0(n,r,o),u9(function(){return e9(n,r,o)}),null},m9=f9(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[dc],s=[r],a="";typeof e.className=="string"?a=Ky(t.registered,s,e.className):e.className!=null&&(a=e.className+" ");var i=R0(s,void 0,A.useContext(p9));a+=t.key+"-"+i.name;var c={};for(var l in e)uc.call(e,l)&&l!=="css"&&l!==dc&&!d9&&(c[l]=e[l]);return c.className=a,n&&(c.ref=n),A.createElement(A.Fragment,null,A.createElement(g9,{cache:t,serialized:i,isStringTag:typeof o=="string"}),A.createElement(o,c))}),b9=m9,ae=function(t,n){var r=arguments;if(n==null||!uc.call(n,"css"))return A.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=b9,s[1]=h9(t,n);for(var a=2;a<o;a++)s[a]=r[a];return A.createElement.apply(null,s)};function fc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return R0(t)}var y9=function(){var t=fc.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 C9(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const v9=Math.min,x9=Math.max,$s=Math.round,Qs=Math.floor,Us=e=>({x:e,y:e});function E9(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 Ks(){return typeof window<"u"}function P0(e){return B0(e)?(e.nodeName||"").toLowerCase():"#document"}function hn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function j0(e){var t;return(t=(B0(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function B0(e){return Ks()?e instanceof Node||e instanceof hn(e).Node:!1}function I9(e){return Ks()?e instanceof Element||e instanceof hn(e).Element:!1}function pc(e){return Ks()?e instanceof HTMLElement||e instanceof hn(e).HTMLElement:!1}function V0(e){return!Ks()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof hn(e).ShadowRoot}function G0(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 w9(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _9(e){return["html","body","#document"].includes(P0(e))}function hc(e){return hn(e).getComputedStyle(e)}function S9(e){if(P0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||V0(e)&&e.host||j0(e);return V0(t)?t.host:t}function H0(e){const t=S9(e);return _9(t)?e.ownerDocument?e.ownerDocument.body:e.body:pc(t)&&G0(t)?t:H0(t)}function ea(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=H0(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=hn(o);if(s){const i=gc(a);return t.concat(a,a.visualViewport||[],G0(o)?o:[],i&&n?ea(i):[])}return t.concat(o,ea(o,[],n))}function gc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function T9(e){const t=hc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=pc(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=$s(n)!==s||$s(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function mc(e){return I9(e)?e:e.contextElement}function W0(e){const t=mc(e);if(!pc(t))return Us(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=T9(t);let a=(s?$s(n.width):n.width)/r,i=(s?$s(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const A9=Us(0);function L9(e){const t=hn(e);return!w9()||!t.visualViewport?A9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function O9(e,t,n){return!1}function Z0(e,t,n,r){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),s=mc(e);let a=Us(1);t&&(a=W0(e));const i=O9()?L9(s):Us(0);let c=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,d=o.width/a.x,g=o.height/a.y;if(s){const b=hn(s),x=r;let y=b,p=gc(y);for(;p&&r&&x!==y;){const h=W0(p),m=p.getBoundingClientRect(),v=hc(p),C=m.left+(p.clientLeft+parseFloat(v.paddingLeft))*h.x,I=m.top+(p.clientTop+parseFloat(v.paddingTop))*h.y;c*=h.x,l*=h.y,d*=h.x,g*=h.y,c+=C,l+=I,y=hn(p),p=gc(y)}}return E9({width:d,height:g,x:c,y:l})}function F9(e,t){let n=null,r;const o=j0(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:d,width:g,height:b}=e.getBoundingClientRect();if(i||t(),!g||!b)return;const x=Qs(d),y=Qs(o.clientWidth-(l+g)),p=Qs(o.clientHeight-(d+b)),h=Qs(l),v={rootMargin:-x+"px "+-y+"px "+-p+"px "+-h+"px",threshold:x9(0,v9(1,c))||1};let C=!0;function I(E){const w=E[0].intersectionRatio;if(w!==c){if(!C)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(I,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,v)}n.observe(e)}return a(!0),s}function D9(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=mc(e),d=o||s?[...l?ea(l):[],...ea(t)]:[];d.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const g=l&&i?F9(l,n):null;let b=-1,x=null;a&&(x=new ResizeObserver(m=>{let[v]=m;v&&v.target===l&&x&&(x.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=x)==null||C.observe(t)})),n()}),l&&!c&&x.observe(l),x.observe(t));let y,p=c?Z0(e):null;c&&h();function h(){const m=Z0(e);p&&(m.x!==p.x||m.y!==p.y||m.width!==p.width||m.height!==p.height)&&n(),p=m,y=requestAnimationFrame(h)}return n(),()=>{var m;d.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),g==null||g(),(m=x)==null||m.disconnect(),x=null,c&&cancelAnimationFrame(y)}}var bc=_.useLayoutEffect,k9=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ta=function(){};function N9(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function R9(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(N9(e,a)));return s.filter(function(i){return i}).map(function(i){return String(i).trim()}).join(" ")}var na=function(t){return X9(t)?t.filter(Boolean):nr(t)==="object"&&t!==null?[t]:[]},X0=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Zt(t,k9);return re({},n)},We=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 M9(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function ra(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function P9(e){return ra(e)?window.innerHeight:e.clientHeight}function z0(e){return ra(e)?window.pageYOffset:e.scrollTop}function oa(e,t){if(ra(e)){window.scrollTo(0,t);return}e.scrollTop=t}function j9(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 B9(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function sa(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ta,o=z0(e),s=t-o,a=10,i=0;function c(){i+=a;var l=B9(i,o,s,n);oa(e,l),i<n?window.requestAnimationFrame(c):r(e)}c()}function Y0(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?oa(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&oa(e,Math.max(t.offsetTop-o,0))}function V9(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 J0(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function G9(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var q0=!1,H9={get passive(){return q0=!0}},aa=typeof window<"u"?window:{};aa.addEventListener&&aa.removeEventListener&&(aa.addEventListener("p",ta,H9),aa.removeEventListener("p",ta,!1));var W9=q0;function Z9(e){return e!=null}function X9(e){return Array.isArray(e)}function ko(e,t,n){return e?t:n}function SS(e){return e}function TS(e){return e}var z9=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=et(a,1),c=i[0];return!r.includes(c)});return s.reduce(function(a,i){var c=et(i,2),l=c[0],d=c[1];return a[l]=d,a},{})},Y9=["children","innerProps"],J9=["children","innerProps"];function q9(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,a=e.isFixedPosition,i=e.controlHeight,c=j9(n),l={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return l;var d=c.getBoundingClientRect(),g=d.height,b=n.getBoundingClientRect(),x=b.bottom,y=b.height,p=b.top,h=n.offsetParent.getBoundingClientRect(),m=h.top,v=a?window.innerHeight:P9(c),C=z0(c),I=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),w=m-E,T=v-p,S=w+C,L=g-C-p,N=x-v+C+I,D=C+p-E,k=160;switch(o){case"auto":case"bottom":if(T>=y)return{placement:"bottom",maxHeight:t};if(L>=y&&!a)return s&&sa(c,N,k),{placement:"bottom",maxHeight:t};if(!a&&L>=r||a&&T>=r){s&&sa(c,N,k);var M=a?T-I:L-I;return{placement:"bottom",maxHeight:M}}if(o==="auto"||a){var B=t,z=a?w:S;return z>=r&&(B=Math.min(z-I-i,t)),{placement:"top",maxHeight:B}}if(o==="bottom")return s&&oa(c,N),{placement:"bottom",maxHeight:t};break;case"top":if(w>=y)return{placement:"top",maxHeight:t};if(S>=y&&!a)return s&&sa(c,D,k),{placement:"top",maxHeight:t};if(!a&&S>=r||a&&w>=r){var q=t;return(!a&&S>=r||a&&w>=r)&&(q=a?w-E:S-E),s&&sa(c,D,k),{placement:"top",maxHeight:q}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return l}function $9(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var $0=function(t){return t==="auto"?"bottom":t},Q9=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"},Fr(r,$9(o),"100%"),Fr(r,"position","absolute"),Fr(r,"width","100%"),Fr(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})},Q0=_.createContext(null),U9=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=_.useContext(Q0)||{},d=l.setPortalPlacement,g=_.useRef(null),b=_.useState(o),x=et(b,2),y=x[0],p=x[1],h=_.useState(null),m=et(h,2),v=m[0],C=m[1],I=c.spacing.controlHeight;return bc(function(){var E=g.current;if(E){var w=a==="fixed",T=i&&!w,S=q9({maxHeight:o,menuEl:E,minHeight:r,placement:s,shouldScroll:T,isFixedPosition:w,controlHeight:I});p(S.maxHeight),C(S.placement),d==null||d(S.placement)}},[o,s,a,i,r,d,I]),n({ref:g,placerProps:re(re({},t),{},{placement:v||$0(s),maxHeight:y})})},K9=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return ae("div",ce({},We(t,"menu",{menu:!0}),{ref:r},o),n)},e6=K9,t6=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})},n6=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return ae("div",ce({},We(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},U0=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")})},r6=U0,o6=U0,s6=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=Zt(t,Y9);return ae("div",ce({},We(re(re({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},a6=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=Zt(t,J9);return ae("div",ce({},We(re(re({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},i6=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}},c6=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,a=t.menuPlacement,i=t.menuPosition,c=_.useRef(null),l=_.useRef(null),d=_.useState($0(a)),g=et(d,2),b=g[0],x=g[1],y=_.useMemo(function(){return{setPortalPlacement:x}},[]),p=_.useState(null),h=et(p,2),m=h[0],v=h[1],C=_.useCallback(function(){if(o){var T=V9(o),S=i==="fixed"?0:window.pageYOffset,L=T[b]+S;(L!==(m==null?void 0:m.offset)||T.left!==(m==null?void 0:m.rect.left)||T.width!==(m==null?void 0:m.rect.width))&&v({offset:L,rect:T})}},[o,i,b,m==null?void 0:m.offset,m==null?void 0:m.rect.left,m==null?void 0:m.rect.width]);bc(function(){C()},[C]);var I=_.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),o&&c.current&&(l.current=D9(o,c.current,C,{elementResize:"ResizeObserver"in window}))},[o,C]);bc(function(){I()},[I]);var E=_.useCallback(function(T){c.current=T,I()},[I]);if(!n&&i!=="fixed"||!m)return null;var w=ae("div",ce({ref:E},We(re(re({},t),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),s),r);return ae(Q0.Provider,{value:y},n?Ne.createPortal(w,n):w)},l6=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},u6=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return ae("div",ce({},We(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},d6=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")})},f6=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return ae("div",ce({},We(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},p6=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},h6=function(t){var n=t.children,r=t.innerProps;return ae("div",ce({},We(t,"indicatorsContainer",{indicators:!0}),r),n)},K0,g6=["size"],m6=["innerProps","isRtl","size"];function b6(){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 y6=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:b6},ef=function(t){var n=t.size,r=Zt(t,g6);return ae("svg",ce({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:y6},r))},yc=function(t){return ae(ef,ce({size:20},t),ae("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"}))},tf=function(t){return ae(ef,ce({size:20},t),ae("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"}))},nf=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}})},C6=nf,v6=function(t){var n=t.children,r=t.innerProps;return ae("div",ce({},We(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ae(tf,null))},x6=nf,E6=function(t){var n=t.children,r=t.innerProps;return ae("div",ce({},We(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ae(yc,null))},I6=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})},w6=function(t){var n=t.innerProps;return ae("span",ce({},n,We(t,"indicatorSeparator",{"indicator-separator":!0})))},_6=y9(K0||(K0=C9([`
|
|
612
612
|
0%, 80%, 100% { opacity: 0; }
|
|
613
613
|
40% { opacity: 1; }
|
|
614
|
-
`]))),S6=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})},Cc=function(t){var n=t.delay,r=t.offset;return ae("span",{css:fc({animation:"".concat(_6," 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 */")})},T6=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Zt(t,m6);return ae("div",ce({},We(re(re({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ae(Cc,{delay:0,offset:r}),ae(Cc,{delay:160,offset:!0}),ae(Cc,{delay:320,offset:!r}))},A6=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}})},L6=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ae("div",ce({ref:s},We(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},O6=L6,F6=["data"],D6=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},k6=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,d=t.theme,g=t.selectProps;return ae("div",ce({},We(t,"group",{group:!0}),c),ae(a,ce({},i,{selectProps:g,theme:d,getStyles:o,getClassNames:s,cx:r}),l),ae("div",null,n))},N6=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"})},R6=function(t){var n=X0(t);n.data;var r=Zt(n,F6);return ae("div",ce({},We(t,"groupHeading",{"group-heading":!0}),r))},M6=k6,P6=["innerRef","isDisabled","isHidden","inputClassName"],j6=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)":""},B6),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},rf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},B6={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"},rf)},V6=function(t){return re({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},rf)},G6=function(t){var n=t.cx,r=t.value,o=X0(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Zt(o,P6);return ae("div",ce({},We(t,"input",{"input-container":!0}),{"data-value":r||""}),ae("input",ce({className:n({input:!0},c),ref:s,style:V6(i),disabled:a},l)))},H6=G6,W6=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})},Z6=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})},X6=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}})},of=function(t){var n=t.children,r=t.innerProps;return ae("div",r,n)},z6=of,Y6=of;function J6(e){var t=e.children,n=e.innerProps;return ae("div",ce({role:"button"},n),t||ae(yc,{size:14}))}var q6=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,d=r.Label,g=r.Remove;return ae(l,{data:o,innerProps:re(re({},We(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ae(d,{data:o,innerProps:re({},We(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ae(g,{data:o,innerProps:re(re({},We(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},$6=q6,Q6=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}})},U6=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ae("div",ce({},We(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},K6=U6,eC=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})},tC=function(t){var n=t.children,r=t.innerProps;return ae("div",ce({},We(t,"placeholder",{placeholder:!0}),r),n)},nC=tC,rC=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})},oC=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ae("div",ce({},We(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},sC=oC,gn={ClearIndicator:E6,Control:O6,DropdownIndicator:v6,DownChevron:tf,CrossIcon:yc,Group:M6,GroupHeading:R6,IndicatorsContainer:h6,IndicatorSeparator:w6,Input:H6,LoadingIndicator:T6,Menu:e6,MenuList:n6,MenuPortal:c6,LoadingMessage:a6,NoOptionsMessage:s6,MultiValue:$6,MultiValueContainer:z6,MultiValueLabel:Y6,MultiValueRemove:J6,Option:K6,Placeholder:nC,SelectContainer:u6,SingleValue:sC,ValueContainer:f6},aC=function(t){return re(re({},gn),t.components)},sf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function iC(e,t){return!!(e===t||sf(e)&&sf(t))}function cC(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!iC(e[n],t[n]))return!1;return!0}function lC(e,t){t===void 0&&(t=cC);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}function uC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var dC=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:uC},fC=function(t){return ae("span",ce({css:dC},t))},af=fC,pC={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,d=t.isAppleDevice,g=function(p,h){return p&&p.length?"".concat(p.indexOf(h)+1," of ").concat(p.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(g(i,r),".");if(n==="menu"&&d){var b=c?" disabled":"",x="".concat(l?" selected":"").concat(b);return"".concat(a).concat(x,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},hC=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,d=t.isAppleDevice,g=c.ariaLiveMessages,b=c.getOptionLabel,x=c.inputValue,y=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,v=c.options,C=c.screenReaderStatus,I=c.tabSelectsValue,E=c.isLoading,w=c["aria-label"],T=c["aria-live"],S=_.useMemo(function(){return re(re({},pC),g||{})},[g]),L=_.useMemo(function(){var z="";if(n&&S.onChange){var q=n.option,Q=n.options,X=n.removedValue,Y=n.removedValues,oe=n.value,$=function(se){return Array.isArray(se)?null:se},P=X||q||$(oe),G=P?b(P):"",V=Q||Y||void 0,H=V?V.map(b):[],J=re({isDisabled:P&&p(P,i),label:G,labels:H},n);z=S.onChange(J)}return z},[n,S,p,i,b]),N=_.useMemo(function(){var z="",q=r||o,Q=!!(r&&i&&i.includes(r));if(q&&S.onFocus){var X={focused:q,label:b(q),isDisabled:p(q,i),isSelected:Q,options:s,context:q===r?"menu":"value",selectValue:i,isAppleDevice:d};z=S.onFocus(X)}return z},[r,o,b,p,S,s,i,d]),D=_.useMemo(function(){var z="";if(m&&v.length&&!E&&S.onFilter){var q=C({count:s.length});z=S.onFilter({inputValue:x,resultsMessage:q})}return z},[s,x,m,S,v,C,E]),k=(n==null?void 0:n.action)==="initial-input-focus",M=_.useMemo(function(){var z="";if(S.guidance){var q=o?"value":m?"menu":"input";z=S.guidance({"aria-label":w,context:q,isDisabled:r&&p(r,i),isMulti:y,isSearchable:h,tabSelectsValue:I,isInitialFocus:k})}return z},[w,r,o,y,p,h,m,S,i,I,k]),B=ae(_.Fragment,null,ae("span",{id:"aria-selection"},L),ae("span",{id:"aria-focused"},N),ae("span",{id:"aria-results"},D),ae("span",{id:"aria-guidance"},M));return ae(_.Fragment,null,ae(af,{id:l},k&&B),ae(af,{"aria-live":T,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!k&&B))},gC=hC,vc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],mC=new RegExp("["+vc.map(function(e){return e.letters}).join("")+"]","g"),cf={},xc=0;xc<vc.length;xc++)for(var Ec=vc[xc],Ic=0;Ic<Ec.letters.length;Ic++)cf[Ec.letters[Ic]]=Ec.base;var lf=function(t){return t.replace(mC,function(n){return cf[n]})},bC=lC(lf),uf=function(t){return t.replace(/^\s+|\s+$/g,"")},yC=function(t){return"".concat(t.label," ").concat(t.value)},CC=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=re({ignoreCase:!0,ignoreAccents:!0,stringify:yC,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,d=c?uf(r):r,g=c?uf(i(n)):i(n);return s&&(d=d.toLowerCase(),g=g.toLowerCase()),a&&(d=bC(d),g=lf(g)),l==="start"?g.substr(0,d.length)===d:g.indexOf(d)>-1}},vC=["innerRef"];function xC(e){var t=e.innerRef,n=Zt(e,vC),r=z9(n,"onExited","in","enter","exit","appear");return ae("input",ce({ref:t},r,{css:fc({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 EC=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function IC(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=_.useRef(!1),i=_.useRef(!1),c=_.useRef(0),l=_.useRef(null),d=_.useCallback(function(h,m){if(l.current!==null){var v=l.current,C=v.scrollTop,I=v.scrollHeight,E=v.clientHeight,w=l.current,T=m>0,S=I-E-C,L=!1;S>m&&a.current&&(r&&r(h),a.current=!1),T&&i.current&&(s&&s(h),i.current=!1),T&&m>S?(n&&!a.current&&n(h),w.scrollTop=I,L=!0,a.current=!0):!T&&-m>C&&(o&&!i.current&&o(h),w.scrollTop=0,L=!0,i.current=!0),L&&EC(h)}},[n,r,o,s]),g=_.useCallback(function(h){d(h,h.deltaY)},[d]),b=_.useCallback(function(h){c.current=h.changedTouches[0].clientY},[]),x=_.useCallback(function(h){var m=c.current-h.changedTouches[0].clientY;d(h,m)},[d]),y=_.useCallback(function(h){if(h){var m=W9?{passive:!1}:!1;h.addEventListener("wheel",g,m),h.addEventListener("touchstart",b,m),h.addEventListener("touchmove",x,m)}},[x,b,g]),p=_.useCallback(function(h){h&&(h.removeEventListener("wheel",g,!1),h.removeEventListener("touchstart",b,!1),h.removeEventListener("touchmove",x,!1))},[x,b,g]);return _.useEffect(function(){if(t){var h=l.current;return y(h),function(){p(h)}}},[t,y,p]),function(h){l.current=h}}var df=["boxSizing","height","overflow","paddingRight","position"],ff={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function pf(e){e.preventDefault()}function hf(e){e.stopPropagation()}function gf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function mf(){return"ontouchstart"in window||navigator.maxTouchPoints}var bf=!!(typeof window<"u"&&window.document&&window.document.createElement),No=0,Rr={capture:!1,passive:!1};function wC(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=_.useRef({}),s=_.useRef(null),a=_.useCallback(function(c){if(bf){var l=document.body,d=l&&l.style;if(r&&df.forEach(function(y){var p=d&&d[y];o.current[y]=p}),r&&No<1){var g=parseInt(o.current.paddingRight,10)||0,b=document.body?document.body.clientWidth:0,x=window.innerWidth-b+g||0;Object.keys(ff).forEach(function(y){var p=ff[y];d&&(d[y]=p)}),d&&(d.paddingRight="".concat(x,"px"))}l&&mf()&&(l.addEventListener("touchmove",pf,Rr),c&&(c.addEventListener("touchstart",gf,Rr),c.addEventListener("touchmove",hf,Rr))),No+=1}},[r]),i=_.useCallback(function(c){if(bf){var l=document.body,d=l&&l.style;No=Math.max(No-1,0),r&&No<1&&df.forEach(function(g){var b=o.current[g];d&&(d[g]=b)}),l&&mf()&&(l.removeEventListener("touchmove",pf,Rr),c&&(c.removeEventListener("touchstart",gf,Rr),c.removeEventListener("touchmove",hf,Rr)))}},[r]);return _.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function _C(){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 SC=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},TC=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:_C};function AC(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=IC({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),d=wC({isEnabled:n}),g=function(x){l(x),d(x)};return ae(_.Fragment,null,n&&ae("div",{onClick:SC,css:TC}),t(g))}function LC(){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 OC=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:LC},FC=function(t){var n=t.name,r=t.onFocus;return ae("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:OC,value:"",onChange:function(){}})},DC=FC;function wc(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 kC(){return wc(/^iPhone/i)}function yf(){return wc(/^Mac/i)}function NC(){return wc(/^iPad/i)||yf()&&navigator.maxTouchPoints>1}function RC(){return kC()||NC()}function MC(){return yf()||RC()}var PC=function(t){return t.label},Cf=function(t){return t.label},vf=function(t){return t.value},jC=function(t){return!!t.isDisabled},BC={clearIndicator:x6,container:l6,control:A6,dropdownIndicator:C6,group:D6,groupHeading:N6,indicatorsContainer:p6,indicatorSeparator:I6,input:j6,loadingIndicator:S6,loadingMessage:o6,menu:Q9,menuList:t6,menuPortal:i6,multiValue:W6,multiValueLabel:Z6,multiValueRemove:X6,noOptionsMessage:r6,option:Q6,placeholder:eC,singleValue:rC,valueContainer:d6},VC={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%)"},GC=4,xf=4,HC=38,WC=xf*2,ZC={baseUnit:xf,controlHeight:HC,menuGutter:WC},_c={borderRadius:GC,colors:VC,spacing:ZC},XC={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:J0(),captureMenuScroll:!J0(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:CC(),formatGroupLabel:PC,getOptionLabel:Cf,getOptionValue:vf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:jC,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!G9(),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 Ef(e,t,n,r){var o=Tf(e,t,n),s=Af(e,t,n),a=Sf(e,t),i=ca(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function ia(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return Ef(e,a,t,i)}).filter(function(a){return _f(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Ef(e,n,t,r);return _f(e,s)?s:void 0}).filter(Z9)}function If(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Fr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function wf(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Fr(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 zC(e,t){return If(ia(e,t))}function _f(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!Of(e)||!s)&&Lf(e,{label:a,value:i,data:o},r)}function YC(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 JC(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Sc=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},Sf=function(t,n){return t.getOptionLabel(n)},ca=function(t,n){return t.getOptionValue(n)};function Tf(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Af(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ca(e,t);return n.some(function(o){return ca(e,o)===r})}function Lf(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Of=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},qC=1,la=function(e){ly(n,e);var t=fy(n);function n(r){var o;if(iy(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=MC(),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 d=o.props,g=d.onChange,b=d.name;l.name=b,o.ariaOnChange(c,l),g(c,l)},o.setValue=function(c,l,d){var g=o.props,b=g.closeMenuOnSelect,x=g.isMulti,y=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:y}),b&&(o.setState({inputIsHiddenAfterUpdate:!x}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:d})},o.selectOption=function(c){var l=o.props,d=l.blurInputOnSelect,g=l.isMulti,b=l.name,x=o.state.selectValue,y=g&&o.isOptionSelected(c,x),p=o.isOptionDisabled(c,x);if(y){var h=o.getOptionValue(c);o.setValue(x.filter(function(m){return o.getOptionValue(m)!==h}),"deselect-option",c)}else if(!p)g?o.setValue([].concat(Fr(x),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:b});return}d&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,d=o.state.selectValue,g=o.getOptionValue(c),b=d.filter(function(y){return o.getOptionValue(y)!==g}),x=ko(l,b,b[0]||null);o.onChange(x,{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,d=l[l.length-1],g=l.slice(0,l.length-1),b=ko(c,g,g[0]||null);d&&o.onChange(b,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(c){return Sc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return wf(ia(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),d=0;d<c;d++)l[d]=arguments[d];return R9.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return Sf(o.props,c)},o.getOptionValue=function(c){return ca(o.props,c)},o.getStyles=function(c,l){var d=o.props.unstyled,g=BC[c](l,d);g.boxSizing="border-box";var b=o.props.styles[c];return b?b(g,l):g},o.getClassNames=function(c,l){var d,g;return(d=(g=o.props.classNames)[c])===null||d===void 0?void 0:d.call(g,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return aC(o.props)},o.buildCategorizedOptions=function(){return ia(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return If(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,d=l.isMulti,g=l.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!d}),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&&ra(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,d=l&&l.item(0);d&&(o.initialTouchX=d.clientX,o.initialTouchY=d.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,d=l&&l.item(0);if(d){var g=Math.abs(d.clientX-o.initialTouchX),b=Math.abs(d.clientY-o.initialTouchY),x=5;o.userIsDragging=g>x||b>x}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,d=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(d,{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(),d=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:d>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return Of(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,d=l.isMulti,g=l.backspaceRemovesValue,b=l.escapeClearsValue,x=l.inputValue,y=l.isClearable,p=l.isDisabled,h=l.menuIsOpen,m=l.onKeyDown,v=l.tabSelectsValue,C=l.openMenuOnFocus,I=o.state,E=I.focusedOption,w=I.focusedValue,T=I.selectValue;if(!p&&!(typeof m=="function"&&(m(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||x)return;o.focusValue("previous");break;case"ArrowRight":if(!d||x)return;o.focusValue("next");break;case"Delete":case"Backspace":if(x)return;if(w)o.removeValue(w);else{if(!g)return;d?o.popValue():y&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!h||!v||!E||C&&o.isOptionSelected(E,T))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(h){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":h?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:x}),o.onMenuClose()):y&&b&&o.clearValue();break;case" ":if(x)return;if(!h){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":h?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":h?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!h)return;o.focusOption("pageup");break;case"PageDown":if(!h)return;o.focusOption("pagedown");break;case"Home":if(!h)return;o.focusOption("first");break;case"End":if(!h)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++qC),o.state.selectValue=na(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=Sc(s,a[i])}return o}return cy(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&&Y0(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&&(Y0(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(),d=o==="first"?0:l.length-1;if(!this.props.isMulti){var g=l.indexOf(i[0]);g>-1&&(d=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[d],focusedOptionId:this.getFocusedOptionId(l[d])},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,d=-1;if(a.length){switch(o){case"previous":c===0?d=0:c===-1?d=l:d=c-1;break;case"next":c>-1&&c<l&&(d=c+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:a[d]})}}}},{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(_c):re(re({},_c),this.props.theme):_c}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,d=this.setValue,g=this.props,b=g.isMulti,x=g.isRtl,y=g.options,p=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:p,isMulti:b,isRtl:x,options:y,selectOption:l,selectProps:g,setValue:d,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 Tf(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return Af(this.props,o,s)}},{key:"filterOption",value:function(o,s){return Lf(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,d=o.form,g=o.menuIsOpen,b=o.required,x=this.getComponents(),y=x.Input,p=this.state,h=p.inputIsHidden,m=p.ariaSelection,v=this.commonProps,C=i||this.getElementId("input"),I=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":b,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?A.createElement(y,ce({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:s,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:d,type:"text",value:c},I)):A.createElement(xC,ce({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ta,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:d,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,d=s.SingleValue,g=s.Placeholder,b=this.commonProps,x=this.props,y=x.controlShouldRenderValue,p=x.isDisabled,h=x.isMulti,m=x.inputValue,v=x.placeholder,C=this.state,I=C.selectValue,E=C.focusedValue,w=C.isFocused;if(!this.hasValue()||!y)return m?null:A.createElement(g,ce({},b,{key:"placeholder",isDisabled:p,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(h)return I.map(function(S,L){var N=S===E,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return A.createElement(a,ce({},b,{components:{Container:i,Label:c,Remove:l},isFocused:N,isDisabled:p,key:D,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(m)return null;var T=I[0];return A.createElement(d,ce({},b,{data:T,isDisabled:p}),this.formatOptionLabel(T,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,ce({},a,{innerProps:g,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,d=this.state.isFocused;if(!s||!l)return null;var g={"aria-hidden":"true"};return A.createElement(s,ce({},a,{innerProps:g,isDisabled:c,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return A.createElement(a,ce({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,ce({},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,d=s.MenuPortal,g=s.LoadingMessage,b=s.NoOptionsMessage,x=s.Option,y=this.commonProps,p=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,v=h.inputValue,C=h.isLoading,I=h.loadingMessage,E=h.minMenuHeight,w=h.maxMenuHeight,T=h.menuIsOpen,S=h.menuPlacement,L=h.menuPosition,N=h.menuPortalTarget,D=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,M=h.noOptionsMessage,B=h.onMenuScrollToTop,z=h.onMenuScrollToBottom;if(!T)return null;var q=function(G,V){var H=G.type,J=G.data,ne=G.isDisabled,se=G.isSelected,j=G.label,te=G.value,Ce=p===J,Z=ne?void 0:function(){return o.onOptionHover(J)},Xe=ne?void 0:function(){return o.selectOption(J)},Me="".concat(o.getElementId("option"),"-").concat(V),Qe={id:Me,onClick:Xe,onMouseMove:Z,onMouseOver:Z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:se};return A.createElement(x,ce({},y,{innerProps:Qe,data:J,isDisabled:ne,isSelected:se,key:Me,label:j,type:H,value:te,isFocused:Ce,innerRef:Ce?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(G.data,"menu"))},Q;if(this.hasOptions())Q=this.getCategorizedOptions().map(function(P){if(P.type==="group"){var G=P.data,V=P.options,H=P.index,J="".concat(o.getElementId("group"),"-").concat(H),ne="".concat(J,"-heading");return A.createElement(a,ce({},y,{key:J,data:G,options:V,Heading:i,headingProps:{id:ne,data:P.data},label:o.formatGroupLabel(P.data)}),P.options.map(function(se){return q(se,"".concat(H,"-").concat(se.index))}))}else if(P.type==="option")return q(P,"".concat(P.index))});else if(C){var X=I({inputValue:v});if(X===null)return null;Q=A.createElement(g,y,X)}else{var Y=M({inputValue:v});if(Y===null)return null;Q=A.createElement(b,y,Y)}var oe={minMenuHeight:E,maxMenuHeight:w,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:k},$=A.createElement(U9,ce({},y,oe),function(P){var G=P.ref,V=P.placerProps,H=V.placement,J=V.maxHeight;return A.createElement(c,ce({},y,oe,{innerRef:G,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:C,placement:H}),A.createElement(AC,{captureEnabled:m,onTopArrive:B,onBottomArrive:z,lockEnabled:D},function(ne){return A.createElement(l,ce({},y,{innerRef:function(j){o.getMenuListRef(j),ne(j)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:o.getElementId("listbox")},isLoading:C,maxHeight:J,focusedOption:p}),Q)}))});return N||L==="fixed"?A.createElement(d,ce({},y,{appendTo:N,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),$):$}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,d=s.required,g=this.state.selectValue;if(d&&!this.hasValue()&&!i)return A.createElement(DC,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var b=g.map(function(p){return o.getOptionValue(p)}).join(a);return A.createElement("input",{name:l,type:"hidden",value:b})}else{var x=g.length>0?g.map(function(p,h){return A.createElement("input",{key:"i-".concat(h),name:l,type:"hidden",value:o.getOptionValue(p)})}):A.createElement("input",{name:l,type:"hidden",value:""});return A.createElement("div",null,x)}else{var y=g[0]?this.getOptionValue(g[0]):"";return A.createElement("input",{name:l,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,d=s.selectValue,g=this.getFocusableOptions();return A.createElement(gC,ce({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:d,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,d=l.className,g=l.id,b=l.isDisabled,x=l.menuIsOpen,y=this.state.isFocused,p=this.commonProps=this.getCommonProps();return A.createElement(i,ce({},p,{className:d,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:b,isFocused:y}),this.renderLiveRegion(),A.createElement(s,ce({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:b,isFocused:y,menuIsOpen:x}),A.createElement(c,ce({},p,{isDisabled:b}),this.renderPlaceholderOrValue(),this.renderInput()),A.createElement(a,ce({},p,{isDisabled:b}),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,d=s.isFocused,g=s.prevWasFocused,b=s.instancePrefix,x=o.options,y=o.value,p=o.menuIsOpen,h=o.inputValue,m=o.isMulti,v=na(y),C={};if(a&&(y!==a.value||x!==a.options||p!==a.menuIsOpen||h!==a.inputValue)){var I=p?zC(o,v):[],E=p?wf(ia(o,v),"".concat(b,"-option")):[],w=i?YC(s,v):null,T=JC(s,I),S=Sc(E,T);C={selectValue:v,focusedOption:T,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:w,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},N=l,D=d&&g;return d&&!D&&(N={value:ko(m,v,v[0]||null),options:v,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}(_.Component);la.defaultProps=XC;var $C=_.forwardRef(function(e,t){var n=tc(e);return A.createElement(la,ce({ref:t},n))}),QC=$C;const UC=f.styled(f.Box)`
|
|
614
|
+
`]))),S6=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})},Cc=function(t){var n=t.delay,r=t.offset;return ae("span",{css:fc({animation:"".concat(_6," 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 */")})},T6=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,a=Zt(t,m6);return ae("div",ce({},We(re(re({},a),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ae(Cc,{delay:0,offset:r}),ae(Cc,{delay:160,offset:!0}),ae(Cc,{delay:320,offset:!r}))},A6=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}})},L6=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,a=t.innerProps,i=t.menuIsOpen;return ae("div",ce({ref:s},We(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":i}),a,{"aria-disabled":r||void 0}),n)},O6=L6,F6=["data"],D6=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},k6=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,d=t.theme,g=t.selectProps;return ae("div",ce({},We(t,"group",{group:!0}),c),ae(a,ce({},i,{selectProps:g,theme:d,getStyles:o,getClassNames:s,cx:r}),l),ae("div",null,n))},N6=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"})},R6=function(t){var n=X0(t);n.data;var r=Zt(n,F6);return ae("div",ce({},We(t,"groupHeading",{"group-heading":!0}),r))},M6=k6,P6=["innerRef","isDisabled","isHidden","inputClassName"],j6=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)":""},B6),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},rf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},B6={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"},rf)},V6=function(t){return re({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},rf)},G6=function(t){var n=t.cx,r=t.value,o=X0(t),s=o.innerRef,a=o.isDisabled,i=o.isHidden,c=o.inputClassName,l=Zt(o,P6);return ae("div",ce({},We(t,"input",{"input-container":!0}),{"data-value":r||""}),ae("input",ce({className:n({input:!0},c),ref:s,style:V6(i),disabled:a},l)))},H6=G6,W6=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})},Z6=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})},X6=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}})},of=function(t){var n=t.children,r=t.innerProps;return ae("div",r,n)},z6=of,Y6=of;function J6(e){var t=e.children,n=e.innerProps;return ae("div",ce({role:"button"},n),t||ae(yc,{size:14}))}var q6=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,d=r.Label,g=r.Remove;return ae(l,{data:o,innerProps:re(re({},We(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),s),selectProps:c},ae(d,{data:o,innerProps:re({},We(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),ae(g,{data:o,innerProps:re(re({},We(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},i),selectProps:c}))},$6=q6,Q6=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}})},U6=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,a=t.innerRef,i=t.innerProps;return ae("div",ce({},We(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:a,"aria-disabled":r},i),n)},K6=U6,eC=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})},tC=function(t){var n=t.children,r=t.innerProps;return ae("div",ce({},We(t,"placeholder",{placeholder:!0}),r),n)},nC=tC,rC=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})},oC=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return ae("div",ce({},We(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},sC=oC,gn={ClearIndicator:E6,Control:O6,DropdownIndicator:v6,DownChevron:tf,CrossIcon:yc,Group:M6,GroupHeading:R6,IndicatorsContainer:h6,IndicatorSeparator:w6,Input:H6,LoadingIndicator:T6,Menu:e6,MenuList:n6,MenuPortal:c6,LoadingMessage:a6,NoOptionsMessage:s6,MultiValue:$6,MultiValueContainer:z6,MultiValueLabel:Y6,MultiValueRemove:J6,Option:K6,Placeholder:nC,SelectContainer:u6,SingleValue:sC,ValueContainer:f6},aC=function(t){return re(re({},gn),t.components)},sf=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function iC(e,t){return!!(e===t||sf(e)&&sf(t))}function cC(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!iC(e[n],t[n]))return!1;return!0}function lC(e,t){t===void 0&&(t=cC);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var a=e.apply(this,o);return n={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){n=null},r}function uC(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var dC=process.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:uC},fC=function(t){return ae("span",ce({css:dC},t))},af=fC,pC={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,d=t.isAppleDevice,g=function(p,h){return p&&p.length?"".concat(p.indexOf(h)+1," of ").concat(p.length):""};if(n==="value"&&i)return"value ".concat(a," focused, ").concat(g(i,r),".");if(n==="menu"&&d){var b=c?" disabled":"",x="".concat(l?" selected":"").concat(b);return"".concat(a).concat(x,", ").concat(g(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},hC=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,d=t.isAppleDevice,g=c.ariaLiveMessages,b=c.getOptionLabel,x=c.inputValue,y=c.isMulti,p=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,v=c.options,C=c.screenReaderStatus,I=c.tabSelectsValue,E=c.isLoading,w=c["aria-label"],T=c["aria-live"],S=_.useMemo(function(){return re(re({},pC),g||{})},[g]),L=_.useMemo(function(){var z="";if(n&&S.onChange){var q=n.option,Q=n.options,X=n.removedValue,Y=n.removedValues,oe=n.value,$=function(se){return Array.isArray(se)?null:se},P=X||q||$(oe),G=P?b(P):"",V=Q||Y||void 0,H=V?V.map(b):[],J=re({isDisabled:P&&p(P,i),label:G,labels:H},n);z=S.onChange(J)}return z},[n,S,p,i,b]),N=_.useMemo(function(){var z="",q=r||o,Q=!!(r&&i&&i.includes(r));if(q&&S.onFocus){var X={focused:q,label:b(q),isDisabled:p(q,i),isSelected:Q,options:s,context:q===r?"menu":"value",selectValue:i,isAppleDevice:d};z=S.onFocus(X)}return z},[r,o,b,p,S,s,i,d]),D=_.useMemo(function(){var z="";if(m&&v.length&&!E&&S.onFilter){var q=C({count:s.length});z=S.onFilter({inputValue:x,resultsMessage:q})}return z},[s,x,m,S,v,C,E]),k=(n==null?void 0:n.action)==="initial-input-focus",M=_.useMemo(function(){var z="";if(S.guidance){var q=o?"value":m?"menu":"input";z=S.guidance({"aria-label":w,context:q,isDisabled:r&&p(r,i),isMulti:y,isSearchable:h,tabSelectsValue:I,isInitialFocus:k})}return z},[w,r,o,y,p,h,m,S,i,I,k]),B=ae(_.Fragment,null,ae("span",{id:"aria-selection"},L),ae("span",{id:"aria-focused"},N),ae("span",{id:"aria-results"},D),ae("span",{id:"aria-guidance"},M));return ae(_.Fragment,null,ae(af,{id:l},k&&B),ae(af,{"aria-live":T,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!k&&B))},gC=hC,vc=[{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źẑżžẓẕƶȥɀⱬꝣ"}],mC=new RegExp("["+vc.map(function(e){return e.letters}).join("")+"]","g"),cf={},xc=0;xc<vc.length;xc++)for(var Ec=vc[xc],Ic=0;Ic<Ec.letters.length;Ic++)cf[Ec.letters[Ic]]=Ec.base;var lf=function(t){return t.replace(mC,function(n){return cf[n]})},bC=lC(lf),uf=function(t){return t.replace(/^\s+|\s+$/g,"")},yC=function(t){return"".concat(t.label," ").concat(t.value)},CC=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=re({ignoreCase:!0,ignoreAccents:!0,stringify:yC,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,a=o.ignoreAccents,i=o.stringify,c=o.trim,l=o.matchFrom,d=c?uf(r):r,g=c?uf(i(n)):i(n);return s&&(d=d.toLowerCase(),g=g.toLowerCase()),a&&(d=bC(d),g=lf(g)),l==="start"?g.substr(0,d.length)===d:g.indexOf(d)>-1}},vC=["innerRef"];function xC(e){var t=e.innerRef,n=Zt(e,vC),r=z9(n,"onExited","in","enter","exit","appear");return ae("input",ce({ref:t},r,{css:fc({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 EC=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function IC(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,a=_.useRef(!1),i=_.useRef(!1),c=_.useRef(0),l=_.useRef(null),d=_.useCallback(function(h,m){if(l.current!==null){var v=l.current,C=v.scrollTop,I=v.scrollHeight,E=v.clientHeight,w=l.current,T=m>0,S=I-E-C,L=!1;S>m&&a.current&&(r&&r(h),a.current=!1),T&&i.current&&(s&&s(h),i.current=!1),T&&m>S?(n&&!a.current&&n(h),w.scrollTop=I,L=!0,a.current=!0):!T&&-m>C&&(o&&!i.current&&o(h),w.scrollTop=0,L=!0,i.current=!0),L&&EC(h)}},[n,r,o,s]),g=_.useCallback(function(h){d(h,h.deltaY)},[d]),b=_.useCallback(function(h){c.current=h.changedTouches[0].clientY},[]),x=_.useCallback(function(h){var m=c.current-h.changedTouches[0].clientY;d(h,m)},[d]),y=_.useCallback(function(h){if(h){var m=W9?{passive:!1}:!1;h.addEventListener("wheel",g,m),h.addEventListener("touchstart",b,m),h.addEventListener("touchmove",x,m)}},[x,b,g]),p=_.useCallback(function(h){h&&(h.removeEventListener("wheel",g,!1),h.removeEventListener("touchstart",b,!1),h.removeEventListener("touchmove",x,!1))},[x,b,g]);return _.useEffect(function(){if(t){var h=l.current;return y(h),function(){p(h)}}},[t,y,p]),function(h){l.current=h}}var df=["boxSizing","height","overflow","paddingRight","position"],ff={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function pf(e){e.preventDefault()}function hf(e){e.stopPropagation()}function gf(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function mf(){return"ontouchstart"in window||navigator.maxTouchPoints}var bf=!!(typeof window<"u"&&window.document&&window.document.createElement),No=0,Mr={capture:!1,passive:!1};function wC(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=_.useRef({}),s=_.useRef(null),a=_.useCallback(function(c){if(bf){var l=document.body,d=l&&l.style;if(r&&df.forEach(function(y){var p=d&&d[y];o.current[y]=p}),r&&No<1){var g=parseInt(o.current.paddingRight,10)||0,b=document.body?document.body.clientWidth:0,x=window.innerWidth-b+g||0;Object.keys(ff).forEach(function(y){var p=ff[y];d&&(d[y]=p)}),d&&(d.paddingRight="".concat(x,"px"))}l&&mf()&&(l.addEventListener("touchmove",pf,Mr),c&&(c.addEventListener("touchstart",gf,Mr),c.addEventListener("touchmove",hf,Mr))),No+=1}},[r]),i=_.useCallback(function(c){if(bf){var l=document.body,d=l&&l.style;No=Math.max(No-1,0),r&&No<1&&df.forEach(function(g){var b=o.current[g];d&&(d[g]=b)}),l&&mf()&&(l.removeEventListener("touchmove",pf,Mr),c&&(c.removeEventListener("touchstart",gf,Mr),c.removeEventListener("touchmove",hf,Mr)))}},[r]);return _.useEffect(function(){if(t){var c=s.current;return a(c),function(){i(c)}}},[t,a,i]),function(c){s.current=c}}function _C(){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 SC=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},TC=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:_C};function AC(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=IC({isEnabled:o,onBottomArrive:s,onBottomLeave:a,onTopArrive:i,onTopLeave:c}),d=wC({isEnabled:n}),g=function(x){l(x),d(x)};return ae(_.Fragment,null,n&&ae("div",{onClick:SC,css:TC}),t(g))}function LC(){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 OC=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:LC},FC=function(t){var n=t.name,r=t.onFocus;return ae("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:OC,value:"",onChange:function(){}})},DC=FC;function wc(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 kC(){return wc(/^iPhone/i)}function yf(){return wc(/^Mac/i)}function NC(){return wc(/^iPad/i)||yf()&&navigator.maxTouchPoints>1}function RC(){return kC()||NC()}function MC(){return yf()||RC()}var PC=function(t){return t.label},Cf=function(t){return t.label},vf=function(t){return t.value},jC=function(t){return!!t.isDisabled},BC={clearIndicator:x6,container:l6,control:A6,dropdownIndicator:C6,group:D6,groupHeading:N6,indicatorsContainer:p6,indicatorSeparator:I6,input:j6,loadingIndicator:S6,loadingMessage:o6,menu:Q9,menuList:t6,menuPortal:i6,multiValue:W6,multiValueLabel:Z6,multiValueRemove:X6,noOptionsMessage:r6,option:Q6,placeholder:eC,singleValue:rC,valueContainer:d6},VC={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%)"},GC=4,xf=4,HC=38,WC=xf*2,ZC={baseUnit:xf,controlHeight:HC,menuGutter:WC},_c={borderRadius:GC,colors:VC,spacing:ZC},XC={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:J0(),captureMenuScroll:!J0(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:CC(),formatGroupLabel:PC,getOptionLabel:Cf,getOptionValue:vf,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:jC,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!G9(),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 Ef(e,t,n,r){var o=Tf(e,t,n),s=Af(e,t,n),a=Sf(e,t),i=ca(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:a,value:i,index:r}}function ia(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(a,i){return Ef(e,a,t,i)}).filter(function(a){return _f(e,a)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Ef(e,n,t,r);return _f(e,s)?s:void 0}).filter(Z9)}function If(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,Dr(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function wf(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,Dr(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function zC(e,t){return If(ia(e,t))}function _f(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,a=t.label,i=t.value;return(!Of(e)||!s)&&Lf(e,{label:a,value:i,data:o},r)}function YC(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 JC(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Sc=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},Sf=function(t,n){return t.getOptionLabel(n)},ca=function(t,n){return t.getOptionValue(n)};function Tf(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Af(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ca(e,t);return n.some(function(o){return ca(e,o)===r})}function Lf(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Of=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},qC=1,la=function(e){ly(n,e);var t=fy(n);function n(r){var o;if(iy(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=MC(),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 d=o.props,g=d.onChange,b=d.name;l.name=b,o.ariaOnChange(c,l),g(c,l)},o.setValue=function(c,l,d){var g=o.props,b=g.closeMenuOnSelect,x=g.isMulti,y=g.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:y}),b&&(o.setState({inputIsHiddenAfterUpdate:!x}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:l,option:d})},o.selectOption=function(c){var l=o.props,d=l.blurInputOnSelect,g=l.isMulti,b=l.name,x=o.state.selectValue,y=g&&o.isOptionSelected(c,x),p=o.isOptionDisabled(c,x);if(y){var h=o.getOptionValue(c);o.setValue(x.filter(function(m){return o.getOptionValue(m)!==h}),"deselect-option",c)}else if(!p)g?o.setValue([].concat(Dr(x),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:b});return}d&&o.blurInput()},o.removeValue=function(c){var l=o.props.isMulti,d=o.state.selectValue,g=o.getOptionValue(c),b=d.filter(function(y){return o.getOptionValue(y)!==g}),x=ko(l,b,b[0]||null);o.onChange(x,{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,d=l[l.length-1],g=l.slice(0,l.length-1),b=ko(c,g,g[0]||null);d&&o.onChange(b,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(c){return Sc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return wf(ia(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),d=0;d<c;d++)l[d]=arguments[d];return R9.apply(void 0,[o.props.classNamePrefix].concat(l))},o.getOptionLabel=function(c){return Sf(o.props,c)},o.getOptionValue=function(c){return ca(o.props,c)},o.getStyles=function(c,l){var d=o.props.unstyled,g=BC[c](l,d);g.boxSizing="border-box";var b=o.props.styles[c];return b?b(g,l):g},o.getClassNames=function(c,l){var d,g;return(d=(g=o.props.classNames)[c])===null||d===void 0?void 0:d.call(g,l)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return aC(o.props)},o.buildCategorizedOptions=function(){return ia(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return If(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,d=l.isMulti,g=l.menuIsOpen;o.focusInput(),g?(o.setState({inputIsHiddenAfterUpdate:!d}),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&&ra(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,d=l&&l.item(0);d&&(o.initialTouchX=d.clientX,o.initialTouchY=d.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var l=c.touches,d=l&&l.item(0);if(d){var g=Math.abs(d.clientX-o.initialTouchX),b=Math.abs(d.clientY-o.initialTouchY),x=5;o.userIsDragging=g>x||b>x}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var l=o.props.inputValue,d=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(d,{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(),d=l.indexOf(c);o.setState({focusedOption:c,focusedOptionId:d>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return Of(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var l=o.props,d=l.isMulti,g=l.backspaceRemovesValue,b=l.escapeClearsValue,x=l.inputValue,y=l.isClearable,p=l.isDisabled,h=l.menuIsOpen,m=l.onKeyDown,v=l.tabSelectsValue,C=l.openMenuOnFocus,I=o.state,E=I.focusedOption,w=I.focusedValue,T=I.selectValue;if(!p&&!(typeof m=="function"&&(m(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||x)return;o.focusValue("previous");break;case"ArrowRight":if(!d||x)return;o.focusValue("next");break;case"Delete":case"Backspace":if(x)return;if(w)o.removeValue(w);else{if(!g)return;d?o.popValue():y&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!h||!v||!E||C&&o.isOptionSelected(E,T))return;o.selectOption(E);break;case"Enter":if(c.keyCode===229)break;if(h){if(!E||o.isComposing)return;o.selectOption(E);break}return;case"Escape":h?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:x}),o.onMenuClose()):y&&b&&o.clearValue();break;case" ":if(x)return;if(!h){o.openMenu("first");break}if(!E)return;o.selectOption(E);break;case"ArrowUp":h?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":h?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!h)return;o.focusOption("pageup");break;case"PageDown":if(!h)return;o.focusOption("pagedown");break;case"Home":if(!h)return;o.focusOption("first");break;case"End":if(!h)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++qC),o.state.selectValue=na(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=Sc(s,a[i])}return o}return cy(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&&Y0(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&&(Y0(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(),d=o==="first"?0:l.length-1;if(!this.props.isMulti){var g=l.indexOf(i[0]);g>-1&&(d=g)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[d],focusedOptionId:this.getFocusedOptionId(l[d])},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,d=-1;if(a.length){switch(o){case"previous":c===0?d=0:c===-1?d=l:d=c-1;break;case"next":c>-1&&c<l&&(d=c+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:a[d]})}}}},{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(_c):re(re({},_c),this.props.theme):_c}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,a=this.getStyles,i=this.getClassNames,c=this.getValue,l=this.selectOption,d=this.setValue,g=this.props,b=g.isMulti,x=g.isRtl,y=g.options,p=this.hasValue();return{clearValue:o,cx:s,getStyles:a,getClassNames:i,getValue:c,hasValue:p,isMulti:b,isRtl:x,options:y,selectOption:l,selectProps:g,setValue:d,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 Tf(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return Af(this.props,o,s)}},{key:"filterOption",value:function(o,s){return Lf(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,d=o.form,g=o.menuIsOpen,b=o.required,x=this.getComponents(),y=x.Input,p=this.state,h=p.inputIsHidden,m=p.ariaSelection,v=this.commonProps,C=i||this.getElementId("input"),I=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":b,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},g&&{"aria-controls":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(m==null?void 0:m.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?A.createElement(y,ce({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:C,innerRef:this.getInputRef,isDisabled:s,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:d,type:"text",value:c},I)):A.createElement(xC,ce({id:C,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ta,onFocus:this.onInputFocus,disabled:s,tabIndex:l,inputMode:"none",form:d,value:""},I))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),a=s.MultiValue,i=s.MultiValueContainer,c=s.MultiValueLabel,l=s.MultiValueRemove,d=s.SingleValue,g=s.Placeholder,b=this.commonProps,x=this.props,y=x.controlShouldRenderValue,p=x.isDisabled,h=x.isMulti,m=x.inputValue,v=x.placeholder,C=this.state,I=C.selectValue,E=C.focusedValue,w=C.isFocused;if(!this.hasValue()||!y)return m?null:A.createElement(g,ce({},b,{key:"placeholder",isDisabled:p,isFocused:w,innerProps:{id:this.getElementId("placeholder")}}),v);if(h)return I.map(function(S,L){var N=S===E,D="".concat(o.getOptionLabel(S),"-").concat(o.getOptionValue(S));return A.createElement(a,ce({},b,{components:{Container:i,Label:c,Remove:l},isFocused:N,isDisabled:p,key:D,index:L,removeProps:{onClick:function(){return o.removeValue(S)},onTouchEnd:function(){return o.removeValue(S)},onMouseDown:function(M){M.preventDefault()}},data:S}),o.formatOptionLabel(S,"value"))});if(m)return null;var T=I[0];return A.createElement(d,ce({},b,{data:T,isDisabled:p}),this.formatOptionLabel(T,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||l)return null;var g={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,ce({},a,{innerProps:g,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,a=this.commonProps,i=this.props,c=i.isDisabled,l=i.isLoading,d=this.state.isFocused;if(!s||!l)return null;var g={"aria-hidden":"true"};return A.createElement(s,ce({},a,{innerProps:g,isDisabled:c,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,a=o.IndicatorSeparator;if(!s||!a)return null;var i=this.commonProps,c=this.props.isDisabled,l=this.state.isFocused;return A.createElement(a,ce({},i,{isDisabled:c,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var a=this.commonProps,i=this.props.isDisabled,c=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return A.createElement(s,ce({},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,d=s.MenuPortal,g=s.LoadingMessage,b=s.NoOptionsMessage,x=s.Option,y=this.commonProps,p=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,v=h.inputValue,C=h.isLoading,I=h.loadingMessage,E=h.minMenuHeight,w=h.maxMenuHeight,T=h.menuIsOpen,S=h.menuPlacement,L=h.menuPosition,N=h.menuPortalTarget,D=h.menuShouldBlockScroll,k=h.menuShouldScrollIntoView,M=h.noOptionsMessage,B=h.onMenuScrollToTop,z=h.onMenuScrollToBottom;if(!T)return null;var q=function(G,V){var H=G.type,J=G.data,ne=G.isDisabled,se=G.isSelected,j=G.label,te=G.value,Ce=p===J,Z=ne?void 0:function(){return o.onOptionHover(J)},Xe=ne?void 0:function(){return o.selectOption(J)},Me="".concat(o.getElementId("option"),"-").concat(V),Qe={id:Me,onClick:Xe,onMouseMove:Z,onMouseOver:Z,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:se};return A.createElement(x,ce({},y,{innerProps:Qe,data:J,isDisabled:ne,isSelected:se,key:Me,label:j,type:H,value:te,isFocused:Ce,innerRef:Ce?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(G.data,"menu"))},Q;if(this.hasOptions())Q=this.getCategorizedOptions().map(function(P){if(P.type==="group"){var G=P.data,V=P.options,H=P.index,J="".concat(o.getElementId("group"),"-").concat(H),ne="".concat(J,"-heading");return A.createElement(a,ce({},y,{key:J,data:G,options:V,Heading:i,headingProps:{id:ne,data:P.data},label:o.formatGroupLabel(P.data)}),P.options.map(function(se){return q(se,"".concat(H,"-").concat(se.index))}))}else if(P.type==="option")return q(P,"".concat(P.index))});else if(C){var X=I({inputValue:v});if(X===null)return null;Q=A.createElement(g,y,X)}else{var Y=M({inputValue:v});if(Y===null)return null;Q=A.createElement(b,y,Y)}var oe={minMenuHeight:E,maxMenuHeight:w,menuPlacement:S,menuPosition:L,menuShouldScrollIntoView:k},$=A.createElement(U9,ce({},y,oe),function(P){var G=P.ref,V=P.placerProps,H=V.placement,J=V.maxHeight;return A.createElement(c,ce({},y,oe,{innerRef:G,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:C,placement:H}),A.createElement(AC,{captureEnabled:m,onTopArrive:B,onBottomArrive:z,lockEnabled:D},function(ne){return A.createElement(l,ce({},y,{innerRef:function(j){o.getMenuListRef(j),ne(j)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:o.getElementId("listbox")},isLoading:C,maxHeight:J,focusedOption:p}),Q)}))});return N||L==="fixed"?A.createElement(d,ce({},y,{appendTo:N,controlElement:this.controlRef,menuPlacement:S,menuPosition:L}),$):$}},{key:"renderFormField",value:function(){var o=this,s=this.props,a=s.delimiter,i=s.isDisabled,c=s.isMulti,l=s.name,d=s.required,g=this.state.selectValue;if(d&&!this.hasValue()&&!i)return A.createElement(DC,{name:l,onFocus:this.onValueInputFocus});if(!(!l||i))if(c)if(a){var b=g.map(function(p){return o.getOptionValue(p)}).join(a);return A.createElement("input",{name:l,type:"hidden",value:b})}else{var x=g.length>0?g.map(function(p,h){return A.createElement("input",{key:"i-".concat(h),name:l,type:"hidden",value:o.getOptionValue(p)})}):A.createElement("input",{name:l,type:"hidden",value:""});return A.createElement("div",null,x)}else{var y=g[0]?this.getOptionValue(g[0]):"";return A.createElement("input",{name:l,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,a=s.ariaSelection,i=s.focusedOption,c=s.focusedValue,l=s.isFocused,d=s.selectValue,g=this.getFocusableOptions();return A.createElement(gC,ce({},o,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:i,focusedValue:c,isFocused:l,selectValue:d,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,d=l.className,g=l.id,b=l.isDisabled,x=l.menuIsOpen,y=this.state.isFocused,p=this.commonProps=this.getCommonProps();return A.createElement(i,ce({},p,{className:d,innerProps:{id:g,onKeyDown:this.onKeyDown},isDisabled:b,isFocused:y}),this.renderLiveRegion(),A.createElement(s,ce({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:b,isFocused:y,menuIsOpen:x}),A.createElement(c,ce({},p,{isDisabled:b}),this.renderPlaceholderOrValue(),this.renderInput()),A.createElement(a,ce({},p,{isDisabled:b}),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,d=s.isFocused,g=s.prevWasFocused,b=s.instancePrefix,x=o.options,y=o.value,p=o.menuIsOpen,h=o.inputValue,m=o.isMulti,v=na(y),C={};if(a&&(y!==a.value||x!==a.options||p!==a.menuIsOpen||h!==a.inputValue)){var I=p?zC(o,v):[],E=p?wf(ia(o,v),"".concat(b,"-option")):[],w=i?YC(s,v):null,T=JC(s,I),S=Sc(E,T);C={selectValue:v,focusedOption:T,focusedOptionId:S,focusableOptionsWithIds:E,focusedValue:w,clearFocusValueOnUpdate:!1}}var L=c!=null&&o!==a?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},N=l,D=d&&g;return d&&!D&&(N={value:ko(m,v,v[0]||null),options:v,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}(_.Component);la.defaultProps=XC;var $C=_.forwardRef(function(e,t){var n=tc(e);return A.createElement(la,ce({ref:t},n))}),QC=$C;const UC=f.styled(f.Box)`
|
|
615
615
|
display: flex;
|
|
616
616
|
align-items: center;
|
|
617
617
|
gap: 2px;
|
|
@@ -655,12 +655,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
655
655
|
`,Df=e=>u.jsx(gn.ClearIndicator,{...e,children:u.jsx(e7,{})}),kf=(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:f.theme.typography.fontFamily,fontSize:"13px"}}}:null}),t7=f.styled(f.Stack)`
|
|
656
656
|
width: 0;
|
|
657
657
|
height: 0;
|
|
658
|
-
`,n7=({root:e,rootMargin:t,callback:n})=>{const r=_.useRef(null),o=_.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const a=new IntersectionObserver(i=>{const c=i[0];n(c)},{root:e,rootMargin:t});a.observe(s),r.current=a},[e,t,n]);return u.jsx(t7,{ref:o})},Nf=({options:e,isMulti:t,isScrollTarget:n})=>{const r=_.useRef(),o=_.useMemo(()=>e?Object.fromEntries(e.map(i=>[i.value,i])):{},[e]);return{optionsMap:o,getValue:i=>{var d;if(t||typeof i=="object")return i;const c=o[i];return c&&(r.current=c),i===((d=r.current)==null?void 0:d.value)?r.current:i},closeMenuOnScroll:n?i=>{const c=i.target;return!n||!c?!1:n(c)}:void 0}},r7=e=>u.jsx(gn.DropdownIndicator,{...e,children:u.jsx(f.Icon,{children:e.selectProps.menuIsOpen?u.jsx(f.icons.ArrowDropUp,{}):u.jsx(f.icons.ArrowDropDown,{})})}),Rf=()=>({ClearIndicator:Df,DropdownIndicator:r7,IndicatorSeparator:()=>null,Option:Ff}),Ro=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=_.useState(!1),c=_.useCallback(g=>{i(!g.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:d}=Nf({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(n7,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(QC,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:kf(n.styles,e),components:n.components?n.components:Rf(),closeMenuOnScroll:d,...a&&{menuIsOpen:!1}})]})};Ro.getDefaultComponents=Rf;const Mf="Required Field",o7="Validation Failed";var Pf=(e=>(e.DATE="DD/MM/YYYY",e))(Pf||{}),s7=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function jf(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,d=l===void 0?null:l,g=Zt(e,s7),b=g.inputValue,x=_.useRef(void 0),y=_.useRef(!1),p=_.useState(Array.isArray(n)?n:void 0),h=et(p,2),m=h[0],v=h[1],C=_.useState(typeof b<"u"?b:""),I=et(C,2),E=I[0],w=I[1],T=_.useState(n===!0),S=et(T,2),L=S[0],N=S[1],D=_.useState(void 0),k=et(D,2),M=k[0],B=k[1],z=_.useState([]),q=et(z,2),Q=q[0],X=q[1],Y=_.useState(!1),oe=et(Y,2),$=oe[0],P=oe[1],G=_.useState({}),V=et(G,2),H=V[0],J=V[1],ne=_.useState(void 0),se=et(ne,2),j=se[0],te=se[1],Ce=_.useState(void 0),Z=et(Ce,2),Xe=Z[0],Me=Z[1];o!==Xe&&(J({}),Me(o)),n!==j&&(v(Array.isArray(n)?n:void 0),te(n)),_.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var Qe=_.useCallback(function(kt,tt){if(!s)return tt();var ze=s(kt,tt);ze&&typeof ze.then=="function"&&ze.then(tt,function(){return tt()})},[s]);_.useEffect(function(){n===!0&&Qe(E,function(kt){y.current&&(v(kt||[]),N(!!x.current))})},[]);var ot=_.useCallback(function(kt,tt){var ze=M9(kt,tt,c);if(!ze){x.current=void 0,w(""),B(""),X([]),N(!1),P(!1);return}if(o&&H[ze])w(ze),B(ze),X(H[ze]),N(!1),P(!1);else{var
|
|
658
|
+
`,n7=({root:e,rootMargin:t,callback:n})=>{const r=_.useRef(null),o=_.useCallback(s=>{if(!s||!e)return;r.current&&r.current.disconnect();const a=new IntersectionObserver(i=>{const c=i[0];n(c)},{root:e,rootMargin:t});a.observe(s),r.current=a},[e,t,n]);return u.jsx(t7,{ref:o})},Nf=({options:e,isMulti:t,isScrollTarget:n})=>{const r=_.useRef(),o=_.useMemo(()=>e?Object.fromEntries(e.map(i=>[i.value,i])):{},[e]);return{optionsMap:o,getValue:i=>{var d;if(t||typeof i=="object")return i;const c=o[i];return c&&(r.current=c),i===((d=r.current)==null?void 0:d.value)?r.current:i},closeMenuOnScroll:n?i=>{const c=i.target;return!n||!c?!1:n(c)}:void 0}},r7=e=>u.jsx(gn.DropdownIndicator,{...e,children:u.jsx(f.Icon,{children:e.selectProps.menuIsOpen?u.jsx(f.icons.ArrowDropUp,{}):u.jsx(f.icons.ArrowDropDown,{})})}),Rf=()=>({ClearIndicator:Df,DropdownIndicator:r7,IndicatorSeparator:()=>null,Option:Ff}),Ro=({stackIndex:e,isScrollTarget:t,...n})=>{const{value:r,options:o,isMulti:s}=n,[a,i]=_.useState(!1),c=_.useCallback(g=>{i(!g.isIntersecting)},[]),{getValue:l,closeMenuOnScroll:d}=Nf({options:o,isMulti:s,isScrollTarget:t});return u.jsxs(u.Fragment,{children:[n.menuPortalTarget&&n.root?u.jsx(n7,{root:n.root,rootMargin:"-38px 0px 0px 0px",callback:c}):null,u.jsx(QC,{...n,isDisabled:n.disabled,value:r?l(r):void 0,styles:kf(n.styles,e),components:n.components?n.components:Rf(),closeMenuOnScroll:d,...a&&{menuIsOpen:!1}})]})};Ro.getDefaultComponents=Rf;const Mf="Required Field",o7="Validation Failed";var Pf=(e=>(e.DATE="DD/MM/YYYY",e))(Pf||{}),s7=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function jf(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,d=l===void 0?null:l,g=Zt(e,s7),b=g.inputValue,x=_.useRef(void 0),y=_.useRef(!1),p=_.useState(Array.isArray(n)?n:void 0),h=et(p,2),m=h[0],v=h[1],C=_.useState(typeof b<"u"?b:""),I=et(C,2),E=I[0],w=I[1],T=_.useState(n===!0),S=et(T,2),L=S[0],N=S[1],D=_.useState(void 0),k=et(D,2),M=k[0],B=k[1],z=_.useState([]),q=et(z,2),Q=q[0],X=q[1],Y=_.useState(!1),oe=et(Y,2),$=oe[0],P=oe[1],G=_.useState({}),V=et(G,2),H=V[0],J=V[1],ne=_.useState(void 0),se=et(ne,2),j=se[0],te=se[1],Ce=_.useState(void 0),Z=et(Ce,2),Xe=Z[0],Me=Z[1];o!==Xe&&(J({}),Me(o)),n!==j&&(v(Array.isArray(n)?n:void 0),te(n)),_.useEffect(function(){return y.current=!0,function(){y.current=!1}},[]);var Qe=_.useCallback(function(kt,tt){if(!s)return tt();var ze=s(kt,tt);ze&&typeof ze.then=="function"&&ze.then(tt,function(){return tt()})},[s]);_.useEffect(function(){n===!0&&Qe(E,function(kt){y.current&&(v(kt||[]),N(!!x.current))})},[]);var ot=_.useCallback(function(kt,tt){var ze=M9(kt,tt,c);if(!ze){x.current=void 0,w(""),B(""),X([]),N(!1),P(!1);return}if(o&&H[ze])w(ze),B(ze),X(H[ze]),N(!1),P(!1);else{var yr=x.current={};w(ze),N(!0),P(!M),Qe(ze,function(Nt){y&&yr===x.current&&(x.current=void 0,N(!1),B(ze),X(Nt||[]),P(!1),J(Nt?re(re({},H),{},Fr({},ze,Nt)):H))})}},[o,Qe,M,H,c]),vn=$?[]:E&&M?Q:m||[];return re(re({},g),{},{options:vn,isLoading:L||i,onInputChange:ot,filterOption:d})}var a7=_.forwardRef(function(e,t){var n=jf(e),r=tc(n);return A.createElement(la,ce({ref:t},r))}),i7=a7,c7=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],Bf=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},Tc={formatCreateLabel:function(t){return'Create "'.concat(t,'"')},isValidNewOption:function(t,n,r,o){return!(!t||n.some(function(s){return Bf(t,s,o)})||r.some(function(s){return Bf(t,s,o)}))},getNewOptionData:function(t,n){return{label:n,value:t,__isNew__:!0}}};function l7(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?Tc.formatCreateLabel:s,i=e.isValidNewOption,c=i===void 0?Tc.isValidNewOption:i,l=e.getNewOptionData,d=l===void 0?Tc.getNewOptionData:l,g=e.onCreateOption,b=e.options,x=b===void 0?[]:b,y=e.onChange,p=Zt(e,c7),h=p.getOptionValue,m=h===void 0?vf:h,v=p.getOptionLabel,C=v===void 0?Cf:v,I=p.inputValue,E=p.isLoading,w=p.isMulti,T=p.value,S=p.name,L=_.useMemo(function(){return c(I,na(T),x,{getOptionValue:m,getOptionLabel:C})?d(I,a(I)):void 0},[a,d,C,m,I,c,x,T]),N=_.useMemo(function(){return(n||!E)&&L?o==="first"?[L].concat(Dr(x)):[].concat(Dr(x),[L]):x},[n,o,E,L,x]),D=_.useCallback(function(k,M){if(M.action!=="select-option")return y(k,M);var B=Array.isArray(k)?k:[k];if(B[B.length-1]===L){if(g)g(I);else{var z=d(I,I),q={action:"create-option",name:S,option:z};y(ko(w,[].concat(Dr(na(T)),[z]),z),q)}return}y(k,M)},[d,I,w,S,L,g,y,T]);return re(re({},p),{},{options:N,onChange:D})}var u7=_.forwardRef(function(e,t){var n=jf(e),r=tc(n),o=l7(r);return A.createElement(la,ce({ref:t},o))}),d7=u7;const f7=f.styled(f.Typography)`
|
|
659
659
|
display: block;
|
|
660
660
|
white-space: nowrap;
|
|
661
661
|
overflow: hidden;
|
|
662
662
|
text-overflow: ellipsis;
|
|
663
|
-
`,p7=(e,t)=>{const n=_.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},Vf=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function h7(e){return u.jsx(gn.DropdownIndicator,{...e,children:u.jsx(f.Icon,{children:e.selectProps.menuIsOpen?u.jsx(f.icons.ArrowDropUp,{}):u.jsx(f.icons.ArrowDropDown,{})})})}const g7=e=>u.jsxs(f.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[u.jsx(f.Stack,{flexShrink:0,children:u.jsx(Vf,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),u.jsxs(f7,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function m7({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=_.useState([]),[s,a]=_.useState(""),[i,c]=_.useState(!1),l=_.useRef(),{isMulti:d,createOption:g,loadOptions:b,isApiSearchEnabled:x=!1,isInfiniteScrollable:y=!1,loadOptionsOnFocus:p=!1}=n,{getValue:h,closeMenuOnScroll:m}=Nf({options:r,isMulti:d,isScrollTarget:t}),v=(M,B,z)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,b==null?void 0:b(M,B,z,l.current)),C=p7((M,B)=>{if(a(M),r.length>0&&!x){const q=r.filter(Q=>Q&&typeof Q=="object"&&"label"in Q&&typeof Q.label=="string"?Q.label.toLowerCase().includes(M.toLowerCase()):!1);B(q);return}const z=q=>{B(q),o(q)};v==null||v(M,z,!1)},300),I=(M,B)=>{c(!1),!(B&&"isError"in B&&B.isError)&&o(M)},E=M=>{var B;(B=n.onMenuScrollToBottom)==null||B.call(n,M),y&&b&&!i&&(c(!0),v(s,I,!0))},w=(M,B)=>{var z;(z=n.onInputChange)==null||z.call(n,M,B),B.action==="input-change"&&x&&(a(M),o([]),M||(c(!0),C(M,I)))},T=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&&p&&(o([]),c(!0),v==null||v(s,I,!1))},L=M=>B=>{var q;const z=B.find(Q=>Q.label===M);!n.isMulti&&z&&((q=n.onChange)==null||q.call(n,z,{action:"select-option",name:n.name,option:z})),o(B),c(!1)},N=M=>{c(!0),g==null||g(M,L(M))},D=()=>{c(!0),v==null||v(s,I,!1)},k=g?d7:i7;return u.jsx(k,{...n,menuShouldScrollIntoView:!1,value:n.value?h(n.value):null,isDisabled:n.disabled,loadOptions:C,onMenuScrollToBottom:E,onInputChange:w,onBlur:T,onFocus:S,onMenuOpen:D,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:kf(n.styles,e),components:{ClearIndicator:Df,DropdownIndicator:h7,IndicatorSeparator:()=>null,Option:Ff},closeMenuOnScroll:m,...g?{formatCreateLabel:g7,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:N,options:r}:null})}const
|
|
663
|
+
`,p7=(e,t)=>{const n=_.useRef();return(...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{e(...o)},t)}},Vf=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}));function h7(e){return u.jsx(gn.DropdownIndicator,{...e,children:u.jsx(f.Icon,{children:e.selectProps.menuIsOpen?u.jsx(f.icons.ArrowDropUp,{}):u.jsx(f.icons.ArrowDropDown,{})})})}const g7=e=>u.jsxs(f.Stack,{direction:"row",flexWrap:"nowrap",alignItems:"center",width:"100%",children:[u.jsx(f.Stack,{flexShrink:0,children:u.jsx(Vf,{width:14,height:14,fill:"rgb(80, 109, 255)"})}),u.jsxs(f7,{color:"rgb(80, 109, 255)",fontSize:"12px",fontWeight:500,children:["Create ",e]})]});function m7({stackIndex:e,isScrollTarget:t,...n}){const[r,o]=_.useState([]),[s,a]=_.useState(""),[i,c]=_.useState(!1),l=_.useRef(),{isMulti:d,createOption:g,loadOptions:b,isApiSearchEnabled:x=!1,isInfiniteScrollable:y=!1,loadOptionsOnFocus:p=!1}=n,{getValue:h,closeMenuOnScroll:m}=Nf({options:r,isMulti:d,isScrollTarget:t}),v=(M,B,z)=>(l.current&&l.current.abort("stale data"),l.current=new AbortController,b==null?void 0:b(M,B,z,l.current)),C=p7((M,B)=>{if(a(M),r.length>0&&!x){const q=r.filter(Q=>Q&&typeof Q=="object"&&"label"in Q&&typeof Q.label=="string"?Q.label.toLowerCase().includes(M.toLowerCase()):!1);B(q);return}const z=q=>{B(q),o(q)};v==null||v(M,z,!1)},300),I=(M,B)=>{c(!1),!(B&&"isError"in B&&B.isError)&&o(M)},E=M=>{var B;(B=n.onMenuScrollToBottom)==null||B.call(n,M),y&&b&&!i&&(c(!0),v(s,I,!0))},w=(M,B)=>{var z;(z=n.onInputChange)==null||z.call(n,M,B),B.action==="input-change"&&x&&(a(M),o([]),M||(c(!0),C(M,I)))},T=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&&p&&(o([]),c(!0),v==null||v(s,I,!1))},L=M=>B=>{var q;const z=B.find(Q=>Q.label===M);!n.isMulti&&z&&((q=n.onChange)==null||q.call(n,z,{action:"select-option",name:n.name,option:z})),o(B),c(!1)},N=M=>{c(!0),g==null||g(M,L(M))},D=()=>{c(!0),v==null||v(s,I,!1)},k=g?d7:i7;return u.jsx(k,{...n,menuShouldScrollIntoView:!1,value:n.value?h(n.value):null,isDisabled:n.disabled,loadOptions:C,onMenuScrollToBottom:E,onInputChange:w,onBlur:T,onFocus:S,onMenuOpen:D,isLoading:i,defaultOptions:r.length?r:n.defaultOptions||!1,styles:kf(n.styles,e),components:{ClearIndicator:Df,DropdownIndicator:h7,IndicatorSeparator:()=>null,Option:Ff},closeMenuOnScroll:m,...g?{formatCreateLabel:g7,createOptionPosition:"first",allowCreateWhileLoading:!1,onCreateOption:N,options:r}:null})}const Pr="table-cell-form-field",ua="60px",da="24px",b7=f.styled(f.Box)`
|
|
664
664
|
width: 100%;
|
|
665
665
|
`,y7=f.styled(f.Box)`
|
|
666
666
|
width: 100%;
|
|
@@ -753,25 +753,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
753
753
|
color: ${f.theme.palette.gray.gray1};
|
|
754
754
|
font-weight: bold;
|
|
755
755
|
`,_7=f.styled(f.DatePicker)`
|
|
756
|
-
&.${
|
|
756
|
+
&.${Pr} .MuiInputBase-root {
|
|
757
757
|
height: ${ua};
|
|
758
758
|
border: 0;
|
|
759
759
|
padding-left: ${da};
|
|
760
760
|
}
|
|
761
761
|
`;function S7(e){const[t,n]=_.useState(!1),r=_.useRef(null);_.useEffect(()=>{t&&r.current&&r.current.focus()},[t]);const o=(s,a)=>{s===null&&e.onChange(s,a),s&&typeof s.getTime=="function"&&!isNaN(s.getTime())&&e.onChange(s,a),e.onChange(s,a)};return u.jsx(_7,{inputFormat:e.inputFormat?e.inputFormat:Pf.DATE,...e,value:e.value||null,open:t,onOpen:()=>n(!0),onClose:()=>n(!1),onChange:o,PopperProps:{anchorEl:r.current},renderInput:s=>u.jsx(f.DateTextField,{...s,fullWidth:!0,variant:"outlined",disabled:e.disabled,inputRef:r,inputProps:{...s.inputProps,placeholder:e.placeholder},onBlur:e.onBlur,onFocus:e.onFocus,InputProps:{endAdornment:u.jsx(f.InputAdornment,{position:"end",sx:{cursor:"pointer"},children:u.jsx(f.icons.CalendarTodayOutlinedIcon,{})})},onClick:()=>{t||n(!0)}})})}const T7=f.styled(f.Checkbox)`
|
|
762
|
-
&.${
|
|
762
|
+
&.${Pr} {
|
|
763
763
|
--v-margin: calc((${ua} - 36px) / 2);
|
|
764
764
|
--h-margin: calc((100% - 36px) / 2);
|
|
765
765
|
margin: var(--v-margin) var(--h-margin);
|
|
766
766
|
}
|
|
767
|
-
`,A7=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(T7,{onChange:o,onFocus:t,onBlur:n,...r})},Wf=({label:e,isRequired:t,prefixNode:n,...r})=>e?u.jsxs(f.Typography,{variant:"h4",component:"label",color:f.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?u.jsx("span",{className:"required__star",children:"*"}):null]}):null,L7=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"})),Zf=250,rr="__id",Mo={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:Zf,arithmeticOperation:[]},fa=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=Mo.defaultNumberOfRows,fixedRows:a=Mo.fixedRows,cellWidth:i=Mo.cellWidth,arithmeticOperation:c=Mo.arithmeticOperation}=Mo,fetchConfig:l={},createConfig:d={},stackIndex:g,onChange:b=()=>{},onFocus:x,onValidationError:y})=>{const p=t??[],h=(o==null?void 0:o.validations)??{},m=_.useRef(),v=_.useRef({}),[C,I]=_.useState({}),{colsLength:E,colsTemplate:w,colWidth:T}=_.useMemo(()=>{let P=0,G="";for(const V of r){let H=V.cols?Number(V.cols):1;isNaN(H)&&(H=1),P+=H,G+=`${V.cols??H}fr `}return a||(P+=.5,G+="0.5fr"),{colsLength:P,colsTemplate:G.trim(),colWidth:`${isNaN(i)?Zf:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=_.useMemo(()=>{const P={},G={};for(const V of r){if(!V.valueConfig)continue;G[V.name]=V.valueConfig;const H=V.valueConfig.columnNames;for(const J of H)P[J]||(P[J]=[]),P[J].push(V.name)}return{fieldDependency:P,fieldConfigs:G}},[r]);_.useEffect(()=>{if(t)return;const P=[];for(let G=0;G<s;G++){const V=c0();P.push({[rr]:V})}b(P)},[t,b,s]);const N=()=>{const P=Object.entries(v.current).filter(G=>!!G[1])[0];return(P==null?void 0:P[1])??""},D=()=>{const P={[rr]:c0()};b([...p,P])},k=P=>{const G=p.filter(V=>V[rr]!==P);b(G),I(V=>({...V,[P]:{}}));for(const V in v.current)V.startsWith(`${P}.`)&&delete v.current[V];y==null||y(e,N())},M=(P,{columnNames:G=[],operationType:V})=>{const H=G.map(J=>P[J]);return""+l0(H,V)},B=(P,G)=>{const V=p.map(H=>P!==H[rr]?H:{...H,...G});b(V)},z=(P,G)=>{const V=p.map(H=>{if(P!==H[rr])return H;const J={...H};for(const ne of G)delete J[ne];return J});b(V)},q=(P,G,V,H)=>{var se;const J=((se=H==null?void 0:H.target)==null?void 0:se.value)??"",ne={...V,[G]:J};if(S[G])for(const j of S[G]){const te=M(ne,L[j]);ne[j]=te}B(P,ne)},Q=(P,G,V)=>{B(P,{[G]:V})},X=(P,G,V,H)=>{if(V&&typeof V=="object"&&"value"in V&&typeof V.value=="string"&&typeof H.name<"u"){const J="prefillValues"in V&&V.prefillValues,ne={...G,[H.name]:V.value,...J};for(const se in ne)if(S[se])for(const j of S[se]){const te=M(ne,L[j]);ne[j]=te}B(P,ne)}(H==null?void 0:H.action)==="clear"&&H.name&&z(P,[H.name])},Y=(P,G,V)=>{B(P,{[G]:(V==null?void 0:V.toISOString())??""})},oe=(P,G,V,H)=>{H&&I(J=>{const ne=J[P]??{};return{...J,[P]:{...ne,[G]:V}}}),v.current={...v.current,[`${P}.${G}`]:typeof V=="string"?V:""},y==null||y(e,N())},$=P=>m.current===P;return u.jsxs(b7,{children:[u.jsx(y7,{ref:m,children:u.jsxs(C7,{gridColumns:w,minWidth:`calc( ${E} * ${T} )`,children:[u.jsx(x7,{children:r.map(({name:P,label:G,isRequired:V})=>u.jsx(Ac,{children:u.jsx(Wf,{label:G,isRequired:V})},P))}),p.map(({[rr]:P,...G})=>u.jsxs(Gf,{children:[r.map(({name:V,key:H,...J})=>{var ne;return u.jsx(Ac,{hasError:!!((ne=C==null?void 0:C[P])!=null&&ne[V]),children:u.jsx(or,{name:V,value:G[V],...J,className:
|
|
767
|
+
`,A7=({onChange:e,onFocus:t,onBlur:n,...r})=>{const o=(s,a)=>{e==null||e(s,a)};return u.jsx(T7,{onChange:o,onFocus:t,onBlur:n,...r})},Wf=({label:e,isRequired:t,prefixNode:n,...r})=>e?u.jsxs(f.Typography,{variant:"h4",component:"label",color:f.theme.palette.gray.gray1,className:"hiver__field--label",...r,children:[n,e,t?u.jsx("span",{className:"required__star",children:"*"}):null]}):null,L7=e=>A.createElement("svg",{width:"8px",height:"8px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4z"})),Zf=250,rr="__id",Mo={isExpandable:!0,isExpanded:!0,defaultNumberOfRows:1,fixedRows:!1,cellWidth:Zf,arithmeticOperation:[]},fa=({name:e,value:t,data:n={},columns:r=[],validation:o={},meta:{defaultNumberOfRows:s=Mo.defaultNumberOfRows,fixedRows:a=Mo.fixedRows,cellWidth:i=Mo.cellWidth,arithmeticOperation:c=Mo.arithmeticOperation}=Mo,fetchConfig:l={},createConfig:d={},stackIndex:g,onChange:b=()=>{},onFocus:x,onValidationError:y})=>{const p=t??[],h=(o==null?void 0:o.validations)??{},m=_.useRef(),v=_.useRef({}),[C,I]=_.useState({}),{colsLength:E,colsTemplate:w,colWidth:T}=_.useMemo(()=>{let P=0,G="";for(const V of r){let H=V.cols?Number(V.cols):1;isNaN(H)&&(H=1),P+=H,G+=`${V.cols??H}fr `}return a||(P+=.5,G+="0.5fr"),{colsLength:P,colsTemplate:G.trim(),colWidth:`${isNaN(i)?Zf:i}px`}},[r,i,a]),{fieldDependency:S,fieldConfigs:L}=_.useMemo(()=>{const P={},G={};for(const V of r){if(!V.valueConfig)continue;G[V.name]=V.valueConfig;const H=V.valueConfig.columnNames;for(const J of H)P[J]||(P[J]=[]),P[J].push(V.name)}return{fieldDependency:P,fieldConfigs:G}},[r]);_.useEffect(()=>{if(t)return;const P=[];for(let G=0;G<s;G++){const V=c0();P.push({[rr]:V})}b(P)},[t,b,s]);const N=()=>{const P=Object.entries(v.current).filter(G=>!!G[1])[0];return(P==null?void 0:P[1])??""},D=()=>{const P={[rr]:c0()};b([...p,P])},k=P=>{const G=p.filter(V=>V[rr]!==P);b(G),I(V=>({...V,[P]:{}}));for(const V in v.current)V.startsWith(`${P}.`)&&delete v.current[V];y==null||y(e,N())},M=(P,{columnNames:G=[],operationType:V})=>{const H=G.map(J=>P[J]);return""+l0(H,V)},B=(P,G)=>{const V=p.map(H=>P!==H[rr]?H:{...H,...G});b(V)},z=(P,G)=>{const V=p.map(H=>{if(P!==H[rr])return H;const J={...H};for(const ne of G)delete J[ne];return J});b(V)},q=(P,G,V,H)=>{var se;const J=((se=H==null?void 0:H.target)==null?void 0:se.value)??"",ne={...V,[G]:J};if(S[G])for(const j of S[G]){const te=M(ne,L[j]);ne[j]=te}B(P,ne)},Q=(P,G,V)=>{B(P,{[G]:V})},X=(P,G,V,H)=>{if(V&&typeof V=="object"&&"value"in V&&typeof V.value=="string"&&typeof H.name<"u"){const J="prefillValues"in V&&V.prefillValues,ne={...G,[H.name]:V.value,...J};for(const se in ne)if(S[se])for(const j of S[se]){const te=M(ne,L[j]);ne[j]=te}B(P,ne)}(H==null?void 0:H.action)==="clear"&&H.name&&z(P,[H.name])},Y=(P,G,V)=>{B(P,{[G]:(V==null?void 0:V.toISOString())??""})},oe=(P,G,V,H)=>{H&&I(J=>{const ne=J[P]??{};return{...J,[P]:{...ne,[G]:V}}}),v.current={...v.current,[`${P}.${G}`]:typeof V=="string"?V:""},y==null||y(e,N())},$=P=>m.current===P;return u.jsxs(b7,{children:[u.jsx(y7,{ref:m,children:u.jsxs(C7,{gridColumns:w,minWidth:`calc( ${E} * ${T} )`,children:[u.jsx(x7,{children:r.map(({name:P,label:G,isRequired:V})=>u.jsx(Ac,{children:u.jsx(Wf,{label:G,isRequired:V})},P))}),p.map(({[rr]:P,...G})=>u.jsxs(Gf,{children:[r.map(({name:V,key:H,...J})=>{var ne;return u.jsx(Ac,{hasError:!!((ne=C==null?void 0:C[P])!=null&&ne[V]),children:u.jsx(or,{name:V,value:G[V],...J,className:Pr,label:"",hideHelperText:!0,validation:h==null?void 0:h[V],onFocus:x,inputChangeHandler:se=>q(P,V,G,se),checkboxChangeHandler:(...se)=>Q(P,V,se[1]),selectChangeHandler:(...se)=>X(P,G,...se),dateChangeHandler:(se,j)=>Y(P,se,j),onValidationError:(...se)=>oe(P,...se),fetchConfig:l==null?void 0:l[V],createConfig:d==null?void 0:d[V],isScrollTarget:$,...g?{menuPortalTarget:document.body,stackIndex:g}:null})},V??H)}),a?null:u.jsx(Ac,{children:u.jsx(f.Stack,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",children:u.jsx(Hf,{onClick:()=>k(P),children:u.jsx(L7,{})})})})]},P))]})}),u.jsxs(v7,{children:[a?null:u.jsxs(E7,{onClick:D,children:[u.jsx(Vf,{}),u.jsx(f.Typography,{children:"Add Line"})]}),c.length?u.jsx(I7,{children:c.map(({label:P,columnName:G,operationType:V,prefix:H="",prefixKey:J,suffix:ne="",suffixKey:se})=>u.jsxs(w7,{children:[u.jsx(f.Typography,{fontWeight:500,children:P}),u.jsxs(f.Typography,{children:[u.jsxs("span",{children:[n[J]??H," "]}),u.jsx("span",{children:l0(p.map(j=>j[G]),V)}),u.jsx("span",{children:n[se]??ne})]})]},P))}):null]})]})};fa.ROW_ID=rr;const O7=f.styled(f.Box)`
|
|
768
768
|
box-sizing: border-box;
|
|
769
|
-
&:not(:has(.${
|
|
769
|
+
&:not(:has(.${Pr})) {
|
|
770
770
|
transform: translate(0, 5px);
|
|
771
771
|
padding-bottom: 5px;
|
|
772
772
|
}
|
|
773
773
|
`,F7=f.styled(f.TextField)`
|
|
774
|
-
&.${
|
|
774
|
+
&.${Pr} {
|
|
775
775
|
height: ${ua};
|
|
776
776
|
position: relative;
|
|
777
777
|
& > div {
|
|
@@ -904,7 +904,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
904
904
|
border-radius: 4px;
|
|
905
905
|
}
|
|
906
906
|
|
|
907
|
-
& .${
|
|
907
|
+
& .${Pr} {
|
|
908
908
|
height: ${ua};
|
|
909
909
|
.hiverFormField__control {
|
|
910
910
|
height: 100%;
|
|
@@ -1036,10 +1036,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1036
1036
|
width: 40px;
|
|
1037
1037
|
height: 40px;
|
|
1038
1038
|
}
|
|
1039
|
-
`,W7=e=>A.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),A.createElement("g",{clipPath:"url(#clip0_7787_114457)"},A.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_7787_114457"},A.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),Z7=({aspectRatio:e="auto",...t})=>{const[n,r]=_.useState(!1);return n?null:u.jsxs(H7,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(W7,{className:"play-icon"})]})},Jf=f.styled(({className:e,...t})=>u.jsx(f.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${f.tooltipClasses.arrow}`]:{...t},[`& .${f.tooltipClasses.tooltip}`]:{...e}})),Lc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},X7=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],Po=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},Oc=({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=Qb(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=Ub(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=Kb();return}if(n.type==="text"&&n.limit){t[n.name].validate=Ki();return}if(n.type==="table"){const l=Oc({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=qb(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=$b(l)}}),t},pa={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[fa.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},ha=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return pa.isMultiSelect(o)?s=o.map(a=>a.value):pa.isTable(o)?s=o.map(({...i})=>(delete i[fa.ROW_ID],i)).filter(i=>Object.keys(i).length>0):pa.isSelect(o)?s=o.value:pa.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),z7=(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]}))},qf=(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=qf(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},Pr="/v1/api",Y7=`${Pr}/connectors/conversation/:conversationId/metadata`,J7=`${Pr}/connectors/forms/:formId/field/:fieldName/data`,q7=`${Pr}/connectors/form/:formId`,$7=`${Pr}/connectors/forms/:id/link`,Q7=`${Pr}/connectors/forms/:id/preview`,U7=`${Pr}/connectors/conversation/:conversationId/selected-email`,K7=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ne({url:bt(`${J7}?${r.toString()}`,e),method:Ve.POST,data:t})},e8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ne({url:bt(`${q7}?${r.toString()}`,e),method:Ve.POST,data:t})},t8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ne({url:`${Q7.replace(":id",e)}?${r.toString()}`,method:Ve.POST,data:{args:t}})},n8="https://avatars.githubusercontent.com/u/62397590",$f={optionsMap:null,createOptionApi:ee.IDLE,dropdownOptionsApis:ee.IDLE,previewCardData:null,previewCardApiStatus:ee.IDLE,selectedSuggestionType:"basic"},Qf=Qi({name:"commonSlice",initialState:$f,reducers:{resetState:()=>$f,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=ee.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(ga.pending,t=>{t.createOptionApi=ee.LOADING}).addCase(ga.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=ee.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(ga.rejected,t=>{t.createOptionApi=ee.FAILED}).addCase(sr.pending,t=>{t.dropdownOptionsApis=ee.LOADING}).addCase(sr.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=ee.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(sr.rejected,t=>{t.dropdownOptionsApis=ee.FAILED}).addCase(jr.pending,t=>{t.previewCardApiStatus=ee.LOADING}).addCase(jr.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=ee.IDLE}).addCase(jr.rejected,t=>{t.previewCardApiStatus=ee.FAILED})}}),ga=Wt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var p,h,m;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:d}=e,g=Lc(c||{},s,r),{common:b}=t(),{options:x=[],...y}=((p=b.optionsMap)==null?void 0:p[g])||{};try{const v=await e8({fieldName:r,formId:a},{args:l,conversation_id:i});if(!v||!("data"in v)||!("output_variables"in v.data)||!("external_resource_id"in v.data.output_variables))throw v;const C=v.data.output_variables,{external_resource_id:I,...E}=C,T=[{label:o,value:I,prefillValues:E},...x],S=u0(T,L=>L.value);return d==null||d(S),{optionsList:S,key:g,...y}}catch(v){d==null||d(x);const C=v,I=(h=C==null?void 0:C.response)==null?void 0:h.data,E=typeof I=="string"?I:(I==null?void 0:I.message)||pn;return Se({message:E,type:qe}),n((m=C==null?void 0:C.response)==null?void 0:m.status)}}),sr=Wt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var T,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:d={enabled:!1},controller:g}=e,b=Lc(c||{},o,r),{common:x}=t();let y=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(y=a.meta.showAvatar);const p=((T=x.optionsMap)==null?void 0:T[b])||{},h=!e.isScrollToBottomEvent&&(!p||s!==p.searchTerm),m=h?[]:p.options||[],v=h?!0:p.hasMore??!0,C=h?0:p.currentPage??0,{enabled:I,limit:E}=d,w=E||10;try{let N;const D=g==null?void 0:g.signal,k=I?{pageNumber:C+1,searchTerm:s,limit:w,enabled:I}:null;if(v&&(N=await K7({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:X}=t(),Y=(S=X.optionsMap)==null?void 0:S[b];return i==null||i(Y.options??[]),{...Y,optionsList:Y.options??[],key:b,hasMore:!1}}const B=N.data.data.map(X=>y?{...X,avatarUrl:X.avatarUrl||n8}:(delete X.avatarUrl,X)),z=[...m,...B],q=I?B.length>=w:!1,Q=u0(z,X=>X.value);return i==null||i(Q),{optionsList:Q,fieldName:r,formId:o,searchTerm:s,currentPage:C+1,hasMore:q,key:b}}catch(N){const{common:D}=t(),k=((L=D.optionsMap)==null?void 0:L[b])||{};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=Lc(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 d=(l==null?void 0:l.options)||[];return d&&d.length?(s==null||s(d),!1):!0}}),jr=Wt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await t8(e,t,n),i=a==null?void 0:a.data;return i?(r&&Se({message:n0,type:Ut}),{data:td(i)}):(r&&Se({message:t0,type:qe}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:SS,resetPreviewCardData:r8,setSelectedSuggestionType:o8}=Qf.actions,s8=Qf.reducer,jo="/v1/api",a8=`${jo}/connectors/forms/list`,i8=`${jo}/connectors/cards/:id/unlink`,c8=`${jo}/connectors/forms/:id/link`,l8=`${jo}/connectors/form/:formId`,u8=`${jo}/connectors/forms/:formId/data`,d8=({inboxIds:e,channelType:t,conversationId:n})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",t),r.append("conversation_id",String(n)),Ne({url:`${a8}?${r.toString()}`,method:Ve.GET})},Uf=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),Ne({url:bt(`${l8}?${r.toString()}`,e),method:Ve.POST,data:t})},f8=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),Ne({url:`${i8.replace(":id",e)}?${o.toString()}`,method:Ve.POST,data:{externalResourceId:n,conversationId:r}})},p8=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),Ne({url:`${c8.replace(":id",e)}?${s.toString()}`,method:Ve.POST,data:{externalResourceId:t,conversationId:r}})},h8=(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),Ne({url:`${u8.replace(":formId",e)}?${s.toString()}`,method:Ve.GET})},g8="Error in previewing the card",Kf="Link format isn't recognized. Please check that you've entered a valid URL",m8="Item already linked",b8="Card linked successfully",y8="Error in linking the card",C8="New card created",v8="Card creation failed",x8="Create and link objects from different apps to this conversation",E8="Are you sure you want to change the primary object?",I8="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",w8="Are you sure you want to leave?",_8=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
|
|
1040
|
-
Do you want to continue?`,S8="Select an object to create",T8="Select an object to link",e1="Select object",A8="Paste URL or ID",L8="Object ID/Link",O8="Card updated",F8="Card updation failed",t1=3,n1=(e,t)=>{var r,o,s,a,i,c,l,d,g,b,x,y,p;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((d=(l=e.validations)==null?void 0:l.range)==null?void 0:d.min)||Number.MIN_SAFE_INTEGER,max:((b=(g=e.validations)==null?void 0:g.range)==null?void 0:b.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((x=e.validations)==null?void 0:x.maxRows)||5,limit:(y=e.validations)==null?void 0:y.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(p=e.validations)==null?void 0:p.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},r1=Qi({name:"writeCapability",initialState:r0,reducers:{resetState:()=>r0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=ee.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ma.pending,t=>{t.objectListApiStatus=ee.LOADING}).addCase(ma.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:d}=n.payload;t.objectListApiStatus=ee.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=d}).addCase(ma.rejected,t=>{t.objectListApiStatus=ee.FAILED}).addCase(sr.pending,t=>{t.dropdownOptionsApis=ee.LOADING}).addCase(sr.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=ee.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(sr.rejected,t=>{t.dropdownOptionsApis=ee.FAILED}).addCase(ba.pending,t=>{t.createFormApiStatus=ee.LOADING}).addCase(ba.fulfilled,t=>{t.createFormApiStatus=ee.IDLE}).addCase(ba.rejected,t=>{t.createFormApiStatus=ee.FAILED}).addCase(va.pending,t=>{t.linkCardApiStatus=ee.LOADING}).addCase(va.fulfilled,t=>{t.linkCardApiStatus=ee.IDLE}).addCase(va.rejected,t=>{t.linkCardApiStatus=ee.FAILED}).addCase(Ca.pending,t=>{t.unlinkCardApiStatus=ee.LOADING}).addCase(Ca.fulfilled,t=>{t.unlinkCardApiStatus=ee.IDLE}).addCase(Ca.rejected,t=>{t.unlinkCardApiStatus=ee.FAILED}).addCase(ya.pending,t=>{t.updateFormApiStatus=ee.LOADING}).addCase(ya.fulfilled,t=>{t.updateFormApiStatus=ee.IDLE}).addCase(ya.rejected,t=>{t.updateFormApiStatus=ee.FAILED}).addCase(xa.pending,t=>{t.currentResourceDetailsApiStatus=ee.LOADING}).addCase(xa.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=ee.IDLE}).addCase(xa.rejected,t=>{t.currentResourceDetailsApiStatus=ee.FAILED})}}),ma=Wt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await d8({inboxIds:t,channelType:n,conversationId:r});if(!s||!s.data||!("formsList"in s.data)||!Array.isArray(s.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const a=s.data.formsList,i={},c=[],l=[],d=[],g=[],b=[],x={},y={};return a==null||a.forEach(p=>{var m,v;if(p.expandedView&&!o)return;const h={...p};"fieldList"in h&&delete h.fieldList,y[p.id]=h,i[p.id]||(i[p.id]={}),x[p.id]||(x[p.id]=[]),p.type==="create"&&p.authenticated?(c.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!l.includes(p.connectorName)&&l.push(p.connectorName)):p.type==="link"&&p.authenticated?d.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?g.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&b.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(m=p.fieldList)==null||m.sort((C,I)=>C.priority-I.priority),(v=p.fieldList)==null||v.forEach(C=>{const I=n1(C);if(I.columns&&(I.columns=I.columns.map(E=>n1(E,{loadOptionsOnFocus:!0,defaultOptions:!1}))),x[p.id]=[...x[p.id],I],C.interfaceDetails&&(C.interfaceDetails.args||C.interfaceDetails.optionalArgs)){const E={...C.interfaceDetails.args,...C.interfaceDetails.optionalArgs};Object.values(E).forEach(w=>{i[p.id][w]?i[p.id][w]=[...i[p.id][w],C.name]:i[p.id][w]=[C.name]})}})}),{createObjectList:c,createObjectConnectorNamesList:l,linkObjectList:d,editObjectList:g,searchObjectList:b,formFields:x,objectDict:y,dependentFieldsMap:i}}),ba=Wt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await Uf({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),Se({message:C8,type:Ut})}catch(l){const d=l,g=(c=d==null?void 0:d.response)==null?void 0:c.data,b=(g==null?void 0:g.message)??v8;return o==null||o(l),Se({message:b,type:qe}),t(l)}}),ya=Wt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await Uf({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),Se({message:O8,type:Ut})}catch(d){return o==null||o(d),Se({message:F8,type:qe}),t(d)}}),Ca=Wt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await f8(e,t,n,r)}),va=Wt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await p8(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),xa=Wt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await h8(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,d={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,b])=>{"label"in b&&(b.type&&b.type==="date"?d.values[g]=b.label?new Date(parseInt(b.label)).toISOString():"":b.type&&b.type==="multi-select"&&"value"in b&&"label"in b&&b.value&&b.label?d.values[g]=[{value:b.value,label:b.label}]:b.value?d.values[g]={value:b.value,label:b.label}:d.values[g]=b.label)}),{data:d,status:l}}catch(i){return Se({message:pn,type:qe}),t(i)}}),{resetState:TS,setCurrentCardInEdit:Br,resetCurrentResourceDetails:D8,setHasUnsavedChanges:o1}=r1.actions,k8=r1.reducer,N8=()=>{const[e,t]=_.useState(null),[n,r]=_.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=_.useCallback(s=>{t(s)},[]);return _.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=d=>{s||(s=window.setTimeout(()=>{const g=d.target,b=Number(e.dataset.prevScrollLeft)||0,x=Number(e.dataset.prevScrollTop)||0,y=g.scrollLeft,p=g.scrollTop,h=y-b,m=p-x,v=Math.abs(m)>Math.abs(h),C=Math.abs(h)>Math.abs(m);r({isVertical:v,isHorizontal:C,isScrolling:!0}),e.dataset.prevScrollLeft=String(y),e.dataset.prevScrollTop=String(p),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(g=>({...g,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},R8="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",M8=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=_.useContext(He),{userGroupId:i}=Qt()||{},[c,l]=N8(),{isScrolling:d,isVertical:g}=c,b=d&&g,x=_.useMemo(()=>(e==null?void 0:e[0].data.map(m=>m.label))||[],[e]),y=_.useMemo(()=>e.map(m=>{const v={cells:{},externalResourceId:m.externalResourceId};return m.data.forEach((C,I)=>{if(x[I]){let E=C.value?C.value:Ts;E&&C.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),v.cells[x[I]]={label:E,deepLink:C==null?void 0:C.deepLink}}}),v}),[e,x]),p=(m,v)=>u.jsx(p5,{align:"left",children:m.deepLink?u.jsx(f.Link,{target:"_blank",underline:"none",href:m.deepLink,children:m.label}):u.jsx(f.Typography,{variant:"body2",color:"gray.black",children:m.label})},`${v}_${m.label}`),h=m=>{!m||!n||(r(!1),s(Bu,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(Br({...n,externalResourceId:m})))};return u.jsxs(f.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[u.jsx(f.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),u.jsx(f.TableContainer,{ref:l,children:u.jsxs(f.Table,{stickyHeader:!0,children:[u.jsx(u5,{children:u.jsxs(f.TableRow,{children:[x.map(m=>u.jsx(d5,{sx:{whiteSpace:"nowrap"},children:u.jsx(f.Typography,{variant:"overline",color:"gray.gray3",children:m})},m)),u.jsx(g5,{})]})}),u.jsx(f.TableBody,{children:y.map((m,v)=>u.jsxs(f5,{children:[Object.values(m.cells).map((C,I)=>p(C,I)),u.jsx(h5,{children:!b&&m.externalResourceId&&u.jsx(f.Tooltip,{title:Yu,placement:"bottom",children:u.jsx(f.IconButton,{className:"row-edit",onClick:()=>h(m.externalResourceId),children:u.jsx("img",{src:R8})})})})]},`id_${v}`))})]})})]})},P8=e=>e.cardList.connectorCards,j8=e=>e.cardList.connectorsEnabled,B8=e=>e.cardList.connectorApiStatus,V8=e=>e.cardList.cardSpecificData,G8=e=>e.cardList.specificConnectorApiStatus,H8=e=>e.cardList.specificConnectorErrorCode,W8=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==ee.IDLE||!n?!1:Object.values(n).every(r=>r===ee.IDLE||r===ee.FAILED)},Z8="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",s1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,a1=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}},X8=(e,t)=>`${$u} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),z8=(e,t,n)=>{var l,d,g,b,x;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((d=a==null?void 0:a.flatDisplay)!=null&&d.data)?a.flatDisplay.data:!s&&((x=(b=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:b[0])!=null&&x.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&s1.test(c)?!0:!i1(e,t,n)&&!i.length},i1=(e,t,n)=>{var d,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=(d=o.data)==null?void 0:d.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===ee.FAILED,c=o.cardErrorMessage,l=c&&s1.test(c);return i||a||c&&!l};function Y8(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,d=t==null?void 0:t[l],g=(d==null?void 0:d.connectorNames)??[];for(const b of g)r[b]||(r[b]=[],o[b]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[b].push(c),o[b].cards_visible+=1,o[b].card_key.push(c.id),o[b].card_title.push(c.title),z8(c,t,n)&&(o[b].empty_cards+=1,s+=1),i1(c,t,n)&&(o[b].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 c1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:d,currentCard:g,cardId:b,isCardLevelError:x,fieldName:y,showErrorIcon:p}=e,h=_.useRef(null),m=_.useRef(null),{email:v,currentSmIds:C,conversationId:I,sendTrackingEvent:E,connectorFunctions:w}=_.useContext(He),T=me(H8),S=T==null?void 0:T[b],[L,N]=_.useState(!1),D=_.useMemo(()=>{if(n&&x){const{error_message:Y}=a1(n);return Y}return c?$u.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):Gu},[n,c,l,x]),k=_.useCallback(()=>{const Y=n||X8(S,l),{error_code:oe,error_message:$}=a1(Y);E==null||E(Nm,{sm_ids:C,frontend_req_params:{email:v,conversationId:I,externalResourceId:g==null?void 0:g.externalResourceId},card_title:d,connector_name:l!=null&&l.length?l:"",error_code:oe,error_message:$})},[n,S,E,C,v,I,d,l,g==null?void 0:g.externalResourceId]);_.useEffect(()=>{(n&&x||c&&S)&&k()},[k,S,c,n,x]),_.useEffect(()=>{const Y=r?m.current:h.current;if(Y){const oe=Y.scrollHeight>Y.clientHeight||Y.scrollWidth>Y.clientWidth;N(oe)}},[t,r]);const M=o==_i.NOT_FOUND;let B=M?Ts:t;a==="date"&&B&&!M&&(B=new Date(parseInt(B)).toLocaleDateString(navigator.language));const z=!!n||c,q=()=>{i?w==null||w.redirectToAdmin():window.open(m3,"_blank")},Q=()=>{E==null||E(Rm,{sm_ids:C,card_title:d,field_name:y})},X=Y=>{const oe=/<>(.*?)<>/g,$=Y.split(oe);return u.jsx(_.Fragment,{children:$.map((P,G)=>G%2===1?u.jsx(a5,{variant:"body2",onClick:q,children:P},G):P)})};return s?u.jsx(Tn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):z?u.jsxs(ld,{gap:"7px",children:[p?u.jsx(f.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:Z8,width:"18px",height:"18px"})}):null,u.jsx(ud,{variant:"body2",children:D?X(D):Gu})]}):u.jsx(f.Tooltip,{title:L?B:null,placement:"bottom",children:r?u.jsx(dd,{ref:m,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:Q,children:B||Ts}):u.jsx(c5,{ref:h,variant:"body2",children:B||Ts})})},l1="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",Vr=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>u.jsx(f.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:u.jsxs(f.Stack,{direction:"row",children:[r&&u.jsx(f.Box,{position:"absolute",right:10,top:10,children:u.jsx(f.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(f.IconButton,{onClick:()=>t(!1),children:u.jsx("img",{src:l1})})})}),n]})}),u1=e=>{var P,G,V;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===ee.IDLE,l=(o==null?void 0:o[t])===ee.LOADING,d=(o==null?void 0:o[t])===ee.FAILED,{cardType:g,data:b,cardErrorMessage:x,redirectToAdminTab:y,connectorNames:p}=(r==null?void 0:r[t])||{},h=g==="flat",[m,v]=_.useState(!1),[C,I]=_.useState(!1),[E,w]=_.useState(!1),[T,S]=_.useState(!1),L=((P=b==null?void 0:b.listItems)==null?void 0:P.statusCode)!==401,N=_.useMemo(()=>{var H,J,ne,se;return h&&((H=b==null?void 0:b.flatDisplay)!=null&&H.data)?b.flatDisplay.data:!h&&((se=(ne=(J=b==null?void 0:b.listItems)==null?void 0:J.fields)==null?void 0:ne[0])!=null&&se.data)?b.listItems.fields[0].data:[]},[h,b]),D=_.useMemo(()=>N==null?void 0:N.slice(0,5),[N]),[k,M]=_.useState([]),B=_.useRef(null),[z,q]=_.useState(0),Q=m?-180:0,X=h?!1:!!((G=b==null?void 0:b.listItems)!=null&&G.errorMessage),Y=X||d||x,oe=c&&!X&&s&&(E||C);_.useLayoutEffect(()=>{var H;(H=B.current)!=null&&H.scrollHeight&&q(B.current.scrollHeight+i)},[o==null?void 0:o[t],k,B]),_.useEffect(()=>{var se,j;const H=((N==null?void 0:N.length)||0)>5,J=!h&&(((j=(se=b==null?void 0:b.listItems)==null?void 0:se.fields)==null?void 0:j.length)||0)>1;w(H&&!J),I(J)},[b,h,N==null?void 0:N.length]),_.useEffect(()=>{M(m?N:D)},[b,m,D,N]);const $=()=>{E?v(H=>!H):S(H=>!H)};return u.jsxs(u.Fragment,{children:[u.jsx(Vr,{shown:T,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(M8,{data:((V=b==null?void 0:b.listItems)==null?void 0:V.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx(o5,{className:s?"":"slideUp",height:z,children:u.jsx(f.Stack,{ref:B,gap:1,margin:"12px",children:l&&!(k!=null&&k.length)?u.jsxs(u.Fragment,{children:[u.jsx(Tn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(Tn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:Y?u.jsx(f.Box,{margin:"8px 0",children:u.jsx(c1,{error:x,isLoading:l,redirectToAdminTab:y,isFailed:d,showErrorIcon:!L,connectorNames:p,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):k!=null&&k.length?k==null?void 0:k.map(H=>{const{value:J,label:ne,deepLink:se,type:j}=H,te="errorMessage"in H?H.errorMessage:null,Ce="statusCode"in H?H.statusCode:null;return u.jsxs("div",{children:[u.jsx(s5,{variant:"overline",children:ne}),u.jsx(c1,{value:J,error:te,deepLink:se,statusCode:Ce,isLoading:l,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:ne})]},ne)}):u.jsx(f.Box,{margin:"8px 0",children:u.jsx(ud,{children:s3})})})})}),!x&&oe&&u.jsx(b5,{variant:"body2_medium",onClick:$,children:E?u.jsxs(u.Fragment,{children:[m?U5:vd,u.jsx(m5,{src:Q5,transformAngle:Q})]}):vd})]})},J8={connectorCards:null,cardSpecificData:null,connectorApiStatus:ee.IDLE,conversationMetaDataApiStatus:ee.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},d1="/v1/api",q8=`${d1}/connectors/cards`,$8=`${d1}/connectors/cards/:id/data`,Q8=({inboxIds:e,conversationId:t,channelType:n="email"})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",n),r.append("conversation_id",String(t||"")),Ne({url:`${q8}?${r.toString()}`,method:Ve.GET})},U8=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),Ne({url:`${$8.replace(":id",e)}?${o.toString()}`,method:Ve.GET})},f1=Qi({name:"connectorCardLibrary",initialState:J8,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(Ea.pending,t=>{t.connectorApiStatus=ee.LOADING}).addCase(Ea.fulfilled,(t,n)=>{t.connectorApiStatus=ee.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(Ea.rejected,t=>{t.connectorApiStatus=ee.FAILED}).addCase(Bo.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.LOADING}}).addCase(Bo.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.IDLE}}).addCase(Bo.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Qu;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),Ea=Wt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var i;const r=await Q8({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((i=r==null?void 0:r.data)==null?void 0:i.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((c,l)=>(c==null?void 0:c.priority)-(l==null?void 0:l.priority)),connectorsEnabled:s}}),Bo=Wt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await U8(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&Se({message:n0,type:Ut}),{data:td(i),status:c}):(r&&Se({message:t0,type:qe}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Qu})}}),K8=f1.reducer,p1=f1.actions,h1="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",ev="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M11.4587%206.7528C11.2244%206.51848%2010.8445%206.51848%2010.6102%206.7528C10.3759%206.98711%2010.3759%207.36701%2010.6102%207.60132L11.4587%206.7528ZM12.1916%208.33414L12.6158%207.90988L12.1916%208.33414ZM8.33462%2012.1911L8.75888%2011.7668L8.33462%2012.1911ZM7.6018%2010.6097C7.36748%2010.3754%206.98758%2010.3754%206.75327%2010.6097C6.51895%2010.8441%206.51895%2011.224%206.75327%2011.4583L7.6018%2010.6097ZM4.43911%209.14411C4.67343%209.37842%205.05333%209.37842%205.28764%209.14411C5.52196%208.9098%205.52196%208.5299%205.28764%208.29558L4.43911%209.14411ZM3.70629%207.56276L4.13056%207.1385L3.70629%207.56276ZM7.56324%203.70582L7.9875%203.28155L7.56324%203.70582ZM8.29606%205.28716C8.53037%205.52148%208.91027%205.52148%209.14459%205.28716C9.3789%205.05285%209.3789%204.67295%209.14459%204.43864L8.29606%205.28716ZM10.6102%207.60132L11.7673%208.75841L12.6158%207.90988L11.4587%206.7528L10.6102%207.60132ZM11.7673%208.75841C12.1662%209.15735%2012.3904%209.69843%2012.3904%2010.2626L13.5904%2010.2626C13.5904%209.38017%2013.2398%208.53387%2012.6158%207.90988L11.7673%208.75841ZM12.3904%2010.2626C12.3904%2010.8268%2012.1662%2011.3679%2011.7673%2011.7668L12.6158%2012.6154C13.2398%2011.9914%2013.5904%2011.1451%2013.5904%2010.2626L12.3904%2010.2626ZM11.7673%2011.7668C10.9365%2012.5976%209.58963%2012.5976%208.75888%2011.7668L7.91035%2012.6154C9.20973%2013.9147%2011.3164%2013.9147%2012.6158%2012.6154L11.7673%2011.7668ZM8.75888%2011.7668L7.6018%2010.6097L6.75327%2011.4583L7.91035%2012.6154L8.75888%2011.7668ZM5.28764%208.29558L4.13056%207.1385L3.28203%207.98703L4.43911%209.14411L5.28764%208.29558ZM4.13056%207.1385C3.73162%206.73956%203.50749%206.19848%203.50749%205.63429L2.30749%205.63429C2.30749%206.51674%202.65804%207.36304%203.28203%207.98703L4.13056%207.1385ZM3.50749%205.63429C3.50749%205.0701%203.73162%204.52902%204.13056%204.13008L3.28203%203.28155C2.65804%203.90554%202.30749%204.75184%202.30749%205.63429L3.50749%205.63429ZM4.13056%204.13008C4.96131%203.29933%206.30822%203.29933%207.13897%204.13008L7.9875%203.28155C6.68812%201.98217%204.58141%201.98217%203.28203%203.28155L4.13056%204.13008ZM7.13897%204.13008L8.29606%205.28716L9.14459%204.43864L7.9875%203.28155L7.13897%204.13008Z'%20fill='%236C7B94'/%3e%3crect%20x='5.08887'%20y='6.0791'%20width='1.33333'%20height='6.66667'%20rx='0.666667'%20transform='rotate(-45%205.08887%206.0791)'%20fill='%236C7B94'/%3e%3cpath%20d='M5.59961%2014.3998V12.7998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M12.7998%205.59961H14.3998'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M2.40039%2011.2002H4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2002%202.40039V4.00039'%20stroke='%236C7B94'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",tv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_5908_39767)'%3e%3cpath%20d='M9.37333%206.01333L9.98667%206.62667L3.94667%2012.6667H3.33333V12.0533L9.37333%206.01333ZM11.7733%202C11.6067%202%2011.4333%202.06667%2011.3067%202.19333L10.0867%203.41333L12.5867%205.91333L13.8067%204.69333C14.0667%204.43333%2014.0667%204.01333%2013.8067%203.75333L12.2467%202.19333C12.1133%202.06%2011.9467%202%2011.7733%202ZM9.37333%204.12667L2%2011.5V14H4.5L11.8733%206.62667L9.37333%204.12667Z'%20fill='%236C7B94'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_5908_39767'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",g1=e=>e.write.createObjectList,nv=e=>e.write.createObjectConnectorNamesList,m1=e=>e.write.linkObjectList,rv=e=>e.write.editObjectList,ov=e=>e.write.objectDict,sv=e=>e.write.formFields,av=e=>e.write.linkCardApiStatus,iv=e=>e.write.unlinkCardApiStatus,cv=e=>e.write.dependentFieldsMap,lv=e=>e.write.createFormApiStatus,uv=e=>e.write.updateFormApiStatus,dv=e=>e.write.currentResourceDetails,fv=e=>e.write.currentResourceDetailsApiStatus,b1=e=>e.write.currentCardInEdit,y1=e=>e.write.hasUnsavedChanges,pv=e=>typeof e=="string"?/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(e):typeof e=="object"&&"_isValid"in e,C1=e=>Object.keys(e).sort((n,r)=>r.localeCompare(n)).reduce((n,r)=>{var o;return(typeof e[r]=="string"||typeof e[r]=="object"&&e[r]!==null)&&pv(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),hv=e=>d3.replace("{{connectorName}}",e),gv=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=Ht(),{sendTrackingEvent:c}=_.useContext(He),d=me(iv)===ee.LOADING,g=()=>{s&&o&&i(Ca({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(xm,{connector_name:a,conversation_id:s}),t(!1),r(),Se({message:Cb,type:Ut})}).catch(()=>{Se({message:vb,type:Ut})})};return u.jsx(Vr,{shown:e,setShown:t,showCloseButton:!0,children:u.jsxs(f.Stack,{width:"400px",padding:"20px",gap:"8px",children:[u.jsx(f.Typography,{variant:"h2",children:u3}),u.jsx(f.Typography,{variant:"body2",children:hv(a)}),u.jsxs(f.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[u.jsx(f.Button,{variant:"text",onClick:()=>t(!1),children:Ai}),u.jsx(f.Button,{disabled:d,color:"error",onClick:g,children:zu})]})]})})},mv=({actions:e,isHovered:t=!1})=>{const r=e.filter(i=>i.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),a=t?(s.length+1)*32:32;return u.jsxs(l5,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:d,action:g})=>u.jsx(f.Tooltip,{title:l,placement:"bottom",children:u.jsx(Tr,{onClick:g,disabled:c,children:u.jsx("img",{src:d})})},i))}),o&&u.jsx(f.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(Tr,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},bv=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=Ht(),{availableFeatures:c,sendTrackingEvent:l,conversationId:d,currentSmIds:g}=_.useContext(He),{userGroupId:b}=Qt()||{},[x,y]=_.useState(!!s),[p,h]=_.useState(!1),[m,v]=_.useState(!1),[C,I]=_.useState(!1),{id:E,title:w,externalResourceId:T="",forms:S=[],logoUrl:L}=t;let N=E;T&&(N=`${N}_${T}`);const{data:D,cardType:k,cardErrorMessage:M,connectorNames:B}=(n==null?void 0:n[N])??{},z=(B==null?void 0:B[0])||"",q=(o==null?void 0:o[N])===ee.LOADING,Q=(o==null?void 0:o[N])===ee.FAILED,X=!!(at(c,Vu)&&T),Y=_.useMemo(()=>{var j,te;if(M||Q||!(at(c,Qm)&&S.some(Ce=>Ce.type==="edit")))return!1;switch(k){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((j=D==null?void 0:D.listItems)==null?void 0:j.fields.length)===1?(te=D==null?void 0:D.listItems)==null?void 0:te.fields.some(Ce=>Ce.externalResourceId):!1;default:return!1}},[D,k,c,S,t,M,Q]),oe=_.useCallback((j=!1)=>{const te=j?Sm:_m;r&&E&&d&&i(Bo({id:E,email:r,conversationId:d,externalResourceId:T})).unwrap().then(Ce=>{const Z={...ed(Ce,w,j,!0),sm_ids:g};l(te,Z)}).catch(Ce=>{const Z={...ed(Ce,w,j,!1),sm_ids:g};l(te,Z)})},[i,r,E,w,l,d,T,g]);_.useEffect(()=>{x&&oe(!0)},[x,oe]);const $=(j,te)=>{var Z;j==null||j.stopPropagation(),i(Bo({id:te,email:r,conversationId:d,isRefresh:!0,externalResourceId:T})).unwrap().then(()=>{l(dm,{id:te})});const Ce=j.target.tagName==="BUTTON"?(Z=j.target)==null?void 0:Z.firstChild:j.target;Ce.className&&(Ce.className=""),setTimeout(()=>Ce.className="selected",1)},P=(j,te)=>{j.stopPropagation(),!(n!=null&&n[te])&&!q&&oe(),l(x?um:lm,{id:te}),y(Ce=>!Ce)},G=j=>{j.stopPropagation();const te=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;h(!!te)},V=j=>{var Ce,Z;j.stopPropagation(),l(Bu,{card_title:w,connector_name:z,ug_id:b,sm_ids:g});let te;k==="flat"?te=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:k==="flat_with_list"&&(te=(Z=(Ce=D==null?void 0:D.listItems)==null?void 0:Ce.fields[0])==null?void 0:Z.externalResourceId),te?i(Br({...t,externalResourceId:te})):Se({message:pn,type:qe})},H=j=>{j.stopPropagation(),v(!0)},J=()=>{I(!0)},ne=()=>{I(!1)},se=[{id:"unlink",label:zu,disabled:q,shown:X,iconSrc:ev,action:j=>H(j)},{id:"refresh",label:Hu,disabled:q,shown:!0,iconSrc:h1,action:j=>$(j,E)},{id:"edit",label:Yu,disabled:q,shown:Y,iconSrc:tv,action:j=>V(j)}];return u.jsxs(e5,{"data-testid":`test_${E}`,onMouseEnter:J,onMouseLeave:ne,children:[u.jsxs(t5,{className:x?"hiver-card-expanded":"",onClick:j=>P(j,N),children:[u.jsxs(n5,{children:[L&&u.jsx("img",{src:L,alt:w}),u.jsx(f.Tooltip,{title:p?w:"",placement:"bottom",children:u.jsx(r5,{variant:"h4",onMouseOver:j=>G(j),onMouseLeave:j=>G(j),children:w})})]}),u.jsxs(ld,{children:[u.jsx(mv,{actions:se,isHovered:C}),u.jsx(f.Tooltip,{title:x?Wu:Si,placement:"bottom",children:u.jsx(Tr,{onClick:j=>P(j,N),children:u.jsx(Di,{className:x?"":"hiver-up"})})})]})]}),u.jsx(u1,{id:N,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:x}),u.jsx(gv,{showUnlinkModal:m,setShowUnlinkModal:v,cardId:E,onCardUnlinking:a,conversationId:d,externalResourceId:T,connectorName:z})]})},yv=Number.MAX_SAFE_INTEGER,Cv=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=_.useContext(He),i=at(s,Km)?yv:1;return u.jsx(f.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:d,externalResourceId:g}=c;let b=d;return g&&(b=`${b}_${g}`),u.jsx("div",{children:u.jsx(bv,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},b)})})},Gr=({children:e})=>{if(!Array.isArray(e))return e;let t=null;return e.find(r=>typeof(r==null?void 0:r.type)!="function"?!1:(r.props.fallback&&(t=r),r.props.condition))??t};function Hr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}Gr.CaseView=Hr;const vv="Bring your favourite tools into Hiver",xv="Plugin image",Ev="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",Iv="Enable Connectors",wv="Enable Apps",_v="Learn more",Sv="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",Tv="Contact your admin to enable this",Av="https://youtu.be/ODcJnzZLb50",Lv="connectors-module/assets/connectors-images/connector-mainpage.png",Ov="connectors-module/assets/connectors-images/connector-mainpage-apps.png",Fv="Explore connectors",Dv="Connectors",kv=f.styled(f.Box)`
|
|
1039
|
+
`,W7=e=>A.createElement("svg",{width:35,height:35,viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("rect",{x:9,y:9,width:15,height:17,fill:"white"}),A.createElement("g",{clipPath:"url(#clip0_7787_114457)"},A.createElement("path",{d:"M17.1981 2.86633C9.28704 2.86633 2.86646 9.28691 2.86646 17.198C2.86646 25.1091 9.28704 31.5296 17.1981 31.5296C25.1092 31.5296 31.5298 25.1091 31.5298 17.198C31.5298 9.28691 25.1092 2.86633 17.1981 2.86633ZM14.3318 23.6472V10.7487L22.9308 17.198L14.3318 23.6472Z",fill:"#4D596C"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_7787_114457"},A.createElement("rect",{width:34.396,height:34.396,fill:"white"})))),Z7=({aspectRatio:e="auto",...t})=>{const[n,r]=_.useState(!1);return n?null:u.jsxs(H7,{aspectRatio:e,children:[u.jsx("img",{className:"preview-img",onError:()=>r(!0),...t}),u.jsx(W7,{className:"play-icon"})]})},Jf=f.styled(({className:e,...t})=>u.jsx(f.Tooltip,{...t,classes:{popper:e}}))(({tooltipStyle:e,arrowStyle:t})=>({[`& .${f.tooltipClasses.arrow}`]:{...t},[`& .${f.tooltipClasses.tooltip}`]:{...e}})),Lc=(e,t,n)=>{let r=`${t}_${n}`;return Object.keys(e).forEach(o=>{r=`${r}_${o}:${e[o]}`}),r},X7=(e,t)=>t?Object.values(t).filter(r=>e.values[r]&&!e.errors[r]):[],Po=(e,t)=>t?Object.keys(t).reduce((r,o)=>{let s="";const a=t[o];return e.values&&e.values[a]&&typeof e.values[a]=="object"&&"value"in e.values[a]?s=e.values[a].value:e.values&&e.values[a]&&typeof e.values[a]!="object"?s=e.values[a]:s=null,{...r,[o]:s}},{}):{},Oc=({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=Qb(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=Ub(l);return}if(n.type==="number"&&((a=n.validations)!=null&&a.range)){t[n.name].validate=Kb();return}if(n.type==="text"&&n.limit){t[n.name].validate=Ki();return}if(n.type==="table"){const l=Oc({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=qb(l)}else if((c=n.validations)!=null&&c.isEmail){const l=typeof n.validations.isEmail=="object"?n.validations.isEmail.msg:"";t[n.name].validate=$b(l)}}),t},pa={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[fa.ROW_ID]):!1,isSelect:e=>!!e&&typeof e=="object"&&"label"in e,isDate:e=>!!e&&typeof e=="object"&&"toISOString"in e},ha=(e,t)=>Object.keys(t).reduce((n,r)=>{const o=e.values[t[r]];let s;return pa.isMultiSelect(o)?s=o.map(a=>a.value):pa.isTable(o)?s=o.map(({...i})=>(delete i[fa.ROW_ID],i)).filter(i=>Object.keys(i).length>0):pa.isSelect(o)?s=o.value:pa.isDate(o)?s=o.toISOString():s=o||"",n[r]=s,n},{}),z7=(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]}))},qf=(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=qf(r.columns,a);s+=i}s>0&&n++;continue}o===""||o===void 0||o===null||n++}return n},sr="/v1/api",Y7=`${sr}/connectors/conversation/:conversationId/metadata`,J7=`${sr}/connectors/forms/:formId/field/:fieldName/data`,q7=`${sr}/connectors/form/:formId`,$7=`${sr}/connectors/forms/:id/link`,Q7=`${sr}/connectors/forms/:id/preview`,U7=`${sr}/connectors/conversation/:conversationId/selected-email`,K7=`${sr}/connectors/app-cf-values`,e8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ke({url:bt(`${J7}?${r.toString()}`,e),method:Be.POST,data:t})},t8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ke({url:bt(`${q7}?${r.toString()}`,e),method:Be.POST,data:t})},n8=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ke({url:`${Q7.replace(":id",e)}?${r.toString()}`,method:Be.POST,data:{args:t}})},r8="https://avatars.githubusercontent.com/u/62397590",$f={optionsMap:null,createOptionApi:ee.IDLE,dropdownOptionsApis:ee.IDLE,previewCardData:null,previewCardApiStatus:ee.IDLE,selectedSuggestionType:"basic"},Qf=Qi({name:"commonSlice",initialState:$f,reducers:{resetState:()=>$f,resetPreviewCardData:e=>{e.previewCardData=null,e.previewCardApiStatus=ee.IDLE},setSelectedSuggestionType:(e,t)=>{e.selectedSuggestionType=t.payload}},extraReducers:e=>{e.addCase(ga.pending,t=>{t.createOptionApi=ee.LOADING}).addCase(ga.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,key:s}=n.payload;t.createOptionApi=ee.IDLE,t.optionsMap={...r,[s]:{...r[s],options:o}}}).addCase(ga.rejected,t=>{t.createOptionApi=ee.FAILED}).addCase(ar.pending,t=>{t.dropdownOptionsApis=ee.LOADING}).addCase(ar.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,searchTerm:i,key:c}=n.payload;t.dropdownOptionsApis=ee.IDLE,t.optionsMap={...r,[c]:{options:o,hasMore:s,currentPage:a,searchTerm:i}}}).addCase(ar.rejected,t=>{t.dropdownOptionsApis=ee.FAILED}).addCase(jr.pending,t=>{t.previewCardApiStatus=ee.LOADING}).addCase(jr.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.previewCardData=r),t.previewCardApiStatus=ee.IDLE}).addCase(jr.rejected,t=>{t.previewCardApiStatus=ee.FAILED})}}),ga=Wt("commonSlice/createDropDownOption",async(e,{getState:t,rejectWithValue:n})=>{var p,h,m;const{fieldName:r,label:o,formId:s,interfaceId:a,conversationId:i=null,args:c={},createArgs:l={},callback:d}=e,g=Lc(c||{},s,r),{common:b}=t(),{options:x=[],...y}=((p=b.optionsMap)==null?void 0:p[g])||{};try{const v=await t8({fieldName:r,formId:a},{args:l,conversation_id:i});if(!v||!("data"in v)||!("output_variables"in v.data)||!("external_resource_id"in v.data.output_variables))throw v;const C=v.data.output_variables,{external_resource_id:I,...E}=C,T=[{label:o,value:I,prefillValues:E},...x],S=u0(T,L=>L.value);return d==null||d(S),{optionsList:S,key:g,...y}}catch(v){d==null||d(x);const C=v,I=(h=C==null?void 0:C.response)==null?void 0:h.data,E=typeof I=="string"?I:(I==null?void 0:I.message)||pn;return Se({message:E,type:qe}),n((m=C==null?void 0:C.response)==null?void 0:m.status)}}),ar=Wt("commonSlice/fetchDropDownOptions",async(e,{getState:t,rejectWithValue:n})=>{var T,S,L;const{fieldName:r,formId:o,searchTerm:s,fieldConfig:a,callback:i,args:c={},interfaceId:l="",pagination:d={enabled:!1},controller:g}=e,b=Lc(c||{},o,r),{common:x}=t();let y=!1;a.meta&&"showAvatar"in a.meta&&typeof a.meta.showAvatar=="boolean"&&(y=a.meta.showAvatar);const p=((T=x.optionsMap)==null?void 0:T[b])||{},h=!e.isScrollToBottomEvent&&(!p||s!==p.searchTerm),m=h?[]:p.options||[],v=h?!0:p.hasMore??!0,C=h?0:p.currentPage??0,{enabled:I,limit:E}=d,w=E||10;try{let N;const D=g==null?void 0:g.signal,k=I?{pageNumber:C+1,searchTerm:s,limit:w,enabled:I}:null;if(v&&(N=await e8({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:X}=t(),Y=(S=X.optionsMap)==null?void 0:S[b];return i==null||i(Y.options??[]),{...Y,optionsList:Y.options??[],key:b,hasMore:!1}}const B=N.data.data.map(X=>y?{...X,avatarUrl:X.avatarUrl||r8}:(delete X.avatarUrl,X)),z=[...m,...B],q=I?B.length>=w:!1,Q=u0(z,X=>X.value);return i==null||i(Q),{optionsList:Q,fieldName:r,formId:o,searchTerm:s,currentPage:C+1,hasMore:q,key:b}}catch(N){const{common:D}=t(),k=((L=D.optionsMap)==null?void 0:L[b])||{};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=Lc(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 d=(l==null?void 0:l.options)||[];return d&&d.length?(s==null||s(d),!1):!0}}),jr=Wt("commonSlice/previewCard",async({id:e,args:t,channelType:n,isRefresh:r},{rejectWithValue:o})=>{var s;try{const a=await n8(e,t,n),i=a==null?void 0:a.data;return i?(r&&Se({message:n0,type:Ut}),{data:td(i)}):(r&&Se({message:t0,type:qe}),{data:null})}catch(a){return o({status:(s=a.response)==null?void 0:s.status})}}),{resetState:AS,resetPreviewCardData:o8,setSelectedSuggestionType:s8}=Qf.actions,a8=Qf.reducer,jo="/v1/api",i8=`${jo}/connectors/forms/list`,c8=`${jo}/connectors/cards/:id/unlink`,l8=`${jo}/connectors/forms/:id/link`,u8=`${jo}/connectors/form/:formId`,d8=`${jo}/connectors/forms/:formId/data`,f8=({inboxIds:e,channelType:t,conversationId:n})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",t),r.append("conversation_id",String(n)),ke({url:`${i8}?${r.toString()}`,method:Be.GET})},Uf=(e,t,n="email")=>{const r=new URLSearchParams;return r.append("channel_type",n),ke({url:bt(`${u8}?${r.toString()}`,e),method:Be.POST,data:t})},p8=(e,t="email",n,r)=>{const o=new URLSearchParams;return o.append("channel_type",t),ke({url:`${c8.replace(":id",e)}?${o.toString()}`,method:Be.POST,data:{externalResourceId:n,conversationId:r}})},h8=(e,t,n="email",r,o)=>{const s=new URLSearchParams;return s.append("channel_type",n),o&&s.append("senderEmail",o),ke({url:`${l8.replace(":id",e)}?${s.toString()}`,method:Be.POST,data:{externalResourceId:t,conversationId:r}})},g8=(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),ke({url:`${d8.replace(":formId",e)}?${s.toString()}`,method:Be.GET})},m8="Error in previewing the card",Kf="Link format isn't recognized. Please check that you've entered a valid URL",b8="Item already linked",y8="Card linked successfully",C8="Error in linking the card",v8="New card created",x8="Card creation failed",E8="Create and link objects from different apps to this conversation",I8="Are you sure you want to change the primary object?",w8="Changing the primary object will reset all the information you’ve entered and all data will be lost and can’t be recovered.",_8="Are you sure you want to leave?",S8=`If you go back now, all the information you’ve entered will be lost and can’t be recovered.
|
|
1040
|
+
Do you want to continue?`,T8="Select an object to create",A8="Select an object to link",e1="Select object",L8="Paste URL or ID",O8="Object ID/Link",F8="Card updated",D8="Card updation failed",t1=3,n1=(e,t)=>{var r,o,s,a,i,c,l,d,g,b,x,y,p;let n={};switch(e.type){case"select":case"multi-select":{n={...e,defaultOptions:!!e.interfaceDetails,isInfiniteScrollable:((o=(r=e.interfaceDetails)==null?void 0:r.pagination)==null?void 0:o.enabled)||!1,loadOptionsOnFocus:Object.keys(((s=e.interfaceDetails)==null?void 0:s.args)||{}).length>0,isMultiSelect:e.type==="multi-select",type:e.interfaceDetails?"async-select":"select",isClearable:((a=e.meta)==null?void 0:a.isClearable)??!0};break}case"date":{n={...e,type:"date",disablePast:!!((i=e.validations)!=null&&i.disablePast)||!1,disableFuture:!!((c=e.validations)!=null&&c.disableFuture)||!1};break}case"number":{n={...e,type:"number",min:((d=(l=e.validations)==null?void 0:l.range)==null?void 0:d.min)||Number.MIN_SAFE_INTEGER,max:((b=(g=e.validations)==null?void 0:g.range)==null?void 0:b.max)||Number.MAX_SAFE_INTEGER};break}case"multiline":{n={...e,type:"text",maxRows:((x=e.validations)==null?void 0:x.maxRows)||5,limit:(y=e.validations)==null?void 0:y.maxCharacters,rows:5,multiline:!0};break}case"text":{n={...e,type:"text",limit:(p=e.validations)==null?void 0:p.maxCharacters};break}default:n={...e}}return"value"in n&&(n.defaultValue=n.value,delete n.value),{...n,...t}},r1=Qi({name:"writeCapability",initialState:r0,reducers:{resetState:()=>r0,resetCurrentResourceDetails:e=>{e.currentResourceDetails=null,e.currentResourceDetailsApiStatus=ee.IDLE},setCurrentCardInEdit:(e,t)=>{e.currentCardInEdit=t.payload},setHasUnsavedChanges:(e,t)=>{e.hasUnsavedChanges=t.payload}},extraReducers:e=>{e.addCase(ma.pending,t=>{t.objectListApiStatus=ee.LOADING}).addCase(ma.fulfilled,(t,n)=>{const{createObjectList:r,createObjectConnectorNamesList:o,linkObjectList:s,editObjectList:a,searchObjectList:i,formFields:c,objectDict:l,dependentFieldsMap:d}=n.payload;t.objectListApiStatus=ee.IDLE,t.createObjectList=r,t.createObjectConnectorNamesList=o,t.linkObjectList=s,t.editObjectList=a,t.searchObjectList=i,t.formFields=c,t.objectDict=l,t.dependentFieldsMap=d}).addCase(ma.rejected,t=>{t.objectListApiStatus=ee.FAILED}).addCase(ar.pending,t=>{t.dropdownOptionsApis=ee.LOADING}).addCase(ar.fulfilled,(t,n)=>{const r=t.optionsMap||{},{optionsList:o,hasMore:s,currentPage:a,key:i}=n.payload;t.dropdownOptionsApis=ee.IDLE,t.optionsMap={...r,[i]:{options:o,hasMore:s,currentPage:a}}}).addCase(ar.rejected,t=>{t.dropdownOptionsApis=ee.FAILED}).addCase(ba.pending,t=>{t.createFormApiStatus=ee.LOADING}).addCase(ba.fulfilled,t=>{t.createFormApiStatus=ee.IDLE}).addCase(ba.rejected,t=>{t.createFormApiStatus=ee.FAILED}).addCase(va.pending,t=>{t.linkCardApiStatus=ee.LOADING}).addCase(va.fulfilled,t=>{t.linkCardApiStatus=ee.IDLE}).addCase(va.rejected,t=>{t.linkCardApiStatus=ee.FAILED}).addCase(Ca.pending,t=>{t.unlinkCardApiStatus=ee.LOADING}).addCase(Ca.fulfilled,t=>{t.unlinkCardApiStatus=ee.IDLE}).addCase(Ca.rejected,t=>{t.unlinkCardApiStatus=ee.FAILED}).addCase(ya.pending,t=>{t.updateFormApiStatus=ee.LOADING}).addCase(ya.fulfilled,t=>{t.updateFormApiStatus=ee.IDLE}).addCase(ya.rejected,t=>{t.updateFormApiStatus=ee.FAILED}).addCase(xa.pending,t=>{t.currentResourceDetailsApiStatus=ee.LOADING}).addCase(xa.fulfilled,(t,n)=>{const{data:r}=n.payload;r&&(t.currentResourceDetails=r),t.currentResourceDetailsApiStatus=ee.IDLE}).addCase(xa.rejected,t=>{t.currentResourceDetailsApiStatus=ee.FAILED})}}),ma=Wt("writeCapability/fetchObjectList",async e=>{const{inboxIds:t,channelType:n,conversationId:r,isExpandedFormEnabled:o}=e,s=await f8({inboxIds:t,channelType:n,conversationId:r});if(!s||!s.data||!("formsList"in s.data)||!Array.isArray(s.data.formsList))return{createObjectList:[],createObjectConnectorNamesList:[],linkObjectList:[],editObjectList:[],searchObjectList:[],formFields:null,objectDict:null,dependentFieldsMap:{}};const a=s.data.formsList,i={},c=[],l=[],d=[],g=[],b=[],x={},y={};return a==null||a.forEach(p=>{var m,v;if(p.expandedView&&!o)return;const h={...p};"fieldList"in h&&delete h.fieldList,y[p.id]=h,i[p.id]||(i[p.id]={}),x[p.id]||(x[p.id]=[]),p.type==="create"&&p.authenticated?(c.push({value:p.id,label:p.name,avatarUrl:p.logoUrl,connectorKey:p.connectorName}),p.connectorName&&!l.includes(p.connectorName)&&l.push(p.connectorName)):p.type==="link"&&p.authenticated?d.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="edit"&&p.authenticated?g.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}):p.type==="search_and_link"&&p.authenticated&&b.push({value:p.id,label:p.name,avatarUrl:p.logoUrl}),(m=p.fieldList)==null||m.sort((C,I)=>C.priority-I.priority),(v=p.fieldList)==null||v.forEach(C=>{const I=n1(C);if(I.columns&&(I.columns=I.columns.map(E=>n1(E,{loadOptionsOnFocus:!0,defaultOptions:!1}))),x[p.id]=[...x[p.id],I],C.interfaceDetails&&(C.interfaceDetails.args||C.interfaceDetails.optionalArgs)){const E={...C.interfaceDetails.args,...C.interfaceDetails.optionalArgs};Object.values(E).forEach(w=>{i[p.id][w]?i[p.id][w]=[...i[p.id][w],C.name]:i[p.id][w]=[C.name]})}})}),{createObjectList:c,createObjectConnectorNamesList:l,linkObjectList:d,editObjectList:g,searchObjectList:b,formFields:x,objectDict:y,dependentFieldsMap:i}}),ba=Wt("writeCapability/createForm",async(e,{rejectWithValue:t})=>{var c;const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i}=e;try{await Uf({formId:n},{args:s,interfaceId:a,conversationId:i}),r==null||r(),Se({message:v8,type:Ut})}catch(l){const d=l,g=(c=d==null?void 0:d.response)==null?void 0:c.data,b=(g==null?void 0:g.message)??x8;return o==null||o(l),Se({message:b,type:qe}),t(l)}}),ya=Wt("writeCapability/updateForm",async(e,{rejectWithValue:t})=>{const{formId:n,successCallback:r,failureCallback:o,args:s={},interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l={}}=e;try{await Uf({formId:n},{args:s,interfaceId:a,conversationId:i,externalResourceId:c,previousArgs:l}),r==null||r(),Se({message:F8,type:Ut})}catch(d){return o==null||o(d),Se({message:D8,type:qe}),t(d)}}),Ca=Wt("writeCapability/unlinkCard",async({id:e,channelType:t,externalResourceId:n,conversationId:r})=>{await p8(e,t,n,r)}),va=Wt("writeCapability/linkCard",async({id:e,externalResourceId:t,channelType:n,conversationId:r,email:o},{rejectWithValue:s})=>{var a;try{await h8(e,t,n,r,o)}catch(i){return s({status:(a=i.response)==null?void 0:a.status})}}),xa=Wt("connectorCardLibrary/fetchCurrentResourceDetails",async(e,{rejectWithValue:t})=>{const{id:n,channelType:r,conversationId:o,externalResourceId:s,contactEmail:a}=e;try{const i=await g8(n,r,o,s,a),c=i==null?void 0:i.data,l=i==null?void 0:i.status,d={values:{},errors:{}};return Object.entries(c.formData).forEach(([g,b])=>{"label"in b&&(b.type&&b.type==="date"?d.values[g]=b.label?new Date(parseInt(b.label)).toISOString():"":b.type&&b.type==="multi-select"&&"value"in b&&"label"in b&&b.value&&b.label?d.values[g]=[{value:b.value,label:b.label}]:b.value?d.values[g]={value:b.value,label:b.label}:d.values[g]=b.label)}),{data:d,status:l}}catch(i){return Se({message:pn,type:qe}),t(i)}}),{resetState:LS,setCurrentCardInEdit:Br,resetCurrentResourceDetails:k8,setHasUnsavedChanges:o1}=r1.actions,N8=r1.reducer,R8=()=>{const[e,t]=_.useState(null),[n,r]=_.useState({isVertical:!1,isHorizontal:!1,isScrolling:!1}),o=_.useCallback(s=>{t(s)},[]);return _.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=d=>{s||(s=window.setTimeout(()=>{const g=d.target,b=Number(e.dataset.prevScrollLeft)||0,x=Number(e.dataset.prevScrollTop)||0,y=g.scrollLeft,p=g.scrollTop,h=y-b,m=p-x,v=Math.abs(m)>Math.abs(h),C=Math.abs(h)>Math.abs(m);r({isVertical:v,isHorizontal:C,isScrolling:!0}),e.dataset.prevScrollLeft=String(y),e.dataset.prevScrollTop=String(p),s=null},a),i&&window.clearTimeout(i),i=window.setTimeout(()=>{r(g=>({...g,isScrolling:!1})),i=null},c))};return e.addEventListener("scroll",l),()=>{e.removeEventListener("scroll",l),s&&window.clearTimeout(s),i&&window.clearTimeout(i)}},[e]),[n,o]},M8="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",P8=({data:e,title:t,currentCard:n,setShowModal:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=_.useContext(He),{userGroupId:i}=Qt()||{},[c,l]=R8(),{isScrolling:d,isVertical:g}=c,b=d&&g,x=_.useMemo(()=>(e==null?void 0:e[0].data.map(m=>m.label))||[],[e]),y=_.useMemo(()=>e.map(m=>{const v={cells:{},externalResourceId:m.externalResourceId};return m.data.forEach((C,I)=>{if(x[I]){let E=C.value?C.value:Ts;E&&C.type==="date"&&(E=new Date(parseInt(E)).toLocaleDateString(navigator.language)),v.cells[x[I]]={label:E,deepLink:C==null?void 0:C.deepLink}}}),v}),[e,x]),p=(m,v)=>u.jsx(p5,{align:"left",children:m.deepLink?u.jsx(f.Link,{target:"_blank",underline:"none",href:m.deepLink,children:m.label}):u.jsx(f.Typography,{variant:"body2",color:"gray.black",children:m.label})},`${v}_${m.label}`),h=m=>{!m||!n||(r(!1),s(Bu,{card_title:n.title,connector_name:n.connectorName,ug_id:i,sm_ids:a}),o(Br({...n,externalResourceId:m})))};return u.jsxs(f.Stack,{maxHeight:"340px",maxWidth:"700px",padding:"32px 0px 32px 32px",overflow:"auto",children:[u.jsx(f.Typography,{variant:"h2",color:"gray.black",marginBottom:"16px",children:t}),u.jsx(f.TableContainer,{ref:l,children:u.jsxs(f.Table,{stickyHeader:!0,children:[u.jsx(u5,{children:u.jsxs(f.TableRow,{children:[x.map(m=>u.jsx(d5,{sx:{whiteSpace:"nowrap"},children:u.jsx(f.Typography,{variant:"overline",color:"gray.gray3",children:m})},m)),u.jsx(g5,{})]})}),u.jsx(f.TableBody,{children:y.map((m,v)=>u.jsxs(f5,{children:[Object.values(m.cells).map((C,I)=>p(C,I)),u.jsx(h5,{children:!b&&m.externalResourceId&&u.jsx(f.Tooltip,{title:Yu,placement:"bottom",children:u.jsx(f.IconButton,{className:"row-edit",onClick:()=>h(m.externalResourceId),children:u.jsx("img",{src:M8})})})})]},`id_${v}`))})]})})]})},j8=e=>e.cardList.connectorCards,B8=e=>e.cardList.connectorsEnabled,V8=e=>e.cardList.connectorApiStatus,G8=e=>e.cardList.cardSpecificData,H8=e=>e.cardList.specificConnectorApiStatus,W8=e=>e.cardList.specificConnectorErrorCode,Z8=e=>{const{connectorApiStatus:t,specificConnectorApiStatus:n}=e.cardList;return t!==ee.IDLE||!n?!1:Object.values(n).every(r=>r===ee.IDLE||r===ee.FAILED)},X8="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",s1=/^No\s.+\sfound\sfor\s(email|Email)\s.+@.+\..+$/,a1=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}},z8=(e,t)=>`${$u} (Error code: ${e})`.replace(/{{connector_name}}/g,(t==null?void 0:t[0])||""),Y8=(e,t,n)=>{var l,d,g,b,x;const r=e.externalResourceId?`${e.id}_${e.externalResourceId}`:e.id,o=t==null?void 0:t[r];if(!o)return!0;const s=o.cardType==="flat",a=(l=t==null?void 0:t[r])==null?void 0:l.data,i=s&&((d=a==null?void 0:a.flatDisplay)!=null&&d.data)?a.flatDisplay.data:!s&&((x=(b=(g=a==null?void 0:a.listItems)==null?void 0:g.fields)==null?void 0:b[0])!=null&&x.data)?a.listItems.fields[0].data:[],c=o.cardErrorMessage;return c&&s1.test(c)?!0:!i1(e,t,n)&&!i.length},i1=(e,t,n)=>{var d,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=(d=o.data)==null?void 0:d.listItems)==null?void 0:g.errorMessage,i=(n==null?void 0:n[r])===ee.FAILED,c=o.cardErrorMessage,l=c&&s1.test(c);return i||a||c&&!l};function J8(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,d=t==null?void 0:t[l],g=(d==null?void 0:d.connectorNames)??[];for(const b of g)r[b]||(r[b]=[],o[b]={cards_visible:0,empty_cards:0,cards_with_error:0,card_key:[],card_title:[]}),r[b].push(c),o[b].cards_visible+=1,o[b].card_key.push(c.id),o[b].card_title.push(c.title),Y8(c,t,n)&&(o[b].empty_cards+=1,s+=1),i1(c,t,n)&&(o[b].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 c1=e=>{const{value:t,error:n,deepLink:r,statusCode:o,isLoading:s,type:a,redirectToAdminTab:i,isFailed:c,connectorNames:l,cardTitle:d,currentCard:g,cardId:b,isCardLevelError:x,fieldName:y,showErrorIcon:p}=e,h=_.useRef(null),m=_.useRef(null),{email:v,currentSmIds:C,conversationId:I,sendTrackingEvent:E,connectorFunctions:w}=_.useContext(He),T=me(W8),S=T==null?void 0:T[b],[L,N]=_.useState(!1),D=_.useMemo(()=>{if(n&&x){const{error_message:Y}=a1(n);return Y}return c?$u.replace(/{{connector_name}}/g,(l==null?void 0:l[0])||""):Gu},[n,c,l,x]),k=_.useCallback(()=>{const Y=n||z8(S,l),{error_code:oe,error_message:$}=a1(Y);E==null||E(Nm,{sm_ids:C,frontend_req_params:{email:v,conversationId:I,externalResourceId:g==null?void 0:g.externalResourceId},card_title:d,connector_name:l!=null&&l.length?l:"",error_code:oe,error_message:$})},[n,S,E,C,v,I,d,l,g==null?void 0:g.externalResourceId]);_.useEffect(()=>{(n&&x||c&&S)&&k()},[k,S,c,n,x]),_.useEffect(()=>{const Y=r?m.current:h.current;if(Y){const oe=Y.scrollHeight>Y.clientHeight||Y.scrollWidth>Y.clientWidth;N(oe)}},[t,r]);const M=o==_i.NOT_FOUND;let B=M?Ts:t;a==="date"&&B&&!M&&(B=new Date(parseInt(B)).toLocaleDateString(navigator.language));const z=!!n||c,q=()=>{i?w==null||w.redirectToAdmin():window.open(m3,"_blank")},Q=()=>{E==null||E(Rm,{sm_ids:C,card_title:d,field_name:y})},X=Y=>{const oe=/<>(.*?)<>/g,$=Y.split(oe);return u.jsx(_.Fragment,{children:$.map((P,G)=>G%2===1?u.jsx(a5,{variant:"body2",onClick:q,children:P},G):P)})};return s?u.jsx(Tn,{variant:"rounded",width:"100%",height:16,animation:"wave",margin:"4px 0 0 0"}):z?u.jsxs(ld,{gap:"7px",children:[p?u.jsx(f.Stack,{marginTop:"3px",flexShrink:"0",children:u.jsx("img",{src:X8,width:"18px",height:"18px"})}):null,u.jsx(ud,{variant:"body2",children:D?X(D):Gu})]}):u.jsx(f.Tooltip,{title:L?B:null,placement:"bottom",children:r?u.jsx(dd,{ref:m,target:"_blank",underline:"none",href:r,fontSize:"13px",onClick:Q,children:B||Ts}):u.jsx(c5,{ref:h,variant:"body2",children:B||Ts})})},l1="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",Vr=({shown:e,setShown:t,children:n,showCloseButton:r=!1,borderRadius:o=4,sx:s})=>u.jsx(f.Dialog,{open:e,onClose:()=>t(!1),PaperProps:{style:{borderRadius:o,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none"}},sx:{...s},children:u.jsxs(f.Stack,{direction:"row",children:[r&&u.jsx(f.Box,{position:"absolute",right:10,top:10,children:u.jsx(f.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(f.IconButton,{onClick:()=>t(!1),children:u.jsx("img",{src:l1})})})}),n]})}),u1=e=>{var P,G,V;const{id:t,cardTitle:n,specificCardData:r,specificConnectorApiStatus:o,isOpen:s,currentCard:a}=e,i=24,c=(o==null?void 0:o[t])===ee.IDLE,l=(o==null?void 0:o[t])===ee.LOADING,d=(o==null?void 0:o[t])===ee.FAILED,{cardType:g,data:b,cardErrorMessage:x,redirectToAdminTab:y,connectorNames:p}=(r==null?void 0:r[t])||{},h=g==="flat",[m,v]=_.useState(!1),[C,I]=_.useState(!1),[E,w]=_.useState(!1),[T,S]=_.useState(!1),L=((P=b==null?void 0:b.listItems)==null?void 0:P.statusCode)!==401,N=_.useMemo(()=>{var H,J,ne,se;return h&&((H=b==null?void 0:b.flatDisplay)!=null&&H.data)?b.flatDisplay.data:!h&&((se=(ne=(J=b==null?void 0:b.listItems)==null?void 0:J.fields)==null?void 0:ne[0])!=null&&se.data)?b.listItems.fields[0].data:[]},[h,b]),D=_.useMemo(()=>N==null?void 0:N.slice(0,5),[N]),[k,M]=_.useState([]),B=_.useRef(null),[z,q]=_.useState(0),Q=m?-180:0,X=h?!1:!!((G=b==null?void 0:b.listItems)!=null&&G.errorMessage),Y=X||d||x,oe=c&&!X&&s&&(E||C);_.useLayoutEffect(()=>{var H;(H=B.current)!=null&&H.scrollHeight&&q(B.current.scrollHeight+i)},[o==null?void 0:o[t],k,B]),_.useEffect(()=>{var se,j;const H=((N==null?void 0:N.length)||0)>5,J=!h&&(((j=(se=b==null?void 0:b.listItems)==null?void 0:se.fields)==null?void 0:j.length)||0)>1;w(H&&!J),I(J)},[b,h,N==null?void 0:N.length]),_.useEffect(()=>{M(m?N:D)},[b,m,D,N]);const $=()=>{E?v(H=>!H):S(H=>!H)};return u.jsxs(u.Fragment,{children:[u.jsx(Vr,{shown:T,setShown:S,showCloseButton:!0,borderRadius:12,children:u.jsx(P8,{data:((V=b==null?void 0:b.listItems)==null?void 0:V.fields)||[],title:n,currentCard:a,setShowModal:S})}),u.jsx(o5,{className:s?"":"slideUp",height:z,children:u.jsx(f.Stack,{ref:B,gap:1,margin:"12px",children:l&&!(k!=null&&k.length)?u.jsxs(u.Fragment,{children:[u.jsx(Tn,{variant:"rounded",width:"100%",height:20,animation:"wave"}),u.jsx(Tn,{variant:"rounded",width:"100%",height:20,animation:"wave"})]}):u.jsx(u.Fragment,{children:Y?u.jsx(f.Box,{margin:"8px 0",children:u.jsx(c1,{error:x,isLoading:l,redirectToAdminTab:y,isFailed:d,showErrorIcon:!L,connectorNames:p,cardId:t,cardTitle:n,currentCard:a,isCardLevelError:!0})}):k!=null&&k.length?k==null?void 0:k.map(H=>{const{value:J,label:ne,deepLink:se,type:j}=H,te="errorMessage"in H?H.errorMessage:null,Ce="statusCode"in H?H.statusCode:null;return u.jsxs("div",{children:[u.jsx(s5,{variant:"overline",children:ne}),u.jsx(c1,{value:J,error:te,deepLink:se,statusCode:Ce,isLoading:l,type:j,cardTitle:n,currentCard:a,cardId:t,fieldName:ne})]},ne)}):u.jsx(f.Box,{margin:"8px 0",children:u.jsx(ud,{children:s3})})})})}),!x&&oe&&u.jsx(b5,{variant:"body2_medium",onClick:$,children:E?u.jsxs(u.Fragment,{children:[m?U5:vd,u.jsx(m5,{src:Q5,transformAngle:Q})]}):vd})]})},q8={connectorCards:null,cardSpecificData:null,connectorApiStatus:ee.IDLE,conversationMetaDataApiStatus:ee.IDLE,specificConnectorApiStatus:null,threadId:null,connectorsEnabled:!1,specificConnectorErrorCode:null,conversationEmailHeaders:null},d1="/v1/api",$8=`${d1}/connectors/cards`,Q8=`${d1}/connectors/cards/:id/data`,U8=({inboxIds:e,conversationId:t,channelType:n="email"})=>{const r=new URLSearchParams;return e.forEach(o=>r.append("inbox_ids",o)),r.append("channel_type",n),r.append("conversation_id",String(t||"")),ke({url:`${$8}?${r.toString()}`,method:Be.GET})},K8=(e,t,n,r)=>{const o=new URLSearchParams;return o.append("senderEmail",t),o.append("conversation_id",String(n||"")),r&&o.append("externalResourceId",r),ke({url:`${Q8.replace(":id",e)}?${o.toString()}`,method:Be.GET})},f1=Qi({name:"connectorCardLibrary",initialState:q8,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(Ea.pending,t=>{t.connectorApiStatus=ee.LOADING}).addCase(Ea.fulfilled,(t,n)=>{t.connectorApiStatus=ee.IDLE,t.connectorCards=n.payload.cards,t.connectorsEnabled=n.payload.connectorsEnabled}).addCase(Ea.rejected,t=>{t.connectorApiStatus=ee.FAILED}).addCase(Bo.pending,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.LOADING}}).addCase(Bo.fulfilled,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`);const{data:a}=n.payload||{};a&&(t.cardSpecificData={...t.cardSpecificData?t.cardSpecificData:{},[s]:a}),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.IDLE}}).addCase(Bo.rejected,(t,n)=>{const{id:r,externalResourceId:o=""}=n.meta.arg;let s=r;o&&(s=`${s}_${o}`),t.specificConnectorApiStatus={...t.specificConnectorApiStatus??{},[s]:ee.FAILED};const a=n.payload&&typeof n.payload=="object"&&"code"in n.payload?String(n.payload.code):Qu;t.specificConnectorErrorCode={...t.specificConnectorErrorCode??{},[s]:a}})}}),Ea=Wt("connectorCardLibrary/fetchAllCard",async({inboxIds:e,channelType:t,conversationId:n})=>{var i;const r=await U8({inboxIds:e,channelType:t,conversationId:n});if(!Array.isArray((i=r==null?void 0:r.data)==null?void 0:i.cards))return{cards:[],connectorsEnabled:!1};const{cards:o,connectorsEnabled:s=!1}=r.data;return{cards:o.sort((c,l)=>(c==null?void 0:c.priority)-(l==null?void 0:l.priority)),connectorsEnabled:s}}),Bo=Wt("connectorCardLibrary/fetchSpecificCard",async({id:e,email:t,conversationId:n,isRefresh:r,externalResourceId:o},s)=>{try{const a=await K8(e,t,n,o),i=a==null?void 0:a.data,c=a==null?void 0:a.status;return i?(r&&Se({message:n0,type:Ut}),{data:td(i),status:c}):(r&&Se({message:t0,type:qe}),{data:{},status:c})}catch(a){const i=a;return s.rejectWithValue({...i,code:i.code||Qu})}}),ev=f1.reducer,p1=f1.actions,h1="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.76618%202.23341C8.79952%201.26675%207.47285%200.666748%205.99952%200.666748C3.05285%200.666748%200.672852%203.05341%200.672852%206.00008C0.672852%208.94675%203.05285%2011.3334%205.99952%2011.3334C8.48619%2011.3334%2010.5595%209.63341%2011.1529%207.33341H9.76618C9.21952%208.88675%207.73952%2010.0001%205.99952%2010.0001C3.79285%2010.0001%201.99952%208.20675%201.99952%206.00008C1.99952%203.79341%203.79285%202.00008%205.99952%202.00008C7.10618%202.00008%208.09285%202.46008%208.81285%203.18675L6.66618%205.33341H11.3329V0.666748L9.76618%202.23341Z'%20fill='%236C7B94'/%3e%3c/svg%3e",tv="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%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",nv="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",g1=e=>e.write.createObjectList,rv=e=>e.write.createObjectConnectorNamesList,m1=e=>e.write.linkObjectList,ov=e=>e.write.editObjectList,sv=e=>e.write.objectDict,av=e=>e.write.formFields,iv=e=>e.write.linkCardApiStatus,cv=e=>e.write.unlinkCardApiStatus,lv=e=>e.write.dependentFieldsMap,uv=e=>e.write.createFormApiStatus,dv=e=>e.write.updateFormApiStatus,fv=e=>e.write.currentResourceDetails,pv=e=>e.write.currentResourceDetailsApiStatus,b1=e=>e.write.currentCardInEdit,y1=e=>e.write.hasUnsavedChanges,hv=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,C1=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)&&hv(e[r])?n[r]=(o=new Date(`${e[r]}`))==null?void 0:o.toString():n[r]=e[r],n},{}),gv=e=>d3.replace("{{connectorName}}",e),mv=({showUnlinkModal:e,setShowUnlinkModal:t,cardId:n,onCardUnlinking:r,externalResourceId:o,conversationId:s,connectorName:a})=>{const i=Ht(),{sendTrackingEvent:c}=_.useContext(He),d=me(cv)===ee.LOADING,g=()=>{s&&o&&i(Ca({id:n,conversationId:s,externalResourceId:o})).unwrap().then(()=>{c(xm,{connector_name:a,conversation_id:s}),t(!1),r(),Se({message:Cb,type:Ut})}).catch(()=>{Se({message:vb,type:Ut})})};return u.jsx(Vr,{shown:e,setShown:t,showCloseButton:!0,children:u.jsxs(f.Stack,{width:"400px",padding:"20px",gap:"8px",children:[u.jsx(f.Typography,{variant:"h2",children:u3}),u.jsx(f.Typography,{variant:"body2",children:gv(a)}),u.jsxs(f.Stack,{direction:"row",gap:"8px",marginTop:"20px",justifyContent:"flex-end",children:[u.jsx(f.Button,{variant:"text",onClick:()=>t(!1),children:Ai}),u.jsx(f.Button,{disabled:d,color:"error",onClick:g,children:zu})]})]})})},bv=({actions:e,isHovered:t=!1})=>{const r=e.filter(i=>i.shown);if(r.length===0)return null;const o=r[r.length-1],s=r.slice(0,-1),a=t?(s.length+1)*32:32;return u.jsxs(l5,{width:a,isHovered:t,children:[u.jsx("div",{className:"hidden-actions",children:s.map(({id:i,disabled:c,label:l,iconSrc:d,action:g})=>u.jsx(f.Tooltip,{title:l,placement:"bottom",children:u.jsx(Ar,{onClick:g,disabled:c,children:u.jsx("img",{src:d})})},i))}),o&&u.jsx(f.Tooltip,{title:o.label,placement:"bottom",children:u.jsx(Ar,{onClick:o.action,disabled:o.disabled,children:u.jsx("img",{src:o.iconSrc})})},o.id)]})},yv=e=>{const{card:t,specificCardData:n,email:r,specificConnectorApiStatus:o,defaultOpenState:s=!1,onCardUnlinking:a}=e,i=Ht(),{availableFeatures:c,sendTrackingEvent:l,conversationId:d,currentSmIds:g}=_.useContext(He),{userGroupId:b}=Qt()||{},[x,y]=_.useState(!!s),[p,h]=_.useState(!1),[m,v]=_.useState(!1),[C,I]=_.useState(!1),{id:E,title:w,externalResourceId:T="",forms:S=[],logoUrl:L}=t;let N=E;T&&(N=`${N}_${T}`);const{data:D,cardType:k,cardErrorMessage:M,connectorNames:B}=(n==null?void 0:n[N])??{},z=(B==null?void 0:B[0])||"",q=(o==null?void 0:o[N])===ee.LOADING,Q=(o==null?void 0:o[N])===ee.FAILED,X=!!(at(c,Vu)&&T),Y=_.useMemo(()=>{var j,te;if(M||Q||!(at(c,Qm)&&S.some(Ce=>Ce.type==="edit")))return!1;switch(k){case"flat":return!!((D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId);case"flat_with_list":return((j=D==null?void 0:D.listItems)==null?void 0:j.fields.length)===1?(te=D==null?void 0:D.listItems)==null?void 0:te.fields.some(Ce=>Ce.externalResourceId):!1;default:return!1}},[D,k,c,S,t,M,Q]),oe=_.useCallback((j=!1)=>{const te=j?Sm:_m;r&&E&&d&&i(Bo({id:E,email:r,conversationId:d,externalResourceId:T})).unwrap().then(Ce=>{const Z={...ed(Ce,w,j,!0),sm_ids:g};l(te,Z)}).catch(Ce=>{const Z={...ed(Ce,w,j,!1),sm_ids:g};l(te,Z)})},[i,r,E,w,l,d,T,g]);_.useEffect(()=>{x&&oe(!0)},[x,oe]);const $=(j,te)=>{var Z;j==null||j.stopPropagation(),i(Bo({id:te,email:r,conversationId:d,isRefresh:!0,externalResourceId:T})).unwrap().then(()=>{l(dm,{id:te})});const Ce=j.target.tagName==="BUTTON"?(Z=j.target)==null?void 0:Z.firstChild:j.target;Ce.className&&(Ce.className=""),setTimeout(()=>Ce.className="selected",1)},P=(j,te)=>{j.stopPropagation(),!(n!=null&&n[te])&&!q&&oe(),l(x?um:lm,{id:te}),y(Ce=>!Ce)},G=j=>{j.stopPropagation();const te=j.currentTarget.offsetWidth<j.currentTarget.scrollWidth;h(!!te)},V=j=>{var Ce,Z;j.stopPropagation(),l(Bu,{card_title:w,connector_name:z,ug_id:b,sm_ids:g});let te;k==="flat"?te=(D==null?void 0:D.flatDisplay.externalResourceId)??t.externalResourceId:k==="flat_with_list"&&(te=(Z=(Ce=D==null?void 0:D.listItems)==null?void 0:Ce.fields[0])==null?void 0:Z.externalResourceId),te?i(Br({...t,externalResourceId:te})):Se({message:pn,type:qe})},H=j=>{j.stopPropagation(),v(!0)},J=()=>{I(!0)},ne=()=>{I(!1)},se=[{id:"unlink",label:zu,disabled:q,shown:X,iconSrc:tv,action:j=>H(j)},{id:"refresh",label:Hu,disabled:q,shown:!0,iconSrc:h1,action:j=>$(j,E)},{id:"edit",label:Yu,disabled:q,shown:Y,iconSrc:nv,action:j=>V(j)}];return u.jsxs(e5,{"data-testid":`test_${E}`,onMouseEnter:J,onMouseLeave:ne,children:[u.jsxs(t5,{className:x?"hiver-card-expanded":"",onClick:j=>P(j,N),children:[u.jsxs(n5,{children:[L&&u.jsx("img",{src:L,alt:w}),u.jsx(f.Tooltip,{title:p?w:"",placement:"bottom",children:u.jsx(r5,{variant:"h4",onMouseOver:j=>G(j),onMouseLeave:j=>G(j),children:w})})]}),u.jsxs(ld,{children:[u.jsx(bv,{actions:se,isHovered:C}),u.jsx(f.Tooltip,{title:x?Wu:Si,placement:"bottom",children:u.jsx(Ar,{onClick:j=>P(j,N),children:u.jsx(Di,{className:x?"":"hiver-up"})})})]})]}),u.jsx(u1,{id:N,cardTitle:t.title,currentCard:t,specificCardData:n,specificConnectorApiStatus:o,isOpen:x}),u.jsx(mv,{showUnlinkModal:m,setShowUnlinkModal:v,cardId:E,onCardUnlinking:a,conversationId:d,externalResourceId:T,connectorName:z})]})},Cv=Number.MAX_SAFE_INTEGER,vv=({cards:e,email:t,specificCardData:n,specificConnectorApiStatus:r,onCardUnlinking:o})=>{const{availableFeatures:s}=_.useContext(He),i=at(s,Km)?Cv:1;return u.jsx(f.Box,{flexGrow:1,children:e.map((c,l)=>{const{id:d,externalResourceId:g}=c;let b=d;return g&&(b=`${b}_${g}`),u.jsx("div",{children:u.jsx(yv,{card:c,specificCardData:n,email:t??"",defaultOpenState:l<i,specificConnectorApiStatus:r,onCardUnlinking:o})},b)})})},Gr=({children:e})=>{if(!Array.isArray(e))return e;let t=null;return e.find(r=>typeof(r==null?void 0:r.type)!="function"?!1:(r.props.fallback&&(t=r),r.props.condition))??t};function Hr({children:e,condition:t,fallback:n=!1}){return!t&&!n?null:e}Gr.CaseView=Hr;const xv="Bring your favourite tools into Hiver",Ev="Plugin image",Iv="Integrate tools like Salesforce, HubSpot, and Shopify to boost productivity",wv="Enable Connectors",_v="Enable Apps",Sv="Learn more",Tv="https://help.hiverhq.com/custom-connectors/hiver-s-custom-connectors",Av="Contact your admin to enable this",Lv="https://youtu.be/ODcJnzZLb50",Ov="connectors-module/assets/connectors-images/connector-mainpage.png",Fv="connectors-module/assets/connectors-images/connector-mainpage-apps.png",Dv="Explore connectors",kv="Connectors",Nv=f.styled(f.Box)`
|
|
1041
1041
|
padding-top: 20px;
|
|
1042
|
-
`,
|
|
1042
|
+
`,Rv=f.styled(f.Stack)`
|
|
1043
1043
|
width: 100%;
|
|
1044
1044
|
height: 97px;
|
|
1045
1045
|
background-color: ${f.theme.palette.purple.light};
|
|
@@ -1055,17 +1055,17 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1055
1055
|
height: 56px;
|
|
1056
1056
|
width: 102px;
|
|
1057
1057
|
}
|
|
1058
|
-
`,
|
|
1058
|
+
`,Mv=f.styled(f.Typography)`
|
|
1059
1059
|
color: ${f.theme.palette.gray.gray1};
|
|
1060
1060
|
height: 54px;
|
|
1061
1061
|
width: 120px;
|
|
1062
1062
|
line-height: 18px;
|
|
1063
|
-
`,
|
|
1063
|
+
`,Pv=f.styled(f.Link)`
|
|
1064
1064
|
display: block;
|
|
1065
1065
|
width: 100%;
|
|
1066
1066
|
margin-bottom: 20px;
|
|
1067
1067
|
margin-top: 12px;
|
|
1068
|
-
`,
|
|
1068
|
+
`,jv=f.styled(f.Typography)`
|
|
1069
1069
|
color: ${f.theme.palette.gray.gray1};
|
|
1070
1070
|
font-size: 13px;
|
|
1071
1071
|
margin-bottom: 24px;
|
|
@@ -1079,17 +1079,17 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1079
1079
|
background-color: #e3dfff;
|
|
1080
1080
|
border: 1px solid ${f.theme.palette.purple.primary};
|
|
1081
1081
|
}
|
|
1082
|
-
`,
|
|
1082
|
+
`,Bv=f.styled(f.Stack)`
|
|
1083
1083
|
margin-top: 16px;
|
|
1084
1084
|
justify-content: center;
|
|
1085
1085
|
align-items: center;
|
|
1086
1086
|
gap: 8px;
|
|
1087
|
-
`,
|
|
1087
|
+
`,Vv=f.styled(f.icons.InfoOutlined)`
|
|
1088
1088
|
width: 18px;
|
|
1089
1089
|
color: ${f.theme.palette.gray.gray3};
|
|
1090
|
-
`,
|
|
1090
|
+
`,Gv=f.styled(f.Typography)`
|
|
1091
1091
|
color: ${f.theme.palette.gray.gray3};
|
|
1092
|
-
`,
|
|
1092
|
+
`,Hv="https://cdn.hiverhq.com/connectors-module/assets/PlugIn.svg",Wv={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:Zv}=Wv,x1=({isAdmin:e=!0,hideHeading:t=!1})=>{const{sendTrackingEvent:n,availableFeatures:r,connectorFunctions:o}=_.useContext(He),s=at(r,qm),a=at(r,Ss),i=g=>{g.stopPropagation(),n(im),o==null||o.redirectToAdmin()},c=g=>{g.stopPropagation(),n(cm),window.open(Tv,"_blank")},l=()=>{n(km,{source:"main_tab"})},d=a?Fv:Ov;return u.jsxs(Nv,{"data-testid":"noConnectors",children:[s?u.jsxs(u.Fragment,{children:[t?null:u.jsx(f.Typography,{variant:"h2",children:a?Ti:kv}),u.jsx(Pv,{onClick:l,href:Lv,target:"_blank",children:u.jsx(Z7,{src:Zv+d,alt:Dv,aspectRatio:"1000/783"})})]}):u.jsxs(Rv,{children:[u.jsx(Mv,{variant:"body1_medium",children:xv}),u.jsx("img",{src:Hv,alt:Ev})]}),u.jsx(jv,{variant:"body2",children:Iv}),e?u.jsx(v1,{endIcon:u.jsx(f.icons.ArrowForward,{}),onClick:i,...s&&{size:"medium"},children:a?_v:wv}):u.jsxs(u.Fragment,{children:[u.jsx(v1,{onClick:c,children:Sv}),u.jsxs(Bv,{direction:"row",children:[u.jsx(Vv,{}),u.jsx(Gv,{variant:"caption",children:Av})]})]})]})},Xv=()=>{const{availableFeatures:e}=_.useContext(He),t=at(e,Ss);return u.jsxs(cd,{children:[u.jsxs(f.Stack,{direction:"row",boxSizing:"content-box",paddingTop:"20px",paddingBottom:"12px",height:"36px",gap:"8px",alignItems:"center",children:[t?u.jsx(od,{width:"20px",height:"20px"}):u.jsx(ad,{}),u.jsx(id,{variant:"h2",children:t?Ti:Zu})]}),u.jsxs(f.Stack,{gap:"12px",children:[u.jsx(Tn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(Tn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"}),u.jsx(Tn,{variant:"rounded",width:"100%",height:"46px",animation:"wave"})]})]})},zv=()=>{const{metaData:e,sendTrackingEvent:t,isAdmin:n,connectorFunctions:r}=_.useContext(He),[o,s]=_.useState(!1),a=_.useRef(null),[i,c]=_.useState(0),{templateUpdates:l}=e||{},{sections:d=[],actionButtons:g=[],title:b}=l||{},{version:x=""}=l||{},y=C3(x),p=_.useMemo(()=>y3(x),[x]),h=_.useMemo(()=>(g==null?void 0:g.filter(({isAdminPanelLink:I})=>!(!n&&I)))??[],[g,n]);if(_.useEffect(()=>{!p&&l&&Oi(x,!0)},[p,x,l]),_.useLayoutEffect(()=>{var I;(I=a.current)!=null&&I.scrollHeight&&c(a.current.scrollHeight)},[a]),_.useEffect(()=>{l&&!y&&t(pm,{update_version_id:x})},[]),!l||y)return null;const m=I=>{var E;I.stopPropagation(),s(w=>!w),(E=a.current)!=null&&E.scrollHeight&&c(a.current.scrollHeight),Oi(x,!1,!0)},v=(I,E="",w=!1,T=!1)=>{var S;if(I.stopPropagation(),w&&T?t(hm,{update_version_id:x}):T&&t(gm,{update_version_id:x}),!w&&E){(S=window.open(E,"_blank"))==null||S.focus();return}C(I,!1),r==null||r.redirectToAdmin()},C=(I,E=!0)=>{I.stopPropagation(),Oi(x,!1),s(!1),E&&t(mm,{update_version_id:x})};return u.jsxs(C5,{children:[u.jsxs(v5,{children:[u.jsx(y5,{variant:"h3",children:b}),u.jsxs(f.Box,{children:[o?u.jsx(f.Tooltip,{title:i3,placement:"bottom",children:u.jsx(f.IconButton,{onClick:C,children:u.jsx(f.icons.Close,{sx:{height:"16px",width:"16px",opacity:"0.8"}})})}):null,u.jsx(f.Tooltip,{title:o?a3:Si,placement:"bottom",children:u.jsx(Ar,{onClick:m,children:u.jsx(Di,{className:o?"":"hiver-up"})})})]})]}),u.jsx(x5,{className:o?"slideDown":"slideUp",ref:a,height:i,children:u.jsxs(E5,{children:[d.map(({title:I,items:E,type:w})=>u.jsxs(T5,{children:[u.jsx(f.Typography,{variant:"body2_medium",children:I}),E.map(T=>{const S=w===p3,{deeplink:L,textHtml:N,imageUrl:D}=T,k=()=>u.jsx(i5,{className:S?"":"ellipsisClass",component:"div",variant:"body2",dangerouslySetInnerHTML:{__html:N}});return u.jsx(I5,{component:"ul",children:u.jsxs(w5,{component:S?"li":"div",marginLeft:D?"0":"14px",children:[D?u.jsx("img",{src:D}):null,L?u.jsx(dd,{target:"_blank",underline:"none",onClick:M=>v(M,L),fontSize:"13px",children:k()}):k()]})},N)})]},I)),u.jsx(f.Stack,{flexDirection:"row",gap:"8px",marginBottom:"11.5px",children:h.map(({text:I,link:E,isAdminPanelLink:w})=>u.jsx(_5,{variant:w?"contained":"text",children:u.jsx(S5,{variant:"caption",onClick:T=>v(T,E,w,!0),children:I})},I))})]})})]})},Yv=({selectedEmail:e,conversationId:t})=>ke({url:U7.replace(":conversationId",""+t),method:Be.PATCH,data:{selectedEmail:e}}),Jv="data:image/svg+xml,%3csvg%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='7'%20cy='7'%20r='7'%20fill='%23196FE0'/%3e%3cpath%20d='M10.8288%204.89995C10.5922%204.64324%2010.1976%204.63193%209.94761%204.87601L5.96804%208.75823L4.06989%206.75353C3.82948%206.49981%203.43531%206.49425%203.18845%206.74158C2.9418%206.98865%202.9366%207.39455%203.1768%207.64827L5.50404%2010.1061C5.626%2010.235%205.78808%2010.3%205.95059%2010.3C6.10477%2010.3%206.25896%2010.2414%206.37969%2010.124L10.8056%205.80646C11.0553%205.56278%2011.0659%205.15689%2010.8288%204.89995Z'%20fill='white'/%3e%3c/svg%3e",E1=e=>{const t=_.useRef(null),[n,r]=_.useState(!1);return _.useEffect(()=>{t.current&&r(t.current.scrollWidth>t.current.clientWidth)},[e]),{textRef:t,isOverflow:n}},qv=e=>{const{textRef:t,isOverflow:n}=E1(e.data.label);return u.jsx(f.Tooltip,{title:n?e.data.value:null,placement:"bottom",children:u.jsx(A5,{ref:t,variant:"body2",paddingTop:n?"5px":"0px",children:e.data.label})})},$v=e=>u.jsxs(gn.MenuList,{...e,children:[u.jsx(L5,{children:u.jsx(f.Typography,{variant:"body2_medium",children:t4})}),e.children]}),Qv=e=>{const{isSelected:t}=e,{textRef:n,isOverflow:r}=E1(e.data.label);return u.jsx(gn.Option,{...e,children:u.jsxs(f.Stack,{direction:"row",gap:"5px",justifyContent:"space-between",alignItems:"center",children:[u.jsx(f.Tooltip,{title:r?e.data.value:null,placement:"bottom",children:u.jsx(O5,{ref:n,className:"dropdown-item-text",variant:"body2",children:e.data.label})}),t?u.jsx("img",{src:Jv,width:"14px",height:"14px"}):null]})})},Uv=e=>u.jsx(gn.DropdownIndicator,{...e,children:e.selectProps.menuIsOpen?u.jsx(f.icons.ArrowDropUp,{sx:{height:"18px",width:"18px",color:f.theme.palette.gray.gray3}}):u.jsx(f.icons.ArrowDropDown,{sx:{height:"18px",width:"18px",color:f.theme.palette.gray.gray3}})}),Kv={control:e=>({...e,border:"none",boxShadow:"none",marginTop:"12px","&:hover":{border:"none",cursor:"pointer",backgroundColor:f.theme.palette.gray.gray7},"& > :first-child":{"& > :first-child":{paddingTop:"0px"},"& > :nth-child(2)":{height:"0px"}}}),option:(e,t)=>({...e,backgroundColor:f.theme.palette.gray.white,color:f.theme.palette.gray.black,height:"36px",padding:"6px 16px","&:hover":{backgroundColor:t.isFocused?f.theme.palette.gray.gray7:f.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"})},ex=({selectedEmail:e,emailHeaders:t,root:n,isLoading:r,setSelectedEmail:o})=>{const{conversationId:s}=_.useContext(He),a=t?Object.entries(t).map(([c])=>({value:c,label:c})):e?[{value:e,label:e}]:[];_.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&&Yv({selectedEmail:l,conversationId:s}),o(l)};return u.jsx(Ro,{options:a,value:e&&!r?{value:e,label:e}:null,placeholder:"Select an email",name:"email-selection",type:"select",onChange:i,components:{...Ro.getDefaultComponents(),MenuList:$v,Option:Qv,SingleValue:qv,DropdownIndicator:Uv},root:n,styles:Kv,isSearchable:!1,menuPortalTarget:document.body,isLoading:r})},tx=f.styled(f.Paper)`
|
|
1093
1093
|
width: stretch;
|
|
1094
1094
|
height: 100%;
|
|
1095
1095
|
position: absolute;
|
|
@@ -1099,17 +1099,17 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1099
1099
|
padding: 20px 14px;
|
|
1100
1100
|
box-sizing: border-box;
|
|
1101
1101
|
overflow: hidden;
|
|
1102
|
-
`,
|
|
1102
|
+
`,nx=f.styled("img")`
|
|
1103
1103
|
height: 16px;
|
|
1104
1104
|
width: 16px;
|
|
1105
|
-
`,
|
|
1105
|
+
`,rx=f.styled(f.Box)`
|
|
1106
1106
|
margin-top: 12px;
|
|
1107
1107
|
height: 100%;
|
|
1108
|
-
`,
|
|
1108
|
+
`,ox="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",Fc=({children:e,isOpen:t,setIsOpen:n,onClose:r,title:o="Back",backButtonTooltip:s,portalId:a})=>{const i=_.useRef(null),[c,l]=_.useState(!1);return _.useEffect(()=>{a&&(i.current=document.querySelector(`[data-connectorid=${a}]`),l(!0))},[a,l]),_.useEffect(()=>()=>{n(!1)},[n]),t&&c&&i.current&&Ne.createPortal(u.jsxs(tx,{className:"layover-paper",elevation:0,children:[u.jsxs(f.Stack,{direction:"row",alignItems:"center",marginLeft:"-8px",children:[u.jsx(f.Tooltip,{title:s,placement:"bottom",children:u.jsx(f.IconButton,{onClick:r,children:u.jsx(nx,{src:ox})})}),u.jsx(f.Typography,{children:o})]}),u.jsx(rx,{children:e})]}),i.current)},I1=e=>e.common.previewCardData,w1=e=>e.common.previewCardApiStatus,sx=e=>e.common.selectedSuggestionType,ax=f.styled(f.Stack)`
|
|
1109
1109
|
width: 100%;
|
|
1110
1110
|
border-radius: 8px;
|
|
1111
1111
|
border: 1px solid ${f.theme.palette.gray.gray5};
|
|
1112
|
-
`,
|
|
1112
|
+
`,ix=f.styled(f.Stack)`
|
|
1113
1113
|
padding: 11px;
|
|
1114
1114
|
height: 46px;
|
|
1115
1115
|
background: ${f.theme.palette.gray.gray6};
|
|
@@ -1119,7 +1119,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1119
1119
|
white-space: nowrap;
|
|
1120
1120
|
overflow: hidden;
|
|
1121
1121
|
}
|
|
1122
|
-
`,
|
|
1122
|
+
`,cx=f.styled(f.Button)`
|
|
1123
1123
|
&:hover {
|
|
1124
1124
|
background-color: #e3e9ff !important;
|
|
1125
1125
|
color: ${f.theme.palette.purple.primary} !important;
|
|
@@ -1127,7 +1127,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1127
1127
|
}
|
|
1128
1128
|
margin-top: 10px;
|
|
1129
1129
|
display: block;
|
|
1130
|
-
`,
|
|
1130
|
+
`,lx=f.styled(f.Stack)`
|
|
1131
1131
|
flex-direction: row;
|
|
1132
1132
|
flex-grow: 1;
|
|
1133
1133
|
align-items: center;
|
|
@@ -1138,8 +1138,8 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1138
1138
|
height: 20px;
|
|
1139
1139
|
flex-shrink: 0;
|
|
1140
1140
|
}
|
|
1141
|
-
`,_1=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=Ht(),[s,a]=_.useState(!1),[i,c]=_.useState(!0),{id:l="",cardTitle:d="",logoUrl:g}=e||{},b=t===ee.LOADING,x=p=>{p.stopPropagation();const h=p.currentTarget.offsetWidth<p.currentTarget.scrollWidth;a(!!h)},y=p=>{var m;o(jr({id:n,args:r,isRefresh:!0}));const h=p.target.tagName==="BUTTON"?(m=p.target)==null?void 0:m.firstChild:p.target;h.className&&(h.className=""),setTimeout(()=>h.className="selected",1)};return u.jsxs(
|
|
1142
|
-
`).map((s,a)=>u.jsx(f.Typography,{variant:"body2",children:s},a))}),u.jsx(f.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>u.jsx(f.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),k1="connector-agent-expanded-write-form",N1=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s,connectors:a})=>{var Gn;const{userGroupId:i,userId:c}=Qt()||{},[l,d]=_.useState(null),[g,b]=_.useState(!1),x=_.useRef(null),[y,p]=T1(),h=me(b1),m=me(t?
|
|
1141
|
+
`,_1=({cardData:e,cardDataApiStatus:t,objectToLink:n,args:r})=>{const o=Ht(),[s,a]=_.useState(!1),[i,c]=_.useState(!0),{id:l="",cardTitle:d="",logoUrl:g}=e||{},b=t===ee.LOADING,x=p=>{p.stopPropagation();const h=p.currentTarget.offsetWidth<p.currentTarget.scrollWidth;a(!!h)},y=p=>{var m;o(jr({id:n,args:r,isRefresh:!0}));const h=p.target.tagName==="BUTTON"?(m=p.target)==null?void 0:m.firstChild:p.target;h.className&&(h.className=""),setTimeout(()=>h.className="selected",1)};return u.jsxs(ax,{children:[u.jsxs(ix,{direction:"row",justifyContent:"space-between",children:[b?u.jsxs(f.Stack,{gap:"6px",direction:"row",children:[u.jsx(Tn,{width:"16px",height:"24px"}),u.jsx(Tn,{width:"100px",height:"24px"})]}):u.jsxs(lx,{children:[g&&u.jsx("img",{src:g,alt:d}),u.jsx(f.Tooltip,{title:s?d:"",children:u.jsx(f.Typography,{variant:"h4",onMouseOver:p=>x(p),onMouseLeave:p=>x(p),children:d})})]}),u.jsxs(f.Stack,{direction:"row",alignItems:"center",children:[i?u.jsx(f.Tooltip,{title:Hu,placement:"bottom",children:u.jsx(Ar,{onClick:p=>y(p),children:u.jsx("img",{src:h1})})}):null,u.jsx(f.Tooltip,{title:i?Wu:Si,placement:"bottom",children:u.jsx(Ar,{onClick:()=>c(p=>!p),children:u.jsx(Di,{className:i?"":"hiver-up"})})})]})]}),u.jsx(u1,{id:l,cardTitle:d,specificCardData:{[l]:e},specificConnectorApiStatus:{[l]:t},isOpen:i})]})},S1={values:{},errors:{}},nn={SET_FIELD_VALUE:"SET_FIELD_VALUE",CLEAR_ERROR:"CLEAR_ERROR",SET_FIELD_ERROR:"SET_FIELD_ERROR",SET_FIELDS:"SET_FIELDS",CLEAR_FIELDS:"CLEAR_FIELDS",RESET_STATE:"RESET_STATE"},ux=(e,t)=>{const{type:n,payload:r}=t;switch(n){case nn.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 nn.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 nn.CLEAR_ERROR:{if(!(r!=null&&r.value))return e;const{name:o}=r.value;return{...e,errors:{...e.errors,[o]:""}}}case nn.SET_FIELDS:{if(!(r!=null&&r.values))return e;const{values:o}=r;return{...e,values:o}}case nn.RESET_STATE:return S1}return e},T1=()=>_.useReducer(ux,S1),A1=({state:e,dispatch:t,validations:n})=>{const r=e.errors,o=(g,b)=>{t({type:nn.SET_FIELD_VALUE,payload:{value:{value:b,name:g}}})},s=_.useCallback(()=>Object.keys(r).filter(b=>!!r[b]).length>0,[r]),a=g=>{g.stopPropagation();const{name:b,value:x}=(g==null?void 0:g.target)||{};o(b,x)},i=(g,b)=>{g.stopPropagation();const{name:x}=(g==null?void 0:g.target)||{};o(x,b)},c=(g,b)=>{o(g,b||"")},l=(g,b)=>{e.errors[g]!==b&&t({type:nn.SET_FIELD_ERROR,payload:{value:{name:g,value:b}}})},d=(g,b)=>{if(b){const x=b[g];x==null||x.forEach(y=>{var p;o(y,""),b[y]&&d(y,b),(p=n[y])!=null&&p.isRequired&&l(y,!0)})}};return{setValue:o,isErrorInValidations:s,inputChangeHandler:a,checkboxChangeHandler:i,dateChangeHandler:c,handleValidationError:l,clearDependentFields:d}},L1=({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,d,g)=>{let b=a;s.searchInterfaceDetails&&typeof c=="string"&&c.trim().length>0&&!d&&(b=s.searchInterfaceDetails);const x=X7(n,b==null?void 0:b.args),y=Object.values((b==null?void 0:b.args)||{});if(x.length===y.length){r(ar({fieldName:s.name,formId:String(t),searchTerm:c,fieldConfig:s,interfaceId:b==null?void 0:b.id,pagination:b==null?void 0:b.pagination,callback:l,args:{...Po(n,b==null?void 0:b.args),...Po(n,b==null?void 0:b.optionalArgs)},isScrollToBottomEvent:d,controller:g}));return}return l([])}};return{...o,[s.name]:i}},{}),O1=({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,b;if(!c)return;const d={values:{name:a.name,value:c},errors:{}};o(ga({fieldName:a.name,formId:String(t),interfaceId:i.id,conversationId:r,label:c,callback:l,args:{...Po(n,(g=a==null?void 0:a.interfaceDetails)==null?void 0:g.args),...Po(n,(b=a==null?void 0:a.interfaceDetails)==null?void 0:b.optionalArgs)},createArgs:{...Po(d,i.args)}}))}}}},{}),F1=({formFields:e,formState:t,formId:n,conversationId:r})=>{const o=Ht(),s=_.useMemo(()=>{if(e&&e.length){const i=L1({formFields:e,formId:n,formState:t,appDispatch:o});return e.reduce((l,d)=>{const g=d.columns;if(!g)return l;const b=L1({formFields:g,formId:n,formState:t,appDispatch:o});return{...l,[d.name]:{loadOptionsList:b}}},i)}return null},[e,t,n,o]),a=_.useMemo(()=>{const i=O1({formFields:e,formId:n,formState:t,conversationId:r,appDispatch:o});return e.reduce((l,d)=>{const g=d.columns;if(!g)return l;const b=O1({formFields:g,formId:n,formState:t,conversationId:r,appDispatch:o});return{...l,[d.name]:{createOptionList:b}}},i)},[e,n,t,r,o]);return{fetchConfig:s,createConfig:a}},D1=({setShown:e,shown:t,title:n,description:r,buttons:o})=>u.jsx(Vr,{shown:t,setShown:e,showCloseButton:!0,children:u.jsxs(f.Stack,{width:"400px",padding:"20px",children:[u.jsx(f.Typography,{variant:"h2",marginBottom:"8px",children:n}),u.jsx(f.Stack,{gap:"4px",marginBottom:"20px",children:r.split(`
|
|
1142
|
+
`).map((s,a)=>u.jsx(f.Typography,{variant:"body2",children:s},a))}),u.jsx(f.Stack,{direction:"row",justifyContent:"flex-end",gap:"8px",children:o.map(s=>u.jsx(f.Button,{variant:s.variant,size:"medium",onClick:s.action,children:s.label},s.label.split(" ").join("_").toLowerCase()))})]})}),k1="connector-agent-expanded-write-form",N1=({metaData:e,isEdit:t=!1,defaultOption:n,onClose:r,onCreateSuccess:o,setMetaData:s,connectors:a})=>{var Gn;const{userGroupId:i,userId:c}=Qt()||{},[l,d]=_.useState(null),[g,b]=_.useState(!1),x=_.useRef(null),[y,p]=T1(),h=me(b1),m=me(t?ov:g1),v=me(av),C=me(sv),I=me(lv),E=me(uv),w=me(dv),T=me(fv),S=me(pv),L=me(y1),N=C==null?void 0:C[(l==null?void 0:l.value)??""],D=N==null?void 0:N.expandedView,{formConfigs:k,formViewConfigs:M}=_.useMemo(()=>{if(l&&"value"in l&&v&&v[l.value]&&Array.isArray(v[l.value])){const Oe=v[l.value],st=[{id:l.value,formFields:Oe}];return{formConfigs:st,formViewConfigs:D?z7(Oe,t1):st}}const ue=[{id:"emptyFormId",formFields:[]}];return{formConfigs:ue,formViewConfigs:ue}},[v,l,D]),B=_.useMemo(()=>{var Oe;const ue=((Oe=k==null?void 0:k[0])==null?void 0:Oe.formFields)||[];return Oc({formFields:ue})},[k]),{setValue:z,inputChangeHandler:q,checkboxChangeHandler:Q,dateChangeHandler:X,clearDependentFields:Y,handleValidationError:oe,isErrorInValidations:$}=A1({state:y,dispatch:p,validations:B}),{conversationId:P,sendTrackingEvent:G,currentSmIds:V,connectorFunctions:{getFormElement:H,toggleFormElement:J},stackingContext:ne,userEmail:se}=_.useContext(He),{userGroupId:j}=Qt()||{},{fetchConfig:te,createConfig:Ce}=F1({formFields:k[0].formFields,formId:k[0].id,formState:y,conversationId:P}),Z=(Gn=h==null?void 0:h.forms.find(ue=>ue.type==="edit"))==null?void 0:Gn.id,{externalResourceId:Xe}=h??{},Me=[E,w,S].includes(ee.LOADING),Qe=_.useMemo(()=>!D||!H?null:H(),[D,H]),ot=Ht();_.useEffect(()=>(D&&J&&J(!0),()=>{D&&J&&J(!1)}),[D,J]),_.useEffect(()=>{ot(o1(t?!(T&&"values"in T&&"values"in y&&JSON.stringify(C1(y.values))===JSON.stringify(C1(T.values))):(e==null?void 0:e.fields_filled)!==void 0&&e.fields_filled>0))},[t,e,T,y,ot]),_.useEffect(()=>(t&&T&&p({type:nn.SET_FIELDS,payload:T}),()=>{p({type:nn.SET_FIELDS,payload:{values:{}}})}),[t,p,T]),_.useEffect(()=>{l!==null&&s(ue=>({...ue,object_type:l.label}))},[l,s]),_.useEffect(()=>{if(y.values){const ue=qf(k[0].formFields,y.values);s(Oe=>({...Oe,fields_filled:ue}))}},[y,k,s]),_.useEffect(()=>{if(n&&!t)return d(n);m&&m.length&&d(t&&Z?m.find(ue=>ue.value===Z)??null:ue=>ue||!C?ue:m.length===1?m[0]:m.find(st=>!C[st.value].expandedView)??null)},[m,C,t,Z,n]);const vn=()=>{d(x.current),b(!1),p({type:nn.RESET_STATE})},kt=(ue,Oe)=>{z(ue,Oe)},tt=(ue,Oe,st)=>{if(Oe.action==="clear"&&Oe.name&&(z(Oe.name,""),l!=null&&l.value&&Y(Oe.name,I==null?void 0:I[l.value]),B[Oe.name].isRequired&&oe(Oe.name,!0)),ue&&typeof ue=="object"&&"label"in ue&&typeof ue.label=="string"&&"value"in ue&&(typeof ue.value=="string"||typeof ue.value=="number")&&typeof Oe.name<"u")if(Oe.name==="form-object")x.current={value:ue.value,label:ue.label},y.values&&ue.value!==(l==null?void 0:l.value)&&(Object.values(y.values).filter(It=>It!=="").length>0?b(!0):vn());else{let Et=!1;st&&(Et=st.isMultiSelect||!1);const It=!Et&&"prefillValues"in ue&&ue.prefillValues,Cr=Et?[{value:ue.value,label:ue.label}]:{value:ue.value,label:ue.label};if(z(Oe.name,Cr),It)for(const Hn in It)z(Hn,It[Hn]);l!=null&&l.value&&Y(Oe.name,I==null?void 0:I[l.value])}},ze=()=>{if(!$()&&Z&&(C!=null&&C[Z])&&P&&Xe){const{connectorName:ue,title:Oe}=h;G(Lm,{connector_name:ue,card_title:Oe,sm_ids:V,ug_id:j});const st=C[Z].interfaceDetails;if(!st||!T)return;const{id:Et,args:It={},previousArgs:Cr={}}=st,Hn=ha(T,Cr),Jo=ha(y,It);ot(ya({formId:String(Z),conversationId:P,args:Jo,previousArgs:Hn,externalResourceId:Xe,interfaceId:Et,successCallback:()=>{o()}})).unwrap().then(()=>{G(Dm,{connector_name:ue,card_title:Oe,sm_ids:V,ug_id:j})}).finally(()=>{ot(Br(null))})}},yr=()=>{if(!$()&&l&&(C!=null&&C[l.value])&&P){const ue=C==null?void 0:C[l.value].interfaceDetails;if(!ue)return;const{id:Oe,args:st={}}=ue,Et=ha(y,st);ot(ba({formId:String(l.value),conversationId:P,args:Et,interfaceId:Oe,successCallback:()=>{o()}})).unwrap().then(()=>{G(Cm,{object_type:l})})}},Nt=[{label:"Cancel",action:()=>b(!1),variant:"text"},{label:"Continue",action:vn}],Yo=As({url:sm,params:{email:se,user_id:c,ug_id:i,sm_ids:V.join(","),connector_names:a.join(","),form_object:N==null?void 0:N.name}}),oo=()=>{window.open(Yo,"_blank"),G(zm,{sm_ids:V,ug_id:i,connector_name:N==null?void 0:N.connectorName,form_object:N==null?void 0:N.name})},Vn=u.jsxs(P1,{className:D?k1:"",children:[u.jsx(D1,{shown:g,setShown:b,title:I8,description:w8,buttons:Nt}),D?u.jsxs(dx,{children:[u.jsxs(f.Typography,{children:[t?"Edit":"Add"," to ",N.connectorName]}),u.jsx(f.Tooltip,{title:"Close Popup",placement:"bottom",children:u.jsx(f.IconButton,{onClick:r,children:u.jsx(fx,{src:l1})})})]}):null,u.jsxs(M1,{spacing:3,children:[!t&&!D?u.jsx(or,{type:"select",placeholder:e1,options:m,value:l,name:"form-object",selectChangeHandler:tt,label:T8,labelSpacing:.5,validation:{isRequired:!0}}):null,u.jsx(Yf,{showGlobalLoader:S===ee.LOADING,formConfig:M,selectChangeHandler:tt,inputChangeHandler:q,checkboxChangeHandler:Q,dateChangeHandler:X,tableChangeHandler:kt,onValidationError:oe,fieldsSpacing:3,labelSpacing:.5,fetchConfig:te,createConfig:Ce,values:y.values,validations:B,...D?{cols:t1,stackIndex:ne.expandedForm}:null}),u.jsx(f.Stack,{marginTop:"28px",width:"100%",justifyContent:"center",children:u.jsx(px,{variant:"text",onClick:oo,size:"small",children:b3})})]}),u.jsxs(R1,{children:[u.jsx(f.Button,{disabled:$()||Me||!L,onClick:t?ze:yr,size:"small",...D?{style:{order:2}}:null,children:t?l3:c3}),u.jsx(j1,{variant:"outlined",color:"tertiary",size:"small",onClick:r,disabled:Me,children:Ai})]})]});return D&&Qe?Ne.createPortal(Vn,Qe):Vn},R1=f.styled(f.Box)`
|
|
1143
1143
|
box-sizing: border-box;
|
|
1144
1144
|
height: 52px;
|
|
1145
1145
|
background-color: var(--form-background-color, inherit);
|
|
@@ -1186,7 +1186,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1186
1186
|
color: ${f.theme.palette.purple.primary} !important;
|
|
1187
1187
|
border: 1px solid ${f.theme.palette.purple.primary} !important;
|
|
1188
1188
|
}
|
|
1189
|
-
`,
|
|
1189
|
+
`,dx=f.styled(f.Stack)`
|
|
1190
1190
|
box-sizing: border-box;
|
|
1191
1191
|
flex-flow: row nowrap;
|
|
1192
1192
|
justify-content: space-between;
|
|
@@ -1198,15 +1198,15 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1198
1198
|
background-color: var(--form-background-color, inherit);
|
|
1199
1199
|
padding-top: 20px;
|
|
1200
1200
|
padding-bottom: 10px;
|
|
1201
|
-
`,
|
|
1201
|
+
`,fx=f.styled("img")`
|
|
1202
1202
|
height: 16px;
|
|
1203
1203
|
width: 16px;
|
|
1204
|
-
`,
|
|
1204
|
+
`,px=f.styled(f.Button)`
|
|
1205
1205
|
color: ${f.theme.palette.gray.gray3};
|
|
1206
1206
|
&:hover {
|
|
1207
1207
|
color: ${f.theme.palette.purple.primary};
|
|
1208
1208
|
}
|
|
1209
|
-
`,
|
|
1209
|
+
`,hx=({setOpenTaskLinking:e,onLinkingSuccess:t})=>{const n=Ht(),r=me(I1),o=me(w1),s=me(iv),a=me(m1),[i,c]=_.useState(!1),[l,d]=_.useState(null),[g,b]=_.useState(""),[x,y]=_.useState({}),{conversationId:p,sendTrackingEvent:h,email:m}=_.useContext(He);_.useEffect(()=>{a&&a.length&&d(a[0])},[a]);const v={externalResourceId:g},C=o===ee.LOADING,I=s===ee.LOADING,E=()=>{!i&&l&&"value"in l&&(h(Em,{object_type:l.label}),n(jr({id:String(l==null?void 0:l.value),args:v})).unwrap().catch(k=>{(k==null?void 0:k.status)===400?Se({message:Kf,type:qe}):Se({message:m8,type:qe})})),c(k=>!k)},w=()=>{l&&"value"in l&&p&&n(va({id:String(l.value),externalResourceId:g,conversationId:p,email:m})).unwrap().then(()=>{h(vm,{object_type:l.label,input_type:g}),Se({message:y8,type:Ut}),e(!1),t()}).catch(k=>{(k==null?void 0:k.status)===400?Se({message:Kf,type:qe}):(k==null?void 0:k.status)===409?Se({message:b8,type:qe}):Se({message:C8,type:qe})})},T=()=>{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"&&(d({value:k.value,label:k.label}),b(""))},L=k=>{k.stopPropagation();const{value:M}=(k==null?void 0:k.target)||{};b(M),c(!1)},N=(k,M)=>{y(B=>({...B,[k]:!!M}))},D=()=>Object.keys(x).filter(M=>x[M]).length>0;return u.jsxs(P1,{children:[u.jsxs(M1,{spacing:3,children:[u.jsx(or,{type:"select",placeholder:e1,options:a,value:l,name:"form-object",selectChangeHandler:S,label:A8,labelSpacing:.5,validation:{isRequired:!0},onValidationError:N}),u.jsx(or,{type:"text",placeholder:L8,value:g,name:"resourceId",inputChangeHandler:L,label:O8,labelSpacing:.5,validation:{isRequired:!0,validate:ey()},onValidationError:N}),i?u.jsx(_1,{cardData:r,cardDataApiStatus:o,objectToLink:String((l==null?void 0:l.value)||""),args:v}):null,u.jsx(cx,{fullWidth:!0,disabled:D()||C,color:"tertiary",variant:"outlined",size:"small",onClick:E,children:i?e4:K5})]}),u.jsxs(R1,{children:[u.jsx(f.Button,{onClick:w,disabled:D()||I,size:"small",children:Xu}),u.jsx(j1,{color:"tertiary",variant:"outlined",onClick:T,disabled:I,size:"small",children:Ai})]})]})},gx=f.styled(f.Button)`
|
|
1210
1210
|
&:hover {
|
|
1211
1211
|
background-color: #e3e9ff !important;
|
|
1212
1212
|
color: ${f.theme.palette.purple.primary} !important;
|
|
@@ -1220,14 +1220,14 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1220
1220
|
& .content__btn {
|
|
1221
1221
|
margin-left: 8px;
|
|
1222
1222
|
}
|
|
1223
|
-
`,
|
|
1223
|
+
`,mx=f.styled(f.Button)`
|
|
1224
1224
|
& path {
|
|
1225
1225
|
fill: #fff;
|
|
1226
1226
|
}
|
|
1227
1227
|
& .content__btn {
|
|
1228
1228
|
margin-left: 8px;
|
|
1229
1229
|
}
|
|
1230
|
-
`,
|
|
1230
|
+
`,bx=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("mask",{id:"mask0_4649_80352",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:0,y:0,width:20,height:21},A.createElement("rect",{y:.320312,width:20,height:20,fill:"#D9D9D9"})),A.createElement("g",{mask:"url(#mask0_4649_80352)"},A.createElement("path",{d:"M9.16797 14.4873H10.8346V11.154H14.168V9.4873H10.8346V6.15397H9.16797V9.4873H5.83464V11.154H9.16797V14.4873ZM10.0013 18.654C8.84852 18.654 7.76519 18.4352 6.7513 17.9977C5.73741 17.5602 4.85547 16.9665 4.10547 16.2165C3.35547 15.4665 2.76172 14.5845 2.32422 13.5706C1.88672 12.5567 1.66797 11.4734 1.66797 10.3206C1.66797 9.16786 1.88672 8.08453 2.32422 7.07064C2.76172 6.05675 3.35547 5.1748 4.10547 4.4248C4.85547 3.6748 5.73741 3.08105 6.7513 2.64355C7.76519 2.20605 8.84852 1.9873 10.0013 1.9873C11.1541 1.9873 12.2374 2.20605 13.2513 2.64355C14.2652 3.08105 15.1471 3.6748 15.8971 4.4248C16.6471 5.1748 17.2409 6.05675 17.6784 7.07064C18.1159 8.08453 18.3346 9.16786 18.3346 10.3206C18.3346 11.4734 18.1159 12.5567 17.6784 13.5706C17.2409 14.5845 16.6471 15.4665 15.8971 16.2165C15.1471 16.9665 14.2652 17.5602 13.2513 17.9977C12.2374 18.4352 11.1541 18.654 10.0013 18.654ZM10.0013 16.9873C11.8624 16.9873 13.4388 16.3415 14.7305 15.0498C16.0221 13.7581 16.668 12.1817 16.668 10.3206C16.668 8.45953 16.0221 6.88314 14.7305 5.59147C13.4388 4.2998 11.8624 3.65397 10.0013 3.65397C8.14019 3.65397 6.5638 4.2998 5.27214 5.59147C3.98047 6.88314 3.33464 8.45953 3.33464 10.3206C3.33464 12.1817 3.98047 13.7581 5.27214 15.0498C6.5638 16.3415 8.14019 16.9873 10.0013 16.9873Z",fill:"#4D596C"}))),yx=e=>A.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M14.3462 8.73757C14.0406 8.43198 13.5451 8.43198 13.2395 8.73757C12.9339 9.04316 12.9339 9.53863 13.2395 9.84422L14.3462 8.73757ZM15.2392 10.7372L15.7925 10.1839L15.2392 10.7372ZM16.2377 13.1478L15.4552 13.1478L16.2377 13.1478ZM15.2392 15.5584L14.6859 15.0051L15.2392 15.5584ZM10.418 15.5584L9.86469 16.1118L10.418 15.5584ZM9.52499 13.5588C9.2194 13.2532 8.72393 13.2532 8.41834 13.5588C8.11275 13.8643 8.11275 14.3598 8.41834 14.6654L9.52499 13.5588ZM5.52477 11.7731C5.83036 12.0787 6.32583 12.0787 6.63142 11.7731C6.93701 11.4675 6.93701 10.972 6.63142 10.6665L5.52477 11.7731ZM9.45292 4.95224L10.0062 4.39892L9.45292 4.95224ZM10.346 6.95192C10.6515 7.25752 11.147 7.25752 11.4526 6.95192C11.7582 6.64633 11.7582 6.15087 11.4526 5.84527L10.346 6.95192ZM13.2395 9.84422L14.6859 11.2906L15.7925 10.1839L14.3462 8.73757L13.2395 9.84422ZM14.6859 11.2906C15.1785 11.7832 15.4552 12.4512 15.4552 13.1478L17.0202 13.1478C17.0202 12.0362 16.5786 10.97 15.7925 10.1839L14.6859 11.2906ZM15.4552 13.1478C15.4552 13.8445 15.1785 14.5125 14.6859 15.0051L15.7925 16.1118C16.5786 15.3257 17.0202 14.2595 17.0202 13.1478L15.4552 13.1478ZM14.6859 15.0051C13.6601 16.0308 11.9971 16.0308 10.9713 15.0051L9.86469 16.1118C11.5016 17.7487 14.1556 17.7487 15.7925 16.1118L14.6859 15.0051ZM10.9713 15.0051L9.52499 13.5588L8.41834 14.6654L9.86469 16.1118L10.9713 15.0051ZM6.63142 10.6665L5.18507 9.2201L4.07842 10.3268L5.52477 11.7731L6.63142 10.6665ZM5.18507 9.2201C4.69249 8.72752 4.41576 8.05944 4.41576 7.36283H2.85072C2.85072 8.47452 3.29234 9.54067 4.07842 10.3268L5.18507 9.2201ZM4.41576 7.36283C4.41576 6.66622 4.69249 5.99815 5.18507 5.50557L4.07842 4.39892C3.29234 5.185 2.85072 6.25115 2.85072 7.36283H4.41576ZM5.18507 5.50557C6.21081 4.47983 7.87386 4.47983 8.8996 5.50557L10.0062 4.39892C8.36932 2.76199 5.71534 2.76199 4.07842 4.39892L5.18507 5.50557ZM8.8996 5.50557L10.346 6.95192L11.4526 5.84527L10.0062 4.39892L8.8996 5.50557Z",fill:"#4D596C"}),A.createElement("rect",{x:6.36328,y:7.91895,width:1.66667,height:8.33333,rx:.833333,transform:"rotate(-45 6.36328 7.91895)",fill:"#4D596C"})),Cx=({onCreateClick:e,onLinkClick:t,haveCreateObjects:n,haveLinkObjects:r})=>u.jsxs(f.Stack,{gap:2,marginTop:"12px",children:[u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray1,children:E8}),u.jsxs(f.Stack,{gap:"12px",children:[n?u.jsxs(mx,{fullWidth:!0,onClick:e,size:"medium",children:[u.jsx(bx,{}),u.jsx("span",{className:"content__btn",children:Ju})]}):null,r?u.jsxs(gx,{fullWidth:!0,color:"tertiary",variant:"outlined",onClick:t,size:"medium",children:[u.jsx(yx,{}),u.jsx("span",{className:"content__btn",children:qu})]}):null]})]}),vx=e=>e.write.searchObjectList,B1=e=>e.write.objectDict,xx=e=>e.write.formFields,Ex=e=>e.write.dependentFieldsMap,Ix="Search in Connectors",wx="Search in Apps",_x="Start typing to search..",Sx="Smart search suggestions",Tx=":count result:countSuffix found for :searchObject in :connectorName",Ax="Back to search results",Lx="No search results found",V1=e=>A.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"#97A3B7",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{id:"icons/Actions/Search"},A.createElement("path",{id:"Shape",fillRule:"evenodd",clipRule:"evenodd",d:"M8.57633 7.54717H8.03431L7.8422 7.36192C8.51458 6.57976 8.91938 5.56432 8.91938 4.45969C8.91938 1.99657 6.92281 0 4.45969 0C1.99657 0 0 1.99657 0 4.45969C0 6.92281 1.99657 8.91938 4.45969 8.91938C5.56432 8.91938 6.57976 8.51458 7.36192 7.8422L7.54717 8.03431V8.57633L10.9777 12L12 10.9777L8.57633 7.54717ZM4.45969 7.54717C2.75129 7.54717 1.37221 6.1681 1.37221 4.45969C1.37221 2.75129 2.75129 1.37221 4.45969 1.37221C6.1681 1.37221 7.54717 2.75129 7.54717 4.45969C7.54717 6.1681 6.1681 7.54717 4.45969 7.54717Z"}))),Ox=f.styled(f.Stack)`
|
|
1231
1231
|
flex-flow: row nowrap;
|
|
1232
1232
|
align-items: center;
|
|
1233
1233
|
column-gap: 12px;
|
|
@@ -1237,28 +1237,28 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1237
1237
|
&:hover {
|
|
1238
1238
|
background-color: ${({isSelected:e})=>e?"rgb(80, 109, 255, 0.12)":"rgba(0, 0, 0, 0.04)"};
|
|
1239
1239
|
}
|
|
1240
|
-
`,
|
|
1240
|
+
`,Fx=f.styled("img")`
|
|
1241
1241
|
flex-shrink: 0;
|
|
1242
1242
|
display: block;
|
|
1243
1243
|
width: 24px;
|
|
1244
1244
|
height: 24px;
|
|
1245
1245
|
border-radius: 50%;
|
|
1246
|
-
`,G1=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=_.useContext(He),{label:i,description:c,avatarUrl:l,connectorName:d}=e,g=()=>{s(Pm,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:d}),r(e,t),o(
|
|
1246
|
+
`,G1=({data:e,suggestionType:t="basic",isSelected:n=!1,onSelect:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=_.useContext(He),{label:i,description:c,avatarUrl:l,connectorName:d}=e,g=()=>{s(Pm,{suggestion_type:t,search_keyword:i,sm_ids:a,connector_name:d}),r(e,t),o(s8(t))};return u.jsxs(Ox,{isSelected:n,onClick:g,children:[u.jsx(Fx,{src:l,alt:"option"}),u.jsxs(f.Stack,{children:[u.jsx(f.Typography,{color:f.theme.palette.gray.gray1,children:i}),u.jsx(f.Typography,{color:f.theme.palette.gray.gray3,fontSize:"12px",children:c})]})]})},Dx=f.styled(f.Stack)`
|
|
1247
1247
|
padding: 10px 0 10px 10px;
|
|
1248
|
-
`,{Control:
|
|
1248
|
+
`,{Control:kx}=gn,Nx=({children:e,...t})=>u.jsxs(kx,{...t,children:[u.jsx(Dx,{children:u.jsx(V1,{})}),e]}),Rx=e=>{const{data:t,isSelected:n,selectOption:r}=e;return u.jsx(G1,{data:t,isSelected:n,onSelect:r})},Mx={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})},Px=({options:e,value:t,inputValue:n,root:r,onChange:o,onInputChange:s,onReset:a,NoOptionsMessage:i,menuOpen:c})=>{const{availableFeatures:l,sendTrackingEvent:d,currentSmIds:g}=_.useContext(He),b=at(l,Ss),x=(h,{action:m})=>{m==="input-change"&&(s(h),h||a())},y=h=>{o(h),h||(s(""),a())},p=()=>{const h=[...new Set(e.map(m=>m.connectorName))];d(Mm,{connector_names:h,sm_ids:g})};return u.jsx(Ro,{name:"global-search",type:"select",value:t,inputValue:n,options:n?e:[],placeholder:b?wx:Ix,isSearchable:!0,filterOption:null,styles:Mx,onInputChange:x,onChange:y,isClearable:!0,menuPortalTarget:document.body,blurInputOnSelect:!0,onFocus:p,components:{DropdownIndicator:()=>null,IndicatorSeparator:()=>null,Option:Rx,Control:Nx,...i&&{NoOptionsMessage:i}},root:r,...typeof c=="boolean"&&{menuIsOpen:c}})},jx=f.styled(f.Stack)`
|
|
1249
1249
|
margin: ${({isEmpty:e})=>e?"0":"12px 0"};
|
|
1250
|
-
`,
|
|
1250
|
+
`,Bx=({objectId:e,searchString:t,fetchSearchResults:n})=>{var I;const[r,o]=T1(),s=_.useRef(null),a=me(B1),i=me(xx),c=me(Ex),l=_.useMemo(()=>e&&i&&i[e]&&Array.isArray(i[e])?{id:e,formFields:i[e]}:{id:"emptyFormId",formFields:[]},[i,e]),d=_.useMemo(()=>{const E=(l==null?void 0:l.formFields)||[];return Oc({formFields:E})},[l]),{setValue:g,inputChangeHandler:b,dateChangeHandler:x,clearDependentFields:y,handleValidationError:p,isErrorInValidations:h}=A1({state:r,dispatch:o,validations:d}),{fetchConfig:m}=F1({formState:r,formFields:l.formFields,formId:l.id}),v=_.useCallback(E=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(E)},500)},[n]);_.useEffect(()=>{const E=r.values,w=l.id,T=l.formFields;if(Object.values(E).filter(B=>!!B).length<T.length||!a||h()){s.current&&clearTimeout(s.current);return}const S=a[e].searchInterfaceDetails;if(!S)return;const L=a[e].connectorName,{id:N,args:D={}}=S,k=ha(r,D);v({id:w,interfaceId:N,searchString:t,connectorName:L,args:k})},[r,l,a,e,t,h,v]),_.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const C=(E,w,T)=>{if(w.action==="clear"&&w.name&&(g(w.name,""),y(w.name,c[e]),d[w.name].isRequired&&p(w.name,!0)),E&&typeof E=="object"&&"label"in E&&typeof E.label=="string"&&"value"in E&&(typeof E.value=="string"||typeof E.value=="number")&&typeof w.name<"u"){let S=!1;T&&(S=T.isMultiSelect||!1);const L=S?[{value:E.value,label:E.label}]:{value:E.value,label:E.label};g(w.name,L),y(w.name,c[e])}};return u.jsx(jx,{isEmpty:((I=l.formFields)==null?void 0:I.length)===0,children:u.jsx(Yf,{showGlobalLoader:!1,formConfig:[l],selectChangeHandler:C,inputChangeHandler:b,dateChangeHandler:x,onValidationError:p,labelSpacing:.5,fetchConfig:m,values:r.values,validations:d})})},Dc="@connector-agent-global-search-priority",kc=zb(),Vx=({objectList:e})=>({sortedObjectList:_.useMemo(()=>{const r=kc.getItem(Dc);return r?[...e].sort((o,s)=>(r[o.value]??0)>(r[s.value]??0)?-1:1):e},[e]),updatePriority:r=>{const o=kc.getItem(Dc)??{};o[r]||(o[r]=0),o[r]++,kc.setItem(Dc,o)}}),Gx=f.styled(f.Stack)`
|
|
1251
1251
|
padding: 8px 0;
|
|
1252
|
-
`,
|
|
1252
|
+
`,Hx=f.styled(f.Typography)`
|
|
1253
1253
|
padding: 6px 16px;
|
|
1254
1254
|
color: ${f.theme.palette.gray.gray4};
|
|
1255
1255
|
font-size: 13px;
|
|
1256
|
-
`,
|
|
1256
|
+
`,Wx=f.styled(f.Typography)`
|
|
1257
1257
|
padding: 6px 16px;
|
|
1258
1258
|
color: ${f.theme.palette.gray.gray3};
|
|
1259
1259
|
font-size: 11px;
|
|
1260
1260
|
text-transform: uppercase;
|
|
1261
|
-
`,Wx=({onSelect:e,selectedOption:t,options:n})=>n.length?u.jsxs(Vx,{children:[u.jsx(Gx,{children:wx}),u.jsx(Hx,{children:_x}),n.map(r=>u.jsx(G1,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null;var Wr=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(){}},ar=typeof window>"u"||"Deno"in globalThis;function Rt(){}function Zx(e,t){return typeof e=="function"?e(t):e}function Nc(e){return typeof e=="number"&&e>=0&&e!==1/0}function H1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zr(e,t){return typeof e=="function"?e(t):e}function Xt(e,t){return typeof e=="function"?e(t):e}function W1(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Rc(a,t.options))return!1}else if(!Vo(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 Z1(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ir(t.options.mutationKey)!==ir(s))return!1}else if(!Vo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Rc(e,t){return((t==null?void 0:t.queryKeyHashFn)||ir)(e)}function ir(e){return JSON.stringify(e,(t,n)=>Pc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Vo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Vo(e[n],t[n])):!1}function Mc(e,t){if(e===t)return e;const n=X1(e)&&X1(t);if(n||Pc(e)&&Pc(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 d=n?l:s[l];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(i[d]=void 0,c++):(i[d]=Mc(e[d],t[d]),i[d]===e[d]&&e[d]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function Ia(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 X1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pc(e){if(!z1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!z1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function z1(e){return Object.prototype.toString.call(e)==="[object Object]"}function Xx(e){return new Promise(t=>{setTimeout(t,e)})}function jc(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 Mc(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 Mc(e,t)}return t}function zx(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Yx(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wa=Symbol();function Y1(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===wa&&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===wa?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Jx=(kp=class extends Wr{constructor(){super();ie(this,lr);ie(this,Fn);ie(this,Xr);K(this,Xr,t=>{if(!ar&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Fn)||this.setEventListener(F(this,Xr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Fn))==null||t.call(this),K(this,Fn,void 0))}setEventListener(t){var n;K(this,Xr,t),(n=F(this,Fn))==null||n.call(this),K(this,Fn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,lr)!==t&&(K(this,lr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,lr)=="boolean"?F(this,lr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},lr=new WeakMap,Fn=new WeakMap,Xr=new WeakMap,kp),Bc=new Jx,qx=(Np=class extends Wr{constructor(){super();ie(this,zr,!0);ie(this,Dn);ie(this,Yr);K(this,Yr,t=>{if(!ar&&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,Dn)||this.setEventListener(F(this,Yr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Dn))==null||t.call(this),K(this,Dn,void 0))}setEventListener(t){var n;K(this,Yr,t),(n=F(this,Dn))==null||n.call(this),K(this,Dn,t(this.setOnline.bind(this)))}setOnline(t){F(this,zr)!==t&&(K(this,zr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,zr)}},zr=new WeakMap,Dn=new WeakMap,Yr=new WeakMap,Np),_a=new qx;function Vc(){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 $x(e){return Math.min(1e3*2**e,3e4)}function J1(e){return(e??"online")==="online"?_a.isOnline():!0}var q1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Gc(e){return e instanceof q1}function $1(e){let t=!1,n=0,r=!1,o;const s=Vc(),a=p=>{var h;r||(b(new q1(p)),(h=e.abort)==null||h.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>Bc.isFocused()&&(e.networkMode==="always"||_a.isOnline())&&e.canRun(),d=()=>J1(e.networkMode)&&e.canRun(),g=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),s.resolve(p))},b=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s.reject(p))},x=()=>new Promise(p=>{var h;o=m=>{(r||l())&&p(m)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(g).catch(m=>{var w;if(r)return;const v=e.retry??(ar?0:3),C=e.retryDelay??$x,I=typeof C=="function"?C(n,m):C,E=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,m);if(t||!E){b(m);return}n++,(w=e.onFail)==null||w.call(e,n,m),Xx(I).then(()=>l()?void 0:x()).then(()=>{t?b(m):y()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:d,start:()=>(d()?y():x().then(y),s)}}function Qx(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=i=>setTimeout(i,0);const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||a()}return c},batchCalls:i=>(...c)=>{s(()=>{i(...c)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var Ke=Qx(),Q1=(Rp=class{constructor(){ie(this,ur)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Nc(this.gcTime)&&K(this,ur,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ar?1/0:5*60*1e3))}clearGcTimeout(){F(this,ur)&&(clearTimeout(F(this,ur)),K(this,ur,void 0))}},ur=new WeakMap,Rp),Ux=(Mp=class extends Q1{constructor(t){super();ie(this,Yt);ie(this,Jr);ie(this,qr);ie(this,Mt);ie(this,dr);ie(this,ct);ie(this,Wo);ie(this,fr);K(this,fr,!1),K(this,Wo,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,dr,t.client),K(this,Mt,F(this,dr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Jr,Kx(this.options)),this.state=t.state??F(this,Jr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,ct))==null?void 0:t.promise}setOptions(t){this.options={...F(this,Wo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Mt).remove(this)}setData(t,n){const r=jc(this.state.data,t,this.options);return he(this,Yt,En).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){he(this,Yt,En).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,ct))==null?void 0:r.promise;return(o=F(this,ct))==null||o.cancel(t),n?n.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,Jr))}isActive(){return this.observers.some(t=>Xt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wa||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||!H1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,ct))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,ct))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Mt).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,ct)&&(F(this,fr)?F(this,ct).cancel({revert:!0}):F(this,ct).cancelRetry()),this.scheduleGc()),F(this,Mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,Yt,En).call(this,{type:"invalidate"})}fetch(t,n){var c,l,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,ct))return F(this,ct).continueRetry(),F(this,ct).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(b=>b.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(K(this,fr,!0),r.signal)})},s=()=>{const g=Y1(this.options,n),b={client:F(this,dr),queryKey:this.queryKey,meta:this.meta};return o(b),K(this,fr,!1),this.options.persister?this.options.persister(g,b,this):g(b)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,dr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),K(this,qr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&he(this,Yt,En).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const i=g=>{var b,x,y,p;Gc(g)&&g.silent||he(this,Yt,En).call(this,{type:"error",error:g}),Gc(g)||((x=(b=F(this,Mt).config).onError)==null||x.call(b,g,this),(p=(y=F(this,Mt).config).onSettled)==null||p.call(y,this.state.data,g,this)),this.scheduleGc()};return K(this,ct,$1({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var b,x,y,p;if(g===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(h){i(h);return}(x=(b=F(this,Mt).config).onSuccess)==null||x.call(b,g,this),(p=(y=F(this,Mt).config).onSettled)==null||p.call(y,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,b)=>{he(this,Yt,En).call(this,{type:"failed",failureCount:g,error:b})},onPause:()=>{he(this,Yt,En).call(this,{type:"pause"})},onContinue:()=>{he(this,Yt,En).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,ct).start()}},Jr=new WeakMap,qr=new WeakMap,Mt=new WeakMap,dr=new WeakMap,ct=new WeakMap,Wo=new WeakMap,fr=new WeakMap,Yt=new WeakSet,En=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,...U1(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 Gc(o)&&o.revert&&F(this,qr)?{...F(this,qr),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ke.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Mt).notify({query:this,type:"updated",action:t})})},Mp);function U1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:J1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Kx(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 eE=(Pp=class extends Wr{constructor(t={}){super();ie(this,on);this.config=t,K(this,on,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Rc(o,n);let a=this.get(s);return a||(a=new Ux({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,on).has(t.queryHash)||(F(this,on).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,on).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,on).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,on).get(t)}getAll(){return[...F(this,on).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>W1(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>W1(t,r)):n}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},on=new WeakMap,Pp),tE=(jp=class extends Q1{constructor(t){super();ie(this,an);ie(this,sn);ie(this,ut);ie(this,pr);this.mutationId=t.mutationId,K(this,ut,t.mutationCache),K(this,sn,[]),this.state=t.state||K1(),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,sn).includes(t)||(F(this,sn).push(t),this.clearGcTimeout(),F(this,ut).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,sn,F(this,sn).filter(n=>n!==t)),this.scheduleGc(),F(this,ut).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,sn).length||(this.state.status==="pending"?this.scheduleGc():F(this,ut).remove(this))}continue(){var t;return((t=F(this,pr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,d,g,b,x,y,p,h,m,v,C,I,E,w,T;K(this,pr,$1({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{he(this,an,Zn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{he(this,an,Zn).call(this,{type:"pause"})},onContinue:()=>{he(this,an,Zn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ut).canRun(this)}));const n=this.state.status==="pending",r=!F(this,pr).canStart();try{if(!n){he(this,an,Zn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,ut).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&he(this,an,Zn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,pr).start();return await((l=(c=F(this,ut).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((g=(d=this.options).onSuccess)==null?void 0:g.call(d,S,t,this.state.context)),await((x=(b=F(this,ut).config).onSettled)==null?void 0:x.call(b,S,null,this.state.variables,this.state.context,this)),await((p=(y=this.options).onSettled)==null?void 0:p.call(y,S,null,t,this.state.context)),he(this,an,Zn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(h=F(this,ut).config).onError)==null?void 0:m.call(h,S,t,this.state.context,this)),await((C=(v=this.options).onError)==null?void 0:C.call(v,S,t,this.state.context)),await((E=(I=F(this,ut).config).onSettled)==null?void 0:E.call(I,void 0,S,this.state.variables,this.state.context,this)),await((T=(w=this.options).onSettled)==null?void 0:T.call(w,void 0,S,t,this.state.context)),S}finally{he(this,an,Zn).call(this,{type:"error",error:S})}}finally{F(this,ut).runNext(this)}}},sn=new WeakMap,ut=new WeakMap,pr=new WeakMap,an=new WeakSet,Zn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ke.batch(()=>{F(this,sn).forEach(r=>{r.onMutationUpdate(t)}),F(this,ut).notify({mutation:this,type:"updated",action:t})})},jp);function K1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var nE=(Bp=class extends Wr{constructor(t={}){super();ie(this,bn);ie(this,Jt);ie(this,Zo);this.config=t,K(this,bn,new Set),K(this,Jt,new Map),K(this,Zo,0)}build(t,n,r){const o=new tE({mutationCache:this,mutationId:++Ma(this,Zo)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,bn).add(t);const n=Sa(t);if(typeof n=="string"){const r=F(this,Jt).get(n);r?r.push(t):F(this,Jt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,bn).delete(t)){const n=Sa(t);if(typeof n=="string"){const r=F(this,Jt).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,Jt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sa(t);if(typeof n=="string"){const r=F(this,Jt).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=Sa(t);if(typeof n=="string"){const o=(r=F(this,Jt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ke.batch(()=>{F(this,bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,bn).clear(),F(this,Jt).clear()})}getAll(){return Array.from(F(this,bn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Z1(n,r))}findAll(t={}){return this.getAll().filter(n=>Z1(t,n))}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ke.batch(()=>Promise.all(t.map(n=>n.continue().catch(Rt))))}},bn=new WeakMap,Jt=new WeakMap,Zo=new WeakMap,Bp);function Sa(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ep(e){return{onFetch:(t,n)=>{var d,g,b,x,y;const r=t.options,o=(b=(g=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:g.fetchMore)==null?void 0:b.direction,s=((x=t.state.data)==null?void 0:x.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const h=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},m=Y1(t.options,t.fetchOptions),v=async(C,I,E)=>{if(p)return Promise.reject();if(I==null&&C.pages.length)return Promise.resolve(C);const w={client:t.client,queryKey:t.queryKey,pageParam:I,direction:E?"backward":"forward",meta:t.options.meta};h(w);const T=await m(w),{maxPages:S}=t.options,L=E?Yx:zx;return{pages:L(C.pages,T,S),pageParams:L(C.pageParams,I,S)}};if(o&&s.length){const C=o==="backward",I=C?rE:tp,E={pages:s,pageParams:a},w=I(r,E);i=await v(E,w,C)}else{const C=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:tp(r,i);if(c>0&&I==null)break;i=await v(i,I),c++}while(c<C)}return i};t.options.persister?t.fetchFn=()=>{var p,h;return(h=(p=t.options).persister)==null?void 0:h.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function tp(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 rE(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var oE=(Vp=class{constructor(e={}){ie(this,Ze);ie(this,kn);ie(this,Nn);ie(this,$r);ie(this,Qr);ie(this,Rn);ie(this,Ur);ie(this,Kr);K(this,Ze,e.queryCache||new eE),K(this,kn,e.mutationCache||new nE),K(this,Nn,e.defaultOptions||{}),K(this,$r,new Map),K(this,Qr,new Map),K(this,Rn,0)}mount(){Ma(this,Rn)._++,F(this,Rn)===1&&(K(this,Ur,Bc.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ze).onFocus())})),K(this,Kr,_a.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ze).onOnline())})))}unmount(){var e,t;Ma(this,Rn)._--,F(this,Rn)===0&&((e=F(this,Ur))==null||e.call(this),K(this,Ur,void 0),(t=F(this,Kr))==null||t.call(this),K(this,Kr,void 0))}isFetching(e){return F(this,Ze).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,kn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Ze).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Ze).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Zr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Ze).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,Ze).get(r.queryHash),s=o==null?void 0:o.state.data,a=Zx(t,s);if(a!==void 0)return F(this,Ze).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ke.batch(()=>F(this,Ze).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,Ze).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Ze);Ke.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Ze);return Ke.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ke.batch(()=>F(this,Ze).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Rt).catch(Rt)}invalidateQueries(e,t={}){return Ke.batch(()=>(F(this,Ze).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ke.batch(()=>F(this,Ze).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Rt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Ze).build(this,t);return n.isStaleByTime(Zr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Rt).catch(Rt)}fetchInfiniteQuery(e){return e.behavior=ep(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Rt).catch(Rt)}ensureInfiniteQueryData(e){return e.behavior=ep(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _a.isOnline()?F(this,kn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Ze)}getMutationCache(){return F(this,kn)}getDefaultOptions(){return F(this,Nn)}setDefaultOptions(e){K(this,Nn,e)}setQueryDefaults(e,t){F(this,$r).set(ir(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,$r).values()],n={};return t.forEach(r=>{Vo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,Qr).set(ir(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,Qr).values()],n={};return t.forEach(r=>{Vo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Nn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rc(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===wa&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Nn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Ze).clear(),F(this,kn).clear()}},Ze=new WeakMap,kn=new WeakMap,Nn=new WeakMap,$r=new WeakMap,Qr=new WeakMap,Rn=new WeakMap,Ur=new WeakMap,Kr=new WeakMap,Vp),sE=(Gp=class extends Wr{constructor(t,n){super();ie(this,Le);ie(this,vt);ie(this,be);ie(this,Xo);ie(this,dt);ie(this,hr);ie(this,eo);ie(this,Mn);ie(this,cn);ie(this,zo);ie(this,to);ie(this,no);ie(this,gr);ie(this,mr);ie(this,Pn);ie(this,ro,new Set);this.options=n,K(this,vt,t),K(this,cn,null),K(this,Mn,Vc()),this.options.experimental_prefetchInRender||F(this,Mn).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,be).addObserver(this),np(F(this,be),this.options)?he(this,Le,es).call(this):this.updateResult(),he(this,Le,pl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Hc(F(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Hc(F(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,Le,hl).call(this),he(this,Le,gl).call(this),F(this,be).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,be);if(this.options=F(this,vt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xt(this.options.enabled,F(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,Le,ml).call(this),F(this,be).setOptions(this.options),r._defaulted&&!Ia(this.options,r)&&F(this,vt).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,be),observer:this});const s=this.hasListeners();s&&rp(F(this,be),o,this.options,r)&&he(this,Le,es).call(this),this.updateResult(n),s&&(F(this,be)!==o||Xt(this.options.enabled,F(this,be))!==Xt(r.enabled,F(this,be))||Zr(this.options.staleTime,F(this,be))!==Zr(r.staleTime,F(this,be)))&&he(this,Le,ul).call(this);const a=he(this,Le,dl).call(this);s&&(F(this,be)!==o||Xt(this.options.enabled,F(this,be))!==Xt(r.enabled,F(this,be))||a!==F(this,Pn))&&he(this,Le,fl).call(this,a)}getOptimisticResult(t){const n=F(this,vt).getQueryCache().build(F(this,vt),t),r=this.createResult(n,t);return iE(this,r)&&(K(this,dt,r),K(this,eo,this.options),K(this,hr,F(this,be).state)),r}getCurrentResult(){return F(this,dt)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,ro).add(t)}getCurrentQuery(){return F(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,vt).defaultQueryOptions(t),r=F(this,vt).getQueryCache().build(F(this,vt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return he(this,Le,es).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,dt)))}createResult(t,n){var S;const r=F(this,be),o=this.options,s=F(this,dt),a=F(this,hr),i=F(this,eo),l=t!==r?t.state:F(this,Xo),{state:d}=t;let g={...d},b=!1,x;if(n._optimisticResults){const L=this.hasListeners(),N=!L&&np(t,n),D=L&&rp(t,r,n,o);(N||D)&&(g={...g,...U1(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:y,errorUpdatedAt:p,status:h}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===F(this,zo))x=F(this,to);else try{K(this,zo,n.select),x=n.select(g.data),x=jc(s==null?void 0:s.data,x,n),K(this,to,x),K(this,cn,null)}catch(L){K(this,cn,L)}else x=g.data;if(n.placeholderData!==void 0&&x===void 0&&h==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,no))==null?void 0:S.state.data,F(this,no)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),K(this,cn,null)}catch(N){K(this,cn,N)}L!==void 0&&(h="success",x=jc(s==null?void 0:s.data,L,n),b=!0)}F(this,cn)&&(y=F(this,cn),x=F(this,to),p=Date.now(),h="error");const m=g.fetchStatus==="fetching",v=h==="pending",C=h==="error",I=v&&m,E=x!==void 0,T={status:h,fetchStatus:g.fetchStatus,isPending:v,isSuccess:h==="success",isError:C,isInitialLoading:I,isLoading:I,data:x,dataUpdatedAt:g.dataUpdatedAt,error:y,errorUpdatedAt:p,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>l.dataUpdateCount||g.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!v,isLoadingError:C&&!E,isPaused:g.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:C&&E,isStale:Wc(t,n),refetch:this.refetch,promise:F(this,Mn)};if(this.options.experimental_prefetchInRender){const L=k=>{T.status==="error"?k.reject(T.error):T.data!==void 0&&k.resolve(T.data)},N=()=>{const k=K(this,Mn,T.promise=Vc());L(k)},D=F(this,Mn);switch(D.status){case"pending":t.queryHash===r.queryHash&&L(D);break;case"fulfilled":(T.status==="error"||T.data!==D.value)&&N();break;case"rejected":(T.status!=="error"||T.error!==D.reason)&&N();break}}return T}updateResult(t){const n=F(this,dt),r=this.createResult(F(this,be),this.options);if(K(this,hr,F(this,be).state),K(this,eo,this.options),F(this,hr).data!==void 0&&K(this,no,F(this,be)),Ia(r,n))return;K(this,dt,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,ro).size)return!0;const c=new Set(i??F(this,ro));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,dt)).some(l=>{const d=l;return F(this,dt)[d]!==n[d]&&c.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),he(this,Le,Zp).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,Le,pl).call(this)}},vt=new WeakMap,be=new WeakMap,Xo=new WeakMap,dt=new WeakMap,hr=new WeakMap,eo=new WeakMap,Mn=new WeakMap,cn=new WeakMap,zo=new WeakMap,to=new WeakMap,no=new WeakMap,gr=new WeakMap,mr=new WeakMap,Pn=new WeakMap,ro=new WeakMap,Le=new WeakSet,es=function(t){he(this,Le,ml).call(this);let n=F(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Rt)),n},ul=function(){he(this,Le,hl).call(this);const t=Zr(this.options.staleTime,F(this,be));if(ar||F(this,dt).isStale||!Nc(t))return;const r=H1(F(this,dt).dataUpdatedAt,t)+1;K(this,gr,setTimeout(()=>{F(this,dt).isStale||this.updateResult()},r))},dl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,be)):this.options.refetchInterval)??!1},fl=function(t){he(this,Le,gl).call(this),K(this,Pn,t),!(ar||Xt(this.options.enabled,F(this,be))===!1||!Nc(F(this,Pn))||F(this,Pn)===0)&&K(this,mr,setInterval(()=>{(this.options.refetchIntervalInBackground||Bc.isFocused())&&he(this,Le,es).call(this)},F(this,Pn)))},pl=function(){he(this,Le,ul).call(this),he(this,Le,fl).call(this,he(this,Le,dl).call(this))},hl=function(){F(this,gr)&&(clearTimeout(F(this,gr)),K(this,gr,void 0))},gl=function(){F(this,mr)&&(clearInterval(F(this,mr)),K(this,mr,void 0))},ml=function(){const t=F(this,vt).getQueryCache().build(F(this,vt),this.options);if(t===F(this,be))return;const n=F(this,be);K(this,be,t),K(this,Xo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Zp=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,dt))}),F(this,vt).getQueryCache().notify({query:F(this,be),type:"observerResultsUpdated"})})},Gp);function aE(e,t){return Xt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function np(e,t){return aE(e,t)||e.state.data!==void 0&&Hc(e,t,t.refetchOnMount)}function Hc(e,t,n){if(Xt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Wc(e,t)}return!1}function rp(e,t,n,r){return(e!==t||Xt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Wc(e,n)}function Wc(e,t){return Xt(t.enabled,e)!==!1&&e.isStaleByTime(Zr(t.staleTime,e))}function iE(e,t){return!Ia(e.getCurrentResult(),t)}var cE=(Hp=class extends Wr{constructor(n,r){super();ie(this,Cn);ie(this,jn);ie(this,Bn);ie(this,xt);ie(this,yn);K(this,jn,n),this.setOptions(r),this.bindMethods(),he(this,Cn,Pa).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,jn).defaultMutationOptions(n),Ia(this.options,r)||F(this,jn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ir(r.mutationKey)!==ir(this.options.mutationKey)?this.reset():((o=F(this,xt))==null?void 0:o.state.status)==="pending"&&F(this,xt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,xt))==null||n.removeObserver(this)}onMutationUpdate(n){he(this,Cn,Pa).call(this),he(this,Cn,bl).call(this,n)}getCurrentResult(){return F(this,Bn)}reset(){var n;(n=F(this,xt))==null||n.removeObserver(this),K(this,xt,void 0),he(this,Cn,Pa).call(this),he(this,Cn,bl).call(this)}mutate(n,r){var o;return K(this,yn,r),(o=F(this,xt))==null||o.removeObserver(this),K(this,xt,F(this,jn).getMutationCache().build(F(this,jn),this.options)),F(this,xt).addObserver(this),F(this,xt).execute(n)}},jn=new WeakMap,Bn=new WeakMap,xt=new WeakMap,yn=new WeakMap,Cn=new WeakSet,Pa=function(){var r;const n=((r=F(this,xt))==null?void 0:r.state)??K1();K(this,Bn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},bl=function(n){Ke.batch(()=>{var r,o,s,a,i,c,l,d;if(F(this,yn)&&this.hasListeners()){const g=F(this,Bn).variables,b=F(this,Bn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,yn)).onSuccess)==null||o.call(r,n.data,g,b),(a=(s=F(this,yn)).onSettled)==null||a.call(s,n.data,null,g,b)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,yn)).onError)==null||c.call(i,n.error,g,b),(d=(l=F(this,yn)).onSettled)==null||d.call(l,void 0,n.error,g,b))}this.listeners.forEach(g=>{g(F(this,Bn))})})},Hp),op=A.createContext(void 0),Zc=e=>{const t=A.useContext(op);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},lE=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(op.Provider,{value:e,children:t})),sp=A.createContext(!1),uE=()=>A.useContext(sp);sp.Provider;function dE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var fE=A.createContext(dE()),pE=()=>A.useContext(fE);function ap(e,t){return typeof e=="function"?e(...t):!!e}function Xc(){}var hE=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},gE=e=>{A.useEffect(()=>{e.clearReset()},[e])},mE=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||ap(n,[e.error,r])),bE=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)))},yE=(e,t)=>e.isLoading&&e.isFetching&&!t,CE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ip=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function vE(e,t,n){var g,b,x,y,p;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Zc(),o=uE(),s=pE(),a=r.defaultQueryOptions(e);(b=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||b.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",bE(a),hE(a,s),gE(s);const i=!r.getQueryCache().get(a.queryHash),[c]=A.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),d=!o&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(h=>{const m=d?c.subscribe(Ke.batchCalls(h)):Xc;return c.updateResult(),m},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),CE(a,l))throw ip(a,c,s);if(mE({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((y=(x=r.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||y.call(x,a,l),a.experimental_prefetchInRender&&!ar&&yE(l,o)){const h=i?ip(a,c,s):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;h==null||h.catch(Xc).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Go(e,t){return vE(e,sE)}function mn(e,t){const n=Zc(),[r]=A.useState(()=>new cE(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const o=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(Ke.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=A.useCallback((a,i)=>{r.mutate(a,i).catch(Xc)},[r]);if(o.error&&ap(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const xE=e=>new Promise(t=>setTimeout(t,e)),cp=({apiFn:e,intervalMillis:t,maxRetries:n,increaseIntervalMillis:r=0,isSatisfied:o,pushIntermediateResults:s=()=>{}})=>(...i)=>{const c=async(l=0)=>{const d=await e(...i);if(s(d),o(d))return s(null),d;if(l>=n)throw d;return l++,t+=r,xE(t).then(()=>c(l))};return c()},EE=async({conversationId:e,senderEmail:t})=>{try{const n=await Ne({url:bt(Y7,{conversationId:e}),params:{senderEmail:t},method:Ve.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},lp=({conversationId:e,senderEmail:t,enabled:n})=>Go({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>EE({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),up="/v1/api",IE=`${up}/connectors/forms/:formId/search`,wE=`${up}/connectors/conversation/:conversationId/smart-suggestions`,_E=e=>{if(e.status!=="completed")return e;const t=e.smart_suggestions??[],n=[];for(const r of t)n.push({label:r.search_string,description:`${r.connector_name??""} - ${r.object_name??""}`,avatarUrl:r.connector_logo,value:r.form_id,connectorName:r.connector_name,objectName:r.object_name});return{...e,suggestedOptions:n}},SE=cp({apiFn:async({conversationId:e})=>{try{const t=await Ne({url:bt(wE,{conversationId:e}),method:Ve.GET}),n=t==null?void 0:t.data;return _E(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),TE=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=lp({conversationId:e,senderEmail:t,enabled:n});return Go({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>SE({conversationId:e}),enabled:n&&r})},AE=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=_.useState(""),{conversationId:i,email:c,availableFeatures:l}=_.useContext(He),d=me(Cx),g=me(B1),b=at(l,t3),{sortedObjectList:x,updatePriority:y}=Bx({objectList:d}),{data:p}=TE({enabled:b&&!!i,conversationId:String(i),senderEmail:c}),h=(p==null?void 0:p.suggestedOptions)??[],m=_.useMemo(()=>!g||!x.length?[]:x.map(({value:C})=>{const I=g[C];return I?{description:`${I.connectorName??""} - ${I.searchObject}`,avatarUrl:I.logoUrl,label:"",value:C,connectorName:I.connectorName,objectName:I.searchObject}:null}).filter(C=>!!C),[x,g]),v=C=>{n(C),C&&y(""+C.value)};return m.length?u.jsxs(f.Stack,{children:[u.jsx(Mx,{value:e,options:m.map(C=>({...C,label:s})),inputValue:s,root:t,onInputChange:a,onChange:v,onReset:o,NoOptionsMessage:({selectOption:C})=>u.jsx(Wx,{selectedOption:e,onSelect:C,options:h}),menuOpen:!s&&!h.length?!1:void 0}),e?u.jsx(jx,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},LE="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",OE=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 Ne({url:`${$7.replace(":id",e)}?${s.toString()}`,method:Ve.POST,data:{externalResourceId:t,conversationId:n}})},FE=({onSuccess:e})=>mn({mutationFn:OE,onSuccess:()=>{Se({message:bb,type:Ut}),e==null||e()},onError:()=>{Se({message:yb,type:qe})}}),DE="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",kE=f.styled(f.Stack)`
|
|
1261
|
+
`,Zx=({onSelect:e,selectedOption:t,options:n})=>n.length?u.jsxs(Gx,{children:[u.jsx(Hx,{children:_x}),u.jsx(Wx,{children:Sx}),n.map(r=>u.jsx(G1,{suggestionType:"smart",data:r,isSelected:t===r,onSelect:e},r.label+r.description))]}):null;var Wr=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(){}},ir=typeof window>"u"||"Deno"in globalThis;function Rt(){}function Xx(e,t){return typeof e=="function"?e(t):e}function Nc(e){return typeof e=="number"&&e>=0&&e!==1/0}function H1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zr(e,t){return typeof e=="function"?e(t):e}function Xt(e,t){return typeof e=="function"?e(t):e}function W1(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Rc(a,t.options))return!1}else if(!Vo(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 Z1(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(cr(t.options.mutationKey)!==cr(s))return!1}else if(!Vo(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Rc(e,t){return((t==null?void 0:t.queryKeyHashFn)||cr)(e)}function cr(e){return JSON.stringify(e,(t,n)=>Pc(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Vo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Vo(e[n],t[n])):!1}function Mc(e,t){if(e===t)return e;const n=X1(e)&&X1(t);if(n||Pc(e)&&Pc(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 d=n?l:s[l];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(i[d]=void 0,c++):(i[d]=Mc(e[d],t[d]),i[d]===e[d]&&e[d]!==void 0&&c++)}return o===a&&c===o?e:i}return t}function Ia(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 X1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pc(e){if(!z1(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!z1(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function z1(e){return Object.prototype.toString.call(e)==="[object Object]"}function zx(e){return new Promise(t=>{setTimeout(t,e)})}function jc(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 Mc(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 Mc(e,t)}return t}function Yx(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Jx(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var wa=Symbol();function Y1(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===wa&&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===wa?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var qx=(kp=class extends Wr{constructor(){super();ie(this,ur);ie(this,Fn);ie(this,Xr);K(this,Xr,t=>{if(!ir&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){F(this,Fn)||this.setEventListener(F(this,Xr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Fn))==null||t.call(this),K(this,Fn,void 0))}setEventListener(t){var n;K(this,Xr,t),(n=F(this,Fn))==null||n.call(this),K(this,Fn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){F(this,ur)!==t&&(K(this,ur,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof F(this,ur)=="boolean"?F(this,ur):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ur=new WeakMap,Fn=new WeakMap,Xr=new WeakMap,kp),Bc=new qx,$x=(Np=class extends Wr{constructor(){super();ie(this,zr,!0);ie(this,Dn);ie(this,Yr);K(this,Yr,t=>{if(!ir&&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,Dn)||this.setEventListener(F(this,Yr))}onUnsubscribe(){var t;this.hasListeners()||((t=F(this,Dn))==null||t.call(this),K(this,Dn,void 0))}setEventListener(t){var n;K(this,Yr,t),(n=F(this,Dn))==null||n.call(this),K(this,Dn,t(this.setOnline.bind(this)))}setOnline(t){F(this,zr)!==t&&(K(this,zr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return F(this,zr)}},zr=new WeakMap,Dn=new WeakMap,Yr=new WeakMap,Np),_a=new $x;function Vc(){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 Qx(e){return Math.min(1e3*2**e,3e4)}function J1(e){return(e??"online")==="online"?_a.isOnline():!0}var q1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Gc(e){return e instanceof q1}function $1(e){let t=!1,n=0,r=!1,o;const s=Vc(),a=p=>{var h;r||(b(new q1(p)),(h=e.abort)==null||h.call(e))},i=()=>{t=!0},c=()=>{t=!1},l=()=>Bc.isFocused()&&(e.networkMode==="always"||_a.isOnline())&&e.canRun(),d=()=>J1(e.networkMode)&&e.canRun(),g=p=>{var h;r||(r=!0,(h=e.onSuccess)==null||h.call(e,p),o==null||o(),s.resolve(p))},b=p=>{var h;r||(r=!0,(h=e.onError)==null||h.call(e,p),o==null||o(),s.reject(p))},x=()=>new Promise(p=>{var h;o=m=>{(r||l())&&p(m)},(h=e.onPause)==null||h.call(e)}).then(()=>{var p;o=void 0,r||(p=e.onContinue)==null||p.call(e)}),y=()=>{if(r)return;let p;const h=n===0?e.initialPromise:void 0;try{p=h??e.fn()}catch(m){p=Promise.reject(m)}Promise.resolve(p).then(g).catch(m=>{var w;if(r)return;const v=e.retry??(ir?0:3),C=e.retryDelay??Qx,I=typeof C=="function"?C(n,m):C,E=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,m);if(t||!E){b(m);return}n++,(w=e.onFail)==null||w.call(e,n,m),zx(I).then(()=>l()?void 0:x()).then(()=>{t?b(m):y()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:c,canStart:d,start:()=>(d()?y():x().then(y),s)}}function Ux(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=i=>setTimeout(i,0);const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(c=>{n(c)})})})};return{batch:i=>{let c;t++;try{c=i()}finally{t--,t||a()}return c},batchCalls:i=>(...c)=>{s(()=>{i(...c)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var Ke=Ux(),Q1=(Rp=class{constructor(){ie(this,dr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Nc(this.gcTime)&&K(this,dr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ir?1/0:5*60*1e3))}clearGcTimeout(){F(this,dr)&&(clearTimeout(F(this,dr)),K(this,dr,void 0))}},dr=new WeakMap,Rp),Kx=(Mp=class extends Q1{constructor(t){super();ie(this,Yt);ie(this,Jr);ie(this,qr);ie(this,Mt);ie(this,fr);ie(this,ct);ie(this,Wo);ie(this,pr);K(this,pr,!1),K(this,Wo,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,fr,t.client),K(this,Mt,F(this,fr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Jr,eE(this.options)),this.state=t.state??F(this,Jr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=F(this,ct))==null?void 0:t.promise}setOptions(t){this.options={...F(this,Wo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&F(this,Mt).remove(this)}setData(t,n){const r=jc(this.state.data,t,this.options);return he(this,Yt,En).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){he(this,Yt,En).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=F(this,ct))==null?void 0:r.promise;return(o=F(this,ct))==null||o.cancel(t),n?n.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(F(this,Jr))}isActive(){return this.observers.some(t=>Xt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wa||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||!H1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,ct))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=F(this,ct))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),F(this,Mt).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,ct)&&(F(this,pr)?F(this,ct).cancel({revert:!0}):F(this,ct).cancelRetry()),this.scheduleGc()),F(this,Mt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||he(this,Yt,En).call(this,{type:"invalidate"})}fetch(t,n){var c,l,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(F(this,ct))return F(this,ct).continueRetry(),F(this,ct).promise}if(t&&this.setOptions(t),!this.options.queryFn){const g=this.observers.find(b=>b.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(K(this,pr,!0),r.signal)})},s=()=>{const g=Y1(this.options,n),b={client:F(this,fr),queryKey:this.queryKey,meta:this.meta};return o(b),K(this,pr,!1),this.options.persister?this.options.persister(g,b,this):g(b)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:F(this,fr),state:this.state,fetchFn:s};o(a),(c=this.options.behavior)==null||c.onFetch(a,this),K(this,qr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&he(this,Yt,En).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const i=g=>{var b,x,y,p;Gc(g)&&g.silent||he(this,Yt,En).call(this,{type:"error",error:g}),Gc(g)||((x=(b=F(this,Mt).config).onError)==null||x.call(b,g,this),(p=(y=F(this,Mt).config).onSettled)==null||p.call(y,this.state.data,g,this)),this.scheduleGc()};return K(this,ct,$1({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:g=>{var b,x,y,p;if(g===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(g)}catch(h){i(h);return}(x=(b=F(this,Mt).config).onSuccess)==null||x.call(b,g,this),(p=(y=F(this,Mt).config).onSettled)==null||p.call(y,g,this.state.error,this),this.scheduleGc()},onError:i,onFail:(g,b)=>{he(this,Yt,En).call(this,{type:"failed",failureCount:g,error:b})},onPause:()=>{he(this,Yt,En).call(this,{type:"pause"})},onContinue:()=>{he(this,Yt,En).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),F(this,ct).start()}},Jr=new WeakMap,qr=new WeakMap,Mt=new WeakMap,fr=new WeakMap,ct=new WeakMap,Wo=new WeakMap,pr=new WeakMap,Yt=new WeakSet,En=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,...U1(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 Gc(o)&&o.revert&&F(this,qr)?{...F(this,qr),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ke.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),F(this,Mt).notify({query:this,type:"updated",action:t})})},Mp);function U1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:J1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function eE(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 tE=(Pp=class extends Wr{constructor(t={}){super();ie(this,on);this.config=t,K(this,on,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Rc(o,n);let a=this.get(s);return a||(a=new Kx({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){F(this,on).has(t.queryHash)||(F(this,on).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=F(this,on).get(t.queryHash);n&&(t.destroy(),n===t&&F(this,on).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ke.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return F(this,on).get(t)}getAll(){return[...F(this,on).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>W1(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>W1(t,r)):n}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ke.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},on=new WeakMap,Pp),nE=(jp=class extends Q1{constructor(t){super();ie(this,an);ie(this,sn);ie(this,ut);ie(this,hr);this.mutationId=t.mutationId,K(this,ut,t.mutationCache),K(this,sn,[]),this.state=t.state||K1(),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,sn).includes(t)||(F(this,sn).push(t),this.clearGcTimeout(),F(this,ut).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,sn,F(this,sn).filter(n=>n!==t)),this.scheduleGc(),F(this,ut).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){F(this,sn).length||(this.state.status==="pending"?this.scheduleGc():F(this,ut).remove(this))}continue(){var t;return((t=F(this,hr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,a,i,c,l,d,g,b,x,y,p,h,m,v,C,I,E,w,T;K(this,hr,$1({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,L)=>{he(this,an,Zn).call(this,{type:"failed",failureCount:S,error:L})},onPause:()=>{he(this,an,Zn).call(this,{type:"pause"})},onContinue:()=>{he(this,an,Zn).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>F(this,ut).canRun(this)}));const n=this.state.status==="pending",r=!F(this,hr).canStart();try{if(!n){he(this,an,Zn).call(this,{type:"pending",variables:t,isPaused:r}),await((s=(o=F(this,ut).config).onMutate)==null?void 0:s.call(o,t,this));const L=await((i=(a=this.options).onMutate)==null?void 0:i.call(a,t));L!==this.state.context&&he(this,an,Zn).call(this,{type:"pending",context:L,variables:t,isPaused:r})}const S=await F(this,hr).start();return await((l=(c=F(this,ut).config).onSuccess)==null?void 0:l.call(c,S,t,this.state.context,this)),await((g=(d=this.options).onSuccess)==null?void 0:g.call(d,S,t,this.state.context)),await((x=(b=F(this,ut).config).onSettled)==null?void 0:x.call(b,S,null,this.state.variables,this.state.context,this)),await((p=(y=this.options).onSettled)==null?void 0:p.call(y,S,null,t,this.state.context)),he(this,an,Zn).call(this,{type:"success",data:S}),S}catch(S){try{throw await((m=(h=F(this,ut).config).onError)==null?void 0:m.call(h,S,t,this.state.context,this)),await((C=(v=this.options).onError)==null?void 0:C.call(v,S,t,this.state.context)),await((E=(I=F(this,ut).config).onSettled)==null?void 0:E.call(I,void 0,S,this.state.variables,this.state.context,this)),await((T=(w=this.options).onSettled)==null?void 0:T.call(w,void 0,S,t,this.state.context)),S}finally{he(this,an,Zn).call(this,{type:"error",error:S})}}finally{F(this,ut).runNext(this)}}},sn=new WeakMap,ut=new WeakMap,hr=new WeakMap,an=new WeakSet,Zn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ke.batch(()=>{F(this,sn).forEach(r=>{r.onMutationUpdate(t)}),F(this,ut).notify({mutation:this,type:"updated",action:t})})},jp);function K1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rE=(Bp=class extends Wr{constructor(t={}){super();ie(this,bn);ie(this,Jt);ie(this,Zo);this.config=t,K(this,bn,new Set),K(this,Jt,new Map),K(this,Zo,0)}build(t,n,r){const o=new nE({mutationCache:this,mutationId:++Ma(this,Zo)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){F(this,bn).add(t);const n=Sa(t);if(typeof n=="string"){const r=F(this,Jt).get(n);r?r.push(t):F(this,Jt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(F(this,bn).delete(t)){const n=Sa(t);if(typeof n=="string"){const r=F(this,Jt).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,Jt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sa(t);if(typeof n=="string"){const r=F(this,Jt).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=Sa(t);if(typeof n=="string"){const o=(r=F(this,Jt).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ke.batch(()=>{F(this,bn).forEach(t=>{this.notify({type:"removed",mutation:t})}),F(this,bn).clear(),F(this,Jt).clear()})}getAll(){return Array.from(F(this,bn))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Z1(n,r))}findAll(t={}){return this.getAll().filter(n=>Z1(t,n))}notify(t){Ke.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ke.batch(()=>Promise.all(t.map(n=>n.continue().catch(Rt))))}},bn=new WeakMap,Jt=new WeakMap,Zo=new WeakMap,Bp);function Sa(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ep(e){return{onFetch:(t,n)=>{var d,g,b,x,y;const r=t.options,o=(b=(g=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:g.fetchMore)==null?void 0:b.direction,s=((x=t.state.data)==null?void 0:x.pages)||[],a=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},c=0;const l=async()=>{let p=!1;const h=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(t.signal.aborted?p=!0:t.signal.addEventListener("abort",()=>{p=!0}),t.signal)})},m=Y1(t.options,t.fetchOptions),v=async(C,I,E)=>{if(p)return Promise.reject();if(I==null&&C.pages.length)return Promise.resolve(C);const w={client:t.client,queryKey:t.queryKey,pageParam:I,direction:E?"backward":"forward",meta:t.options.meta};h(w);const T=await m(w),{maxPages:S}=t.options,L=E?Jx:Yx;return{pages:L(C.pages,T,S),pageParams:L(C.pageParams,I,S)}};if(o&&s.length){const C=o==="backward",I=C?oE:tp,E={pages:s,pageParams:a},w=I(r,E);i=await v(E,w,C)}else{const C=e??s.length;do{const I=c===0?a[0]??r.initialPageParam:tp(r,i);if(c>0&&I==null)break;i=await v(i,I),c++}while(c<C)}return i};t.options.persister?t.fetchFn=()=>{var p,h;return(h=(p=t.options).persister)==null?void 0:h.call(p,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function tp(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 oE(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var sE=(Vp=class{constructor(e={}){ie(this,Ze);ie(this,kn);ie(this,Nn);ie(this,$r);ie(this,Qr);ie(this,Rn);ie(this,Ur);ie(this,Kr);K(this,Ze,e.queryCache||new tE),K(this,kn,e.mutationCache||new rE),K(this,Nn,e.defaultOptions||{}),K(this,$r,new Map),K(this,Qr,new Map),K(this,Rn,0)}mount(){Ma(this,Rn)._++,F(this,Rn)===1&&(K(this,Ur,Bc.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ze).onFocus())})),K(this,Kr,_a.subscribe(async e=>{e&&(await this.resumePausedMutations(),F(this,Ze).onOnline())})))}unmount(){var e,t;Ma(this,Rn)._--,F(this,Rn)===0&&((e=F(this,Ur))==null||e.call(this),K(this,Ur,void 0),(t=F(this,Kr))==null||t.call(this),K(this,Kr,void 0))}isFetching(e){return F(this,Ze).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return F(this,kn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=F(this,Ze).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=F(this,Ze).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Zr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return F(this,Ze).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,Ze).get(r.queryHash),s=o==null?void 0:o.state.data,a=Xx(t,s);if(a!==void 0)return F(this,Ze).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ke.batch(()=>F(this,Ze).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,Ze).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=F(this,Ze);Ke.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=F(this,Ze);return Ke.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ke.batch(()=>F(this,Ze).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Rt).catch(Rt)}invalidateQueries(e,t={}){return Ke.batch(()=>(F(this,Ze).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ke.batch(()=>F(this,Ze).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Rt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Rt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=F(this,Ze).build(this,t);return n.isStaleByTime(Zr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Rt).catch(Rt)}fetchInfiniteQuery(e){return e.behavior=ep(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Rt).catch(Rt)}ensureInfiniteQueryData(e){return e.behavior=ep(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _a.isOnline()?F(this,kn).resumePausedMutations():Promise.resolve()}getQueryCache(){return F(this,Ze)}getMutationCache(){return F(this,kn)}getDefaultOptions(){return F(this,Nn)}setDefaultOptions(e){K(this,Nn,e)}setQueryDefaults(e,t){F(this,$r).set(cr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...F(this,$r).values()],n={};return t.forEach(r=>{Vo(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){F(this,Qr).set(cr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...F(this,Qr).values()],n={};return t.forEach(r=>{Vo(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...F(this,Nn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rc(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===wa&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...F(this,Nn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){F(this,Ze).clear(),F(this,kn).clear()}},Ze=new WeakMap,kn=new WeakMap,Nn=new WeakMap,$r=new WeakMap,Qr=new WeakMap,Rn=new WeakMap,Ur=new WeakMap,Kr=new WeakMap,Vp),aE=(Gp=class extends Wr{constructor(t,n){super();ie(this,Le);ie(this,vt);ie(this,be);ie(this,Xo);ie(this,dt);ie(this,gr);ie(this,eo);ie(this,Mn);ie(this,cn);ie(this,zo);ie(this,to);ie(this,no);ie(this,mr);ie(this,br);ie(this,Pn);ie(this,ro,new Set);this.options=n,K(this,vt,t),K(this,cn,null),K(this,Mn,Vc()),this.options.experimental_prefetchInRender||F(this,Mn).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,be).addObserver(this),np(F(this,be),this.options)?he(this,Le,es).call(this):this.updateResult(),he(this,Le,pl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Hc(F(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Hc(F(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,he(this,Le,hl).call(this),he(this,Le,gl).call(this),F(this,be).removeObserver(this)}setOptions(t,n){const r=this.options,o=F(this,be);if(this.options=F(this,vt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xt(this.options.enabled,F(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");he(this,Le,ml).call(this),F(this,be).setOptions(this.options),r._defaulted&&!Ia(this.options,r)&&F(this,vt).getQueryCache().notify({type:"observerOptionsUpdated",query:F(this,be),observer:this});const s=this.hasListeners();s&&rp(F(this,be),o,this.options,r)&&he(this,Le,es).call(this),this.updateResult(n),s&&(F(this,be)!==o||Xt(this.options.enabled,F(this,be))!==Xt(r.enabled,F(this,be))||Zr(this.options.staleTime,F(this,be))!==Zr(r.staleTime,F(this,be)))&&he(this,Le,ul).call(this);const a=he(this,Le,dl).call(this);s&&(F(this,be)!==o||Xt(this.options.enabled,F(this,be))!==Xt(r.enabled,F(this,be))||a!==F(this,Pn))&&he(this,Le,fl).call(this,a)}getOptimisticResult(t){const n=F(this,vt).getQueryCache().build(F(this,vt),t),r=this.createResult(n,t);return cE(this,r)&&(K(this,dt,r),K(this,eo,this.options),K(this,gr,F(this,be).state)),r}getCurrentResult(){return F(this,dt)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){F(this,ro).add(t)}getCurrentQuery(){return F(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=F(this,vt).defaultQueryOptions(t),r=F(this,vt).getQueryCache().build(F(this,vt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return he(this,Le,es).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),F(this,dt)))}createResult(t,n){var S;const r=F(this,be),o=this.options,s=F(this,dt),a=F(this,gr),i=F(this,eo),l=t!==r?t.state:F(this,Xo),{state:d}=t;let g={...d},b=!1,x;if(n._optimisticResults){const L=this.hasListeners(),N=!L&&np(t,n),D=L&&rp(t,r,n,o);(N||D)&&(g={...g,...U1(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:y,errorUpdatedAt:p,status:h}=g;if(n.select&&g.data!==void 0)if(s&&g.data===(a==null?void 0:a.data)&&n.select===F(this,zo))x=F(this,to);else try{K(this,zo,n.select),x=n.select(g.data),x=jc(s==null?void 0:s.data,x,n),K(this,to,x),K(this,cn,null)}catch(L){K(this,cn,L)}else x=g.data;if(n.placeholderData!==void 0&&x===void 0&&h==="pending"){let L;if(s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData))L=s.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData((S=F(this,no))==null?void 0:S.state.data,F(this,no)):n.placeholderData,n.select&&L!==void 0)try{L=n.select(L),K(this,cn,null)}catch(N){K(this,cn,N)}L!==void 0&&(h="success",x=jc(s==null?void 0:s.data,L,n),b=!0)}F(this,cn)&&(y=F(this,cn),x=F(this,to),p=Date.now(),h="error");const m=g.fetchStatus==="fetching",v=h==="pending",C=h==="error",I=v&&m,E=x!==void 0,T={status:h,fetchStatus:g.fetchStatus,isPending:v,isSuccess:h==="success",isError:C,isInitialLoading:I,isLoading:I,data:x,dataUpdatedAt:g.dataUpdatedAt,error:y,errorUpdatedAt:p,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>l.dataUpdateCount||g.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!v,isLoadingError:C&&!E,isPaused:g.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:C&&E,isStale:Wc(t,n),refetch:this.refetch,promise:F(this,Mn)};if(this.options.experimental_prefetchInRender){const L=k=>{T.status==="error"?k.reject(T.error):T.data!==void 0&&k.resolve(T.data)},N=()=>{const k=K(this,Mn,T.promise=Vc());L(k)},D=F(this,Mn);switch(D.status){case"pending":t.queryHash===r.queryHash&&L(D);break;case"fulfilled":(T.status==="error"||T.data!==D.value)&&N();break;case"rejected":(T.status!=="error"||T.error!==D.reason)&&N();break}}return T}updateResult(t){const n=F(this,dt),r=this.createResult(F(this,be),this.options);if(K(this,gr,F(this,be).state),K(this,eo,this.options),F(this,gr).data!==void 0&&K(this,no,F(this,be)),Ia(r,n))return;K(this,dt,r);const o={},s=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!F(this,ro).size)return!0;const c=new Set(i??F(this,ro));return this.options.throwOnError&&c.add("error"),Object.keys(F(this,dt)).some(l=>{const d=l;return F(this,dt)[d]!==n[d]&&c.has(d)})};(t==null?void 0:t.listeners)!==!1&&s()&&(o.listeners=!0),he(this,Le,Zp).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&he(this,Le,pl).call(this)}},vt=new WeakMap,be=new WeakMap,Xo=new WeakMap,dt=new WeakMap,gr=new WeakMap,eo=new WeakMap,Mn=new WeakMap,cn=new WeakMap,zo=new WeakMap,to=new WeakMap,no=new WeakMap,mr=new WeakMap,br=new WeakMap,Pn=new WeakMap,ro=new WeakMap,Le=new WeakSet,es=function(t){he(this,Le,ml).call(this);let n=F(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Rt)),n},ul=function(){he(this,Le,hl).call(this);const t=Zr(this.options.staleTime,F(this,be));if(ir||F(this,dt).isStale||!Nc(t))return;const r=H1(F(this,dt).dataUpdatedAt,t)+1;K(this,mr,setTimeout(()=>{F(this,dt).isStale||this.updateResult()},r))},dl=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(F(this,be)):this.options.refetchInterval)??!1},fl=function(t){he(this,Le,gl).call(this),K(this,Pn,t),!(ir||Xt(this.options.enabled,F(this,be))===!1||!Nc(F(this,Pn))||F(this,Pn)===0)&&K(this,br,setInterval(()=>{(this.options.refetchIntervalInBackground||Bc.isFocused())&&he(this,Le,es).call(this)},F(this,Pn)))},pl=function(){he(this,Le,ul).call(this),he(this,Le,fl).call(this,he(this,Le,dl).call(this))},hl=function(){F(this,mr)&&(clearTimeout(F(this,mr)),K(this,mr,void 0))},gl=function(){F(this,br)&&(clearInterval(F(this,br)),K(this,br,void 0))},ml=function(){const t=F(this,vt).getQueryCache().build(F(this,vt),this.options);if(t===F(this,be))return;const n=F(this,be);K(this,be,t),K(this,Xo,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Zp=function(t){Ke.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(F(this,dt))}),F(this,vt).getQueryCache().notify({query:F(this,be),type:"observerResultsUpdated"})})},Gp);function iE(e,t){return Xt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function np(e,t){return iE(e,t)||e.state.data!==void 0&&Hc(e,t,t.refetchOnMount)}function Hc(e,t,n){if(Xt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Wc(e,t)}return!1}function rp(e,t,n,r){return(e!==t||Xt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Wc(e,n)}function Wc(e,t){return Xt(t.enabled,e)!==!1&&e.isStaleByTime(Zr(t.staleTime,e))}function cE(e,t){return!Ia(e.getCurrentResult(),t)}var lE=(Hp=class extends Wr{constructor(n,r){super();ie(this,Cn);ie(this,jn);ie(this,Bn);ie(this,xt);ie(this,yn);K(this,jn,n),this.setOptions(r),this.bindMethods(),he(this,Cn,Pa).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,jn).defaultMutationOptions(n),Ia(this.options,r)||F(this,jn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:F(this,xt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&cr(r.mutationKey)!==cr(this.options.mutationKey)?this.reset():((o=F(this,xt))==null?void 0:o.state.status)==="pending"&&F(this,xt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=F(this,xt))==null||n.removeObserver(this)}onMutationUpdate(n){he(this,Cn,Pa).call(this),he(this,Cn,bl).call(this,n)}getCurrentResult(){return F(this,Bn)}reset(){var n;(n=F(this,xt))==null||n.removeObserver(this),K(this,xt,void 0),he(this,Cn,Pa).call(this),he(this,Cn,bl).call(this)}mutate(n,r){var o;return K(this,yn,r),(o=F(this,xt))==null||o.removeObserver(this),K(this,xt,F(this,jn).getMutationCache().build(F(this,jn),this.options)),F(this,xt).addObserver(this),F(this,xt).execute(n)}},jn=new WeakMap,Bn=new WeakMap,xt=new WeakMap,yn=new WeakMap,Cn=new WeakSet,Pa=function(){var r;const n=((r=F(this,xt))==null?void 0:r.state)??K1();K(this,Bn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},bl=function(n){Ke.batch(()=>{var r,o,s,a,i,c,l,d;if(F(this,yn)&&this.hasListeners()){const g=F(this,Bn).variables,b=F(this,Bn).context;(n==null?void 0:n.type)==="success"?((o=(r=F(this,yn)).onSuccess)==null||o.call(r,n.data,g,b),(a=(s=F(this,yn)).onSettled)==null||a.call(s,n.data,null,g,b)):(n==null?void 0:n.type)==="error"&&((c=(i=F(this,yn)).onError)==null||c.call(i,n.error,g,b),(d=(l=F(this,yn)).onSettled)==null||d.call(l,void 0,n.error,g,b))}this.listeners.forEach(g=>{g(F(this,Bn))})})},Hp),op=A.createContext(void 0),Zc=e=>{const t=A.useContext(op);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},uE=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(op.Provider,{value:e,children:t})),sp=A.createContext(!1),dE=()=>A.useContext(sp);sp.Provider;function fE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pE=A.createContext(fE()),hE=()=>A.useContext(pE);function ap(e,t){return typeof e=="function"?e(...t):!!e}function Xc(){}var gE=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},mE=e=>{A.useEffect(()=>{e.clearReset()},[e])},bE=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||ap(n,[e.error,r])),yE=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)))},CE=(e,t)=>e.isLoading&&e.isFetching&&!t,vE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ip=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function xE(e,t,n){var g,b,x,y,p;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=Zc(),o=dE(),s=hE(),a=r.defaultQueryOptions(e);(b=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||b.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",yE(a),gE(a,s),mE(s);const i=!r.getQueryCache().get(a.queryHash),[c]=A.useState(()=>new t(r,a)),l=c.getOptimisticResult(a),d=!o&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(h=>{const m=d?c.subscribe(Ke.batchCalls(h)):Xc;return c.updateResult(),m},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),A.useEffect(()=>{c.setOptions(a,{listeners:!1})},[a,c]),vE(a,l))throw ip(a,c,s);if(bE({result:l,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if((y=(x=r.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||y.call(x,a,l),a.experimental_prefetchInRender&&!ir&&CE(l,o)){const h=i?ip(a,c,s):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;h==null||h.catch(Xc).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?l:c.trackResult(l)}function Go(e,t){return xE(e,aE)}function mn(e,t){const n=Zc(),[r]=A.useState(()=>new lE(n,e));A.useEffect(()=>{r.setOptions(e)},[r,e]);const o=A.useSyncExternalStore(A.useCallback(a=>r.subscribe(Ke.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=A.useCallback((a,i)=>{r.mutate(a,i).catch(Xc)},[r]);if(o.error&&ap(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const EE=e=>new Promise(t=>setTimeout(t,e)),cp=({apiFn:e,intervalMillis:t,maxRetries:n,increaseIntervalMillis:r=0,isSatisfied:o,pushIntermediateResults:s=()=>{}})=>(...i)=>{const c=async(l=0)=>{const d=await e(...i);if(s(d),o(d))return s(null),d;if(l>=n)throw d;return l++,t+=r,EE(t).then(()=>c(l))};return c()},IE=async({conversationId:e,senderEmail:t})=>{try{const n=await ke({url:bt(Y7,{conversationId:e}),params:{senderEmail:t},method:Be.GET});return n==null?void 0:n.data}catch(n){throw console.error(n),n}},lp=({conversationId:e,senderEmail:t,enabled:n})=>Go({queryKey:["Global","ConversationMetaData",e,t],queryFn:()=>IE({conversationId:e,senderEmail:t}),refetchOnMount:!1,enabled:n}),up="/v1/api",wE=`${up}/connectors/forms/:formId/search`,_E=`${up}/connectors/conversation/:conversationId/smart-suggestions`,SE=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}},TE=cp({apiFn:async({conversationId:e})=>{try{const t=await ke({url:bt(_E,{conversationId:e}),method:Be.GET}),n=t==null?void 0:t.data;return SE(n)}catch(t){throw console.error(t),t}},intervalMillis:1500,maxRetries:5,isSatisfied:e=>e.status!=="pending"}),AE=({conversationId:e,senderEmail:t,enabled:n})=>{const{isSuccess:r}=lp({conversationId:e,senderEmail:t,enabled:n});return Go({queryKey:["GlobalSearch","SmartSuggestions",e],queryFn:()=>TE({conversationId:e}),enabled:n&&r})},LE=({selectedObject:e,root:t,setSelectedObject:n,fetchSearchResults:r,onReset:o})=>{const[s,a]=_.useState(""),{conversationId:i,email:c,availableFeatures:l}=_.useContext(He),d=me(vx),g=me(B1),b=at(l,t3),{sortedObjectList:x,updatePriority:y}=Vx({objectList:d}),{data:p}=AE({enabled:b&&!!i,conversationId:String(i),senderEmail:c}),h=(p==null?void 0:p.suggestedOptions)??[],m=_.useMemo(()=>!g||!x.length?[]:x.map(({value:C})=>{const I=g[C];return I?{description:`${I.connectorName??""} - ${I.searchObject}`,avatarUrl:I.logoUrl,label:"",value:C,connectorName:I.connectorName,objectName:I.searchObject}:null}).filter(C=>!!C),[x,g]),v=C=>{n(C),C&&y(""+C.value)};return m.length?u.jsxs(f.Stack,{children:[u.jsx(Px,{value:e,options:m.map(C=>({...C,label:s})),inputValue:s,root:t,onInputChange:a,onChange:v,onReset:o,NoOptionsMessage:({selectOption:C})=>u.jsx(Zx,{selectedOption:e,onSelect:C,options:h}),menuOpen:!s&&!h.length?!1:void 0}),e?u.jsx(Bx,{objectId:e.value,searchString:e.label,fetchSearchResults:r},e.value):null]}):null},OE="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",FE=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 ke({url:`${$7.replace(":id",e)}?${s.toString()}`,method:Be.POST,data:{externalResourceId:t,conversationId:n}})},DE=({onSuccess:e})=>mn({mutationFn:FE,onSuccess:()=>{Se({message:bb,type:Ut}),e==null||e()},onError:()=>{Se({message:yb,type:qe})}}),kE="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",NE=f.styled(f.Stack)`
|
|
1262
1262
|
width: fit-content;
|
|
1263
1263
|
cursor: pointer;
|
|
1264
1264
|
gap: 8px;
|
|
@@ -1270,7 +1270,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1270
1270
|
letter-spacing: 0.4px;
|
|
1271
1271
|
text-align: center;
|
|
1272
1272
|
vertical-align: middle;
|
|
1273
|
-
`,
|
|
1273
|
+
`,RE=({meta:{externalResourceId:e,formId:t,searchKeyword:n,searchResultLabel:r},onBack:o,onLink:s})=>{const a=Ht(),{conversationId:i,currentSmIds:c,sendTrackingEvent:l,email:d}=_.useContext(He),g=me(I1),b=me(w1),{mutate:x,isPending:y}=DE({onSuccess:s}),p=b===ee.LOADING,h={externalResourceId:e};_.useEffect(()=>{a(jr({id:t,args:{externalResourceId:e}}))},[e,t,a]);const m=()=>{l(Hm,{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}),x({id:t,externalResourceId:e,conversationId:i,email:d})};return u.jsxs(f.Stack,{gap:"12px",marginTop:"12px",children:[u.jsxs(NE,{onClick:o,children:[u.jsx("img",{src:kE,width:"16px",height:"16px"}),u.jsx(f.Typography,{children:Ax})]}),u.jsxs(f.Stack,{gap:"24px",children:[u.jsx(_1,{cardData:g,cardDataApiStatus:b,objectToLink:t,args:h}),u.jsx(f.Stack,{alignItems:"flex-end",children:u.jsx(f.Button,{size:"small",disabled:p||y,onClick:m,children:Xu})})]})]})},dp=f.styled(f.Stack)`
|
|
1274
1274
|
padding: 12px 12px 12px 11px;
|
|
1275
1275
|
border: 1px solid ${f.theme.palette.gray.gray5};
|
|
1276
1276
|
border-radius: 8px;
|
|
@@ -1286,10 +1286,10 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1286
1286
|
}
|
|
1287
1287
|
}
|
|
1288
1288
|
`};
|
|
1289
|
-
`,RE="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",ME=()=>u.jsxs(f.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:RE,width:124,height:107}),u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray3,children:Ax})]}),PE=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=_.useContext(He),[i,c]=_.useState(null),l=bt(Sx,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),d=(x,y)=>{s(Gm,{search_keyword:t.label,search_result_label:y,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:x,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:y})},g=()=>{c(null),o(r8())},b=()=>{n(),r(),g()};return e.length?i?u.jsx(NE,{meta:i,onBack:g,onLink:b}):u.jsxs(f.Stack,{gap:"14px",marginTop:"12px",children:[u.jsx(f.Typography,{variant:"body2",children:l}),u.jsx(f.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:x,name:y,description:p})=>u.jsxs(dp,{onClick:()=>d(x,y),direction:"row",children:[u.jsxs(f.Stack,{flexGrow:1,children:[u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray1,children:y}),u.jsx(f.Typography,{variant:"caption",color:f.theme.palette.gray.gray3,children:p})]}),u.jsx(f.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:LE})})]},x))})]}):u.jsx(ME,{})},zc=f.styled(f.Skeleton)`
|
|
1289
|
+
`,ME="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",PE=()=>u.jsxs(f.Box,{justifyItems:"center",marginTop:"40px",children:[u.jsx("img",{src:ME,width:124,height:107}),u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray3,children:Lx})]}),jE=({searchResults:e,selectedObject:t,onReset:n,fetchCards:r})=>{const o=Ht(),{sendTrackingEvent:s,currentSmIds:a}=_.useContext(He),[i,c]=_.useState(null),l=bt(Tx,{count:e.length.toString(),countSuffix:e.length>1?"s":"",searchObject:t.objectName,connectorName:t.connectorName}),d=(x,y)=>{s(Gm,{search_keyword:t.label,search_result_label:y,sm_ids:a,connector_name:t.connectorName}),c({externalResourceId:x,formId:t.value.toString(),searchKeyword:t.label,searchResultLabel:y})},g=()=>{c(null),o(o8())},b=()=>{n(),r(),g()};return e.length?i?u.jsx(RE,{meta:i,onBack:g,onLink:b}):u.jsxs(f.Stack,{gap:"14px",marginTop:"12px",children:[u.jsx(f.Typography,{variant:"body2",children:l}),u.jsx(f.Stack,{gap:"17px",children:e==null?void 0:e.map(({externalResourceId:x,name:y,description:p})=>u.jsxs(dp,{onClick:()=>d(x,y),direction:"row",children:[u.jsxs(f.Stack,{flexGrow:1,children:[u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray1,children:y}),u.jsx(f.Typography,{variant:"caption",color:f.theme.palette.gray.gray3,children:p})]}),u.jsx(f.Box,{alignSelf:"center",className:"search-item__chevron",width:"20px",height:"20px",children:u.jsx("img",{src:OE})})]},x))})]}):u.jsx(PE,{})},zc=f.styled(f.Skeleton)`
|
|
1290
1290
|
display: block;
|
|
1291
1291
|
margin: ${e=>e.margin?e.margin:0};
|
|
1292
|
-
`,
|
|
1292
|
+
`,BE=()=>u.jsxs(f.Stack,{marginTop:"12px",children:[u.jsx(zc,{variant:"rounded",width:"50%",height:"16px",animation:"wave",margin:"0 0 18px 0"}),u.jsx(f.Stack,{gap:"17px",children:u.jsxs(dp,{gap:"8px",disableHover:!0,children:[u.jsx(zc,{variant:"rounded",width:"30%",height:"16px",animation:"wave"}),u.jsx(zc,{variant:"rounded",width:"70%",height:"16px",animation:"wave"})]})})]}),VE=async({id:e,searchString:t,args:n})=>{try{if(e===void 0||t===void 0)return[];const r=await ke({url:wE.replace(":formId",e.toString()),method:Be.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:pn,type:qe}),console.error(r)}},GE=(e,t)=>mn({mutationFn:VE,onMutate:({searchString:n,connectorName:r})=>{e(n,r)},onSuccess:(n,{searchString:r,connectorName:o})=>{t(r,n,o)}}),Yc={OPEN_FORM_VIEW:"connector-agent-open-form-view"},HE=(e,t={})=>{const{delayAfterLoad:n=1e3}=t,r=_.useRef(!1),o=_.useRef(void 0),s=_.useCallback((c="auto")=>{const l=e.current;l&&l.scrollIntoView({behavior:c})},[e]),a=_.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=_.useCallback(()=>{r.current=!1,o.current!==void 0&&clearTimeout(o.current)},[]);return _.useEffect(()=>()=>{o.current!==void 0&&clearTimeout(o.current)},[]),{scrollOnceAfterLoad:a,resetScrollState:i,hasScrolledOnce:r.current}},WE=({enabled:e,...t})=>{const{actionQueue:n}=_.useContext(He);n&&e&&n.register(t),_.useEffect(()=>{if(n)return()=>{n.destroy()}},[n,e])},ZE=({isAdmin:e=!1})=>{var Uo;const{email:t,currentSmIds:n,sendTrackingEvent:r,availableFeatures:o,conversationId:s}=_.useContext(He),a=Ht(),{userGroupId:i,userId:c}=Qt()||{},l=_.useRef(!1),d=_.useRef(null),g=_.useRef(null),b=_.useRef(null),[x,y]=_.useState({}),[p,h]=_.useState(!1),[m,v]=_.useState(!1),[C,I]=_.useState(!1),[E,w]=_.useState(!1),[T,S]=_.useState(),[L,N]=_.useState(!1),[D,k]=_.useState(null),[M,B]=_.useState(),[z,q]=_.useState(null),[Q,X]=_.useState(!1),[Y,oe]=_.useState(!1),$=me(j8),P=me(B8),G=me(G8),V=me(H8),H=me(Z8),J=me(V8),ne=me(g1),se=me(rv),j=me(m1),te=me(b1),Ce=me(y1),Z=me(sx),Xe=at(o,Jm),Me=at(o,Vu),Qe=at(o,e3),ot=at(o,n3),vn=at(o,r3),kt=at(o,o3);WE({conversationId:s,openCreateForm:()=>I(!0),enabled:P});const tt=_.useMemo(()=>!$||!$.length?null:J8($,G,V),[$,G,V]),ze=v3(G),{data:yr,isLoading:Nt}=lp({senderEmail:t,conversationId:String(s),enabled:ot&&!!t}),{emailHeaders:Yo,selectedEmail:oo}=yr??{},{scrollOnceAfterLoad:Vn,resetScrollState:Gn}=HE(g),ue=J!==ee.LOADING&&(!V||!Object.values(V).some(ye=>ye===ee.LOADING))&&$&&$.length>0;_.useLayoutEffect(()=>{var ye;Q&&!p&&Y&&((ye=b==null?void 0:b.current)!=null&&ye.scrollHeight)&&Vn(!!ue,"smooth")},[Q,p,Y,ue,Vn,(Uo=b==null?void 0:b.current)==null?void 0:Uo.scrollHeight,c]);const Oe=(ye,Ve)=>{r(jm,{search_keyword:ye,sm_ids:n,connector_name:Ve,suggestion_type:Z})},st=(ye,Ve,ft)=>{!Array.isArray(Ve)||!Ve.length?r(Bm,{search_keyword:ye,sm_ids:n,connector_name:ft,suggestion_type:Z}):Ve.length&&r(Vm,{num_of_results:Ve.length,search_keyword:ye,sm_ids:n,connector_name:ft,suggestion_type:Z})},{mutate:Et,reset:It,data:Cr,isPending:Hn,isIdle:Jo}=GE(Oe,st),Da=_.useCallback(()=>{It(),k(null)},[It,k]),Wn=_.useCallback(()=>{t&&n.length&&s&&a(Ea({inboxIds:n,conversationId:s}))},[a,t,n,s]),ka=_.useCallback((ye,Ve)=>{ye&&s&&Ve&&a(xa({id:ye,channelType:"email",conversationId:s,externalResourceId:Ve,contactEmail:t})).unwrap().catch(()=>{a(Br(null))})},[a,s,t]);if(_.useEffect(()=>{(async()=>{c&&(X(await Ka(c)),oe(await Ml(c)))})()},[c]),_.useEffect(()=>{Nt||B(oo||t)},[t,oo,Nt]),_.useEffect(()=>{Y&&c&&Pl(c)},[Y,c]),_.useEffect(()=>{var ye;if(te){v(!0);const{externalResourceId:Ve}=te,ft=(ye=te.forms.find(ln=>ln.type==="edit"))==null?void 0:ye.id;ka(ft,Ve)}else v(!1),a(k8())},[te,ka,a]),_.useEffect(()=>(Wn(),Gn(),()=>{a(p1.clearConnectorList())}),[a,Wn,Gn]),_.useEffect(()=>{if(H&&$&&$.length&&tt&&!l.current){const{cards_per_app:ye,total_empty_cards:Ve,total_cards_with_errors:ft}=tt;r(fm,{numOfCards:$.length,total_cards_loaded:$.length,total_empty_cards:Ve,total_cards_with_errors:ft,cards_per_app:ye,sm_ids:n}),l.current=!0}return()=>{l.current=!1}},[H,$,tt,r,n]),_.useEffect(()=>{s&&n&&n.length&&a(ma({inboxIds:n,conversationId:s,channelType:"email",isExpandedFormEnabled:kt}))},[a,n,s,kt]),_.useEffect(()=>{const ye=Ve=>{var ln;if(!(Ve instanceof CustomEvent))return;const ft=(ln=Ve.detail)==null?void 0:ln.connectorKey;y({connectorKey:ft})};return window.addEventListener(Yc.OPEN_FORM_VIEW,ye),()=>{window.removeEventListener(Yc.OPEN_FORM_VIEW,ye)}},[]),_.useEffect(()=>{if(!(ne!=null&&ne.length)||!x.connectorKey)return;const ye=x.connectorKey;y({});const Ve=ne.find(ft=>{var ln;return((ln=ft.connectorKey)==null?void 0:ln.toLowerCase())===(ye==null?void 0:ye.toLowerCase())});Ve&&(q(Ve),I(!0))},[ne,x]),!t.length||J===ee.LOADING)return u.jsx(Xv,{});const al=ye=>{r(bm,{connector_name:se,source:ye,sm_ids:n})},so=ye=>{I(!0),al(ye)},Na=()=>{w(!0),r(ym)},xn=ye=>{r(ye,T),Ce?N(!0):(I(!1),q(null))},ao=ye=>{if(te){const{connectorName:Ve,title:ft}=te;r(ye,{connector_name:Ve,card_title:ft,sm_ids:n,ug_id:i})}Ce?N(!0):a(Br(null))},qo=()=>{I(!1),a(Br(null)),S(void 0),N(!1)},$o=()=>{Wn(),a(p1.clearConnectorList())},il=[{label:"Go back",variant:"text",action:qo},{label:"Stay",variant:"contained",action:()=>N(!1)}],io=ne.length>0,Qo=j.length>0,Ra=()=>io||Qo?u.jsx(Cx,{haveCreateObjects:io,haveLinkObjects:Qo,onCreateClick:()=>so(Uu.MAIN_BUTTON),onLinkClick:()=>w(!0)}):u.jsx(x1,{isAdmin:e,hideHeading:!0});return u.jsxs(cd,{ref:d,"data-testid":Array.isArray($)?"connector-agent":"loading",id:"connector-agent-container",stopOverflow:C||E,children:[u.jsx(D1,{shown:L,setShown:N,title:_8,description:S8,buttons:il}),u.jsx(K3,{onWheel:()=>h(!0),ref:b,children:P?u.jsxs(u.Fragment,{children:[u.jsx(F5,{connectors:ze,isWriteFlowEnabled:Me,haveCreateObjects:io,haveLinkObjects:Qo,cards:$,handleCreateNewObject:()=>so(Uu.ICON),handleLinkNewObject:Na}),Qe?u.jsx(LE,{selectedObject:D,setSelectedObject:k,fetchSearchResults:Et,onReset:Da,root:d.current}):null,u.jsxs(Gr,{children:[u.jsx(Hr,{condition:Qe&&Hn,children:u.jsx(BE,{})},"search"),u.jsx(Hr,{condition:Qe&&!!D&&!Jo,children:u.jsx(jE,{searchResults:Cr??[],selectedObject:D,onReset:Da,fetchCards:Wn})},"results"),u.jsxs(Hr,{fallback:!0,children:[ot&&($!=null&&$.length)?u.jsx(ex,{emailHeaders:Yo,selectedEmail:M,root:d.current,isLoading:Nt,setSelectedEmail:B}):null,Xe?u.jsx(zv,{}):null,u.jsxs(Gr,{children:[u.jsxs(Hr,{condition:!!$&&$.length>0,children:[u.jsx(vv,{cards:$,specificCardData:G,email:M??"",specificConnectorApiStatus:V,onCardUnlinking:Wn}),u.jsx("div",{ref:g,children:vn?u.jsx(D3,{connectors:ze,expanded:Q}):null})]},"cards-list"),u.jsx(Hr,{condition:!($!=null&&$.length)&&Me,children:Ra()},"create-banner")]})]},"cards")]})]}):u.jsx(x1,{isAdmin:e})}),u.jsx(Fc,{onClose:()=>ao(Fm),isOpen:m,setIsOpen:v,title:f3,portalId:"connector-layover-portal",backButtonTooltip:"Back",children:u.jsx(N1,{isEdit:!0,onClose:()=>ao(Om),onCreateSuccess:$o,metaData:T,setMetaData:S,connectors:ze})}),u.jsx(Fc,{onClose:()=>xn(wm),portalId:"connector-layover-portal",isOpen:C,setIsOpen:I,children:u.jsx(N1,{onClose:()=>xn(Im),onCreateSuccess:$o,metaData:T,setMetaData:S,defaultOption:z,connectors:ze})}),u.jsx(Fc,{onClose:()=>w(!1),portalId:"connector-layover-portal",isOpen:E,setIsOpen:w,children:u.jsx(hx,{setOpenTaskLinking:w,onLinkingSuccess:Wn})}),!P&&u.jsx(Z3,{})]})},XE=({children:e,sendTrackingEvent:t,contactEmail:n,baseUrls:r={},currentSmIds:o=[],userEmail:s,metaData:a,availableFeatures:i,conversationId:c,connectorFunctions:l,stackingContext:d,isAdmin:g=!1,actionQueue:b})=>{const x=_.useMemo(()=>({userEmail:s,email:n,baseUrls:r,currentSmIds:o,metaData:a,conversationId:c,sendTrackingEvent:t||(()=>{}),availableFeatures:i,isAdmin:g,connectorFunctions:l,stackingContext:d,actionQueue:b}),[s,n,r,t,o,a,i,c,g,l,d,b]);return u.jsx(He.Provider,{value:x,children:e})},Jc=({children:e})=>{const[t]=_.useState(()=>new sE);return u.jsx(uE,{client:t,children:e})},zE=wd({cardList:ev,write:N8,common:a8}),qc=Q4({reducer:zE,devTools:!0}),YE=({children:e,userEmail:t,extraParams:n,contactEmail:r,baseUrls:o,availableFeatures:s,connectorFunctions:a,stackingContext:i,actionQueue:c})=>u.jsx(Pi,{store:qc,children:u.jsx(f.HiverProvider,{custom:!0,children:u.jsx(Jc,{children:u.jsx(XE,{userEmail:t,availableFeatures:s,sendTrackingEvent:n==null?void 0:n.sendTrackingEvent,contactEmail:r,currentSmIds:n==null?void 0:n.currentSmIds,metaData:n==null?void 0:n.metaData,conversationId:n==null?void 0:n.conversationId,baseUrls:o,connectorFunctions:a,stackingContext:i,actionQueue:c,isAdmin:n==null?void 0:n.isAdmin,children:u.jsx(_.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})})}),$c=f.styled(f.Box)`
|
|
1293
1293
|
height: inherit;
|
|
1294
1294
|
.MuiScopedCssBaseline-root {
|
|
1295
1295
|
height: inherit;
|
|
@@ -1397,7 +1397,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
1397
1397
|
[hidden] {
|
|
1398
1398
|
display: none;
|
|
1399
1399
|
}
|
|
1400
|
-
`,
|
|
1400
|
+
`,JE=f.styled(f.Box)`
|
|
1401
1401
|
:root {
|
|
1402
1402
|
--toastify-color-light: #fff;
|
|
1403
1403
|
--toastify-color-dark: #121212;
|
|
@@ -2128,7 +2128,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2128
2128
|
transform: rotate(360deg);
|
|
2129
2129
|
}
|
|
2130
2130
|
}
|
|
2131
|
-
`,Qc=f.styled(
|
|
2131
|
+
`,Qc=f.styled(JE)`
|
|
2132
2132
|
.Toastify__toast-container {
|
|
2133
2133
|
min-width: 320px !important;
|
|
2134
2134
|
font-size: 16px;
|
|
@@ -2177,7 +2177,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2177
2177
|
align-self: auto !important;
|
|
2178
2178
|
margin-left: 12px;
|
|
2179
2179
|
}
|
|
2180
|
-
`,
|
|
2180
|
+
`,qE=({userEmail:e="",contactEmail:t="",baseUrls:n={},extraParams:r={},availableFeatures:o={},connectorFunctions:s,stackingContext:a={},actionQueue:i})=>u.jsx($c,{children:u.jsxs(YE,{userEmail:e,availableFeatures:o,extraParams:r,contactEmail:t,connectorFunctions:s,stackingContext:a,actionQueue:i,baseUrls:n,children:[u.jsx(ZE,{isAdmin:r==null?void 0:r.isAdmin}),Ne.createPortal(u.jsx(Qc,{id:"toast-message",children:u.jsx(Wa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0,...!!a.toastMessage&&{style:{zIndex:a.toastMessage}}})}),document.body),u.jsx("div",{"data-connectorid":"connector-layover-portal"})]})}),fp="/v1/api",$E=`${fp}/connector/conversation/:conversationId/data`,QE=`${fp}/connector/feedback/conversation/:conversationId`,UE=async e=>{try{const t=await ke({url:$E.replace(":conversationId",e)+"?channel_type=email",method:Be.GET});return t!=null&&t.data&&Array.isArray(t.data)?t.data.reduce((r,o)=>{var s,a;return r[(s=o==null?void 0:o.cardData)==null?void 0:s.textToHighlight]||(r[(a=o==null?void 0:o.cardData)==null?void 0:a.textToHighlight]={...o}),r},{}):null}catch(t){return Promise.reject(t)}};function KE(e,t){return Go({queryKey:["connector-analytics",e,t],queryFn:async()=>!t||!e?null:await UE(e),enabled:!!t&&!!e})}class eI{constructor(t=[],n=null){De(this,"highlightTerms");De(this,"observer");De(this,"isHighlighting");De(this,"debounceTimer");De(this,"debounceDelay");De(this,"onHighlightsUpdated");this.highlightTerms=t,this.observer=null,this.isHighlighting=!1,this.debounceTimer=null,this.debounceDelay=500,this.onHighlightsUpdated=n,this.init()}init(){this.highlightAllEmails(),this.startObserver()}startObserver(){const t=this.findGmailContainer();if(!t){console.warn("Gmail container not found");return}this.observer=new MutationObserver(n=>{if(this.isHighlighting)return;let r=!1;n.forEach(o=>{o.type==="childList"&&Array.from(o.addedNodes).some(i=>{var c,l,d,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"))||((d=i.querySelector)==null?void 0:d.call(i,".a3s"))||((g=i.querySelector)==null?void 0:g.call(i,"h2.hP")))})&&(r=!0)}),r&&this.debounceHighlight()}),this.observer.observe(t,{childList:!0,subtree:!0})}findGmailContainer(){return document.querySelector('[role="main"]')||document.querySelector(".nH.if")||document.querySelector(".AO")||document.body}debounceHighlight(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.highlightAllEmails()},this.debounceDelay)}highlightAllEmails(){var t;if(this.highlightTerms.length!==0){this.isHighlighting=!0;try{if(this.clearHighlights(),["h2.hP",".ii.gt .a3s.aiL",".ii.gt .a3s",'[data-expanded="true"]'].forEach(r=>{document.querySelectorAll(r).forEach(s=>{this.isElementVisible(s)&&this.highlightInElement(s)})}),this.onHighlightsUpdated){const r=Array.from(document.querySelectorAll(".gmail-highlight"));(t=this.onHighlightsUpdated)==null||t.call(this,r)}}finally{setTimeout(()=>{this.isHighlighting=!1},250)}}}isElementVisible(t){const n=t;return n.offsetParent!==null&&n.offsetWidth>0&&n.offsetHeight>0}highlightInElement(t){if(!t||this.highlightTerms.length===0||t.dataset.highlightProcessed==="true")return;const r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.parentElement&&a.parentElement.classList.contains("gmail-highlight")||a.parentElement&&["SCRIPT","STYLE"].includes(a.parentElement.tagName)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),o=[];let s;for(;s=r.nextNode();)o.push(s);o.forEach(a=>{this.highlightInTextNode(a)}),t.dataset.highlightProcessed="true"}highlightInTextNode(t){let n=t.textContent,r=!1;if(!n)return;if([...this.highlightTerms].sort((s,a)=>a.length-s.length).forEach(s=>{if(!s||s.trim().length===0)return;const a=this.escapeRegex(s.trim()),i=new RegExp(`\\b${a}\\b`,"gi");i.test(n)&&(n=n.replace(i,`<span class="gmail-highlight" data-highlight-term="${s.trim()}"><span class="gmail-highlight-inner">${s}</span></span>`),r=!0)}),r&&t.parentNode){const s=document.createElement("span");s.innerHTML=n,t.parentNode.replaceChild(s,t)}}clearHighlights(){document.querySelectorAll(".gmail-highlight").forEach(r=>{const o=r.parentNode;o&&r.textContent&&(o.replaceChild(document.createTextNode(r.textContent),r),o.normalize())}),document.querySelectorAll('[data-highlight-processed="true"]').forEach(r=>{delete r.dataset.highlightProcessed})}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}refreshHighlights(){this.highlightAllEmails()}updateHighlightTerms(t){this.highlightTerms=t||[],this.highlightAllEmails()}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null),this.clearHighlights(),this.highlightTerms=[]}}if(!document.getElementById("gmail-highlighter-styles")){const e=document.createElement("style");e.id="gmail-highlighter-styles",e.textContent=`
|
|
2181
2181
|
.gmail-highlight {
|
|
2182
2182
|
background-color: #ECEFF6 !important;
|
|
2183
2183
|
color: #2c3e50 !important;
|
|
@@ -2207,7 +2207,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2207
2207
|
transform: translateY(0) !important;
|
|
2208
2208
|
box-shadow: none !important;
|
|
2209
2209
|
}
|
|
2210
|
-
`,document.head.appendChild(e)}function
|
|
2210
|
+
`,document.head.appendChild(e)}function tI(){return mn({mutationKey:["submit-connector-feedback"],mutationFn:async({conversationId:e,feedbackData:t})=>{if(!e)throw new Error("Conversation ID is required");const n=await ke({url:QE.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return n==null?void 0:n.data}})}const nI="Everything looks good",rI="Something is not working",oI="Share feedback",sI="Manage Smart Previews",aI="Reach out to your admin to disable this feature",iI="Go to Apps",cI="Disable Feature",lI="Tell us what went wrong",uI="Please provide feedback",dI=[{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"}],fI="Tell us more (optional)",pI="Enter your feedback",Uc=40,hI="Feedback submitted",gI="Failed to submit feedback",rn={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"},pp=e=>u.jsx(f.Button,{...e,disabled:e.isLoading||e.disabled,children:e.isLoading?u.jsx(f.CircularProgress,{sx:{color:"#97A3B7"},size:20}):e.label}),mI=f.styled(f.Box)`
|
|
2211
2211
|
max-height: 340px;
|
|
2212
2212
|
width: 440px;
|
|
2213
2213
|
border-radius: 12px;
|
|
@@ -2221,15 +2221,15 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2221
2221
|
flex-direction: row;
|
|
2222
2222
|
margin-bottom: 12px;
|
|
2223
2223
|
}
|
|
2224
|
-
`,
|
|
2224
|
+
`,bI=f.styled(f.Box)`
|
|
2225
2225
|
border-bottom: 1px solid ${f.theme.palette.gray.gray6};
|
|
2226
2226
|
margin: 12px -16px;
|
|
2227
|
-
`,
|
|
2227
|
+
`,yI=f.styled(f.Box)`
|
|
2228
2228
|
display: flex;
|
|
2229
2229
|
justify-content: flex-end;
|
|
2230
2230
|
margin-top: 30px;
|
|
2231
2231
|
gap: 8px;
|
|
2232
|
-
`,hp=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=_.useState(""),[i,c]=_.useState(""),l=y=>{a(y.target.value)},d=y=>{y.stopPropagation();const{value:p}=(y==null?void 0:y.target)||{};c(p)},g=()=>{t({feedbackOption:s,feedbackComment:i})},b=()=>{e==null||e()},x=r?!s:!i;return u.jsxs(
|
|
2232
|
+
`,hp=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o})=>{const[s,a]=_.useState(""),[i,c]=_.useState(""),l=y=>{a(y.target.value)},d=y=>{y.stopPropagation();const{value:p}=(y==null?void 0:y.target)||{};c(p)},g=()=>{t({feedbackOption:s,feedbackComment:i})},b=()=>{e==null||e()},x=r?!s:!i;return u.jsxs(mI,{children:[u.jsx(f.Typography,{variant:"h3",children:o}),u.jsx(bI,{}),r?u.jsx(f.FormControl,{children:u.jsx(f.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:s,onChange:l,children:dI.map(y=>u.jsx(f.FormControlLabel,{value:y.value,control:u.jsx(f.Radio,{}),label:y.label},y.value))})}):null,u.jsx(or,{type:"text",placeholder:r?fI:pI,value:i,name:"feedbackComment",inputChangeHandler:d,multiline:!0,rows:5,limit:250,validation:{validate:Ki()}}),u.jsxs(yI,{children:[u.jsx(f.Button,{variant:"text",color:"primary",style:{color:f.theme.palette.gray.gray3},disabled:n,onClick:b,children:"Cancel"}),u.jsx(pp,{variant:"contained",color:"primary",isLoading:n,disabled:x,label:"Submit",onClick:g})]})]})},CI=f.styled(f.Box)`
|
|
2233
2233
|
border-radius: 12px;
|
|
2234
2234
|
max-height: 298px;
|
|
2235
2235
|
width: 288px;
|
|
@@ -2239,29 +2239,29 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2239
2239
|
& > * {
|
|
2240
2240
|
box-sizing: border-box;
|
|
2241
2241
|
}
|
|
2242
|
-
`,
|
|
2242
|
+
`,vI=f.styled(f.Box)`
|
|
2243
2243
|
height: 24px;
|
|
2244
2244
|
display: flex;
|
|
2245
2245
|
align-items: center;
|
|
2246
2246
|
justify-content: space-between;
|
|
2247
2247
|
padding: 12px 0px;
|
|
2248
|
-
`,
|
|
2248
|
+
`,xI=f.styled(f.Typography)`
|
|
2249
2249
|
white-space: nowrap;
|
|
2250
2250
|
overflow: hidden;
|
|
2251
2251
|
text-overflow: ellipsis;
|
|
2252
2252
|
width: ${e=>e.width||"200px"};
|
|
2253
2253
|
line-height: 18px;
|
|
2254
|
-
`,
|
|
2254
|
+
`,EI=f.styled(f.Box)`
|
|
2255
2255
|
height: 1px;
|
|
2256
2256
|
background-color: ${f.theme.palette.gray.gray6};
|
|
2257
2257
|
margin: 0 -16px;
|
|
2258
|
-
`,
|
|
2258
|
+
`,II=f.styled(f.Box)`
|
|
2259
2259
|
padding: 0px 16px;
|
|
2260
2260
|
border-radius: 12px;
|
|
2261
2261
|
height: calc(100% - 82px);
|
|
2262
2262
|
overflow-y: auto;
|
|
2263
2263
|
scrollbar-width: thin;
|
|
2264
|
-
`,
|
|
2264
|
+
`,wI=f.styled(f.Typography)`
|
|
2265
2265
|
font-size: 12px;
|
|
2266
2266
|
font-weight: 400;
|
|
2267
2267
|
color: ${f.theme.palette.gray.gray1};
|
|
@@ -2269,7 +2269,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2269
2269
|
min-width: 80px;
|
|
2270
2270
|
margin-right: 12px;
|
|
2271
2271
|
text-align: left;
|
|
2272
|
-
`,
|
|
2272
|
+
`,_I=f.styled(f.Typography)`
|
|
2273
2273
|
font-size: 12px;
|
|
2274
2274
|
font-weight: 400;
|
|
2275
2275
|
color: ${f.theme.palette.gray.black};
|
|
@@ -2278,11 +2278,11 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2278
2278
|
margin-right: 0px;
|
|
2279
2279
|
word-break: 'break-word';
|
|
2280
2280
|
text-align: right;
|
|
2281
|
-
`,
|
|
2281
|
+
`,SI=f.styled(f.Box)`
|
|
2282
2282
|
display: flex;
|
|
2283
2283
|
justify-content: space-between;
|
|
2284
2284
|
margin-bottom: 20px;
|
|
2285
|
-
`,
|
|
2285
|
+
`,TI=f.styled(f.Box)`
|
|
2286
2286
|
display: flex;
|
|
2287
2287
|
justify-content: space-between;
|
|
2288
2288
|
align-items: center;
|
|
@@ -2293,13 +2293,13 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2293
2293
|
`,Ho=f.styled(f.Tooltip)`
|
|
2294
2294
|
padding: 6px;
|
|
2295
2295
|
border-radius: 6px;
|
|
2296
|
-
`,
|
|
2296
|
+
`,AI=f.styled(f.Button)`
|
|
2297
2297
|
background-color: #f3f8ff;
|
|
2298
2298
|
border-radius: 360px;
|
|
2299
2299
|
color: #196fe0;
|
|
2300
2300
|
padding: 5px 12px;
|
|
2301
2301
|
min-width: 100px;
|
|
2302
|
-
`,gp=e=>A.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M7.87354 2.73877C7.87354 2.30139 7.53821 1.94227 7.11084 1.90381L5.09229 6.44775C5.06387 6.51167 5.02799 6.57074 4.98975 6.62744V12.3667H10.4722C11.0395 12.3665 11.5225 11.9529 11.6089 11.3921L12.2368 7.30811C12.3437 6.61168 11.8047 5.98395 11.1001 5.98389H9.05615C8.40276 5.98371 7.87354 5.45372 7.87354 4.80029V2.73877ZM2.07275 11.8003C2.07275 12.1133 2.32718 12.3667 2.64014 12.3667H3.78955V7.1499H2.64014C2.32718 7.1499 2.07275 7.40432 2.07275 7.71729V11.8003ZM9.07275 4.78369H11.1001C12.5403 4.78375 13.6412 6.0673 13.4224 7.49072L12.7944 11.5747C12.6179 12.7208 11.6318 13.5667 10.4722 13.5669H2.64014C1.66443 13.5669 0.873535 12.776 0.873535 11.8003V7.71729C0.873535 6.74158 1.66443 5.95068 2.64014 5.95068H3.99951L6.04834 1.34131L6.12256 1.20166C6.31844 0.892431 6.66142 0.700708 7.03467 0.700684C8.16045 0.700684 9.07275 1.61299 9.07275 2.73877V4.78369Z",fill:"#97A3B7"})),mp=e=>A.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M11.8008 3.16651C11.8008 2.83026 11.7996 2.61407 11.7861 2.44972C11.7733 2.29228 11.7516 2.23558 11.7383 2.20948C11.684 2.10311 11.5976 2.0167 11.4912 1.96241C11.4651 1.94911 11.4084 1.92742 11.251 1.91456C11.0866 1.90113 10.8698 1.89991 10.5332 1.89991H10.084V7.11671H10.5332C10.8697 7.11671 11.0866 7.11647 11.251 7.10304C11.4084 7.09017 11.4651 7.06848 11.4912 7.05519C11.5977 7.00085 11.684 6.91369 11.7383 6.80714C11.7516 6.78095 11.7733 6.72473 11.7861 6.56788C11.7996 6.40344 11.8008 6.18671 11.8008 5.85011V3.16651ZM6.00001 11.5288C6.00014 11.9658 6.33491 12.3239 6.76173 12.3628L8.68946 8.02784C8.73905 7.91626 8.79776 7.77463 8.8838 7.6421V1.89991H4.30275C3.86739 1.89991 3.57385 1.9011 3.34571 1.91847C3.12524 1.93527 3.00982 1.96482 2.92677 2.00245C2.72742 2.09281 2.55809 2.23906 2.43849 2.42237C2.38875 2.49873 2.34108 2.60774 2.29103 2.82276C2.23917 3.04561 2.19414 3.33583 2.12794 3.76612L1.82325 5.74952C1.73618 6.31551 1.67724 6.70248 1.65724 7.00245C1.63765 7.29653 1.66125 7.4439 1.69923 7.54347C1.79436 7.79282 1.97309 8.00139 2.20509 8.13331C2.29773 8.18598 2.43978 8.23198 2.73341 8.25733C3.03294 8.28318 3.42441 8.2837 3.99708 8.2837H4.46681C4.62026 8.2837 4.77205 8.28306 4.89943 8.29347C5.00019 8.30172 5.11526 8.31839 5.23439 8.36085L5.3545 8.41261L5.51271 8.51026C5.61292 8.58313 5.70157 8.67078 5.77443 8.77101L5.8711 8.93019L5.92286 9.0503C5.96524 9.1694 5.98202 9.28456 5.99025 9.38526C6.00063 9.51256 6.00001 9.66359 6.00001 9.8169V11.5288ZM13 5.85011C13 6.1669 13.0008 6.44089 12.9824 6.66554C12.9635 6.89709 12.9214 7.12868 12.8076 7.35206C12.6383 7.68439 12.3684 7.95514 12.0361 8.12452C11.8127 8.23838 11.5803 8.2804 11.3486 8.29933C11.124 8.31767 10.8499 8.3169 10.5332 8.3169H10.0899C9.97739 8.31691 9.91771 8.31637 9.87501 8.31886C9.85536 8.35692 9.83103 8.41194 9.78517 8.51515L7.82521 12.9263C7.6519 13.3159 7.26532 13.5669 6.83888 13.5669C5.71318 13.5669 4.80093 12.6545 4.80079 11.5288V9.8169C4.80079 9.64881 4.799 9.55553 4.79396 9.48878C4.72728 9.48383 4.63383 9.4839 4.46681 9.4839H3.99708C3.44579 9.4839 2.99395 9.48395 2.63087 9.45265C2.26202 9.42082 1.92186 9.35223 1.61232 9.17628C1.13824 8.90671 0.772529 8.48073 0.578136 7.9712C0.451217 7.63844 0.43534 7.29185 0.459972 6.92237C0.484222 6.55869 0.552876 6.11195 0.63673 5.5669L0.942394 3.58351C1.00581 3.17132 1.05751 2.82883 1.12208 2.55128C1.18838 2.26634 1.27691 2.00629 1.4336 1.76612C1.67803 1.39152 2.02424 1.0943 2.43165 0.909678C2.69285 0.791323 2.96319 0.743407 3.25489 0.721201C3.53908 0.699573 3.8856 0.700693 4.30275 0.700693H10.5332C10.8499 0.700693 11.124 0.69993 11.3486 0.718272C11.5803 0.737198 11.8127 0.779216 12.0361 0.893076C12.3683 1.06241 12.6383 1.33244 12.8076 1.66456C12.9215 1.88802 12.9635 2.12041 12.9824 2.35206C13.0008 2.57656 13 2.85001 13 3.16651V5.85011Z",fill:"#97A3B7"})),AI=e=>A.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6.02637 0.261719C6.91006 0.100716 7.81654 0.108586 8.69727 0.285156C8.77943 0.301685 8.85737 0.335356 8.92578 0.383789C8.99413 0.432207 9.05187 0.494446 9.09473 0.566406L10.1699 2.37109L12.2686 2.40137C12.3521 2.40267 12.4348 2.42105 12.5107 2.45605C12.5866 2.49114 12.6547 2.5417 12.71 2.60449L12.9268 2.8623C13.4177 3.47393 13.8044 4.1638 14.0703 4.90332H14.0713C14.1006 4.98499 14.1111 5.07276 14.1035 5.15918C14.0958 5.24545 14.0694 5.32914 14.0264 5.4043L13.0107 7.17676L14.0654 8.97949C14.1089 9.05374 14.1349 9.13706 14.1436 9.22266C14.1522 9.30829 14.143 9.39509 14.1152 9.47656C13.8308 10.316 13.3846 11.0919 12.8008 11.7588C12.7442 11.8235 12.6731 11.8748 12.5947 11.9102C12.5163 11.9454 12.4307 11.9644 12.3447 11.9639L10.2559 11.9512L9.22656 13.7188C9.18293 13.7935 9.12263 13.8576 9.05176 13.9072C8.98094 13.9567 8.90045 13.9914 8.81543 14.0068C7.9318 14.1675 7.02506 14.1583 6.14453 13.9814L6.14355 13.9824C6.0797 13.9694 6.01838 13.9446 5.96191 13.9121C5.87332 13.8615 5.7985 13.7897 5.74609 13.7021L4.67188 11.8955L2.56934 11.8682C2.48571 11.8669 2.4031 11.8485 2.32715 11.8135C2.25108 11.7784 2.18323 11.727 2.12793 11.6641C1.60736 11.0751 1.18875 10.4045 0.888672 9.67969L0.767578 9.36621C0.738264 9.28452 0.726773 9.19681 0.734375 9.11035C0.742031 9.02393 0.768379 8.93953 0.811523 8.86426L1.82617 7.0918L0.772461 5.28906C0.729026 5.2148 0.702006 5.1315 0.693359 5.0459C0.684801 4.96052 0.695058 4.87421 0.722656 4.79297C1.00784 3.95289 1.45608 3.17678 2.04102 2.50977C2.09771 2.44503 2.16762 2.39274 2.24609 2.35742C2.32438 2.32222 2.40928 2.30426 2.49512 2.30469L4.58398 2.31543L5.61426 0.549805C5.65789 0.474997 5.71718 0.410066 5.78809 0.360352C5.8591 0.31064 5.94107 0.277156 6.02637 0.261719ZM7.53809 14.0195C7.59898 14.0196 7.65982 14.0181 7.7207 14.0166C7.65982 14.0181 7.59898 14.0196 7.53809 14.0195ZM7.2334 14.0117C7.28581 14.014 7.33818 14.0164 7.39062 14.0176C7.33818 14.0164 7.28581 14.014 7.2334 14.0117ZM7.85742 14.0127C7.89653 14.0109 7.93552 14.0073 7.97461 14.0049C7.93552 14.0073 7.89654 14.0109 7.85742 14.0127ZM6.91113 13.9902C6.97295 13.9958 7.03476 14.0009 7.09668 14.0049C7.03476 14.0009 6.97295 13.9958 6.91113 13.9902ZM6.6543 13.9619C6.6898 13.9665 6.72519 13.9716 6.76074 13.9756C6.72519 13.9716 6.6898 13.9665 6.6543 13.9619ZM5.91016 13.75C5.94027 13.7795 5.97474 13.8051 6.01172 13.8262L5.95898 13.791C5.94197 13.7782 5.92535 13.7649 5.91016 13.75ZM6.58008 12.9414H6.58105H6.58008ZM8.2002 1.41895C7.63858 1.33129 7.06722 1.32543 6.50391 1.40137L5.5127 3.10059C5.45667 3.19686 5.37383 3.27503 5.27539 3.32715C5.21254 3.36088 5.14878 3.39942 5.08594 3.43555L5.08496 3.43457C4.99197 3.48895 4.88605 3.51825 4.77832 3.51758L2.77637 3.50586C2.43354 3.9367 2.15694 4.41647 1.95508 4.92871L2.96875 6.66211H2.96973C3.01013 6.73278 3.03531 6.81132 3.04492 6.8916L3.04883 6.97461C3.04667 7.04613 3.0485 7.11658 3.05078 7.18945C3.0548 7.30124 3.02821 7.41268 2.97266 7.50977L1.99609 9.21289C2.21404 9.7388 2.50744 10.2299 2.86621 10.6719L4.88281 10.7012H4.88379C4.99002 10.7034 5.09368 10.7341 5.18457 10.7891L5.39258 10.9082C5.45916 10.9464 5.51715 10.9978 5.56445 11.0576L5.6084 11.1201L6.6416 12.8486C7.20362 12.9365 7.77513 12.9432 8.33887 12.8672L9.3291 11.1689C9.38528 11.0722 9.46843 10.9926 9.56738 10.9404C9.63017 10.9067 9.69505 10.8701 9.75781 10.834L9.8291 10.7988C9.90336 10.7678 9.98341 10.7514 10.0645 10.752L12.0664 10.7646C12.4092 10.3324 12.6847 9.85062 12.8857 9.33691L11.8711 7.60645L11.8721 7.60547C11.8181 7.51108 11.7903 7.40365 11.792 7.29492L11.791 7.29395C11.7932 7.22206 11.7923 7.15042 11.79 7.07715C11.7862 6.96565 11.8128 6.85466 11.8682 6.75781L12.8438 5.05371C12.6258 4.52811 12.3333 4.03648 11.9746 3.59473L9.95801 3.56641H9.95703C9.85067 3.56414 9.74722 3.53265 9.65625 3.47754V3.47852L9.45898 3.36426L9.39258 3.32129C9.32844 3.27486 9.27351 3.21669 9.23242 3.14844V3.14746L8.2002 1.41895ZM2.4668 11.7559L2.57031 11.7686H2.57129C2.50157 11.7675 2.43246 11.7518 2.36914 11.7227L2.4668 11.7559ZM1.78809 11.082V11.0811V11.082ZM13.0244 11.3203C13.0502 11.2862 13.0774 11.2533 13.1025 11.2188C13.0774 11.2533 13.0502 11.2862 13.0244 11.3203ZM13.2051 11.0713C13.2348 11.0279 13.2643 10.9845 13.293 10.9404C13.2643 10.9845 13.2348 11.0279 13.2051 11.0713ZM9.90918 10.876C9.90231 10.8782 9.89544 10.8803 9.88867 10.8828C9.89545 10.8803 9.90231 10.8782 9.90918 10.876ZM13.3535 10.8447C13.3903 10.7861 13.426 10.7268 13.4609 10.667C13.426 10.7268 13.3903 10.7861 13.3535 10.8447ZM13.5049 10.5928C13.5426 10.5264 13.5789 10.4593 13.6143 10.3916C13.5789 10.4593 13.5426 10.5264 13.5049 10.5928ZM13.6582 10.3066C13.695 10.2337 13.7305 10.1602 13.7646 10.0859C13.7305 10.1602 13.695 10.2337 13.6582 10.3066ZM7.2168 4.04004C7.82858 3.99994 8.43974 4.14269 8.9707 4.44922C9.68176 4.86085 10.2003 5.53844 10.4131 6.33203C10.6256 7.12573 10.5145 7.97155 10.1045 8.68359C9.79803 9.21429 9.34157 9.64291 8.79199 9.91406C8.24214 10.1852 7.62346 10.287 7.01562 10.207C6.40793 10.127 5.83684 9.86895 5.37598 9.46484C4.91529 9.06072 4.58448 8.52844 4.42578 7.93652C4.26721 7.34451 4.28843 6.71808 4.48535 6.1377C4.68236 5.55755 5.04627 5.04792 5.53223 4.6748C6.01845 4.30171 6.60526 4.08027 7.2168 4.04004ZM13.7852 10.041C13.8281 9.94559 13.8697 9.84945 13.9082 9.75195V9.75098C13.8696 9.84876 13.8283 9.94531 13.7852 10.041ZM6.40918 9.95703C6.46044 9.97542 6.51219 9.99222 6.56445 10.0078C6.51219 9.99225 6.46044 9.97539 6.40918 9.95703ZM6.20996 9.87695C6.25096 9.89508 6.2922 9.91244 6.33398 9.92871C6.2922 9.91247 6.25097 9.89505 6.20996 9.87695ZM6.02832 9.79004C6.0678 9.81077 6.10809 9.82969 6.14844 9.84863C6.10808 9.82972 6.06781 9.81074 6.02832 9.79004ZM5.84082 9.68262C5.87596 9.70443 5.9113 9.72578 5.94727 9.74609C5.91128 9.7258 5.87597 9.7044 5.84082 9.68262ZM12.9131 9.53613C12.9421 9.46825 12.9707 9.40012 12.9971 9.33105L12.9961 9.33008C12.9697 9.3993 12.9422 9.46808 12.9131 9.53613ZM5.66602 9.56543C5.7015 9.59105 5.73694 9.61662 5.77344 9.64062C5.73693 9.61664 5.70151 9.59104 5.66602 9.56543ZM1.97461 9.41699C1.99284 9.4575 2.01311 9.49704 2.03223 9.53711C1.98023 9.42813 1.93016 9.31814 1.88477 9.20605L1.97461 9.41699ZM5.59277 9.5127C5.59556 9.51484 5.59877 9.51642 5.60156 9.51855C5.54737 9.47722 5.49386 9.43478 5.44238 9.38965L5.59277 9.5127ZM8.03125 5.33496C7.67547 5.21424 7.29063 5.20159 6.92773 5.29883C6.56509 5.39617 6.23977 5.59952 5.99219 5.88184C5.74452 6.16433 5.58615 6.51424 5.53711 6.88672C5.48824 7.25901 5.54977 7.63783 5.71582 7.97461C5.88202 8.31152 6.14537 8.59145 6.4707 8.7793C6.90703 9.0311 7.42549 9.09913 7.91211 8.96875C8.39876 8.83831 8.81448 8.52031 9.06641 8.08398C9.25414 7.7587 9.3409 7.38453 9.31641 7.00977C9.2918 6.635 9.15631 6.27555 8.92773 5.97754C8.69908 5.67961 8.38685 5.45577 8.03125 5.33496ZM6.17676 8.69922C6.25355 8.76023 6.3343 8.81676 6.41992 8.86621L6.4209 8.86523C6.33525 8.81578 6.2536 8.76024 6.17676 8.69922ZM8.47754 8.83203V8.83105V8.83203ZM5.77637 8.27246C5.83227 8.35318 5.89399 8.4295 5.96094 8.50098L5.86426 8.38965C5.83359 8.35168 5.80422 8.31265 5.77637 8.27246ZM4.52246 7.91113C4.5608 8.0541 4.60948 8.19346 4.66797 8.32812C4.60945 8.19325 4.56083 8.05334 4.52246 7.91016V7.91113ZM9.40039 6.85645C9.40722 6.90519 9.41278 6.95457 9.41602 7.00391C9.41922 7.05311 9.42035 7.1023 9.41992 7.15137C9.42035 7.10204 9.41926 7.05239 9.41602 7.00293C9.41279 6.95379 9.40719 6.90498 9.40039 6.85645ZM11.9004 6.95215C11.8982 6.96247 11.897 6.97295 11.8955 6.9834C11.8971 6.97295 11.8982 6.96247 11.9004 6.95215ZM4.65137 5.97754C4.62849 6.03229 4.60852 6.08831 4.58887 6.14453C4.60851 6.0883 4.6285 6.03229 4.65137 5.97754ZM4.73633 5.79492C4.7241 5.81941 4.71274 5.8443 4.70117 5.86914C4.71273 5.8443 4.72411 5.81941 4.73633 5.79492ZM4.84473 5.59863C4.82627 5.62957 4.80836 5.66078 4.79102 5.69238C4.80835 5.66077 4.82628 5.62957 4.84473 5.59863ZM4.95605 5.42383C4.93113 5.45972 4.90714 5.49624 4.88379 5.5332C4.90712 5.49623 4.93114 5.45973 4.95605 5.42383ZM8.31445 4.27051C8.52443 4.33607 8.72746 4.42504 8.91992 4.53613L8.9209 4.53516C8.72801 4.42379 8.52395 4.33516 8.31348 4.26953L8.31445 4.27051ZM5.09082 5.24609C5.06172 5.28198 5.03326 5.3183 5.00586 5.35547C5.03325 5.31828 5.06173 5.28199 5.09082 5.24609ZM6.63965 5.29199C6.64276 5.29067 6.6463 5.29037 6.64941 5.28906C6.6463 5.29037 6.64276 5.29067 6.63965 5.29199ZM7.9209 5.19824H7.92188H7.9209ZM6.90234 5.20215H6.90332H6.90234ZM5.23145 5.08496C5.19896 5.11965 5.16651 5.15429 5.13574 5.19043C5.1665 5.15428 5.19897 5.11966 5.23145 5.08496ZM13.9766 4.93652V4.9375V4.93652ZM0.922852 4.53613C0.885573 4.63126 0.850299 4.72727 0.817383 4.82422V4.8252C0.850362 4.72803 0.885496 4.63148 0.922852 4.53613ZM2.01855 4.5293H2.01953H2.01855ZM1.04688 4.24316C1.02195 4.29878 0.998013 4.35481 0.974609 4.41113C0.998008 4.35481 1.02196 4.29878 1.04688 4.24316ZM7.22363 4.13965L7.22461 4.14062L7.22363 4.13965ZM7.66699 4.14453L7.66602 4.14355L7.66699 4.14453ZM1.17188 3.97852C1.1445 4.03303 1.11865 4.08828 1.09277 4.14355C1.11864 4.08828 1.14451 4.03304 1.17188 3.97852ZM12.4287 4.0498V4.04883V4.0498ZM12.6348 2.66992V2.6709C12.8546 2.91962 13.0566 3.1828 13.2383 3.45898C13.1171 3.27471 12.987 3.09618 12.8486 2.92383C12.7796 2.83782 12.708 2.75273 12.6348 2.66992ZM1.30859 3.72168C1.28765 3.75921 1.26729 3.79703 1.24707 3.83496C1.26728 3.79703 1.28765 3.75921 1.30859 3.72168ZM2.72656 3.40723V3.4082L4.7793 3.41797V3.41699L2.72656 3.40723ZM12.0234 3.49707C12.0719 3.55591 12.1198 3.61522 12.166 3.67578L12.0234 3.49609L9.95898 3.4668L12.0234 3.49707ZM1.47852 3.43457C1.45114 3.47831 1.42381 3.52205 1.39746 3.56641C1.4238 3.52204 1.45115 3.47831 1.47852 3.43457ZM9.78809 3.43164C9.79329 3.43365 9.79845 3.43566 9.80371 3.4375C9.79845 3.43567 9.79329 3.43365 9.78809 3.43164ZM5.22852 3.23926V3.24023V3.23926ZM1.64746 3.17676C1.61837 3.21879 1.58963 3.26104 1.56152 3.30371C1.58963 3.26104 1.61837 3.21879 1.64746 3.17676ZM2.11523 2.5752H2.11621H2.11523ZM8.94629 0.53418C8.96978 0.559626 8.99096 0.587273 9.00879 0.617188C8.97313 0.557368 8.92497 0.505135 8.86816 0.464844L8.94629 0.53418ZM6.37305 0.307617C6.26302 0.322319 6.15337 0.34041 6.04395 0.360352C6.15337 0.340409 6.26301 0.322304 6.37305 0.307617ZM8.35059 0.325195C8.25055 0.310024 8.15027 0.296933 8.0498 0.286133C8.15027 0.296945 8.25055 0.310026 8.35059 0.325195ZM7.92578 0.275391C7.85971 0.269476 7.79372 0.26282 7.72754 0.258789C7.79372 0.262834 7.85971 0.269466 7.92578 0.275391ZM6.9502 0.255859C6.89287 0.258741 6.83558 0.262311 6.77832 0.266602C6.83559 0.262325 6.89287 0.258726 6.9502 0.255859ZM7.58008 0.25293C7.53418 0.251105 7.4883 0.248968 7.44238 0.248047C7.4883 0.24898 7.53418 0.251094 7.58008 0.25293ZM7.12988 0.249023C7.17448 0.24794 7.21907 0.247302 7.26367 0.24707C7.21907 0.247314 7.17448 0.247928 7.12988 0.249023ZM6.67871 0.274414C6.57668 0.283521 6.47471 0.294033 6.37305 0.307617C6.47471 0.294047 6.57668 0.283499 6.67871 0.274414Z",fill:"#97A3B7"})),LI=e=>A.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_189_1728)"},A.createElement("path",{d:"M2.33317 2.4672H11.6665V9.4672H3.01567L2.33317 10.1497V2.4672ZM2.33317 1.30054C1.6915 1.30054 1.17234 1.82554 1.17234 2.4672L1.1665 12.9672L3.49984 10.6339H11.6665C12.3082 10.6339 12.8332 10.1089 12.8332 9.4672V2.4672C12.8332 1.82554 12.3082 1.30054 11.6665 1.30054H2.33317ZM3.49984 7.13387H8.1665V8.30054H3.49984V7.13387ZM3.49984 5.38387H10.4998V6.55054H3.49984V5.38387ZM3.49984 3.63387H10.4998V4.80054H3.49984V3.63387Z",fill:"#97A3B7"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_189_1728"},A.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),OI=e=>A.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_3803_129233)"},A.createElement("path",{d:"M7.3335 4.66683H8.66683V6.00016H7.3335V4.66683ZM7.3335 7.3335H8.66683V11.3335H7.3335V7.3335ZM8.00016 1.3335C4.32016 1.3335 1.3335 4.32016 1.3335 8.00016C1.3335 11.6802 4.32016 14.6668 8.00016 14.6668C11.6802 14.6668 14.6668 11.6802 14.6668 8.00016C14.6668 4.32016 11.6802 1.3335 8.00016 1.3335ZM8.00016 13.3335C5.06016 13.3335 2.66683 10.9402 2.66683 8.00016C2.66683 5.06016 5.06016 2.66683 8.00016 2.66683C10.9402 2.66683 13.3335 5.06016 13.3335 8.00016C13.3335 10.9402 10.9402 13.3335 8.00016 13.3335Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_3803_129233"},A.createElement("rect",{width:16,height:16,fill:"white"})))),FI=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,d]=_.useState(!1),g=_.useRef(!1),[b,x]=_.useState(!1),[y,p]=_.useState([]),{mutate:h,isPending:m}=eI(),{logoUrl:v,cardTitle:C,id:I,externalResourceId:E,connectorId:w,textToHighlight:T}=e.cardData||{},S=_.useMemo(()=>({key:T,card_id:I,card_title:C,connector_id:w,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[T,I,C,w,E,r,n]);if(_.useEffect(()=>{const X=Date.now();return()=>{c(rn.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),_.useEffect(()=>{var Y,oe,$;const X=($=(oe=(Y=e==null?void 0:e.cardData)==null?void 0:Y.data)==null?void 0:oe.flatDetails)==null?void 0:$.data;if(X){const P=X.sort((G,V)=>G.priority-V.priority);p(P),c(rn.OBJECT_HOVERED,S)}},[e,c,S]),!y||y.length===0)return null;const L=()=>{d(!0),c(rn.FEEDBACK_OPTION_CLICKED,S)},N=()=>{x(!0),c(rn.NEGATIVE_FEEDBACK_CLICKED,S)},D=X=>{const Y={card_id:I,entity_id:E,comment:X.feedbackComment,option:X.feedbackOption,feedback_type:"entity_extraction"};typeof X.isThumbsUp<"u"&&(Y.positive_feedback=X.isThumbsUp),h({conversationId:r,feedbackData:Y},{onSuccess:()=>{l?c(rn.FEEDBACK_OPTION_SUBMITTED,S):b&&c(rn.NEGATIVE_FEEDBACK_SUBMITTED,S),d(!1),x(!1),Se({message:pI,type:Ut})},onError:()=>{Se({message:hI,type:qe})}})},k=()=>{D({isThumbsUp:!0}),c(rn.POSITIVE_FEEDBACK_CLICKED,S)},M=X=>{D({...X,isThumbsUp:!1})},B=()=>{s==null||s(w),i()},z=()=>{a==null||a()},q=X=>{c(rn.PERMALINK_CLICKED,{...S,clicked_value:X})},Q=()=>{g.current||(c(rn.DATA_CARD_SCROLLED,S),g.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(yI,{children:[u.jsxs(EI,{onScroll:Q,children:[u.jsxs(CI,{children:[u.jsxs(f.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[v&&u.jsx("img",{src:v,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(f.Tooltip,{title:C,arrow:!0,placement:"top",children:u.jsx(vI,{variant:"h3",color:f.theme.palette.gray.black,width:o?"100px":"200px",children:C})})]}),o?u.jsx(TI,{variant:"text",size:"small",endIcon:u.jsx(f.icons.ArrowForward,{}),onClick:z,children:aI}):null]}),u.jsx(xI,{}),u.jsx(f.Box,{paddingY:"16px",children:y.map(({key:X,value:Y,label:oe,deepLink:$})=>u.jsxs(_I,{children:[u.jsxs(II,{children:[oe,":"]}),u.jsx(f.Tooltip,{title:(Y==null?void 0:Y.length)>Uc?Y:"",arrow:!0,placement:"top",children:$?u.jsx(f.Link,{href:$,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:f.theme.palette.primary.main},onClick:()=>q(Y),children:nd(Y||"N/A",Uc)}):u.jsx(wI,{children:nd(Y||"N/A",Uc)})})]},X))})]}),u.jsxs(SI,{children:[u.jsx(f.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx(Ho,{arrow:!0,title:oI,placement:"top",children:u.jsx(f.IconButton,{onClick:B,children:u.jsx(AI,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(f.Typography,{color:f.theme.palette.gray.gray3,fontSize:12,children:iI}),u.jsx(Ho,{arrow:!0,title:sI,placement:"top",children:u.jsx(f.IconButton,{size:"small",children:u.jsx(OI,{})})})]})}),u.jsxs(f.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx(Ho,{arrow:!0,title:tI,placement:"top",children:u.jsx(f.IconButton,{size:"small",disabled:m,onClick:k,children:u.jsx(gp,{})})}),u.jsx(Ho,{arrow:!0,title:nI,placement:"top",children:u.jsx(f.IconButton,{size:"small",disabled:m,onClick:N,children:u.jsx(mp,{})})}),u.jsx(Ho,{arrow:!0,title:rI,placement:"top",children:u.jsx(f.IconButton,{onClick:L,size:"small",disabled:m,children:u.jsx(LI,{})})})]})]})]}),u.jsx(Vr,{shown:l,setShown:d,borderRadius:12,sx:{zIndex:15002},children:u.jsx(hp,{onCancel:()=>d(!1),onSubmit:D,isLoading:m,showOptions:!1,title:lI})}),u.jsx(Vr,{shown:b,setShown:x,borderRadius:12,sx:{zIndex:15002},children:u.jsx(hp,{onCancel:()=>x(!1),onSubmit:M,isLoading:m,title:cI})})]})},bp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,yp=(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"},DI=f.styled(({className:e,...t})=>u.jsx(f.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${f.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 ${f.theme.palette.gray.gray6}`,position:"relative"}}));function kI({elements:e,title:t,onKeyChange:n}){const[r,o]=_.useState(!1),[s,a]=_.useState(null),[i,c]=_.useState(""),[l,d]=_.useState("bottom"),[g,b]=_.useState(!1),x=_.useRef(null),y=_.useRef({x:0,y:0}),p=_.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]);_.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,N=L.textContent||"",D=yp(L);d(D),c(N),n&&n(N),a(L),o(!0)},w=()=>{if(r&&s){const S=yp(s);d(S)}},T=S=>{if(y.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(bp(L,N,k.getBoundingClientRect())){D=!0;break}if(!D){const k=document.querySelector(`.${f.tooltipClasses.tooltip}`);k&&bp(L,N,k.getBoundingClientRect())&&(D=!0)}D||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",w),window.addEventListener("scroll",w),document.addEventListener("mousemove",T),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",w),window.removeEventListener("scroll",w),document.removeEventListener("mousemove",T),p()}}},[e,n,r,s,g,p]);const h=()=>{b(!0),p()},m=()=>{b(!1),x.current=setTimeout(()=>{o(!1),a(null)},150)},C=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:h,onMouseLeave:m,children:C});return u.jsx(DI,{title:I,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const NI=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=_.useState(null),[l,d]=_.useState([]),{data:g,isError:b}=UE(e,t);return _.useEffect(()=>{g?c(g):b&&c(null)},[g,b]),_.useEffect(()=>{let x=null;if(i&&Object.keys(i).length&&e){x=new KE(Object.keys(i)||[],d);const y=Object.keys(i).map(p=>{var m;const h=((m=i[p])==null?void 0:m.cardData)||{};return{key:p,card_title:h.cardTitle,connector_id:h.connectorId}});a(rn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:y})}return()=>{x&&x.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(kI,{elements:l,title:(x,y)=>{var p;return!i||!x||!((p=i[x])!=null&&p.cardData)?u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(FI,{smIds:n,conversationId:e||"",analysisData:i[x],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:y,sendTrackingEvent:a})}})})},RI=({children:e})=>u.jsx(Pi,{store:qc,children:u.jsx(f.HiverProvider,{custom:!0,children:u.jsx(Jc,{children:u.jsx(_.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),MI=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx($c,{children:u.jsxs(RI,{children:[u.jsx(NI,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),ke.createPortal(u.jsx(Qc,{id:"toast-message",children:u.jsx(Wa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),Cp={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},PI=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class jI{constructor({processDelay:t=1e3}){De(this,"_processDelay");De(this,"initialized",!1);De(this,"_queue",[]);De(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});De(this,"ACTIONS",Cp);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 Cp.OPEN_CREATE_FORM:PI(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var xe=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(xe||{}),Ta=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Ta||{});const BI=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},VI=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Ta.UNAUTHENTICATED?xe.UNAUTHENTICATED:n.pending>0?xe.PENDING:n.failed?xe.ERROR:r.length===0?xe.NOT_LOGGED:o?xe.LOGGED:xe.PAUSED},GI=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},A.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),Kc=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},A.createElement("path",{d:"M6.3335 8.99967H7.66683V10.333H6.3335V8.99967ZM6.3335 3.66634H7.66683V7.66634H6.3335V3.66634ZM6.9935 0.333008C3.3135 0.333008 0.333496 3.31967 0.333496 6.99967C0.333496 10.6797 3.3135 13.6663 6.9935 13.6663C10.6802 13.6663 13.6668 10.6797 13.6668 6.99967C13.6668 3.31967 10.6802 0.333008 6.9935 0.333008ZM7.00016 12.333C4.0535 12.333 1.66683 9.94634 1.66683 6.99967C1.66683 4.05301 4.0535 1.66634 7.00016 1.66634C9.94683 1.66634 12.3335 4.05301 12.3335 6.99967C12.3335 9.94634 9.94683 12.333 7.00016 12.333Z"})),HI=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},A.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z",fill:"white"})),WI=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},A.createElement("g",{clipPath:"url(#clip0_532_206243)"},A.createElement("path",{d:"M9.94092 3V0.75L6.94092 3.75L9.94092 6.75V4.5C12.4234 4.5 14.4409 6.5175 14.4409 9C14.4409 9.7575 14.2534 10.4775 13.9159 11.1L15.0109 12.195C15.5959 11.2725 15.9409 10.1775 15.9409 9C15.9409 5.685 13.2559 3 9.94092 3ZM9.94092 13.5C7.45842 13.5 5.44092 11.4825 5.44092 9C5.44092 8.2425 5.62842 7.5225 5.96592 6.9L4.87092 5.805C4.28592 6.7275 3.94092 7.8225 3.94092 9C3.94092 12.315 6.62592 15 9.94092 15V17.25L12.9409 14.25L9.94092 11.25V13.5Z"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_532_206243"},A.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),ZI=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},A.createElement("g",{clipPath:"url(#clip0_1_11813)"},A.createElement("path",{d:"M9.05859 0C4.09059 0 0.0585938 4.032 0.0585938 9C0.0585938 13.968 4.09059 18 9.05859 18C14.0266 18 18.0586 13.968 18.0586 9C18.0586 4.032 14.0266 0 9.05859 0ZM8.15859 12.6H6.35859V5.4H8.15859V12.6ZM11.7586 12.6H9.95859V5.4H11.7586V12.6Z",fill:"#F2A579"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1_11813"},A.createElement("rect",{width:18,height:18,fill:"white"})))),Aa=f.keyframes`
|
|
2302
|
+
`,gp=e=>A.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M7.87354 2.73877C7.87354 2.30139 7.53821 1.94227 7.11084 1.90381L5.09229 6.44775C5.06387 6.51167 5.02799 6.57074 4.98975 6.62744V12.3667H10.4722C11.0395 12.3665 11.5225 11.9529 11.6089 11.3921L12.2368 7.30811C12.3437 6.61168 11.8047 5.98395 11.1001 5.98389H9.05615C8.40276 5.98371 7.87354 5.45372 7.87354 4.80029V2.73877ZM2.07275 11.8003C2.07275 12.1133 2.32718 12.3667 2.64014 12.3667H3.78955V7.1499H2.64014C2.32718 7.1499 2.07275 7.40432 2.07275 7.71729V11.8003ZM9.07275 4.78369H11.1001C12.5403 4.78375 13.6412 6.0673 13.4224 7.49072L12.7944 11.5747C12.6179 12.7208 11.6318 13.5667 10.4722 13.5669H2.64014C1.66443 13.5669 0.873535 12.776 0.873535 11.8003V7.71729C0.873535 6.74158 1.66443 5.95068 2.64014 5.95068H3.99951L6.04834 1.34131L6.12256 1.20166C6.31844 0.892431 6.66142 0.700708 7.03467 0.700684C8.16045 0.700684 9.07275 1.61299 9.07275 2.73877V4.78369Z",fill:"#97A3B7"})),mp=e=>A.createElement("svg",{width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M11.8008 3.16651C11.8008 2.83026 11.7996 2.61407 11.7861 2.44972C11.7733 2.29228 11.7516 2.23558 11.7383 2.20948C11.684 2.10311 11.5976 2.0167 11.4912 1.96241C11.4651 1.94911 11.4084 1.92742 11.251 1.91456C11.0866 1.90113 10.8698 1.89991 10.5332 1.89991H10.084V7.11671H10.5332C10.8697 7.11671 11.0866 7.11647 11.251 7.10304C11.4084 7.09017 11.4651 7.06848 11.4912 7.05519C11.5977 7.00085 11.684 6.91369 11.7383 6.80714C11.7516 6.78095 11.7733 6.72473 11.7861 6.56788C11.7996 6.40344 11.8008 6.18671 11.8008 5.85011V3.16651ZM6.00001 11.5288C6.00014 11.9658 6.33491 12.3239 6.76173 12.3628L8.68946 8.02784C8.73905 7.91626 8.79776 7.77463 8.8838 7.6421V1.89991H4.30275C3.86739 1.89991 3.57385 1.9011 3.34571 1.91847C3.12524 1.93527 3.00982 1.96482 2.92677 2.00245C2.72742 2.09281 2.55809 2.23906 2.43849 2.42237C2.38875 2.49873 2.34108 2.60774 2.29103 2.82276C2.23917 3.04561 2.19414 3.33583 2.12794 3.76612L1.82325 5.74952C1.73618 6.31551 1.67724 6.70248 1.65724 7.00245C1.63765 7.29653 1.66125 7.4439 1.69923 7.54347C1.79436 7.79282 1.97309 8.00139 2.20509 8.13331C2.29773 8.18598 2.43978 8.23198 2.73341 8.25733C3.03294 8.28318 3.42441 8.2837 3.99708 8.2837H4.46681C4.62026 8.2837 4.77205 8.28306 4.89943 8.29347C5.00019 8.30172 5.11526 8.31839 5.23439 8.36085L5.3545 8.41261L5.51271 8.51026C5.61292 8.58313 5.70157 8.67078 5.77443 8.77101L5.8711 8.93019L5.92286 9.0503C5.96524 9.1694 5.98202 9.28456 5.99025 9.38526C6.00063 9.51256 6.00001 9.66359 6.00001 9.8169V11.5288ZM13 5.85011C13 6.1669 13.0008 6.44089 12.9824 6.66554C12.9635 6.89709 12.9214 7.12868 12.8076 7.35206C12.6383 7.68439 12.3684 7.95514 12.0361 8.12452C11.8127 8.23838 11.5803 8.2804 11.3486 8.29933C11.124 8.31767 10.8499 8.3169 10.5332 8.3169H10.0899C9.97739 8.31691 9.91771 8.31637 9.87501 8.31886C9.85536 8.35692 9.83103 8.41194 9.78517 8.51515L7.82521 12.9263C7.6519 13.3159 7.26532 13.5669 6.83888 13.5669C5.71318 13.5669 4.80093 12.6545 4.80079 11.5288V9.8169C4.80079 9.64881 4.799 9.55553 4.79396 9.48878C4.72728 9.48383 4.63383 9.4839 4.46681 9.4839H3.99708C3.44579 9.4839 2.99395 9.48395 2.63087 9.45265C2.26202 9.42082 1.92186 9.35223 1.61232 9.17628C1.13824 8.90671 0.772529 8.48073 0.578136 7.9712C0.451217 7.63844 0.43534 7.29185 0.459972 6.92237C0.484222 6.55869 0.552876 6.11195 0.63673 5.5669L0.942394 3.58351C1.00581 3.17132 1.05751 2.82883 1.12208 2.55128C1.18838 2.26634 1.27691 2.00629 1.4336 1.76612C1.67803 1.39152 2.02424 1.0943 2.43165 0.909678C2.69285 0.791323 2.96319 0.743407 3.25489 0.721201C3.53908 0.699573 3.8856 0.700693 4.30275 0.700693H10.5332C10.8499 0.700693 11.124 0.69993 11.3486 0.718272C11.5803 0.737198 11.8127 0.779216 12.0361 0.893076C12.3683 1.06241 12.6383 1.33244 12.8076 1.66456C12.9215 1.88802 12.9635 2.12041 12.9824 2.35206C13.0008 2.57656 13 2.85001 13 3.16651V5.85011Z",fill:"#97A3B7"})),LI=e=>A.createElement("svg",{width:15,height:15,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M6.02637 0.261719C6.91006 0.100716 7.81654 0.108586 8.69727 0.285156C8.77943 0.301685 8.85737 0.335356 8.92578 0.383789C8.99413 0.432207 9.05187 0.494446 9.09473 0.566406L10.1699 2.37109L12.2686 2.40137C12.3521 2.40267 12.4348 2.42105 12.5107 2.45605C12.5866 2.49114 12.6547 2.5417 12.71 2.60449L12.9268 2.8623C13.4177 3.47393 13.8044 4.1638 14.0703 4.90332H14.0713C14.1006 4.98499 14.1111 5.07276 14.1035 5.15918C14.0958 5.24545 14.0694 5.32914 14.0264 5.4043L13.0107 7.17676L14.0654 8.97949C14.1089 9.05374 14.1349 9.13706 14.1436 9.22266C14.1522 9.30829 14.143 9.39509 14.1152 9.47656C13.8308 10.316 13.3846 11.0919 12.8008 11.7588C12.7442 11.8235 12.6731 11.8748 12.5947 11.9102C12.5163 11.9454 12.4307 11.9644 12.3447 11.9639L10.2559 11.9512L9.22656 13.7188C9.18293 13.7935 9.12263 13.8576 9.05176 13.9072C8.98094 13.9567 8.90045 13.9914 8.81543 14.0068C7.9318 14.1675 7.02506 14.1583 6.14453 13.9814L6.14355 13.9824C6.0797 13.9694 6.01838 13.9446 5.96191 13.9121C5.87332 13.8615 5.7985 13.7897 5.74609 13.7021L4.67188 11.8955L2.56934 11.8682C2.48571 11.8669 2.4031 11.8485 2.32715 11.8135C2.25108 11.7784 2.18323 11.727 2.12793 11.6641C1.60736 11.0751 1.18875 10.4045 0.888672 9.67969L0.767578 9.36621C0.738264 9.28452 0.726773 9.19681 0.734375 9.11035C0.742031 9.02393 0.768379 8.93953 0.811523 8.86426L1.82617 7.0918L0.772461 5.28906C0.729026 5.2148 0.702006 5.1315 0.693359 5.0459C0.684801 4.96052 0.695058 4.87421 0.722656 4.79297C1.00784 3.95289 1.45608 3.17678 2.04102 2.50977C2.09771 2.44503 2.16762 2.39274 2.24609 2.35742C2.32438 2.32222 2.40928 2.30426 2.49512 2.30469L4.58398 2.31543L5.61426 0.549805C5.65789 0.474997 5.71718 0.410066 5.78809 0.360352C5.8591 0.31064 5.94107 0.277156 6.02637 0.261719ZM7.53809 14.0195C7.59898 14.0196 7.65982 14.0181 7.7207 14.0166C7.65982 14.0181 7.59898 14.0196 7.53809 14.0195ZM7.2334 14.0117C7.28581 14.014 7.33818 14.0164 7.39062 14.0176C7.33818 14.0164 7.28581 14.014 7.2334 14.0117ZM7.85742 14.0127C7.89653 14.0109 7.93552 14.0073 7.97461 14.0049C7.93552 14.0073 7.89654 14.0109 7.85742 14.0127ZM6.91113 13.9902C6.97295 13.9958 7.03476 14.0009 7.09668 14.0049C7.03476 14.0009 6.97295 13.9958 6.91113 13.9902ZM6.6543 13.9619C6.6898 13.9665 6.72519 13.9716 6.76074 13.9756C6.72519 13.9716 6.6898 13.9665 6.6543 13.9619ZM5.91016 13.75C5.94027 13.7795 5.97474 13.8051 6.01172 13.8262L5.95898 13.791C5.94197 13.7782 5.92535 13.7649 5.91016 13.75ZM6.58008 12.9414H6.58105H6.58008ZM8.2002 1.41895C7.63858 1.33129 7.06722 1.32543 6.50391 1.40137L5.5127 3.10059C5.45667 3.19686 5.37383 3.27503 5.27539 3.32715C5.21254 3.36088 5.14878 3.39942 5.08594 3.43555L5.08496 3.43457C4.99197 3.48895 4.88605 3.51825 4.77832 3.51758L2.77637 3.50586C2.43354 3.9367 2.15694 4.41647 1.95508 4.92871L2.96875 6.66211H2.96973C3.01013 6.73278 3.03531 6.81132 3.04492 6.8916L3.04883 6.97461C3.04667 7.04613 3.0485 7.11658 3.05078 7.18945C3.0548 7.30124 3.02821 7.41268 2.97266 7.50977L1.99609 9.21289C2.21404 9.7388 2.50744 10.2299 2.86621 10.6719L4.88281 10.7012H4.88379C4.99002 10.7034 5.09368 10.7341 5.18457 10.7891L5.39258 10.9082C5.45916 10.9464 5.51715 10.9978 5.56445 11.0576L5.6084 11.1201L6.6416 12.8486C7.20362 12.9365 7.77513 12.9432 8.33887 12.8672L9.3291 11.1689C9.38528 11.0722 9.46843 10.9926 9.56738 10.9404C9.63017 10.9067 9.69505 10.8701 9.75781 10.834L9.8291 10.7988C9.90336 10.7678 9.98341 10.7514 10.0645 10.752L12.0664 10.7646C12.4092 10.3324 12.6847 9.85062 12.8857 9.33691L11.8711 7.60645L11.8721 7.60547C11.8181 7.51108 11.7903 7.40365 11.792 7.29492L11.791 7.29395C11.7932 7.22206 11.7923 7.15042 11.79 7.07715C11.7862 6.96565 11.8128 6.85466 11.8682 6.75781L12.8438 5.05371C12.6258 4.52811 12.3333 4.03648 11.9746 3.59473L9.95801 3.56641H9.95703C9.85067 3.56414 9.74722 3.53265 9.65625 3.47754V3.47852L9.45898 3.36426L9.39258 3.32129C9.32844 3.27486 9.27351 3.21669 9.23242 3.14844V3.14746L8.2002 1.41895ZM2.4668 11.7559L2.57031 11.7686H2.57129C2.50157 11.7675 2.43246 11.7518 2.36914 11.7227L2.4668 11.7559ZM1.78809 11.082V11.0811V11.082ZM13.0244 11.3203C13.0502 11.2862 13.0774 11.2533 13.1025 11.2188C13.0774 11.2533 13.0502 11.2862 13.0244 11.3203ZM13.2051 11.0713C13.2348 11.0279 13.2643 10.9845 13.293 10.9404C13.2643 10.9845 13.2348 11.0279 13.2051 11.0713ZM9.90918 10.876C9.90231 10.8782 9.89544 10.8803 9.88867 10.8828C9.89545 10.8803 9.90231 10.8782 9.90918 10.876ZM13.3535 10.8447C13.3903 10.7861 13.426 10.7268 13.4609 10.667C13.426 10.7268 13.3903 10.7861 13.3535 10.8447ZM13.5049 10.5928C13.5426 10.5264 13.5789 10.4593 13.6143 10.3916C13.5789 10.4593 13.5426 10.5264 13.5049 10.5928ZM13.6582 10.3066C13.695 10.2337 13.7305 10.1602 13.7646 10.0859C13.7305 10.1602 13.695 10.2337 13.6582 10.3066ZM7.2168 4.04004C7.82858 3.99994 8.43974 4.14269 8.9707 4.44922C9.68176 4.86085 10.2003 5.53844 10.4131 6.33203C10.6256 7.12573 10.5145 7.97155 10.1045 8.68359C9.79803 9.21429 9.34157 9.64291 8.79199 9.91406C8.24214 10.1852 7.62346 10.287 7.01562 10.207C6.40793 10.127 5.83684 9.86895 5.37598 9.46484C4.91529 9.06072 4.58448 8.52844 4.42578 7.93652C4.26721 7.34451 4.28843 6.71808 4.48535 6.1377C4.68236 5.55755 5.04627 5.04792 5.53223 4.6748C6.01845 4.30171 6.60526 4.08027 7.2168 4.04004ZM13.7852 10.041C13.8281 9.94559 13.8697 9.84945 13.9082 9.75195V9.75098C13.8696 9.84876 13.8283 9.94531 13.7852 10.041ZM6.40918 9.95703C6.46044 9.97542 6.51219 9.99222 6.56445 10.0078C6.51219 9.99225 6.46044 9.97539 6.40918 9.95703ZM6.20996 9.87695C6.25096 9.89508 6.2922 9.91244 6.33398 9.92871C6.2922 9.91247 6.25097 9.89505 6.20996 9.87695ZM6.02832 9.79004C6.0678 9.81077 6.10809 9.82969 6.14844 9.84863C6.10808 9.82972 6.06781 9.81074 6.02832 9.79004ZM5.84082 9.68262C5.87596 9.70443 5.9113 9.72578 5.94727 9.74609C5.91128 9.7258 5.87597 9.7044 5.84082 9.68262ZM12.9131 9.53613C12.9421 9.46825 12.9707 9.40012 12.9971 9.33105L12.9961 9.33008C12.9697 9.3993 12.9422 9.46808 12.9131 9.53613ZM5.66602 9.56543C5.7015 9.59105 5.73694 9.61662 5.77344 9.64062C5.73693 9.61664 5.70151 9.59104 5.66602 9.56543ZM1.97461 9.41699C1.99284 9.4575 2.01311 9.49704 2.03223 9.53711C1.98023 9.42813 1.93016 9.31814 1.88477 9.20605L1.97461 9.41699ZM5.59277 9.5127C5.59556 9.51484 5.59877 9.51642 5.60156 9.51855C5.54737 9.47722 5.49386 9.43478 5.44238 9.38965L5.59277 9.5127ZM8.03125 5.33496C7.67547 5.21424 7.29063 5.20159 6.92773 5.29883C6.56509 5.39617 6.23977 5.59952 5.99219 5.88184C5.74452 6.16433 5.58615 6.51424 5.53711 6.88672C5.48824 7.25901 5.54977 7.63783 5.71582 7.97461C5.88202 8.31152 6.14537 8.59145 6.4707 8.7793C6.90703 9.0311 7.42549 9.09913 7.91211 8.96875C8.39876 8.83831 8.81448 8.52031 9.06641 8.08398C9.25414 7.7587 9.3409 7.38453 9.31641 7.00977C9.2918 6.635 9.15631 6.27555 8.92773 5.97754C8.69908 5.67961 8.38685 5.45577 8.03125 5.33496ZM6.17676 8.69922C6.25355 8.76023 6.3343 8.81676 6.41992 8.86621L6.4209 8.86523C6.33525 8.81578 6.2536 8.76024 6.17676 8.69922ZM8.47754 8.83203V8.83105V8.83203ZM5.77637 8.27246C5.83227 8.35318 5.89399 8.4295 5.96094 8.50098L5.86426 8.38965C5.83359 8.35168 5.80422 8.31265 5.77637 8.27246ZM4.52246 7.91113C4.5608 8.0541 4.60948 8.19346 4.66797 8.32812C4.60945 8.19325 4.56083 8.05334 4.52246 7.91016V7.91113ZM9.40039 6.85645C9.40722 6.90519 9.41278 6.95457 9.41602 7.00391C9.41922 7.05311 9.42035 7.1023 9.41992 7.15137C9.42035 7.10204 9.41926 7.05239 9.41602 7.00293C9.41279 6.95379 9.40719 6.90498 9.40039 6.85645ZM11.9004 6.95215C11.8982 6.96247 11.897 6.97295 11.8955 6.9834C11.8971 6.97295 11.8982 6.96247 11.9004 6.95215ZM4.65137 5.97754C4.62849 6.03229 4.60852 6.08831 4.58887 6.14453C4.60851 6.0883 4.6285 6.03229 4.65137 5.97754ZM4.73633 5.79492C4.7241 5.81941 4.71274 5.8443 4.70117 5.86914C4.71273 5.8443 4.72411 5.81941 4.73633 5.79492ZM4.84473 5.59863C4.82627 5.62957 4.80836 5.66078 4.79102 5.69238C4.80835 5.66077 4.82628 5.62957 4.84473 5.59863ZM4.95605 5.42383C4.93113 5.45972 4.90714 5.49624 4.88379 5.5332C4.90712 5.49623 4.93114 5.45973 4.95605 5.42383ZM8.31445 4.27051C8.52443 4.33607 8.72746 4.42504 8.91992 4.53613L8.9209 4.53516C8.72801 4.42379 8.52395 4.33516 8.31348 4.26953L8.31445 4.27051ZM5.09082 5.24609C5.06172 5.28198 5.03326 5.3183 5.00586 5.35547C5.03325 5.31828 5.06173 5.28199 5.09082 5.24609ZM6.63965 5.29199C6.64276 5.29067 6.6463 5.29037 6.64941 5.28906C6.6463 5.29037 6.64276 5.29067 6.63965 5.29199ZM7.9209 5.19824H7.92188H7.9209ZM6.90234 5.20215H6.90332H6.90234ZM5.23145 5.08496C5.19896 5.11965 5.16651 5.15429 5.13574 5.19043C5.1665 5.15428 5.19897 5.11966 5.23145 5.08496ZM13.9766 4.93652V4.9375V4.93652ZM0.922852 4.53613C0.885573 4.63126 0.850299 4.72727 0.817383 4.82422V4.8252C0.850362 4.72803 0.885496 4.63148 0.922852 4.53613ZM2.01855 4.5293H2.01953H2.01855ZM1.04688 4.24316C1.02195 4.29878 0.998013 4.35481 0.974609 4.41113C0.998008 4.35481 1.02196 4.29878 1.04688 4.24316ZM7.22363 4.13965L7.22461 4.14062L7.22363 4.13965ZM7.66699 4.14453L7.66602 4.14355L7.66699 4.14453ZM1.17188 3.97852C1.1445 4.03303 1.11865 4.08828 1.09277 4.14355C1.11864 4.08828 1.14451 4.03304 1.17188 3.97852ZM12.4287 4.0498V4.04883V4.0498ZM12.6348 2.66992V2.6709C12.8546 2.91962 13.0566 3.1828 13.2383 3.45898C13.1171 3.27471 12.987 3.09618 12.8486 2.92383C12.7796 2.83782 12.708 2.75273 12.6348 2.66992ZM1.30859 3.72168C1.28765 3.75921 1.26729 3.79703 1.24707 3.83496C1.26728 3.79703 1.28765 3.75921 1.30859 3.72168ZM2.72656 3.40723V3.4082L4.7793 3.41797V3.41699L2.72656 3.40723ZM12.0234 3.49707C12.0719 3.55591 12.1198 3.61522 12.166 3.67578L12.0234 3.49609L9.95898 3.4668L12.0234 3.49707ZM1.47852 3.43457C1.45114 3.47831 1.42381 3.52205 1.39746 3.56641C1.4238 3.52204 1.45115 3.47831 1.47852 3.43457ZM9.78809 3.43164C9.79329 3.43365 9.79845 3.43566 9.80371 3.4375C9.79845 3.43567 9.79329 3.43365 9.78809 3.43164ZM5.22852 3.23926V3.24023V3.23926ZM1.64746 3.17676C1.61837 3.21879 1.58963 3.26104 1.56152 3.30371C1.58963 3.26104 1.61837 3.21879 1.64746 3.17676ZM2.11523 2.5752H2.11621H2.11523ZM8.94629 0.53418C8.96978 0.559626 8.99096 0.587273 9.00879 0.617188C8.97313 0.557368 8.92497 0.505135 8.86816 0.464844L8.94629 0.53418ZM6.37305 0.307617C6.26302 0.322319 6.15337 0.34041 6.04395 0.360352C6.15337 0.340409 6.26301 0.322304 6.37305 0.307617ZM8.35059 0.325195C8.25055 0.310024 8.15027 0.296933 8.0498 0.286133C8.15027 0.296945 8.25055 0.310026 8.35059 0.325195ZM7.92578 0.275391C7.85971 0.269476 7.79372 0.26282 7.72754 0.258789C7.79372 0.262834 7.85971 0.269466 7.92578 0.275391ZM6.9502 0.255859C6.89287 0.258741 6.83558 0.262311 6.77832 0.266602C6.83559 0.262325 6.89287 0.258726 6.9502 0.255859ZM7.58008 0.25293C7.53418 0.251105 7.4883 0.248968 7.44238 0.248047C7.4883 0.24898 7.53418 0.251094 7.58008 0.25293ZM7.12988 0.249023C7.17448 0.24794 7.21907 0.247302 7.26367 0.24707C7.21907 0.247314 7.17448 0.247928 7.12988 0.249023ZM6.67871 0.274414C6.57668 0.283521 6.47471 0.294033 6.37305 0.307617C6.47471 0.294047 6.57668 0.283499 6.67871 0.274414Z",fill:"#97A3B7"})),OI=e=>A.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_189_1728)"},A.createElement("path",{d:"M2.33317 2.4672H11.6665V9.4672H3.01567L2.33317 10.1497V2.4672ZM2.33317 1.30054C1.6915 1.30054 1.17234 1.82554 1.17234 2.4672L1.1665 12.9672L3.49984 10.6339H11.6665C12.3082 10.6339 12.8332 10.1089 12.8332 9.4672V2.4672C12.8332 1.82554 12.3082 1.30054 11.6665 1.30054H2.33317ZM3.49984 7.13387H8.1665V8.30054H3.49984V7.13387ZM3.49984 5.38387H10.4998V6.55054H3.49984V5.38387ZM3.49984 3.63387H10.4998V4.80054H3.49984V3.63387Z",fill:"#97A3B7"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_189_1728"},A.createElement("rect",{width:14,height:14,fill:"white",transform:"translate(0 0.133789)"})))),FI=e=>A.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("g",{clipPath:"url(#clip0_3803_129233)"},A.createElement("path",{d:"M7.3335 4.66683H8.66683V6.00016H7.3335V4.66683ZM7.3335 7.3335H8.66683V11.3335H7.3335V7.3335ZM8.00016 1.3335C4.32016 1.3335 1.3335 4.32016 1.3335 8.00016C1.3335 11.6802 4.32016 14.6668 8.00016 14.6668C11.6802 14.6668 14.6668 11.6802 14.6668 8.00016C14.6668 4.32016 11.6802 1.3335 8.00016 1.3335ZM8.00016 13.3335C5.06016 13.3335 2.66683 10.9402 2.66683 8.00016C2.66683 5.06016 5.06016 2.66683 8.00016 2.66683C10.9402 2.66683 13.3335 5.06016 13.3335 8.00016C13.3335 10.9402 10.9402 13.3335 8.00016 13.3335Z",fill:"#6F7C90"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_3803_129233"},A.createElement("rect",{width:16,height:16,fill:"white"})))),DI=({analysisData:e,isAdmin:t=!1,smIds:n,conversationId:r,showGoToApp:o=!1,redirectToAdmin:s,goToApps:a,hideTooltip:i,sendTrackingEvent:c})=>{const[l,d]=_.useState(!1),g=_.useRef(!1),[b,x]=_.useState(!1),[y,p]=_.useState([]),{mutate:h,isPending:m}=tI(),{logoUrl:v,cardTitle:C,id:I,externalResourceId:E,connectorId:w,textToHighlight:T}=e.cardData||{},S=_.useMemo(()=>({key:T,card_id:I,card_title:C,connector_id:w,external_resource_id:E,conversation_id:r,sm_id:n[0],all_sm_ids:n}),[T,I,C,w,E,r,n]);if(_.useEffect(()=>{const X=Date.now();return()=>{c(rn.DATA_CARD_DURATION,{...S,duration:Date.now()-X})}},[c]),_.useEffect(()=>{var Y,oe,$;const X=($=(oe=(Y=e==null?void 0:e.cardData)==null?void 0:Y.data)==null?void 0:oe.flatDetails)==null?void 0:$.data;if(X){const P=X.sort((G,V)=>G.priority-V.priority);p(P),c(rn.OBJECT_HOVERED,S)}},[e,c,S]),!y||y.length===0)return null;const L=()=>{d(!0),c(rn.FEEDBACK_OPTION_CLICKED,S)},N=()=>{x(!0),c(rn.NEGATIVE_FEEDBACK_CLICKED,S)},D=X=>{const Y={card_id:I,entity_id:E,comment:X.feedbackComment,option:X.feedbackOption,feedback_type:"entity_extraction"};typeof X.isThumbsUp<"u"&&(Y.positive_feedback=X.isThumbsUp),h({conversationId:r,feedbackData:Y},{onSuccess:()=>{l?c(rn.FEEDBACK_OPTION_SUBMITTED,S):b&&c(rn.NEGATIVE_FEEDBACK_SUBMITTED,S),d(!1),x(!1),Se({message:hI,type:Ut})},onError:()=>{Se({message:gI,type:qe})}})},k=()=>{D({isThumbsUp:!0}),c(rn.POSITIVE_FEEDBACK_CLICKED,S)},M=X=>{D({...X,isThumbsUp:!1})},B=()=>{s==null||s(w),i()},z=()=>{a==null||a()},q=X=>{c(rn.PERMALINK_CLICKED,{...S,clicked_value:X})},Q=()=>{g.current||(c(rn.DATA_CARD_SCROLLED,S),g.current=!0)};return u.jsxs(u.Fragment,{children:[u.jsxs(CI,{children:[u.jsxs(II,{onScroll:Q,children:[u.jsxs(vI,{children:[u.jsxs(f.Stack,{flexDirection:"row",alignItems:"center",style:{height:"100%"},children:[v&&u.jsx("img",{src:v,alt:"Logo",style:{marginRight:8},height:18,width:18}),u.jsx(f.Tooltip,{title:C,arrow:!0,placement:"top",children:u.jsx(xI,{variant:"h3",color:f.theme.palette.gray.black,width:o?"100px":"200px",children:C})})]}),o?u.jsx(AI,{variant:"text",size:"small",endIcon:u.jsx(f.icons.ArrowForward,{}),onClick:z,children:iI}):null]}),u.jsx(EI,{}),u.jsx(f.Box,{paddingY:"16px",children:y.map(({key:X,value:Y,label:oe,deepLink:$})=>u.jsxs(SI,{children:[u.jsxs(wI,{children:[oe,":"]}),u.jsx(f.Tooltip,{title:(Y==null?void 0:Y.length)>Uc?Y:"",arrow:!0,placement:"top",children:$?u.jsx(f.Link,{href:$,target:"_blank",rel:"noopener noreferrer",style:{textDecoration:"none",color:f.theme.palette.primary.main},onClick:()=>q(Y),children:nd(Y||"N/A",Uc)}):u.jsx(_I,{children:nd(Y||"N/A",Uc)})})]},X))})]}),u.jsxs(TI,{children:[u.jsx(f.Stack,{flexDirection:"row",alignItems:"center",children:t?u.jsx(Ho,{arrow:!0,title:sI,placement:"top",children:u.jsx(f.IconButton,{onClick:B,children:u.jsx(LI,{})})}):u.jsxs(u.Fragment,{children:[u.jsx(f.Typography,{color:f.theme.palette.gray.gray3,fontSize:12,children:cI}),u.jsx(Ho,{arrow:!0,title:aI,placement:"top",children:u.jsx(f.IconButton,{size:"small",children:u.jsx(FI,{})})})]})}),u.jsxs(f.Stack,{flexDirection:"row",alignItems:"center",children:[u.jsx(Ho,{arrow:!0,title:nI,placement:"top",children:u.jsx(f.IconButton,{size:"small",disabled:m,onClick:k,children:u.jsx(gp,{})})}),u.jsx(Ho,{arrow:!0,title:rI,placement:"top",children:u.jsx(f.IconButton,{size:"small",disabled:m,onClick:N,children:u.jsx(mp,{})})}),u.jsx(Ho,{arrow:!0,title:oI,placement:"top",children:u.jsx(f.IconButton,{onClick:L,size:"small",disabled:m,children:u.jsx(OI,{})})})]})]})]}),u.jsx(Vr,{shown:l,setShown:d,borderRadius:12,sx:{zIndex:15002},children:u.jsx(hp,{onCancel:()=>d(!1),onSubmit:D,isLoading:m,showOptions:!1,title:uI})}),u.jsx(Vr,{shown:b,setShown:x,borderRadius:12,sx:{zIndex:15002},children:u.jsx(hp,{onCancel:()=>x(!1),onSubmit:M,isLoading:m,title:lI})})]})},bp=(e,t,n,r=10)=>e>=n.left-r&&e<=n.right+r&&t>=n.top-r&&t<=n.bottom+r,yp=(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"},kI=f.styled(({className:e,...t})=>u.jsx(f.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${f.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 ${f.theme.palette.gray.gray6}`,position:"relative"}}));function NI({elements:e,title:t,onKeyChange:n}){const[r,o]=_.useState(!1),[s,a]=_.useState(null),[i,c]=_.useState(""),[l,d]=_.useState("bottom"),[g,b]=_.useState(!1),x=_.useRef(null),y=_.useRef({x:0,y:0}),p=_.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=null)},[]);_.useEffect(()=>{if(e&&e.length>0){const E=S=>{const L=S.currentTarget,N=L.textContent||"",D=yp(L);d(D),c(N),n&&n(N),a(L),o(!0)},w=()=>{if(r&&s){const S=yp(s);d(S)}},T=S=>{if(y.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(bp(L,N,k.getBoundingClientRect())){D=!0;break}if(!D){const k=document.querySelector(`.${f.tooltipClasses.tooltip}`);k&&bp(L,N,k.getBoundingClientRect())&&(D=!0)}D||(o(!1),a(null))};return e.forEach(S=>{S.addEventListener("mouseenter",E)}),window.addEventListener("resize",w),window.addEventListener("scroll",w),document.addEventListener("mousemove",T),()=>{e.forEach(S=>{S.removeEventListener("mouseenter",E)}),window.removeEventListener("resize",w),window.removeEventListener("scroll",w),document.removeEventListener("mousemove",T),p()}}},[e,n,r,s,g,p]);const h=()=>{b(!0),p()},m=()=>{b(!1),x.current=setTimeout(()=>{o(!1),a(null)},150)},C=typeof t=="function"?t(i,()=>{o(!1),a(null)}):t,I=u.jsx("div",{onMouseEnter:h,onMouseLeave:m,children:C});return u.jsx(kI,{title:I,open:r,placement:l,disableInteractive:!1,PopperProps:{anchorEl:s,modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:u.jsx("span",{})})}const RI=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,goToApps:o,redirectToAdmin:s,sendTrackingEvent:a})=>{const[i,c]=_.useState(null),[l,d]=_.useState([]),{data:g,isError:b}=KE(e,t);return _.useEffect(()=>{g?c(g):b&&c(null)},[g,b]),_.useEffect(()=>{let x=null;if(i&&Object.keys(i).length&&e){x=new eI(Object.keys(i)||[],d);const y=Object.keys(i).map(p=>{var m;const h=((m=i[p])==null?void 0:m.cardData)||{};return{key:p,card_title:h.cardTitle,connector_id:h.connectorId}});a(rn.OBJECT_HIGHLIGHTED,{conversation_id:e,sm_id:n[0],all_sm_ids:n,cards:y})}return()=>{x&&x.destroy(),window.tooltipCleanup&&delete window.tooltipCleanup}},[i,e,a,n]),u.jsx("div",{children:u.jsx(NI,{elements:l,title:(x,y)=>{var p;return!i||!x||!((p=i[x])!=null&&p.cardData)?u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray6,children:"Loading data..."}):u.jsx(DI,{smIds:n,conversationId:e||"",analysisData:i[x],isAdmin:r,redirectToAdmin:s,goToApps:o,hideTooltip:y,sendTrackingEvent:a})}})})},MI=({children:e})=>u.jsx(Pi,{store:qc,children:u.jsx(f.HiverProvider,{custom:!0,children:u.jsx(Jc,{children:u.jsx(_.Suspense,{fallback:u.jsx(u.Fragment,{}),children:e})})})}),PI=({conversationId:e,hasSmList:t,smIds:n,isAdmin:r,connectorFunctions:o})=>u.jsx($c,{children:u.jsxs(MI,{children:[u.jsx(RI,{hasSmList:t,smIds:n,conversationId:e,isAdmin:r,goToApps:o.goToApps,redirectToAdmin:o.redirectToAdmin,sendTrackingEvent:o.sendTrackingEvent}),Ne.createPortal(u.jsx(Qc,{id:"toast-message",children:u.jsx(Wa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),Cp={OPEN_CREATE_FORM:"OPEN_CREATE_FORM"},jI=({conversationId:e,openCreateForm:t})=>n=>{n.conversationId===e&&t()};class BI{constructor({processDelay:t=1e3}){De(this,"_processDelay");De(this,"initialized",!1);De(this,"_queue",[]);De(this,"_queueProps",{conversationId:NaN,openCreateForm:()=>{}});De(this,"ACTIONS",Cp);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 Cp.OPEN_CREATE_FORM:jI(this._queueProps)(t.payload);break}}}destroy(){this._queueProps={conversationId:NaN,openCreateForm:()=>{}},this.initialized=!1}}var xe=(e=>(e.NOT_LOGGED="NOT_LOGGED",e.PENDING="PENDING",e.LOGGED="LOGGED",e.ERROR="ERROR",e.UNAUTHENTICATED="UNAUTHENTICATED",e.PAUSED="PAUSED",e))(xe||{}),Ta=(e=>(e.ENABLED="enabled",e.UNAUTHENTICATED="unauthenticated",e.DISABLED="disabled",e))(Ta||{});const VI=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},GI=e=>{const{emailLogSettings:t,messageLogStatus:n,selectedEntities:r,autoLogEnabled:o}=e;return t.connectorStatus===Ta.UNAUTHENTICATED?xe.UNAUTHENTICATED:n.pending>0?xe.PENDING:n.failed?xe.ERROR:r.length===0?xe.NOT_LOGGED:o?xe.LOGGED:xe.PAUSED},HI=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:10,height:10,viewBox:"0 0 10 10",fill:"none",...e},A.createElement("path",{d:"M9.70785 5.66671H5.70785V9.66671H4.37451V5.66671H0.374512V4.33337H4.37451V0.333374H5.70785V4.33337H9.70785V5.66671Z",fill:"#4D596C"})),Kc=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#D24B58",...e},A.createElement("path",{d:"M6.3335 8.99967H7.66683V10.333H6.3335V8.99967ZM6.3335 3.66634H7.66683V7.66634H6.3335V3.66634ZM6.9935 0.333008C3.3135 0.333008 0.333496 3.31967 0.333496 6.99967C0.333496 10.6797 3.3135 13.6663 6.9935 13.6663C10.6802 13.6663 13.6668 10.6797 13.6668 6.99967C13.6668 3.31967 10.6802 0.333008 6.9935 0.333008ZM7.00016 12.333C4.0535 12.333 1.66683 9.94634 1.66683 6.99967C1.66683 4.05301 4.0535 1.66634 7.00016 1.66634C9.94683 1.66634 12.3335 4.05301 12.3335 6.99967C12.3335 9.94634 9.94683 12.333 7.00016 12.333Z"})),WI=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:10,viewBox:"0 0 12 10",fill:"none",...e},A.createElement("path",{d:"M4.0001 8.0299L1.2201 5.2499L0.273438 6.1899L4.0001 9.91656L12.0001 1.91656L11.0601 0.976562L4.0001 8.0299Z",fill:"white"})),ZI=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:19,height:18,viewBox:"0 0 19 18",fill:"#6F7C90",...e},A.createElement("g",{clipPath:"url(#clip0_532_206243)"},A.createElement("path",{d:"M9.94092 3V0.75L6.94092 3.75L9.94092 6.75V4.5C12.4234 4.5 14.4409 6.5175 14.4409 9C14.4409 9.7575 14.2534 10.4775 13.9159 11.1L15.0109 12.195C15.5959 11.2725 15.9409 10.1775 15.9409 9C15.9409 5.685 13.2559 3 9.94092 3ZM9.94092 13.5C7.45842 13.5 5.44092 11.4825 5.44092 9C5.44092 8.2425 5.62842 7.5225 5.96592 6.9L4.87092 5.805C4.28592 6.7275 3.94092 7.8225 3.94092 9C3.94092 12.315 6.62592 15 9.94092 15V17.25L12.9409 14.25L9.94092 11.25V13.5Z"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_532_206243"},A.createElement("rect",{width:18,height:18,fill:"white",transform:"translate(0.940918)"})))),XI=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:18,height:18,viewBox:"0 0 18 18",fill:"none",...e},A.createElement("g",{clipPath:"url(#clip0_1_11813)"},A.createElement("path",{d:"M9.05859 0C4.09059 0 0.0585938 4.032 0.0585938 9C0.0585938 13.968 4.09059 18 9.05859 18C14.0266 18 18.0586 13.968 18.0586 9C18.0586 4.032 14.0266 0 9.05859 0ZM8.15859 12.6H6.35859V5.4H8.15859V12.6ZM11.7586 12.6H9.95859V5.4H11.7586V12.6Z",fill:"#F2A579"})),A.createElement("defs",null,A.createElement("clipPath",{id:"clip0_1_11813"},A.createElement("rect",{width:18,height:18,fill:"white"})))),Aa=f.keyframes`
|
|
2303
2303
|
from {
|
|
2304
2304
|
transform: rotate(0deg);
|
|
2305
2305
|
}
|
|
@@ -2312,73 +2312,73 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2312
2312
|
border-radius: 50%;
|
|
2313
2313
|
justify-content: center;
|
|
2314
2314
|
align-items: center;
|
|
2315
|
-
`,XI=f.styled(el)`
|
|
2316
|
-
background-color: #ffe250;
|
|
2317
2315
|
`,zI=f.styled(el)`
|
|
2318
|
-
background-color: #
|
|
2316
|
+
background-color: #ffe250;
|
|
2319
2317
|
`,YI=f.styled(el)`
|
|
2318
|
+
background-color: #00bc7e;
|
|
2319
|
+
`,JI=f.styled(el)`
|
|
2320
2320
|
animation: ${Aa} 1s linear infinite;
|
|
2321
2321
|
animation-fill-mode: backwards;
|
|
2322
2322
|
animation-direction: reverse;
|
|
2323
|
-
`,
|
|
2323
|
+
`,qI={[xe.NOT_LOGGED]:u.jsx(zI,{children:u.jsx(HI,{})}),[xe.PENDING]:u.jsx(JI,{children:u.jsx(ZI,{})}),[xe.LOGGED]:u.jsx(YI,{children:u.jsx(WI,{})}),[xe.ERROR]:u.jsx(Kc,{}),[xe.UNAUTHENTICATED]:u.jsx(Kc,{}),[xe.PAUSED]:u.jsx(XI,{})},vp=f.styled(f.Typography)`
|
|
2324
2324
|
font-size: 12px;
|
|
2325
2325
|
line-height: 14px;
|
|
2326
2326
|
font-weight: 500;
|
|
2327
2327
|
color: #4d596c;
|
|
2328
|
-
|
|
2328
|
+
`,$I=f.styled(vp)`
|
|
2329
2329
|
color: #6f7c90;
|
|
2330
|
-
`,tl=e=>u.jsx(vp,{children:e}),nl=e=>u.jsx(
|
|
2330
|
+
`,tl=e=>u.jsx(vp,{children:e}),nl=e=>u.jsx($I,{children:e}),QI={[xe.NOT_LOGGED]:tl,[xe.PENDING]:nl,[xe.LOGGED]:tl,[xe.PAUSED]:tl,[xe.ERROR]:nl,[xe.UNAUTHENTICATED]:nl},UI={[xe.NOT_LOGGED]:"Sync conversation",[xe.PENDING]:"Syncing in progress",[xe.LOGGED]:"Synced",[xe.PAUSED]:"Synced",[xe.ERROR]:"Syncing failed",[xe.UNAUTHENTICATED]:"Sync conversation"},zt=_.createContext({}),KI=f.styled(({className:e,...t})=>u.jsx(f.Tooltip,{...t,classes:{popper:e}}))(()=>({[`& .${f.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 ${f.theme.palette.gray.gray6}`,position:"relative"}})),ew=f.styled(f.Box)`
|
|
2331
2331
|
width: fit-content;
|
|
2332
2332
|
height: fit-content;
|
|
2333
|
-
`,
|
|
2333
|
+
`,tw=({children:e,renderTooltip:t,defaultOpen:n})=>{const[r,o]=_.useState(n),s=()=>o(!1),a=()=>o(!0),i=c=>{c.stopPropagation()};return u.jsx(f.ClickAwayListener,{onClickAway:s,children:u.jsx(ew,{onClick:a,children:u.jsx(KI,{open:r,disableHoverListener:!0,disableFocusListener:!0,disableTouchListener:!0,title:u.jsx(f.Box,{onClick:i,height:"100%",children:t({close:s})}),placement:"bottom-start",PopperProps:{modifiers:[{name:"preventOverflow",options:{boundary:window}}]},children:e})})})},nw="Turn off to stop syncing this conversation.",rw="Turn on to continue syncing this conversation.",ow="Authentication failed",sw="Retry authentication to use this functionality and save in ':connectorName'",aw="Reach out to your admin to reauthenticate :connectorName",iw="Syncing this conversation to :connectorName. Refresh the page to see updates.",cw="Something went wrong while syncing this conversation. Please try again.",lw="No recommendations found",uw="Already synced email cannot be removed",dw="https://cdn.hiverhq.com/connectors-module/assets/sync_conversation_preview.png",fw="Log this email thread to your CRM",pw="Automatically sync Hiver conversations with your CRM to unify and audit customer records easily.",xp="connector-agent_email-logger_welcomed",Ep="connector-agent_email-logger_welcome_shown",hw="Tell us how we can improve",gw="Everything looks good",mw="Something is not working",bw="Please provide your feedback",yw="Feedback submitted",Cw="Failed to submit feedback",Ip="email-logging",vw=[{label:"Records are not accurate",value:"not_accurate"},{label:"Search is not working",value:"search_not_working"},{label:"Other",value:"other"}],Dt={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"},xw={backgroundColor:"#fff",minWidth:"340px",width:"340px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:f.theme.palette.gray.gray3,padding:"0px"},Ew={color:"#fff !important"},Iw=f.styled(f.Stack)`
|
|
2334
2334
|
box-sizing: border-box;
|
|
2335
2335
|
padding: 16px;
|
|
2336
|
-
`,
|
|
2336
|
+
`,ww=f.styled("img")`
|
|
2337
2337
|
display: block;
|
|
2338
2338
|
width: 100%;
|
|
2339
2339
|
aspect-ratio: 3 / 2;
|
|
2340
2340
|
border-radius: 8px;
|
|
2341
2341
|
background: #ecedff;
|
|
2342
2342
|
object-fit: cover;
|
|
2343
|
-
`,
|
|
2343
|
+
`,_w=f.styled(f.Typography)`
|
|
2344
2344
|
margin-top: 10px;
|
|
2345
2345
|
color: #343c45;
|
|
2346
2346
|
font-size: 14px;
|
|
2347
2347
|
font-weight: 600;
|
|
2348
2348
|
line-height: 18px;
|
|
2349
2349
|
letter-spacing: -0.28px;
|
|
2350
|
-
`,
|
|
2350
|
+
`,Sw=f.styled(f.Typography)`
|
|
2351
2351
|
margin-top: 6px;
|
|
2352
2352
|
color: #3e4c5a;
|
|
2353
2353
|
font-size: 13px;
|
|
2354
2354
|
font-weight: 400;
|
|
2355
2355
|
line-height: 18px;
|
|
2356
2356
|
letter-spacing: -0.13px;
|
|
2357
|
-
`,
|
|
2357
|
+
`,Tw=f.styled(f.Stack)`
|
|
2358
2358
|
margin-top: 20px;
|
|
2359
2359
|
flex-flow: row nowrap;
|
|
2360
2360
|
justify-content: flex-end;
|
|
2361
2361
|
column-gap: 8px;
|
|
2362
|
-
`,wp=i0(),
|
|
2362
|
+
`,wp=i0(),Aw=({onContinue:e,connectorName:t})=>{const{connectorFunctions:n}=_.useContext(zt),r=n==null?void 0:n.sendTrackingEvent;return _.useEffect(()=>{const o=wp.getItem(Ep);if(!r||!t||o==="true")return;const s=setTimeout(()=>{r(Dt.email_logging_intro_popup_shown,{app_name:t}),wp.setItem(Ep,"true")},1500);return()=>{clearTimeout(s)}},[r,t]),u.jsxs(Iw,{children:[u.jsx(ww,{src:dw,alt:"Welcome"}),u.jsx(_w,{children:fw}),u.jsx(Sw,{children:pw}),u.jsx(Tw,{children:e?u.jsx(f.Button,{variant:"contained",size:"small",className:"primary-action",onClick:e,children:"Continue"}):null})]})},Lw=({children:e,onContinue:t,connectorName:n})=>u.jsx(Jf,{title:u.jsx(Aw,{onContinue:t,connectorName:n}),placement:"bottom-start",arrow:!0,tooltipStyle:xw,arrowStyle:Ew,children:e}),Ow={backgroundColor:"#fff",maxWidth:"326px",height:"144px",width:"326px",borderRadius:"8px",boxShadow:"0px 2px 10px 0px #00000026",color:f.theme.palette.gray.gray3,padding:"0px"},Fw={color:"#fff !important"},Dw=f.styled(f.Box)`
|
|
2363
2363
|
padding: 16px;
|
|
2364
|
-
`,
|
|
2364
|
+
`,kw=f.styled(f.Typography)`
|
|
2365
2365
|
font-weight: 600;
|
|
2366
2366
|
font-size: 14px;
|
|
2367
2367
|
line-height: 130%;
|
|
2368
2368
|
color: ${f.theme.palette.gray.gray1};
|
|
2369
|
-
`,
|
|
2369
|
+
`,Nw=f.styled(f.Typography)`
|
|
2370
2370
|
font-weight: 400;
|
|
2371
2371
|
font-size: 13px;
|
|
2372
2372
|
line-height: 135%;
|
|
2373
2373
|
color: ${f.theme.palette.gray.gray3};
|
|
2374
2374
|
margin-top: 6px;
|
|
2375
|
-
`,
|
|
2375
|
+
`,Rw=f.styled(f.Box)`
|
|
2376
2376
|
display: flex;
|
|
2377
2377
|
justify-content: space-between;
|
|
2378
2378
|
align-items: center;
|
|
2379
2379
|
margin-top: 20px;
|
|
2380
2380
|
width: 100%;
|
|
2381
|
-
`,Rw=e=>A.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M8.9082 1.37598C10.221 0.614497 11.8414 0.614651 13.1543 1.37598L19.9619 5.32422C21.2668 6.08111 22.0702 7.47589 22.0703 8.98438V16.916C22.0703 18.4247 21.2669 19.8192 19.9619 20.5762L13.1543 24.5244C11.8414 25.2858 10.2211 25.2859 8.9082 24.5244L2.10156 20.5762C0.796567 19.8192 -0.00683594 18.4247 -0.00683594 16.916V8.98438C-0.00668786 7.47589 0.796688 6.08111 2.10156 5.32422L8.9082 1.37598ZM11.9531 15.9727C11.9531 17.5841 13.2597 18.8906 14.8711 18.8906V15.3281C14.871 13.7167 13.5645 12.4102 11.9531 12.4102V15.9727ZM7.57617 15.6641C7.57619 17.2755 8.88271 18.582 10.4941 18.582V10.1592C10.4939 8.54793 9.18748 7.24219 7.57617 7.24219V15.6641Z",fill:"#D0D8E3"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.4643 7.74676V11.8643C27.8476 11.0201 28.9238 10.6646 29.6462 10.6646C31.4006 10.6646 32.4325 11.8199 32.4325 13.7898V17.0335C32.4325 17.4482 32.0935 17.8037 31.6512 17.8037C31.2384 17.8037 30.914 17.4482 30.914 17.0335V13.8787C30.914 12.7975 30.2359 12.1606 29.3808 12.1606C28.511 12.1606 27.4643 12.6493 27.4643 14.012V17.0335C27.4643 17.4482 27.1252 17.8037 26.6829 17.8037C26.2701 17.8037 25.9458 17.4482 25.9458 17.0335V7.74676C25.9458 7.33204 26.2849 6.97656 26.7272 6.97656C27.1399 6.97656 27.4643 7.33204 27.4643 7.74676ZM33.6052 8.01336C33.6052 7.46534 34.0769 7.05062 34.6224 7.05062C35.1826 7.05062 35.6249 7.46534 35.6249 8.01336C35.6249 8.56139 35.1826 8.97611 34.6224 8.97611C34.0769 8.97611 33.6052 8.56139 33.6052 8.01336ZM35.389 17.0335C35.389 17.4482 35.0499 17.8037 34.6077 17.8037C34.1949 17.8037 33.8705 17.4482 33.8705 17.0335V11.5089C33.8705 11.0941 34.1949 10.7387 34.6077 10.7387C35.0499 10.7387 35.389 11.0941 35.389 11.5089V17.0335ZM42.7241 11.7014L40.4685 17.1076C40.2915 17.5371 39.9967 17.8037 39.5544 17.8037H39.466C39.0237 17.8037 38.7141 17.5371 38.5372 17.1076L36.2963 11.7014C36.1341 11.3163 36.3848 10.8275 36.7976 10.7535C37.1956 10.6794 37.5642 10.872 37.7116 11.2571L39.5102 15.7894L41.3088 11.2571C41.4562 10.872 41.8248 10.6794 42.2228 10.7535C42.6356 10.8275 42.8862 11.3163 42.7241 11.7014ZM44.6044 13.701H48.5996C48.4522 12.6197 47.6708 11.9976 46.6388 11.9976C45.5774 11.9976 44.7518 12.6345 44.6044 13.701ZM50.0886 14.1157C50.0886 14.5156 49.7643 14.8118 49.3957 14.8118H44.6044C44.7518 15.8782 45.6069 16.5447 46.7125 16.5447C47.4349 16.5447 47.8477 16.293 48.349 15.8782C48.5996 15.6709 49.0124 15.5672 49.322 15.819C49.6021 16.0412 49.6168 16.5003 49.3515 16.7817C48.6586 17.5075 47.6561 17.8778 46.6388 17.8778C44.6781 17.8778 43.1006 16.4411 43.1006 14.249C43.1006 12.0569 44.6781 10.6646 46.6388 10.6646C48.5554 10.6646 50.0296 11.9976 50.0886 14.1157ZM54.4162 12.1013C53.1188 12.1013 52.5733 13.4047 52.5733 15.2413V17.0335C52.5733 17.4482 52.2343 17.8037 51.792 17.8037C51.3792 17.8037 51.0548 17.4482 51.0548 17.0335V11.5089C51.0548 11.0941 51.3792 10.7387 51.792 10.7387C52.2343 10.7387 52.5733 11.0941 52.5733 11.5089V12.3975C52.9272 11.1682 53.6053 10.6646 54.4604 10.6646C54.6815 10.6646 54.9027 10.6794 55.1091 10.7239C55.4924 10.8127 55.743 11.1978 55.6545 11.5977C55.5218 12.2642 54.8584 12.1013 54.4162 12.1013Z",fill:"#D0D8E3"})),Mw=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?ow:sw,{connectorFunctions:s}=_.useContext(zt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(Fw,{children:[u.jsx(Dw,{children:rw}),u.jsx(kw,{children:bt(o,{connectorName:n})}),u.jsxs(Nw,{children:[u.jsx("div",{children:u.jsx(Rw,{})}),e?u.jsx(f.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},Pw=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=_.useState(!0),i=()=>a(!0),c=()=>a(!1);return u.jsx(Jf,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(Mw,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:Lw,arrowStyle:Ow,children:o})},jw=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=_.useContext(zt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=_.useState(()=>localStorage.getItem(xp)==="true"),[d,g]=_.useState(!1),{connectorId:b,connectorName:x,connectorStatus:y}=n??{},p=t||y!==Ta.DISABLED,h=y===Ta.UNAUTHENTICATED,m=r===xe.PENDING,v=()=>{localStorage.setItem(xp,"true"),l(!0),g(!0),i==null||i(Dt.email_logging_intro_popup_continue_clicked,{app_name:x})};return c?h?u.jsx(Pw,{connectorId:b,connectorName:x,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(f.Tooltip,{title:iw,children:e}):m?u.jsx(f.Tooltip,{title:aw.replace(":connectorName",x),children:e}):s?u.jsx(ew,{defaultOpen:d,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(Aw,{onContinue:p?v:void 0,connectorName:x,children:e})},Bw=e=>A.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.6168 54.7446C28.6931 52.5589 31.0146 51.1102 33.0842 51.8174C35.9985 52.8133 40.0375 53.9024 44.0621 54.043C48.0034 54.1806 51.968 53.4097 54.8762 52.6339C57.0264 52.0602 59.2927 53.6932 59.215 55.9172C59.1742 57.0856 58.4742 58.1269 57.3723 58.5178C54.8051 59.4284 49.7633 60.8927 44.3075 60.7022C38.7694 60.5088 33.1999 58.6241 30.4004 57.5311C29.2637 57.0873 28.5742 55.9641 28.6168 54.7446Z",fill:"url(#paint0_linear_8481_102191)"}),A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"url(#paint1_linear_8481_102191)"}),A.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"white"})),A.createElement("g",{mask:"url(#mask0_8481_102191)"},A.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),A.createElement("rect",{x:47.4368,y:59.3203,width:53.657,height:13.2235,transform:"rotate(-12 47.4368 59.3203)",fill:"url(#paint2_linear_8481_102191)"}),A.createElement("rect",{x:51.1907,y:76.9824,width:53.657,height:10.4263,transform:"rotate(-12 51.1907 76.9824)",fill:"url(#paint3_linear_8481_102191)"})),A.createElement("path",{opacity:.883952,d:"M113.939 51.0679C114.775 55 112.265 58.865 108.333 59.7008L107.842 59.8052C103.639 60.6986 99.5073 58.0155 98.6139 53.8123L97.205 47.1837L105.307 45.4616C109.239 44.6259 113.104 47.1359 113.939 51.0679Z",fill:"url(#paint4_linear_8481_102191)"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M68.7215 66.4138C67.1801 64.8725 67.6745 62.2062 69.587 61.1603C72.4457 59.5969 76.2861 57.1773 79.3785 54.0849C82.4099 51.0535 84.752 47.3461 86.2775 44.5465C87.3388 42.5989 90.0598 42.0819 91.6282 43.6503C92.4782 44.5003 92.758 45.7623 92.2604 46.8566C91.0829 49.4466 88.5191 54.344 84.4346 58.4285C80.2853 62.5778 74.8639 65.591 72.0553 66.9952C70.9363 67.5548 69.6062 67.2985 68.7215 66.4138Z",fill:"url(#paint5_linear_8481_102191)"}),A.createElement("rect",{x:48.7264,y:33.7744,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 48.7264 33.7744)",fill:"url(#paint6_linear_8481_102191)"}),A.createElement("rect",{x:50.0175,y:35.8193,width:4.0158,height:3.84848,rx:1.92424,transform:"rotate(-12 50.0175 35.8193)",fill:"#435C71"}),A.createElement("rect",{x:59.2875,y:31.5723,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 59.2875 31.5723)",fill:"#FFFEFE"}),A.createElement("path",{opacity:.883952,d:"M111.25 38.5376C110.415 34.6055 106.55 32.0955 102.618 32.9313L102.127 33.0356C97.9234 33.9291 95.2403 38.0607 96.1337 42.2639L97.5426 48.8925L105.644 47.1705C109.576 46.3347 112.086 42.4696 111.25 38.5376Z",fill:"url(#paint7_linear_8481_102191)"}),A.createElement("rect",{x:60.0181,y:33.8037,width:3.84848,height:3.84848,rx:1.90724,transform:"rotate(-12 60.0181 33.8037)",fill:"#435C71"}),A.createElement("path",{d:"M36.9246 59.1604C36.4487 60.717 34.7371 61.6271 33.1805 61.1512C32.3613 60.9007 31.7241 60.3475 31.3259 59.5987L25.2059 46.7983C24.9784 46.3703 25.1286 45.8788 25.5566 45.6513L28.338 44.1724C28.7659 43.9449 29.2574 44.0951 29.4849 44.5231L36.6496 56.8367C37.0728 57.5036 37.15 58.423 36.9246 59.1604Z",fill:"#FFDF9F"}),A.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),A.createElement("path",{d:"M26.6628 44.3769L26.9472 44.9118L28.0169 44.343L26.3106 41.1338L24.171 42.2714L25.0243 43.876C25.6661 43.5347 26.3215 43.7351 26.6628 44.3769Z",fill:"#FFB19F"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.26386 27.248C9.3428 20.4481 16.5101 16.6372 23.31 18.7161C30.11 20.7951 33.9209 27.9624 31.8419 34.7623C29.763 41.5622 22.5956 45.3731 15.7958 43.2942C8.99587 41.2152 5.18493 34.0479 7.26386 27.248ZM9.72157 27.9983C8.06843 33.4055 11.1399 39.1821 16.5471 40.8352C21.9543 42.4884 27.7309 39.4168 29.384 34.0096C31.0372 28.6024 27.9657 22.8258 22.5585 21.1727C17.1513 19.5196 11.3747 22.5911 9.72157 27.9983Z",fill:"#FFE69F"}),A.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),A.createElement("path",{d:"M14.3685 30.6746C15.7299 27.6867 18.9391 25.9803 22.1776 26.5225L22.2595 26.5475C23.7024 26.8095 24.3854 24.8682 23.1497 24.2218C22.3806 23.8074 21.5613 23.557 20.717 23.3884C17.3715 22.9031 14.0553 24.6664 12.6939 27.6543C12.2796 28.4235 12.0859 29.3497 12.0244 30.1372C11.8444 31.6051 13.8607 32.0424 14.4503 30.6997C14.3434 30.7566 14.3685 30.6746 14.3685 30.6746Z",fill:"#F6FBFF"}),A.createElement("path",{d:"M10.2904 29.0679C11.9436 23.6607 17.7202 20.5893 23.1274 22.2424C25.6671 23.0189 27.5785 24.6783 28.9301 26.704C27.7539 24.1048 25.508 22.0744 22.5586 21.1727C17.1514 19.5196 11.3748 22.591 9.72165 27.9982C8.81993 30.9476 9.32924 33.97 10.7444 36.3735C9.82081 34.1203 9.51395 31.6077 10.2904 29.0679Z",fill:"#ADCBE7"}),A.createElement("path",{opacity:.406087,d:"M36.4864 56.8021L36.1373 56.2691C36.3845 56.8563 36.428 57.5516 36.2372 58.1754C35.9273 59.189 34.5593 59.1971 34.0713 58.2806L28.3787 47.5877C28.0534 46.9767 27.3508 46.7619 26.7395 47.0866L25.7206 47.6277L31.4395 59.3516C31.7648 59.9627 32.27 60.5434 32.8706 60.8123C33.7054 61.1528 34.6593 61.1034 35.3726 60.7247C36.0858 60.3459 36.6602 59.5837 36.8444 58.7021C37.0351 58.0783 36.8117 57.4132 36.4864 56.8021Z",fill:"white"}),A.createElement("path",{d:"M29.8826 48.4977C29.8006 48.4726 29.6368 48.4225 29.5799 48.3155L28.1579 45.6411C28.0442 45.4272 28.1193 45.1814 28.3332 45.0677C28.5472 44.9539 28.7929 45.0291 28.9067 45.243L30.3287 47.9174C30.4424 48.1313 30.3673 48.3771 30.1534 48.4908C30.1284 48.5728 29.9645 48.5227 29.8826 48.4977Z",fill:"#FFF5EB"}),A.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),A.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),A.createElement("path",{d:"M89.1282 19.2055L68.2257 26.8725L45.9197 28.3898L44.4929 16.4082C44.3371 13.798 47.5283 11.4502 50.9859 11.6309L65.1429 12.369L67.3969 12.4869C68.5309 12.5463 69.7066 12.3289 70.7522 11.8627L78.6899 8.34726C81.725 6.99992 85.3012 7.87475 86.2125 10.1876L89.1282 19.2055Z",fill:"url(#paint8_linear_8481_102191)"}),A.createElement("path",{opacity:.479771,d:"M88.6262 19.0953L68.3101 26.5288L65.3314 12.5149L67.5211 12.6263C68.6228 12.6824 69.7652 12.471 70.7816 12.0192L78.4972 8.61266C81.4474 7.30707 84.9208 8.14856 85.8036 10.3829L88.6262 19.0953Z",fill:"#ADCBE7"}),A.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),A.createElement("path",{d:"M102.961 24.2033C103.125 24.9722 102.371 25.7829 101.278 26.015L37.9675 39.4722C36.8754 39.7043 35.8568 39.2704 35.6933 38.5015C35.5301 37.7336 36.284 36.922 37.3761 36.6898L100.687 23.2327C101.779 23.0005 102.798 23.4354 102.961 24.2033Z",fill:"#9ED1FF"}),A.createElement("path",{d:"M102.703 24.1718C102.838 24.805 102.067 25.5045 100.983 25.7349L69.5583 32.4144L69.0712 30.123L100.496 23.4436C101.58 23.2131 102.569 23.5394 102.703 24.1718Z",fill:"#78AFE1"}),A.createElement("defs",null,A.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFABC"}),A.createElement("stop",{offset:1,stopColor:"#FFA650"})),A.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"white"}),A.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),A.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#ECF7FF"}),A.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),rl=({message:e})=>u.jsxs(f.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[u.jsx(Bw,{width:124,height:107}),u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray3,children:e})]}),On="/v1/api",Vw=`${On}/connector/conversation/:conversationId/email_log_status`,Gw=`${On}/connector/conversation/:conversationId/entity_recommendations`,Hw=`${On}/connector/conversation/:conversationId/retry_emails_log`,Ww=`${On}/connector/conversation/:conversationId/validate_entity`,Zw=`${On}/connectors/forms/:formId/search`,Xw=`${On}/connector/conversation/:conversationId/log_emails`,zw=`${On}/connector/feedback/conversation/:conversationId`,Yw=`${On}/connector/conversation/:conversationId/log_emails`,Jw=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 Ne({url:bt(Ww,{conversationId:n}),data:e,method:Ve.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}},qw=({onSuccess:e,onError:t})=>mn({mutationFn:Jw,onSuccess:e,onError:t}),ol=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},A.createElement("path",{d:"M6.99967 13.6654C6.08856 13.6654 5.22745 13.4903 4.41634 13.14C3.60523 12.7898 2.89701 12.312 2.29167 11.7067C1.68634 11.1014 1.20856 10.3931 0.858341 9.58203C0.508119 8.77092 0.333008 7.90981 0.333008 6.9987C0.333008 6.07648 0.508119 5.2127 0.858341 4.40736C1.20856 3.60203 1.68634 2.89648 2.29167 2.2907C2.89701 1.68492 3.60523 1.20714 4.41634 0.857365C5.22745 0.507587 6.08856 0.332476 6.99967 0.332031C7.18856 0.332031 7.34701 0.396031 7.47501 0.524031C7.60301 0.652031 7.66679 0.810253 7.66634 0.998698C7.6659 1.18714 7.6019 1.34559 7.47434 1.47403C7.34679 1.60248 7.18856 1.66625 6.99967 1.66536C5.5219 1.66536 4.26345 2.18492 3.22434 3.22403C2.18523 4.26314 1.6659 5.52136 1.66634 6.9987C1.66679 8.47603 2.18634 9.73448 3.22501 10.774C4.26367 11.8136 5.5219 12.3329 6.99967 12.332C8.47745 12.3311 9.7359 11.8118 10.775 10.774C11.8141 9.73625 12.3335 8.47781 12.333 6.9987C12.333 6.80981 12.397 6.65159 12.525 6.52403C12.653 6.39648 12.8112 6.33248 12.9997 6.33203C13.1881 6.33159 13.3466 6.39559 13.475 6.52403C13.6035 6.65248 13.6672 6.8107 13.6663 6.9987C13.6663 7.90981 13.4912 8.77092 13.141 9.58203C12.7908 10.3931 12.313 11.1016 11.7077 11.7074C11.1023 12.3131 10.3968 12.7909 9.59101 13.1407C8.78523 13.4905 7.92145 13.6654 6.99967 13.6654Z"})),$w=f.styled(f.Stack)`
|
|
2381
|
+
`,Mw=e=>A.createElement("svg",{width:58,height:26,viewBox:"0 0 58 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{d:"M8.9082 1.37598C10.221 0.614497 11.8414 0.614651 13.1543 1.37598L19.9619 5.32422C21.2668 6.08111 22.0702 7.47589 22.0703 8.98438V16.916C22.0703 18.4247 21.2669 19.8192 19.9619 20.5762L13.1543 24.5244C11.8414 25.2858 10.2211 25.2859 8.9082 24.5244L2.10156 20.5762C0.796567 19.8192 -0.00683594 18.4247 -0.00683594 16.916V8.98438C-0.00668786 7.47589 0.796688 6.08111 2.10156 5.32422L8.9082 1.37598ZM11.9531 15.9727C11.9531 17.5841 13.2597 18.8906 14.8711 18.8906V15.3281C14.871 13.7167 13.5645 12.4102 11.9531 12.4102V15.9727ZM7.57617 15.6641C7.57619 17.2755 8.88271 18.582 10.4941 18.582V10.1592C10.4939 8.54793 9.18748 7.24219 7.57617 7.24219V15.6641Z",fill:"#D0D8E3"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.4643 7.74676V11.8643C27.8476 11.0201 28.9238 10.6646 29.6462 10.6646C31.4006 10.6646 32.4325 11.8199 32.4325 13.7898V17.0335C32.4325 17.4482 32.0935 17.8037 31.6512 17.8037C31.2384 17.8037 30.914 17.4482 30.914 17.0335V13.8787C30.914 12.7975 30.2359 12.1606 29.3808 12.1606C28.511 12.1606 27.4643 12.6493 27.4643 14.012V17.0335C27.4643 17.4482 27.1252 17.8037 26.6829 17.8037C26.2701 17.8037 25.9458 17.4482 25.9458 17.0335V7.74676C25.9458 7.33204 26.2849 6.97656 26.7272 6.97656C27.1399 6.97656 27.4643 7.33204 27.4643 7.74676ZM33.6052 8.01336C33.6052 7.46534 34.0769 7.05062 34.6224 7.05062C35.1826 7.05062 35.6249 7.46534 35.6249 8.01336C35.6249 8.56139 35.1826 8.97611 34.6224 8.97611C34.0769 8.97611 33.6052 8.56139 33.6052 8.01336ZM35.389 17.0335C35.389 17.4482 35.0499 17.8037 34.6077 17.8037C34.1949 17.8037 33.8705 17.4482 33.8705 17.0335V11.5089C33.8705 11.0941 34.1949 10.7387 34.6077 10.7387C35.0499 10.7387 35.389 11.0941 35.389 11.5089V17.0335ZM42.7241 11.7014L40.4685 17.1076C40.2915 17.5371 39.9967 17.8037 39.5544 17.8037H39.466C39.0237 17.8037 38.7141 17.5371 38.5372 17.1076L36.2963 11.7014C36.1341 11.3163 36.3848 10.8275 36.7976 10.7535C37.1956 10.6794 37.5642 10.872 37.7116 11.2571L39.5102 15.7894L41.3088 11.2571C41.4562 10.872 41.8248 10.6794 42.2228 10.7535C42.6356 10.8275 42.8862 11.3163 42.7241 11.7014ZM44.6044 13.701H48.5996C48.4522 12.6197 47.6708 11.9976 46.6388 11.9976C45.5774 11.9976 44.7518 12.6345 44.6044 13.701ZM50.0886 14.1157C50.0886 14.5156 49.7643 14.8118 49.3957 14.8118H44.6044C44.7518 15.8782 45.6069 16.5447 46.7125 16.5447C47.4349 16.5447 47.8477 16.293 48.349 15.8782C48.5996 15.6709 49.0124 15.5672 49.322 15.819C49.6021 16.0412 49.6168 16.5003 49.3515 16.7817C48.6586 17.5075 47.6561 17.8778 46.6388 17.8778C44.6781 17.8778 43.1006 16.4411 43.1006 14.249C43.1006 12.0569 44.6781 10.6646 46.6388 10.6646C48.5554 10.6646 50.0296 11.9976 50.0886 14.1157ZM54.4162 12.1013C53.1188 12.1013 52.5733 13.4047 52.5733 15.2413V17.0335C52.5733 17.4482 52.2343 17.8037 51.792 17.8037C51.3792 17.8037 51.0548 17.4482 51.0548 17.0335V11.5089C51.0548 11.0941 51.3792 10.7387 51.792 10.7387C52.2343 10.7387 52.5733 11.0941 52.5733 11.5089V12.3975C52.9272 11.1682 53.6053 10.6646 54.4604 10.6646C54.6815 10.6646 54.9027 10.6794 55.1091 10.7239C55.4924 10.8127 55.743 11.1978 55.6545 11.5977C55.5218 12.2642 54.8584 12.1013 54.4162 12.1013Z",fill:"#D0D8E3"})),Pw=({isAdmin:e,connectorId:t,connectorName:n,close:r})=>{const o=e?sw:aw,{connectorFunctions:s}=_.useContext(zt),a=s==null?void 0:s.redirectToAdmin,i=()=>{r(),a==null||a(t)};return u.jsxs(Dw,{children:[u.jsx(kw,{children:ow}),u.jsx(Nw,{children:bt(o,{connectorName:n})}),u.jsxs(Rw,{children:[u.jsx("div",{children:u.jsx(Mw,{})}),e?u.jsx(f.Button,{variant:"contained",size:"small",color:"primary",onClick:i,children:"Authenticate"}):null]})]})},jw=({isAdmin:e,isAuthenticated:t,connectorId:n,connectorName:r,children:o})=>{const[s,a]=_.useState(!0),i=()=>a(!0),c=()=>a(!1);return u.jsx(Jf,{onTouchMove:i,onMouseMove:i,onPointerMove:i,title:s&&!t?u.jsx(Pw,{isAdmin:e,connectorId:n,connectorName:r,close:c}):"",enterDelay:500,placement:"top",arrow:!0,tooltipStyle:Ow,arrowStyle:Fw,children:o})},Bw=({children:e,isAdmin:t,logSettings:n,status:r,retry:o,renderEntities:s})=>{const{connectorFunctions:a}=_.useContext(zt),i=a==null?void 0:a.sendTrackingEvent,[c,l]=_.useState(()=>localStorage.getItem(xp)==="true"),[d,g]=_.useState(!1),{connectorId:b,connectorName:x,connectorStatus:y}=n??{},p=t||y!==Ta.DISABLED,h=y===Ta.UNAUTHENTICATED,m=r===xe.PENDING,v=()=>{localStorage.setItem(xp,"true"),l(!0),g(!0),i==null||i(Dt.email_logging_intro_popup_continue_clicked,{app_name:x})};return c?h?u.jsx(jw,{connectorId:b,connectorName:x,isAdmin:t,isAuthenticated:!1,children:e}):o?u.jsx(f.Tooltip,{title:cw,children:e}):m?u.jsx(f.Tooltip,{title:iw.replace(":connectorName",x),children:e}):s?u.jsx(tw,{defaultOpen:d,renderTooltip:s,children:e}):u.jsx(u.Fragment,{children:e}):u.jsx(Lw,{onContinue:p?v:void 0,connectorName:x,children:e})},Vw=e=>A.createElement("svg",{width:124,height:107,viewBox:"0 0 124 107",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M28.6168 54.7446C28.6931 52.5589 31.0146 51.1102 33.0842 51.8174C35.9985 52.8133 40.0375 53.9024 44.0621 54.043C48.0034 54.1806 51.968 53.4097 54.8762 52.6339C57.0264 52.0602 59.2927 53.6932 59.215 55.9172C59.1742 57.0856 58.4742 58.1269 57.3723 58.5178C54.8051 59.4284 49.7633 60.8927 44.3075 60.7022C38.7694 60.5088 33.1999 58.6241 30.4004 57.5311C29.2637 57.0873 28.5742 55.9641 28.6168 54.7446Z",fill:"url(#paint0_linear_8481_102191)"}),A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"url(#paint1_linear_8481_102191)"}),A.createElement("mask",{id:"mask0_8481_102191",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:46,y:14,width:60,height:79},A.createElement("path",{d:"M47.223 43.6373C44.4928 30.7926 52.6922 18.1666 65.5368 15.4364C78.3815 12.7062 91.0075 20.9055 93.7377 33.7502L105.079 87.1053L84.1844 91.5466C70.0346 94.5542 56.1258 85.5217 53.1182 71.3719L47.223 43.6373Z",fill:"white"})),A.createElement("g",{mask:"url(#mask0_8481_102191)"},A.createElement("ellipse",{cx:63.7775,cy:46.8684,rx:1.48152,ry:1.39438,transform:"rotate(-12 63.7775 46.8684)",fill:"#435C71"}),A.createElement("rect",{x:47.4368,y:59.3203,width:53.657,height:13.2235,transform:"rotate(-12 47.4368 59.3203)",fill:"url(#paint2_linear_8481_102191)"}),A.createElement("rect",{x:51.1907,y:76.9824,width:53.657,height:10.4263,transform:"rotate(-12 51.1907 76.9824)",fill:"url(#paint3_linear_8481_102191)"})),A.createElement("path",{opacity:.883952,d:"M113.939 51.0679C114.775 55 112.265 58.865 108.333 59.7008L107.842 59.8052C103.639 60.6986 99.5073 58.0155 98.6139 53.8123L97.205 47.1837L105.307 45.4616C109.239 44.6259 113.104 47.1359 113.939 51.0679Z",fill:"url(#paint4_linear_8481_102191)"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M68.7215 66.4138C67.1801 64.8725 67.6745 62.2062 69.587 61.1603C72.4457 59.5969 76.2861 57.1773 79.3785 54.0849C82.4099 51.0535 84.752 47.3461 86.2775 44.5465C87.3388 42.5989 90.0598 42.0819 91.6282 43.6503C92.4782 44.5003 92.758 45.7623 92.2604 46.8566C91.0829 49.4466 88.5191 54.344 84.4346 58.4285C80.2853 62.5778 74.8639 65.591 72.0553 66.9952C70.9363 67.5548 69.6062 67.2985 68.7215 66.4138Z",fill:"url(#paint5_linear_8481_102191)"}),A.createElement("rect",{x:48.7264,y:33.7744,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 48.7264 33.7744)",fill:"url(#paint6_linear_8481_102191)"}),A.createElement("rect",{x:50.0175,y:35.8193,width:4.0158,height:3.84848,rx:1.92424,transform:"rotate(-12 50.0175 35.8193)",fill:"#435C71"}),A.createElement("rect",{x:59.2875,y:31.5723,width:11.2108,height:11.2108,rx:5.59457,transform:"rotate(-12 59.2875 31.5723)",fill:"#FFFEFE"}),A.createElement("path",{opacity:.883952,d:"M111.25 38.5376C110.415 34.6055 106.55 32.0955 102.618 32.9313L102.127 33.0356C97.9234 33.9291 95.2403 38.0607 96.1337 42.2639L97.5426 48.8925L105.644 47.1705C109.576 46.3347 112.086 42.4696 111.25 38.5376Z",fill:"url(#paint7_linear_8481_102191)"}),A.createElement("rect",{x:60.0181,y:33.8037,width:3.84848,height:3.84848,rx:1.90724,transform:"rotate(-12 60.0181 33.8037)",fill:"#435C71"}),A.createElement("path",{d:"M36.9246 59.1604C36.4487 60.717 34.7371 61.6271 33.1805 61.1512C32.3613 60.9007 31.7241 60.3475 31.3259 59.5987L25.2059 46.7983C24.9784 46.3703 25.1286 45.8788 25.5566 45.6513L28.338 44.1724C28.7659 43.9449 29.2574 44.0951 29.4849 44.5231L36.6496 56.8367C37.0728 57.5036 37.15 58.423 36.9246 59.1604Z",fill:"#FFDF9F"}),A.createElement("rect",{x:27.9973,y:44.333,width:2.39869,height:3.59807,transform:"rotate(152 27.9973 44.333)",fill:"#FF9090"}),A.createElement("path",{d:"M26.6628 44.3769L26.9472 44.9118L28.0169 44.343L26.3106 41.1338L24.171 42.2714L25.0243 43.876C25.6661 43.5347 26.3215 43.7351 26.6628 44.3769Z",fill:"#FFB19F"}),A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.26386 27.248C9.3428 20.4481 16.5101 16.6372 23.31 18.7161C30.11 20.7951 33.9209 27.9624 31.8419 34.7623C29.763 41.5622 22.5956 45.3731 15.7958 43.2942C8.99587 41.2152 5.18493 34.0479 7.26386 27.248ZM9.72157 27.9983C8.06843 33.4055 11.1399 39.1821 16.5471 40.8352C21.9543 42.4884 27.7309 39.4168 29.384 34.0096C31.0372 28.6024 27.9657 22.8258 22.5585 21.1727C17.1513 19.5196 11.3747 22.5911 9.72157 27.9983Z",fill:"#FFE69F"}),A.createElement("circle",{opacity:.414016,cx:19.5529,cy:31.0039,r:10.2804,transform:"rotate(17 19.5529 31.0039)",fill:"#BBDEFC"}),A.createElement("path",{d:"M14.3685 30.6746C15.7299 27.6867 18.9391 25.9803 22.1776 26.5225L22.2595 26.5475C23.7024 26.8095 24.3854 24.8682 23.1497 24.2218C22.3806 23.8074 21.5613 23.557 20.717 23.3884C17.3715 22.9031 14.0553 24.6664 12.6939 27.6543C12.2796 28.4235 12.0859 29.3497 12.0244 30.1372C11.8444 31.6051 13.8607 32.0424 14.4503 30.6997C14.3434 30.7566 14.3685 30.6746 14.3685 30.6746Z",fill:"#F6FBFF"}),A.createElement("path",{d:"M10.2904 29.0679C11.9436 23.6607 17.7202 20.5893 23.1274 22.2424C25.6671 23.0189 27.5785 24.6783 28.9301 26.704C27.7539 24.1048 25.508 22.0744 22.5586 21.1727C17.1514 19.5196 11.3748 22.591 9.72165 27.9982C8.81993 30.9476 9.32924 33.97 10.7444 36.3735C9.82081 34.1203 9.51395 31.6077 10.2904 29.0679Z",fill:"#ADCBE7"}),A.createElement("path",{opacity:.406087,d:"M36.4864 56.8021L36.1373 56.2691C36.3845 56.8563 36.428 57.5516 36.2372 58.1754C35.9273 59.189 34.5593 59.1971 34.0713 58.2806L28.3787 47.5877C28.0534 46.9767 27.3508 46.7619 26.7395 47.0866L25.7206 47.6277L31.4395 59.3516C31.7648 59.9627 32.27 60.5434 32.8706 60.8123C33.7054 61.1528 34.6593 61.1034 35.3726 60.7247C36.0858 60.3459 36.6602 59.5837 36.8444 58.7021C37.0351 58.0783 36.8117 57.4132 36.4864 56.8021Z",fill:"white"}),A.createElement("path",{d:"M29.8826 48.4977C29.8006 48.4726 29.6368 48.4225 29.5799 48.3155L28.1579 45.6411C28.0442 45.4272 28.1193 45.1814 28.3332 45.0677C28.5472 44.9539 28.7929 45.0291 28.9067 45.243L30.3287 47.9174C30.4424 48.1313 30.3673 48.3771 30.1534 48.4908C30.1284 48.5728 29.9645 48.5227 29.8826 48.4977Z",fill:"#FFF5EB"}),A.createElement("ellipse",{cx:29.2637,cy:54.631,rx:1.50593,ry:3.17918,transform:"rotate(-23 29.2637 54.631)",fill:"#FFC478"}),A.createElement("ellipse",{cx:34.0592,cy:52.4078,rx:.920288,ry:1.67325,transform:"rotate(106 34.0592 52.4078)",fill:"#FFC478"}),A.createElement("path",{d:"M89.1282 19.2055L68.2257 26.8725L45.9197 28.3898L44.4929 16.4082C44.3371 13.798 47.5283 11.4502 50.9859 11.6309L65.1429 12.369L67.3969 12.4869C68.5309 12.5463 69.7066 12.3289 70.7522 11.8627L78.6899 8.34726C81.725 6.99992 85.3012 7.87475 86.2125 10.1876L89.1282 19.2055Z",fill:"url(#paint8_linear_8481_102191)"}),A.createElement("path",{opacity:.479771,d:"M88.6262 19.0953L68.3101 26.5288L65.3314 12.5149L67.5211 12.6263C68.6228 12.6824 69.7652 12.471 70.7816 12.0192L78.4972 8.61266C81.4474 7.30707 84.9208 8.14856 85.8036 10.3829L88.6262 19.0953Z",fill:"#ADCBE7"}),A.createElement("path",{d:"M91.6332 26.6212L46.9517 36.1186L46.0387 28.4438L89.2535 19.2582L91.6332 26.6212Z",fill:"#717DAD"}),A.createElement("path",{d:"M102.961 24.2033C103.125 24.9722 102.371 25.7829 101.278 26.015L37.9675 39.4722C36.8754 39.7043 35.8568 39.2704 35.6933 38.5015C35.5301 37.7336 36.284 36.922 37.3761 36.6898L100.687 23.2327C101.779 23.0005 102.798 23.4354 102.961 24.2033Z",fill:"#9ED1FF"}),A.createElement("path",{d:"M102.703 24.1718C102.838 24.805 102.067 25.5045 100.983 25.7349L69.5583 32.4144L69.0712 30.123L100.496 23.4436C101.58 23.2131 102.569 23.5394 102.703 24.1718Z",fill:"#78AFE1"}),A.createElement("defs",null,A.createElement("linearGradient",{id:"paint0_linear_8481_102191",x1:32.2665,y1:59.6553,x2:59.0518,y2:60.5906,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint1_linear_8481_102191",x1:67.3434,y1:85.966,x2:103.216,y2:78.3411,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFABC"}),A.createElement("stop",{offset:1,stopColor:"#FFA650"})),A.createElement("linearGradient",{id:"paint2_linear_8481_102191",x1:51.4347,y1:74.8197,x2:91.1539,y2:74.8197,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint3_linear_8481_102191",x1:55.1887,y1:89.2031,x2:94.9078,y2:89.2031,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#A3C1FF"}),A.createElement("stop",{offset:1,stopColor:"#4243FF"})),A.createElement("linearGradient",{id:"paint4_linear_8481_102191",x1:94.5023,y1:53.1799,x2:106.762,y2:58.7056,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint5_linear_8481_102191",x1:74.9906,y1:66.9871,x2:94.9778,y2:46.9999,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FFFDE0"}),A.createElement("stop",{offset:1,stopColor:"#FFB362"})),A.createElement("linearGradient",{id:"paint6_linear_8481_102191",x1:50.5805,y1:44.0581,x2:59.9372,y2:44.0581,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"white"}),A.createElement("stop",{offset:1,stopColor:"#E3EEF3"})),A.createElement("linearGradient",{id:"paint7_linear_8481_102191",x1:88.4187,y1:43.3906,x2:99.3981,y2:25.1833,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#FF9498"}),A.createElement("stop",{offset:1,stopColor:"#FFD671"})),A.createElement("linearGradient",{id:"paint8_linear_8481_102191",x1:56.4985,y1:29.5482,x2:100.532,y2:20.1885,gradientUnits:"userSpaceOnUse"},A.createElement("stop",{stopColor:"#ECF7FF"}),A.createElement("stop",{offset:1,stopColor:"#C2E0FF"})))),rl=({message:e})=>u.jsxs(f.Stack,{justifyContent:"center",alignItems:"center",height:"100%",children:[u.jsx(Vw,{width:124,height:107}),u.jsx(f.Typography,{variant:"body2",color:f.theme.palette.gray.gray3,children:e})]}),On="/v1/api",Gw=`${On}/connector/conversation/:conversationId/email_log_status`,Hw=`${On}/connector/conversation/:conversationId/entity_recommendations`,Ww=`${On}/connector/conversation/:conversationId/retry_emails_log`,Zw=`${On}/connector/conversation/:conversationId/validate_entity`,Xw=`${On}/connectors/forms/:formId/search`,zw=`${On}/connector/conversation/:conversationId/log_emails`,Yw=`${On}/connector/feedback/conversation/:conversationId`,Jw=`${On}/connector/conversation/:conversationId/log_emails`,qw=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 ke({url:bt(Zw,{conversationId:n}),data:e,method:Be.POST}),o=r==null?void 0:r.data;if(!o.valid)throw new Error("Entity validation failed");return{...o,...t}}catch(r){throw console.error(r),r}},$w=({onSuccess:e,onError:t})=>mn({mutationFn:qw,onSuccess:e,onError:t}),ol=e=>A.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:14,viewBox:"0 0 14 14",fill:"#6F7C90",...e},A.createElement("path",{d:"M6.99967 13.6654C6.08856 13.6654 5.22745 13.4903 4.41634 13.14C3.60523 12.7898 2.89701 12.312 2.29167 11.7067C1.68634 11.1014 1.20856 10.3931 0.858341 9.58203C0.508119 8.77092 0.333008 7.90981 0.333008 6.9987C0.333008 6.07648 0.508119 5.2127 0.858341 4.40736C1.20856 3.60203 1.68634 2.89648 2.29167 2.2907C2.89701 1.68492 3.60523 1.20714 4.41634 0.857365C5.22745 0.507587 6.08856 0.332476 6.99967 0.332031C7.18856 0.332031 7.34701 0.396031 7.47501 0.524031C7.60301 0.652031 7.66679 0.810253 7.66634 0.998698C7.6659 1.18714 7.6019 1.34559 7.47434 1.47403C7.34679 1.60248 7.18856 1.66625 6.99967 1.66536C5.5219 1.66536 4.26345 2.18492 3.22434 3.22403C2.18523 4.26314 1.6659 5.52136 1.66634 6.9987C1.66679 8.47603 2.18634 9.73448 3.22501 10.774C4.26367 11.8136 5.5219 12.3329 6.99967 12.332C8.47745 12.3311 9.7359 11.8118 10.775 10.774C11.8141 9.73625 12.3335 8.47781 12.333 6.9987C12.333 6.80981 12.397 6.65159 12.525 6.52403C12.653 6.39648 12.8112 6.33248 12.9997 6.33203C13.1881 6.33159 13.3466 6.39559 13.475 6.52403C13.6035 6.65248 13.6672 6.8107 13.6663 6.9987C13.6663 7.90981 13.4912 8.77092 13.141 9.58203C12.7908 10.3931 12.313 11.1016 11.7077 11.7074C11.1023 12.3131 10.3968 12.7909 9.59101 13.1407C8.78523 13.4905 7.92145 13.6654 6.99967 13.6654Z"})),Qw=f.styled(f.Stack)`
|
|
2382
2382
|
display: flex;
|
|
2383
2383
|
flex-flow: row nowrap;
|
|
2384
2384
|
justify-content: flex-start;
|
|
@@ -2394,7 +2394,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2394
2394
|
cursor: not-allowed;
|
|
2395
2395
|
}
|
|
2396
2396
|
`:null}
|
|
2397
|
-
`,
|
|
2397
|
+
`,Uw=f.styled(f.Checkbox)`
|
|
2398
2398
|
padding: 0;
|
|
2399
2399
|
margin: 0;
|
|
2400
2400
|
svg {
|
|
@@ -2410,12 +2410,12 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2410
2410
|
input:checked:disabled ~ svg {
|
|
2411
2411
|
fill: #d6dde8;
|
|
2412
2412
|
}
|
|
2413
|
-
`,
|
|
2413
|
+
`,Kw=f.styled(ol)`
|
|
2414
2414
|
width: 16px;
|
|
2415
2415
|
height: 16px;
|
|
2416
2416
|
fill: #506dff;
|
|
2417
2417
|
animation: ${Aa} 1s linear infinite;
|
|
2418
|
-
`,
|
|
2418
|
+
`,e_=f.styled(f.Typography)`
|
|
2419
2419
|
font-size: 13px;
|
|
2420
2420
|
overflow: hidden;
|
|
2421
2421
|
text-overflow: ellipsis;
|
|
@@ -2423,7 +2423,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2423
2423
|
`,_p=f.styled(f.Stack)`
|
|
2424
2424
|
margin-left: auto;
|
|
2425
2425
|
flex-shrink: 0;
|
|
2426
|
-
`,
|
|
2426
|
+
`,t_=({connectorName:e,entity:t,checked:n,disabled:r,setCheckedEntities:o})=>{const{conversationId:s,connectorFunctions:a}=_.useContext(zt),i=a==null?void 0:a.sendTrackingEvent,{displayValue:c,entityType:l,cardId:d}=t,g=m=>{o==null||o(v=>({...v,[l+c]:m})),i==null||i(Dt.email_logging_smart_suggestion_selected,{app_name:e,object_key_selected:c})},b=()=>{i==null||i(Dt.email_logging_smart_suggestion_not_found,{app_name:e,object_key_selected:c})},{mutate:x,isPending:y,isError:p}=$w({onSuccess:g,onError:b}),h=()=>{!o||y||r||p||(n?o(m=>{const v={...m};return delete v[l+c],v}):(i==null||i(Dt.email_logging_smart_suggestion_initiated,{app_name:e,object_key_selected:c}),x({entity:t,payload:{entityType:l,searchString:c,cardId:d},conversationId:s})))};return u.jsx(f.Tooltip,{title:r?uw:"",placement:"top",children:u.jsxs(Qw,{disabled:y||p,onClick:h,children:[u.jsx(Uw,{value:n,checked:n,disabled:r}),u.jsx(f.Tooltip,{title:(c==null?void 0:c.length)>30?c:null,placement:"right",children:u.jsx(e_,{variant:"body2",children:c})}),y?u.jsx(_p,{children:u.jsx(Kw,{})}):null,p?u.jsx(f.Tooltip,{title:"Record not found in "+e,children:u.jsx(_p,{children:u.jsx(Kc,{})})}):null]})})},n_=f.styled(f.Stack)`
|
|
2427
2427
|
color: #343c45;
|
|
2428
2428
|
padding: 18px 0;
|
|
2429
2429
|
box-sizing: border-box;
|
|
@@ -2434,7 +2434,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2434
2434
|
overflow-y: auto;
|
|
2435
2435
|
scrollbar-width: thin;
|
|
2436
2436
|
scrollbar-color: #97a3b7 transparent;
|
|
2437
|
-
`;const
|
|
2437
|
+
`;const r_=f.styled(f.Stack)`
|
|
2438
2438
|
display: grid;
|
|
2439
2439
|
grid-template-rows: max-content 0fr;
|
|
2440
2440
|
transition: grid-template-rows 300ms ease-out;
|
|
@@ -2447,7 +2447,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2447
2447
|
transform: rotate(-90deg);
|
|
2448
2448
|
}
|
|
2449
2449
|
}
|
|
2450
|
-
`,
|
|
2450
|
+
`,o_=f.styled(f.Stack)`
|
|
2451
2451
|
cursor: pointer;
|
|
2452
2452
|
flex-flow: row nowrap;
|
|
2453
2453
|
justify-content: space-between;
|
|
@@ -2460,19 +2460,19 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2460
2460
|
transform-origin: center;
|
|
2461
2461
|
transition: transform 300ms ease-out;
|
|
2462
2462
|
}
|
|
2463
|
-
`,
|
|
2463
|
+
`,s_=f.styled(f.Typography)`
|
|
2464
2464
|
font-size: 13px;
|
|
2465
2465
|
line-height: 18px;
|
|
2466
2466
|
font-weight: 400;
|
|
2467
2467
|
color: #6f7c90;
|
|
2468
2468
|
text-transform: capitalize;
|
|
2469
|
-
`,
|
|
2469
|
+
`,a_=f.styled(f.Stack)`
|
|
2470
2470
|
overflow: hidden;
|
|
2471
|
-
`,Sp=e=>A.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00483 12.5052C7.73146 12.7786 7.73146 13.2218 8.00483 13.4952C8.2782 13.7685 8.72141 13.7685 8.99478 13.4952L11.9948 10.4952C12.2681 10.2218 12.2681 9.77859 11.9948 9.50522L8.99478 6.50522C8.72141 6.23185 8.2782 6.23185 8.00483 6.50522C7.73146 6.77859 7.73146 7.2218 8.00483 7.49517L10.5099 10.0002L8.00483 12.5052Z"})),Tp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=_.useMemo(()=>
|
|
2471
|
+
`,Sp=e=>A.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"#6C7B94",xmlns:"http://www.w3.org/2000/svg",...e},A.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.00483 12.5052C7.73146 12.7786 7.73146 13.2218 8.00483 13.4952C8.2782 13.7685 8.72141 13.7685 8.99478 13.4952L11.9948 10.4952C12.2681 10.2218 12.2681 9.77859 11.9948 9.50522L8.99478 6.50522C8.72141 6.23185 8.2782 6.23185 8.00483 6.50522C7.73146 6.77859 7.73146 7.2218 8.00483 7.49517L10.5099 10.0002L8.00483 12.5052Z"})),Tp=({connectorName:e,entities:t,checkedEntities:n={},disabled:r=!1,setCheckedEntities:o})=>{const s=_.useMemo(()=>VI(t),[t]),a=i=>{const c=i.currentTarget;if(!c)return;const l=c.parentElement;l&&l.classList.toggle("expanded")};return t!=null&&t.length?u.jsx(n_,{children:s.map(i=>u.jsxs(r_,{className:"expanded",children:[u.jsxs(o_,{onClick:a,children:[u.jsx(s_,{variant:"body2",children:i.type}),u.jsx(Sp,{className:"toggle-arrow-icon"})]}),u.jsx(a_,{children:i.entities.map(c=>u.jsx(t_,{connectorName:e,entity:c,checked:r||!!n[c.entityType+c.displayValue],setCheckedEntities:o,disabled:r},c.formId))})]},i.type))}):u.jsx(rl,{message:lw})},i_=f.styled(f.Stack)`
|
|
2472
2472
|
padding: 18px 0;
|
|
2473
2473
|
row-gap: 12px;
|
|
2474
2474
|
box-sizing: border-box;
|
|
2475
|
-
`,
|
|
2475
|
+
`,c_=f.styled(f.Stack)`
|
|
2476
2476
|
cursor: pointer;
|
|
2477
2477
|
position: relative;
|
|
2478
2478
|
z-index: 1;
|
|
@@ -2483,7 +2483,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2483
2483
|
background-color: rgba(0, 0, 0, 0.04);
|
|
2484
2484
|
z-index: -1;
|
|
2485
2485
|
}
|
|
2486
|
-
`,
|
|
2486
|
+
`,l_=({searchText:e,connectorName:t,formData:n,onClick:r})=>u.jsxs(c_,{onClick:r,children:[u.jsx(f.Typography,{color:f.theme.palette.gray.gray1,children:e}),u.jsxs(f.Typography,{color:f.theme.palette.gray.gray3,fontSize:"12px",textTransform:"capitalize",children:[t," - ",n==null?void 0:n.searchObject]})]}),u_=({searchText:e,connectorName:t,options:n,onSearch:r})=>{const o=s=>{r({formId:s.id,searchObject:s.searchObject,searchText:e})};return u.jsx(i_,{children:n.map(s=>u.jsx(l_,{searchText:e,connectorName:t,formData:s,onClick:()=>o(s)},t+(s==null?void 0:s.searchObject)))})},d_=f.styled(f.Stack)`
|
|
2487
2487
|
padding: 12px 12px 12px 11px;
|
|
2488
2488
|
border: 1px solid ${f.theme.palette.gray.gray5};
|
|
2489
2489
|
border-radius: 8px;
|
|
@@ -2497,26 +2497,26 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2497
2497
|
transform: translateX(6px);
|
|
2498
2498
|
}
|
|
2499
2499
|
}
|
|
2500
|
-
`,
|
|
2500
|
+
`,f_=f.styled(f.Stack)`
|
|
2501
2501
|
padding: 14px 0;
|
|
2502
2502
|
row-gap: 12px;
|
|
2503
2503
|
column-gap: 16px;
|
|
2504
2504
|
box-sizing: border-box;
|
|
2505
|
-
`,
|
|
2505
|
+
`,p_=f.styled(f.Stack)`
|
|
2506
2506
|
padding: 8px 0;
|
|
2507
2507
|
row-gap: 12px;
|
|
2508
2508
|
box-sizing: border-box;
|
|
2509
|
-
`,
|
|
2509
|
+
`,h_=({entity:e,onLog:t})=>{const{externalResourceId:n,name:r}=e;return u.jsxs(d_,{onClick:t,direction:"row",children:[u.jsx(f.Stack,{flexGrow:1,children:u.jsx(f.Typography,{variant:"body2",fontSize:"13px",color:"#343C45",children:r})}),u.jsx(Sp,{})]},n)},g_=({connectorName:e,results:t,formId:n,searchObject:r,addEntity:o})=>{const s=t.length,{connectorFunctions:a}=_.useContext(zt),i=a==null?void 0:a.sendTrackingEvent;if(!(t!=null&&t.length))return u.jsx(rl,{message:"No results found"});const c=l=>{o(l),i==null||i(Dt.email_logging_search_result_selected,{app_name:e,object_name:l.displayValue,object_key:l.entityType})};return u.jsxs(f_,{children:[u.jsxs(f.Typography,{variant:"body2",color:"#3E4C5A",children:[s," Results found in ",e]}),u.jsx(p_,{children:t.map(l=>u.jsx(h_,{entity:{...l,id:n,searchObject:r},onLog:()=>c({...l,entityType:r,app:e,displayValue:l.name})},l.externalResourceId))})]})},m_=f.styled(f.Stack)`
|
|
2510
2510
|
height: 100%;
|
|
2511
2511
|
row-gap: 8px;
|
|
2512
2512
|
align-items: center;
|
|
2513
2513
|
justify-content: center;
|
|
2514
|
-
`,
|
|
2514
|
+
`,b_=f.styled(ol)`
|
|
2515
2515
|
width: 32px;
|
|
2516
2516
|
height: 32px;
|
|
2517
2517
|
fill: #506dff;
|
|
2518
2518
|
animation: ${Aa} 1s linear infinite;
|
|
2519
|
-
`,
|
|
2519
|
+
`,y_=({message:e="Fetching details"})=>u.jsxs(m_,{children:[u.jsx(b_,{}),u.jsx(f.Typography,{variant:"body2",fontSize:"12px",color:"#6F7C90",children:e})]}),C_=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch email log status");const t=await ke({url:bt(Gw,{conversationId:e}),method:Be.GET});return t==null?void 0:t.data}catch(t){throw console.error(t),t}},v_=e=>{var t;return e?!((t=e==null?void 0:e.messageLogStatus)!=null&&t.pending):!1},La=({conversationId:e})=>{const t=Zc(),{queryKey:n,polledLogsStatus:r}=_.useMemo(()=>{const s=["EmailLogger","PolledLogsStatus",e],a=cp({intervalMillis:1e3,maxRetries:10,increaseIntervalMillis:1500,apiFn:C_,isSatisfied:v_,pushIntermediateResults:i=>{t.setQueryData(s,i)}});return{queryKey:s,polledLogsStatus:a}},[t,e]);return Go({queryKey:n,queryFn:()=>r({conversationId:e}),enabled:!!e,refetchOnWindowFocus:"always",retry:!1})},x_=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to post logs");const n=await ke({url:bt(zw,{conversationId:t}),data:e,method:Be.POST});return n==null?void 0:n.data}catch(n){throw Se({message:pn,type:qe}),console.error(n),n}},E_=({onSuccess:e})=>mn({mutationFn:x_,onSuccess:e}),I_=f.styled(f.Stack)`
|
|
2520
2520
|
padding: 12px;
|
|
2521
2521
|
flex-flow: row nowrap;
|
|
2522
2522
|
justify-content: flex-end;
|
|
@@ -2533,7 +2533,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2533
2533
|
padding: 7px 10px;
|
|
2534
2534
|
}
|
|
2535
2535
|
}
|
|
2536
|
-
`,
|
|
2536
|
+
`,w_=({checkedEntities:e,close:t,connectorName:n,connectorId:r})=>{const{conversationId:o,connectorFunctions:s}=_.useContext(zt),{refetch:a}=La({conversationId:o}),i=s==null?void 0:s.sendTrackingEvent,c=()=>{a(),t();const y=Object.values(e),p=y.map(m=>m.displayValue).join(", "),h=Array.from(new Set(y.map(m=>m==null?void 0:m.entityType)));i==null||i(Dt.email_logging_log_config_saved,{app_name:n,num_of_keys_selected:y.length,list_of_keys:p,list_of_objects:h.join(", "),num_of_objects_selected:h.length})},{mutate:l,isPending:d}=E_({onSuccess:c}),g=Object.keys(e).length>0,b=()=>{const y=Object.values(e);l({conversationId:o,payload:{selectedEntities:y,connectorId:r,autoLogEnabled:!0}})},x=()=>{t==null||t(),i==null||i(Dt.email_logging_log_config_canceled,{app_name:n})};return u.jsxs(I_,{children:[u.jsx(f.Button,{variant:"text",size:"small",onClick:x,children:"Cancel"}),u.jsxs(f.Button,{variant:"contained",size:"small",className:"primary-action",disabled:d||!g,onClick:b,children:[d?u.jsx(f.CircularProgress,{sx:{color:"#97A3B7"},size:12}):null,"Save & Enable"]})]})},__="Tell us more (optional)",S_=f.styled(f.Box)`
|
|
2537
2537
|
width: ${({width:e})=>e||"440px"};
|
|
2538
2538
|
border-radius: 12px;
|
|
2539
2539
|
padding: 16px;
|
|
@@ -2546,15 +2546,15 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2546
2546
|
flex-direction: row;
|
|
2547
2547
|
margin-bottom: 12px;
|
|
2548
2548
|
}
|
|
2549
|
-
`,
|
|
2549
|
+
`,T_=f.styled(f.Box)`
|
|
2550
2550
|
border-bottom: 1px solid ${f.theme.palette.gray.gray6};
|
|
2551
2551
|
margin: 12px -16px;
|
|
2552
|
-
`,
|
|
2552
|
+
`,A_=f.styled(f.Box)`
|
|
2553
2553
|
display: flex;
|
|
2554
2554
|
justify-content: flex-end;
|
|
2555
2555
|
margin-top: 30px;
|
|
2556
2556
|
gap: 8px;
|
|
2557
|
-
`,
|
|
2557
|
+
`,L_=({onCancel:e,onSubmit:t,isLoading:n,showOptions:r=!0,title:o,width:s,feedbackOptions:a,feedbackPlaceholder:i=__})=>{const[c,l]=_.useState(""),[d,g]=_.useState(""),b=m=>{l(m.target.value)},x=m=>{m.stopPropagation();const{value:v}=(m==null?void 0:m.target)||{};g(v)},y=()=>{t({feedbackOption:c,feedbackComment:d})},p=()=>{e==null||e()},h=r?!c:!d;return u.jsxs(S_,{width:s,children:[u.jsx(f.Typography,{variant:"h3",children:o}),u.jsx(T_,{}),r?u.jsx(f.FormControl,{children:u.jsx(f.RadioGroup,{"aria-labelledby":"demo-controlled-radio-buttons-group",name:"controlled-radio-buttons-group",value:c,onChange:b,children:a.map(m=>u.jsx(f.FormControlLabel,{value:m.value,control:u.jsx(f.Radio,{}),label:m.label},m.value))})}):null,u.jsx(or,{type:"text",placeholder:i,value:d,name:"feedbackComment",inputChangeHandler:x,multiline:!0,rows:5,limit:250,validation:{validate:Ki()}}),u.jsxs(A_,{children:[u.jsx(f.Button,{variant:"text",color:"primary",style:{color:f.theme.palette.gray.gray3},disabled:n,onClick:p,children:"Cancel"}),u.jsx(pp,{variant:"contained",color:"primary",isLoading:n,disabled:h,label:"Submit",onClick:y})]})]})},O_=async({conversationId:e,feedbackData:t})=>{try{if(!e)throw new Error("Conversation ID is required");const n=await ke({url:Yw.replace(":conversationId",e)+"?channel_type=email",method:"POST",data:t});return Se({message:yw,type:Ut}),n==null?void 0:n.data}catch(n){throw console.error("Error submitting feedback:",n),Se({message:Cw,type:qe}),n}};function F_({onSuccess:e}){return mn({mutationFn:O_,onSuccess:e})}const D_=f.styled(f.Stack)`
|
|
2558
2558
|
flex-flow: row nowrap;
|
|
2559
2559
|
justify-content: space-between;
|
|
2560
2560
|
align-items: center;
|
|
@@ -2566,7 +2566,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2566
2566
|
&:disabled {
|
|
2567
2567
|
opacity: 0.4;
|
|
2568
2568
|
}
|
|
2569
|
-
`,
|
|
2569
|
+
`,k_=f.styled(f.Typography)`
|
|
2570
2570
|
color: #6f7c90;
|
|
2571
2571
|
font-size: 11px;
|
|
2572
2572
|
font-weight: 400;
|
|
@@ -2575,35 +2575,35 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2575
2575
|
`,Lp=f.styled(f.Tooltip)`
|
|
2576
2576
|
padding: 6px;
|
|
2577
2577
|
border-radius: 6px;
|
|
2578
|
-
`,
|
|
2578
|
+
`,N_=()=>{const{conversationId:e}=_.useContext(zt),[t,n]=_.useState(!1),r=()=>{n(!1)},{mutate:o,isPending:s}=F_({onSuccess:r}),a=()=>{o({conversationId:e,feedbackData:{feedback_type:Ip,positive_feedback:!1}})},i=()=>{n(!0)},c=({feedbackComment:l,feedbackOption:d})=>{o({conversationId:e,feedbackData:{feedback_type:Ip,comment:l,option:d,positive_feedback:!1}})};return u.jsxs(D_,{children:[u.jsx(k_,{children:bw}),u.jsxs(f.Stack,{flexDirection:"row",alignItems:"flex-end",children:[u.jsx(Lp,{arrow:!0,title:gw,placement:"top",children:u.jsx(Ap,{className:"feedback-button",size:"small",onClick:a,disabled:s,children:u.jsx(gp,{})})}),u.jsx(Lp,{arrow:!0,title:mw,placement:"top",children:u.jsx(Ap,{className:"feedback-button",size:"small",onClick:i,disabled:s,children:u.jsx(mp,{})})})]}),u.jsx(Vr,{shown:t,setShown:n,borderRadius:12,sx:{zIndex:15002},children:u.jsx(L_,{onCancel:()=>n(!1),onSubmit:c,isLoading:s,title:hw,feedbackOptions:vw,width:"440px"})})]})},R_=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to fetch recommendations");const t=await ke({url:bt(Hw,{conversationId:e}),method:Be.GET}),n=t==null?void 0:t.data;return(n==null?void 0:n.results)??[]}catch(t){throw console.error(t),t}},M_=({conversationId:e,enabled:t=!0})=>Go({queryKey:["EmailLogger","EntityRecommendations",e],queryFn:()=>R_({conversationId:e}),enabled:!!e&&t}),P_=async({formId:e,searchObject:t,searchText:n})=>{try{if(!e)throw new Error("Form ID is required to fetch search entities");const r=await ke({url:bt(Xw,{formId:e}),data:{search_string:n,args:{}},method:Be.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:pn,type:qe}),console.error(r),r}},j_=({onSuccess:e})=>mn({mutationFn:P_,onSuccess:e}),B_=async({payload:e,conversationId:t})=>{try{if(!t)throw new Error("Conversation ID is required to toggle auto logs");const n=await ke({url:bt(Jw,{conversationId:t}),data:e,method:Be.PATCH});return n==null?void 0:n.data}catch(n){throw Se({message:pn,type:qe}),console.error(n),n}},V_=({onSuccess:e})=>mn({mutationFn:B_,onSuccess:e}),G_=f.styled(f.Stack)`
|
|
2579
2579
|
color: #343c45;
|
|
2580
2580
|
height: 100%;
|
|
2581
2581
|
box-sizing: border-box;
|
|
2582
|
-
`,
|
|
2582
|
+
`,H_=f.styled(f.Stack)`
|
|
2583
2583
|
flex-flow: row nowrap;
|
|
2584
2584
|
justify-content: space-between;
|
|
2585
2585
|
align-items: center;
|
|
2586
2586
|
column-gap: 8px;
|
|
2587
2587
|
padding: 12px 16px;
|
|
2588
2588
|
background-color: #f6f8fc;
|
|
2589
|
-
`,
|
|
2589
|
+
`,W_=f.styled(f.Stack)`
|
|
2590
2590
|
flex-flow: row nowrap;
|
|
2591
2591
|
justify-content: flex-start;
|
|
2592
2592
|
align-items: center;
|
|
2593
2593
|
column-gap: 8px;
|
|
2594
|
-
`,
|
|
2594
|
+
`,Z_=f.styled(f.Stack)`
|
|
2595
2595
|
flex-flow: row nowrap;
|
|
2596
2596
|
justify-content: flex-end;
|
|
2597
2597
|
align-items: center;
|
|
2598
2598
|
column-gap: 6px;
|
|
2599
|
-
`,
|
|
2599
|
+
`,X_=f.styled(f.Stack)`
|
|
2600
2600
|
padding: 4px;
|
|
2601
2601
|
background-color: #ffffff;
|
|
2602
2602
|
border-radius: 50%;
|
|
2603
|
-
`,
|
|
2603
|
+
`,z_=f.styled("img")`
|
|
2604
2604
|
width: 16px;
|
|
2605
2605
|
height: 16px;
|
|
2606
|
-
`,
|
|
2606
|
+
`,Y_=f.styled(f.Stack)`
|
|
2607
2607
|
flex-grow: 1;
|
|
2608
2608
|
`,Op=f.styled(f.Stack)`
|
|
2609
2609
|
flex-grow: 1;
|
|
@@ -2616,10 +2616,10 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2616
2616
|
overflow-y: auto;
|
|
2617
2617
|
scrollbar-width: thin;
|
|
2618
2618
|
scrollbar-color: #97a3b7 transparent;
|
|
2619
|
-
`,
|
|
2619
|
+
`,J_=f.styled(f.Stack)`
|
|
2620
2620
|
padding: 12px 16px 0;
|
|
2621
2621
|
position: relative;
|
|
2622
|
-
`,
|
|
2622
|
+
`,q_=f.styled(f.OutlinedInput)`
|
|
2623
2623
|
padding: 0;
|
|
2624
2624
|
fieldset {
|
|
2625
2625
|
border-radius: 4px;
|
|
@@ -2638,7 +2638,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2638
2638
|
border-width: 1px !important;
|
|
2639
2639
|
}
|
|
2640
2640
|
}
|
|
2641
|
-
|
|
2641
|
+
`,$_=f.styled(f.Stack)`
|
|
2642
2642
|
padding: 8px 0 8px 12px;
|
|
2643
2643
|
justify-content: center;
|
|
2644
2644
|
align-items: center;
|
|
@@ -2647,12 +2647,12 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2647
2647
|
height: 15px;
|
|
2648
2648
|
fill: #4d596c;
|
|
2649
2649
|
}
|
|
2650
|
-
|
|
2650
|
+
`,Q_=e=>u.jsx(f.Switch,{disableRipple:!0,...e}),U_=f.styled(Q_)(({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}})),K_=f.styled(ol)`
|
|
2651
2651
|
width: 14px;
|
|
2652
2652
|
height: 14px;
|
|
2653
2653
|
fill: #4d596c;
|
|
2654
2654
|
animation: ${Aa} 1s linear infinite;
|
|
2655
|
-
`,
|
|
2655
|
+
`,lr=Gr.CaseView,eS=({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,[d,g]=_.useState(""),[b,x]=_.useState([]),[y,p]=_.useState({}),{conversationId:h,connectorFunctions:m}=_.useContext(zt),v=m==null?void 0:m.sendTrackingEvent,{data:C,isError:I,isLoading:E}=M_({conversationId:h,enabled:!l}),{refetch:w}=La({conversationId:h}),T=()=>{v==null||v(Dt.email_logging_search_results_found,{app_name:a,search_keyword:d})},{mutate:S,data:L,isPending:N,isIdle:D,reset:k}=j_({onSuccess:T}),{mutate:M,isPending:B}=V_({onSuccess:w}),{results:z=[],...q}=L??{},Q=_.useMemo(()=>{const G={},V=[];for(const H of b){const J=H.entityType+H.displayValue;G[J]||V.push(H),G[J]=H}for(const H of C??[]){const J=H.entityType+H.displayValue;G[J]||V.push(H),G[J]=H}return V},[C,b]),X=G=>{g(G.target.value),D||k()},Y=G=>{const{entityType:V,displayValue:H}=G;p(J=>({...J,[V+H]:G})),x(J=>[G,...J]),g(""),k()},oe=()=>{v==null||v(Dt.email_logging_search_initiated,{app_name:a})},$=()=>{M({payload:{autoLogEnabled:!r},conversationId:h});const G=r?Dt.email_logging_auto_log_disabled:Dt.email_logging_auto_log_enabled;v==null||v(G,{app_name:a})},P=E||N;return u.jsxs(G_,{children:[u.jsxs(H_,{children:[u.jsxs(W_,{children:[u.jsx(X_,{children:u.jsx(z_,{src:c,alt:"connector"})}),u.jsx(f.Typography,{children:"Sync conversation"})]}),u.jsxs(Z_,{children:[B?u.jsx(K_,{}):null,l?u.jsx(f.Tooltip,{arrow:!0,title:r?nw:rw,children:u.jsx(f.Stack,{children:u.jsx(U_,{checked:r,value:r,onClick:$,disabled:B})})}):null]})]}),u.jsx(Y_,{children:u.jsxs(Gr,{children:[u.jsxs(lr,{condition:l,children:[u.jsx(Op,{children:u.jsx(Fp,{children:u.jsx(Tp,{connectorName:a,entities:o,disabled:!0})})}),u.jsx(N_,{})]},"disabled-view"),u.jsxs(lr,{fallback:!0,children:[u.jsx(J_,{children:u.jsx(q_,{type:"text",name:"search",value:d,onChange:X,onFocus:oe,startAdornment:u.jsx($_,{children:u.jsx(V1,{})}),size:"small"})}),u.jsx(Op,{children:u.jsx(Fp,{children:u.jsxs(Gr,{children:[u.jsx(lr,{condition:P,children:u.jsx(y_,{message:N?"Searching...":"Loading..."})},"loading"),u.jsx(lr,{condition:d===""&&Q.length>0,children:u.jsx(Tp,{connectorName:a,checkedEntities:y,setCheckedEntities:p,entities:Q??[]})},"entity-suggestions"),u.jsx(lr,{condition:!!d&&D,children:u.jsx(u_,{searchText:d,connectorName:a,options:s,onSearch:S})},"search-options"),u.jsx(lr,{condition:!!d&&!D,children:u.jsx(g_,{connectorName:a,results:z,...q,addEntity:Y})},"search-results"),u.jsx(lr,{condition:!Q.length&&I,children:u.jsx(rl,{message:pn})},"error")]})})}),d?null:u.jsx(w_,{connectorName:a,connectorId:i,checkedEntities:y,close:t})]},"select-logs")]})})]})},tS=async({conversationId:e})=>{try{if(!e)throw new Error("Conversation ID is required to retry logs");const t=await ke({url:bt(Ww,{conversationId:e}),method:Be.POST});return t==null?void 0:t.data}catch(t){throw Se({message:pn,type:qe}),console.error(t),t}},nS=({onSuccess:e})=>mn({mutationFn:tS,onSuccess:e}),rS=f.styled(f.Stack)`
|
|
2656
2656
|
border-radius: 100px;
|
|
2657
2657
|
background: #f6f8fc;
|
|
2658
2658
|
flex-flow: row nowrap;
|
|
@@ -2661,7 +2661,7 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2661
2661
|
padding: 8px;
|
|
2662
2662
|
width: fit-content;
|
|
2663
2663
|
cursor: pointer;
|
|
2664
|
-
`,
|
|
2664
|
+
`,oS=f.styled(f.Button)`
|
|
2665
2665
|
padding: 0;
|
|
2666
2666
|
background: none;
|
|
2667
2667
|
border: none;
|
|
@@ -2670,4 +2670,4 @@ Do you want to continue?`,S8="Select an object to create",T8="Select an object t
|
|
|
2670
2670
|
line-height: 14px;
|
|
2671
2671
|
color: #506dff;
|
|
2672
2672
|
margin-left: 6px;
|
|
2673
|
-
`,
|
|
2673
|
+
`,sS=[xe.PENDING,xe.LOGGED,xe.NOT_LOGGED,xe.PAUSED],aS=[xe.LOGGED,xe.PAUSED],iS=({status:e,emailLogStatus:t})=>{const{isAdmin:n,conversationId:r,connectorFunctions:o}=_.useContext(zt),s=o==null?void 0:o.sendTrackingEvent,{refetch:a}=La({conversationId:r}),{mutate:i,isPending:c}=nS({onSuccess:a}),l=qI[e],d=UI[e],g=QI[e],{emailLogSettings:b,messageLogStatus:x}=t,{connectorName:y}=b??{},{logged:p,total:h}=x??{},m=aS.includes(e)&&h?` (${p}/${h})`:"",v=e===xe.ERROR,C=sS.includes(e),I=({close:w})=>u.jsx(eS,{close:w,emailLogStatus:t}),E=()=>{i({conversationId:r}),s==null||s(Dt.email_logging_failed_clicked,{app_name:y})};return u.jsx(Bw,{logSettings:b,status:e,isAdmin:n,retry:v,renderEntities:C?I:void 0,children:u.jsxs(rS,{style:{cursor:C?"pointer":"not-allowed"},children:[l,g?g(`${d} ${m}`):null,v?u.jsx(oS,{variant:"text",disabled:c,onClick:E,children:"Retry"}):null]})})},sl=({emailLogStatus:e,containerElement:t,messageId:n,legacyMessageId:r})=>{if(!t)return null;const o=GI(e);return Ne.createPortal(u.jsx(iS,{status:o,emailLogStatus:e,messageId:n,legacyMessageId:r}),t)},cS=({observer:e})=>{var x;const[t,n]=_.useState({}),[r,o]=_.useState({}),[s,a]=_.useState({}),{conversationId:i}=_.useContext(zt),{data:c}=La({conversationId:i}),l=(x=c==null?void 0:c.emailLogSettings)==null?void 0:x.enabled,d=y=>{n(p=>({...p,...y}))},g=y=>{o(p=>({...p,...y}))},b=y=>{a(y)};return _.useEffect(()=>{if(!(!e||!l))return e.observe({setEmailButtonContainers:d,setComposeButtonContainers:g,setSubjectButtonContainers:b}),()=>{e.destroy(),n({}),o({})}},[e,l]),c?u.jsxs(u.Fragment,{children:[Object.entries(t).map(([y,p])=>u.jsx(sl,{emailLogStatus:c,containerElement:p.element,messageId:p.messageId,legacyMessageId:p.legacyMessageId},y)),Object.entries(r).map(([y,p])=>u.jsx(sl,{emailLogStatus:c,containerElement:p.element},y)),Object.entries(s).map(([y,p])=>u.jsx(sl,{emailLogStatus:c,containerElement:p.element},y))]}):null},lS=({isAdmin:e,conversationId:t,connectorFunctions:n,children:r})=>{const o=_.useMemo(()=>({isAdmin:e,conversationId:t,connectorFunctions:n}),[e,t,n]);return u.jsx(zt.Provider,{value:o,children:r})},uS=({children:e,...t})=>u.jsx(Pi,{store:qc,children:u.jsx(f.HiverProvider,{custom:!0,children:u.jsx(Jc,{children:u.jsx(_.Suspense,{fallback:u.jsx(u.Fragment,{}),children:u.jsx(lS,{...t,children:e})})})})}),Oa=".hiver-log-crm-button",Fa=".hiver-log-crm-compose-button",Dp=".hiver-log-crm-subject-button";class dS{constructor({emailNodeFilter:t,composeNodeFilter:n,emailHeaderTargetSelector:r=".gE.iv.gt .c2",composeHeaderTargetSelector:o=".aoD.hl .bgW",emailMessageContainerSelector:s=".adn.ads",subjectContainer:a=null,disableAutoLogInEmail:i=!1,disableAutoLogInCompose:c=!1,disableAutoLogInSubject:l=!1}={}){De(this,"observer",null);De(this,"setComposeButtonContainers",null);De(this,"setEmailButtonContainers",null);De(this,"setSubjectButtonContainers",null);De(this,"emailNodeFilter");De(this,"composeNodeFilter");De(this,"emailHeaderTargetSelector");De(this,"composeHeaderTargetSelector");De(this,"emailMessageContainerSelector");De(this,"disableAutoLogInEmail");De(this,"disableAutoLogInCompose");De(this,"disableAutoLogInSubject");De(this,"subjectContainer",null);De(this,"_addLogButtonsOnEmail",()=>{if(this.disableAutoLogInEmail)return;document.querySelectorAll(Oa).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(Oa))return;const i=document.createElement("div");i.classList.add(Oa.slice(1)),i.style.display="inline-block",i.style.marginLeft="8px",o==null||o.appendChild(i),(c=this.setEmailButtonContainers)==null||c.call(this,{[s??""]:{element:i,messageId:s,legacyMessageId:a}})})});De(this,"_addLogButtonsOnCompose",()=>{if(this.disableAutoLogInCompose)return;document.querySelectorAll(Fa).forEach(r=>r.remove());const n=document.querySelectorAll(this.composeHeaderTargetSelector);n.length&&n.forEach((r,o)=>{var a;if(r.querySelector(Fa))return;const s=document.createElement("div");s.classList.add(Fa.slice(1)),s.style.display="inline-block",r.appendChild(s),(a=this.setComposeButtonContainers)==null||a.call(this,{["_compose_"+o]:{element:s}})})});De(this,"_addLogButtonOnSubject",()=>{var r,o,s;if(this.disableAutoLogInSubject||!this.subjectContainer)return;const t=(r=this.subjectContainer)==null?void 0:r.querySelectorAll(Dp);t==null||t.forEach(a=>a.remove());const n=document.createElement("div");n.classList.add(Dp.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(Oa).forEach(r=>r.remove()),document.querySelectorAll(Fa).forEach(r=>r.remove()),this.observer&&(this.observer.disconnect(),this.observer=null)}}const fS=({observer:e,...t})=>u.jsx($c,{children:u.jsxs(uS,{...t,children:[u.jsx(cS,{observer:e}),Ne.createPortal(u.jsx(Qc,{id:"toast-message",children:u.jsx(Wa,{position:"bottom-left",autoClose:5e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,draggable:!0,pauseOnHover:!0})}),document.body)]})}),pS=e=>ke({url:K7,method:Be.POST,data:e});le.ActionQueue=BI,le.CONNECTORS_AGENT_EVENTS=Yc,le.ConnectorCardList=qE,le.EmailLogger=fS,le.GmailLogObserver=dS,le.HiverConnectorBifrostAuth=ke,le.IntegrationSense=PI,le.addNewConnectors=_2,le.dismissNotification=Pl,le.fetchAppCfValues=pS,le.getConnectorsBifrostConfigs=Qt,le.getMetaData=Wb,le.initConnectorsBifrost=Qg,le.setCaptureFeedbackOnDemand=S2,le.shouldCaptureFeedback=Ka,le.shouldShowNotification=Ml,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|