@evercam/ui 1.0.0-preview-fix-compare-370f7aa81 → 1.0.0-preview-refactor-automations-tests-4134614c2
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/index.mjs +8 -11
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -4,7 +4,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4
4
|
isHoveringTimeline &&
|
|
5
5
|
!isHoveringEvent &&
|
|
6
6
|
!isHoveringMilestone
|
|
7
|
-
`}],staticClass:"e-timeline__tooltip e-border e-rounded e-px-2 -e-left-2/4 e-relative",class:e.computedClasses.tooltipSlot},[e._v(" "+e._s(s)+" ")])]},{timestamp:s,active:i&&!e.isHoveringMilestone})],2),r("div",{key:`${e.hoveredGroupedEvents?e.hoveredGroupedEvents[0].timestamp:(a=e.hoveredEvent)==null?void 0:a.timestamp}`,staticClass:"e-absolute e-z-50",style:e.eventTooltipStyle},[e._t("eventTooltip",function(){return[e.hoveredGroupedEvents?r("div",{directives:[{name:"show",rawName:"v-show",value:e.showEventTooltip&&e.isHoveringGroupedEvents,expression:"showEventTooltip && isHoveringGroupedEvents"}]},[r("div",[r("strong",[e._v(e._s(e.hoveredGroupedEvents.length)+" Events")]),e._v(": ")]),r("div",[r("strong",[e._v("From")]),e._v(":"+e._s(e.hoveredGroupedEvents[0].timestamp||e.hoveredGroupedEvents[0].startDate)+" ")]),r("div",[r("strong",[e._v("To")]),e._v(":"+e._s(e.hoveredGroupedEvents[e.hoveredGroupedEvents.length-1].timestamp||e.hoveredGroupedEvents[e.hoveredGroupedEvents.length-1].endDate)+" ")])]):e.showEventTooltip&&(e.hoveredEvent||e.hoveredCounts.length)?r("div",{directives:[{name:"show",rawName:"v-show",value:e.isHoveringEvent,expression:"isHoveringEvent"}],staticClass:"e-timeline__event-tooltip e-border e-rounded e-px-2 -e-left-2/4 e-relative",class:e.computedClasses.eventTooltipSlot},[e.hoveredCounts.length?r("div",[r("strong",[e._v("Timestamp")]),e._v(": "+e._s(e.hoveredEvent.timestamp)+" "),e._l(e.hoveredCounts,function(c,o){return r("div",{key:o},[r("strong",[e._v(e._s(c.label||c.type)+" Count")]),e._v(": "+e._s(c.count)+" ")])})],2):e.hoveredEvent?r("div",[e.hoveredEvent.timestamp?r("div",[r("strong",[e._v("Event time")]),e._v(": "+e._s(e.hoveredEvent.timestamp)+" ")]):e._e(),e.hoveredEvent.startDate?r("div",[r("strong",[e._v("From")]),e._v(":"+e._s(e.hoveredEvent.startDate)+" ")]):e._e(),e.hoveredEvent.endDate?r("div",[r("strong",[e._v("To")]),e._v(":"+e._s(e.hoveredEvent.endDate)+" ")]):e._e()]):e._e()]):e._e()]},{event:e.hoveredEvent,groupedEvents:e.hoveredGroupedEvents,counts:e.hoveredCounts,active:e.isHoveringEvent,type:e.hoveredEventType})],2)]}}],null,!0)})],1):e._e()]}}])})],1)},C2=[],b2=H(_2,y2,C2,!1,null,null,null,null);const Xs=b2.exports,x2=B.extend({name:"EVideoEmbed",props:{videoUrl:{type:String,required:!0},platform:{type:String,required:!0,validator:t=>["youtube","vimeo"].includes(t)},iframeListeners:{type:Object,default:()=>({})},iframeOptions:{type:Object,default:()=>({})}},computed:{videoId(){if(this.platform==="youtube"){const t=/^.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#\&\?]*).*/,e=this.videoUrl.match(t);return e&&e[1].length===11?e[1]:void 0}else if(this.platform==="vimeo"){const t=this.videoUrl.match(/vimeo\.com\/(\d+)/);return t?t[1]:void 0}},embedUrl(){var t;if(this.platform==="youtube"){const e=new URLSearchParams({quality:"1080p",...this.iframeOptions});return`https://www.youtube.com/embed/${this.videoId}?${e.toString()}`}else if(this.platform==="vimeo"&&this.videoId){const e=(t=this.videoUrl.split("/").pop())==null?void 0:t.split("?")[0],r=new URLSearchParams({h:e||"",quality:"1080p",...this.iframeOptions});return`https://player.vimeo.com/video/${this.videoId}?${r.toString()}`}return""}}}),Gd="";var w2=function(){var e=this,r=e._self._c;return r("div",{staticClass:"video-embed"},[r("iframe",e._g(e._b({attrs:{src:e.embedUrl,frameborder:"0",allowfullscreen:"",width:"100%",height:"100%",allow:"autoplay; fullscreen; picture-in-picture"}},"iframe",e.iframeOptions,!1),e.iframeListeners))])},S2=[],T2=H(x2,w2,S2,!1,null,"7e66cb69",null,null);const Vs=T2.exports,k2=B.extend({name:"EHeatmapBar",props:{items:{type:Array,default:()=>[]},selectedValue:{type:[String,Number],default:""},showCounts:{type:Boolean,default:!0},namesOnly:{type:Boolean,default:!1},showNames:{type:Boolean,default:!0},colors:{type:Array,default:()=>Vr("#ebedf0","#17459e",10)},colorsDark:{type:Array,default:()=>Vr("rgba(26,53,86,0.49)","#1f65ee",10)},label:{type:String,default:""},dense:{type:Boolean,default:!1},dark:{type:Boolean,default:!1}},data(){return{}},computed:{heatMapBarItems(){return this.items},maxCount(){return this.items.reduce((t,e)=>Math.max(t,e.count),0)},computedColors(){return this.dark?this.colorsDark:this.colors},textColor(){return{color:this.dark?"#eee":"#111"}}},methods:{getColorIndex(t){return Math.ceil(t/this.maxCount*(this.computedColors.length-1))},getColor(t){const e=this.getColorIndex(t);return this.computedColors[e]||this.computedColors[0]},getItemStyle(t){return{background:this.getColor(t)}},getItemClasses(t){return typeof t=="object"?t:{[t]:!0}},getCountTextStyle(t){const e=this.getColor(t);return{color:this.getContrastingPaletteColor(e)}},adjustColorBrightness(t,e){const r=z.hsl(t);return r.l+=e,r.l=Math.max(.1,Math.min(.9,r.l)),r.formatHex()},getContrastingPaletteColor(t){const e=z.color(t);if(!e)return t;const{r,g:n,b:s}=e.rgb(),a=(.299*r+.587*n+.114*s)/255>.5?-.5:.5;return this.adjustColorBrightness(t,a)}}}),Ud="";var $2=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-flex e-heatmap-bar",class:{"e-heatmap-bar--dense":e.dense,"e-heatmap-bar--dark":e.dark},style:e.textColor},[e._t("label",function(){return[e.label?r("div",{staticClass:"e-heatmap-bar__label",style:e.textColor},[e._v(" "+e._s(e.label)+" ")]):e._e()]}),e._l(e.heatMapBarItems,function({name:n,value:s,count:i,itemClass:a,id:c}){return r("div",{key:s,staticClass:"e-flex e-w-full e-justify-center e-items-center e-heatmap-bar__item",class:{"e-heatmap-bar__item--selected":e.selectedValue===s,...e.getItemClasses(a)},style:e.getItemStyle(i),on:{click:function(o){return e.$emit("change",s,a,c)}}},[e.namesOnly?r("span",{staticClass:"e-heatmap-bar__item__count",style:e.getCountTextStyle(i)},[e._v(" "+e._s(n)+" ")]):e.showCounts?r("span",{staticClass:"e-heatmap-bar__item__count",style:e.getCountTextStyle(i)},[e._v(" "+e._s(i>0?i:"")+" ")]):e._e(),e.showNames&&!e.namesOnly?r("span",{staticClass:"e-heatmap-bar__item__name e-text-xs e-text-black e-truncate",style:e.textColor},[e._v(" "+e._s(n)+" ")]):e._e()])})],2)},E2=[],M2=H(k2,$2,E2,!1,null,null,null,null);const dn=M2.exports,L2=B.extend({name:"EHoursHeatmap",components:{EHeatmapBar:dn},props:{items:{type:Array,default:()=>[]},selectedHour:{type:[String,Number],default:""},showHours:{type:Boolean,default:!0},colors:{type:Array,default:()=>["#ebedf0","#c0ddf9","#73b3f3","#3886e1","#17459e"]},label:{type:String,default:""},dense:{type:Boolean,default:!1}},computed:{itemsByHour(){return this.items.reduce((t,e)=>({...t,[ke(e.timestamp).format("H")]:e}),{})},heatmapBarItems(){return new Array(24).fill(void 0).reduce((t,e,r)=>{var n;return[...t,{name:this.getFormattedHour(r),value:r,count:((n=this.itemsByHour[r])==null?void 0:n.count)||0}]},[])}},methods:{getFormattedHour(t){const e=t.toString();return(e.length>1?e:`0${e}`)+(this.dense?"h":":00")}}});var D2=function(){var e=this,r=e._self._c;return r("EHeatmapBar",e._g({staticClass:"e-hours-heatmap",attrs:{items:e.heatmapBarItems,"selected-value":e.selectedHour,"show-names":e.showHours,colors:e.colors,label:e.label,dense:e.dense},scopedSlots:e._u([{key:"label",fn:function(){return[e._t("label")]},proxy:!0}],null,!0)},e.$listeners))},P2=[],z2=H(L2,D2,P2,!1,null,null,null,null);const Qs=z2.exports,O2=B.extend({name:"EReadMore",props:{content:{type:[Array,String],default:()=>null},maxLength:{type:Number,default:()=>2},showAll:{type:Boolean,default:!1},expandText:{type:String,default:"see more..."},collapseText:{type:String,default:"less"},moreTextWithPlaceholder:{type:String,default:"and {count} more..."},onePerLine:{type:Boolean,default:!1}},data(){return{showAllContent:!1}},computed:{hiddenContentLength(){var t,e;return Math.max(((e=(t=this.content)==null?void 0:t.length)!=null?e:0)-this.maxLength,0)},isArrayContent(){return Array.isArray(this.content)},isHiddenTextContent(){return this.hiddenContentLength>0&&!this.showAllContent&&!this.isArrayContent},isHiddenArrayContent(){return this.hiddenContentLength>0&&!this.showAllContent&&this.isArrayContent},isContentExpanded(){var t;return this.showAllContent&&((t=this.content)==null?void 0:t.length)>0},computedMoreText(){return this.moreTextWithPlaceholder.replace("{count}",this.hiddenContentLength.toString())}},mounted(){this.showAllContent=this.showAll},methods:{displayContent(){return this.isArrayContent?this.displayArrayContent():this.displayTextContent()},displayArrayContent(){var e,r;const t=this.onePerLine?"<br/>":", ";return((e=this.content)==null?void 0:e.length)>this.maxLength&&this.showAllContent===!1?this.content.slice(0,this.maxLength).join(t):((r=this.content)==null?void 0:r.length)>-1?this.content.join(t):""},displayTextContent(){var t,e;return((t=this.content)==null?void 0:t.length)>this.maxLength&&this.showAllContent===!1?this.content.substr(0,this.maxLength):((e=this.content)==null?void 0:e.length)>-1?this.content:""},toggleContentExpansion(){this.showAllContent=!this.showAllContent}}});var B2=function(){var e=this,r=e._self._c;return r("span",{staticClass:"e-read-more"},[r("span",{staticClass:"e-read-more__content mr-1",style:{"white-space":e.showAllContent?"initial":"nowrap"},domProps:{innerHTML:e._s(e.displayContent())}}),e.isHiddenArrayContent?r("span",{staticClass:"e-cursor-pointer e-text-primary",on:{click:e.toggleContentExpansion}},[e._v(" "+e._s(e.computedMoreText)+" ")]):e.isHiddenTextContent?r("span",{staticClass:"e-cursor-pointer e-text-primary",on:{click:e.toggleContentExpansion}},[e._v(" "+e._s(e.expandText)+" ")]):e._e(),e.isContentExpanded?r("span",{staticClass:"e-cursor-pointer e-text-primary",on:{click:e.toggleContentExpansion}},[e._v(" "+e._s(e.collapseText)+" ")]):e._e()])},I2=[],F2=H(O2,B2,I2,!1,null,null,null,null);const Ks=F2.exports,A2=B.extend({name:"ETruncatedDiv",props:{width:{type:[String,Number],required:!0},fixedWidth:{type:Boolean,default:!1}},computed:{containerStyle(){let t=this.width;return typeof t=="number"&&(t=`${this.width}px`),{maxWidth:t,...this.fixedWidth?{width:t}:{}}}}});var R2=function(){var e=this,r=e._self._c;return r("div",e._g(e._b({staticClass:"e-truncated-div e-truncate",style:e.containerStyle},"div",e.$attrs,!1),e.$listeners),[e._t("default")],2)},H2=[],N2=H(A2,R2,H2,!1,null,null,null,null);const Js=N2.exports,j2=B.extend({name:"ECompareSeparator",components:{EIcon:Fe},props:{xOffset:{type:[Number,String],default:50}},computed:{separatorStyle(){return{left:`${this.xOffset}%`}}}}),Zd="";var q2=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{staticClass:"e-compare-separator",on:{mousedown:function(n){return n.preventDefault(),(s=>e.$emit("mousedown",s)).apply(null,arguments)},touchstart:function(n){return n.preventDefault(),(s=>e.$emit("touchstart",s)).apply(null,arguments)}}},[r("div",{staticClass:"e-compare-separator__line",style:e.separatorStyle}),r("div",{staticClass:"e-compare-separator__icon e-flex e-justify-around e-items-center",style:e.separatorStyle},[r("EIcon",{attrs:{icon:"caret-left",color:"e-text-white",size:"Xl"}}),r("EIcon",{attrs:{icon:"caret-right",color:"e-text-white",size:"Xl"}})],1)])},W2=[],G2=H(j2,q2,W2,!1,null,null,null,null);const ei=G2.exports,We=B.extend({data(){return{eventListeners:[]}},beforeDestroy(){this.$removeEventListeners()},methods:{$addEventListener(t,e,r=document){if(!(r instanceof EventTarget)){console.error("$addEventListener: The target element is not an HTMLElement."),console.log("$addEventListener: got: ",r);return}r.addEventListener(t,e),this.eventListeners=[...this.eventListeners,{element:r,event:t,cb:e}]},$removeEventListener(t,e,r=document){var s;const n=this.eventListeners.find(i=>i.event===t&&i.element===r&&i.cb===e);n&&((s=n.element)==null||s.removeEventListener(t,e),this.eventListeners=this.eventListeners.filter(i=>i.event===t&&i.cb===e&&i.element===r))},$removeEventListeners(){this.eventListeners.forEach(({element:t,event:e,cb:r})=>{t==null||t.removeEventListener(e,r)}),this.eventListeners=[]}}}),U2=B.extend({name:"EDragResize",mixins:[We],props:{bounds:{type:Object,required:!0},initial:{type:Object,default:()=>({x:0,y:0,width:100,height:100})}},data(){return{lens:{...this.initial},isDragging:!1,dragOffset:{x:0,y:0},resizeHandles:["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"],currentHandle:null}},computed:{windowStyle(){return{position:"absolute",top:`${this.lens.y}px`,left:`${this.lens.x}px`,width:`${this.lens.width}px`,height:`${this.lens.height}px`,border:"2px solid white",cursor:"move",boxSizing:"border-box"}}},watch:{lens:{handler(t){this.$emit("change",t)},deep:!0}},methods:{startDrag(t){const e=this.getPoint(t);this.dragOffset.x=e.x-this.lens.x,this.dragOffset.y=e.y-this.lens.y,this.isDragging=!0,this.$addEventListener("mousemove",this.onDrag),this.$addEventListener("mouseup",this.endDrag),this.$addEventListener("touchmove",this.onDrag),this.$addEventListener("touchend",this.endDrag)},onDrag(t){if(!this.isDragging)return;const e=this.getPoint(t),r=e.x-this.dragOffset.x,n=e.y-this.dragOffset.y,s=this.bounds,i=Math.max(s.left,Math.min(r,s.left+s.width-this.lens.width)),a=Math.max(s.top,Math.min(n,s.top+s.height-this.lens.height));this.lens.x=i,this.lens.y=a},endDrag(){this.isDragging=!1,this.$removeEventListener("mousemove",this.onDrag),this.$removeEventListener("mouseup",this.endDrag),this.$removeEventListener("touchmove",this.onDrag),this.$removeEventListener("touchend",this.endDrag)},startResize(t,e){this.currentHandle=t,this.dragOffset=this.getPoint(e),this.$addEventListener("mousemove",this.onResize),this.$addEventListener("mouseup",this.endResize),this.$addEventListener("touchmove",this.onResize),this.$addEventListener("touchend",this.endResize)},onResize(t){const e=this.getPoint(t),r=e.x-this.dragOffset.x,n=e.y-this.dragOffset.y;let{x:s,y:i,width:a,height:c}=this.lens;switch(this.currentHandle){case"top-left":s+=r,i+=n,a-=r,c-=n;break;case"top":i+=n,c-=n;break;case"top-right":i+=n,a+=r,c-=n;break;case"right":a+=r;break;case"bottom-right":a+=r,c+=n;break;case"bottom":c+=n;break;case"bottom-left":s+=r,a-=r,c+=n;break;case"left":s+=r,a-=r;break}const o=this.bounds,l=50;a=Math.max(l,Math.min(o.width,a)),c=Math.max(l,Math.min(o.height,c)),s=Math.max(o.left,Math.min(s,o.left+o.width-a)),i=Math.max(o.top,Math.min(i,o.top+o.height-c)),this.lens={x:s,y:i,width:a,height:c},this.dragOffset=e},endResize(){this.currentHandle=null,document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResize),document.removeEventListener("touchmove",this.onResize),document.removeEventListener("touchend",this.endResize)},getPoint(t){return t instanceof MouseEvent?{x:t.clientX,y:t.clientY}:{x:t.touches[0].clientX,y:t.touches[0].clientY}}}}),Yd="";var Z2=function(){var e=this,r=e._self._c;return r("div",{staticClass:"compare-window",style:e.windowStyle,on:{mousedown:e.startDrag,touchstart:e.startDrag}},e._l(e.resizeHandles,function(n){return r("div",{key:n,staticClass:"resize-handle",class:"resize-"+n,on:{mousedown:function(s){return s.stopPropagation(),s.preventDefault(),e.startResize(n,s)},touchstart:function(s){return s.stopPropagation(),s.preventDefault(),e.startResize(n,s)}}})}),0)},Y2=[],X2=H(U2,Z2,Y2,!1,null,"75e287d0",null,null);const hn=X2.exports,V2=B.extend({name:"EImagesComparator",components:{EDragResize:hn},props:{beforeImageSrc:String,afterImageSrc:String,isLoading:Boolean,mode:{type:String,default:nt.Curtain,validator:t=>Object.values(nt).includes(t)},transparency:{type:Number,default:.5}},data(){return{separatorPositionX:50,isSeparatorDragging:!1,containerRect:{},computedImageDimension:{width:0,height:0,left:0,top:0},zoomState:{},touchIdentifier:null,startTouchX:0,startSeparatorPositionX:50,windowState:{x:200,y:200,width:200,height:200},CompareMode:nt,isBeforeImageLoaded:!1,isAfterImageLoaded:!1}},computed:{beforeImageStyle(){if(this.isComponentLoading)return{clip:"none"};if(this.mode===nt.Window){const{x:t,y:e,width:r,height:n}=this.windowState;return{clip:`rect(${e}px, ${t+r}px, ${e+n}px, ${t}px)`}}else return this.mode===nt.Curtain?{clip:`rect(auto, ${this.computedImageDimension.width*this.separatorPositionX/100+this.computedImageDimension.left}px, auto, auto)`}:{opacity:`${1-this.transparency}`}},afterImageStyle(){return{opacity:this.mode===nt.Transparency?`${this.transparency}`:"1"}},windowBounds(){return{top:this.computedImageDimension.top,left:this.computedImageDimension.left,width:this.computedImageDimension.width,height:this.computedImageDimension.height}},watermarkStyle(){var d;const{width:t,height:e,left:r,top:n}=this.computedImageDimension,s=Math.max(t,e),i=.05,a=.01,c=s*i,o=s*a,l={width:`${c}px`,height:`${c}px`,left:`${r+t-c-o}px`,top:`${n+e-c-o}px`};return((d=this.zoomState)==null?void 0:d.zoomLevel)>1&&(l.opacity="0"),l},computedSeparatorPositionX(){const{left:t,width:e}=this.computedImageDimension,r=this.containerRect.width;return(t+e*this.separatorPositionX/100)/r*100},isComponentLoading(){return this.isLoading||!this.isBeforeImageLoaded||!this.isAfterImageLoaded}},watch:{beforeImageSrc(){this.isBeforeImageLoaded=!1},afterImageSrc(){this.isAfterImageLoaded=!1}},methods:{onZoomChange(t){this.zoomState={...t}},handleAfterImageLoad(){this.isAfterImageLoaded=!0,this.handleResize()},handleBeforeImageLoad(){this.isBeforeImageLoaded=!0,this.handleResize()},handleResize(){var a;const t=this.$refs.container;this.containerRect=t.getBoundingClientRect();const e=(a=this.$refs.afterImage)==null?void 0:a.$refs.image;if(!(e!=null&&e.naturalWidth)||!(e!=null&&e.naturalHeight))return;const r=t.clientWidth,n=t.clientHeight,s=e.naturalWidth/e.naturalHeight;if(r/n>s){const c=n*s;this.computedImageDimension={width:c,height:n,left:(r-c)/2,top:0}}else{const c=r/s;this.computedImageDimension={width:r,height:c,top:(n-c)/2,left:0}}},handleMouseMove(t){if(!this.isSeparatorDragging)return;const r=(t.clientX-this.containerRect.left-this.computedImageDimension.left)/this.computedImageDimension.width*100;this.separatorPositionX=Math.max(0,Math.min(100,r))},handleMouseDown(){this.isSeparatorDragging=!0,document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(){this.isSeparatorDragging=!1,document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)},handleTouchStart(t){const e=t.touches[0];e&&(this.touchIdentifier=e.identifier,this.startTouchX=e.clientX,this.startSeparatorPositionX=this.separatorPositionX,document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("touchend",this.handleTouchEnd))},handleTouchMove(t){const e=Array.from(t.touches).find(s=>s.identifier===this.touchIdentifier);if(!e)return;const n=(e.clientX-this.startTouchX)/this.computedImageDimension.width*100+this.startSeparatorPositionX;this.separatorPositionX=Math.max(0,Math.min(100,n))},handleTouchEnd(){document.removeEventListener("touchmove",this.handleTouchMove),document.removeEventListener("touchend",this.handleTouchEnd),this.touchIdentifier=null},handleWindowChange(t){Object.assign(this.windowState,t)}}}),Xd="";var Q2=function(){var e=this,r=e._self._c;return r("div",{directives:[{name:"resize-observer",rawName:"v-resize-observer",value:e.handleResize,expression:"handleResize"}],ref:"container",staticClass:"e-h-full e-w-full e-relative e-bg-black e-border-black !e-select-none"},[r("div",{staticClass:"e-w-full e-h-full"},[r("EZoomableImg",{ref:"afterImage",staticClass:"e-block e-w-full e-h-full e-image-comparator__image",style:e.afterImageStyle,attrs:{src:e.afterImageSrc,alt:"After Image",embedded:!0,allowZoom:!0,pan:!0,slider:!0,showMiniature:!0,hideContentOnBlur:!1},on:{change:e.onZoomChange,load:e.handleAfterImageLoad}}),r("EZoomableImg",{staticClass:"!e-absolute e-top-0 e-left-0 e-pointer-events-none e-block e-w-full e-h-full e-image-comparator__image",style:e.beforeImageStyle,attrs:{src:e.beforeImageSrc,alt:"Before Image",embedded:!0,allowZoom:!1,pan:!1,slider:!1,showMiniature:!1,initialParams:e.zoomState},on:{load:e.handleBeforeImageLoad}})],1),e.mode===e.CompareMode.Curtain&&!e.isComponentLoading?r("ECompareSeparator",{attrs:{"x-offset":e.computedSeparatorPositionX},on:{mousedown:function(n){return n.stopPropagation(),n.preventDefault(),e.handleMouseDown.apply(null,arguments)},touchstart:e.handleTouchStart}}):e._e(),e.mode==="window"&&!e.isComponentLoading?r("EDragResize",{attrs:{initial:e.windowState,bounds:e.windowBounds},on:{change:e.handleWindowChange}}):e._e(),e.isComponentLoading?e._e():r("div",{staticClass:"e-images-comparator__watermark",style:e.watermarkStyle},[e._t("watermark",null,null,e.watermarkStyle)],2),e.isComponentLoading?r("div",{staticClass:"e-images-comparator__overlay"},[e._t("overlay")],2):e._e(),r("div",{staticClass:"e-images-comparator__imageOverlay"},[e._t("imageOverlay")],2),e._t("default",null,{imageDimensions:e.computedImageDimension})],2)},K2=[],J2=H(V2,Q2,K2,!1,null,"e5b9302f",null,null);const ti=J2.exports,Ue=B.extend({data(){return{timeouts:[]}},beforeDestroy(){this.$clearTimeouts()},methods:{$setTimeout(t,e=0){const r=setTimeout(t,e);return this.timeouts=[...this.timeouts,r],r},$clearTimeouts(){this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts=[]}}}),e5=B.extend({name:"EExpandableMenu",mixins:[Ue,We],props:{padding:{type:Number,default:4},direction:{type:String,default:"top",validator:t=>["top","right","bottom","left"].includes(t)},isMobile:{type:Boolean,default:!1}},data(){return{isMenuOpened:!1,baseSize:{},menuObserver:null}},computed:{row(){return["right","left"].includes(this.direction)},reverse(){return["top","left"].includes(this.direction)}},watch:{isMobile(){this.adjustButtonsPositions()},direction(){this.adjustButtonsPositions()},padding(){this.adjustButtonsPositions()}},mounted(){const t=this.$refs.activator,e=(t==null?void 0:t.getBoundingClientRect())||{};this.baseSize={width:`${e.width}px`,height:`${e.height}px`},this.isMobile||this.$setTimeout(this.toggleMenu,100),this.$addEventListener("resize",this.adjustButtonsPositions),this.observeMenuContentChanges()},beforeDestroy(){this.menuObserver&&this.menuObserver.disconnect()},methods:{toggleMenu(){this.isMenuOpened=!this.isMenuOpened,this.adjustButtonsPositions()},adjustButtonsPositions(){const t=this.$refs.menu,e=Array.from(t==null?void 0:t.children).filter(l=>!l.classList.contains("v-tooltip"));if(!e||!e.length)return;const r=this.isMobile?30:40,n=Array.from(e),s=this.$refs.activator,i=s==null?void 0:s.getBoundingClientRect(),a=Math.min(i[this.row?"width":"height"],r),c=this.isMenuOpened?a+this.padding:0,o=this.row?"X":"Y";t.style.transform=`translate${o}(${(this.reverse?-1:1)*c}px)`,n.forEach((l,d)=>{const h=l.getBoundingClientRect(),m=h==null?void 0:h[this.row?"width":"height"],C=(m>r?m:r)+this.padding,x=this.isMenuOpened?C*d:0;l.style.transform=`translate${o}(${(this.reverse?-1:1)*x}px)`})},observeMenuContentChanges(){const t=this.$refs.menu;t&&(this.menuObserver=new MutationObserver(()=>{this.adjustButtonsPositions()}),this.menuObserver.observe(t,{childList:!0,subtree:!0}))}}}),Vd="";var t5=function(){var e=this,r=e._self._c;return r("div",{staticClass:"expandable-menu",class:{"expandable-menu--row":e.row,"expandable-menu--column":!e.row,"expandable-menu--reverse":e.reverse,"expandable-menu--open":e.isMenuOpened,"expandable-menu--closed":!e.isMenuOpened},style:e.baseSize},[r("div",{staticClass:"expandable-menu__container",style:e.baseSize},[r("div",{ref:"activator",staticClass:"v-btn--no-active e-cursor-pointer expandable-menu__activator",on:{click:e.toggleMenu}},[e._t("activator")],2),r("div",e._g({ref:"menu",staticClass:"e-flex e-flex-col expandable-menu__menu",class:{"expandable-menu__menu--closed":!e.isMenuOpened,"expandable-menu__menu--open":e.isMenuOpened,"e-py-2":!e.row,"e-py-0":e.row},attrs:{"data-test-id":"action-buttons-menu"}},e.$listeners),[e._t("default")],2)])])},r5=[],n5=H(e5,t5,r5,!1,null,null,null,null);const ri=n5.exports,s5=B.extend({name:"BaseIcon",props:{name:{type:String,default:"box"},color:{type:String,default:"#3c3c3c"},viewBox:{type:String,default:"0 0 128 128"},width:{type:[Number,String],default:60},height:{type:[Number,String],default:60},size:{type:[Number,String,null],default:null}}});var i5=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("svg",e._g({staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:e.viewBox,width:e.size||e.width,height:e.size||e.height,"aria-labelledby":e.name,role:"presentation"}},e.$listeners),[r("g",{ref:"group",attrs:{fill:e.color}},[e._t("default",null,{color:e.color})],2)])},a5=[],o5=H(s5,i5,a5,!1,null,null,null,null);const de=o5.exports,l5=B.extend({name:"Bim",components:{BaseIcon:de},props:{color:{type:String,default:"white"}}});var c5=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("BaseIcon",e._b({attrs:{small:!0,width:"22px",height:"22px",viewBox:"0 0 22 22",color:e.color}},"BaseIcon",e.$attrs,!1),[r("g",{attrs:{transform:"translate(0.000000,512.000000) scale(0.100000,-0.100000)"}},[r("path",{style:`fill: ${e.color}`,attrs:{d:`M3.7,5016.4v-43.8l20.9,0.2c19.5,0.2,21.1,0.3,24.7,1.3c5.8,1.6,9.9,3.9,13.3,7.2c3.4,3.5,5.3,6.7,6.4,11
|
|
7
|
+
`}],staticClass:"e-timeline__tooltip e-border e-rounded e-px-2 -e-left-2/4 e-relative",class:e.computedClasses.tooltipSlot},[e._v(" "+e._s(s)+" ")])]},{timestamp:s,active:i&&!e.isHoveringMilestone})],2),r("div",{key:`${e.hoveredGroupedEvents?e.hoveredGroupedEvents[0].timestamp:(a=e.hoveredEvent)==null?void 0:a.timestamp}`,staticClass:"e-absolute e-z-50",style:e.eventTooltipStyle},[e._t("eventTooltip",function(){return[e.hoveredGroupedEvents?r("div",{directives:[{name:"show",rawName:"v-show",value:e.showEventTooltip&&e.isHoveringGroupedEvents,expression:"showEventTooltip && isHoveringGroupedEvents"}]},[r("div",[r("strong",[e._v(e._s(e.hoveredGroupedEvents.length)+" Events")]),e._v(": ")]),r("div",[r("strong",[e._v("From")]),e._v(":"+e._s(e.hoveredGroupedEvents[0].timestamp||e.hoveredGroupedEvents[0].startDate)+" ")]),r("div",[r("strong",[e._v("To")]),e._v(":"+e._s(e.hoveredGroupedEvents[e.hoveredGroupedEvents.length-1].timestamp||e.hoveredGroupedEvents[e.hoveredGroupedEvents.length-1].endDate)+" ")])]):e.showEventTooltip&&(e.hoveredEvent||e.hoveredCounts.length)?r("div",{directives:[{name:"show",rawName:"v-show",value:e.isHoveringEvent,expression:"isHoveringEvent"}],staticClass:"e-timeline__event-tooltip e-border e-rounded e-px-2 -e-left-2/4 e-relative",class:e.computedClasses.eventTooltipSlot},[e.hoveredCounts.length?r("div",[r("strong",[e._v("Timestamp")]),e._v(": "+e._s(e.hoveredEvent.timestamp)+" "),e._l(e.hoveredCounts,function(c,o){return r("div",{key:o},[r("strong",[e._v(e._s(c.label||c.type)+" Count")]),e._v(": "+e._s(c.count)+" ")])})],2):e.hoveredEvent?r("div",[e.hoveredEvent.timestamp?r("div",[r("strong",[e._v("Event time")]),e._v(": "+e._s(e.hoveredEvent.timestamp)+" ")]):e._e(),e.hoveredEvent.startDate?r("div",[r("strong",[e._v("From")]),e._v(":"+e._s(e.hoveredEvent.startDate)+" ")]):e._e(),e.hoveredEvent.endDate?r("div",[r("strong",[e._v("To")]),e._v(":"+e._s(e.hoveredEvent.endDate)+" ")]):e._e()]):e._e()]):e._e()]},{event:e.hoveredEvent,groupedEvents:e.hoveredGroupedEvents,counts:e.hoveredCounts,active:e.isHoveringEvent,type:e.hoveredEventType})],2)]}}],null,!0)})],1):e._e()]}}])})],1)},C2=[],b2=H(_2,y2,C2,!1,null,null,null,null);const Xs=b2.exports,x2=B.extend({name:"EVideoEmbed",props:{videoUrl:{type:String,required:!0},platform:{type:String,required:!0,validator:t=>["youtube","vimeo"].includes(t)},iframeListeners:{type:Object,default:()=>({})},iframeOptions:{type:Object,default:()=>({})}},computed:{videoId(){if(this.platform==="youtube"){const t=/^.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#\&\?]*).*/,e=this.videoUrl.match(t);return e&&e[1].length===11?e[1]:void 0}else if(this.platform==="vimeo"){const t=this.videoUrl.match(/vimeo\.com\/(\d+)/);return t?t[1]:void 0}},embedUrl(){var t;if(this.platform==="youtube"){const e=new URLSearchParams({quality:"1080p",...this.iframeOptions});return`https://www.youtube.com/embed/${this.videoId}?${e.toString()}`}else if(this.platform==="vimeo"&&this.videoId){const e=(t=this.videoUrl.split("/").pop())==null?void 0:t.split("?")[0],r=new URLSearchParams({h:e||"",quality:"1080p",...this.iframeOptions});return`https://player.vimeo.com/video/${this.videoId}?${r.toString()}`}return""}}}),Gd="";var w2=function(){var e=this,r=e._self._c;return r("div",{staticClass:"video-embed"},[r("iframe",e._g(e._b({attrs:{src:e.embedUrl,frameborder:"0",allowfullscreen:"",width:"100%",height:"100%",allow:"autoplay; fullscreen; picture-in-picture"}},"iframe",e.iframeOptions,!1),e.iframeListeners))])},S2=[],T2=H(x2,w2,S2,!1,null,"7e66cb69",null,null);const Vs=T2.exports,k2=B.extend({name:"EHeatmapBar",props:{items:{type:Array,default:()=>[]},selectedValue:{type:[String,Number],default:""},showCounts:{type:Boolean,default:!0},namesOnly:{type:Boolean,default:!1},showNames:{type:Boolean,default:!0},colors:{type:Array,default:()=>Vr("#ebedf0","#17459e",10)},colorsDark:{type:Array,default:()=>Vr("rgba(26,53,86,0.49)","#1f65ee",10)},label:{type:String,default:""},dense:{type:Boolean,default:!1},dark:{type:Boolean,default:!1}},data(){return{}},computed:{heatMapBarItems(){return this.items},maxCount(){return this.items.reduce((t,e)=>Math.max(t,e.count),0)},computedColors(){return this.dark?this.colorsDark:this.colors},textColor(){return{color:this.dark?"#eee":"#111"}}},methods:{getColorIndex(t){return Math.ceil(t/this.maxCount*(this.computedColors.length-1))},getColor(t){const e=this.getColorIndex(t);return this.computedColors[e]||this.computedColors[0]},getItemStyle(t){return{background:this.getColor(t)}},getItemClasses(t){return typeof t=="object"?t:{[t]:!0}},getCountTextStyle(t){const e=this.getColor(t);return{color:this.getContrastingPaletteColor(e)}},adjustColorBrightness(t,e){const r=z.hsl(t);return r.l+=e,r.l=Math.max(.1,Math.min(.9,r.l)),r.formatHex()},getContrastingPaletteColor(t){const e=z.color(t);if(!e)return t;const{r,g:n,b:s}=e.rgb(),a=(.299*r+.587*n+.114*s)/255>.5?-.5:.5;return this.adjustColorBrightness(t,a)}}}),Ud="";var $2=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-flex e-heatmap-bar",class:{"e-heatmap-bar--dense":e.dense,"e-heatmap-bar--dark":e.dark},style:e.textColor},[e._t("label",function(){return[e.label?r("div",{staticClass:"e-heatmap-bar__label",style:e.textColor},[e._v(" "+e._s(e.label)+" ")]):e._e()]}),e._l(e.heatMapBarItems,function({name:n,value:s,count:i,itemClass:a,id:c}){return r("div",{key:s,staticClass:"e-flex e-w-full e-justify-center e-items-center e-heatmap-bar__item",class:{"e-heatmap-bar__item--selected":e.selectedValue===s,...e.getItemClasses(a)},style:e.getItemStyle(i),on:{click:function(o){return e.$emit("change",s,a,c)}}},[e.namesOnly?r("span",{staticClass:"e-heatmap-bar__item__count",style:e.getCountTextStyle(i)},[e._v(" "+e._s(n)+" ")]):e.showCounts?r("span",{staticClass:"e-heatmap-bar__item__count",style:e.getCountTextStyle(i)},[e._v(" "+e._s(i>0?i:"")+" ")]):e._e(),e.showNames&&!e.namesOnly?r("span",{staticClass:"e-heatmap-bar__item__name e-text-xs e-text-black e-truncate",style:e.textColor},[e._v(" "+e._s(n)+" ")]):e._e()])})],2)},E2=[],M2=H(k2,$2,E2,!1,null,null,null,null);const dn=M2.exports,L2=B.extend({name:"EHoursHeatmap",components:{EHeatmapBar:dn},props:{items:{type:Array,default:()=>[]},selectedHour:{type:[String,Number],default:""},showHours:{type:Boolean,default:!0},colors:{type:Array,default:()=>["#ebedf0","#c0ddf9","#73b3f3","#3886e1","#17459e"]},label:{type:String,default:""},dense:{type:Boolean,default:!1}},computed:{itemsByHour(){return this.items.reduce((t,e)=>({...t,[ke(e.timestamp).format("H")]:e}),{})},heatmapBarItems(){return new Array(24).fill(void 0).reduce((t,e,r)=>{var n;return[...t,{name:this.getFormattedHour(r),value:r,count:((n=this.itemsByHour[r])==null?void 0:n.count)||0}]},[])}},methods:{getFormattedHour(t){const e=t.toString();return(e.length>1?e:`0${e}`)+(this.dense?"h":":00")}}});var D2=function(){var e=this,r=e._self._c;return r("EHeatmapBar",e._g({staticClass:"e-hours-heatmap",attrs:{items:e.heatmapBarItems,"selected-value":e.selectedHour,"show-names":e.showHours,colors:e.colors,label:e.label,dense:e.dense},scopedSlots:e._u([{key:"label",fn:function(){return[e._t("label")]},proxy:!0}],null,!0)},e.$listeners))},P2=[],z2=H(L2,D2,P2,!1,null,null,null,null);const Qs=z2.exports,O2=B.extend({name:"EReadMore",props:{content:{type:[Array,String],default:()=>null},maxLength:{type:Number,default:()=>2},showAll:{type:Boolean,default:!1},expandText:{type:String,default:"see more..."},collapseText:{type:String,default:"less"},moreTextWithPlaceholder:{type:String,default:"and {count} more..."},onePerLine:{type:Boolean,default:!1}},data(){return{showAllContent:!1}},computed:{hiddenContentLength(){var t,e;return Math.max(((e=(t=this.content)==null?void 0:t.length)!=null?e:0)-this.maxLength,0)},isArrayContent(){return Array.isArray(this.content)},isHiddenTextContent(){return this.hiddenContentLength>0&&!this.showAllContent&&!this.isArrayContent},isHiddenArrayContent(){return this.hiddenContentLength>0&&!this.showAllContent&&this.isArrayContent},isContentExpanded(){var t;return this.showAllContent&&((t=this.content)==null?void 0:t.length)>0},computedMoreText(){return this.moreTextWithPlaceholder.replace("{count}",this.hiddenContentLength.toString())}},mounted(){this.showAllContent=this.showAll},methods:{displayContent(){return this.isArrayContent?this.displayArrayContent():this.displayTextContent()},displayArrayContent(){var e,r;const t=this.onePerLine?"<br/>":", ";return((e=this.content)==null?void 0:e.length)>this.maxLength&&this.showAllContent===!1?this.content.slice(0,this.maxLength).join(t):((r=this.content)==null?void 0:r.length)>-1?this.content.join(t):""},displayTextContent(){var t,e;return((t=this.content)==null?void 0:t.length)>this.maxLength&&this.showAllContent===!1?this.content.substr(0,this.maxLength):((e=this.content)==null?void 0:e.length)>-1?this.content:""},toggleContentExpansion(){this.showAllContent=!this.showAllContent}}});var B2=function(){var e=this,r=e._self._c;return r("span",{staticClass:"e-read-more"},[r("span",{staticClass:"e-read-more__content mr-1",style:{"white-space":e.showAllContent?"initial":"nowrap"},domProps:{innerHTML:e._s(e.displayContent())}}),e.isHiddenArrayContent?r("span",{staticClass:"e-cursor-pointer e-text-primary",on:{click:e.toggleContentExpansion}},[e._v(" "+e._s(e.computedMoreText)+" ")]):e.isHiddenTextContent?r("span",{staticClass:"e-cursor-pointer e-text-primary",on:{click:e.toggleContentExpansion}},[e._v(" "+e._s(e.expandText)+" ")]):e._e(),e.isContentExpanded?r("span",{staticClass:"e-cursor-pointer e-text-primary",on:{click:e.toggleContentExpansion}},[e._v(" "+e._s(e.collapseText)+" ")]):e._e()])},I2=[],F2=H(O2,B2,I2,!1,null,null,null,null);const Ks=F2.exports,A2=B.extend({name:"ETruncatedDiv",props:{width:{type:[String,Number],required:!0},fixedWidth:{type:Boolean,default:!1}},computed:{containerStyle(){let t=this.width;return typeof t=="number"&&(t=`${this.width}px`),{maxWidth:t,...this.fixedWidth?{width:t}:{}}}}});var R2=function(){var e=this,r=e._self._c;return r("div",e._g(e._b({staticClass:"e-truncated-div e-truncate",style:e.containerStyle},"div",e.$attrs,!1),e.$listeners),[e._t("default")],2)},H2=[],N2=H(A2,R2,H2,!1,null,null,null,null);const Js=N2.exports,j2=B.extend({name:"ECompareSeparator",components:{EIcon:Fe},props:{xOffset:{type:[Number,String],default:50}},computed:{separatorStyle(){return{left:`${this.xOffset}%`}}}}),Zd="";var q2=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{staticClass:"e-compare-separator",on:{mousedown:function(n){return n.preventDefault(),(s=>e.$emit("mousedown",s)).apply(null,arguments)},touchstart:function(n){return n.preventDefault(),(s=>e.$emit("touchstart",s)).apply(null,arguments)}}},[r("div",{staticClass:"e-compare-separator__line",style:e.separatorStyle}),r("div",{staticClass:"e-compare-separator__icon e-flex e-justify-around e-items-center",style:e.separatorStyle},[r("EIcon",{attrs:{icon:"caret-left",color:"e-text-white",size:"Xl"}}),r("EIcon",{attrs:{icon:"caret-right",color:"e-text-white",size:"Xl"}})],1)])},W2=[],G2=H(j2,q2,W2,!1,null,null,null,null);const ei=G2.exports,We=B.extend({data(){return{eventListeners:[]}},beforeDestroy(){this.$removeEventListeners()},methods:{$addEventListener(t,e,r=document){if(!(r instanceof EventTarget)){console.error("$addEventListener: The target element is not an HTMLElement."),console.log("$addEventListener: got: ",r);return}r.addEventListener(t,e),this.eventListeners=[...this.eventListeners,{element:r,event:t,cb:e}]},$removeEventListener(t,e,r=document){var s;const n=this.eventListeners.find(i=>i.event===t&&i.element===r&&i.cb===e);n&&((s=n.element)==null||s.removeEventListener(t,e),this.eventListeners=this.eventListeners.filter(i=>i.event===t&&i.cb===e&&i.element===r))},$removeEventListeners(){this.eventListeners.forEach(({element:t,event:e,cb:r})=>{t==null||t.removeEventListener(e,r)}),this.eventListeners=[]}}}),U2=B.extend({name:"EDragResize",mixins:[We],props:{bounds:{type:Object,required:!0},initial:{type:Object,default:()=>({x:0,y:0,width:100,height:100})}},data(){return{lens:{...this.initial},isDragging:!1,dragOffset:{x:0,y:0},resizeHandles:["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"],currentHandle:null}},computed:{windowStyle(){return{position:"absolute",top:`${this.lens.y}px`,left:`${this.lens.x}px`,width:`${this.lens.width}px`,height:`${this.lens.height}px`,border:"2px solid white",cursor:"move",boxSizing:"border-box"}}},watch:{lens:{handler(t){this.$emit("change",t)},deep:!0}},methods:{startDrag(t){const e=this.getPoint(t);this.dragOffset.x=e.x-this.lens.x,this.dragOffset.y=e.y-this.lens.y,this.isDragging=!0,this.$addEventListener("mousemove",this.onDrag),this.$addEventListener("mouseup",this.endDrag),this.$addEventListener("touchmove",this.onDrag),this.$addEventListener("touchend",this.endDrag)},onDrag(t){if(!this.isDragging)return;const e=this.getPoint(t),r=e.x-this.dragOffset.x,n=e.y-this.dragOffset.y,s=this.bounds,i=Math.max(s.left,Math.min(r,s.left+s.width-this.lens.width)),a=Math.max(s.top,Math.min(n,s.top+s.height-this.lens.height));this.lens.x=i,this.lens.y=a},endDrag(){this.isDragging=!1,this.$removeEventListener("mousemove",this.onDrag),this.$removeEventListener("mouseup",this.endDrag),this.$removeEventListener("touchmove",this.onDrag),this.$removeEventListener("touchend",this.endDrag)},startResize(t,e){this.currentHandle=t,this.dragOffset=this.getPoint(e),this.$addEventListener("mousemove",this.onResize),this.$addEventListener("mouseup",this.endResize),this.$addEventListener("touchmove",this.onResize),this.$addEventListener("touchend",this.endResize)},onResize(t){const e=this.getPoint(t),r=e.x-this.dragOffset.x,n=e.y-this.dragOffset.y;let{x:s,y:i,width:a,height:c}=this.lens;switch(this.currentHandle){case"top-left":s+=r,i+=n,a-=r,c-=n;break;case"top":i+=n,c-=n;break;case"top-right":i+=n,a+=r,c-=n;break;case"right":a+=r;break;case"bottom-right":a+=r,c+=n;break;case"bottom":c+=n;break;case"bottom-left":s+=r,a-=r,c+=n;break;case"left":s+=r,a-=r;break}const o=this.bounds,l=50;a=Math.max(l,Math.min(o.width,a)),c=Math.max(l,Math.min(o.height,c)),s=Math.max(o.left,Math.min(s,o.left+o.width-a)),i=Math.max(o.top,Math.min(i,o.top+o.height-c)),this.lens={x:s,y:i,width:a,height:c},this.dragOffset=e},endResize(){this.currentHandle=null,document.removeEventListener("mousemove",this.onResize),document.removeEventListener("mouseup",this.endResize),document.removeEventListener("touchmove",this.onResize),document.removeEventListener("touchend",this.endResize)},getPoint(t){return t instanceof MouseEvent?{x:t.clientX,y:t.clientY}:{x:t.touches[0].clientX,y:t.touches[0].clientY}}}}),Yd="";var Z2=function(){var e=this,r=e._self._c;return r("div",{staticClass:"compare-window",style:e.windowStyle,on:{mousedown:e.startDrag,touchstart:e.startDrag}},e._l(e.resizeHandles,function(n){return r("div",{key:n,staticClass:"resize-handle",class:"resize-"+n,on:{mousedown:function(s){return s.stopPropagation(),s.preventDefault(),e.startResize(n,s)},touchstart:function(s){return s.stopPropagation(),s.preventDefault(),e.startResize(n,s)}}})}),0)},Y2=[],X2=H(U2,Z2,Y2,!1,null,"75e287d0",null,null);const hn=X2.exports,V2=B.extend({name:"EImagesComparator",components:{EDragResize:hn},props:{beforeImageSrc:String,afterImageSrc:String,isLoading:Boolean,mode:{type:String,default:nt.Curtain,validator:t=>Object.values(nt).includes(t)},transparency:{type:Number,default:.5}},data(){return{separatorPositionX:50,isSeparatorDragging:!1,containerRect:{},computedImageDimension:{width:0,height:0,left:0,top:0},zoomState:{},touchIdentifier:null,startTouchX:0,startSeparatorPositionX:50,windowState:{x:200,y:200,width:200,height:200},CompareMode:nt,isBeforeImageLoaded:!1,isAfterImageLoaded:!1}},computed:{beforeImageStyle(){if(this.isLoading)return{clip:"none"};if(this.mode===nt.Window){const{x:t,y:e,width:r,height:n}=this.windowState;return{clip:`rect(${e}px, ${t+r}px, ${e+n}px, ${t}px)`}}else return this.mode===nt.Curtain?{clip:`rect(auto, ${this.computedImageDimension.width*this.separatorPositionX/100+this.computedImageDimension.left}px, auto, auto)`}:{opacity:`${1-this.transparency}`}},afterImageStyle(){return{opacity:this.mode===nt.Transparency?`${this.transparency}`:"1"}},windowBounds(){return{top:this.computedImageDimension.top,left:this.computedImageDimension.left,width:this.computedImageDimension.width,height:this.computedImageDimension.height}},watermarkStyle(){var d;const{width:t,height:e,left:r,top:n}=this.computedImageDimension,s=Math.max(t,e),i=.05,a=.01,c=s*i,o=s*a,l={width:`${c}px`,height:`${c}px`,left:`${r+t-c-o}px`,top:`${n+e-c-o}px`};return((d=this.zoomState)==null?void 0:d.zoomLevel)>1&&(l.opacity="0"),l},computedSeparatorPositionX(){const{left:t,width:e}=this.computedImageDimension,r=this.containerRect.width;return(t+e*this.separatorPositionX/100)/r*100},isComponentLoading(){return this.isLoading||!this.isBeforeImageLoaded||!this.isAfterImageLoaded}},watch:{isLoading(t){t&&(this.isBeforeImageLoaded=!1,this.isAfterImageLoaded=!1)}},methods:{onZoomChange(t){this.zoomState={...t}},handleAfterImageLoad(){this.isAfterImageLoaded=!0,this.handleResize()},handleBeforeImageLoad(){this.isBeforeImageLoaded=!0,this.handleResize()},handleResize(){var a;const t=this.$refs.container;this.containerRect=t.getBoundingClientRect();const e=(a=this.$refs.afterImage)==null?void 0:a.$refs.image;if(!(e!=null&&e.naturalWidth)||!(e!=null&&e.naturalHeight))return;const r=t.clientWidth,n=t.clientHeight,s=e.naturalWidth/e.naturalHeight;if(r/n>s){const c=n*s;this.computedImageDimension={width:c,height:n,left:(r-c)/2,top:0}}else{const c=r/s;this.computedImageDimension={width:r,height:c,top:(n-c)/2,left:0}}},handleMouseMove(t){if(!this.isSeparatorDragging)return;const r=(t.clientX-this.containerRect.left-this.computedImageDimension.left)/this.computedImageDimension.width*100;this.separatorPositionX=Math.max(0,Math.min(100,r))},handleMouseDown(){this.isSeparatorDragging=!0,document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)},handleMouseUp(){this.isSeparatorDragging=!1,document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)},handleTouchStart(t){const e=t.touches[0];e&&(this.touchIdentifier=e.identifier,this.startTouchX=e.clientX,this.startSeparatorPositionX=this.separatorPositionX,document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("touchend",this.handleTouchEnd))},handleTouchMove(t){const e=Array.from(t.touches).find(s=>s.identifier===this.touchIdentifier);if(!e)return;const n=(e.clientX-this.startTouchX)/this.computedImageDimension.width*100+this.startSeparatorPositionX;this.separatorPositionX=Math.max(0,Math.min(100,n))},handleTouchEnd(){document.removeEventListener("touchmove",this.handleTouchMove),document.removeEventListener("touchend",this.handleTouchEnd),this.touchIdentifier=null},handleWindowChange(t){Object.assign(this.windowState,t)}}}),Xd="";var Q2=function(){var e=this,r=e._self._c;return r("div",{directives:[{name:"resize-observer",rawName:"v-resize-observer",value:e.handleResize,expression:"handleResize"}],ref:"container",staticClass:"e-h-full e-w-full e-relative e-bg-black e-border-black !e-select-none"},[r("div",{staticClass:"e-w-full e-h-full"},[r("EZoomableImg",{ref:"afterImage",staticClass:"e-block e-w-full e-h-full e-image-comparator__image",style:e.afterImageStyle,attrs:{src:e.afterImageSrc,alt:"After Image",embedded:!0,allowZoom:!0,pan:!0,slider:!0,showMiniature:!0,hideContentOnBlur:!1},on:{change:e.onZoomChange,load:e.handleAfterImageLoad}}),r("EZoomableImg",{staticClass:"!e-absolute e-top-0 e-left-0 e-pointer-events-none e-block e-w-full e-h-full e-image-comparator__image",style:e.beforeImageStyle,attrs:{src:e.beforeImageSrc,alt:"Before Image",embedded:!0,allowZoom:!1,pan:!1,slider:!1,showMiniature:!1,initialParams:e.zoomState},on:{load:e.handleBeforeImageLoad}})],1),e.mode===e.CompareMode.Curtain&&!e.isLoading?r("ECompareSeparator",{attrs:{"x-offset":e.computedSeparatorPositionX},on:{mousedown:function(n){return n.stopPropagation(),n.preventDefault(),e.handleMouseDown.apply(null,arguments)},touchstart:e.handleTouchStart}}):e._e(),e.mode==="window"&&!e.isLoading?r("EDragResize",{attrs:{initial:e.windowState,bounds:e.windowBounds},on:{change:e.handleWindowChange}}):e._e(),e.isLoading?e._e():r("div",{staticClass:"e-images-comparator__watermark",style:e.watermarkStyle},[e._t("watermark",null,null,e.watermarkStyle)],2),e.isComponentLoading?r("div",{staticClass:"e-images-comparator__overlay"},[e._t("overlay")],2):e._e(),r("div",{staticClass:"e-images-comparator__imageOverlay"},[e._t("imageOverlay")],2),e._t("default",null,{imageDimensions:e.computedImageDimension})],2)},K2=[],J2=H(V2,Q2,K2,!1,null,"3322d16d",null,null);const ti=J2.exports,Ue=B.extend({data(){return{timeouts:[]}},beforeDestroy(){this.$clearTimeouts()},methods:{$setTimeout(t,e=0){const r=setTimeout(t,e);return this.timeouts=[...this.timeouts,r],r},$clearTimeouts(){this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts=[]}}}),e5=B.extend({name:"EExpandableMenu",mixins:[Ue,We],props:{padding:{type:Number,default:4},direction:{type:String,default:"top",validator:t=>["top","right","bottom","left"].includes(t)},isMobile:{type:Boolean,default:!1}},data(){return{isMenuOpened:!1,baseSize:{},menuObserver:null}},computed:{row(){return["right","left"].includes(this.direction)},reverse(){return["top","left"].includes(this.direction)}},watch:{isMobile(){this.adjustButtonsPositions()},direction(){this.adjustButtonsPositions()},padding(){this.adjustButtonsPositions()}},mounted(){const t=this.$refs.activator,e=(t==null?void 0:t.getBoundingClientRect())||{};this.baseSize={width:`${e.width}px`,height:`${e.height}px`},this.isMobile||this.$setTimeout(this.toggleMenu,100),this.$addEventListener("resize",this.adjustButtonsPositions),this.observeMenuContentChanges()},beforeDestroy(){this.menuObserver&&this.menuObserver.disconnect()},methods:{toggleMenu(){this.isMenuOpened=!this.isMenuOpened,this.adjustButtonsPositions()},adjustButtonsPositions(){const t=this.$refs.menu,e=Array.from(t==null?void 0:t.children).filter(l=>!l.classList.contains("v-tooltip"));if(!e||!e.length)return;const r=this.isMobile?30:40,n=Array.from(e),s=this.$refs.activator,i=s==null?void 0:s.getBoundingClientRect(),a=Math.min(i[this.row?"width":"height"],r),c=this.isMenuOpened?a+this.padding:0,o=this.row?"X":"Y";t.style.transform=`translate${o}(${(this.reverse?-1:1)*c}px)`,n.forEach((l,d)=>{const h=l.getBoundingClientRect(),m=h==null?void 0:h[this.row?"width":"height"],C=(m>r?m:r)+this.padding,x=this.isMenuOpened?C*d:0;l.style.transform=`translate${o}(${(this.reverse?-1:1)*x}px)`})},observeMenuContentChanges(){const t=this.$refs.menu;t&&(this.menuObserver=new MutationObserver(()=>{this.adjustButtonsPositions()}),this.menuObserver.observe(t,{childList:!0,subtree:!0}))}}}),Vd="";var t5=function(){var e=this,r=e._self._c;return r("div",{staticClass:"expandable-menu",class:{"expandable-menu--row":e.row,"expandable-menu--column":!e.row,"expandable-menu--reverse":e.reverse,"expandable-menu--open":e.isMenuOpened,"expandable-menu--closed":!e.isMenuOpened},style:e.baseSize},[r("div",{staticClass:"expandable-menu__container",style:e.baseSize},[r("div",{ref:"activator",staticClass:"v-btn--no-active e-cursor-pointer expandable-menu__activator",on:{click:e.toggleMenu}},[e._t("activator")],2),r("div",e._g({ref:"menu",staticClass:"e-flex e-flex-col expandable-menu__menu",class:{"expandable-menu__menu--closed":!e.isMenuOpened,"expandable-menu__menu--open":e.isMenuOpened,"e-py-2":!e.row,"e-py-0":e.row},attrs:{"data-test-id":"action-buttons-menu"}},e.$listeners),[e._t("default")],2)])])},r5=[],n5=H(e5,t5,r5,!1,null,null,null,null);const ri=n5.exports,s5=B.extend({name:"BaseIcon",props:{name:{type:String,default:"box"},color:{type:String,default:"#3c3c3c"},viewBox:{type:String,default:"0 0 128 128"},width:{type:[Number,String],default:60},height:{type:[Number,String],default:60},size:{type:[Number,String,null],default:null}}});var i5=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("svg",e._g({staticClass:"svg-icon",attrs:{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:e.viewBox,width:e.size||e.width,height:e.size||e.height,"aria-labelledby":e.name,role:"presentation"}},e.$listeners),[r("g",{ref:"group",attrs:{fill:e.color}},[e._t("default",null,{color:e.color})],2)])},a5=[],o5=H(s5,i5,a5,!1,null,null,null,null);const de=o5.exports,l5=B.extend({name:"Bim",components:{BaseIcon:de},props:{color:{type:String,default:"white"}}});var c5=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("BaseIcon",e._b({attrs:{small:!0,width:"22px",height:"22px",viewBox:"0 0 22 22",color:e.color}},"BaseIcon",e.$attrs,!1),[r("g",{attrs:{transform:"translate(0.000000,512.000000) scale(0.100000,-0.100000)"}},[r("path",{style:`fill: ${e.color}`,attrs:{d:`M3.7,5016.4v-43.8l20.9,0.2c19.5,0.2,21.1,0.3,24.7,1.3c5.8,1.6,9.9,3.9,13.3,7.2c3.4,3.5,5.3,6.7,6.4,11
|
|
8
8
|
c3,13-3.4,23.6-16.5,26.8l-3.5,0.9l2.6,0.8c3.5,1.2,8,4.3,10.3,7c7,8.6,5.5,21-3.4,26.9c-7.1,4.8-11.4,5.4-35.7,5.4h-19V5016.4z
|
|
9
9
|
M40.6,5043.9c3.8-2,4.7-3.7,4.5-8.4c-0.2-4.4-1.8-7-5.5-8.9c-2.2-1.1-3.2-1.3-9.1-1.4l-6.7-0.2v10.4v10.4l7-0.2
|
|
10
10
|
C37.4,5045.3,37.9,5045.3,40.6,5043.9z M41.5,5009.4c2.4-0.9,5.4-3.5,6.5-5.7c1.1-2.2,1.1-6.7,0-9.2c-1.1-2.6-2.8-4.4-5.8-5.7
|
|
@@ -240,5 +240,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
240
240
|
|
|
241
241
|
`))return e;let n=e;const[s]=e.split(`
|
|
242
242
|
|
|
243
|
-
`);return await this.processMarkdown(s),n=n.replace(s,""),this.startNewRenderingCycle(),n}async render(e){this.isFirstTableRender&&(this.updateContent(e),this.isFirstTableRender=!1),this.isRenderingTable?(this.updateTableContent(e),this.accumulator=this.mdTableHeaderString+this.pendingRowString):this.animated?await this.animateNewChunk(e):this.updateContent(e)}updateTableContent(e){const r=this.extractTableFromHtml(e);if(!r)return;const n=this.htmlRenderingTarget.parentNode,s=this.ensureTableExists(n);this.removeEmptyTableRows(s);const i=r.querySelector("tbody")||document.createElement("tbody"),a=this.ensureTBodyExists(s);this.copyTableHead(r,s),this.copyTableBodyRows(i,a)}processTextNode(e,r,n,s,i){const c=e.value.split(s);if(c.length>1){const o=this.replaceRegexTargets(c,s,i,e,r);n.children.splice(r,1,...o)}}replaceRegexTargets(e,r,n,s,i){return e.map((a,c)=>{var o,l;if(r.test(a)){const d=`regex-target-${n}-${c}-${i}-${this.totalMarkdown.length}-${(l=(o=s==null?void 0:s.position)==null?void 0:o.start)==null?void 0:l.offset}`;return this.regexRenderTargetsById[d]={match:a,type:n},{type:"html",value:`<span id="${d}">${a}</span>`}}return a?{type:"text",value:a}:null}).filter(Boolean)}ensureTableExists(e){let r=e.querySelector(`table#t-${this.tableId}`);return r||(r=document.createElement("table"),r.id=`t-${this.tableId}`,e.appendChild(r)),r}ensureTBodyExists(e){let r=e.querySelector("tbody");return r||(r=document.createElement("tbody"),e.appendChild(r)),r}copyTableHead(e,r){const n=e.querySelector("thead");!r.querySelector("thead")&&n&&r.appendChild(n)}copyTableBodyRows(e,r){const n=e.querySelectorAll("tr"),s=Array.from(r.querySelectorAll("tr")).map(i=>i.id);n&&n.forEach(i=>{!i.innerText.trim()||s.includes(i.id)||r.appendChild(i.cloneNode(!0))})}removeEmptyTableRows(e){e.querySelectorAll("tr").forEach(n=>{const s=n.querySelectorAll("td, th");let i=!0;s.forEach(a=>{a.textContent.trim()!==""&&(i=!1)}),i&&n.parentNode.removeChild(n)})}getRegexRenderTargets(){return this.regexRenderTargetsById}clearRegexRenderTargets(){this.regexRenderTargetsById={}}extractTableFromHtml(e){const r=document.createElement("div");return r.innerHTML=e,r.querySelector(`table#t-${this.tableId}`)}updateContent(e){const r=document.createElement("div");r.innerHTML=e,Vi(this.htmlRenderingTarget,r,{onBeforeElUpdated:(n,s)=>n.classList.contains("Typewriter__wrapper")?(s.innerHTML=n.innerHTML,!1):!0})}initTypewriter(){return new e8(this.container,{loop:!1,delay:0,cursor:""})}async animateNewChunk(e){const r=this.getNewContent(e);await new Promise(n=>{this.onAnimationStart(),this.typewriter.typeString(r).callFunction(()=>{this.onAnimationEnd(),n()}).start()})}getNewContent(e){const r=document.createElement("div");return r.innerHTML=e,(r.textContent||"").slice(this.lastProcessedLength)}}const r8=B.extend({name:"EMarkdown",props:{nextChunks:{type:[Array,String],default:()=>[]},exposedRegexes:{type:Array,default:()=>[]},animated:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},useTableProcessor:{type:Boolean,default:!0}},data(){return{isProcessing:!1,processor:null}},watch:{nextChunks(t){this.handleNewChunk(t.join(""))}},mounted(){this.initProcessor(),this.processInitialChunks()},methods:{initProcessor(){const t=this.$refs.content;this.processor=new t8(t,{exposedRegexes:this.exposedRegexes,animated:this.animated,onAnimationStart:()=>this.$emit("animation-start"),onAnimationEnd:()=>this.$emit("animation-end"),useTableProcessor:this.useTableProcessor})},async processChunk(t){var r;await((r=this.processor)==null?void 0:r.processMarkdown(t))&&this.renderRegexesScopedSlots()},async handleNewChunk(t){await this.processChunk(t)},async processInitialChunks(){const t=Array.isArray(this.nextChunks)?this.nextChunks:[this.nextChunks];for(const e of t)await this.handleNewChunk(e)},renderRegexesScopedSlots(){var e,r;const t=(e=this.processor)==null?void 0:e.getRegexRenderTargets();Object.entries(t).forEach(([n,{match:s,type:i}])=>{this.renderScopedSlot({id:n,type:i,propsData:{match:s}})}),(r=this.processor)==null||r.clearRegexRenderTargets()},renderScopedSlot({id:t,type:e,propsData:r}){const n=document.getElementById(t);if(!n)return;const s=this.$scopedSlots[`markdown.regex.${e}`];if(!s)return;const i=B.extend({functional:!0,props:["scopedSlot","propsData"],render:(c,o)=>o.props.scopedSlot(o.props.propsData)}),a=new B({render:c=>c(i,{props:{scopedSlot:s,propsData:r}})}).$mount();return n.innerHTML="",n.appendChild(a.$el),a}}}),m9="";var n8=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-markdown"},[r("article",{staticClass:"e-mx-auto prose-h1:!e-text-2xl prose-h2:!e-text-xl prose-h2:!e-mt-0 prose-h3:!e-text-lg e-prose e-prose-slate",class:{"e-prose-invert":e.dark}},[r("div",{ref:"content",staticClass:"e-markdown__content"})])])},s8=[],i8=H(r8,n8,s8,!1,null,null,null,null);const a8=i8.exports,o8=B.extend({name:"ECopyToClipboardBtn",components:{EActionButton:pt},mixins:[We,Ue],props:{text:{type:[Function,String,Number],required:!0},buttonText:{type:String,default:""},buttonClasses:{type:[String,Object,Array],default:null},description:{type:String,default:"Copy"},iconType:{type:String,default:"far fa-copy"},textOnlyButton:{type:Boolean,default:!1},dark:{type:Boolean,default:!0}},data(){return{loading:!1,tooltipText:this.description||"Copy to clipboard"}},computed:{copyButtonClasses(){return{"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"hover:e-bg-gray-600":this.dark,"hover:e-bg-gray-200":!this.dark,"e-rounded-md e-border-none copy-button e-bg-transparent":!0}}},watch:{tooltipText(t){t!==this.description&&this.$setTimeout(()=>{this.tooltipText=this.description},1e3)}},mounted(){this.$addEventListener("focusin",this.handleFocusin,this.$refs.copyToClipboard)},methods:{handleFocusin(t){t.stopPropagation()},getProp(t,e){return Object.prototype.hasOwnProperty.call(this.$attrs,t)?this.$attrs[t]:e},copyTextToClipboard(){try{this.loading=!0;let t;typeof this.text=="function"?t=this.text():t=this.text;const e=this.$refs.copyToClipboard;e.value=t,e.focus(),e.select(),document.execCommand("copy"),this.tooltipText="Copied!",this.$emit("copied")}catch(t){console.error("Failed to copy text to clipboard",t)}finally{this.loading=!1}}}}),g9="";var l8=function(){var e=this,r=e._self._c;return r("EActionButton",e._g(e._b({attrs:{"tooltip-text":e.tooltipText,"tooltip-position":"top",icon:e.iconType,"icon-size":"Lg",dark:e.dark,"button-classes":e.copyButtonClasses},on:{click:e.copyTextToClipboard}},"EActionButton",e.$attrs,!1),e.$listeners),[e._v(" "+e._s(e.buttonText)+" "),r("textarea",{ref:"copyToClipboard",staticClass:"copy-to-clipboard",attrs:{readonly:""}})])},c8=[],u8=H(o8,l8,c8,!1,null,"d3d39d0d",null,null);const gn=u8.exports,d8=B.extend({name:"EDialog",components:{EFadeTransition:jt},mixins:[We],props:{value:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},actions:{type:Array,default:()=>[]},title:{type:String,default:""},persistent:{type:Boolean,default:!1},width:{type:[Number,String],default:500},height:{type:[Number,String],default:void 0},closeWithEscape:{type:Boolean,default:!0}},computed:{visible:{get(){return this.value},set(t){this.$emit("input",t)}},panelClasses(){return["e-relative e-transform e-overflow-hidden e-rounded-lg e-text-left e-shadow-xl e-transition-all e-w-full e-flex e-flex-col",this.dark?"e-bg-gray-800":"e-bg-white"]},headerContainerClasses(){return["e-dialog__header",this.dark?"e-bg-gray-800 e-text-gray-50":"e-bg-white e-text-slate-900","e-px-6 e-pt-6 e-pb-4"]},bodyContainerClasses(){return["e-dialog__body e-px-6",this.dark?"e-bg-gray-800 e-text-gray-50":"e-bg-white e-text-slate-900"]},footerContainerClasses(){return["e-dialog__footer",this.dark?"e-bg-gray-700":"e-bg-gray-50","e-flex e-py-3 e-px-4 e-justify-end e-mt-auto e-items-end"]},panelStyles(){const t=typeof this.width=="number"?`${this.width}px`:this.width,e=typeof this.height=="number"?`${this.height}px`:this.height;return{minWidth:t,minHeight:e,width:t,height:e}}},watch:{visible(t){t?this.showDialog():this.closeDialog()}},mounted(){this.visible&&this.showDialog(),this.$addEventListener("keydown",this.handleKeyDown)},methods:{showDialog(){this.$nextTick(()=>{const t=this.$refs.dialog;t&&!t.open&&t.showModal()})},closeDialog(){const t=this.$refs.dialog;t!=null&&t.open&&t.close()},handleBackdropClick(t){!this.persistent&&t.target===t.currentTarget&&(this.visible=!1)},onClose(){this.persistent||(this.visible=!1)},getButtonClasses(t){const e=this.dark?"e-bg-gray-700 e-text-gray-50 e-border-solid e-border-[1px] e-border-gray-500 hover:e-bg-gray-600":"e-bg-white e-text-gray-900 e-border-solid e-border-[1px] e-border-gray-300 hover:e-bg-gray-50",r={[ie.Warning]:"e-bg-warning e-text-white e-border-none",[ie.Error]:"e-bg-error e-text-white e-border-none",[ie.Info]:"e-bg-info e-text-white e-border-none",[ie.Success]:"e-bg-success e-text-white e-border-none",[ie.Primary]:"e-bg-primary e-text-white e-border-none",[ie.Brand]:"e-bg-brand-500 e-text-white e-border-none",[ie.Default]:e,[ie.Gray]:"e-bg-gray-600 e-text-white hover:e-bg-gray-light e-border-none"};return["e-inline-flex e-w-full e-justify-center e-rounded-md e-px-3 e-py-2 e-text-sm e-font-semibold e-shadow-sm sm:e-ml-3 sm:e-w-auto e-cursor-pointer hover:e-opacity-90",r[t]||r[ie.Default]]},onActionClick(t){t.closeOnClick&&(this.visible=!1),this.$emit("action-clicked",t.id||t.label)},handleKeyDown(t){t.key==="Escape"&&(this.persistent||!this.closeWithEscape?t.preventDefault():this.visible=!1)}}}),v9="";var h8=function(){var e=this,r=e._self._c;return r("EFadeTransition",{attrs:{duration:100}},[e.visible?r("dialog",{ref:"dialog",staticClass:"e-dialog e-p-0 e-m-auto e-border-none e-rounded-lg",on:{click:e.handleBackdropClick,close:e.onClose,cancel:e.onClose}},[r("div",{class:e.panelClasses,style:e.panelStyles},[r("div",{class:e.headerContainerClasses},[e._t("header",function(){return[e.title?r("div",{staticClass:"e-text-lg e-font-bold"},[e._v(" "+e._s(e.title)+" ")]):e._e()]},{dark:e.dark})],2),r("div",{class:e.bodyContainerClasses},[e._t("default",null,{dark:e.dark})],2),r("div",{class:e.footerContainerClasses},[e._t("footer",function(){return e._l(e.actions,function(n,s){return r("button",{key:s,class:e.getButtonClasses(n.color),on:{click:function(i){return i.stopPropagation(),e.onActionClick(n)}}},[e._v(" "+e._s(n.label)+" ")])})},{actions:e.actions,dark:e.dark})],2)])]):e._e()])},p8=[],f8=H(d8,h8,p8,!1,null,null,null,null);const m8=f8.exports,g8=B.extend({name:"EFeedbackButton",components:{EDialog:m8,EActionButton:pt},mixins:[We,Ue],props:{buttonText:{type:String,default:""},buttonClasses:{type:[String,Object,Array],default:null},description:{type:String,default:"Submit feedback"},iconType:{type:String,default:"far fa-thumbs-up"},withText:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},dialogActions:{type:Array,default:()=>[{label:"Cancel",color:"default",closeOnClick:!0},{label:"Submit",color:"primary"}]},dialogWidth:{type:[Number,String],default:"27rem"}},data(){return{tooltipText:this.description||"Submit feedback",showDialog:!1,feedbackText:""}},computed:{eButtonClasses(){return{"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"hover:e-bg-gray-600":this.dark,"hover:e-bg-gray-200":!this.dark,"e-rounded-md e-border-none e-bg-transparent":!0}},textAreaClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark,"e-text-gray-600":!this.dark,"e-text-gray-300":this.dark,"e-custom-scrollbar--light":!this.dark,"e-custom-scrollbar--dark":this.dark}},textAreaContainerClasses(){return{"e-border-gray-600":this.dark,"e-border-gray-300":!this.dark}}},watch:{tooltipText(t){t!==this.description&&this.$setTimeout(()=>{this.tooltipText=this.description},1e3)}},methods:{onClick(t){this.withText?this.showDialog=!0:this.submitFeedback(t)},submitFeedback(t){if(t==="Cancel"){this.showDialog=!1;return}this.showDialog=!1,this.$emit("submit",this.feedbackText),this.tooltipText="Thank you!"}}}),_9="";var v8=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("EActionButton",{attrs:{"tooltip-text":e.tooltipText,"tooltip-position":"top",icon:e.iconType,"icon-size":"Lg",dark:e.dark,"button-classes":e.eButtonClasses},on:{click:e.onClick}},[e._v(" "+e._s(e.buttonText)+" "),e.withText?r("EDialog",{staticClass:"e-feedback",attrs:{value:e.showDialog,title:"Feedback",dark:e.dark,width:e.dialogWidth,persistent:"",actions:e.dialogActions,"close-with-escape":!1},on:{"action-clicked":e.submitFeedback}},[r("div",{staticClass:"e-feedback__form"},[r("div",{staticClass:"e-feedback__form-description e-mb-3 e-leading-relaxed"},[e._v(" Thanks for your input! "),r("br"),e._v("Please share your thoughts and experience to help us improve ")]),r("div",{staticClass:"e-rounded-md e-w-full e-overflow-hidden e-border e-border-solid e-py-2 e-mb-6",class:e.textAreaContainerClasses},[r("textarea",{directives:[{name:"model",rawName:"v-model",value:e.feedbackText,expression:"feedbackText"}],staticClass:"e-feedback__textarea focus:e-outline-none e-mr-6 e-border-none e-placeholder-gray-400 e-py-3 e-pl-3 e-w-full",class:e.textAreaClasses,attrs:{autofocus:"",tabindex:"0",rows:"4",placeholder:"Enter your text here..."},domProps:{value:e.feedbackText},on:{input:function(n){n.target.composing||(e.feedbackText=n.target.value)}}})])])]):e._e()],1)},_8=[],y8=H(g8,v8,_8,!1,null,null,null,null);const C8=y8.exports,b8=B.extend({name:"EChatMessageActions",components:{EFeedbackButton:C8,ECopyToClipboardBtn:gn,EActionButton:pt},props:{message:{type:[String,Array],default:""},dark:{type:Boolean,default:!1},showCopyButton:{type:Boolean,default:!1},showRegenerateButton:{type:Boolean,default:!1},showFeedbackButtons:{type:Boolean,default:!1},messageId:{type:[String,Number],default:null}},data(){return{FeedbackType:Kt,showFeedbackDialog:!1}},computed:{messageText(){return(Array.isArray(this.message)?this.message:[this.message]).join("")},eButtonClasses(){return{"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"hover:e-bg-gray-600":this.dark,"hover:e-bg-gray-200":!this.dark,"e-rounded-md e-border-none e-bg-transparent e-border-none":!0}}},methods:{handleFeedback(t,e){this.$emit("feedback",{type:t,text:e})},openFeedbackDialog(){this.showFeedbackDialog=!0}}}),y9="";var x8=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-message__actions e-relative"},[r("div",{staticClass:"e-message__actions-container e-flex e-gap-1 e-my-2"},[e.showCopyButton?r("ECopyToClipboardBtn",{attrs:{text:e.messageText,dark:e.dark,"button-size":"xs","button-classes":"e-bg-transparent e-border-none",description:"Copy"}}):e._e(),e.showRegenerateButton?r("EActionButton",{attrs:{"tooltip-text":"Regenerate","tooltip-position":"top",icon:"rotate-right","icon-size":"xs",dark:e.dark,"button-classes":e.eButtonClasses},on:{click:function(n){return e.$emit("regenerate")}}}):e._e(),e.showFeedbackButtons?r("EFeedbackButton",{attrs:{dark:e.dark,"with-text":"",description:"Give positive feedback","button-size":"sm","button-classes":"e-bg-transparent e-border-none"},on:{submit:function(n){return e.handleFeedback(e.FeedbackType.Positive,n)}},nativeOn:{click:function(n){return e.openFeedbackDialog.apply(null,arguments)}}}):e._e(),e.showFeedbackButtons?r("EFeedbackButton",{attrs:{dark:e.dark,"with-text":"",description:"Give negative feedback","button-size":"sm","button-classes":"e-bg-transparent e-border-none","icon-type":"far fa-thumbs-down"},on:{submit:function(n){return e.handleFeedback(e.FeedbackType.Negative,n)}},nativeOn:{click:function(n){return e.openFeedbackDialog.apply(null,arguments)}}}):e._e()],1)])},w8=[],S8=H(b8,x8,w8,!1,null,null,null,null);const T8=S8.exports,k8=B.extend({name:"EChatMessage",components:{EFadeTransition:jt,EAvatar:Mt,EChatMessageActions:T8,EEvercamLogo:vi,EPulsatingDot:Ku,EMarkdown:a8},mixins:[Ue],props:{role:{type:String,default:Ye.User},initials:{type:String,default:null},message:{type:[String,Array,Object],default:""},isLoading:{type:Boolean,default:!1},avatarSrc:{type:String,default:null},type:{type:String,default:Qt.Text},showAvatar:{type:Boolean,default:!0},dark:{type:Boolean,default:!1},withActions:{type:Boolean,default:!1},showCopyButton:{type:Boolean,default:!1},showRegenerateButton:{type:Boolean,default:!1},showFeedbackButtons:{type:Boolean,default:!1},loadingMessage:{type:String,default:""},exposedRegexes:{type:Array,default:()=>[]},animated:{type:Boolean,default:!1},eMarkdownProps:{type:Object,default:()=>({})}},data(){return{showActions:!1,nextChunks:[]}},computed:{isBotRole(){return this.role===Ye.Copilot||this.role===Ye.System},userMessageClasses(){return{"e-bg-gray-100 e-text-gray-800":!this.dark,"e-bg-gray-600 e-text-white":this.dark}},logoClasses(){return{"e-bg-white e-rounded-full":this.dark}},dotColor(){return this.dark?"#ff2525":"#c5393d"},markdownScopedSlots(){return Object.keys(this.$scopedSlots).filter(t=>t.startsWith("markdown.")).reduce((t,e)=>(t[e]=this.$scopedSlots[e],t),{})}},watch:{message:{immediate:!0,handler(t,e){t.length&&(e!=null&&e.length?this.nextChunks=t.slice(e.length):this.nextChunks=t)}}},methods:{onMouseOver(){this.showActions=!0},onMouseLeave(t){[null,document.documentElement].includes(t.relatedTarget)||(this.showActions=!1)},onFeedback(t){this.$emit("feedback",t),this.$setTimeout(()=>{this.showActions=!1},1e3)}}}),C9="";var $8=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{staticClass:"e-chat-message e-mb-3"},[r("div",{staticClass:"e-chat-message__wrapper e-flex e-items-start e-justify-start e-gap-3",class:{"e-chat-message__rtl":!e.isBotRole}},[e.showAvatar?r("div",{staticClass:"e-chat-message__avatar"},[e.isBotRole?e._t("message-avatar",function(){return[r("div",{class:e.logoClasses},[r("EEvercamLogo",{attrs:{size:"xs","background-classes":"e-bg-white e-p-[2px] e-rounded-full !e-pr-[2.5px] !e-pt-[3.5px]"}})],1)]},{role:e.role}):r("EAvatar",{attrs:{image:e.avatarSrc,size:"Xs"}},[e._v(e._s(e.initials))])],2):e._e(),r("div",{staticClass:"e-chat-message__content e-flex e-w-full",class:{"e-justify-end":!e.isBotRole}},[e._t("message.content",function(){return[e.isLoading&&e.isBotRole?e._t("loadingPlaceholder",function(){return[r("div",[e.loadingMessage?r("EMarkdown",{staticClass:"e-chat-message__markdown e-italic",attrs:{"next-chunks":[e.loadingMessage],animated:"",dark:e.dark,copyable:!1}}):e._e(),r("div",{staticClass:"e-inline-block e-mt-2 e-ml-2"},[r("EPulsatingDot",{attrs:{size:8,color:e.dotColor}})],1)],1)]}):e.isBotRole&&e.type!=="error"?r("EMarkdown",e._b({staticClass:"e-chat-message__markdown e-w-full",attrs:{"next-chunks":e.nextChunks,animated:e.animated,dark:e.dark,"exposed-regexes":e.exposedRegexes},on:{"animation-end":function(n){return e.$emit("animation-end")},"animation-start":function(n){return e.$emit("animation-start")}},scopedSlots:e._u([e._l(e.markdownScopedSlots,function(n,s){return{key:s,fn:function(i){return[e._t(s,null,null,i)]}}})],null,!0)},"EMarkdown",e.eMarkdownProps,!1)):e.type==="error"?r("p",{staticClass:"e-chat-message__error e-px-4 e-py-3 e-border-solid e-border-[1.67px] e-rounded-md e-border-red-400 e-bg-red-500/10 e-text-sm e-font-normal"},[e._v(" "+e._s(e.message)+" ")]):r("p",{staticClass:"e-chat-message__content e-font-medium e-text-wrap e-mb-1 e-rounded-lg e-p-2 e-px-4",class:e.userMessageClasses},[e._v(" "+e._s(e.message)+" ")]),e._t("extraContent")]})],2)]),e._t("message.append"),r("EFadeTransition",[e.withActions?r("EChatMessageActions",{staticClass:"e-left-11",attrs:{"message-id":e.$attrs["data-message-id"],dark:e.dark,"show-copy-button":e.showCopyButton,"show-feedback-buttons":e.showFeedbackButtons,"show-regenerate-button":e.showRegenerateButton,message:e.message},on:{feedback:e.onFeedback,regenerate:function(n){return e.$emit("message-regenerate")}}}):e._e()],1)],2)},E8=[],M8=H(k8,$8,E8,!1,null,null,null,null);const L8=M8.exports,D8=B.extend({name:"EChatFooter",props:{dark:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},computed:{backgroundClasses(){return this.inline?{}:{"e-bg-gray-700":this.dark,"e-bg-gray-50":!this.dark}},footerClasses(){return{...this.backgroundClasses}}}});var P8=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{staticClass:"e-chat-footer e-px-3 e-pt-4 e-pb-3",class:e.footerClasses},[e._t("default")],2)},z8=[],O8=H(D8,P8,z8,!1,null,null,null,null);const B8=O8.exports,I8=B.extend({name:"EVoiceInputVolumeIndicator",props:{isListening:{type:Boolean,required:!0},analyser:{type:Object,required:!0}},data(){return{volume:0,animationFrameId:0}},watch:{isListening:{immediate:!0,handler(t){t?this.startVolumeMonitoring():this.stopVolumeMonitoring()}}},beforeDestroy(){this.stopVolumeMonitoring()},methods:{startVolumeMonitoring(){this.analyser&&this.updateVolume()},updateVolume(){if(!this.analyser)return;const t=new Uint8Array(this.analyser.frequencyBinCount);this.analyser.getByteFrequencyData(t);let e=0;for(const r of t)e+=r**2.75;this.volume=Math.sqrt(e/t.length)/256,this.animationFrameId=requestAnimationFrame(this.updateVolume)},stopVolumeMonitoring(){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId)}}}),b9="";var F8=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-volume-indicator e-relative e-w-8 e-h-8 e-flex e-items-center e-justify-center"},[r("div",{staticClass:"e-volume-indicator__bubble e-absolute e-inset-y-0 e-rounded-full",style:{transform:`scale(${e.isListening?.5+e.volume*.5:1})`,opacity:e.isListening?.5:0,width:"inherit",height:"inherit"}}),r("div",{staticClass:"e-absolute e-inset-0 e-flex e-items-center e-justify-center"},[e._t("default")],2)])},A8=[],R8=H(I8,F8,A8,!1,null,null,null,null);const H8=R8.exports,N8=B.extend({name:"EVoiceInput",components:{EVoiceInputVolumeIndicator:H8,EIcon:Fe,ETooltip:St},mixins:[We],props:{value:{type:String,default:""},dark:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},iconSize:{type:Number,default:10},silenceTimeout:{type:Number,default:1500}},data(){return{recognition:null,isListening:!1,interimTranscript:"",finalTranscript:"",analyser:null,audioContext:null,mediaStream:null,mediaStreamSource:null,silenceTimer:null}},computed:{currentTranscript(){return this.finalTranscript+this.interimTranscript},buttonClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark,"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"e-opacity-50":this.disabled}}},watch:{currentTranscript(t){this.$emit("input",t)}},mounted(){this.initSpeechRecognition(),this.$addEventListener("keydown",this.handleKeyDown)},beforeDestroy(){this.stopListening()},methods:{initSpeechRecognition(){const t=window.SpeechRecognition||window.webkitSpeechRecognition;if(!t){console.error("Speech recognition is not supported in this browser.");return}if(this.recognition=new t,this.recognition.continuous=!0,this.recognition.interimResults=!0,this.recognition.lang="en-US",this.recognition.speechStartTimeout=200,this.recognition.onresult=this.handleResult,this.recognition.onerror=this.handleError,this.recognition.onend=this.handleEnd,this.recognition.onspeechend=this.handleSpeechEnd,this.audioContext=new(window.AudioContext||window.webkitAudioContext),!this.audioContext){console.error("Audio context is not supported in this browser.");return}this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=256},async toggleListening(){this.recognition&&(this.isListening?this.stopListening():await this.setupVolume())},async setupVolume(){try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:!0}),this.audioContext.state!=="running"&&await this.audioContext.resume(),this.mediaStreamSource=this.audioContext.createMediaStreamSource(this.mediaStream),this.mediaStreamSource.connect(this.analyser),this.finalTranscript="",this.interimTranscript="",this.recognition.start(),this.isListening=!0}catch(t){console.error("Error accessing microphone:",t)}},stopListening(){this.isListening=!1,this.recognition.stop(),this.silenceTimer&&(clearTimeout(this.silenceTimer),this.silenceTimer=null),this.flushMediaStream()},flushMediaStream(){var t;this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),(t=this.mediaStreamSource)==null||t.disconnect(),this.mediaStream=null,this.mediaStreamSource=null)},handleResult(t){this.interimTranscript="";for(let e=t.resultIndex;e<t.results.length;++e){const r=t.results[e];r.isFinal?this.finalTranscript+=r[0].transcript+" ":this.interimTranscript+=r[0].transcript}this.silenceTimer&&clearTimeout(this.silenceTimer),this.silenceTimer=setTimeout(()=>{this.submitTranscript()},this.silenceTimeout)},handleEnd(){this.isListening=!1},handleSpeechEnd(){this.submitTranscript()},submitTranscript(){this.finalTranscript.trim().length>0&&(this.$emit("on-voice-message-end",this.finalTranscript.trim()),this.finalTranscript="",this.interimTranscript=""),this.stopListening()},handleKeyDown(t){t.code==="Space"&&t.ctrlKey&&(t.preventDefault(),this.toggleListening())},handleError(t){console.error("Speech recognition error:",t==null?void 0:t.error),this.isListening=!1}}});var j8=function(){var e=this,r=e._self._c;return r("ETooltip",{attrs:{text:"Use Ctrl + Space to speak",dark:e.dark}},[r("button",e._g(e._b({staticClass:"e-chat-input__voice-btn e-border-none e-chat-input__voice-btn e-flex e-items-center e-justify-center e-cursor-pointer e-h-8 e-w-8 disabled:e-cursor-not-allowed focus:e-outline-none",class:{...e.buttonClasses,"e-h-10 e-w-10":!e.isListening},on:{click:e.toggleListening}},"button",e.$attrs,!1),e.$listeners),[e.isListening?r("EVoiceInputVolumeIndicator",{attrs:{analyser:e.analyser,"is-listening":e.isListening}},[r("EIcon",{staticClass:"e-chat-input__voice-btn--icon",attrs:{icon:"stop",color:"e-text-red-600",size:"Sm"}})],1):r("EIcon",{attrs:{icon:"microphone",size:"Base"}})],1)])},q8=[],W8=H(N8,j8,q8,!1,null,null,null,null);const vn=W8.exports,G8=B.extend({name:"EChatInput",components:{EIcon:Fe,ETooltip:St,EVoiceInput:vn},model:{prop:"value",event:"prompt-changed"},props:{dark:{type:Boolean,default:!1},placeholder:{type:String,default:"Message Copilot"},disabled:{type:Boolean,default:!1},silenceTimeout:{type:Number,default:1500}},data(){return{content:"",maxHeight:175,textAreaHeight:0,isShiftKeyPressed:!1,transcript:""}},computed:{textAreaContainerClasses(){return{"e-border-gray-600":this.dark&&!this.disabled,"e-border-gray-300":!this.dark&&!this.disabled,"e-border-gray-800":this.dark&&this.disabled,"e-border-gray-500":!this.dark&&this.disabled,"e-cursor-not-allowed e-opacity-50":this.disabled}},textAreaClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark,"e-text-gray-600":!this.dark,"e-text-gray-300":this.dark,"e-custom-scrollbar--light":!this.dark,"e-custom-scrollbar--dark":this.dark}},buttonClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark,"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"e-opacity-50":this.isSubmitDisabled}},isSubmitDisabled(){return this.disabled||this.content.length<4},textareaStyle(){return this.textAreaHeight?{height:`${Math.min(this.textAreaHeight,this.maxHeight)}px`,overflowY:this.isOverflowing?"scroll":"hidden"}:{}},isOverflowing(){return!!this.textAreaHeight&&this.textAreaHeight>this.maxHeight}},mounted(){this.focus()},methods:{focus(){this.$refs.chatTextarea.focus()},submitMessage(){this.$emit("submit",this.content),this.content="",this.$nextTick(this.updateTextAreaHeight)},onInput(t){const e=t.target,r=this.content===e.value;this.content=e.value,r||(this.updateTextAreaHeight(),this.$emit("prompt-changed",e.value))},onKeyDown(t){if(!this.disabled){if(!this.isShiftKeyPressed&&t.key==="Enter"){t.preventDefault();return}if(t.key==="Shift"||t.code==="ShiftLeft"){this.isShiftKeyPressed=!0;return}}},onKeyUp(t){if(!this.disabled){if(t.key==="Shift"||t.code==="ShiftLeft"){this.isShiftKeyPressed=!1;return}t.key==="Enter"&&!this.isShiftKeyPressed&&(t.preventDefault(),this.submitMessage())}},updateTextAreaHeight(){const t=this.$refs.chatTextarea;t.style.height="auto",this.textAreaHeight=t.scrollHeight},handleVoiceMessage(t){this.$emit("prompt-changed",t),this.$emit("submit",t),this.transcript=""}}}),x9="";var U8=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-chat-input e-relative e-flex e-w-auto e-p-2"},[r("div",{staticClass:"e-rounded-lg e-w-full e-overflow-hidden e-border e-border-solid",class:e.textAreaContainerClasses},[r("textarea",e._b({ref:"chatTextarea",staticClass:"e-chat-input__textarea focus:e-outline-none e-mr-6 e-border-none e-placeholder-gray-400 e-py-3 e-pl-3 e-w-full",class:e.textAreaClasses,style:e.textareaStyle,attrs:{rows:"1",tabindex:"0",autofocus:"",placeholder:e.transcript.length>0?e.transcript:e.placeholder,disabled:e.disabled},on:{keydown:function(n){return n.stopPropagation(),e.onKeyDown.apply(null,arguments)},keyup:e.onKeyUp,input:e.onInput}},"textarea",e.$attrs,!1))]),r("div",{staticClass:"e-absolute e-bottom-3 e-items-center e-flex e-h-min e-gap-1.5",class:e.isOverflowing?"e-right-6":"e-right-4"},[e._t("input-action-button",function(){return[r("EVoiceInput",{attrs:{dark:e.dark,disabled:e.disabled,"silence-timeout":e.silenceTimeout},on:{"on-voice-message-end":e.handleVoiceMessage},model:{value:e.transcript,callback:function(n){e.transcript=n},expression:"transcript"}}),r("ETooltip",{attrs:{text:"Submit",dark:e.dark}},[r("button",{staticClass:"e-chat-input__submit-btn e-inline-flex e-items-center e-justify-center e-cursor-pointer disabled:e-cursor-not-allowed e-h-8 e-w-8 e-border-none focus:e-outline-none",class:e.buttonClasses,attrs:{type:"button",disabled:e.isSubmitDisabled},on:{click:function(n){return n.preventDefault(),e.submitMessage.apply(null,arguments)}}},[r("EIcon",{attrs:{icon:"arrow-up",size:"base"}})],1)])]},{buttonClasses:e.buttonClasses})],2)])},Z8=[],Y8=H(G8,U8,Z8,!1,null,null,null,null);const X8=Y8.exports,V8=B.extend({name:"EChatSuggestionCard",components:{EIcon:Fe},props:{text:{type:String,required:!0},icon:{type:String,default:null},color:{type:String,default:"e-text-gray-500"},dark:{type:Boolean,default:!1},width:{type:Number,default:null},display:{type:String,default:"row"}},computed:{classes(){return{"e-flex-row":this.display==="row","e-flex-col":this.display==="column","hover:e-bg-gray-100 e-border-gray-200":!this.dark,"e-bg-gray-800 e-border-gray-600 hover:e-bg-gray-900":this.dark}},styles(){return this.width?{width:`${this.width}px`}:{}}}});var Q8=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",e._g(e._b({staticClass:"e-chat-suggestion e-p-3 e-flex e-justify-start e-items-start e-gap-2 e-border-solid e-border-[1.67px] e-rounded-md e-cursor-pointer e-w-full",class:e.classes,style:e.styles},"div",e.$attrs,!1),e.$listeners),[r("div",{staticClass:"e-chat-suggestion__icon e-h-6 e-w-6"},[e.icon?r("EIcon",{attrs:{icon:e.icon,size:"Lg",color:e.color}}):e._t("svg-icon")],2),r("div",{staticClass:"e-chat-suggestion__text e-font-medium e-antialiased e-text-wrap",class:{"e-text-gray-200":e.dark,"e-text-gray-600":!e.dark}},[e._v(" "+e._s(e.text)+" ")])])},K8=[],J8=H(V8,Q8,K8,!1,null,null,null,null);const e7=J8.exports,t7=B.extend({components:{EFadeTransition:jt,EChatWrapper:zu,EChatHeader:ju,EChatBody:Zu,EChatMessage:L8,EChatFooter:B8,EChatInput:X8,EChatSuggestionCard:e7},props:{dark:{type:Boolean,default:!1},messages:{type:Array,default:()=>[]},user:{type:String,default:"You"},embedded:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},inlineFooter:{type:Boolean,default:!1},height:{type:String,default:void 0},width:{type:String,default:void 0},showUserAvatar:{type:Boolean,default:!0},showCopilotAvatar:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},headerText:{type:String,default:"Evercam Copilot"},inputPlaceholder:{type:String,default:"Message Copilot"},loadingMessage:{type:String,default:""},suggestions:{type:Array,default:()=>[]},exposedRegexes:{type:Array,default:()=>[]},eMarkdownProps:{type:Object,default:()=>({useTableProcessor:!1})},silenceTimeout:{type:Number,default:1500}},data(){return{prompt:"",containerHeight:0,headerHeight:0,bodyHeight:0,footerHeight:0}},computed:{ChatMessageRole(){return Ye},userInitials(){var t,e,r;return((r=(e=(t=this.user.trim())==null?void 0:t.split(/\s+/))==null?void 0:e.map(n=>{var s;return((s=n==null?void 0:n.charAt(0))==null?void 0:s.toUpperCase())||""}))==null?void 0:r.join(""))||this.user[0]||""},chatBodyStyle(){return this.bodyHeight?{maxHeight:`${this.bodyHeight}px`,height:`${this.bodyHeight}px`}:{}},wrapperStyle(){return{height:this.height||"100%",width:this.width||"100%"}},bodyBorderClasses(){let t={};this.showHeader&&(t={"e-border-t-[1px] e-border-t-solid":!0,"e-border-t-gray-300":!this.dark,"e-border-t-gray-600":this.dark});let e={};return this.inlineFooter||(e={"e-border-b-[1px] e-border-b-solid":!0,"e-border-b-gray-300":!this.dark,"e-border-b-gray-600":this.dark}),{...t,...e}},markdownScopedSlots(){return Object.keys(this.$scopedSlots).filter(t=>t.startsWith("markdown.")).reduce((t,e)=>(t[e]=this.$scopedSlots[e],t),{})},showSuggestions(){return this.messages.length===0&&this.suggestions.length>0}},watch:{height(){this.updateChatBodyHeight()},showHeader(){this.updateChatBodyHeight()}},mounted(){this.updateChatBodyHeight()},methods:{sendMessage(){!this.isDisabled&&this.prompt.length>0&&(this.$emit("user-message",this.prompt),this.prompt="")},isUserMessage(t){return t.role===Ye.User},hasActions(t){return this.isLoading||this.isDisabled?!1:t.role===Ye.Copilot&&t.withActions!==!1},getMessageContent(t){return t.content},getMessageInitials(t){return this.isUserMessage(t)?this.userInitials:null},getMessageClasses(t,e){return{"e-mb-11":e===this.messages.length-1&&this.hasActions(t)}},updateChatBodyHeight(){this.$nextTick(()=>{var n,s,i;const t=(n=this.$refs.chatContainer)==null?void 0:n.$el,e=(s=this.$refs.chatHeader)==null?void 0:s.$el,r=(i=this.$refs.chatFooter)==null?void 0:i.$el;!t||!e||!r||(this.headerHeight=e.clientHeight,this.footerHeight=r.clientHeight,this.containerHeight=t.clientHeight,this.height?this.bodyHeight=parseInt(this.height)-this.headerHeight-this.footerHeight:this.bodyHeight=Math.max(500,this.containerHeight-this.headerHeight-this.footerHeight))})},isAvatarVisible(t){return t.role===Ye.User?this.showUserAvatar:t.role===Ye.Copilot?this.showCopilotAvatar:!0},onMessageFeedback(t,e){this.$emit("message-feedback",{...t,messageId:e})}}}),w9="";var r7=function(){var e=this,r=e._self._c;return r("EChatWrapper",{ref:"chatContainer",staticClass:"e-chat-wrapper",style:e.wrapperStyle,attrs:{dark:e.dark,embedded:e.embedded}},[r("div",{staticClass:"e-w-full e-h-full e-chat-container"},[r("EChatHeader",{ref:"chatHeader",attrs:{hidden:!e.showHeader,dark:e.dark,title:e.headerText},scopedSlots:e._u([{key:"chip",fn:function(){return[e._t("chip")]},proxy:!0},{key:"append",fn:function(){return[e._t("header-append")]},proxy:!0}],null,!0)}),r("EChatBody",{ref:"chatBody",class:e.bodyBorderClasses,style:e.chatBodyStyle,attrs:{dark:e.dark}},[r("EFadeTransition",[e.showSuggestions?r("div",{staticClass:"e-w-full e-flex e-flex-col e-items-center e-justify-center e-mt-8"},[r("div",{staticClass:"e-flex e-flex-col e-justify-center e-items-center e-gap-4"},e._l(e.suggestions,function(n){return r("EChatSuggestionCard",{key:n.text,attrs:{text:n.text,icon:n.icon,color:n.color,dark:e.dark,width:n.width,display:n.display||"row"},on:{click:function(s){return e.$emit("suggestion-clicked",n)}}})}),1)]):e._e()]),e.showSuggestions?e._e():r("div",e._l(e.messages,function(n,s){return r("EChatMessage",{key:`${n.id}-${s}`,class:e.getMessageClasses(n,s),attrs:{dark:e.dark,role:n.role,"is-loading":n.isLoading,"data-message-id":n.id,"show-feedback-buttons":!e.readonly,"show-regenerate-button":!e.readonly,"exposed-regexes":e.exposedRegexes,"show-copy-button":"","e-markdown-props":e.eMarkdownProps,message:e.getMessageContent(n),type:n.type,initials:e.getMessageInitials(n),"show-avatar":e.isAvatarVisible(n),"with-actions":e.hasActions(n)&&s>0},on:{feedback:function(i){return e.onMessageFeedback(i,n.id)},"message-regenerate":function(i){return e.$emit("message-regenerate",n.id)},"animation-end":function(i){return e.$emit("animation-end",i)}},scopedSlots:e._u([e._l(e.markdownScopedSlots,function(i,a){return{key:a,fn:function(c){return[e._t(a,null,null,c)]}}}),{key:"message.content",fn:function(){return[e._t("message.content",null,{message:n})]},proxy:!0},{key:"message.append",fn:function(){return[e._t("message.append",null,{message:n})]},proxy:!0},{key:"extraContent",fn:function(){return[e._t("message.extraContent",null,{message:n})]},proxy:!0}],null,!0)})}),1),e.isLoading?r("EChatMessage",{attrs:{"is-loading":"","loading-message":e.loadingMessage,"data-message-id":-1,"show-avatar":e.showCopilotAvatar,role:e.ChatMessageRole.Copilot,dark:e.dark}}):e._e()],1),e._t("body-append",null,{messages:e.messages}),r("EChatFooter",{directives:[{name:"show",rawName:"v-show",value:!e.readonly,expression:"!readonly"}],ref:"chatFooter",attrs:{dark:e.dark,inline:e.inlineFooter}},[r("EChatInput",{attrs:{dark:e.dark,disabled:e.isDisabled,placeholder:e.inputPlaceholder,"silence-timeout":e.silenceTimeout},on:{"prompt-changed":function(n){return e.$emit("prompt-changed",n)},submit:e.sendMessage},scopedSlots:e._u([{key:"input-action-button",fn:function(){return[e._t("input-action-button")]},proxy:!0}],null,!0),model:{value:e.prompt,callback:function(n){e.prompt=n},expression:"prompt"}})],1)],2)])},n7=[],s7=H(t7,r7,n7,!1,null,"966d186a",null,null);const i7=s7.exports,a7=B.extend({name:"ERadioGroup",components:{EIcon:Fe},mixins:[wt],props:{dark:{type:Boolean,default:!1},withDescription:{type:Boolean,default:!0},withIcon:{type:Boolean,default:!1},itemsWrapperClasses:{type:[String,Object,Array],default:""}},computed:{radioItemClasses(){return{"e-bg-gray-800 e-text-gray-200 e-border-gray-700":this.dark,"e-text-gray-500 e-bg-white e-border-gray-300":!this.dark}},selectedItemClasses(){return"e-text-[#00315f] e-bg-[#629efc] e-border-transparent"}},methods:{showDescription(t){return this.withDescription&&(t==null?void 0:t.description)&&t.description.length>0||this.isSelected(t.value)},containerClasses(t){return[this.isSelected(t.value)?this.selectedItemClasses:this.radioItemClasses,t.disabled||this.disabled?"e-opacity-50 e-cursor-not-allowed":"e-cursor-pointer e-select-none"]}}});var o7=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{staticClass:"e-radio-group__wrapper e-mx-auto e-w-full"},[r("div",[r("div",{staticClass:"e-radio-group__items e-space-y-2",class:e.itemsWrapperClasses},e._l(e.options,function(n,s){return r("div",{key:s,staticClass:"e-radio-group__container e-relative e-flex e-border-solid e-border-[1.67px] e-rounded-lg e-px-4 e-py-2.5 e-shadow-md focus:e-outline-none e-max-h-[66px]",class:e.containerClasses(n),on:{click:function(i){return e.onItemClick(n.value)}}},[r("div",{staticClass:"e-radio-group__option-wrapper e-flex e-w-full e-items-center e-justify-between"},[r("div",{staticClass:"e-radio-group__option-wrapper e-flex e-items-center"},[e.withIcon&&n.icon?r("div",{staticClass:"e-mr-4"},[e._t("icon",function(){return[r("EIcon",{class:e.isSelected(n.value)?e.selectedItemClasses:e.radioItemClasses,attrs:{icon:n.icon,size:"base"}})]},{option:n,attrs:e.isSelected(n.value)?e.selectedItemClasses:e.radioItemClasses,isSelected:e.isSelected(n.value)})],2):e._e(),r("div",{staticClass:"e-radio-group__option e-flex e-items-center e-gap-2"},[e._t("prefix",null,{option:n}),r("div",{staticClass:"e-text-sm"},[e._t("label",function(){return[r("h2",{staticClass:"e-radio-group__option-title e-font-semibold e-text-sm e-mb-1 e-mt-1"},[e._v(" "+e._s(n.label)+" ")])]},{option:n}),e._t("description",function(){return[e.showDescription(n)?r("span",{staticClass:"e-radio-group__option-description e-mt-2 e-text-[0.75rem]"},[e._v(" "+e._s(n.description)+" ")]):e._e()]},{option:n})],2)],2)]),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isSelected(n.value),expression:"isSelected(option.value)"}],staticClass:"e-shrink-0 e-text-white"},[e._t("highlight-icon",function(){return[r("svg",{staticClass:"e-h-6 e-w-6",attrs:{viewBox:"0 0 24 24",fill:"none"}},[r("circle",{attrs:{cx:"12",cy:"12",r:"12",fill:"#fff","fill-opacity":"0.2"}}),r("path",{attrs:{d:"M7 13l3 3 7-7",stroke:"#fff","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}})])]},{option:n})],2)])])}),0)])])},l7=[],c7=H(a7,o7,l7,!1,null,null,null,null);const yi=c7.exports,u7=B.extend({name:"ETabs",mixins:[Rt],props:{dark:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},activeClass:{type:String,default:null}},methods:{onTabSelected(t){this.currentValue=t,this.$emit("tab-selected",t)},isActive(t){return this.currentValue===t},isLink(t){return!!t&&!this.isExternalLink(t)},isExternalLink(t){return!!t&&t.startsWith("http")},getTabBarItemClasses(t,e=""){return["e-tabs__item e-inline-block e-p-4 e-cursor-pointer e-text-xs",{[this.activeClass]:this.isActive(t)&&!!this.activeClass,"!e-text-gray-200 e-border-gray-700":this.dark&&!this.isActive(t),"hover:!e-text-gray-600 !e-text-gray-800":this.isExternalLink(e)||this.isLink(e),"!e-text-blue-600":this.isExternalLink(e)||this.isLink(e)," hover:e-bg-gray-100 ":!this.isActive(t)&&!this.dark,"!e-text-blue-600 e-bg-blue-100":this.isActive(t)&&!this.dark,"e-tabs__item-active":this.isActive(t)&&this.dark,"e-border-l-3 e-border-l-solid !e-border-b-blue-600":this.vertical&&this.isActive(t),"e-border-b-2 e-border-b-solid !e-border-b-blue-600":!this.vertical&&this.isActive(t)}]},getChildTitle(t){var r,n,s;const e=(r=t.componentOptions)==null?void 0:r.propsData;return e!=null&&e.title?e.title:e!=null&&e.name?e.name:(s=(n=t.data)==null?void 0:n.attrs)!=null&&s.name?t.data.attrs.name:`Tab ${this.currentValue+1}`},renderTab(t,e,r){var i,a,c,o,l,d,h,m;const n=((a=(i=e.data)==null?void 0:i.attrs)==null?void 0:a.href)||((o=(c=e.data)==null?void 0:c.attrs)==null?void 0:o.to),s=this.getTabBarItemClasses(r,n);if(n)try{return this.isExternalLink(n)?t("a",{key:r,class:s,attrs:{href:n,target:"_blank",rel:"noopener noreferrer",...(l=e.data)==null?void 0:l.attrs}},[this.getChildTitle(e)]):t("router-link",{key:r,class:s,attrs:{to:n,...(d=e.data)==null?void 0:d.attrs}},[this.getChildTitle(e)])}catch{return t("a",{key:r,class:s,attrs:{href:n,...(h=e.data)==null?void 0:h.attrs}},[this.getChildTitle(e)])}return t("div",{key:r,class:s,attrs:(m=e.data)==null?void 0:m.attrs,on:{click:()=>this.onTabSelected(r)}},[this.getChildTitle(e)])},renderContent(t,e,r){var n,s,i,a;return(s=(n=e.data)==null?void 0:n.attrs)!=null&&s.href||(a=(i=e.data)==null?void 0:i.attrs)!=null&&a.to||!this.isActive(r)?null:t("div",{class:"tab-content e-overflow-auto e-max-h-screen e-w-full"},[e])}},render(t){var r;const e=((r=this.$slots.default)==null?void 0:r.filter(n=>n.tag))||[];return t("div",{class:["e-tabs e-w-full e-h-full",{"e-flex-col":!this.vertical,"e-flex":this.vertical}]},[t("div",{class:["e-tabs__header e-text-sm e-font-medium e-text-center",{"e-flex e-border-b e-border-b-solid e-w-full":!this.vertical,"e-flex e-flex-col e-border-r e-border-r-solid":this.vertical,"e-text-gray-700":!this.activeClass,"e-tabs__header-light-border":!this.dark&&!this.activeClass,"e-tabs__header-dark-border":this.dark&&!this.activeClass,"e-bg-white":!this.dark,"e-bg-gray-800":this.dark}]},e.map((n,s)=>this.renderTab(t,n,s))),t("div",{class:"tab-content e-w-full"},e.map((n,s)=>this.renderContent(t,n,s)).filter(Boolean))])}}),S9="";var d7=H(u7,null,null,!1,null,null,null,null);const Ci=d7.exports,h7=B.extend({name:"ECard",props:{title:{type:[String,void 0],default:void 0},width:{type:[Number,String,void 0],default:void 0},height:{type:[Number,String,void 0],default:void 0},imageSize:{type:[Number,String,void 0],default:100},imagePadding:{type:Number,default:0},image:{type:[String,void 0],default:void 0},blurBackground:{type:Boolean,default:!1},imageTranslation:{type:[Number,void 0],default:void 0},dark:{type:Boolean,default:!1}},data(){return{bodyPadding:45}},computed:{surfaceClasses(){return{"e-border-solid e-border-[1px]":!0,"e-border-gray-200":!this.dark,"e-border-gray-600":this.dark}},backgroundClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark}},textClasses(){return{"e-text-gray-200":this.dark,"e-text-gray-600":!this.dark}},containerClasses(){return{...this.surfaceClasses,...this.backgroundClasses,...this.textClasses}},imageContainerClasses(){return{...this.surfaceClasses,...this.textClasses,"e-bg-gray-100":!0}},containerStyle(){let t={};return this.width&&(t={...t,width:isNaN(this.width)?this.width:`${this.width}px`}),this.height&&(t={...t,height:isNaN(this.height)?this.height:`${this.height}px`}),t},effectiveImageSize(){return(isNaN(this.imageSize)?parseInt(this.imageSize):this.imageSize)-2*this.imagePadding},imageStyle(){return{height:"auto",width:`${this.effectiveImageSize}px`,margin:`${this.imagePadding}px`}},imageContainerStyle(){const t=isNaN(this.imageSize)?this.imageSize:`${this.imageSize}px`;return{height:t,width:t,top:`${-this.computedImageTranslation}px`,left:`${-this.computedImageTranslation}px`}},computedImageTranslation(){return isNaN(this.imageTranslation)?-20:this.imageTranslation},titleStyle(){return this.image?{paddingLeft:`${this.imageSize-this.computedImageTranslation}px`}:{}},contentStyle(){return this.image?{paddingTop:`${Math.max(0,this.imageSize-this.bodyPadding-this.computedImageTranslation)}px`}:{}}},mounted(){this.blurBackground&&!/\.(gif|png|svg)$/.test(this.image)&&console.error("ECard: Image should be a gif, png or svg to blur the background")}}),$9="";var p7=function(){var e=this,r=e._self._c;return r("div",e._g(e._b({staticClass:"e-card e-rounded-lg e-p-3 e-relative",class:e.containerClasses,style:e.containerStyle},"div",e.$attrs,!1),e.$listeners),[e.image?r("div",{staticClass:"e-card__img__container e-absolute e-overflow-hidden e-rounded-lg e-flex e-justify-center e-items-center e-z-0",class:e.imageContainerClasses,style:e.imageContainerStyle},[e.blurBackground?r("img",{staticClass:"e-card__image--bg e-absolute",style:e.imageStyle,attrs:{src:e.image,alt:"card image"}}):e._e(),r("img",{staticClass:"e-card__image e-absolute",style:e.imageStyle,attrs:{src:e.image,alt:"card image"}})]):e._e(),r("div",{staticClass:"e-card__body e-relative e-z-1"},[e.title?r("div",{staticClass:"e-card__title e-font-bold e-text-lg e-mb-2",style:e.titleStyle},[e._t("title",function(){return[e._v(" "+e._s(e.title)+" ")]})],2):e._e(),r("div",{staticClass:"e-card__content",style:e.contentStyle},[e._t("default")],2)])])},f7=[],m7=H(h7,p7,f7,!1,null,null,null,null);const g7=m7.exports,_n={EAvatar:Mt,EBadge:Jt,EIcon:Fe,ESpinner:Wr,ERow:Gr,ECol:Ur,EVideoPlayer:Ns,ETimeline:Xs,EVideoEmbed:Vs,EHeatmapBar:dn,EHoursHeatmap:Qs,EReadMore:Ks,ETruncatedDiv:Js,ECompareSeparator:ei,EDragResize:hn,EImagesComparator:ti,EToggleSwitch:li,EExpandableMenu:ri,EZoomable:Jr,EGlobalSearch:fi,ESvgIcon:ai,ECalendarHeatmap:oi,EImagePlayer:mi,EZoomableImg:mn,EZoomSlider:fn,EActionButton:pt,ETooltip:St,ELayout:gi,EChat:i7,EContextProvider:Eu,ECopyToClipboardBtn:gn,EPopover:Nt,EVoiceRecorderToText:vn,ERadioGroup:yi,ESelect:pn,ETabs:Ci,ECard:g7,ESchedulePicker:ci,ESchedule:hi,EStepper:pi},v7={install(t){Object.keys(_n).forEach(e=>{t.component(e,_n[e])}),Object.keys(di).forEach(e=>{t.mixin(e,di[e])}),qs.forEach(({name:e,definition:r})=>{t.directive(e,r)})}};j.AvatarSizes=Y1,j.BadgeColors=V1,j.BadgeSizes=Z1,j.BaseColor=ie,j.ChatMessageRole=Ye,j.ChatMessageType=Qt,j.ClickOutsideDirective=rn,j.Colors=Ds,j.CompareMode=nt,j.Days=Ln,j.DirectivesMap=qs,j.EActionButton=pt,j.EAvatar=Mt,j.EBadge=Jt,j.ECalendarHeatmap=oi,j.ECol=Ur,j.ECompareSeparator=ei,j.ECopyToClipboardBtn=gn,j.EDragResize=hn,j.EExpandableMenu=ri,j.EGlobalSearch=fi,j.EHeatmapBar=dn,j.EHoursHeatmap=Qs,j.EIcon=Fe,j.EImagePlayer=mi,j.EImagesComparator=ti,j.ELayout=gi,j.EPopover=Nt,j.ERadioGroup=yi,j.EReadMore=Ks,j.ERow=Gr,j.ESchedule=hi,j.ESchedulePicker=ci,j.ESelect=pn,j.ESpinner=Wr,j.EStepper=pi,j.ESvgIcon=ai,j.ETabs=Ci,j.ETimeline=Xs,j.EToggleSwitch=li,j.ETooltip=St,j.ETruncatedDiv=Js,j.EVENTS=J1,j.EVideoEmbed=Vs,j.EVideoPlayer=Ns,j.EVoiceRecorderToText=vn,j.EZoomSlider=fn,j.EZoomable=Jr,j.EZoomableImg=mn,j.FeedbackType=Kt,j.IconSizes=Ps,j.ImageQuality=Dn,j.Position=ze,j.ResizeObserverDirective=Ve,j.ScheduleType=vt,j.Size=K,j.TextSizes=Ls,j.TimelineAxis=rt,j.TimelineChartType=Ne,j.TimelineIntervalChangeTrigger=_t,j.ToggleSwitchSizes=X1,j.TooltipColors=Q1,j.TooltipPositions=K1,j.components=_n,j.debounce=g0,j.default=v7,j.eventListeners=We,j.exitFullScreen=Xr,j.formField=Rt,j.fullConfig=qr,j.generateUniqueId=C0,j.getGradientColors=Vr,j.getImageData=_0,j.getRandomChars=v0,j.hashCode=Is,j.hexToRgba=zs,j.hoursMinutesStrToMinutes=Rs,j.inactivityListener=ui,j.isFullScreen=Zr,j.isRgba=Bs,j.isValidDate=y0,j.makeFullScreen=Yr,j.minutesToHoursMinutesStr=Qr,j.rgbToRgba=Os,j.schedules=Fs,j.selectFormField=wt,j.subtractOneHourFromEndIntervals=b0,j.timeouts=Ue,j.toNumericSchedule=Kr,j.toRgba=ht,j.toggleOpen=Ht,j.twentyFourHours=As,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
243
|
+
`);return await this.processMarkdown(s),n=n.replace(s,""),this.startNewRenderingCycle(),n}async render(e){this.isFirstTableRender&&(this.updateContent(e),this.isFirstTableRender=!1),this.isRenderingTable?(this.updateTableContent(e),this.accumulator=this.mdTableHeaderString+this.pendingRowString):this.animated?await this.animateNewChunk(e):this.updateContent(e)}updateTableContent(e){const r=this.extractTableFromHtml(e);if(!r)return;const n=this.htmlRenderingTarget.parentNode,s=this.ensureTableExists(n);this.removeEmptyTableRows(s);const i=r.querySelector("tbody")||document.createElement("tbody"),a=this.ensureTBodyExists(s);this.copyTableHead(r,s),this.copyTableBodyRows(i,a)}processTextNode(e,r,n,s,i){const c=e.value.split(s);if(c.length>1){const o=this.replaceRegexTargets(c,s,i,e,r);n.children.splice(r,1,...o)}}replaceRegexTargets(e,r,n,s,i){return e.map((a,c)=>{var o,l;if(r.test(a)){const d=`regex-target-${n}-${c}-${i}-${this.totalMarkdown.length}-${(l=(o=s==null?void 0:s.position)==null?void 0:o.start)==null?void 0:l.offset}`;return this.regexRenderTargetsById[d]={match:a,type:n},{type:"html",value:`<span id="${d}">${a}</span>`}}return a?{type:"text",value:a}:null}).filter(Boolean)}ensureTableExists(e){let r=e.querySelector(`table#t-${this.tableId}`);return r||(r=document.createElement("table"),r.id=`t-${this.tableId}`,e.appendChild(r)),r}ensureTBodyExists(e){let r=e.querySelector("tbody");return r||(r=document.createElement("tbody"),e.appendChild(r)),r}copyTableHead(e,r){const n=e.querySelector("thead");!r.querySelector("thead")&&n&&r.appendChild(n)}copyTableBodyRows(e,r){const n=e.querySelectorAll("tr"),s=Array.from(r.querySelectorAll("tr")).map(i=>i.id);n&&n.forEach(i=>{!i.innerText.trim()||s.includes(i.id)||r.appendChild(i.cloneNode(!0))})}removeEmptyTableRows(e){e.querySelectorAll("tr").forEach(n=>{const s=n.querySelectorAll("td, th");let i=!0;s.forEach(a=>{a.textContent.trim()!==""&&(i=!1)}),i&&n.parentNode.removeChild(n)})}getRegexRenderTargets(){return this.regexRenderTargetsById}clearRegexRenderTargets(){this.regexRenderTargetsById={}}extractTableFromHtml(e){const r=document.createElement("div");return r.innerHTML=e,r.querySelector(`table#t-${this.tableId}`)}updateContent(e){const r=document.createElement("div");r.innerHTML=e,Vi(this.htmlRenderingTarget,r,{onBeforeElUpdated:(n,s)=>n.classList.contains("Typewriter__wrapper")?(s.innerHTML=n.innerHTML,!1):!0})}initTypewriter(){return new e8(this.container,{loop:!1,delay:0,cursor:""})}async animateNewChunk(e){const r=this.getNewContent(e);await new Promise(n=>{this.onAnimationStart(),this.typewriter.typeString(r).callFunction(()=>{this.onAnimationEnd(),n()}).start()})}getNewContent(e){const r=document.createElement("div");return r.innerHTML=e,(r.textContent||"").slice(this.lastProcessedLength)}}const r8=B.extend({name:"EMarkdown",props:{nextChunks:{type:[Array,String],default:()=>[]},exposedRegexes:{type:Array,default:()=>[]},animated:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},useTableProcessor:{type:Boolean,default:!0}},data(){return{isProcessing:!1,processor:null}},watch:{nextChunks(t){this.handleNewChunk(t.join(""))}},mounted(){this.initProcessor(),this.processInitialChunks()},methods:{initProcessor(){const t=this.$refs.content;this.processor=new t8(t,{exposedRegexes:this.exposedRegexes,animated:this.animated,onAnimationStart:()=>this.$emit("animation-start"),onAnimationEnd:()=>this.$emit("animation-end"),useTableProcessor:this.useTableProcessor})},async processChunk(t){var r;await((r=this.processor)==null?void 0:r.processMarkdown(t))&&this.renderRegexesScopedSlots()},async handleNewChunk(t){await this.processChunk(t)},async processInitialChunks(){const t=Array.isArray(this.nextChunks)?this.nextChunks:[this.nextChunks];for(const e of t)await this.handleNewChunk(e)},renderRegexesScopedSlots(){var e,r;const t=(e=this.processor)==null?void 0:e.getRegexRenderTargets();Object.entries(t).forEach(([n,{match:s,type:i}])=>{this.renderScopedSlot({id:n,type:i,propsData:{match:s}})}),(r=this.processor)==null||r.clearRegexRenderTargets()},renderScopedSlot({id:t,type:e,propsData:r}){const n=document.getElementById(t);if(!n)return;const s=this.$scopedSlots[`markdown.regex.${e}`];if(!s)return;const i=B.extend({functional:!0,props:["scopedSlot","propsData"],render:(c,o)=>o.props.scopedSlot(o.props.propsData)}),a=new B({render:c=>c(i,{props:{scopedSlot:s,propsData:r}})}).$mount();return n.innerHTML="",n.appendChild(a.$el),a}}}),m9="";var n8=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-markdown"},[r("article",{staticClass:"e-mx-auto prose-h1:!e-text-2xl prose-h2:!e-text-xl prose-h2:!e-mt-0 prose-h3:!e-text-lg e-prose e-prose-slate",class:{"e-prose-invert":e.dark}},[r("div",{ref:"content",staticClass:"e-markdown__content"})])])},s8=[],i8=H(r8,n8,s8,!1,null,null,null,null);const a8=i8.exports,o8=B.extend({name:"ECopyToClipboardBtn",components:{EActionButton:pt},mixins:[We,Ue],props:{text:{type:[Function,String,Number],required:!0},buttonText:{type:String,default:""},buttonClasses:{type:[String,Object,Array],default:null},description:{type:String,default:"Copy"},iconType:{type:String,default:"far fa-copy"},textOnlyButton:{type:Boolean,default:!1},dark:{type:Boolean,default:!0}},data(){return{loading:!1,tooltipText:this.description||"Copy to clipboard"}},computed:{copyButtonClasses(){return{"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"hover:e-bg-gray-600":this.dark,"hover:e-bg-gray-200":!this.dark,"e-rounded-md e-border-none copy-button e-bg-transparent":!0}}},watch:{tooltipText(t){t!==this.description&&this.$setTimeout(()=>{this.tooltipText=this.description},1e3)}},mounted(){this.$addEventListener("focusin",this.handleFocusin,this.$refs.copyToClipboard)},methods:{handleFocusin(t){t.stopPropagation()},getProp(t,e){return Object.prototype.hasOwnProperty.call(this.$attrs,t)?this.$attrs[t]:e},copyTextToClipboard(){try{this.loading=!0;let t;typeof this.text=="function"?t=this.text():t=this.text;const e=this.$refs.copyToClipboard;e.value=t,e.focus(),e.select(),document.execCommand("copy"),this.tooltipText="Copied!",this.$emit("copied")}catch(t){console.error("Failed to copy text to clipboard",t)}finally{this.loading=!1}}}}),g9="";var l8=function(){var e=this,r=e._self._c;return r("EActionButton",e._g(e._b({attrs:{"tooltip-text":e.tooltipText,"tooltip-position":"top",icon:e.iconType,"icon-size":"Lg",dark:e.dark,"button-classes":e.copyButtonClasses},on:{click:e.copyTextToClipboard}},"EActionButton",e.$attrs,!1),e.$listeners),[e._v(" "+e._s(e.buttonText)+" "),r("textarea",{ref:"copyToClipboard",staticClass:"copy-to-clipboard",attrs:{readonly:""}})])},c8=[],u8=H(o8,l8,c8,!1,null,"d3d39d0d",null,null);const gn=u8.exports,d8=B.extend({name:"EDialog",components:{EFadeTransition:jt},mixins:[We],props:{value:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},actions:{type:Array,default:()=>[]},title:{type:String,default:""},persistent:{type:Boolean,default:!1},width:{type:[Number,String],default:500},height:{type:[Number,String],default:void 0},closeWithEscape:{type:Boolean,default:!0}},computed:{visible:{get(){return this.value},set(t){this.$emit("input",t)}},panelClasses(){return["e-relative e-transform e-overflow-hidden e-rounded-lg e-text-left e-shadow-xl e-transition-all e-w-full e-flex e-flex-col",this.dark?"e-bg-gray-800":"e-bg-white"]},headerContainerClasses(){return["e-dialog__header",this.dark?"e-bg-gray-800 e-text-gray-50":"e-bg-white e-text-slate-900","e-px-6 e-pt-6 e-pb-4"]},bodyContainerClasses(){return["e-dialog__body e-px-6",this.dark?"e-bg-gray-800 e-text-gray-50":"e-bg-white e-text-slate-900"]},footerContainerClasses(){return["e-dialog__footer",this.dark?"e-bg-gray-700":"e-bg-gray-50","e-flex e-py-3 e-px-4 e-justify-end e-mt-auto e-items-end"]},panelStyles(){const t=typeof this.width=="number"?`${this.width}px`:this.width,e=typeof this.height=="number"?`${this.height}px`:this.height;return{minWidth:t,minHeight:e,width:t,height:e}}},watch:{visible(t){t?this.showDialog():this.closeDialog()}},mounted(){this.visible&&this.showDialog(),this.$addEventListener("keydown",this.handleKeyDown)},methods:{showDialog(){this.$nextTick(()=>{const t=this.$refs.dialog;t&&!t.open&&t.showModal()})},closeDialog(){const t=this.$refs.dialog;t!=null&&t.open&&t.close()},handleBackdropClick(t){!this.persistent&&t.target===t.currentTarget&&(this.visible=!1)},onClose(){this.persistent||(this.visible=!1)},getButtonClasses(t){const e=this.dark?"e-bg-gray-700 e-text-gray-50 e-border-solid e-border-[1px] e-border-gray-500 hover:e-bg-gray-600":"e-bg-white e-text-gray-900 e-border-solid e-border-[1px] e-border-gray-300 hover:e-bg-gray-50",r={[ie.Warning]:"e-bg-warning e-text-white e-border-none",[ie.Error]:"e-bg-error e-text-white e-border-none",[ie.Info]:"e-bg-info e-text-white e-border-none",[ie.Success]:"e-bg-success e-text-white e-border-none",[ie.Primary]:"e-bg-primary e-text-white e-border-none",[ie.Brand]:"e-bg-brand-500 e-text-white e-border-none",[ie.Default]:e,[ie.Gray]:"e-bg-gray-600 e-text-white hover:e-bg-gray-light e-border-none"};return["e-inline-flex e-w-full e-justify-center e-rounded-md e-px-3 e-py-2 e-text-sm e-font-semibold e-shadow-sm sm:e-ml-3 sm:e-w-auto e-cursor-pointer hover:e-opacity-90",r[t]||r[ie.Default]]},onActionClick(t){t.closeOnClick&&(this.visible=!1),this.$emit("action-clicked",t.id||t.label)},handleKeyDown(t){t.key==="Escape"&&(this.persistent||!this.closeWithEscape?t.preventDefault():this.visible=!1)}}}),v9="";var h8=function(){var e=this,r=e._self._c;return r("EFadeTransition",{attrs:{duration:100}},[e.visible?r("dialog",{ref:"dialog",staticClass:"e-dialog e-p-0 e-m-auto e-border-none e-rounded-lg",on:{click:e.handleBackdropClick,close:e.onClose,cancel:e.onClose}},[r("div",{class:e.panelClasses,style:e.panelStyles},[r("div",{class:e.headerContainerClasses},[e._t("header",function(){return[e.title?r("div",{staticClass:"e-text-lg e-font-bold"},[e._v(" "+e._s(e.title)+" ")]):e._e()]},{dark:e.dark})],2),r("div",{class:e.bodyContainerClasses},[e._t("default",null,{dark:e.dark})],2),r("div",{class:e.footerContainerClasses},[e._t("footer",function(){return e._l(e.actions,function(n,s){return r("button",{key:s,class:e.getButtonClasses(n.color),on:{click:function(i){return i.stopPropagation(),e.onActionClick(n)}}},[e._v(" "+e._s(n.label)+" ")])})},{actions:e.actions,dark:e.dark})],2)])]):e._e()])},p8=[],f8=H(d8,h8,p8,!1,null,null,null,null);const m8=f8.exports,g8=B.extend({name:"EFeedbackButton",components:{EDialog:m8,EActionButton:pt},mixins:[We,Ue],props:{buttonText:{type:String,default:""},buttonClasses:{type:[String,Object,Array],default:null},description:{type:String,default:"Submit feedback"},iconType:{type:String,default:"far fa-thumbs-up"},withText:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},dialogActions:{type:Array,default:()=>[{label:"Cancel",color:"default",closeOnClick:!0},{label:"Submit",color:"primary"}]},dialogWidth:{type:[Number,String],default:"27rem"}},data(){return{tooltipText:this.description||"Submit feedback",showDialog:!1,feedbackText:""}},computed:{eButtonClasses(){return{"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"hover:e-bg-gray-600":this.dark,"hover:e-bg-gray-200":!this.dark,"e-rounded-md e-border-none e-bg-transparent":!0}},textAreaClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark,"e-text-gray-600":!this.dark,"e-text-gray-300":this.dark,"e-custom-scrollbar--light":!this.dark,"e-custom-scrollbar--dark":this.dark}},textAreaContainerClasses(){return{"e-border-gray-600":this.dark,"e-border-gray-300":!this.dark}}},watch:{tooltipText(t){t!==this.description&&this.$setTimeout(()=>{this.tooltipText=this.description},1e3)}},methods:{onClick(t){this.withText?this.showDialog=!0:this.submitFeedback(t)},submitFeedback(t){if(t==="Cancel"){this.showDialog=!1;return}this.showDialog=!1,this.$emit("submit",this.feedbackText),this.tooltipText="Thank you!"}}}),_9="";var v8=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("EActionButton",{attrs:{"tooltip-text":e.tooltipText,"tooltip-position":"top",icon:e.iconType,"icon-size":"Lg",dark:e.dark,"button-classes":e.eButtonClasses},on:{click:e.onClick}},[e._v(" "+e._s(e.buttonText)+" "),e.withText?r("EDialog",{staticClass:"e-feedback",attrs:{value:e.showDialog,title:"Feedback",dark:e.dark,width:e.dialogWidth,persistent:"",actions:e.dialogActions,"close-with-escape":!1},on:{"action-clicked":e.submitFeedback}},[r("div",{staticClass:"e-feedback__form"},[r("div",{staticClass:"e-feedback__form-description e-mb-3 e-leading-relaxed"},[e._v(" Thanks for your input! "),r("br"),e._v("Please share your thoughts and experience to help us improve ")]),r("div",{staticClass:"e-rounded-md e-w-full e-overflow-hidden e-border e-border-solid e-py-2 e-mb-6",class:e.textAreaContainerClasses},[r("textarea",{directives:[{name:"model",rawName:"v-model",value:e.feedbackText,expression:"feedbackText"}],staticClass:"e-feedback__textarea focus:e-outline-none e-mr-6 e-border-none e-placeholder-gray-400 e-py-3 e-pl-3 e-w-full",class:e.textAreaClasses,attrs:{autofocus:"",tabindex:"0",rows:"4",placeholder:"Enter your text here..."},domProps:{value:e.feedbackText},on:{input:function(n){n.target.composing||(e.feedbackText=n.target.value)}}})])])]):e._e()],1)},_8=[],y8=H(g8,v8,_8,!1,null,null,null,null);const C8=y8.exports,b8=B.extend({name:"EChatMessageActions",components:{EFeedbackButton:C8,ECopyToClipboardBtn:gn,EActionButton:pt},props:{message:{type:[String,Array],default:""},dark:{type:Boolean,default:!1},showCopyButton:{type:Boolean,default:!1},showRegenerateButton:{type:Boolean,default:!1},showFeedbackButtons:{type:Boolean,default:!1},messageId:{type:[String,Number],default:null}},data(){return{FeedbackType:Kt,showFeedbackDialog:!1}},computed:{messageText(){return(Array.isArray(this.message)?this.message:[this.message]).join("")},eButtonClasses(){return{"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"hover:e-bg-gray-600":this.dark,"hover:e-bg-gray-200":!this.dark,"e-rounded-md e-border-none e-bg-transparent e-border-none":!0}}},methods:{handleFeedback(t,e){this.$emit("feedback",{type:t,text:e})},openFeedbackDialog(){this.showFeedbackDialog=!0}}}),y9="";var x8=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-message__actions e-relative"},[r("div",{staticClass:"e-message__actions-container e-flex e-gap-1 e-my-2"},[e.showCopyButton?r("ECopyToClipboardBtn",{attrs:{text:e.messageText,dark:e.dark,"button-size":"xs","button-classes":"e-bg-transparent e-border-none",description:"Copy"}}):e._e(),e.showRegenerateButton?r("EActionButton",{attrs:{"tooltip-text":"Regenerate","tooltip-position":"top",icon:"rotate-right","icon-size":"xs",dark:e.dark,"button-classes":e.eButtonClasses},on:{click:function(n){return e.$emit("regenerate")}}}):e._e(),e.showFeedbackButtons?r("EFeedbackButton",{attrs:{dark:e.dark,"with-text":"",description:"Give positive feedback","button-size":"sm","button-classes":"e-bg-transparent e-border-none"},on:{submit:function(n){return e.handleFeedback(e.FeedbackType.Positive,n)}},nativeOn:{click:function(n){return e.openFeedbackDialog.apply(null,arguments)}}}):e._e(),e.showFeedbackButtons?r("EFeedbackButton",{attrs:{dark:e.dark,"with-text":"",description:"Give negative feedback","button-size":"sm","button-classes":"e-bg-transparent e-border-none","icon-type":"far fa-thumbs-down"},on:{submit:function(n){return e.handleFeedback(e.FeedbackType.Negative,n)}},nativeOn:{click:function(n){return e.openFeedbackDialog.apply(null,arguments)}}}):e._e()],1)])},w8=[],S8=H(b8,x8,w8,!1,null,null,null,null);const T8=S8.exports,k8=B.extend({name:"EChatMessage",components:{EFadeTransition:jt,EAvatar:Mt,EChatMessageActions:T8,EEvercamLogo:vi,EPulsatingDot:Ku,EMarkdown:a8},mixins:[Ue],props:{role:{type:String,default:Ye.User},initials:{type:String,default:null},message:{type:[String,Array,Object],default:""},isLoading:{type:Boolean,default:!1},avatarSrc:{type:String,default:null},type:{type:String,default:Qt.Text},showAvatar:{type:Boolean,default:!0},dark:{type:Boolean,default:!1},withActions:{type:Boolean,default:!1},showCopyButton:{type:Boolean,default:!1},showRegenerateButton:{type:Boolean,default:!1},showFeedbackButtons:{type:Boolean,default:!1},loadingMessage:{type:String,default:""},exposedRegexes:{type:Array,default:()=>[]},animated:{type:Boolean,default:!1},eMarkdownProps:{type:Object,default:()=>({})}},data(){return{showActions:!1,nextChunks:[]}},computed:{isBotRole(){return this.role===Ye.Copilot||this.role===Ye.System},userMessageClasses(){return{"e-bg-gray-100 e-text-gray-800":!this.dark,"e-bg-gray-600 e-text-white":this.dark}},logoClasses(){return{"e-bg-white e-rounded-full":this.dark}},dotColor(){return this.dark?"#ff2525":"#c5393d"},markdownScopedSlots(){return Object.keys(this.$scopedSlots).filter(t=>t.startsWith("markdown.")).reduce((t,e)=>(t[e]=this.$scopedSlots[e],t),{})}},watch:{message:{immediate:!0,handler(t,e){t.length&&(e!=null&&e.length?this.nextChunks=t.slice(e.length):this.nextChunks=t)}}},methods:{onMouseOver(){this.showActions=!0},onMouseLeave(t){[null,document.documentElement].includes(t.relatedTarget)||(this.showActions=!1)},onFeedback(t){this.$emit("feedback",t),this.$setTimeout(()=>{this.showActions=!1},1e3)}}}),C9="";var $8=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{staticClass:"e-chat-message e-mb-3"},[r("div",{staticClass:"e-chat-message__wrapper e-flex e-items-start e-justify-start e-gap-3",class:{"e-chat-message__rtl":!e.isBotRole}},[e.showAvatar?r("div",{staticClass:"e-chat-message__avatar"},[e.isBotRole?e._t("message-avatar",function(){return[r("div",{class:e.logoClasses},[r("EEvercamLogo",{attrs:{size:"xs","background-classes":"e-bg-white e-p-[2px] e-rounded-full !e-pr-[2.5px] !e-pt-[3.5px]"}})],1)]},{role:e.role}):r("EAvatar",{attrs:{image:e.avatarSrc,size:"Xs"}},[e._v(e._s(e.initials))])],2):e._e(),r("div",{staticClass:"e-chat-message__content e-flex e-w-full",class:{"e-justify-end":!e.isBotRole}},[e._t("message.content",function(){return[e.isLoading&&e.isBotRole?e._t("loadingPlaceholder",function(){return[r("div",[e.loadingMessage?r("EMarkdown",{staticClass:"e-chat-message__markdown e-italic",attrs:{"next-chunks":[e.loadingMessage],animated:"",dark:e.dark,copyable:!1}}):e._e(),r("div",{staticClass:"e-inline-block e-mt-2 e-ml-2"},[r("EPulsatingDot",{attrs:{size:8,color:e.dotColor}})],1)],1)]}):e.isBotRole&&e.type!=="error"?r("EMarkdown",e._b({staticClass:"e-chat-message__markdown e-w-full",attrs:{"next-chunks":e.nextChunks,animated:e.animated,dark:e.dark,"exposed-regexes":e.exposedRegexes},on:{"animation-end":function(n){return e.$emit("animation-end")},"animation-start":function(n){return e.$emit("animation-start")}},scopedSlots:e._u([e._l(e.markdownScopedSlots,function(n,s){return{key:s,fn:function(i){return[e._t(s,null,null,i)]}}})],null,!0)},"EMarkdown",e.eMarkdownProps,!1)):e.type==="error"?r("p",{staticClass:"e-chat-message__error e-px-4 e-py-3 e-border-solid e-border-[1.67px] e-rounded-md e-border-red-400 e-bg-red-500/10 e-text-sm e-font-normal"},[e._v(" "+e._s(e.message)+" ")]):r("p",{staticClass:"e-chat-message__content e-font-medium e-text-wrap e-mb-1 e-rounded-lg e-p-2 e-px-4",class:e.userMessageClasses},[e._v(" "+e._s(e.message)+" ")]),e._t("extraContent")]})],2)]),e._t("message.append"),r("EFadeTransition",[e.withActions?r("EChatMessageActions",{staticClass:"e-left-11",attrs:{"message-id":e.$attrs["data-message-id"],dark:e.dark,"show-copy-button":e.showCopyButton,"show-feedback-buttons":e.showFeedbackButtons,"show-regenerate-button":e.showRegenerateButton,message:e.message},on:{feedback:e.onFeedback,regenerate:function(n){return e.$emit("message-regenerate")}}}):e._e()],1)],2)},E8=[],M8=H(k8,$8,E8,!1,null,null,null,null);const L8=M8.exports,D8=B.extend({name:"EChatFooter",props:{dark:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},computed:{backgroundClasses(){return this.inline?{}:{"e-bg-gray-700":this.dark,"e-bg-gray-50":!this.dark}},footerClasses(){return{...this.backgroundClasses}}}});var P8=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{staticClass:"e-chat-footer e-px-3 e-pt-4 e-pb-3",class:e.footerClasses},[e._t("default")],2)},z8=[],O8=H(D8,P8,z8,!1,null,null,null,null);const B8=O8.exports,I8=B.extend({name:"EVoiceInputVolumeIndicator",props:{isListening:{type:Boolean,required:!0},analyser:{type:Object,required:!0}},data(){return{volume:0,animationFrameId:0}},watch:{isListening:{immediate:!0,handler(t){t?this.startVolumeMonitoring():this.stopVolumeMonitoring()}}},beforeDestroy(){this.stopVolumeMonitoring()},methods:{startVolumeMonitoring(){this.analyser&&this.updateVolume()},updateVolume(){if(!this.analyser)return;const t=new Uint8Array(this.analyser.frequencyBinCount);this.analyser.getByteFrequencyData(t);let e=0;for(const r of t)e+=r**2.75;this.volume=Math.sqrt(e/t.length)/256,this.animationFrameId=requestAnimationFrame(this.updateVolume)},stopVolumeMonitoring(){this.animationFrameId&&cancelAnimationFrame(this.animationFrameId)}}}),b9="";var F8=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-volume-indicator e-relative e-w-8 e-h-8 e-flex e-items-center e-justify-center"},[r("div",{staticClass:"e-volume-indicator__bubble e-absolute e-inset-y-0 e-rounded-full",style:{transform:`scale(${e.isListening?.5+e.volume*.5:1})`,opacity:e.isListening?.5:0,width:"inherit",height:"inherit"}}),r("div",{staticClass:"e-absolute e-inset-0 e-flex e-items-center e-justify-center"},[e._t("default")],2)])},A8=[],R8=H(I8,F8,A8,!1,null,null,null,null);const H8=R8.exports,N8=B.extend({name:"EVoiceInput",components:{EVoiceInputVolumeIndicator:H8,EIcon:Fe,ETooltip:St},mixins:[We],props:{value:{type:String,default:""},dark:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},iconSize:{type:Number,default:10},silenceTimeout:{type:Number,default:1500}},data(){return{recognition:null,isListening:!1,interimTranscript:"",finalTranscript:"",analyser:null,audioContext:null,mediaStream:null,mediaStreamSource:null,silenceTimer:null}},computed:{currentTranscript(){return this.finalTranscript+this.interimTranscript},buttonClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark,"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"e-opacity-50":this.disabled}}},watch:{currentTranscript(t){this.$emit("input",t)}},mounted(){this.initSpeechRecognition(),this.$addEventListener("keydown",this.handleKeyDown)},beforeDestroy(){this.stopListening()},methods:{initSpeechRecognition(){const t=window.SpeechRecognition||window.webkitSpeechRecognition;if(!t){console.error("Speech recognition is not supported in this browser.");return}if(this.recognition=new t,this.recognition.continuous=!0,this.recognition.interimResults=!0,this.recognition.lang="en-US",this.recognition.speechStartTimeout=200,this.recognition.onresult=this.handleResult,this.recognition.onerror=this.handleError,this.recognition.onend=this.handleEnd,this.recognition.onspeechend=this.handleSpeechEnd,this.audioContext=new(window.AudioContext||window.webkitAudioContext),!this.audioContext){console.error("Audio context is not supported in this browser.");return}this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=256},async toggleListening(){this.recognition&&(this.isListening?this.stopListening():await this.setupVolume())},async setupVolume(){try{this.mediaStream=await navigator.mediaDevices.getUserMedia({audio:!0}),this.audioContext.state!=="running"&&await this.audioContext.resume(),this.mediaStreamSource=this.audioContext.createMediaStreamSource(this.mediaStream),this.mediaStreamSource.connect(this.analyser),this.finalTranscript="",this.interimTranscript="",this.recognition.start(),this.isListening=!0}catch(t){console.error("Error accessing microphone:",t)}},stopListening(){this.isListening=!1,this.recognition.stop(),this.silenceTimer&&(clearTimeout(this.silenceTimer),this.silenceTimer=null),this.flushMediaStream()},flushMediaStream(){var t;this.mediaStream&&(this.mediaStream.getTracks().forEach(e=>e.stop()),(t=this.mediaStreamSource)==null||t.disconnect(),this.mediaStream=null,this.mediaStreamSource=null)},handleResult(t){this.interimTranscript="";for(let e=t.resultIndex;e<t.results.length;++e){const r=t.results[e];r.isFinal?this.finalTranscript+=r[0].transcript+" ":this.interimTranscript+=r[0].transcript}this.silenceTimer&&clearTimeout(this.silenceTimer),this.silenceTimer=setTimeout(()=>{this.submitTranscript()},this.silenceTimeout)},handleEnd(){this.isListening=!1},handleSpeechEnd(){this.submitTranscript()},submitTranscript(){this.finalTranscript.trim().length>0&&(this.$emit("on-voice-message-end",this.finalTranscript.trim()),this.finalTranscript="",this.interimTranscript=""),this.stopListening()},handleKeyDown(t){t.code==="Space"&&t.ctrlKey&&(t.preventDefault(),this.toggleListening())},handleError(t){console.error("Speech recognition error:",t==null?void 0:t.error),this.isListening=!1}}});var j8=function(){var e=this,r=e._self._c;return r("ETooltip",{attrs:{text:"Use Ctrl + Space to speak",dark:e.dark}},[r("button",e._g(e._b({staticClass:"e-chat-input__voice-btn e-border-none e-chat-input__voice-btn e-flex e-items-center e-justify-center e-cursor-pointer e-h-8 e-w-8 disabled:e-cursor-not-allowed focus:e-outline-none",class:{...e.buttonClasses,"e-h-10 e-w-10":!e.isListening},on:{click:e.toggleListening}},"button",e.$attrs,!1),e.$listeners),[e.isListening?r("EVoiceInputVolumeIndicator",{attrs:{analyser:e.analyser,"is-listening":e.isListening}},[r("EIcon",{staticClass:"e-chat-input__voice-btn--icon",attrs:{icon:"stop",color:"e-text-red-600",size:"Sm"}})],1):r("EIcon",{attrs:{icon:"microphone",size:"Base"}})],1)])},q8=[],W8=H(N8,j8,q8,!1,null,null,null,null);const vn=W8.exports,G8=B.extend({name:"EChatInput",components:{EIcon:Fe,ETooltip:St,EVoiceInput:vn},model:{prop:"value",event:"prompt-changed"},props:{dark:{type:Boolean,default:!1},placeholder:{type:String,default:"Message Copilot"},disabled:{type:Boolean,default:!1},silenceTimeout:{type:Number,default:1500}},data(){return{content:"",maxHeight:175,textAreaHeight:0,isShiftKeyPressed:!1,transcript:""}},computed:{textAreaContainerClasses(){return{"e-border-gray-600":this.dark&&!this.disabled,"e-border-gray-300":!this.dark&&!this.disabled,"e-border-gray-800":this.dark&&this.disabled,"e-border-gray-500":!this.dark&&this.disabled,"e-cursor-not-allowed e-opacity-50":this.disabled}},textAreaClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark,"e-text-gray-600":!this.dark,"e-text-gray-300":this.dark,"e-custom-scrollbar--light":!this.dark,"e-custom-scrollbar--dark":this.dark}},buttonClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark,"e-text-gray-500":!this.dark,"e-text-gray-300":this.dark,"e-opacity-50":this.isSubmitDisabled}},isSubmitDisabled(){return this.disabled||this.content.length<4},textareaStyle(){return this.textAreaHeight?{height:`${Math.min(this.textAreaHeight,this.maxHeight)}px`,overflowY:this.isOverflowing?"scroll":"hidden"}:{}},isOverflowing(){return!!this.textAreaHeight&&this.textAreaHeight>this.maxHeight}},mounted(){this.focus()},methods:{focus(){this.$refs.chatTextarea.focus()},submitMessage(){this.$emit("submit",this.content),this.content="",this.$nextTick(this.updateTextAreaHeight)},onInput(t){const e=t.target,r=this.content===e.value;this.content=e.value,r||(this.updateTextAreaHeight(),this.$emit("prompt-changed",e.value))},onKeyDown(t){if(!this.disabled){if(!this.isShiftKeyPressed&&t.key==="Enter"){t.preventDefault();return}if(t.key==="Shift"||t.code==="ShiftLeft"){this.isShiftKeyPressed=!0;return}}},onKeyUp(t){if(!this.disabled){if(t.key==="Shift"||t.code==="ShiftLeft"){this.isShiftKeyPressed=!1;return}t.key==="Enter"&&!this.isShiftKeyPressed&&(t.preventDefault(),this.submitMessage())}},updateTextAreaHeight(){const t=this.$refs.chatTextarea;t.style.height="auto",this.textAreaHeight=t.scrollHeight},handleVoiceMessage(t){this.$emit("prompt-changed",t),this.$emit("submit",t),this.transcript=""}}}),x9="";var U8=function(){var e=this,r=e._self._c;return r("div",{staticClass:"e-chat-input e-relative e-flex e-w-auto e-p-2"},[r("div",{staticClass:"e-rounded-lg e-w-full e-overflow-hidden e-border e-border-solid",class:e.textAreaContainerClasses},[r("textarea",e._b({ref:"chatTextarea",staticClass:"e-chat-input__textarea focus:e-outline-none e-mr-6 e-border-none e-placeholder-gray-400 e-py-3 e-pl-3 e-w-full",class:e.textAreaClasses,style:e.textareaStyle,attrs:{rows:"1",tabindex:"0",autofocus:"",placeholder:e.transcript.length>0?e.transcript:e.placeholder,disabled:e.disabled},on:{keydown:function(n){return n.stopPropagation(),e.onKeyDown.apply(null,arguments)},keyup:e.onKeyUp,input:e.onInput}},"textarea",e.$attrs,!1))]),r("div",{staticClass:"e-absolute e-bottom-3 e-items-center e-flex e-h-min e-gap-1.5",class:e.isOverflowing?"e-right-6":"e-right-4"},[e._t("input-action-button",function(){return[r("EVoiceInput",{attrs:{dark:e.dark,disabled:e.disabled,"silence-timeout":e.silenceTimeout},on:{"on-voice-message-end":e.handleVoiceMessage},model:{value:e.transcript,callback:function(n){e.transcript=n},expression:"transcript"}}),r("ETooltip",{attrs:{text:"Submit",dark:e.dark}},[r("button",{staticClass:"e-chat-input__submit-btn e-inline-flex e-items-center e-justify-center e-cursor-pointer disabled:e-cursor-not-allowed e-h-8 e-w-8 e-border-none focus:e-outline-none",class:e.buttonClasses,attrs:{type:"button",disabled:e.isSubmitDisabled},on:{click:function(n){return n.preventDefault(),e.submitMessage.apply(null,arguments)}}},[r("EIcon",{attrs:{icon:"arrow-up",size:"base"}})],1)])]},{buttonClasses:e.buttonClasses})],2)])},Z8=[],Y8=H(G8,U8,Z8,!1,null,null,null,null);const X8=Y8.exports,V8=B.extend({name:"EChatSuggestionCard",components:{EIcon:Fe},props:{text:{type:String,required:!0},icon:{type:String,default:null},color:{type:String,default:"e-text-gray-500"},dark:{type:Boolean,default:!1},width:{type:Number,default:null},display:{type:String,default:"row"}},computed:{classes(){return{"e-flex-row":this.display==="row","e-flex-col":this.display==="column","hover:e-bg-gray-100 e-border-gray-200":!this.dark,"e-bg-gray-800 e-border-gray-600 hover:e-bg-gray-900":this.dark}},styles(){return this.width?{width:`${this.width}px`}:{}}}});var Q8=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",e._g(e._b({staticClass:"e-chat-suggestion e-p-3 e-flex e-justify-start e-items-start e-gap-2 e-border-solid e-border-[1.67px] e-rounded-md e-cursor-pointer e-w-full",class:e.classes,style:e.styles},"div",e.$attrs,!1),e.$listeners),[r("div",{staticClass:"e-chat-suggestion__icon e-h-6 e-w-6"},[e.icon?r("EIcon",{attrs:{icon:e.icon,size:"Lg",color:e.color}}):e._t("svg-icon")],2),r("div",{staticClass:"e-chat-suggestion__text e-font-medium e-antialiased e-text-wrap",class:{"e-text-gray-200":e.dark,"e-text-gray-600":!e.dark}},[e._v(" "+e._s(e.text)+" ")])])},K8=[],J8=H(V8,Q8,K8,!1,null,null,null,null);const e7=J8.exports,t7=B.extend({components:{EFadeTransition:jt,EChatWrapper:zu,EChatHeader:ju,EChatBody:Zu,EChatMessage:L8,EChatFooter:B8,EChatInput:X8,EChatSuggestionCard:e7},props:{dark:{type:Boolean,default:!1},messages:{type:Array,default:()=>[]},user:{type:String,default:"You"},embedded:{type:Boolean,default:!1},showHeader:{type:Boolean,default:!0},inlineFooter:{type:Boolean,default:!1},height:{type:String,default:void 0},width:{type:String,default:void 0},showUserAvatar:{type:Boolean,default:!0},showCopilotAvatar:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},headerText:{type:String,default:"Evercam Copilot"},inputPlaceholder:{type:String,default:"Message Copilot"},loadingMessage:{type:String,default:""},suggestions:{type:Array,default:()=>[]},exposedRegexes:{type:Array,default:()=>[]},eMarkdownProps:{type:Object,default:()=>({useTableProcessor:!1})},silenceTimeout:{type:Number,default:1500}},data(){return{prompt:"",containerHeight:0,headerHeight:0,bodyHeight:0,footerHeight:0}},computed:{ChatMessageRole(){return Ye},userInitials(){var t,e,r;return((r=(e=(t=this.user.trim())==null?void 0:t.split(/\s+/))==null?void 0:e.map(n=>{var s;return((s=n==null?void 0:n.charAt(0))==null?void 0:s.toUpperCase())||""}))==null?void 0:r.join(""))||this.user[0]||""},chatBodyStyle(){return this.bodyHeight?{maxHeight:`${this.bodyHeight}px`,height:`${this.bodyHeight}px`}:{}},wrapperStyle(){return{height:this.height||"100%",width:this.width||"100%"}},bodyBorderClasses(){let t={};this.showHeader&&(t={"e-border-t-[1px] e-border-t-solid":!0,"e-border-t-gray-300":!this.dark,"e-border-t-gray-600":this.dark});let e={};return this.inlineFooter||(e={"e-border-b-[1px] e-border-b-solid":!0,"e-border-b-gray-300":!this.dark,"e-border-b-gray-600":this.dark}),{...t,...e}},markdownScopedSlots(){return Object.keys(this.$scopedSlots).filter(t=>t.startsWith("markdown.")).reduce((t,e)=>(t[e]=this.$scopedSlots[e],t),{})},showSuggestions(){return this.messages.length===0&&this.suggestions.length>0}},watch:{height(){this.updateChatBodyHeight()},showHeader(){this.updateChatBodyHeight()}},mounted(){this.updateChatBodyHeight()},methods:{sendMessage(){!this.isDisabled&&this.prompt.length>0&&(this.$emit("user-message",this.prompt),this.prompt="")},isUserMessage(t){return t.role===Ye.User},hasActions(t){return this.isLoading||this.isDisabled?!1:t.role===Ye.Copilot&&t.withActions!==!1},getMessageContent(t){return t.content},getMessageInitials(t){return this.isUserMessage(t)?this.userInitials:null},getMessageClasses(t,e){return{"e-mb-11":e===this.messages.length-1&&this.hasActions(t)}},updateChatBodyHeight(){this.$nextTick(()=>{var n,s,i;const t=(n=this.$refs.chatContainer)==null?void 0:n.$el,e=(s=this.$refs.chatHeader)==null?void 0:s.$el,r=(i=this.$refs.chatFooter)==null?void 0:i.$el;!t||!e||!r||(this.headerHeight=e.clientHeight,this.footerHeight=r.clientHeight,this.containerHeight=t.clientHeight,this.height?this.bodyHeight=parseInt(this.height)-this.headerHeight-this.footerHeight:this.bodyHeight=Math.max(500,this.containerHeight-this.headerHeight-this.footerHeight))})},isAvatarVisible(t){return t.role===Ye.User?this.showUserAvatar:t.role===Ye.Copilot?this.showCopilotAvatar:!0},onMessageFeedback(t,e){this.$emit("message-feedback",{...t,messageId:e})}}}),w9="";var r7=function(){var e=this,r=e._self._c;return r("EChatWrapper",{ref:"chatContainer",staticClass:"e-chat-wrapper",style:e.wrapperStyle,attrs:{dark:e.dark,embedded:e.embedded}},[r("div",{staticClass:"e-w-full e-h-full e-chat-container"},[r("EChatHeader",{ref:"chatHeader",attrs:{hidden:!e.showHeader,dark:e.dark,title:e.headerText},scopedSlots:e._u([{key:"chip",fn:function(){return[e._t("chip")]},proxy:!0},{key:"append",fn:function(){return[e._t("header-append")]},proxy:!0}],null,!0)}),r("EChatBody",{ref:"chatBody",class:e.bodyBorderClasses,style:e.chatBodyStyle,attrs:{dark:e.dark}},[r("EFadeTransition",[e.showSuggestions?r("div",{staticClass:"e-w-full e-flex e-flex-col e-items-center e-justify-center e-mt-8"},[r("div",{staticClass:"e-flex e-flex-col e-justify-center e-items-center e-gap-4"},e._l(e.suggestions,function(n){return r("EChatSuggestionCard",{key:n.text,attrs:{text:n.text,icon:n.icon,color:n.color,dark:e.dark,width:n.width,display:n.display||"row"},on:{click:function(s){return e.$emit("suggestion-clicked",n)}}})}),1)]):e._e()]),e.showSuggestions?e._e():r("div",e._l(e.messages,function(n,s){return r("EChatMessage",{key:`${n.id}-${s}`,class:e.getMessageClasses(n,s),attrs:{dark:e.dark,role:n.role,"is-loading":n.isLoading,"data-message-id":n.id,"show-feedback-buttons":!e.readonly,"show-regenerate-button":!e.readonly,"exposed-regexes":e.exposedRegexes,"show-copy-button":"","e-markdown-props":e.eMarkdownProps,message:e.getMessageContent(n),type:n.type,initials:e.getMessageInitials(n),"show-avatar":e.isAvatarVisible(n),"with-actions":e.hasActions(n)&&s>0},on:{feedback:function(i){return e.onMessageFeedback(i,n.id)},"message-regenerate":function(i){return e.$emit("message-regenerate",n.id)},"animation-end":function(i){return e.$emit("animation-end",i)}},scopedSlots:e._u([e._l(e.markdownScopedSlots,function(i,a){return{key:a,fn:function(c){return[e._t(a,null,null,c)]}}}),{key:"message.content",fn:function(){return[e._t("message.content",null,{message:n})]},proxy:!0},{key:"message.append",fn:function(){return[e._t("message.append",null,{message:n})]},proxy:!0},{key:"extraContent",fn:function(){return[e._t("message.extraContent",null,{message:n})]},proxy:!0}],null,!0)})}),1),e.isLoading?r("EChatMessage",{attrs:{"is-loading":"","loading-message":e.loadingMessage,"data-message-id":-1,"show-avatar":e.showCopilotAvatar,role:e.ChatMessageRole.Copilot,dark:e.dark}}):e._e()],1),e._t("body-append",null,{messages:e.messages}),r("EChatFooter",{directives:[{name:"show",rawName:"v-show",value:!e.readonly,expression:"!readonly"}],ref:"chatFooter",attrs:{dark:e.dark,inline:e.inlineFooter}},[r("EChatInput",{attrs:{dark:e.dark,disabled:e.isDisabled,placeholder:e.inputPlaceholder,"silence-timeout":e.silenceTimeout},on:{"prompt-changed":function(n){return e.$emit("prompt-changed",n)},submit:e.sendMessage},scopedSlots:e._u([{key:"input-action-button",fn:function(){return[e._t("input-action-button")]},proxy:!0}],null,!0),model:{value:e.prompt,callback:function(n){e.prompt=n},expression:"prompt"}})],1)],2)])},n7=[],s7=H(t7,r7,n7,!1,null,"966d186a",null,null);const i7=s7.exports,a7=B.extend({name:"ERadioGroup",components:{EIcon:Fe},mixins:[wt],props:{dark:{type:Boolean,default:!1},withDescription:{type:Boolean,default:!0},withIcon:{type:Boolean,default:!1},itemsWrapperClasses:{type:[String,Object,Array],default:""}},computed:{radioItemClasses(){return{"e-bg-gray-800 e-text-gray-200 e-border-gray-700":this.dark,"e-text-gray-500 e-bg-white e-border-gray-300":!this.dark}},selectedItemClasses(){return"e-text-[#00315f] e-bg-[#629efc] e-border-transparent"}},methods:{showDescription(t){return this.withDescription&&(t==null?void 0:t.description)&&t.description.length>0||this.isSelected(t.value)},containerClasses(t){return[this.isSelected(t.value)?this.selectedItemClasses:this.radioItemClasses,t.disabled||this.disabled?"e-opacity-50 e-cursor-not-allowed":"e-cursor-pointer e-select-none"]}}});var o7=function(){var e=this,r=e._self._c;return e._self._setupProxy,r("div",{staticClass:"e-radio-group__wrapper e-mx-auto e-w-full"},[r("div",[r("div",{staticClass:"e-radio-group__items e-space-y-2",class:e.itemsWrapperClasses},e._l(e.options,function(n,s){return r("div",{key:s,staticClass:"e-radio-group__container e-relative e-flex e-border-solid e-border-[1.67px] e-rounded-lg e-px-4 e-py-2.5 e-shadow-md focus:e-outline-none e-max-h-[66px]",class:e.containerClasses(n),attrs:{"data-test-id":`radio-option-${n.value}`},on:{click:function(i){return e.onItemClick(n.value)}}},[r("div",{staticClass:"e-radio-group__option-wrapper e-flex e-w-full e-items-center e-justify-between"},[r("div",{staticClass:"e-radio-group__option-wrapper e-flex e-items-center"},[e.withIcon&&n.icon?r("div",{staticClass:"e-mr-4"},[e._t("icon",function(){return[r("EIcon",{class:e.isSelected(n.value)?e.selectedItemClasses:e.radioItemClasses,attrs:{icon:n.icon,size:"base"}})]},{option:n,attrs:e.isSelected(n.value)?e.selectedItemClasses:e.radioItemClasses,isSelected:e.isSelected(n.value)})],2):e._e(),r("div",{staticClass:"e-radio-group__option e-flex e-items-center e-gap-2"},[e._t("prefix",null,{option:n}),r("div",{staticClass:"e-text-sm"},[e._t("label",function(){return[r("h2",{staticClass:"e-radio-group__option-title e-font-semibold e-text-sm e-mb-1 e-mt-1"},[e._v(" "+e._s(n.label)+" ")])]},{option:n}),e._t("description",function(){return[e.showDescription(n)?r("span",{staticClass:"e-radio-group__option-description e-mt-2 e-text-[0.75rem]"},[e._v(" "+e._s(n.description)+" ")]):e._e()]},{option:n})],2)],2)]),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isSelected(n.value),expression:"isSelected(option.value)"}],staticClass:"e-shrink-0 e-text-white",attrs:{"data-test-id":"radio-option-checkmark"}},[e._t("highlight-icon",function(){return[r("svg",{staticClass:"e-h-6 e-w-6",attrs:{viewBox:"0 0 24 24",fill:"none"}},[r("circle",{attrs:{cx:"12",cy:"12",r:"12",fill:"#fff","fill-opacity":"0.2"}}),r("path",{attrs:{d:"M7 13l3 3 7-7",stroke:"#fff","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}})])]},{option:n})],2)])])}),0)])])},l7=[],c7=H(a7,o7,l7,!1,null,null,null,null);const yi=c7.exports,u7=B.extend({name:"ETabs",mixins:[Rt],props:{dark:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},activeClass:{type:String,default:null}},methods:{onTabSelected(t){this.currentValue=t,this.$emit("tab-selected",t)},isActive(t){return this.currentValue===t},isLink(t){return!!t&&!this.isExternalLink(t)},isExternalLink(t){return!!t&&t.startsWith("http")},getTabBarItemClasses(t,e=""){return["e-tabs__item e-inline-block e-p-4 e-cursor-pointer e-text-xs",{[this.activeClass]:this.isActive(t)&&!!this.activeClass,"!e-text-gray-200 e-border-gray-700":this.dark&&!this.isActive(t),"hover:!e-text-gray-600 !e-text-gray-800":this.isExternalLink(e)||this.isLink(e),"!e-text-blue-600":this.isExternalLink(e)||this.isLink(e)," hover:e-bg-gray-100 ":!this.isActive(t)&&!this.dark,"!e-text-blue-600 e-bg-blue-100":this.isActive(t)&&!this.dark,"e-tabs__item-active":this.isActive(t)&&this.dark,"e-border-l-3 e-border-l-solid !e-border-b-blue-600":this.vertical&&this.isActive(t),"e-border-b-2 e-border-b-solid !e-border-b-blue-600":!this.vertical&&this.isActive(t)}]},getChildTitle(t){var r,n,s;const e=(r=t.componentOptions)==null?void 0:r.propsData;return e!=null&&e.title?e.title:e!=null&&e.name?e.name:(s=(n=t.data)==null?void 0:n.attrs)!=null&&s.name?t.data.attrs.name:`Tab ${this.currentValue+1}`},renderTab(t,e,r){var i,a,c,o,l,d,h,m;const n=((a=(i=e.data)==null?void 0:i.attrs)==null?void 0:a.href)||((o=(c=e.data)==null?void 0:c.attrs)==null?void 0:o.to),s=this.getTabBarItemClasses(r,n);if(n)try{return this.isExternalLink(n)?t("a",{key:r,class:s,attrs:{href:n,target:"_blank",rel:"noopener noreferrer",...(l=e.data)==null?void 0:l.attrs}},[this.getChildTitle(e)]):t("router-link",{key:r,class:s,attrs:{to:n,...(d=e.data)==null?void 0:d.attrs}},[this.getChildTitle(e)])}catch{return t("a",{key:r,class:s,attrs:{href:n,...(h=e.data)==null?void 0:h.attrs}},[this.getChildTitle(e)])}return t("div",{key:r,class:s,attrs:(m=e.data)==null?void 0:m.attrs,on:{click:()=>this.onTabSelected(r)}},[this.getChildTitle(e)])},renderContent(t,e,r){var n,s,i,a;return(s=(n=e.data)==null?void 0:n.attrs)!=null&&s.href||(a=(i=e.data)==null?void 0:i.attrs)!=null&&a.to||!this.isActive(r)?null:t("div",{class:"tab-content e-overflow-auto e-max-h-screen e-w-full"},[e])}},render(t){var r;const e=((r=this.$slots.default)==null?void 0:r.filter(n=>n.tag))||[];return t("div",{class:["e-tabs e-w-full e-h-full",{"e-flex-col":!this.vertical,"e-flex":this.vertical}]},[t("div",{class:["e-tabs__header e-text-sm e-font-medium e-text-center",{"e-flex e-border-b e-border-b-solid e-w-full":!this.vertical,"e-flex e-flex-col e-border-r e-border-r-solid":this.vertical,"e-text-gray-700":!this.activeClass,"e-tabs__header-light-border":!this.dark&&!this.activeClass,"e-tabs__header-dark-border":this.dark&&!this.activeClass,"e-bg-white":!this.dark,"e-bg-gray-800":this.dark}]},e.map((n,s)=>this.renderTab(t,n,s))),t("div",{class:"tab-content e-w-full"},e.map((n,s)=>this.renderContent(t,n,s)).filter(Boolean))])}}),S9="";var d7=H(u7,null,null,!1,null,null,null,null);const Ci=d7.exports,h7=B.extend({name:"ECard",props:{title:{type:[String,void 0],default:void 0},width:{type:[Number,String,void 0],default:void 0},height:{type:[Number,String,void 0],default:void 0},imageSize:{type:[Number,String,void 0],default:100},imagePadding:{type:Number,default:0},image:{type:[String,void 0],default:void 0},blurBackground:{type:Boolean,default:!1},imageTranslation:{type:[Number,void 0],default:void 0},dark:{type:Boolean,default:!1}},data(){return{bodyPadding:45}},computed:{surfaceClasses(){return{"e-border-solid e-border-[1px]":!0,"e-border-gray-200":!this.dark,"e-border-gray-600":this.dark}},backgroundClasses(){return{"e-bg-gray-800":this.dark,"e-bg-white":!this.dark}},textClasses(){return{"e-text-gray-200":this.dark,"e-text-gray-600":!this.dark}},containerClasses(){return{...this.surfaceClasses,...this.backgroundClasses,...this.textClasses}},imageContainerClasses(){return{...this.surfaceClasses,...this.textClasses,"e-bg-gray-100":!0}},containerStyle(){let t={};return this.width&&(t={...t,width:isNaN(this.width)?this.width:`${this.width}px`}),this.height&&(t={...t,height:isNaN(this.height)?this.height:`${this.height}px`}),t},effectiveImageSize(){return(isNaN(this.imageSize)?parseInt(this.imageSize):this.imageSize)-2*this.imagePadding},imageStyle(){return{height:"auto",width:`${this.effectiveImageSize}px`,margin:`${this.imagePadding}px`}},imageContainerStyle(){const t=isNaN(this.imageSize)?this.imageSize:`${this.imageSize}px`;return{height:t,width:t,top:`${-this.computedImageTranslation}px`,left:`${-this.computedImageTranslation}px`}},computedImageTranslation(){return isNaN(this.imageTranslation)?-20:this.imageTranslation},titleStyle(){return this.image?{paddingLeft:`${this.imageSize-this.computedImageTranslation}px`}:{}},contentStyle(){return this.image?{paddingTop:`${Math.max(0,this.imageSize-this.bodyPadding-this.computedImageTranslation)}px`}:{}}},mounted(){this.blurBackground&&!/\.(gif|png|svg)$/.test(this.image)&&console.error("ECard: Image should be a gif, png or svg to blur the background")}}),$9="";var p7=function(){var e=this,r=e._self._c;return r("div",e._g(e._b({staticClass:"e-card e-rounded-lg e-p-3 e-relative",class:e.containerClasses,style:e.containerStyle},"div",e.$attrs,!1),e.$listeners),[e.image?r("div",{staticClass:"e-card__img__container e-absolute e-overflow-hidden e-rounded-lg e-flex e-justify-center e-items-center e-z-0",class:e.imageContainerClasses,style:e.imageContainerStyle},[e.blurBackground?r("img",{staticClass:"e-card__image--bg e-absolute",style:e.imageStyle,attrs:{src:e.image,alt:"card image"}}):e._e(),r("img",{staticClass:"e-card__image e-absolute",style:e.imageStyle,attrs:{src:e.image,alt:"card image"}})]):e._e(),r("div",{staticClass:"e-card__body e-relative e-z-1"},[e.title?r("div",{staticClass:"e-card__title e-font-bold e-text-lg e-mb-2",style:e.titleStyle},[e._t("title",function(){return[e._v(" "+e._s(e.title)+" ")]})],2):e._e(),r("div",{staticClass:"e-card__content",style:e.contentStyle},[e._t("default")],2)])])},f7=[],m7=H(h7,p7,f7,!1,null,null,null,null);const g7=m7.exports,_n={EAvatar:Mt,EBadge:Jt,EIcon:Fe,ESpinner:Wr,ERow:Gr,ECol:Ur,EVideoPlayer:Ns,ETimeline:Xs,EVideoEmbed:Vs,EHeatmapBar:dn,EHoursHeatmap:Qs,EReadMore:Ks,ETruncatedDiv:Js,ECompareSeparator:ei,EDragResize:hn,EImagesComparator:ti,EToggleSwitch:li,EExpandableMenu:ri,EZoomable:Jr,EGlobalSearch:fi,ESvgIcon:ai,ECalendarHeatmap:oi,EImagePlayer:mi,EZoomableImg:mn,EZoomSlider:fn,EActionButton:pt,ETooltip:St,ELayout:gi,EChat:i7,EContextProvider:Eu,ECopyToClipboardBtn:gn,EPopover:Nt,EVoiceRecorderToText:vn,ERadioGroup:yi,ESelect:pn,ETabs:Ci,ECard:g7,ESchedulePicker:ci,ESchedule:hi,EStepper:pi},v7={install(t){Object.keys(_n).forEach(e=>{t.component(e,_n[e])}),Object.keys(di).forEach(e=>{t.mixin(e,di[e])}),qs.forEach(({name:e,definition:r})=>{t.directive(e,r)})}};j.AvatarSizes=Y1,j.BadgeColors=V1,j.BadgeSizes=Z1,j.BaseColor=ie,j.ChatMessageRole=Ye,j.ChatMessageType=Qt,j.ClickOutsideDirective=rn,j.Colors=Ds,j.CompareMode=nt,j.Days=Ln,j.DirectivesMap=qs,j.EActionButton=pt,j.EAvatar=Mt,j.EBadge=Jt,j.ECalendarHeatmap=oi,j.ECol=Ur,j.ECompareSeparator=ei,j.ECopyToClipboardBtn=gn,j.EDragResize=hn,j.EExpandableMenu=ri,j.EGlobalSearch=fi,j.EHeatmapBar=dn,j.EHoursHeatmap=Qs,j.EIcon=Fe,j.EImagePlayer=mi,j.EImagesComparator=ti,j.ELayout=gi,j.EPopover=Nt,j.ERadioGroup=yi,j.EReadMore=Ks,j.ERow=Gr,j.ESchedule=hi,j.ESchedulePicker=ci,j.ESelect=pn,j.ESpinner=Wr,j.EStepper=pi,j.ESvgIcon=ai,j.ETabs=Ci,j.ETimeline=Xs,j.EToggleSwitch=li,j.ETooltip=St,j.ETruncatedDiv=Js,j.EVENTS=J1,j.EVideoEmbed=Vs,j.EVideoPlayer=Ns,j.EVoiceRecorderToText=vn,j.EZoomSlider=fn,j.EZoomable=Jr,j.EZoomableImg=mn,j.FeedbackType=Kt,j.IconSizes=Ps,j.ImageQuality=Dn,j.Position=ze,j.ResizeObserverDirective=Ve,j.ScheduleType=vt,j.Size=K,j.TextSizes=Ls,j.TimelineAxis=rt,j.TimelineChartType=Ne,j.TimelineIntervalChangeTrigger=_t,j.ToggleSwitchSizes=X1,j.TooltipColors=Q1,j.TooltipPositions=K1,j.components=_n,j.debounce=g0,j.default=v7,j.eventListeners=We,j.exitFullScreen=Xr,j.formField=Rt,j.fullConfig=qr,j.generateUniqueId=C0,j.getGradientColors=Vr,j.getImageData=_0,j.getRandomChars=v0,j.hashCode=Is,j.hexToRgba=zs,j.hoursMinutesStrToMinutes=Rs,j.inactivityListener=ui,j.isFullScreen=Zr,j.isRgba=Bs,j.isValidDate=y0,j.makeFullScreen=Yr,j.minutesToHoursMinutesStr=Qr,j.rgbToRgba=Os,j.schedules=Fs,j.selectFormField=wt,j.subtractOneHourFromEndIntervals=b0,j.timeouts=Ue,j.toNumericSchedule=Kr,j.toRgba=ht,j.toggleOpen=Ht,j.twentyFourHours=As,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
244
244
|
//# sourceMappingURL=index.umd.js.map
|