ed-widget 1.51.0-beta.7 → 1.51.0-beta.8
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/dist/ed-widget.js +1 -1
- package/npm/ed-widget.js +1 -1
- package/package.json +1 -1
package/dist/ed-widget.js
CHANGED
|
@@ -878,7 +878,7 @@ If anything else comes up, I'm just one message away. 👋`,channelConnecting:"P
|
|
|
878
878
|
title="${_==null?void 0:_.contact_person_email}"
|
|
879
879
|
>${_==null?void 0:_.contact_person_email}</p>
|
|
880
880
|
</div>
|
|
881
|
-
</div>`,is_customer_reply:!0},{message:$,is_auto_response:!0,current_stage:K}];await GT(600,1e3);const{data:ee}=await k({variables:{inputData:{type:"chat",contact_person_name:_==null?void 0:_.contact_person_name,contact_person_email:_==null?void 0:_.contact_person_email,conversation_activities:J,is_initiated_with_ai:E}}}),ce=ee==null?void 0:ee.createAConversationForPortal;ce!=null&&ce.id&&(n(ce==null?void 0:ce.id),iw("easydesk_chat_widget_conversation_id",ce==null?void 0:ce.id,{expires:30}),t==null||t({contact_person_name:_==null?void 0:_.contact_person_name,contact_person_email:_==null?void 0:_.contact_person_email}))}catch(ne){const{message:Y,response:$}=ne;$i("error",((X=$==null?void 0:$.data)==null?void 0:X.message)||Y,"top-left"),b(!1)}finally{N(!1)}},V=Q=>{const{name:Z,value:X}=Q.target;O(ne=>({...ne,[Z]:X}))},H=L.useMemo(()=>!(_!=null&&_.contact_person_name)||!(_!=null&&_.contact_person_email)||!aw(_==null?void 0:_.contact_person_email)||D,[_,D]);return T.jsxs("div",{className:"ed-space-y-5 ed-px-5 ed-pt-1",children:[v&&!S&&T.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[I?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Rl(i==null?void 0:i.name)}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:I?"Easy AI Bot":i==null?void 0:i.name}),T.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:yu().format("HH:mm")})]}),T.jsx("div",{className:"ed-py-4",children:T.jsx(ep,{})})]})]}),l&&!S&&T.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%] ed-animate-fadeInUp",children:[I?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Rl(i==null?void 0:i.name)}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:I?"Easy AI Bot":i==null?void 0:i.name}),T.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:yu().format("HH:mm")})]}),T.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-text-[13px] ed-rounded-lg ed-mt-2",children:T.jsx("p",{className:"ed-text-border-dark",children:I?Pr.initial.greetingOnline:Pr.initial.greetingOffline})})]})]}),d&&!S&&T.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto ed-animate-fadeInUp",children:T.jsxs("form",{onSubmit:P,className:"ed-p-5 ed-rounded-[20px] ed-bg-white-light ed-space-y-5",children:[T.jsxs("div",{className:"ed-space-y-2",children:[T.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Name ",T.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),T.jsx("input",{type:"text",name:"contact_person_name",required:!0,placeholder:"Enter your name",value:_==null?void 0:_.contact_person_name,onChange:V,disabled:s,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),T.jsxs("div",{className:"ed-space-y-2",children:[T.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Email ",T.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),T.jsx("input",{type:"email",name:"contact_person_email",required:!0,placeholder:"Enter your email",value:_==null?void 0:_.contact_person_email,onChange:V,disabled:s,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),T.jsx("div",{className:"ed-flex ed-justify-end",children:T.jsx(Xh,{title:"Submit",loaderText:"Submitting",fullWidthBtn:!0,disabled:H,loader:D,callBack:P})})]})}),S&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[I?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Rl(i==null?void 0:i.name)}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:I?i==null?void 0:i.name:"Eden AI bot"}),T.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:yu().format("HH:mm")})]}),T.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-text-[13px] ed-rounded-lg ed-mt-2",children:T.jsx("p",{className:"ed-text-border-dark",children:I?Pr.initial.greetingOnline:Pr.initial.greetingOffline})})]})]}),T.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto ed-animate-fadeInUp",children:T.jsxs("div",{className:"ed-p-5 ed-rounded-[20px] ed-bg-blue-50 ed-border ed-border-blue-100",style:{borderRadius:"20px",border:"1px solid #e3f2fd",backgroundColor:"#e3f2fd",padding:"20px"},children:[T.jsxs("div",{style:{marginBottom:"20px"},children:[T.jsx("h6",{style:{fontSize:"13px",fontWeight:"600",color:"#3b3b3b",margin:0,padding:0},children:"Name"}),T.jsx("p",{style:{fontSize:"13px",color:"#797979"},children:_==null?void 0:_.contact_person_name})]}),T.jsxs("div",{children:[T.jsx("h6",{style:{fontSize:"13px",fontWeight:"600",color:"#3b3b3b",margin:0,padding:0},children:"Email"}),T.jsx("p",{style:{fontSize:"13px",color:"#797979",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:_==null?void 0:_.contact_person_email})]})]})}),T.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%] ed-animate-fadeIn",children:[I?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Rl(i==null?void 0:i.name)}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:I?i==null?void 0:i.name:"Eden AI bot"}),T.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:yu().format("HH:mm")})]}),T.jsx("div",{className:"ed-py-4",children:T.jsx(ep,{})})]})]})]})]})};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:wj,setPrototypeOf:Tj,isFrozen:zse,getPrototypeOf:Hse,getOwnPropertyDescriptor:Bse}=Object;let{freeze:Ja,seal:hs,create:bS}=Object,{apply:YT,construct:KT}=typeof Reflect<"u"&&Reflect;Ja||(Ja=function(e){return e}),hs||(hs=function(e){return e}),YT||(YT=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return e.apply(n,i)}),KT||(KT=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new e(...r)});const SS=to(Array.prototype.forEach),qse=to(Array.prototype.lastIndexOf),Rj=to(Array.prototype.pop),kg=to(Array.prototype.push),Wse=to(Array.prototype.splice),ES=to(String.prototype.toLowerCase),QT=to(String.prototype.toString),ZT=to(String.prototype.match),Og=to(String.prototype.replace),$se=to(String.prototype.indexOf),Gse=to(String.prototype.trim),$o=to(Object.prototype.hasOwnProperty),eo=to(RegExp.prototype.test),Ng=Yse(TypeError);function to(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return YT(t,e,r)}}function Yse(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return KT(t,n)}}function Fn(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ES;Tj&&Tj(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const s=n(i);s!==i&&(zse(e)||(e[r]=s),i=s)}t[i]=!0}return t}function Kse(t){for(let e=0;e<t.length;e++)$o(t,e)||(t[e]=null);return t}function Dl(t){const e=bS(null);for(const[n,r]of wj(t))$o(t,n)&&(Array.isArray(r)?e[n]=Kse(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=Dl(r):e[n]=r);return e}function Mg(t,e){for(;t!==null;){const r=Bse(t,e);if(r){if(r.get)return to(r.get);if(typeof r.value=="function")return to(r.value)}t=Hse(t)}function n(){return null}return n}const Aj=Ja(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),XT=Ja(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),JT=Ja(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Qse=Ja(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),eR=Ja(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Zse=Ja(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kj=Ja(["#text"]),Oj=Ja(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),tR=Ja(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Nj=Ja(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),CS=Ja(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xse=hs(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Jse=hs(/<%[\w\W]*|[\w\W]*%>/gm),ele=hs(/\$\{[\w\W]*/gm),tle=hs(/^data-[\-\w.\u00B7-\uFFFF]+$/),nle=hs(/^aria-[\-\w]+$/),Mj=hs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rle=hs(/^(?:\w+script|data):/i),ile=hs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lj=hs(/^html$/i),ale=hs(/^[a-z][.\w]*(-[.\w]+)+$/i);var Dj=Object.freeze({__proto__:null,ARIA_ATTR:nle,ATTR_WHITESPACE:ile,CUSTOM_ELEMENT:ale,DATA_ATTR:tle,DOCTYPE_NAME:Lj,ERB_EXPR:Jse,IS_ALLOWED_URI:Mj,IS_SCRIPT_OR_DATA:rle,MUSTACHE_EXPR:Xse,TMPLIT_EXPR:ele});const Lg={element:1,text:3,progressingInstruction:7,comment:8,document:9},ole=function(){return typeof window>"u"?null:window},sle=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Pj=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ij(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ole();const e=Xe=>Ij(Xe);if(e.version="3.3.3",e.removed=[],!t||!t.document||t.document.nodeType!==Lg.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:u,Element:d,NodeFilter:h,NamedNodeMap:v=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:g,DOMParser:S,trustedTypes:b}=t,E=d.prototype,w=Mg(E,"cloneNode"),_=Mg(E,"remove"),O=Mg(E,"nextSibling"),k=Mg(E,"childNodes"),D=Mg(E,"parentNode");if(typeof l=="function"){const Xe=n.createElement("template");Xe.content&&Xe.content.ownerDocument&&(n=Xe.content.ownerDocument)}let N,R="";const{implementation:I,createNodeIterator:P,createDocumentFragment:V,getElementsByTagName:H}=n,{importNode:Q}=r;let Z=Pj();e.isSupported=typeof wj=="function"&&typeof D=="function"&&I&&I.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:X,ERB_EXPR:ne,TMPLIT_EXPR:Y,DATA_ATTR:$,ARIA_ATTR:K,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:ce}=Dj;let{IS_ALLOWED_URI:re}=Dj,se=null;const pe=Fn({},[...Aj,...XT,...JT,...eR,...kj]);let ge=null;const _e=Fn({},[...Oj,...tR,...Nj,...CS]);let ye=Object.seal(bS(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pe=null,Me=null;const $e=Object.seal(bS(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ie=!0,fe=!0,we=!1,le=!0,rt=!1,Le=!0,at=!1,Tt=!1,mt=!1,sn=!1,ot=!1,Ft=!1,ht=!0,At=!1;const cn="user-content-";let nt=!0,kt=!1,fn={},Un=null;const ar=Fn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Rr=null;const Je=Fn({},["audio","video","img","source","image","track"]);let et=null;const ft=Fn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Bt="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",Gt="http://www.w3.org/1999/xhtml";let gn=Gt,Rn=!1,xn=null;const Gn=Fn({},[Bt,Jt,Gt],QT);let Ln=Fn({},["mi","mo","mn","ms","mtext"]),ti=Fn({},["annotation-xml"]);const ai=Fn({},["title","style","font","a","script"]);let Br=null;const Zr=["application/xhtml+xml","text/html"],Mr="text/html";let Kt=null,Ir=null;const Fr=n.createElement("form"),wn=function(oe){return oe instanceof RegExp||oe instanceof Function},rn=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ir&&Ir===oe)){if((!oe||typeof oe!="object")&&(oe={}),oe=Dl(oe),Br=Zr.indexOf(oe.PARSER_MEDIA_TYPE)===-1?Mr:oe.PARSER_MEDIA_TYPE,Kt=Br==="application/xhtml+xml"?QT:ES,se=$o(oe,"ALLOWED_TAGS")?Fn({},oe.ALLOWED_TAGS,Kt):pe,ge=$o(oe,"ALLOWED_ATTR")?Fn({},oe.ALLOWED_ATTR,Kt):_e,xn=$o(oe,"ALLOWED_NAMESPACES")?Fn({},oe.ALLOWED_NAMESPACES,QT):Gn,et=$o(oe,"ADD_URI_SAFE_ATTR")?Fn(Dl(ft),oe.ADD_URI_SAFE_ATTR,Kt):ft,Rr=$o(oe,"ADD_DATA_URI_TAGS")?Fn(Dl(Je),oe.ADD_DATA_URI_TAGS,Kt):Je,Un=$o(oe,"FORBID_CONTENTS")?Fn({},oe.FORBID_CONTENTS,Kt):ar,Pe=$o(oe,"FORBID_TAGS")?Fn({},oe.FORBID_TAGS,Kt):Dl({}),Me=$o(oe,"FORBID_ATTR")?Fn({},oe.FORBID_ATTR,Kt):Dl({}),fn=$o(oe,"USE_PROFILES")?oe.USE_PROFILES:!1,Ie=oe.ALLOW_ARIA_ATTR!==!1,fe=oe.ALLOW_DATA_ATTR!==!1,we=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,le=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,rt=oe.SAFE_FOR_TEMPLATES||!1,Le=oe.SAFE_FOR_XML!==!1,at=oe.WHOLE_DOCUMENT||!1,sn=oe.RETURN_DOM||!1,ot=oe.RETURN_DOM_FRAGMENT||!1,Ft=oe.RETURN_TRUSTED_TYPE||!1,mt=oe.FORCE_BODY||!1,ht=oe.SANITIZE_DOM!==!1,At=oe.SANITIZE_NAMED_PROPS||!1,nt=oe.KEEP_CONTENT!==!1,kt=oe.IN_PLACE||!1,re=oe.ALLOWED_URI_REGEXP||Mj,gn=oe.NAMESPACE||Gt,Ln=oe.MATHML_TEXT_INTEGRATION_POINTS||Ln,ti=oe.HTML_INTEGRATION_POINTS||ti,ye=oe.CUSTOM_ELEMENT_HANDLING||{},oe.CUSTOM_ELEMENT_HANDLING&&wn(oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&wn(oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ye.allowCustomizedBuiltInElements=oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),rt&&(fe=!1),ot&&(sn=!0),fn&&(se=Fn({},kj),ge=bS(null),fn.html===!0&&(Fn(se,Aj),Fn(ge,Oj)),fn.svg===!0&&(Fn(se,XT),Fn(ge,tR),Fn(ge,CS)),fn.svgFilters===!0&&(Fn(se,JT),Fn(ge,tR),Fn(ge,CS)),fn.mathMl===!0&&(Fn(se,eR),Fn(ge,Nj),Fn(ge,CS))),$o(oe,"ADD_TAGS")||($e.tagCheck=null),$o(oe,"ADD_ATTR")||($e.attributeCheck=null),oe.ADD_TAGS&&(typeof oe.ADD_TAGS=="function"?$e.tagCheck=oe.ADD_TAGS:(se===pe&&(se=Dl(se)),Fn(se,oe.ADD_TAGS,Kt))),oe.ADD_ATTR&&(typeof oe.ADD_ATTR=="function"?$e.attributeCheck=oe.ADD_ATTR:(ge===_e&&(ge=Dl(ge)),Fn(ge,oe.ADD_ATTR,Kt))),oe.ADD_URI_SAFE_ATTR&&Fn(et,oe.ADD_URI_SAFE_ATTR,Kt),oe.FORBID_CONTENTS&&(Un===ar&&(Un=Dl(Un)),Fn(Un,oe.FORBID_CONTENTS,Kt)),oe.ADD_FORBID_CONTENTS&&(Un===ar&&(Un=Dl(Un)),Fn(Un,oe.ADD_FORBID_CONTENTS,Kt)),nt&&(se["#text"]=!0),at&&Fn(se,["html","head","body"]),se.table&&(Fn(se,["tbody"]),delete Pe.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ng('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ng('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=oe.TRUSTED_TYPES_POLICY,R=N.createHTML("")}else N===void 0&&(N=sle(b,i)),N!==null&&typeof R=="string"&&(R=N.createHTML(""));Ja&&Ja(oe),Ir=oe}},Dn=Fn({},[...XT,...JT,...Qse]),Ar=Fn({},[...eR,...Zse]),dr=function(oe){let De=D(oe);(!De||!De.tagName)&&(De={namespaceURI:gn,tagName:"template"});const it=ES(oe.tagName),bn=ES(De.tagName);return xn[oe.namespaceURI]?oe.namespaceURI===Jt?De.namespaceURI===Gt?it==="svg":De.namespaceURI===Bt?it==="svg"&&(bn==="annotation-xml"||Ln[bn]):!!Dn[it]:oe.namespaceURI===Bt?De.namespaceURI===Gt?it==="math":De.namespaceURI===Jt?it==="math"&&ti[bn]:!!Ar[it]:oe.namespaceURI===Gt?De.namespaceURI===Jt&&!ti[bn]||De.namespaceURI===Bt&&!Ln[bn]?!1:!Ar[it]&&(ai[it]||!Dn[it]):!!(Br==="application/xhtml+xml"&&xn[oe.namespaceURI]):!1},yn=function(oe){kg(e.removed,{element:oe});try{D(oe).removeChild(oe)}catch{_(oe)}},qr=function(oe,De){try{kg(e.removed,{attribute:De.getAttributeNode(oe),from:De})}catch{kg(e.removed,{attribute:null,from:De})}if(De.removeAttribute(oe),oe==="is")if(sn||ot)try{yn(De)}catch{}else try{De.setAttribute(oe,"")}catch{}},oi=function(oe){let De=null,it=null;if(mt)oe="<remove></remove>"+oe;else{const vt=ZT(oe,/^[\r\n\t ]+/);it=vt&&vt[0]}Br==="application/xhtml+xml"&&gn===Gt&&(oe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+oe+"</body></html>");const bn=N?N.createHTML(oe):oe;if(gn===Gt)try{De=new S().parseFromString(bn,Br)}catch{}if(!De||!De.documentElement){De=I.createDocument(gn,"template",null);try{De.documentElement.innerHTML=Rn?R:bn}catch{}}const Qt=De.body||De.documentElement;return oe&&it&&Qt.insertBefore(n.createTextNode(it),Qt.childNodes[0]||null),gn===Gt?H.call(De,at?"html":"body")[0]:at?De.documentElement:Qt},te=function(oe){return P.call(oe.ownerDocument||oe,oe,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Fe=function(oe){return oe instanceof g&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof v)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},Ze=function(oe){return typeof u=="function"&&oe instanceof u};function Qe(Xe,oe,De){SS(Xe,it=>{it.call(e,oe,De,Ir)})}const zt=function(oe){let De=null;if(Qe(Z.beforeSanitizeElements,oe,null),Fe(oe))return yn(oe),!0;const it=Kt(oe.nodeName);if(Qe(Z.uponSanitizeElement,oe,{tagName:it,allowedTags:se}),Le&&oe.hasChildNodes()&&!Ze(oe.firstElementChild)&&eo(/<[/\w!]/g,oe.innerHTML)&&eo(/<[/\w!]/g,oe.textContent)||oe.nodeType===Lg.progressingInstruction||Le&&oe.nodeType===Lg.comment&&eo(/<[/\w]/g,oe.data))return yn(oe),!0;if(!($e.tagCheck instanceof Function&&$e.tagCheck(it))&&(!se[it]||Pe[it])){if(!Pe[it]&&jt(it)&&(ye.tagNameCheck instanceof RegExp&&eo(ye.tagNameCheck,it)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(it)))return!1;if(nt&&!Un[it]){const bn=D(oe)||oe.parentNode,Qt=k(oe)||oe.childNodes;if(Qt&&bn){const vt=Qt.length;for(let hr=vt-1;hr>=0;--hr){const si=w(Qt[hr],!0);si.__removalCount=(oe.__removalCount||0)+1,bn.insertBefore(si,O(oe))}}}return yn(oe),!0}return oe instanceof d&&!dr(oe)||(it==="noscript"||it==="noembed"||it==="noframes")&&eo(/<\/no(script|embed|frames)/i,oe.innerHTML)?(yn(oe),!0):(rt&&oe.nodeType===Lg.text&&(De=oe.textContent,SS([X,ne,Y],bn=>{De=Og(De,bn," ")}),oe.textContent!==De&&(kg(e.removed,{element:oe.cloneNode()}),oe.textContent=De)),Qe(Z.afterSanitizeElements,oe,null),!1)},Nt=function(oe,De,it){if(Me[De]||ht&&(De==="id"||De==="name")&&(it in n||it in Fr))return!1;if(!(fe&&!Me[De]&&eo($,De))){if(!(Ie&&eo(K,De))){if(!($e.attributeCheck instanceof Function&&$e.attributeCheck(De,oe))){if(!ge[De]||Me[De]){if(!(jt(oe)&&(ye.tagNameCheck instanceof RegExp&&eo(ye.tagNameCheck,oe)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(oe))&&(ye.attributeNameCheck instanceof RegExp&&eo(ye.attributeNameCheck,De)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(De,oe))||De==="is"&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&eo(ye.tagNameCheck,it)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(it))))return!1}else if(!et[De]){if(!eo(re,Og(it,ee,""))){if(!((De==="src"||De==="xlink:href"||De==="href")&&oe!=="script"&&$se(it,"data:")===0&&Rr[oe])){if(!(we&&!eo(J,Og(it,ee,"")))){if(it)return!1}}}}}}}return!0},jt=function(oe){return oe!=="annotation-xml"&&ZT(oe,ce)},Mt=function(oe){Qe(Z.beforeSanitizeAttributes,oe,null);const{attributes:De}=oe;if(!De||Fe(oe))return;const it={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge,forceKeepAttr:void 0};let bn=De.length;for(;bn--;){const Qt=De[bn],{name:vt,namespaceURI:hr,value:si}=Qt,Mi=Kt(vt),xi=si;let er=vt==="value"?xi:Gse(xi);if(it.attrName=Mi,it.attrValue=er,it.keepAttr=!0,it.forceKeepAttr=void 0,Qe(Z.uponSanitizeAttribute,oe,it),er=it.attrValue,At&&(Mi==="id"||Mi==="name")&&(qr(vt,oe),er=cn+er),Le&&eo(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,er)){qr(vt,oe);continue}if(Mi==="attributename"&&ZT(er,"href")){qr(vt,oe);continue}if(it.forceKeepAttr)continue;if(!it.keepAttr){qr(vt,oe);continue}if(!le&&eo(/\/>/i,er)){qr(vt,oe);continue}rt&&SS([X,ne,Y],Da=>{er=Og(er,Da," ")});const Zi=Kt(oe.nodeName);if(!Nt(Zi,Mi,er)){qr(vt,oe);continue}if(N&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!hr)switch(b.getAttributeType(Zi,Mi)){case"TrustedHTML":{er=N.createHTML(er);break}case"TrustedScriptURL":{er=N.createScriptURL(er);break}}if(er!==xi)try{hr?oe.setAttributeNS(hr,vt,er):oe.setAttribute(vt,er),Fe(oe)?yn(oe):Rj(e.removed)}catch{qr(vt,oe)}}Qe(Z.afterSanitizeAttributes,oe,null)},Kn=function Xe(oe){let De=null;const it=te(oe);for(Qe(Z.beforeSanitizeShadowDOM,oe,null);De=it.nextNode();)Qe(Z.uponSanitizeShadowNode,De,null),zt(De),Mt(De),De.content instanceof s&&Xe(De.content);Qe(Z.afterSanitizeShadowDOM,oe,null)};return e.sanitize=function(Xe){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},De=null,it=null,bn=null,Qt=null;if(Rn=!Xe,Rn&&(Xe="<!-->"),typeof Xe!="string"&&!Ze(Xe))if(typeof Xe.toString=="function"){if(Xe=Xe.toString(),typeof Xe!="string")throw Ng("dirty is not a string, aborting")}else throw Ng("toString is not a function");if(!e.isSupported)return Xe;if(Tt||rn(oe),e.removed=[],typeof Xe=="string"&&(kt=!1),kt){if(Xe.nodeName){const si=Kt(Xe.nodeName);if(!se[si]||Pe[si])throw Ng("root node is forbidden and cannot be sanitized in-place")}}else if(Xe instanceof u)De=oi("<!---->"),it=De.ownerDocument.importNode(Xe,!0),it.nodeType===Lg.element&&it.nodeName==="BODY"||it.nodeName==="HTML"?De=it:De.appendChild(it);else{if(!sn&&!rt&&!at&&Xe.indexOf("<")===-1)return N&&Ft?N.createHTML(Xe):Xe;if(De=oi(Xe),!De)return sn?null:Ft?R:""}De&&mt&&yn(De.firstChild);const vt=te(kt?Xe:De);for(;bn=vt.nextNode();)zt(bn),Mt(bn),bn.content instanceof s&&Kn(bn.content);if(kt)return Xe;if(sn){if(ot)for(Qt=V.call(De.ownerDocument);De.firstChild;)Qt.appendChild(De.firstChild);else Qt=De;return(ge.shadowroot||ge.shadowrootmode)&&(Qt=Q.call(r,Qt,!0)),Qt}let hr=at?De.outerHTML:De.innerHTML;return at&&se["!doctype"]&&De.ownerDocument&&De.ownerDocument.doctype&&De.ownerDocument.doctype.name&&eo(Lj,De.ownerDocument.doctype.name)&&(hr="<!DOCTYPE "+De.ownerDocument.doctype.name+`>
|
|
881
|
+
</div>`,is_customer_reply:!0},{message:$,is_auto_response:!0,current_stage:K}];await GT(600,1e3);const{data:ee}=await k({variables:{inputData:{type:"chat",contact_person_name:_==null?void 0:_.contact_person_name,contact_person_email:_==null?void 0:_.contact_person_email,conversation_activities:J,is_initiated_with_ai:E}}}),ce=ee==null?void 0:ee.createAConversationForPortal;ce!=null&&ce.id&&(n(ce==null?void 0:ce.id),iw("easydesk_chat_widget_conversation_id",ce==null?void 0:ce.id,{expires:30}),t==null||t({contact_person_name:_==null?void 0:_.contact_person_name,contact_person_email:_==null?void 0:_.contact_person_email}))}catch(ne){const{message:Y,response:$}=ne;$i("error",((X=$==null?void 0:$.data)==null?void 0:X.message)||Y,"top-left"),b(!1)}finally{N(!1)}},V=Q=>{const{name:Z,value:X}=Q.target;O(ne=>({...ne,[Z]:X}))},H=L.useMemo(()=>!(_!=null&&_.contact_person_name)||!(_!=null&&_.contact_person_email)||!aw(_==null?void 0:_.contact_person_email)||D,[_,D]);return T.jsxs("div",{className:"ed-space-y-5 ed-px-5 ed-pt-1",children:[v&&!S&&T.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[E?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Rl(i==null?void 0:i.name)}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:E?"Easy AI Bot":i==null?void 0:i.name}),T.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:yu().format("HH:mm")})]}),T.jsx("div",{className:"ed-py-4",children:T.jsx(ep,{})})]})]}),l&&!S&&T.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%] ed-animate-fadeInUp",children:[E?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Rl(i==null?void 0:i.name)}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:E?"Easy AI Bot":i==null?void 0:i.name}),T.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:yu().format("HH:mm")})]}),T.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-text-[13px] ed-rounded-lg ed-mt-2",children:T.jsx("p",{className:"ed-text-border-dark",children:I?Pr.initial.greetingOnline:Pr.initial.greetingOffline})})]})]}),d&&!S&&T.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto ed-animate-fadeInUp",children:T.jsxs("form",{onSubmit:P,className:"ed-p-5 ed-rounded-[20px] ed-bg-white-light ed-space-y-5",children:[T.jsxs("div",{className:"ed-space-y-2",children:[T.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Name ",T.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),T.jsx("input",{type:"text",name:"contact_person_name",required:!0,placeholder:"Enter your name",value:_==null?void 0:_.contact_person_name,onChange:V,disabled:s,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),T.jsxs("div",{className:"ed-space-y-2",children:[T.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Email ",T.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),T.jsx("input",{type:"email",name:"contact_person_email",required:!0,placeholder:"Enter your email",value:_==null?void 0:_.contact_person_email,onChange:V,disabled:s,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),T.jsx("div",{className:"ed-flex ed-justify-end",children:T.jsx(Xh,{title:"Submit",loaderText:"Submitting",fullWidthBtn:!0,disabled:H,loader:D,callBack:P})})]})}),S&&T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[E?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Rl(i==null?void 0:i.name)}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:E?i==null?void 0:i.name:"Eden AI bot"}),T.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:yu().format("HH:mm")})]}),T.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-text-[13px] ed-rounded-lg ed-mt-2",children:T.jsx("p",{className:"ed-text-border-dark",children:I?Pr.initial.greetingOnline:Pr.initial.greetingOffline})})]})]}),T.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto ed-animate-fadeInUp",children:T.jsxs("div",{className:"ed-p-5 ed-rounded-[20px] ed-bg-blue-50 ed-border ed-border-blue-100",style:{borderRadius:"20px",border:"1px solid #e3f2fd",backgroundColor:"#e3f2fd",padding:"20px"},children:[T.jsxs("div",{style:{marginBottom:"20px"},children:[T.jsx("h6",{style:{fontSize:"13px",fontWeight:"600",color:"#3b3b3b",margin:0,padding:0},children:"Name"}),T.jsx("p",{style:{fontSize:"13px",color:"#797979"},children:_==null?void 0:_.contact_person_name})]}),T.jsxs("div",{children:[T.jsx("h6",{style:{fontSize:"13px",fontWeight:"600",color:"#3b3b3b",margin:0,padding:0},children:"Email"}),T.jsx("p",{style:{fontSize:"13px",color:"#797979",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:_==null?void 0:_.contact_person_email})]})]})}),T.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%] ed-animate-fadeIn",children:[E?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Rl(i==null?void 0:i.name)}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:E?i==null?void 0:i.name:"Eden AI bot"}),T.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:yu().format("HH:mm")})]}),T.jsx("div",{className:"ed-py-4",children:T.jsx(ep,{})})]})]})]})]})};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:wj,setPrototypeOf:Tj,isFrozen:zse,getPrototypeOf:Hse,getOwnPropertyDescriptor:Bse}=Object;let{freeze:Ja,seal:hs,create:bS}=Object,{apply:YT,construct:KT}=typeof Reflect<"u"&&Reflect;Ja||(Ja=function(e){return e}),hs||(hs=function(e){return e}),YT||(YT=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];return e.apply(n,i)}),KT||(KT=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new e(...r)});const SS=to(Array.prototype.forEach),qse=to(Array.prototype.lastIndexOf),Rj=to(Array.prototype.pop),kg=to(Array.prototype.push),Wse=to(Array.prototype.splice),ES=to(String.prototype.toLowerCase),QT=to(String.prototype.toString),ZT=to(String.prototype.match),Og=to(String.prototype.replace),$se=to(String.prototype.indexOf),Gse=to(String.prototype.trim),$o=to(Object.prototype.hasOwnProperty),eo=to(RegExp.prototype.test),Ng=Yse(TypeError);function to(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return YT(t,e,r)}}function Yse(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return KT(t,n)}}function Fn(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ES;Tj&&Tj(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const s=n(i);s!==i&&(zse(e)||(e[r]=s),i=s)}t[i]=!0}return t}function Kse(t){for(let e=0;e<t.length;e++)$o(t,e)||(t[e]=null);return t}function Dl(t){const e=bS(null);for(const[n,r]of wj(t))$o(t,n)&&(Array.isArray(r)?e[n]=Kse(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=Dl(r):e[n]=r);return e}function Mg(t,e){for(;t!==null;){const r=Bse(t,e);if(r){if(r.get)return to(r.get);if(typeof r.value=="function")return to(r.value)}t=Hse(t)}function n(){return null}return n}const Aj=Ja(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),XT=Ja(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),JT=Ja(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Qse=Ja(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),eR=Ja(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Zse=Ja(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kj=Ja(["#text"]),Oj=Ja(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),tR=Ja(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Nj=Ja(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),CS=Ja(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Xse=hs(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Jse=hs(/<%[\w\W]*|[\w\W]*%>/gm),ele=hs(/\$\{[\w\W]*/gm),tle=hs(/^data-[\-\w.\u00B7-\uFFFF]+$/),nle=hs(/^aria-[\-\w]+$/),Mj=hs(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rle=hs(/^(?:\w+script|data):/i),ile=hs(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lj=hs(/^html$/i),ale=hs(/^[a-z][.\w]*(-[.\w]+)+$/i);var Dj=Object.freeze({__proto__:null,ARIA_ATTR:nle,ATTR_WHITESPACE:ile,CUSTOM_ELEMENT:ale,DATA_ATTR:tle,DOCTYPE_NAME:Lj,ERB_EXPR:Jse,IS_ALLOWED_URI:Mj,IS_SCRIPT_OR_DATA:rle,MUSTACHE_EXPR:Xse,TMPLIT_EXPR:ele});const Lg={element:1,text:3,progressingInstruction:7,comment:8,document:9},ole=function(){return typeof window>"u"?null:window},sle=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return e.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Pj=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Ij(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ole();const e=Xe=>Ij(Xe);if(e.version="3.3.3",e.removed=[],!t||!t.document||t.document.nodeType!==Lg.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:l,Node:u,Element:d,NodeFilter:h,NamedNodeMap:v=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:g,DOMParser:S,trustedTypes:b}=t,E=d.prototype,w=Mg(E,"cloneNode"),_=Mg(E,"remove"),O=Mg(E,"nextSibling"),k=Mg(E,"childNodes"),D=Mg(E,"parentNode");if(typeof l=="function"){const Xe=n.createElement("template");Xe.content&&Xe.content.ownerDocument&&(n=Xe.content.ownerDocument)}let N,R="";const{implementation:I,createNodeIterator:P,createDocumentFragment:V,getElementsByTagName:H}=n,{importNode:Q}=r;let Z=Pj();e.isSupported=typeof wj=="function"&&typeof D=="function"&&I&&I.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:X,ERB_EXPR:ne,TMPLIT_EXPR:Y,DATA_ATTR:$,ARIA_ATTR:K,IS_SCRIPT_OR_DATA:J,ATTR_WHITESPACE:ee,CUSTOM_ELEMENT:ce}=Dj;let{IS_ALLOWED_URI:re}=Dj,se=null;const pe=Fn({},[...Aj,...XT,...JT,...eR,...kj]);let ge=null;const _e=Fn({},[...Oj,...tR,...Nj,...CS]);let ye=Object.seal(bS(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pe=null,Me=null;const $e=Object.seal(bS(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ie=!0,fe=!0,we=!1,le=!0,rt=!1,Le=!0,at=!1,Tt=!1,mt=!1,sn=!1,ot=!1,Ft=!1,ht=!0,At=!1;const cn="user-content-";let nt=!0,kt=!1,fn={},Un=null;const ar=Fn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Rr=null;const Je=Fn({},["audio","video","img","source","image","track"]);let et=null;const ft=Fn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Bt="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",Gt="http://www.w3.org/1999/xhtml";let gn=Gt,Rn=!1,xn=null;const Gn=Fn({},[Bt,Jt,Gt],QT);let Ln=Fn({},["mi","mo","mn","ms","mtext"]),ti=Fn({},["annotation-xml"]);const ai=Fn({},["title","style","font","a","script"]);let Br=null;const Zr=["application/xhtml+xml","text/html"],Mr="text/html";let Kt=null,Ir=null;const Fr=n.createElement("form"),wn=function(oe){return oe instanceof RegExp||oe instanceof Function},rn=function(){let oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ir&&Ir===oe)){if((!oe||typeof oe!="object")&&(oe={}),oe=Dl(oe),Br=Zr.indexOf(oe.PARSER_MEDIA_TYPE)===-1?Mr:oe.PARSER_MEDIA_TYPE,Kt=Br==="application/xhtml+xml"?QT:ES,se=$o(oe,"ALLOWED_TAGS")?Fn({},oe.ALLOWED_TAGS,Kt):pe,ge=$o(oe,"ALLOWED_ATTR")?Fn({},oe.ALLOWED_ATTR,Kt):_e,xn=$o(oe,"ALLOWED_NAMESPACES")?Fn({},oe.ALLOWED_NAMESPACES,QT):Gn,et=$o(oe,"ADD_URI_SAFE_ATTR")?Fn(Dl(ft),oe.ADD_URI_SAFE_ATTR,Kt):ft,Rr=$o(oe,"ADD_DATA_URI_TAGS")?Fn(Dl(Je),oe.ADD_DATA_URI_TAGS,Kt):Je,Un=$o(oe,"FORBID_CONTENTS")?Fn({},oe.FORBID_CONTENTS,Kt):ar,Pe=$o(oe,"FORBID_TAGS")?Fn({},oe.FORBID_TAGS,Kt):Dl({}),Me=$o(oe,"FORBID_ATTR")?Fn({},oe.FORBID_ATTR,Kt):Dl({}),fn=$o(oe,"USE_PROFILES")?oe.USE_PROFILES:!1,Ie=oe.ALLOW_ARIA_ATTR!==!1,fe=oe.ALLOW_DATA_ATTR!==!1,we=oe.ALLOW_UNKNOWN_PROTOCOLS||!1,le=oe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,rt=oe.SAFE_FOR_TEMPLATES||!1,Le=oe.SAFE_FOR_XML!==!1,at=oe.WHOLE_DOCUMENT||!1,sn=oe.RETURN_DOM||!1,ot=oe.RETURN_DOM_FRAGMENT||!1,Ft=oe.RETURN_TRUSTED_TYPE||!1,mt=oe.FORCE_BODY||!1,ht=oe.SANITIZE_DOM!==!1,At=oe.SANITIZE_NAMED_PROPS||!1,nt=oe.KEEP_CONTENT!==!1,kt=oe.IN_PLACE||!1,re=oe.ALLOWED_URI_REGEXP||Mj,gn=oe.NAMESPACE||Gt,Ln=oe.MATHML_TEXT_INTEGRATION_POINTS||Ln,ti=oe.HTML_INTEGRATION_POINTS||ti,ye=oe.CUSTOM_ELEMENT_HANDLING||{},oe.CUSTOM_ELEMENT_HANDLING&&wn(oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=oe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&wn(oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=oe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),oe.CUSTOM_ELEMENT_HANDLING&&typeof oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ye.allowCustomizedBuiltInElements=oe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),rt&&(fe=!1),ot&&(sn=!0),fn&&(se=Fn({},kj),ge=bS(null),fn.html===!0&&(Fn(se,Aj),Fn(ge,Oj)),fn.svg===!0&&(Fn(se,XT),Fn(ge,tR),Fn(ge,CS)),fn.svgFilters===!0&&(Fn(se,JT),Fn(ge,tR),Fn(ge,CS)),fn.mathMl===!0&&(Fn(se,eR),Fn(ge,Nj),Fn(ge,CS))),$o(oe,"ADD_TAGS")||($e.tagCheck=null),$o(oe,"ADD_ATTR")||($e.attributeCheck=null),oe.ADD_TAGS&&(typeof oe.ADD_TAGS=="function"?$e.tagCheck=oe.ADD_TAGS:(se===pe&&(se=Dl(se)),Fn(se,oe.ADD_TAGS,Kt))),oe.ADD_ATTR&&(typeof oe.ADD_ATTR=="function"?$e.attributeCheck=oe.ADD_ATTR:(ge===_e&&(ge=Dl(ge)),Fn(ge,oe.ADD_ATTR,Kt))),oe.ADD_URI_SAFE_ATTR&&Fn(et,oe.ADD_URI_SAFE_ATTR,Kt),oe.FORBID_CONTENTS&&(Un===ar&&(Un=Dl(Un)),Fn(Un,oe.FORBID_CONTENTS,Kt)),oe.ADD_FORBID_CONTENTS&&(Un===ar&&(Un=Dl(Un)),Fn(Un,oe.ADD_FORBID_CONTENTS,Kt)),nt&&(se["#text"]=!0),at&&Fn(se,["html","head","body"]),se.table&&(Fn(se,["tbody"]),delete Pe.tbody),oe.TRUSTED_TYPES_POLICY){if(typeof oe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ng('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof oe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ng('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');N=oe.TRUSTED_TYPES_POLICY,R=N.createHTML("")}else N===void 0&&(N=sle(b,i)),N!==null&&typeof R=="string"&&(R=N.createHTML(""));Ja&&Ja(oe),Ir=oe}},Dn=Fn({},[...XT,...JT,...Qse]),Ar=Fn({},[...eR,...Zse]),dr=function(oe){let De=D(oe);(!De||!De.tagName)&&(De={namespaceURI:gn,tagName:"template"});const it=ES(oe.tagName),bn=ES(De.tagName);return xn[oe.namespaceURI]?oe.namespaceURI===Jt?De.namespaceURI===Gt?it==="svg":De.namespaceURI===Bt?it==="svg"&&(bn==="annotation-xml"||Ln[bn]):!!Dn[it]:oe.namespaceURI===Bt?De.namespaceURI===Gt?it==="math":De.namespaceURI===Jt?it==="math"&&ti[bn]:!!Ar[it]:oe.namespaceURI===Gt?De.namespaceURI===Jt&&!ti[bn]||De.namespaceURI===Bt&&!Ln[bn]?!1:!Ar[it]&&(ai[it]||!Dn[it]):!!(Br==="application/xhtml+xml"&&xn[oe.namespaceURI]):!1},yn=function(oe){kg(e.removed,{element:oe});try{D(oe).removeChild(oe)}catch{_(oe)}},qr=function(oe,De){try{kg(e.removed,{attribute:De.getAttributeNode(oe),from:De})}catch{kg(e.removed,{attribute:null,from:De})}if(De.removeAttribute(oe),oe==="is")if(sn||ot)try{yn(De)}catch{}else try{De.setAttribute(oe,"")}catch{}},oi=function(oe){let De=null,it=null;if(mt)oe="<remove></remove>"+oe;else{const vt=ZT(oe,/^[\r\n\t ]+/);it=vt&&vt[0]}Br==="application/xhtml+xml"&&gn===Gt&&(oe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+oe+"</body></html>");const bn=N?N.createHTML(oe):oe;if(gn===Gt)try{De=new S().parseFromString(bn,Br)}catch{}if(!De||!De.documentElement){De=I.createDocument(gn,"template",null);try{De.documentElement.innerHTML=Rn?R:bn}catch{}}const Qt=De.body||De.documentElement;return oe&&it&&Qt.insertBefore(n.createTextNode(it),Qt.childNodes[0]||null),gn===Gt?H.call(De,at?"html":"body")[0]:at?De.documentElement:Qt},te=function(oe){return P.call(oe.ownerDocument||oe,oe,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},Fe=function(oe){return oe instanceof g&&(typeof oe.nodeName!="string"||typeof oe.textContent!="string"||typeof oe.removeChild!="function"||!(oe.attributes instanceof v)||typeof oe.removeAttribute!="function"||typeof oe.setAttribute!="function"||typeof oe.namespaceURI!="string"||typeof oe.insertBefore!="function"||typeof oe.hasChildNodes!="function")},Ze=function(oe){return typeof u=="function"&&oe instanceof u};function Qe(Xe,oe,De){SS(Xe,it=>{it.call(e,oe,De,Ir)})}const zt=function(oe){let De=null;if(Qe(Z.beforeSanitizeElements,oe,null),Fe(oe))return yn(oe),!0;const it=Kt(oe.nodeName);if(Qe(Z.uponSanitizeElement,oe,{tagName:it,allowedTags:se}),Le&&oe.hasChildNodes()&&!Ze(oe.firstElementChild)&&eo(/<[/\w!]/g,oe.innerHTML)&&eo(/<[/\w!]/g,oe.textContent)||oe.nodeType===Lg.progressingInstruction||Le&&oe.nodeType===Lg.comment&&eo(/<[/\w]/g,oe.data))return yn(oe),!0;if(!($e.tagCheck instanceof Function&&$e.tagCheck(it))&&(!se[it]||Pe[it])){if(!Pe[it]&&jt(it)&&(ye.tagNameCheck instanceof RegExp&&eo(ye.tagNameCheck,it)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(it)))return!1;if(nt&&!Un[it]){const bn=D(oe)||oe.parentNode,Qt=k(oe)||oe.childNodes;if(Qt&&bn){const vt=Qt.length;for(let hr=vt-1;hr>=0;--hr){const si=w(Qt[hr],!0);si.__removalCount=(oe.__removalCount||0)+1,bn.insertBefore(si,O(oe))}}}return yn(oe),!0}return oe instanceof d&&!dr(oe)||(it==="noscript"||it==="noembed"||it==="noframes")&&eo(/<\/no(script|embed|frames)/i,oe.innerHTML)?(yn(oe),!0):(rt&&oe.nodeType===Lg.text&&(De=oe.textContent,SS([X,ne,Y],bn=>{De=Og(De,bn," ")}),oe.textContent!==De&&(kg(e.removed,{element:oe.cloneNode()}),oe.textContent=De)),Qe(Z.afterSanitizeElements,oe,null),!1)},Nt=function(oe,De,it){if(Me[De]||ht&&(De==="id"||De==="name")&&(it in n||it in Fr))return!1;if(!(fe&&!Me[De]&&eo($,De))){if(!(Ie&&eo(K,De))){if(!($e.attributeCheck instanceof Function&&$e.attributeCheck(De,oe))){if(!ge[De]||Me[De]){if(!(jt(oe)&&(ye.tagNameCheck instanceof RegExp&&eo(ye.tagNameCheck,oe)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(oe))&&(ye.attributeNameCheck instanceof RegExp&&eo(ye.attributeNameCheck,De)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(De,oe))||De==="is"&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&eo(ye.tagNameCheck,it)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(it))))return!1}else if(!et[De]){if(!eo(re,Og(it,ee,""))){if(!((De==="src"||De==="xlink:href"||De==="href")&&oe!=="script"&&$se(it,"data:")===0&&Rr[oe])){if(!(we&&!eo(J,Og(it,ee,"")))){if(it)return!1}}}}}}}return!0},jt=function(oe){return oe!=="annotation-xml"&&ZT(oe,ce)},Mt=function(oe){Qe(Z.beforeSanitizeAttributes,oe,null);const{attributes:De}=oe;if(!De||Fe(oe))return;const it={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge,forceKeepAttr:void 0};let bn=De.length;for(;bn--;){const Qt=De[bn],{name:vt,namespaceURI:hr,value:si}=Qt,Mi=Kt(vt),xi=si;let er=vt==="value"?xi:Gse(xi);if(it.attrName=Mi,it.attrValue=er,it.keepAttr=!0,it.forceKeepAttr=void 0,Qe(Z.uponSanitizeAttribute,oe,it),er=it.attrValue,At&&(Mi==="id"||Mi==="name")&&(qr(vt,oe),er=cn+er),Le&&eo(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,er)){qr(vt,oe);continue}if(Mi==="attributename"&&ZT(er,"href")){qr(vt,oe);continue}if(it.forceKeepAttr)continue;if(!it.keepAttr){qr(vt,oe);continue}if(!le&&eo(/\/>/i,er)){qr(vt,oe);continue}rt&&SS([X,ne,Y],Da=>{er=Og(er,Da," ")});const Zi=Kt(oe.nodeName);if(!Nt(Zi,Mi,er)){qr(vt,oe);continue}if(N&&typeof b=="object"&&typeof b.getAttributeType=="function"&&!hr)switch(b.getAttributeType(Zi,Mi)){case"TrustedHTML":{er=N.createHTML(er);break}case"TrustedScriptURL":{er=N.createScriptURL(er);break}}if(er!==xi)try{hr?oe.setAttributeNS(hr,vt,er):oe.setAttribute(vt,er),Fe(oe)?yn(oe):Rj(e.removed)}catch{qr(vt,oe)}}Qe(Z.afterSanitizeAttributes,oe,null)},Kn=function Xe(oe){let De=null;const it=te(oe);for(Qe(Z.beforeSanitizeShadowDOM,oe,null);De=it.nextNode();)Qe(Z.uponSanitizeShadowNode,De,null),zt(De),Mt(De),De.content instanceof s&&Xe(De.content);Qe(Z.afterSanitizeShadowDOM,oe,null)};return e.sanitize=function(Xe){let oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},De=null,it=null,bn=null,Qt=null;if(Rn=!Xe,Rn&&(Xe="<!-->"),typeof Xe!="string"&&!Ze(Xe))if(typeof Xe.toString=="function"){if(Xe=Xe.toString(),typeof Xe!="string")throw Ng("dirty is not a string, aborting")}else throw Ng("toString is not a function");if(!e.isSupported)return Xe;if(Tt||rn(oe),e.removed=[],typeof Xe=="string"&&(kt=!1),kt){if(Xe.nodeName){const si=Kt(Xe.nodeName);if(!se[si]||Pe[si])throw Ng("root node is forbidden and cannot be sanitized in-place")}}else if(Xe instanceof u)De=oi("<!---->"),it=De.ownerDocument.importNode(Xe,!0),it.nodeType===Lg.element&&it.nodeName==="BODY"||it.nodeName==="HTML"?De=it:De.appendChild(it);else{if(!sn&&!rt&&!at&&Xe.indexOf("<")===-1)return N&&Ft?N.createHTML(Xe):Xe;if(De=oi(Xe),!De)return sn?null:Ft?R:""}De&&mt&&yn(De.firstChild);const vt=te(kt?Xe:De);for(;bn=vt.nextNode();)zt(bn),Mt(bn),bn.content instanceof s&&Kn(bn.content);if(kt)return Xe;if(sn){if(ot)for(Qt=V.call(De.ownerDocument);De.firstChild;)Qt.appendChild(De.firstChild);else Qt=De;return(ge.shadowroot||ge.shadowrootmode)&&(Qt=Q.call(r,Qt,!0)),Qt}let hr=at?De.outerHTML:De.innerHTML;return at&&se["!doctype"]&&De.ownerDocument&&De.ownerDocument.doctype&&De.ownerDocument.doctype.name&&eo(Lj,De.ownerDocument.doctype.name)&&(hr="<!DOCTYPE "+De.ownerDocument.doctype.name+`>
|
|
882
882
|
`+hr),rt&&SS([X,ne,Y],si=>{hr=Og(hr,si," ")}),N&&Ft?N.createHTML(hr):hr},e.setConfig=function(){let Xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};rn(Xe),Tt=!0},e.clearConfig=function(){Ir=null,Tt=!1},e.isValidAttribute=function(Xe,oe,De){Ir||rn({});const it=Kt(Xe),bn=Kt(oe);return Nt(it,bn,De)},e.addHook=function(Xe,oe){typeof oe=="function"&&kg(Z[Xe],oe)},e.removeHook=function(Xe,oe){if(oe!==void 0){const De=qse(Z[Xe],oe);return De===-1?void 0:Wse(Z[Xe],De,1)[0]}return Rj(Z[Xe])},e.removeHooks=function(Xe){Z[Xe]=[]},e.removeAllHooks=function(){Z=Pj()},e}var Fj=Ij();const lle=({previewImageInfo:t,setPreviewImageInfo:e,isPrivate:n=!1})=>{const[r,i]=L.useState(1),s=L.useRef(null),l=()=>{e(ow),i(1)};L.useEffect(()=>{const w=_=>{_.key==="Escape"&&l()};return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[]);const{fileName:u,isOpen:d,loading:h,error:v,url:g,height:S,width:b}=t||{},E=L.useMemo(()=>g==null?void 0:g.split("?")[0].split("/").pop(),[g]);return T.jsx("div",{children:d&&T.jsxs("div",{className:"ed-overflow-hidden",children:[T.jsx("div",{className:"ed-h-full ed-w-full ed-z-[1000] ed-fixed ed-bg-black/80 ed-inset-0"}),T.jsxs("div",{className:"ed-size-full ed-flex items-center ed-w-full ed-h-full ed-justify-center ed-overflow-hidden ed-fixed ed-top-9 ed-left-0 ed-z-[1100]",children:[h?T.jsx(ep,{}):!v&&g&&T.jsx("div",{ref:s,style:{transform:`scale(${r})`,transformOrigin:"center center",transition:"transform 0.2s ease-out"},children:T.jsx(zo,{alt:"Feedback attachment",className:"ed-max-w-[90vw] ed-max-h-[90vh] ed-object-contain ed-select-none",height:S,src:g,width:b,isPrivate:n})}),v&&T.jsx("p",{className:"ed-text-14 ed-font-semibold ed-text-red",children:v})]}),T.jsxs("div",{className:"ed-fixed ed-z-[1100] ed-top-5 ed-right-16 ed-flex ed-items-center ed-gap-3",children:[T.jsx("a",{href:`${g}&dl=${u||E}`,className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors ed-bg-black/50 ed-rounded-lg ed-p-2",title:"Download",children:T.jsx(T2,{className:"ed-size-4",strokeWidth:"2"})}),T.jsx("button",{type:"button",className:"ed-fixed ed-z-[1100] ed-top-5 ed-right-5 ed-text-white ed-hover:text-gray-300 ed-transition-colors ed-bg-black/50 ed-rounded-lg ed-p-2",onClick:l,title:"Close (Esc)",children:T.jsx(kl,{className:"ed-size-4",strokeWidth:"2"})})]}),!h&&!v&&T.jsx("div",{className:"ed-fixed ed-z-[1100] ed-bottom-5 ed-left-1/2 ed-transform -ed-translate-x-1/2",children:T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-bg-black/70 ed-rounded-lg ed-p-3",children:[T.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(w=>Math.max(w/1.5,.5)),disabled:r<=.5,title:"Zoom Out",children:T.jsx(r6,{className:"ed-size-5",strokeWidth:"2"})}),T.jsxs("span",{className:"ed-text-white ed-text-sm ed-min-w-[3rem] ed-text-center ed-font-medium",children:[Math.round(r*100),"%"]}),T.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(w=>Math.min(w*1.5,5)),disabled:r>=5,title:"Zoom In",children:T.jsx(t6,{className:"ed-size-5",strokeWidth:"2"})}),T.jsx("div",{className:"ed-w-px ed-h-5 ed-bg-white/30 ed-mx-1"}),T.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(1),title:"Reset",children:T.jsx(I2,{className:"ed-size-5",strokeWidth:"2"})})]})})]})})},ule=({filesData:t=[]})=>{var S;const[e,n]=L.useState(!1),[r,i]=L.useState(ow),s=t==null?void 0:t.filter(b=>/\.(jpg|jpeg|png|gif|webp)$/i.test(b.name)),l=t==null?void 0:t.filter(b=>!/\.(jpg|jpeg|png|gif|webp)$/i.test(b.name)),u=()=>n(!0),d=e?s:s==null?void 0:s.slice(0,2),h=wt.size(s)-2,v=b=>{try{const E=`${cG()}?id=${b}&download=true`;E&&window.open(E,"_blank")}catch(E){console.error(E)}},g=async b=>{i(E=>({...E,loading:!0}));try{const E=await iN({fit:"scale",isPrivate:!1,needActualSize:!0,path:b==null?void 0:b.key,quality:100});if(E){const w=await hG(E);i(_=>({..._,isOpen:!0,url:E,fileName:b==null?void 0:b.title,image:E,loading:!1,height:w==null?void 0:w.height,width:w==null?void 0:w.width}))}}catch{i({...ow,error:"Failed to load image"})}};return T.jsxs("div",{className:"ed-flex ed-flex-col ed-gap-3",children:[wt.size(s)>0&&T.jsxs("div",{className:"ed-grid ed-grid-cols-2 ed-gap-2.5",children:[d.map(b=>T.jsx("div",{onClick:()=>g(b),role:"button",tabIndex:0,children:T.jsx(zo,{path:b.key,className:"ed-w-full ed-rounded",defaultImageClasses:"ed-w-full ed-h-20 !ed-rounded"})},b==null?void 0:b.id)),!e&&h>0&&T.jsxs("div",{role:"button",tabIndex:0,className:"ed-relative cursor-pointer",onClick:u,children:[T.jsx(zo,{path:(S=s[2])==null?void 0:S.key,className:"ed-w-full ed-rounded",defaultImageClasses:"ed-w-full ed-h-20 !ed-rounded"}),T.jsx("div",{className:"ed-w-full ed-h-full ed-bg-black/15 ed-absolute ed-top-0 ed-left-0 ed-rounded",children:T.jsx("div",{className:"ed-bg-white ed-h-8 ed-w-8 ed-flex ed-items-center ed-justify-center ed-rounded-full ed-absolute ed-top-1/2 ed-left-1/2 ed--translate-x-1/2 ed--translate-y-1/2",children:T.jsxs("span",{className:"ed-text-12 ed-text-border-dark ed-font-semibold",children:["+",h]})})})]})]}),wt.size(l)>0&&T.jsx("div",{className:"ed-flex ed-flex-col ed-gap-2.5",children:l.map(b=>T.jsxs("div",{className:"ed-p-2.5 ed-bg-white-light ed-rounded-lg ed-flex ed-items-center ed-gap-2 ed-justify-between",children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("div",{className:"ed-flex-shrink-0",children:T.jsx(xee,{})}),T.jsx("p",{title:b.title,className:"ed-text-12 ed-font-semibold ed-text-border-dark",children:sw(b.title,20)})]}),T.jsx("button",{className:"ed-flex-shrink-0",type:"button",onClick:()=>v(b==null?void 0:b.id),children:T.jsx(A2,{className:"ed-text-brand-link ed-size-5"})})]},b==null?void 0:b.id))}),(r==null?void 0:r.isOpen)&&T.jsx(lle,{previewImageInfo:r,setPreviewImageInfo:i})]})},nR=({context:t,emails:e})=>T.jsxs("div",{className:"ed-flex ed-items-start ed-gap-2 ",children:[T.jsxs("p",{className:"ed-text-dark",children:[t,":"]}),T.jsx("div",{className:"ed-flex ed-flex-wrap ed-gap-1",children:e.slice(0,3).map((n,r)=>T.jsxs("p",{className:"ed-text-regular ed-flex ed-items-center ed-gap-2",children:[sw(n,30),r===2&&wt.size(e)-3>0?T.jsx(zT,{classNames:{body:"ed-text-regular"},zIndex:99999999,placement:"top",title:e.join(", "),children:T.jsxs("span",{className:"ed-text-brand ed-cursor-pointer",children:["+",wt.size(e)-3," more"]})}):""]},n))})]});var _S={exports:{}},cle=_S.exports,jj;function fle(){return jj||(jj=1,(function(t,e){(function(n,r){t.exports=r()})(cle,(function(){return function(n,r,i){n=n||{};var s=r.prototype,l={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function u(h,v,g,S){return s.fromToBase(h,v,g,S)}i.en.relativeTime=l,s.fromToBase=function(h,v,g,S,b){for(var E,w,_,O=g.$locale().relativeTime||l,k=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],D=k.length,N=0;N<D;N+=1){var R=k[N];R.d&&(E=S?i(h).diff(g,R.d,!0):g.diff(h,R.d,!0));var I=(n.rounding||Math.round)(Math.abs(E));if(_=E>0,I<=R.r||!R.r){I<=1&&N>0&&(R=k[N-1]);var P=O[R.l];b&&(I=b(""+I)),w=typeof P=="string"?P.replace("%d",I):P(I,v,R.l,_);break}}if(v)return w;var V=_?O.future:O.past;return typeof V=="function"?V(w):V.replace("%s",w)},s.to=function(h,v){return u(h,v,this,!0)},s.from=function(h,v){return u(h,v,this)};var d=function(h){return h.$u?i.utc():i()};s.toNow=function(h){return this.to(d(this),h)},s.fromNow=function(h){return this.from(d(this),h)}}}))})(_S)),_S.exports}var dle=fle();const hle=lu(dle);yu.extend(hle);const ple=async(t,e)=>{const{policy:n,file:r}=t||{};return(await S6(n,r)).success?{name:t==null?void 0:t.name,title:r==null?void 0:r.name,size:r==null?void 0:r.size,sub_type:e,type:"conversation_activity_attachment"}:{}},mle=async(t,e)=>{var r;const n=[];try{const i=[];for(let s=0;s<t.length;s+=1)(r=t[s])!=null&&r.id||i.push(ple(t[s],e));n.push(...await Promise.all(i))}catch(i){console.error("Error occurred during file upload:",i),$i("error","File upload fails","top-left")}return n};function vle(t){if(!t)return"";const e=yu(t),n=yu();return e.isValid()?n.diff(e,"minute")<1?"Just now":e.fromNow():""}const gle={open:{label:"Open",className:"ed-bg-[#DDF2FF] ed-text-[#1173C8] ed-border ed-border-[#A4D1F1] ed-rounded-full"},resolved:{label:"Resolved",className:"ed-bg-[#DBF8E2] ed-text-[#0E9342] ed-border ed-border-[#96D4AB] ed-rounded-full"}},yle=t=>{if(!t)return"";if(typeof window>"u")return t;const e=Fj.sanitize(t,{FORBID_TAGS:["script"],FORBID_ATTR:["style","class"]}),n=document.createElement("div");return n.innerHTML=e,n.textContent||n.innerText||""},ble=(t=[],e=!1)=>{const n=[],r=[],i=[];return wt.forEach(t,s=>{(s==null?void 0:s.type)==="to_email"&&(e?!(s!=null&&s.is_channel)&&!n.includes(s==null?void 0:s.email)&&n.push(s==null?void 0:s.email):n.push(s==null?void 0:s.email)),(s==null?void 0:s.type)==="cc_email"&&(e?wt.some(r,{person_email:s==null?void 0:s.email})||r.push({person_email:s==null?void 0:s.email}):r.push(s==null?void 0:s.email)),(s==null?void 0:s.type)==="bcc_email"&&i.push(s==null?void 0:s.email)}),{toEmails:n,ccEmails:r,bccEmails:i}},Sle="hh:mm A",Vj=({activityMessage:t={},brand:e={},isReplying:n=!1})=>{const{id:r,analytics:i,emails:s=[],user:l,files:u,message:d,is_customer_reply:h,is_auto_response:v,is_ai_response:g,created_at:S}=t||{},[b,E]=L.useState(!1),w=()=>{E(!b)},{toEmails:_,ccEmails:O,bccEmails:k}=ble(s),D=L.useMemo(()=>g||v?"Eden AI bot":l!=null&&l.id?_0(l==null?void 0:l.first_name,l==null?void 0:l.last_name,l==null?void 0:l.email):(e==null?void 0:e.name)||"",[l==null?void 0:l.id,g,v]),N=L.useMemo(()=>l!=null&&l.id?{...(l==null?void 0:l.avatar_file)||{},default_image_name:Rl(l==null?void 0:l.first_name,l==null?void 0:l.last_name,l==null?void 0:l.email)}:{key:e==null?void 0:e.logo_icon_key,default_image_name:Rl(e==null?void 0:e.name)},[l==null?void 0:l.id]),R=L.useMemo(()=>n||!d?"":Fj.sanitize(d,{ADD_ATTR:["class","className","style"],ADD_TAGS:["div","h6","p","span"]}),[d,n]),I=!n&&Jv(R),P=Array.isArray(I)||L.isValidElement(I),V=P?"div":"p",H=L.useMemo(()=>P?(Array.isArray(I)?I:[I]).some(ne=>{var Y,$;return($=(Y=ne==null?void 0:ne.props)==null?void 0:Y.className)==null?void 0:$.includes("form-response")}):!1,[I,P]),Q=()=>I?T.jsxs("div",{className:`ed-p-2.5 ${h?"ed-bg-blue-light":"ed-bg-white-light"} ${H?"ed-p-0 ed-bg-white":""} ed-rounded-lg ed-mt-2 ed-text-[13px]`,children:[T.jsxs(V,{className:`ed-text-border-dark ${H||P?"":"ed-whitespace-pre-line ed-break-words"}`,children:[wt.size(s)>0&&T.jsxs("div",{className:"ed-border-b ed-pb-2",children:[T.jsxs("button",{type:"button",onClick:w,className:"ed-flex ed-gap-1 ed-text-regular ed-items-center",children:[T.jsx("span",{children:b?T.jsx(X0,{className:"ed-size-4"}):T.jsx(Bh,{className:"ed-size-4"})})," ",T.jsxs("span",{children:[b?"Hide":"View"," recipient"]})]}),b&&T.jsxs("div",{className:"ed-flex ed-flex-col ed-gap-2 ed-mt-2",children:[wt.size(_)>0&&T.jsx(nR,{context:"To",emails:_}),wt.size(O)>0&&T.jsx(nR,{context:"CC",emails:O}),wt.size(k)>0&&T.jsx(nR,{context:"BCC",emails:k})]})]}),T.jsx("div",{className:"ed-mt-2 ed-text-dark",children:I})]}),T.jsx(ule,{filesData:u})]}):null,Z=i==null?void 0:i.some(X=>(X==null?void 0:X.status)!=="seen");return h?T.jsx("div",{className:"ed-max-w-[85%] ed-w-max ed-ml-auto",children:T.jsx(Q,{})}):T.jsxs("div",{...Z&&{"data-message-id":r},className:"ed-message ed-flex ed-gap-4 ed-my-4 ed-max-w-[85%] ed-w-max",children:[T.jsx("div",{className:"ed-size-7 ed-flex-shrink-0",children:g||v?T.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:T.jsx(rg,{})}):T.jsx(zo,{className:"ed-size-7 ed-object-cover ed-rounded-full",alt:D,defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:N==null?void 0:N.key,defaultImageName:N==null?void 0:N.default_image_name})}),T.jsxs("div",{children:[T.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[T.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:D}),T.jsx("span",{className:"ed-text-border ed-text-[13px] ed-font-medium",children:yu(S).format(Sle)})]}),n?T.jsx("div",{className:"ed-py-4",children:T.jsx(ep,{})}):T.jsx(Q,{})]})]})},xS={recommend_from_knowledge_base:`<div>
|
|
883
883
|
<div style="font-size: 14px; line-height: 1.6;">
|
|
884
884
|
{{ai_summary}}
|
package/npm/ed-widget.js
CHANGED
|
@@ -677,7 +677,7 @@ If anything else comes up, I'm just one message away. 👋`,channelConnecting:"P
|
|
|
677
677
|
title="${y==null?void 0:y.contact_person_email}"
|
|
678
678
|
>${y==null?void 0:y.contact_person_email}</p>
|
|
679
679
|
</div>
|
|
680
|
-
</div>`,is_customer_reply:!0},{message:F,is_auto_response:!0,current_stage:D}];await X0(600,1e3);const{data:z}=await _({variables:{inputData:{type:"chat",contact_person_name:y==null?void 0:y.contact_person_name,contact_person_email:y==null?void 0:y.contact_person_email,conversation_activities:G,is_initiated_with_ai:v}}}),J=z==null?void 0:z.createAConversationForPortal;J!=null&&J.id&&(n(J==null?void 0:J.id),cm("easydesk_chat_widget_conversation_id",J==null?void 0:J.id,{expires:30}),t==null||t({contact_person_name:y==null?void 0:y.contact_person_name,contact_person_email:y==null?void 0:y.contact_person_email}))}catch(Q){const{message:j,response:F}=Q;Rn("error",((H=F==null?void 0:F.data)==null?void 0:H.message)||j,"top-left"),p(!1)}finally{C(!1)}},N=V=>{const{name:U,value:H}=V.target;w(Q=>({...Q,[U]:H}))},P=R.useMemo(()=>!(y!=null&&y.contact_person_name)||!(y!=null&&y.contact_person_email)||!um(y==null?void 0:y.contact_person_email)||A,[y,A]);return E.jsxs("div",{className:"ed-space-y-5 ed-px-5 ed-pt-1",children:[d&&!m&&E.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[T?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Ni(i==null?void 0:i.name)}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:T?"Easy AI Bot":i==null?void 0:i.name}),E.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:no().format("HH:mm")})]}),E.jsx("div",{className:"ed-py-4",children:E.jsx(As,{})})]})]}),a&&!m&&E.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%] ed-animate-fadeInUp",children:[T?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Ni(i==null?void 0:i.name)}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:T?"Easy AI Bot":i==null?void 0:i.name}),E.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:no().format("HH:mm")})]}),E.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-text-[13px] ed-rounded-lg ed-mt-2",children:E.jsx("p",{className:"ed-text-border-dark",children:T?Ut.initial.greetingOnline:Ut.initial.greetingOffline})})]})]}),c&&!m&&E.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto ed-animate-fadeInUp",children:E.jsxs("form",{onSubmit:k,className:"ed-p-5 ed-rounded-[20px] ed-bg-white-light ed-space-y-5",children:[E.jsxs("div",{className:"ed-space-y-2",children:[E.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Name ",E.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),E.jsx("input",{type:"text",name:"contact_person_name",required:!0,placeholder:"Enter your name",value:y==null?void 0:y.contact_person_name,onChange:N,disabled:o,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),E.jsxs("div",{className:"ed-space-y-2",children:[E.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Email ",E.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),E.jsx("input",{type:"email",name:"contact_person_email",required:!0,placeholder:"Enter your email",value:y==null?void 0:y.contact_person_email,onChange:N,disabled:o,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),E.jsx("div",{className:"ed-flex ed-justify-end",children:E.jsx(Cs,{title:"Submit",loaderText:"Submitting",fullWidthBtn:!0,disabled:P,loader:A,callBack:k})})]})}),m&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[T?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Ni(i==null?void 0:i.name)}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:T?i==null?void 0:i.name:"Eden AI bot"}),E.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:no().format("HH:mm")})]}),E.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-text-[13px] ed-rounded-lg ed-mt-2",children:E.jsx("p",{className:"ed-text-border-dark",children:T?Ut.initial.greetingOnline:Ut.initial.greetingOffline})})]})]}),E.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto ed-animate-fadeInUp",children:E.jsxs("div",{className:"ed-p-5 ed-rounded-[20px] ed-bg-blue-50 ed-border ed-border-blue-100",style:{borderRadius:"20px",border:"1px solid #e3f2fd",backgroundColor:"#e3f2fd",padding:"20px"},children:[E.jsxs("div",{style:{marginBottom:"20px"},children:[E.jsx("h6",{style:{fontSize:"13px",fontWeight:"600",color:"#3b3b3b",margin:0,padding:0},children:"Name"}),E.jsx("p",{style:{fontSize:"13px",color:"#797979"},children:y==null?void 0:y.contact_person_name})]}),E.jsxs("div",{children:[E.jsx("h6",{style:{fontSize:"13px",fontWeight:"600",color:"#3b3b3b",margin:0,padding:0},children:"Email"}),E.jsx("p",{style:{fontSize:"13px",color:"#797979",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:y==null?void 0:y.contact_person_email})]})]})}),E.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%] ed-animate-fadeIn",children:[T?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Ni(i==null?void 0:i.name)}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:T?i==null?void 0:i.name:"Eden AI bot"}),E.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:no().format("HH:mm")})]}),E.jsx("div",{className:"ed-py-4",children:E.jsx(As,{})})]})]})]})]})};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:Y8,setPrototypeOf:K8,isFrozen:iW,getPrototypeOf:oW,getOwnPropertyDescriptor:aW}=Object;let{freeze:er,seal:Xr,create:jd}=Object,{apply:$0,construct:ey}=typeof Reflect<"u"&&Reflect;er||(er=function(e){return e}),Xr||(Xr=function(e){return e}),$0||($0=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return e.apply(n,i)}),ey||(ey=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new e(...r)});const Vd=nr(Array.prototype.forEach),sW=nr(Array.prototype.lastIndexOf),Z8=nr(Array.prototype.pop),jc=nr(Array.prototype.push),lW=nr(Array.prototype.splice),Ud=nr(String.prototype.toLowerCase),ty=nr(String.prototype.toString),ny=nr(String.prototype.match),Vc=nr(String.prototype.replace),cW=nr(String.prototype.indexOf),uW=nr(String.prototype.trim),Fr=nr(Object.prototype.hasOwnProperty),tr=nr(RegExp.prototype.test),Uc=fW(TypeError);function nr(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return $0(t,e,r)}}function fW(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ey(t,n)}}function st(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ud;K8&&K8(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const o=n(i);o!==i&&(iW(e)||(e[r]=o),i=o)}t[i]=!0}return t}function dW(t){for(let e=0;e<t.length;e++)Fr(t,e)||(t[e]=null);return t}function ji(t){const e=jd(null);for(const[n,r]of Y8(t))Fr(t,n)&&(Array.isArray(r)?e[n]=dW(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=ji(r):e[n]=r);return e}function zc(t,e){for(;t!==null;){const r=aW(t,e);if(r){if(r.get)return nr(r.get);if(typeof r.value=="function")return nr(r.value)}t=oW(t)}function n(){return null}return n}const Q8=er(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ry=er(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),iy=er(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hW=er(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),oy=er(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),pW=er(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q8=er(["#text"]),J8=er(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ay=er(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),X8=er(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zd=er(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mW=Xr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),gW=Xr(/<%[\w\W]*|[\w\W]*%>/gm),vW=Xr(/\$\{[\w\W]*/gm),yW=Xr(/^data-[\-\w.\u00B7-\uFFFF]+$/),bW=Xr(/^aria-[\-\w]+$/),$8=Xr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),EW=Xr(/^(?:\w+script|data):/i),SW=Xr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),e4=Xr(/^html$/i),_W=Xr(/^[a-z][.\w]*(-[.\w]+)+$/i);var t4=Object.freeze({__proto__:null,ARIA_ATTR:bW,ATTR_WHITESPACE:SW,CUSTOM_ELEMENT:_W,DATA_ATTR:yW,DOCTYPE_NAME:e4,ERB_EXPR:gW,IS_ALLOWED_URI:$8,IS_SCRIPT_OR_DATA:EW,MUSTACHE_EXPR:mW,TMPLIT_EXPR:vW});const Bc={element:1,text:3,progressingInstruction:7,comment:8,document:9},wW=function(){return typeof window>"u"?null:window},CW=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},n4=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function r4(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wW();const e=Ae=>r4(Ae);if(e.version="3.3.3",e.removed=[],!t||!t.document||t.document.nodeType!==Bc.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:s,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:p}=t,v=c.prototype,b=zc(v,"cloneNode"),y=zc(v,"remove"),w=zc(v,"nextSibling"),_=zc(v,"childNodes"),A=zc(v,"parentNode");if(typeof a=="function"){const Ae=n.createElement("template");Ae.content&&Ae.content.ownerDocument&&(n=Ae.content.ownerDocument)}let C,S="";const{implementation:T,createNodeIterator:k,createDocumentFragment:N,getElementsByTagName:P}=n,{importNode:V}=r;let U=n4();e.isSupported=typeof Y8=="function"&&typeof A=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:Q,TMPLIT_EXPR:j,DATA_ATTR:F,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:z,CUSTOM_ELEMENT:J}=t4;let{IS_ALLOWED_URI:W}=t4,Y=null;const te=st({},[...Q8,...ry,...iy,...oy,...q8]);let ne=null;const le=st({},[...J8,...ay,...X8,...zd]);let re=Object.seal(jd(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),de=null,he=null;const Ee=Object.seal(jd(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ge=!0,$=!0,ue=!1,q=!0,Te=!1,pe=!0,Ie=!1,Qe=!1,Me=!1,lt=!1,Oe=!1,rt=!1,Fe=!0,qe=!1;const Tt="user-content-";let _e=!0,tt=!1,Ot={},Kt=null;const qt=st({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let _n=null;const vr=st({},["audio","video","img","source","image","track"]);let yt=null;const bt=st({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),sn="http://www.w3.org/1998/Math/MathML",nn="http://www.w3.org/2000/svg",zt="http://www.w3.org/1999/xhtml";let wn=zt,rn=!1,Kn=null;const io=st({},[sn,nn,zt],ty);let $r=st({},["mi","mo","mn","ms","mtext"]),yr=st({},["annotation-xml"]);const Vi=st({},["title","style","font","a","script"]);let br=null;const rr=["application/xhtml+xml","text/html"],fn="text/html";let Je=null,Cn=null;const vn=n.createElement("form"),gt=function(K){return K instanceof RegExp||K instanceof Function},ft=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Cn&&Cn===K)){if((!K||typeof K!="object")&&(K={}),K=ji(K),br=rr.indexOf(K.PARSER_MEDIA_TYPE)===-1?fn:K.PARSER_MEDIA_TYPE,Je=br==="application/xhtml+xml"?ty:Ud,Y=Fr(K,"ALLOWED_TAGS")?st({},K.ALLOWED_TAGS,Je):te,ne=Fr(K,"ALLOWED_ATTR")?st({},K.ALLOWED_ATTR,Je):le,Kn=Fr(K,"ALLOWED_NAMESPACES")?st({},K.ALLOWED_NAMESPACES,ty):io,yt=Fr(K,"ADD_URI_SAFE_ATTR")?st(ji(bt),K.ADD_URI_SAFE_ATTR,Je):bt,_n=Fr(K,"ADD_DATA_URI_TAGS")?st(ji(vr),K.ADD_DATA_URI_TAGS,Je):vr,Kt=Fr(K,"FORBID_CONTENTS")?st({},K.FORBID_CONTENTS,Je):qt,de=Fr(K,"FORBID_TAGS")?st({},K.FORBID_TAGS,Je):ji({}),he=Fr(K,"FORBID_ATTR")?st({},K.FORBID_ATTR,Je):ji({}),Ot=Fr(K,"USE_PROFILES")?K.USE_PROFILES:!1,ge=K.ALLOW_ARIA_ATTR!==!1,$=K.ALLOW_DATA_ATTR!==!1,ue=K.ALLOW_UNKNOWN_PROTOCOLS||!1,q=K.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=K.SAFE_FOR_TEMPLATES||!1,pe=K.SAFE_FOR_XML!==!1,Ie=K.WHOLE_DOCUMENT||!1,lt=K.RETURN_DOM||!1,Oe=K.RETURN_DOM_FRAGMENT||!1,rt=K.RETURN_TRUSTED_TYPE||!1,Me=K.FORCE_BODY||!1,Fe=K.SANITIZE_DOM!==!1,qe=K.SANITIZE_NAMED_PROPS||!1,_e=K.KEEP_CONTENT!==!1,tt=K.IN_PLACE||!1,W=K.ALLOWED_URI_REGEXP||$8,wn=K.NAMESPACE||zt,$r=K.MATHML_TEXT_INTEGRATION_POINTS||$r,yr=K.HTML_INTEGRATION_POINTS||yr,re=K.CUSTOM_ELEMENT_HANDLING||{},K.CUSTOM_ELEMENT_HANDLING&>(K.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=K.CUSTOM_ELEMENT_HANDLING.tagNameCheck),K.CUSTOM_ELEMENT_HANDLING&>(K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),K.CUSTOM_ELEMENT_HANDLING&&typeof K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&($=!1),Oe&&(lt=!0),Ot&&(Y=st({},q8),ne=jd(null),Ot.html===!0&&(st(Y,Q8),st(ne,J8)),Ot.svg===!0&&(st(Y,ry),st(ne,ay),st(ne,zd)),Ot.svgFilters===!0&&(st(Y,iy),st(ne,ay),st(ne,zd)),Ot.mathMl===!0&&(st(Y,oy),st(ne,X8),st(ne,zd))),Fr(K,"ADD_TAGS")||(Ee.tagCheck=null),Fr(K,"ADD_ATTR")||(Ee.attributeCheck=null),K.ADD_TAGS&&(typeof K.ADD_TAGS=="function"?Ee.tagCheck=K.ADD_TAGS:(Y===te&&(Y=ji(Y)),st(Y,K.ADD_TAGS,Je))),K.ADD_ATTR&&(typeof K.ADD_ATTR=="function"?Ee.attributeCheck=K.ADD_ATTR:(ne===le&&(ne=ji(ne)),st(ne,K.ADD_ATTR,Je))),K.ADD_URI_SAFE_ATTR&&st(yt,K.ADD_URI_SAFE_ATTR,Je),K.FORBID_CONTENTS&&(Kt===qt&&(Kt=ji(Kt)),st(Kt,K.FORBID_CONTENTS,Je)),K.ADD_FORBID_CONTENTS&&(Kt===qt&&(Kt=ji(Kt)),st(Kt,K.ADD_FORBID_CONTENTS,Je)),_e&&(Y["#text"]=!0),Ie&&st(Y,["html","head","body"]),Y.table&&(st(Y,["tbody"]),delete de.tbody),K.TRUSTED_TYPES_POLICY){if(typeof K.TRUSTED_TYPES_POLICY.createHTML!="function")throw Uc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof K.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Uc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=K.TRUSTED_TYPES_POLICY,S=C.createHTML("")}else C===void 0&&(C=CW(p,i)),C!==null&&typeof S=="string"&&(S=C.createHTML(""));er&&er(K),Cn=K}},Zt=st({},[...ry,...iy,...hW]),ir=st({},[...oy,...pW]),yn=function(K){let me=A(K);(!me||!me.tagName)&&(me={namespaceURI:wn,tagName:"template"});const xe=Ud(K.tagName),St=Ud(me.tagName);return Kn[K.namespaceURI]?K.namespaceURI===nn?me.namespaceURI===zt?xe==="svg":me.namespaceURI===sn?xe==="svg"&&(St==="annotation-xml"||$r[St]):!!Zt[xe]:K.namespaceURI===sn?me.namespaceURI===zt?xe==="math":me.namespaceURI===nn?xe==="math"&&yr[St]:!!ir[xe]:K.namespaceURI===zt?me.namespaceURI===nn&&!yr[St]||me.namespaceURI===sn&&!$r[St]?!1:!ir[xe]&&(Vi[xe]||!Zt[xe]):!!(br==="application/xhtml+xml"&&Kn[K.namespaceURI]):!1},pt=function(K){jc(e.removed,{element:K});try{A(K).removeChild(K)}catch{y(K)}},Ln=function(K,me){try{jc(e.removed,{attribute:me.getAttributeNode(K),from:me})}catch{jc(e.removed,{attribute:null,from:me})}if(me.removeAttribute(K),K==="is")if(lt||Oe)try{pt(me)}catch{}else try{me.setAttribute(K,"")}catch{}},Er=function(K){let me=null,xe=null;if(Me)K="<remove></remove>"+K;else{const Rt=ny(K,/^[\r\n\t ]+/);xe=Rt&&Rt[0]}br==="application/xhtml+xml"&&wn===zt&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");const St=C?C.createHTML(K):K;if(wn===zt)try{me=new m().parseFromString(St,br)}catch{}if(!me||!me.documentElement){me=T.createDocument(wn,"template",null);try{me.documentElement.innerHTML=rn?S:St}catch{}}const Qt=me.body||me.documentElement;return K&&xe&&Qt.insertBefore(n.createTextNode(xe),Qt.childNodes[0]||null),wn===zt?P.call(me,Ie?"html":"body")[0]:Ie?me.documentElement:Qt},Et=function(K){return k.call(K.ownerDocument||K,K,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Bt=function(K){return K instanceof h&&(typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||!(K.attributes instanceof d)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function")},bn=function(K){return typeof s=="function"&&K instanceof s};function Lt(Ae,K,me){Vd(Ae,xe=>{xe.call(e,K,me,Cn)})}const or=function(K){let me=null;if(Lt(U.beforeSanitizeElements,K,null),Bt(K))return pt(K),!0;const xe=Je(K.nodeName);if(Lt(U.uponSanitizeElement,K,{tagName:xe,allowedTags:Y}),pe&&K.hasChildNodes()&&!bn(K.firstElementChild)&&tr(/<[/\w!]/g,K.innerHTML)&&tr(/<[/\w!]/g,K.textContent)||K.nodeType===Bc.progressingInstruction||pe&&K.nodeType===Bc.comment&&tr(/<[/\w]/g,K.data))return pt(K),!0;if(!(Ee.tagCheck instanceof Function&&Ee.tagCheck(xe))&&(!Y[xe]||de[xe])){if(!de[xe]&&Zn(xe)&&(re.tagNameCheck instanceof RegExp&&tr(re.tagNameCheck,xe)||re.tagNameCheck instanceof Function&&re.tagNameCheck(xe)))return!1;if(_e&&!Kt[xe]){const St=A(K)||K.parentNode,Qt=_(K)||K.childNodes;if(Qt&&St){const Rt=Qt.length;for(let dn=Rt-1;dn>=0;--dn){const ar=b(Qt[dn],!0);ar.__removalCount=(K.__removalCount||0)+1,St.insertBefore(ar,w(K))}}}return pt(K),!0}return K instanceof c&&!yn(K)||(xe==="noscript"||xe==="noembed"||xe==="noframes")&&tr(/<\/no(script|embed|frames)/i,K.innerHTML)?(pt(K),!0):(Te&&K.nodeType===Bc.text&&(me=K.textContent,Vd([H,Q,j],St=>{me=Vc(me,St," ")}),K.textContent!==me&&(jc(e.removed,{element:K.cloneNode()}),K.textContent=me)),Lt(U.afterSanitizeElements,K,null),!1)},ei=function(K,me,xe){if(he[me]||Fe&&(me==="id"||me==="name")&&(xe in n||xe in vn))return!1;if(!($&&!he[me]&&tr(F,me))){if(!(ge&&tr(D,me))){if(!(Ee.attributeCheck instanceof Function&&Ee.attributeCheck(me,K))){if(!ne[me]||he[me]){if(!(Zn(K)&&(re.tagNameCheck instanceof RegExp&&tr(re.tagNameCheck,K)||re.tagNameCheck instanceof Function&&re.tagNameCheck(K))&&(re.attributeNameCheck instanceof RegExp&&tr(re.attributeNameCheck,me)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(me,K))||me==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&tr(re.tagNameCheck,xe)||re.tagNameCheck instanceof Function&&re.tagNameCheck(xe))))return!1}else if(!yt[me]){if(!tr(W,Vc(xe,z,""))){if(!((me==="src"||me==="xlink:href"||me==="href")&&K!=="script"&&cW(xe,"data:")===0&&_n[K])){if(!(ue&&!tr(G,Vc(xe,z,"")))){if(xe)return!1}}}}}}}return!0},Zn=function(K){return K!=="annotation-xml"&&ny(K,J)},Vn=function(K){Lt(U.beforeSanitizeAttributes,K,null);const{attributes:me}=K;if(!me||Bt(K))return;const xe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let St=me.length;for(;St--;){const Qt=me[St],{name:Rt,namespaceURI:dn,value:ar}=Qt,_r=Je(Rt),Si=ar;let Vt=Rt==="value"?Si:uW(Si);if(xe.attrName=_r,xe.attrValue=Vt,xe.keepAttr=!0,xe.forceKeepAttr=void 0,Lt(U.uponSanitizeAttribute,K,xe),Vt=xe.attrValue,qe&&(_r==="id"||_r==="name")&&(Ln(Rt,K),Vt=Tt+Vt),pe&&tr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Vt)){Ln(Rt,K);continue}if(_r==="attributename"&&ny(Vt,"href")){Ln(Rt,K);continue}if(xe.forceKeepAttr)continue;if(!xe.keepAttr){Ln(Rt,K);continue}if(!q&&tr(/\/>/i,Vt)){Ln(Rt,K);continue}Te&&Vd([H,Q,j],Ui=>{Vt=Vc(Vt,Ui," ")});const ti=Je(K.nodeName);if(!ei(ti,_r,Vt)){Ln(Rt,K);continue}if(C&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!dn)switch(p.getAttributeType(ti,_r)){case"TrustedHTML":{Vt=C.createHTML(Vt);break}case"TrustedScriptURL":{Vt=C.createScriptURL(Vt);break}}if(Vt!==Si)try{dn?K.setAttributeNS(dn,Rt,Vt):K.setAttribute(Rt,Vt),Bt(K)?pt(K):Z8(e.removed)}catch{Ln(Rt,K)}}Lt(U.afterSanitizeAttributes,K,null)},Sr=function Ae(K){let me=null;const xe=Et(K);for(Lt(U.beforeSanitizeShadowDOM,K,null);me=xe.nextNode();)Lt(U.uponSanitizeShadowNode,me,null),or(me),Vn(me),me.content instanceof o&&Ae(me.content);Lt(U.afterSanitizeShadowDOM,K,null)};return e.sanitize=function(Ae){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=null,xe=null,St=null,Qt=null;if(rn=!Ae,rn&&(Ae="<!-->"),typeof Ae!="string"&&!bn(Ae))if(typeof Ae.toString=="function"){if(Ae=Ae.toString(),typeof Ae!="string")throw Uc("dirty is not a string, aborting")}else throw Uc("toString is not a function");if(!e.isSupported)return Ae;if(Qe||ft(K),e.removed=[],typeof Ae=="string"&&(tt=!1),tt){if(Ae.nodeName){const ar=Je(Ae.nodeName);if(!Y[ar]||de[ar])throw Uc("root node is forbidden and cannot be sanitized in-place")}}else if(Ae instanceof s)me=Er("<!---->"),xe=me.ownerDocument.importNode(Ae,!0),xe.nodeType===Bc.element&&xe.nodeName==="BODY"||xe.nodeName==="HTML"?me=xe:me.appendChild(xe);else{if(!lt&&!Te&&!Ie&&Ae.indexOf("<")===-1)return C&&rt?C.createHTML(Ae):Ae;if(me=Er(Ae),!me)return lt?null:rt?S:""}me&&Me&&pt(me.firstChild);const Rt=Et(tt?Ae:me);for(;St=Rt.nextNode();)or(St),Vn(St),St.content instanceof o&&Sr(St.content);if(tt)return Ae;if(lt){if(Oe)for(Qt=N.call(me.ownerDocument);me.firstChild;)Qt.appendChild(me.firstChild);else Qt=me;return(ne.shadowroot||ne.shadowrootmode)&&(Qt=V.call(r,Qt,!0)),Qt}let dn=Ie?me.outerHTML:me.innerHTML;return Ie&&Y["!doctype"]&&me.ownerDocument&&me.ownerDocument.doctype&&me.ownerDocument.doctype.name&&tr(e4,me.ownerDocument.doctype.name)&&(dn="<!DOCTYPE "+me.ownerDocument.doctype.name+`>
|
|
680
|
+
</div>`,is_customer_reply:!0},{message:F,is_auto_response:!0,current_stage:D}];await X0(600,1e3);const{data:z}=await _({variables:{inputData:{type:"chat",contact_person_name:y==null?void 0:y.contact_person_name,contact_person_email:y==null?void 0:y.contact_person_email,conversation_activities:G,is_initiated_with_ai:v}}}),J=z==null?void 0:z.createAConversationForPortal;J!=null&&J.id&&(n(J==null?void 0:J.id),cm("easydesk_chat_widget_conversation_id",J==null?void 0:J.id,{expires:30}),t==null||t({contact_person_name:y==null?void 0:y.contact_person_name,contact_person_email:y==null?void 0:y.contact_person_email}))}catch(Q){const{message:j,response:F}=Q;Rn("error",((H=F==null?void 0:F.data)==null?void 0:H.message)||j,"top-left"),p(!1)}finally{C(!1)}},N=V=>{const{name:U,value:H}=V.target;w(Q=>({...Q,[U]:H}))},P=R.useMemo(()=>!(y!=null&&y.contact_person_name)||!(y!=null&&y.contact_person_email)||!um(y==null?void 0:y.contact_person_email)||A,[y,A]);return E.jsxs("div",{className:"ed-space-y-5 ed-px-5 ed-pt-1",children:[d&&!m&&E.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[v?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Ni(i==null?void 0:i.name)}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:v?"Easy AI Bot":i==null?void 0:i.name}),E.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:no().format("HH:mm")})]}),E.jsx("div",{className:"ed-py-4",children:E.jsx(As,{})})]})]}),a&&!m&&E.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%] ed-animate-fadeInUp",children:[v?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Ni(i==null?void 0:i.name)}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:v?"Easy AI Bot":i==null?void 0:i.name}),E.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:no().format("HH:mm")})]}),E.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-text-[13px] ed-rounded-lg ed-mt-2",children:E.jsx("p",{className:"ed-text-border-dark",children:T?Ut.initial.greetingOnline:Ut.initial.greetingOffline})})]})]}),c&&!m&&E.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto ed-animate-fadeInUp",children:E.jsxs("form",{onSubmit:k,className:"ed-p-5 ed-rounded-[20px] ed-bg-white-light ed-space-y-5",children:[E.jsxs("div",{className:"ed-space-y-2",children:[E.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Name ",E.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),E.jsx("input",{type:"text",name:"contact_person_name",required:!0,placeholder:"Enter your name",value:y==null?void 0:y.contact_person_name,onChange:N,disabled:o,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),E.jsxs("div",{className:"ed-space-y-2",children:[E.jsxs("label",{className:"ed-block ed-text-border-dark ed-text-14 ed-font-semibold",children:["Email ",E.jsx("span",{className:"ed-text-red ed-text-14 ed-font-semibold",children:"*"})]}),E.jsx("input",{type:"email",name:"contact_person_email",required:!0,placeholder:"Enter your email",value:y==null?void 0:y.contact_person_email,onChange:N,disabled:o,className:"ed-w-full ed-p-2.5 ed-px-4 ed-border ed-border-border-light ed-rounded-lg ed-outline-none ed-bg-white ed-text-14 ed-font-normal"})]}),E.jsx("div",{className:"ed-flex ed-justify-end",children:E.jsx(Cs,{title:"Submit",loaderText:"Submitting",fullWidthBtn:!0,disabled:P,loader:A,callBack:k})})]})}),m&&E.jsxs(E.Fragment,{children:[E.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%]",children:[v?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Ni(i==null?void 0:i.name)}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:v?i==null?void 0:i.name:"Eden AI bot"}),E.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:no().format("HH:mm")})]}),E.jsx("div",{className:"ed-p-2.5 ed-bg-white-light ed-text-[13px] ed-rounded-lg ed-mt-2",children:E.jsx("p",{className:"ed-text-border-dark",children:T?Ut.initial.greetingOnline:Ut.initial.greetingOffline})})]})]}),E.jsx("div",{className:"ed-max-w-[85%] ed-ml-auto ed-animate-fadeInUp",children:E.jsxs("div",{className:"ed-p-5 ed-rounded-[20px] ed-bg-blue-50 ed-border ed-border-blue-100",style:{borderRadius:"20px",border:"1px solid #e3f2fd",backgroundColor:"#e3f2fd",padding:"20px"},children:[E.jsxs("div",{style:{marginBottom:"20px"},children:[E.jsx("h6",{style:{fontSize:"13px",fontWeight:"600",color:"#3b3b3b",margin:0,padding:0},children:"Name"}),E.jsx("p",{style:{fontSize:"13px",color:"#797979"},children:y==null?void 0:y.contact_person_name})]}),E.jsxs("div",{children:[E.jsx("h6",{style:{fontSize:"13px",fontWeight:"600",color:"#3b3b3b",margin:0,padding:0},children:"Email"}),E.jsx("p",{style:{fontSize:"13px",color:"#797979",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:y==null?void 0:y.contact_person_email})]})]})}),E.jsxs("div",{className:"ed-flex ed-gap-4 ed-max-w-[85%] ed-animate-fadeIn",children:[v?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full ed-flex-shrink-0",defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:i==null?void 0:i.logo_icon_key,defaultImageName:Ni(i==null?void 0:i.name)}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:v?i==null?void 0:i.name:"Eden AI bot"}),E.jsx("span",{className:"ed-text-border ed-font-medium ed-text-[13px]",children:no().format("HH:mm")})]}),E.jsx("div",{className:"ed-py-4",children:E.jsx(As,{})})]})]})]})]})};/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:Y8,setPrototypeOf:K8,isFrozen:iW,getPrototypeOf:oW,getOwnPropertyDescriptor:aW}=Object;let{freeze:er,seal:Xr,create:jd}=Object,{apply:$0,construct:ey}=typeof Reflect<"u"&&Reflect;er||(er=function(e){return e}),Xr||(Xr=function(e){return e}),$0||($0=function(e,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return e.apply(n,i)}),ey||(ey=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return new e(...r)});const Vd=nr(Array.prototype.forEach),sW=nr(Array.prototype.lastIndexOf),Z8=nr(Array.prototype.pop),jc=nr(Array.prototype.push),lW=nr(Array.prototype.splice),Ud=nr(String.prototype.toLowerCase),ty=nr(String.prototype.toString),ny=nr(String.prototype.match),Vc=nr(String.prototype.replace),cW=nr(String.prototype.indexOf),uW=nr(String.prototype.trim),Fr=nr(Object.prototype.hasOwnProperty),tr=nr(RegExp.prototype.test),Uc=fW(TypeError);function nr(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return $0(t,e,r)}}function fW(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ey(t,n)}}function st(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ud;K8&&K8(t,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const o=n(i);o!==i&&(iW(e)||(e[r]=o),i=o)}t[i]=!0}return t}function dW(t){for(let e=0;e<t.length;e++)Fr(t,e)||(t[e]=null);return t}function ji(t){const e=jd(null);for(const[n,r]of Y8(t))Fr(t,n)&&(Array.isArray(r)?e[n]=dW(r):r&&typeof r=="object"&&r.constructor===Object?e[n]=ji(r):e[n]=r);return e}function zc(t,e){for(;t!==null;){const r=aW(t,e);if(r){if(r.get)return nr(r.get);if(typeof r.value=="function")return nr(r.value)}t=oW(t)}function n(){return null}return n}const Q8=er(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ry=er(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),iy=er(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hW=er(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),oy=er(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),pW=er(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q8=er(["#text"]),J8=er(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ay=er(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),X8=er(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),zd=er(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mW=Xr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),gW=Xr(/<%[\w\W]*|[\w\W]*%>/gm),vW=Xr(/\$\{[\w\W]*/gm),yW=Xr(/^data-[\-\w.\u00B7-\uFFFF]+$/),bW=Xr(/^aria-[\-\w]+$/),$8=Xr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),EW=Xr(/^(?:\w+script|data):/i),SW=Xr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),e4=Xr(/^html$/i),_W=Xr(/^[a-z][.\w]*(-[.\w]+)+$/i);var t4=Object.freeze({__proto__:null,ARIA_ATTR:bW,ATTR_WHITESPACE:SW,CUSTOM_ELEMENT:_W,DATA_ATTR:yW,DOCTYPE_NAME:e4,ERB_EXPR:gW,IS_ALLOWED_URI:$8,IS_SCRIPT_OR_DATA:EW,MUSTACHE_EXPR:mW,TMPLIT_EXPR:vW});const Bc={element:1,text:3,progressingInstruction:7,comment:8,document:9},wW=function(){return typeof window>"u"?null:window},CW=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},n4=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function r4(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wW();const e=Ae=>r4(Ae);if(e.version="3.3.3",e.removed=[],!t||!t.document||t.document.nodeType!==Bc.document||!t.Element)return e.isSupported=!1,e;let{document:n}=t;const r=n,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:a,Node:s,Element:c,NodeFilter:u,NamedNodeMap:d=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:m,trustedTypes:p}=t,v=c.prototype,b=zc(v,"cloneNode"),y=zc(v,"remove"),w=zc(v,"nextSibling"),_=zc(v,"childNodes"),A=zc(v,"parentNode");if(typeof a=="function"){const Ae=n.createElement("template");Ae.content&&Ae.content.ownerDocument&&(n=Ae.content.ownerDocument)}let C,S="";const{implementation:T,createNodeIterator:k,createDocumentFragment:N,getElementsByTagName:P}=n,{importNode:V}=r;let U=n4();e.isSupported=typeof Y8=="function"&&typeof A=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:Q,TMPLIT_EXPR:j,DATA_ATTR:F,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:z,CUSTOM_ELEMENT:J}=t4;let{IS_ALLOWED_URI:W}=t4,Y=null;const te=st({},[...Q8,...ry,...iy,...oy,...q8]);let ne=null;const le=st({},[...J8,...ay,...X8,...zd]);let re=Object.seal(jd(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),de=null,he=null;const Ee=Object.seal(jd(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ge=!0,$=!0,ue=!1,q=!0,Te=!1,pe=!0,Ie=!1,Qe=!1,Me=!1,lt=!1,Oe=!1,rt=!1,Fe=!0,qe=!1;const Tt="user-content-";let _e=!0,tt=!1,Ot={},Kt=null;const qt=st({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let _n=null;const vr=st({},["audio","video","img","source","image","track"]);let yt=null;const bt=st({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),sn="http://www.w3.org/1998/Math/MathML",nn="http://www.w3.org/2000/svg",zt="http://www.w3.org/1999/xhtml";let wn=zt,rn=!1,Kn=null;const io=st({},[sn,nn,zt],ty);let $r=st({},["mi","mo","mn","ms","mtext"]),yr=st({},["annotation-xml"]);const Vi=st({},["title","style","font","a","script"]);let br=null;const rr=["application/xhtml+xml","text/html"],fn="text/html";let Je=null,Cn=null;const vn=n.createElement("form"),gt=function(K){return K instanceof RegExp||K instanceof Function},ft=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Cn&&Cn===K)){if((!K||typeof K!="object")&&(K={}),K=ji(K),br=rr.indexOf(K.PARSER_MEDIA_TYPE)===-1?fn:K.PARSER_MEDIA_TYPE,Je=br==="application/xhtml+xml"?ty:Ud,Y=Fr(K,"ALLOWED_TAGS")?st({},K.ALLOWED_TAGS,Je):te,ne=Fr(K,"ALLOWED_ATTR")?st({},K.ALLOWED_ATTR,Je):le,Kn=Fr(K,"ALLOWED_NAMESPACES")?st({},K.ALLOWED_NAMESPACES,ty):io,yt=Fr(K,"ADD_URI_SAFE_ATTR")?st(ji(bt),K.ADD_URI_SAFE_ATTR,Je):bt,_n=Fr(K,"ADD_DATA_URI_TAGS")?st(ji(vr),K.ADD_DATA_URI_TAGS,Je):vr,Kt=Fr(K,"FORBID_CONTENTS")?st({},K.FORBID_CONTENTS,Je):qt,de=Fr(K,"FORBID_TAGS")?st({},K.FORBID_TAGS,Je):ji({}),he=Fr(K,"FORBID_ATTR")?st({},K.FORBID_ATTR,Je):ji({}),Ot=Fr(K,"USE_PROFILES")?K.USE_PROFILES:!1,ge=K.ALLOW_ARIA_ATTR!==!1,$=K.ALLOW_DATA_ATTR!==!1,ue=K.ALLOW_UNKNOWN_PROTOCOLS||!1,q=K.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Te=K.SAFE_FOR_TEMPLATES||!1,pe=K.SAFE_FOR_XML!==!1,Ie=K.WHOLE_DOCUMENT||!1,lt=K.RETURN_DOM||!1,Oe=K.RETURN_DOM_FRAGMENT||!1,rt=K.RETURN_TRUSTED_TYPE||!1,Me=K.FORCE_BODY||!1,Fe=K.SANITIZE_DOM!==!1,qe=K.SANITIZE_NAMED_PROPS||!1,_e=K.KEEP_CONTENT!==!1,tt=K.IN_PLACE||!1,W=K.ALLOWED_URI_REGEXP||$8,wn=K.NAMESPACE||zt,$r=K.MATHML_TEXT_INTEGRATION_POINTS||$r,yr=K.HTML_INTEGRATION_POINTS||yr,re=K.CUSTOM_ELEMENT_HANDLING||{},K.CUSTOM_ELEMENT_HANDLING&>(K.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=K.CUSTOM_ELEMENT_HANDLING.tagNameCheck),K.CUSTOM_ELEMENT_HANDLING&>(K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),K.CUSTOM_ELEMENT_HANDLING&&typeof K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Te&&($=!1),Oe&&(lt=!0),Ot&&(Y=st({},q8),ne=jd(null),Ot.html===!0&&(st(Y,Q8),st(ne,J8)),Ot.svg===!0&&(st(Y,ry),st(ne,ay),st(ne,zd)),Ot.svgFilters===!0&&(st(Y,iy),st(ne,ay),st(ne,zd)),Ot.mathMl===!0&&(st(Y,oy),st(ne,X8),st(ne,zd))),Fr(K,"ADD_TAGS")||(Ee.tagCheck=null),Fr(K,"ADD_ATTR")||(Ee.attributeCheck=null),K.ADD_TAGS&&(typeof K.ADD_TAGS=="function"?Ee.tagCheck=K.ADD_TAGS:(Y===te&&(Y=ji(Y)),st(Y,K.ADD_TAGS,Je))),K.ADD_ATTR&&(typeof K.ADD_ATTR=="function"?Ee.attributeCheck=K.ADD_ATTR:(ne===le&&(ne=ji(ne)),st(ne,K.ADD_ATTR,Je))),K.ADD_URI_SAFE_ATTR&&st(yt,K.ADD_URI_SAFE_ATTR,Je),K.FORBID_CONTENTS&&(Kt===qt&&(Kt=ji(Kt)),st(Kt,K.FORBID_CONTENTS,Je)),K.ADD_FORBID_CONTENTS&&(Kt===qt&&(Kt=ji(Kt)),st(Kt,K.ADD_FORBID_CONTENTS,Je)),_e&&(Y["#text"]=!0),Ie&&st(Y,["html","head","body"]),Y.table&&(st(Y,["tbody"]),delete de.tbody),K.TRUSTED_TYPES_POLICY){if(typeof K.TRUSTED_TYPES_POLICY.createHTML!="function")throw Uc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof K.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Uc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=K.TRUSTED_TYPES_POLICY,S=C.createHTML("")}else C===void 0&&(C=CW(p,i)),C!==null&&typeof S=="string"&&(S=C.createHTML(""));er&&er(K),Cn=K}},Zt=st({},[...ry,...iy,...hW]),ir=st({},[...oy,...pW]),yn=function(K){let me=A(K);(!me||!me.tagName)&&(me={namespaceURI:wn,tagName:"template"});const xe=Ud(K.tagName),St=Ud(me.tagName);return Kn[K.namespaceURI]?K.namespaceURI===nn?me.namespaceURI===zt?xe==="svg":me.namespaceURI===sn?xe==="svg"&&(St==="annotation-xml"||$r[St]):!!Zt[xe]:K.namespaceURI===sn?me.namespaceURI===zt?xe==="math":me.namespaceURI===nn?xe==="math"&&yr[St]:!!ir[xe]:K.namespaceURI===zt?me.namespaceURI===nn&&!yr[St]||me.namespaceURI===sn&&!$r[St]?!1:!ir[xe]&&(Vi[xe]||!Zt[xe]):!!(br==="application/xhtml+xml"&&Kn[K.namespaceURI]):!1},pt=function(K){jc(e.removed,{element:K});try{A(K).removeChild(K)}catch{y(K)}},Ln=function(K,me){try{jc(e.removed,{attribute:me.getAttributeNode(K),from:me})}catch{jc(e.removed,{attribute:null,from:me})}if(me.removeAttribute(K),K==="is")if(lt||Oe)try{pt(me)}catch{}else try{me.setAttribute(K,"")}catch{}},Er=function(K){let me=null,xe=null;if(Me)K="<remove></remove>"+K;else{const Rt=ny(K,/^[\r\n\t ]+/);xe=Rt&&Rt[0]}br==="application/xhtml+xml"&&wn===zt&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");const St=C?C.createHTML(K):K;if(wn===zt)try{me=new m().parseFromString(St,br)}catch{}if(!me||!me.documentElement){me=T.createDocument(wn,"template",null);try{me.documentElement.innerHTML=rn?S:St}catch{}}const Qt=me.body||me.documentElement;return K&&xe&&Qt.insertBefore(n.createTextNode(xe),Qt.childNodes[0]||null),wn===zt?P.call(me,Ie?"html":"body")[0]:Ie?me.documentElement:Qt},Et=function(K){return k.call(K.ownerDocument||K,K,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Bt=function(K){return K instanceof h&&(typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||!(K.attributes instanceof d)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function")},bn=function(K){return typeof s=="function"&&K instanceof s};function Lt(Ae,K,me){Vd(Ae,xe=>{xe.call(e,K,me,Cn)})}const or=function(K){let me=null;if(Lt(U.beforeSanitizeElements,K,null),Bt(K))return pt(K),!0;const xe=Je(K.nodeName);if(Lt(U.uponSanitizeElement,K,{tagName:xe,allowedTags:Y}),pe&&K.hasChildNodes()&&!bn(K.firstElementChild)&&tr(/<[/\w!]/g,K.innerHTML)&&tr(/<[/\w!]/g,K.textContent)||K.nodeType===Bc.progressingInstruction||pe&&K.nodeType===Bc.comment&&tr(/<[/\w]/g,K.data))return pt(K),!0;if(!(Ee.tagCheck instanceof Function&&Ee.tagCheck(xe))&&(!Y[xe]||de[xe])){if(!de[xe]&&Zn(xe)&&(re.tagNameCheck instanceof RegExp&&tr(re.tagNameCheck,xe)||re.tagNameCheck instanceof Function&&re.tagNameCheck(xe)))return!1;if(_e&&!Kt[xe]){const St=A(K)||K.parentNode,Qt=_(K)||K.childNodes;if(Qt&&St){const Rt=Qt.length;for(let dn=Rt-1;dn>=0;--dn){const ar=b(Qt[dn],!0);ar.__removalCount=(K.__removalCount||0)+1,St.insertBefore(ar,w(K))}}}return pt(K),!0}return K instanceof c&&!yn(K)||(xe==="noscript"||xe==="noembed"||xe==="noframes")&&tr(/<\/no(script|embed|frames)/i,K.innerHTML)?(pt(K),!0):(Te&&K.nodeType===Bc.text&&(me=K.textContent,Vd([H,Q,j],St=>{me=Vc(me,St," ")}),K.textContent!==me&&(jc(e.removed,{element:K.cloneNode()}),K.textContent=me)),Lt(U.afterSanitizeElements,K,null),!1)},ei=function(K,me,xe){if(he[me]||Fe&&(me==="id"||me==="name")&&(xe in n||xe in vn))return!1;if(!($&&!he[me]&&tr(F,me))){if(!(ge&&tr(D,me))){if(!(Ee.attributeCheck instanceof Function&&Ee.attributeCheck(me,K))){if(!ne[me]||he[me]){if(!(Zn(K)&&(re.tagNameCheck instanceof RegExp&&tr(re.tagNameCheck,K)||re.tagNameCheck instanceof Function&&re.tagNameCheck(K))&&(re.attributeNameCheck instanceof RegExp&&tr(re.attributeNameCheck,me)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(me,K))||me==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&tr(re.tagNameCheck,xe)||re.tagNameCheck instanceof Function&&re.tagNameCheck(xe))))return!1}else if(!yt[me]){if(!tr(W,Vc(xe,z,""))){if(!((me==="src"||me==="xlink:href"||me==="href")&&K!=="script"&&cW(xe,"data:")===0&&_n[K])){if(!(ue&&!tr(G,Vc(xe,z,"")))){if(xe)return!1}}}}}}}return!0},Zn=function(K){return K!=="annotation-xml"&&ny(K,J)},Vn=function(K){Lt(U.beforeSanitizeAttributes,K,null);const{attributes:me}=K;if(!me||Bt(K))return;const xe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne,forceKeepAttr:void 0};let St=me.length;for(;St--;){const Qt=me[St],{name:Rt,namespaceURI:dn,value:ar}=Qt,_r=Je(Rt),Si=ar;let Vt=Rt==="value"?Si:uW(Si);if(xe.attrName=_r,xe.attrValue=Vt,xe.keepAttr=!0,xe.forceKeepAttr=void 0,Lt(U.uponSanitizeAttribute,K,xe),Vt=xe.attrValue,qe&&(_r==="id"||_r==="name")&&(Ln(Rt,K),Vt=Tt+Vt),pe&&tr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Vt)){Ln(Rt,K);continue}if(_r==="attributename"&&ny(Vt,"href")){Ln(Rt,K);continue}if(xe.forceKeepAttr)continue;if(!xe.keepAttr){Ln(Rt,K);continue}if(!q&&tr(/\/>/i,Vt)){Ln(Rt,K);continue}Te&&Vd([H,Q,j],Ui=>{Vt=Vc(Vt,Ui," ")});const ti=Je(K.nodeName);if(!ei(ti,_r,Vt)){Ln(Rt,K);continue}if(C&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!dn)switch(p.getAttributeType(ti,_r)){case"TrustedHTML":{Vt=C.createHTML(Vt);break}case"TrustedScriptURL":{Vt=C.createScriptURL(Vt);break}}if(Vt!==Si)try{dn?K.setAttributeNS(dn,Rt,Vt):K.setAttribute(Rt,Vt),Bt(K)?pt(K):Z8(e.removed)}catch{Ln(Rt,K)}}Lt(U.afterSanitizeAttributes,K,null)},Sr=function Ae(K){let me=null;const xe=Et(K);for(Lt(U.beforeSanitizeShadowDOM,K,null);me=xe.nextNode();)Lt(U.uponSanitizeShadowNode,me,null),or(me),Vn(me),me.content instanceof o&&Ae(me.content);Lt(U.afterSanitizeShadowDOM,K,null)};return e.sanitize=function(Ae){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=null,xe=null,St=null,Qt=null;if(rn=!Ae,rn&&(Ae="<!-->"),typeof Ae!="string"&&!bn(Ae))if(typeof Ae.toString=="function"){if(Ae=Ae.toString(),typeof Ae!="string")throw Uc("dirty is not a string, aborting")}else throw Uc("toString is not a function");if(!e.isSupported)return Ae;if(Qe||ft(K),e.removed=[],typeof Ae=="string"&&(tt=!1),tt){if(Ae.nodeName){const ar=Je(Ae.nodeName);if(!Y[ar]||de[ar])throw Uc("root node is forbidden and cannot be sanitized in-place")}}else if(Ae instanceof s)me=Er("<!---->"),xe=me.ownerDocument.importNode(Ae,!0),xe.nodeType===Bc.element&&xe.nodeName==="BODY"||xe.nodeName==="HTML"?me=xe:me.appendChild(xe);else{if(!lt&&!Te&&!Ie&&Ae.indexOf("<")===-1)return C&&rt?C.createHTML(Ae):Ae;if(me=Er(Ae),!me)return lt?null:rt?S:""}me&&Me&&pt(me.firstChild);const Rt=Et(tt?Ae:me);for(;St=Rt.nextNode();)or(St),Vn(St),St.content instanceof o&&Sr(St.content);if(tt)return Ae;if(lt){if(Oe)for(Qt=N.call(me.ownerDocument);me.firstChild;)Qt.appendChild(me.firstChild);else Qt=me;return(ne.shadowroot||ne.shadowrootmode)&&(Qt=V.call(r,Qt,!0)),Qt}let dn=Ie?me.outerHTML:me.innerHTML;return Ie&&Y["!doctype"]&&me.ownerDocument&&me.ownerDocument.doctype&&me.ownerDocument.doctype.name&&tr(e4,me.ownerDocument.doctype.name)&&(dn="<!DOCTYPE "+me.ownerDocument.doctype.name+`>
|
|
681
681
|
`+dn),Te&&Vd([H,Q,j],ar=>{dn=Vc(dn,ar," ")}),C&&rt?C.createHTML(dn):dn},e.setConfig=function(){let Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ft(Ae),Qe=!0},e.clearConfig=function(){Cn=null,Qe=!1},e.isValidAttribute=function(Ae,K,me){Cn||ft({});const xe=Je(Ae),St=Je(K);return ei(xe,St,me)},e.addHook=function(Ae,K){typeof K=="function"&&jc(U[Ae],K)},e.removeHook=function(Ae,K){if(K!==void 0){const me=sW(U[Ae],K);return me===-1?void 0:lW(U[Ae],me,1)[0]}return Z8(U[Ae])},e.removeHooks=function(Ae){U[Ae]=[]},e.removeAllHooks=function(){U=n4()},e}var i4=r4();const xW=({previewImageInfo:t,setPreviewImageInfo:e,isPrivate:n=!1})=>{const[r,i]=R.useState(1),o=R.useRef(null),a=()=>{e(fm),i(1)};R.useEffect(()=>{const b=y=>{y.key==="Escape"&&a()};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}},[]);const{fileName:s,isOpen:c,loading:u,error:d,url:h,height:m,width:p}=t||{},v=R.useMemo(()=>h==null?void 0:h.split("?")[0].split("/").pop(),[h]);return E.jsx("div",{children:c&&E.jsxs("div",{className:"ed-overflow-hidden",children:[E.jsx("div",{className:"ed-h-full ed-w-full ed-z-[1000] ed-fixed ed-bg-black/80 ed-inset-0"}),E.jsxs("div",{className:"ed-size-full ed-flex items-center ed-w-full ed-h-full ed-justify-center ed-overflow-hidden ed-fixed ed-top-9 ed-left-0 ed-z-[1100]",children:[u?E.jsx(As,{}):!d&&h&&E.jsx("div",{ref:o,style:{transform:`scale(${r})`,transformOrigin:"center center",transition:"transform 0.2s ease-out"},children:E.jsx(Nr,{alt:"Feedback attachment",className:"ed-max-w-[90vw] ed-max-h-[90vh] ed-object-contain ed-select-none",height:m,src:h,width:p,isPrivate:n})}),d&&E.jsx("p",{className:"ed-text-14 ed-font-semibold ed-text-red",children:d})]}),E.jsxs("div",{className:"ed-fixed ed-z-[1100] ed-top-5 ed-right-16 ed-flex ed-items-center ed-gap-3",children:[E.jsx("a",{href:`${h}&dl=${s||v}`,className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors ed-bg-black/50 ed-rounded-lg ed-p-2",title:"Download",children:E.jsx(N1,{className:"ed-size-4",strokeWidth:"2"})}),E.jsx("button",{type:"button",className:"ed-fixed ed-z-[1100] ed-top-5 ed-right-5 ed-text-white ed-hover:text-gray-300 ed-transition-colors ed-bg-black/50 ed-rounded-lg ed-p-2",onClick:a,title:"Close (Esc)",children:E.jsx(Pi,{className:"ed-size-4",strokeWidth:"2"})})]}),!u&&!d&&E.jsx("div",{className:"ed-fixed ed-z-[1100] ed-bottom-5 ed-left-1/2 ed-transform -ed-translate-x-1/2",children:E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2 ed-bg-black/70 ed-rounded-lg ed-p-3",children:[E.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(b=>Math.max(b/1.5,.5)),disabled:r<=.5,title:"Zoom Out",children:E.jsx(lg,{className:"ed-size-5",strokeWidth:"2"})}),E.jsxs("span",{className:"ed-text-white ed-text-sm ed-min-w-[3rem] ed-text-center ed-font-medium",children:[Math.round(r*100),"%"]}),E.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(b=>Math.min(b*1.5,5)),disabled:r>=5,title:"Zoom In",children:E.jsx(ag,{className:"ed-size-5",strokeWidth:"2"})}),E.jsx("div",{className:"ed-w-px ed-h-5 ed-bg-white/30 ed-mx-1"}),E.jsx("button",{type:"button",className:"ed-text-white ed-hover:text-gray-300 ed-transition-colors",onClick:()=>i(1),title:"Reset",children:E.jsx(z1,{className:"ed-size-5",strokeWidth:"2"})})]})})]})})},AW=({filesData:t=[]})=>{var m;const[e,n]=R.useState(!1),[r,i]=R.useState(fm),o=t==null?void 0:t.filter(p=>/\.(jpg|jpeg|png|gif|webp)$/i.test(p.name)),a=t==null?void 0:t.filter(p=>!/\.(jpg|jpeg|png|gif|webp)$/i.test(p.name)),s=()=>n(!0),c=e?o:o==null?void 0:o.slice(0,2),u=Pe.size(o)-2,d=p=>{try{const v=`${kO()}?id=${p}&download=true`;v&&window.open(v,"_blank")}catch(v){console.error(v)}},h=async p=>{i(v=>({...v,loading:!0}));try{const v=await k5({fit:"scale",isPrivate:!1,needActualSize:!0,path:p==null?void 0:p.key,quality:100});if(v){const b=await RO(v);i(y=>({...y,isOpen:!0,url:v,fileName:p==null?void 0:p.title,image:v,loading:!1,height:b==null?void 0:b.height,width:b==null?void 0:b.width}))}}catch{i({...fm,error:"Failed to load image"})}};return E.jsxs("div",{className:"ed-flex ed-flex-col ed-gap-3",children:[Pe.size(o)>0&&E.jsxs("div",{className:"ed-grid ed-grid-cols-2 ed-gap-2.5",children:[c.map(p=>E.jsx("div",{onClick:()=>h(p),role:"button",tabIndex:0,children:E.jsx(Nr,{path:p.key,className:"ed-w-full ed-rounded",defaultImageClasses:"ed-w-full ed-h-20 !ed-rounded"})},p==null?void 0:p.id)),!e&&u>0&&E.jsxs("div",{role:"button",tabIndex:0,className:"ed-relative cursor-pointer",onClick:s,children:[E.jsx(Nr,{path:(m=o[2])==null?void 0:m.key,className:"ed-w-full ed-rounded",defaultImageClasses:"ed-w-full ed-h-20 !ed-rounded"}),E.jsx("div",{className:"ed-w-full ed-h-full ed-bg-black/15 ed-absolute ed-top-0 ed-left-0 ed-rounded",children:E.jsx("div",{className:"ed-bg-white ed-h-8 ed-w-8 ed-flex ed-items-center ed-justify-center ed-rounded-full ed-absolute ed-top-1/2 ed-left-1/2 ed--translate-x-1/2 ed--translate-y-1/2",children:E.jsxs("span",{className:"ed-text-12 ed-text-border-dark ed-font-semibold",children:["+",u]})})})]})]}),Pe.size(a)>0&&E.jsx("div",{className:"ed-flex ed-flex-col ed-gap-2.5",children:a.map(p=>E.jsxs("div",{className:"ed-p-2.5 ed-bg-white-light ed-rounded-lg ed-flex ed-items-center ed-gap-2 ed-justify-between",children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("div",{className:"ed-flex-shrink-0",children:E.jsx(zF,{})}),E.jsx("p",{title:p.title,className:"ed-text-12 ed-font-semibold ed-text-border-dark",children:dm(p.title,20)})]}),E.jsx("button",{className:"ed-flex-shrink-0",type:"button",onClick:()=>d(p==null?void 0:p.id),children:E.jsx(P1,{className:"ed-text-brand-link ed-size-5"})})]},p==null?void 0:p.id))}),(r==null?void 0:r.isOpen)&&E.jsx(xW,{previewImageInfo:r,setPreviewImageInfo:i})]})},sy=({context:t,emails:e})=>E.jsxs("div",{className:"ed-flex ed-items-start ed-gap-2 ",children:[E.jsxs("p",{className:"ed-text-dark",children:[t,":"]}),E.jsx("div",{className:"ed-flex ed-flex-wrap ed-gap-1",children:e.slice(0,3).map((n,r)=>E.jsxs("p",{className:"ed-text-regular ed-flex ed-items-center ed-gap-2",children:[dm(n,30),r===2&&Pe.size(e)-3>0?E.jsx(Y0,{classNames:{body:"ed-text-regular"},zIndex:99999999,placement:"top",title:e.join(", "),children:E.jsxs("span",{className:"ed-text-brand ed-cursor-pointer",children:["+",Pe.size(e)-3," more"]})}):""]},n))})]});var Bd={exports:{}},kW=Bd.exports,o4;function TW(){return o4||(o4=1,(function(t,e){(function(n,r){t.exports=r()})(kW,(function(){return function(n,r,i){n=n||{};var o=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(u,d,h,m){return o.fromToBase(u,d,h,m)}i.en.relativeTime=a,o.fromToBase=function(u,d,h,m,p){for(var v,b,y,w=h.$locale().relativeTime||a,_=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],A=_.length,C=0;C<A;C+=1){var S=_[C];S.d&&(v=m?i(u).diff(h,S.d,!0):h.diff(u,S.d,!0));var T=(n.rounding||Math.round)(Math.abs(v));if(y=v>0,T<=S.r||!S.r){T<=1&&C>0&&(S=_[C-1]);var k=w[S.l];p&&(T=p(""+T)),b=typeof k=="string"?k.replace("%d",T):k(T,d,S.l,y);break}}if(d)return b;var N=y?w.future:w.past;return typeof N=="function"?N(b):N.replace("%s",b)},o.to=function(u,d){return s(u,d,this,!0)},o.from=function(u,d){return s(u,d,this)};var c=function(u){return u.$u?i.utc():i()};o.toNow=function(u){return this.to(c(this),u)},o.fromNow=function(u){return this.from(c(this),u)}}}))})(Bd)),Bd.exports}var OW=TW();const RW=sa(OW);no.extend(RW);const NW=async(t,e)=>{const{policy:n,file:r}=t||{};return(await xg(n,r)).success?{name:t==null?void 0:t.name,title:r==null?void 0:r.name,size:r==null?void 0:r.size,sub_type:e,type:"conversation_activity_attachment"}:{}},IW=async(t,e)=>{var r;const n=[];try{const i=[];for(let o=0;o<t.length;o+=1)(r=t[o])!=null&&r.id||i.push(NW(t[o],e));n.push(...await Promise.all(i))}catch(i){console.error("Error occurred during file upload:",i),Rn("error","File upload fails","top-left")}return n};function PW(t){if(!t)return"";const e=no(t),n=no();return e.isValid()?n.diff(e,"minute")<1?"Just now":e.fromNow():""}const MW={open:{label:"Open",className:"ed-bg-[#DDF2FF] ed-text-[#1173C8] ed-border ed-border-[#A4D1F1] ed-rounded-full"},resolved:{label:"Resolved",className:"ed-bg-[#DBF8E2] ed-text-[#0E9342] ed-border ed-border-[#96D4AB] ed-rounded-full"}},LW=t=>{if(!t)return"";if(typeof window>"u")return t;const e=i4.sanitize(t,{FORBID_TAGS:["script"],FORBID_ATTR:["style","class"]}),n=document.createElement("div");return n.innerHTML=e,n.textContent||n.innerText||""},FW=(t=[],e=!1)=>{const n=[],r=[],i=[];return Pe.forEach(t,o=>{(o==null?void 0:o.type)==="to_email"&&(e?!(o!=null&&o.is_channel)&&!n.includes(o==null?void 0:o.email)&&n.push(o==null?void 0:o.email):n.push(o==null?void 0:o.email)),(o==null?void 0:o.type)==="cc_email"&&(e?Pe.some(r,{person_email:o==null?void 0:o.email})||r.push({person_email:o==null?void 0:o.email}):r.push(o==null?void 0:o.email)),(o==null?void 0:o.type)==="bcc_email"&&i.push(o==null?void 0:o.email)}),{toEmails:n,ccEmails:r,bccEmails:i}},DW="hh:mm A",a4=({activityMessage:t={},brand:e={},isReplying:n=!1})=>{const{id:r,analytics:i,emails:o=[],user:a,files:s,message:c,is_customer_reply:u,is_auto_response:d,is_ai_response:h,created_at:m}=t||{},[p,v]=R.useState(!1),b=()=>{v(!p)},{toEmails:y,ccEmails:w,bccEmails:_}=FW(o),A=R.useMemo(()=>h||d?"Eden AI bot":a!=null&&a.id?zu(a==null?void 0:a.first_name,a==null?void 0:a.last_name,a==null?void 0:a.email):(e==null?void 0:e.name)||"",[a==null?void 0:a.id,h,d]),C=R.useMemo(()=>a!=null&&a.id?{...(a==null?void 0:a.avatar_file)||{},default_image_name:Ni(a==null?void 0:a.first_name,a==null?void 0:a.last_name,a==null?void 0:a.email)}:{key:e==null?void 0:e.logo_icon_key,default_image_name:Ni(e==null?void 0:e.name)},[a==null?void 0:a.id]),S=R.useMemo(()=>n||!c?"":i4.sanitize(c,{ADD_ATTR:["class","className","style"],ADD_TAGS:["div","h6","p","span"]}),[c,n]),T=!n&&lc(S),k=Array.isArray(T)||R.isValidElement(T),N=k?"div":"p",P=R.useMemo(()=>k?(Array.isArray(T)?T:[T]).some(Q=>{var j,F;return(F=(j=Q==null?void 0:Q.props)==null?void 0:j.className)==null?void 0:F.includes("form-response")}):!1,[T,k]),V=()=>T?E.jsxs("div",{className:`ed-p-2.5 ${u?"ed-bg-blue-light":"ed-bg-white-light"} ${P?"ed-p-0 ed-bg-white":""} ed-rounded-lg ed-mt-2 ed-text-[13px]`,children:[E.jsxs(N,{className:`ed-text-border-dark ${P||k?"":"ed-whitespace-pre-line ed-break-words"}`,children:[Pe.size(o)>0&&E.jsxs("div",{className:"ed-border-b ed-pb-2",children:[E.jsxs("button",{type:"button",onClick:b,className:"ed-flex ed-gap-1 ed-text-regular ed-items-center",children:[E.jsx("span",{children:p?E.jsx(vf,{className:"ed-size-4"}):E.jsx(ms,{className:"ed-size-4"})})," ",E.jsxs("span",{children:[p?"Hide":"View"," recipient"]})]}),p&&E.jsxs("div",{className:"ed-flex ed-flex-col ed-gap-2 ed-mt-2",children:[Pe.size(y)>0&&E.jsx(sy,{context:"To",emails:y}),Pe.size(w)>0&&E.jsx(sy,{context:"CC",emails:w}),Pe.size(_)>0&&E.jsx(sy,{context:"BCC",emails:_})]})]}),E.jsx("div",{className:"ed-mt-2 ed-text-dark",children:T})]}),E.jsx(AW,{filesData:s})]}):null,U=i==null?void 0:i.some(H=>(H==null?void 0:H.status)!=="seen");return u?E.jsx("div",{className:"ed-max-w-[85%] ed-w-max ed-ml-auto",children:E.jsx(V,{})}):E.jsxs("div",{...U&&{"data-message-id":r},className:"ed-message ed-flex ed-gap-4 ed-my-4 ed-max-w-[85%] ed-w-max",children:[E.jsx("div",{className:"ed-size-7 ed-flex-shrink-0",children:h||d?E.jsx("div",{className:"ed-size-7 ed-flex ed-items-center ed-justify-center",children:E.jsx(dc,{})}):E.jsx(Nr,{className:"ed-size-7 ed-object-cover ed-rounded-full",alt:A,defaultImageClasses:"ed-w-7 ed-h-7",defaultUserNameTextSize:"ed-text-12",path:C==null?void 0:C.key,defaultImageName:C==null?void 0:C.default_image_name})}),E.jsxs("div",{children:[E.jsxs("div",{className:"ed-flex ed-items-center ed-gap-2",children:[E.jsx("p",{className:"ed-text-border-regular ed-font-medium ed-text-[13px]",children:A}),E.jsx("span",{className:"ed-text-border ed-text-[13px] ed-font-medium",children:no(m).format(DW)})]}),n?E.jsx("div",{className:"ed-py-4",children:E.jsx(As,{})}):E.jsx(V,{})]})]})},Hd={recommend_from_knowledge_base:`<div>
|
|
682
682
|
<div style="font-size: 14px; line-height: 1.6;">
|
|
683
683
|
{{ai_summary}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ed-widget",
|
|
3
3
|
"description": "A flexible and lightweight EasyDesk chat widget for React apps and websites. Supports both React integration and CDN-based embedding for fast, real-time customer support.",
|
|
4
|
-
"version": "1.51.0-beta.
|
|
4
|
+
"version": "1.51.0-beta.8",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Gain Solutions AS",
|
|
7
7
|
"license": "MIT",
|