@ddict/bubble 1.2.10 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- (function(K,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],o):(K=typeof globalThis<"u"?globalThis:K||self,o(K.Bubble={},K.Vue))})(this,function(K,o){"use strict";const Y2="data:image/svg+xml,%3csvg%20width='14'%20height='9'%20viewBox='0%200%2014%209'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.36153%201.34067C6.15774%200.203232%207.84226%200.203229%208.63846%201.34066L14%209H0L5.36153%201.34067Z'%20fill='white'%20stroke-width='0.5'/%3e%3c/svg%3e",M=Math.min,k=Math.max,a2=Math.round,r2=Math.floor,G=e=>({x:e,y:e}),K2={left:"right",right:"left",bottom:"top",top:"bottom"},W2={start:"end",end:"start"};function g2(e,t,n){return k(e,M(t,n))}function z(e,t){return typeof e=="function"?e(t):e}function V(e){return e.split("-")[0]}function P(e){return e.split("-")[1]}function y2(e){return e==="x"?"y":"x"}function C2(e){return e==="y"?"height":"width"}function W(e){return["top","bottom"].includes(V(e))?"y":"x"}function u2(e){return y2(W(e))}function Z2(e,t,n){n===void 0&&(n=!1);const i=P(e),l=u2(e),s=C2(l);let a=l==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=c2(a)),[a,c2(a)]}function q2(e){const t=c2(e);return[m2(e),t,m2(t)]}function m2(e){return e.replace(/start|end/g,t=>W2[t])}function j2(e,t,n){const i=["left","right"],l=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?l:i:t?i:l;case"left":case"right":return t?s:a;default:return[]}}function z2(e,t,n,i){const l=P(e);let s=j2(V(e),n==="start",i);return l&&(s=s.map(a=>a+"-"+l),t&&(s=s.concat(s.map(m2)))),s}function c2(e){return e.replace(/left|right|bottom|top/g,t=>K2[t])}function P2(e){return{top:0,right:0,bottom:0,left:0,...e}}function I2(e){return typeof e!="number"?P2(e):{top:e,right:e,bottom:e,left:e}}function d2(e){const{x:t,y:n,width:i,height:l}=e;return{width:i,height:l,top:n,left:t,right:t+i,bottom:n+l,x:t,y:n}}function k2(e,t,n){let{reference:i,floating:l}=e;const s=W(t),a=u2(t),c=C2(a),r=V(t),d=s==="y",f=i.x+i.width/2-l.width/2,g=i.y+i.height/2-l.height/2,m=i[c]/2-l[c]/2;let A;switch(r){case"top":A={x:f,y:i.y-l.height};break;case"bottom":A={x:f,y:i.y+i.height};break;case"right":A={x:i.x+i.width,y:g};break;case"left":A={x:i.x-l.width,y:g};break;default:A={x:i.x,y:i.y}}switch(P(t)){case"start":A[a]-=m*(n&&d?-1:1);break;case"end":A[a]+=m*(n&&d?-1:1);break}return A}const $2=async(e,t,n)=>{const{placement:i="bottom",strategy:l="absolute",middleware:s=[],platform:a}=n,c=s.filter(Boolean),r=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:l}),{x:f,y:g}=k2(d,i,r),m=i,A={},C=0;for(let p=0;p<c.length;p++){const{name:w,fn:B}=c[p],{x,y:b,data:h,reset:u}=await B({x:f,y:g,initialPlacement:i,placement:m,strategy:l,middlewareData:A,rects:d,platform:a,elements:{reference:e,floating:t}});f=x??f,g=b??g,A={...A,[w]:{...A[w],...h}},u&&C<=50&&(C++,typeof u=="object"&&(u.placement&&(m=u.placement),u.rects&&(d=u.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:l}):u.rects),{x:f,y:g}=k2(d,m,r)),p=-1)}return{x:f,y:g,placement:m,strategy:l,middlewareData:A}};async function h2(e,t){var n;t===void 0&&(t={});const{x:i,y:l,platform:s,rects:a,elements:c,strategy:r}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:g="floating",altBoundary:m=!1,padding:A=0}=z(t,e),C=I2(A),w=c[m?g==="floating"?"reference":"floating":g],B=d2(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:d,rootBoundary:f,strategy:r})),x=g==="floating"?{x:i,y:l,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),h=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},u=d2(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:r}):x);return{top:(B.top-u.top+C.top)/h.y,bottom:(u.bottom-B.bottom+C.bottom)/h.y,left:(B.left-u.left+C.left)/h.x,right:(u.right-B.right+C.right)/h.x}}const X2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:l,rects:s,platform:a,elements:c,middlewareData:r}=t,{element:d,padding:f=0}=z(e,t)||{};if(d==null)return{};const g=I2(f),m={x:n,y:i},A=u2(l),C=C2(A),p=await a.getDimensions(d),w=A==="y",B=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",h=s.reference[C]+s.reference[A]-m[A]-s.floating[C],u=m[A]-s.reference[A],y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let E=y?y[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement(y)))&&(E=c.floating[b]||s.floating[C]);const Q=h/2-u/2,F=E/2-p[C]/2-1,v=M(g[B],F),U=M(g[x],F),j=v,s2=E-p[C]-U,I=E/2-p[C]/2+Q,t2=g2(j,I,s2),O=!r.arrow&&P(l)!=null&&I!==t2&&s.reference[C]/2-(I<j?v:U)-p[C]/2<0,T=O?I<j?I-j:I-s2:0;return{[A]:m[A]+T,data:{[A]:t2,centerOffset:I-t2-T,...O&&{alignmentOffset:T}},reset:O}}}),_2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:l,middlewareData:s,rects:a,initialPlacement:c,platform:r,elements:d}=t,{mainAxis:f=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:p=!0,...w}=z(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const B=V(l),x=W(c),b=V(c)===c,h=await(r.isRTL==null?void 0:r.isRTL(d.floating)),u=m||(b||!p?[c2(c)]:q2(c)),y=C!=="none";!m&&y&&u.push(...z2(c,p,C,h));const E=[c,...u],Q=await h2(t,w),F=[];let v=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&F.push(Q[B]),g){const I=Z2(l,a,h);F.push(Q[I[0]],Q[I[1]])}if(v=[...v,{placement:l,overflows:F}],!F.every(I=>I<=0)){var U,j;const I=(((U=s.flip)==null?void 0:U.index)||0)+1,t2=E[I];if(t2)return{data:{index:I,overflows:v},reset:{placement:t2}};let O=(j=v.filter(T=>T.overflows[0]<=0).sort((T,N)=>T.overflows[1]-N.overflows[1])[0])==null?void 0:j.placement;if(!O)switch(A){case"bestFit":{var s2;const T=(s2=v.filter(N=>{if(y){const Y=W(N.placement);return Y===x||Y==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(Y=>Y>0).reduce((Y,lt)=>Y+lt,0)]).sort((N,Y)=>N[1]-Y[1])[0])==null?void 0:s2[0];T&&(O=T);break}case"initialPlacement":O=c;break}if(l!==O)return{reset:{placement:O}}}return{}}}};async function e0(e,t){const{placement:n,platform:i,elements:l}=e,s=await(i.isRTL==null?void 0:i.isRTL(l.floating)),a=V(n),c=P(n),r=W(n)==="y",d=["left","top"].includes(a)?-1:1,f=s&&r?-1:1,g=z(t,e);let{mainAxis:m,crossAxis:A,alignmentAxis:C}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return c&&typeof C=="number"&&(A=c==="end"?C*-1:C),r?{x:A*f,y:m*d}:{x:m*d,y:A*f}}const t0=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:l,y:s,placement:a,middlewareData:c}=t,r=await e0(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:l+r.x,y:s+r.y,data:{...r,placement:a}}}}},n0=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:l}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:w=>{let{x:B,y:x}=w;return{x:B,y:x}}},...r}=z(e,t),d={x:n,y:i},f=await h2(t,r),g=W(V(l)),m=y2(g);let A=d[m],C=d[g];if(s){const w=m==="y"?"top":"left",B=m==="y"?"bottom":"right",x=A+f[w],b=A-f[B];A=g2(x,A,b)}if(a){const w=g==="y"?"top":"left",B=g==="y"?"bottom":"right",x=C+f[w],b=C-f[B];C=g2(x,C,b)}const p=c.fn({...t,[m]:A,[g]:C});return{...p,data:{x:p.x-n,y:p.y-i}}}}},o0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:l,elements:s}=t,{apply:a=()=>{},...c}=z(e,t),r=await h2(t,c),d=V(n),f=P(n),g=W(n)==="y",{width:m,height:A}=i.floating;let C,p;d==="top"||d==="bottom"?(C=d,p=f===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(p=d,C=f==="end"?"top":"bottom");const w=A-r.top-r.bottom,B=m-r.left-r.right,x=M(A-r[C],w),b=M(m-r[p],B),h=!t.middlewareData.shift;let u=x,y=b;if(g?y=f||h?M(b,B):B:u=f||h?M(x,w):w,h&&!f){const Q=k(r.left,0),F=k(r.right,0),v=k(r.top,0),U=k(r.bottom,0);g?y=m-2*(Q!==0||F!==0?Q+F:k(r.left,r.right)):u=A-2*(v!==0||U!==0?v+U:k(r.top,r.bottom))}await a({...t,availableWidth:y,availableHeight:u});const E=await l.getDimensions(s.floating);return m!==E.width||A!==E.height?{reset:{rects:!0}}:{}}}};function Z(e){return p2(e)?(e.nodeName||"").toLowerCase():"#document"}function L(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function H(e){var t;return(t=(p2(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function p2(e){return e instanceof Node||e instanceof L(e).Node}function D(e){return e instanceof Element||e instanceof L(e).Element}function R(e){return e instanceof HTMLElement||e instanceof L(e).HTMLElement}function L2(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof L(e).ShadowRoot}function n2(e){const{overflow:t,overflowX:n,overflowY:i,display:l}=S(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(l)}function i0(e){return["table","td","th"].includes(Z(e))}function f2(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function w2(e){const t=B2(),n=S(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function l0(e){let t=J(e);for(;R(t)&&!$(t);){if(f2(t))return null;if(w2(t))return t;t=J(t)}return null}function B2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $(e){return["html","body","#document"].includes(Z(e))}function S(e){return L(e).getComputedStyle(e)}function A2(e){return D(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function J(e){if(Z(e)==="html")return e;const t=e.assignedSlot||e.parentNode||L2(e)&&e.host||H(e);return L2(t)?t.host:t}function F2(e){const t=J(e);return $(t)?e.ownerDocument?e.ownerDocument.body:e.body:R(t)&&n2(t)?t:F2(t)}function o2(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=F2(e),s=l===((i=e.ownerDocument)==null?void 0:i.body),a=L(l);return s?t.concat(a,a.visualViewport||[],n2(l)?l:[],a.frameElement&&n?o2(a.frameElement):[]):t.concat(l,o2(l,[],n))}function S2(e){const t=S(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const l=R(e),s=l?e.offsetWidth:n,a=l?e.offsetHeight:i,c=a2(n)!==s||a2(i)!==a;return c&&(n=s,i=a),{width:n,height:i,$:c}}function x2(e){return D(e)?e:e.contextElement}function X(e){const t=x2(e);if(!R(t))return G(1);const n=t.getBoundingClientRect(),{width:i,height:l,$:s}=S2(t);let a=(s?a2(n.width):n.width)/i,c=(s?a2(n.height):n.height)/l;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const s0=G(0);function Q2(e){const t=L(e);return!B2()||!t.visualViewport?s0:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function a0(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==L(e)?!1:t}function q(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),s=x2(e);let a=G(1);t&&(i?D(i)&&(a=X(i)):a=X(e));const c=a0(s,n,i)?Q2(s):G(0);let r=(l.left+c.x)/a.x,d=(l.top+c.y)/a.y,f=l.width/a.x,g=l.height/a.y;if(s){const m=L(s),A=i&&D(i)?L(i):i;let C=m,p=C.frameElement;for(;p&&i&&A!==C;){const w=X(p),B=p.getBoundingClientRect(),x=S(p),b=B.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,h=B.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;r*=w.x,d*=w.y,f*=w.x,g*=w.y,r+=b,d+=h,C=L(p),p=C.frameElement}}return d2({width:f,height:g,x:r,y:d})}function r0(e){let{elements:t,rect:n,offsetParent:i,strategy:l}=e;const s=l==="fixed",a=H(i),c=t?f2(t.floating):!1;if(i===a||c&&s)return n;let r={scrollLeft:0,scrollTop:0},d=G(1);const f=G(0),g=R(i);if((g||!g&&!s)&&((Z(i)!=="body"||n2(a))&&(r=A2(i)),R(i))){const m=q(i);d=X(i),f.x=m.x+i.clientLeft,f.y=m.y+i.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-r.scrollLeft*d.x+f.x,y:n.y*d.y-r.scrollTop*d.y+f.y}}function c0(e){return Array.from(e.getClientRects())}function v2(e){return q(H(e)).left+A2(e).scrollLeft}function d0(e){const t=H(e),n=A2(e),i=e.ownerDocument.body,l=k(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=k(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+v2(e);const c=-n.scrollTop;return S(i).direction==="rtl"&&(a+=k(t.clientWidth,i.clientWidth)-l),{width:l,height:s,x:a,y:c}}function f0(e,t){const n=L(e),i=H(e),l=n.visualViewport;let s=i.clientWidth,a=i.clientHeight,c=0,r=0;if(l){s=l.width,a=l.height;const d=B2();(!d||d&&t==="fixed")&&(c=l.offsetLeft,r=l.offsetTop)}return{width:s,height:a,x:c,y:r}}function A0(e,t){const n=q(e,!0,t==="fixed"),i=n.top+e.clientTop,l=n.left+e.clientLeft,s=R(e)?X(e):G(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,r=l*s.x,d=i*s.y;return{width:a,height:c,x:r,y:d}}function M2(e,t,n){let i;if(t==="viewport")i=f0(e,n);else if(t==="document")i=d0(H(e));else if(D(t))i=A0(t,n);else{const l=Q2(e);i={...t,x:t.x-l.x,y:t.y-l.y}}return d2(i)}function D2(e,t){const n=J(e);return n===t||!D(n)||$(n)?!1:S(n).position==="fixed"||D2(n,t)}function g0(e,t){const n=t.get(e);if(n)return n;let i=o2(e,[],!1).filter(c=>D(c)&&Z(c)!=="body"),l=null;const s=S(e).position==="fixed";let a=s?J(e):e;for(;D(a)&&!$(a);){const c=S(a),r=w2(a);!r&&c.position==="fixed"&&(l=null),(s?!r&&!l:!r&&c.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||n2(a)&&!r&&D2(e,a))?i=i.filter(f=>f!==a):l=c,a=J(a)}return t.set(e,i),i}function C0(e){let{element:t,boundary:n,rootBoundary:i,strategy:l}=e;const a=[...n==="clippingAncestors"?f2(t)?[]:g0(t,this._c):[].concat(n),i],c=a[0],r=a.reduce((d,f)=>{const g=M2(t,f,l);return d.top=k(g.top,d.top),d.right=M(g.right,d.right),d.bottom=M(g.bottom,d.bottom),d.left=k(g.left,d.left),d},M2(t,c,l));return{width:r.right-r.left,height:r.bottom-r.top,x:r.left,y:r.top}}function u0(e){const{width:t,height:n}=S2(e);return{width:t,height:n}}function m0(e,t,n){const i=R(t),l=H(t),s=n==="fixed",a=q(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const r=G(0);if(i||!i&&!s)if((Z(t)!=="body"||n2(l))&&(c=A2(t)),i){const g=q(t,!0,s,t);r.x=g.x+t.clientLeft,r.y=g.y+t.clientTop}else l&&(r.x=v2(l));const d=a.left+c.scrollLeft-r.x,f=a.top+c.scrollTop-r.y;return{x:d,y:f,width:a.width,height:a.height}}function b2(e){return S(e).position==="static"}function R2(e,t){return!R(e)||S(e).position==="fixed"?null:t?t(e):e.offsetParent}function T2(e,t){const n=L(e);if(f2(e))return n;if(!R(e)){let l=J(e);for(;l&&!$(l);){if(D(l)&&!b2(l))return l;l=J(l)}return n}let i=R2(e,t);for(;i&&i0(i)&&b2(i);)i=R2(i,t);return i&&$(i)&&b2(i)&&!w2(i)?n:i||l0(e)||n}const h0=async function(e){const t=this.getOffsetParent||T2,n=this.getDimensions,i=await n(e.floating);return{reference:m0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function p0(e){return S(e).direction==="rtl"}const w0={convertOffsetParentRelativeRectToViewportRelativeRect:r0,getDocumentElement:H,getClippingRect:C0,getOffsetParent:T2,getElementRects:h0,getClientRects:c0,getDimensions:u0,getScale:X,isElement:D,isRTL:p0};function B0(e,t){let n=null,i;const l=H(e);function s(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function a(c,r){c===void 0&&(c=!1),r===void 0&&(r=1),s();const{left:d,top:f,width:g,height:m}=e.getBoundingClientRect();if(c||t(),!g||!m)return;const A=r2(f),C=r2(l.clientWidth-(d+g)),p=r2(l.clientHeight-(f+m)),w=r2(d),x={rootMargin:-A+"px "+-C+"px "+-p+"px "+-w+"px",threshold:k(0,M(1,r))||1};let b=!0;function h(u){const y=u[0].intersectionRatio;if(y!==r){if(!b)return a();y?a(!1,y):i=setTimeout(()=>{a(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(h,{...x,root:l.ownerDocument})}catch{n=new IntersectionObserver(h,x)}n.observe(e)}return a(!0),s}function x0(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:r=!1}=i,d=x2(e),f=l||s?[...d?o2(d):[],...o2(t)]:[];f.forEach(B=>{l&&B.addEventListener("scroll",n,{passive:!0}),s&&B.addEventListener("resize",n)});const g=d&&c?B0(d,n):null;let m=-1,A=null;a&&(A=new ResizeObserver(B=>{let[x]=B;x&&x.target===d&&A&&(A.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=A)==null||b.observe(t)})),n()}),d&&!r&&A.observe(d),A.observe(t));let C,p=r?q(e):null;r&&w();function w(){const B=q(e);p&&(B.x!==p.x||B.y!==p.y||B.width!==p.width||B.height!==p.height)&&n(),p=B,C=requestAnimationFrame(w)}return n(),()=>{var B;f.forEach(x=>{l&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),g==null||g(),(B=A)==null||B.disconnect(),A=null,r&&cancelAnimationFrame(C)}}const b0=t0,E0=n0,y0=_2,I0=o0,k0=X2,L0=(e,t,n)=>{const i=new Map,l={platform:w0,...n},s={...l.platform,_c:i};return $2(e,t,{...l,platform:s})};function F0(e){return e!=null&&typeof e=="object"&&"$el"in e}function E2(e){if(F0(e)){const t=e.$el;return p2(t)&&Z(t)==="#comment"?null:t}return e}function _(e){return typeof e=="function"?e():o.unref(e)}function S0(e){return{name:"arrow",options:e,fn(t){const n=E2(_(e.element));return n==null?{}:k0({element:n,padding:e.padding}).fn(t)}}}function H2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function O2(e,t){const n=H2(e);return Math.round(t*n)/n}function Q0(e,t,n){n===void 0&&(n={});const i=n.whileElementsMounted,l=o.computed(()=>{var E;return(E=_(n.open))!=null?E:!0}),s=o.computed(()=>_(n.middleware)),a=o.computed(()=>{var E;return(E=_(n.placement))!=null?E:"bottom"}),c=o.computed(()=>{var E;return(E=_(n.strategy))!=null?E:"absolute"}),r=o.computed(()=>{var E;return(E=_(n.transform))!=null?E:!0}),d=o.computed(()=>E2(e.value)),f=o.computed(()=>E2(t.value)),g=o.ref(0),m=o.ref(0),A=o.ref(c.value),C=o.ref(a.value),p=o.shallowRef({}),w=o.ref(!1),B=o.computed(()=>{const E={position:A.value,left:"0",top:"0"};if(!f.value)return E;const Q=O2(f.value,g.value),F=O2(f.value,m.value);return r.value?{...E,transform:"translate("+Q+"px, "+F+"px)",...H2(f.value)>=1.5&&{willChange:"transform"}}:{position:A.value,left:Q+"px",top:F+"px"}});let x;function b(){d.value==null||f.value==null||L0(d.value,f.value,{middleware:s.value,placement:a.value,strategy:c.value}).then(E=>{g.value=E.x,m.value=E.y,A.value=E.strategy,C.value=E.placement,p.value=E.middlewareData,w.value=!0})}function h(){typeof x=="function"&&(x(),x=void 0)}function u(){if(h(),i===void 0){b();return}if(d.value!=null&&f.value!=null){x=i(d.value,f.value,b);return}}function y(){l.value||(w.value=!1)}return o.watch([s,a,c],b,{flush:"sync"}),o.watch([d,f],u,{flush:"sync"}),o.watch(l,y,{flush:"sync"}),o.getCurrentScope()&&o.onScopeDispose(h),{x:o.shallowReadonly(g),y:o.shallowReadonly(m),strategy:o.shallowReadonly(A),placement:o.shallowReadonly(C),middlewareData:o.shallowReadonly(p),isPositioned:o.shallowReadonly(w),floatingStyles:B,update:b}}const v0="data:image/svg+xml,%3csvg%20width='1324'%20height='1326'%20viewBox='0%200%201324%201326'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='141'%20y='78'%20width='1042'%20height='1170'%20fill='white'/%3e%3cpath%20d='M184.533%201.99984C135.867%207.19984%2089.8666%2029.8665%2056.4%2065.1998C29.6%2093.4665%2012.5333%20126.266%203.73329%20166.4L0.666626%20180V663.333V1146.67L3.73329%201160.27C12.5333%201200.4%2029.6%201233.2%2056.4%201261.47C90.4%201297.33%20135.333%201319.33%20185.6%201324.67C203.333%201326.53%201122.53%201326.4%201139.73%201324.53C1188.53%201319.33%201229.07%201299.73%201264.13%201264.8C1294.27%201234.67%201311.47%201202.67%201320.8%201159.33C1323.2%201148.4%201323.33%201130%201323.33%20663.333C1323.33%20196.667%201323.2%20178.266%201320.8%20167.333C1311.47%20124%201294.27%2091.9998%201264.13%2061.8664C1229.07%2026.9331%201188.53%207.33314%201139.73%202.13314C1124.67%200.399809%20200%200.399842%20184.533%201.99984ZM732.933%20151.466C746.8%20152.933%20763.333%20157.6%20774%20163.067C800.267%20176.267%20822.4%20200.4%20833.2%20227.333C841.867%20249.333%20841.467%20233.467%20841.067%20502C840.533%20777.6%20841.733%20750.267%20829.2%20776.133C822.133%20790.933%20810.667%20806.533%20800.267%20815.2C795.2%20819.6%20793.2%20822.267%20792%20827.067C786.133%20848.267%20768.667%20885.867%20755.2%20906.133C724.533%20952%20681.2%20986.133%20624%201009.33C615.6%201012.8%20608.4%201015.87%20608.133%201016.13C607.867%201016.27%20614.533%201023.33%20622.933%201031.6C633.467%201042.13%20639.333%201049.07%20642.133%201054.4C646.933%201063.87%20645.467%201064%20672.667%201050.8C724.933%201025.47%20762.933%20994.8%20794.933%20952C811.467%20929.867%20829.867%20895.333%20839.333%20868.267C841.333%20862.667%20843.467%20858%20844.133%20858C844.667%20858%20845.6%20859.333%20846.133%20860.933C848.267%20868.133%20863.333%20900.8%20870.133%20913.2C898%20963.867%20931.6%201001.2%20975.333%201030.27C989.867%201040%201017.2%201054.4%201031.6%201059.73L1037.2%201061.87L1041.33%201054.67C1048.4%201042.4%201056.67%201032.27%201067.87%201022.4L1078.67%201012.8L1071.6%201010.27C1067.87%201008.8%201060.53%201006%201055.6%201004.13C1040.93%20998.533%201013.73%20984%201000%20974.267C985.733%20964.133%20960.8%20940.667%20948.933%20926.267C935.067%20909.333%20921.467%20887.467%20910%20864C900.133%20844%20887.2%20812.133%20884.667%20801.6L883.733%20798H971.867H1060V769.333V740.667H963.333H866.533L867.333%20736.267C868.4%20729.867%20870.4%20693.067%20871.467%20662.933C872.267%20639.067%20872.533%20636.4%20874.8%20635.2C878.667%20633.2%20881.333%20626.667%20882.267%20617.333L883.067%20608.667H872.133C864.133%20608.667%20861.067%20608.133%20860.533%20606.8C860%20605.467%20881.2%20466%20886.133%20438.267L886.933%20433.867L977.867%20434.4C1066.67%20434.8%201068.93%20434.8%201079.87%20437.733C1124.8%20449.6%201158.67%20482.533%201172.93%20528L1176.67%20540V808V1076L1172.93%201087.73C1158.53%201133.6%201126.13%201164.93%201078.93%201178.4L1068.67%201181.33L812.667%201181.73C638.8%201182%20552.667%201181.73%20544.4%201180.67C488.667%201174.4%20443.2%201132.13%20432.533%201076.93C431.067%201068.93%20430.667%201046.4%20430.667%20956.667V846.133L340.4%20845.6C252.8%20845.2%20249.6%20845.067%20239.067%20842.267C196.533%20831.067%20164.533%20800.133%20151.067%20757.333L147.333%20745.333V499.333V253.333L150.4%20242C159.067%20209.067%20180.4%20181.866%20210.667%20164.933C221.2%20159.066%20240.4%20152.933%20252.667%20151.6C268.533%20149.733%20716.933%20149.6%20732.933%20151.466Z'%20fill='%233B5695'/%3e%3cpath%20d='M256.533%20213.333C232.933%20218.533%20214.133%20237.067%20209.333%20259.733C208.4%20264.533%20208%20337.2%20208.267%20502L208.667%20737.333L211.733%20744.933C218.533%20761.733%20231.733%20774.533%20248.667%20780.933L256.667%20784L490%20784.4C749.2%20784.8%20734.4%20785.333%20750.133%20776C764.267%20767.6%20775.467%20752.4%20778.667%20737.067C779.6%20732.8%20780%20652.133%20779.733%20494L779.333%20257.333L775.067%20248.267C767.2%20231.6%20756.933%20222%20740.133%20215.467L731.333%20212L498%20211.733C306.8%20211.6%20263.2%20211.867%20256.533%20213.333ZM492%20281.2C546.267%20290.267%20590.267%20311.2%20622.533%20343.333C653.867%20374.667%20671.867%20409.867%20680.267%20456.667C684.133%20478.533%20684.133%20516.267%20680.133%20538.533C665.467%20621.067%20606.933%20684.4%20524%20707.467C490%20716.933%20488.4%20716.933%20392.4%20717.6L305.333%20718.133V498V277.867L391.733%20278.4C465.733%20278.8%20480%20279.2%20492%20281.2Z'%20fill='%233B5695'/%3e%3cpath%20d='M384%20462.933V576.133L345.067%20611.467C306.533%20646.267%20306.133%20646.667%20310.667%20647.067C313.2%20647.333%20348.933%20647.333%20390%20646.933C472.667%20646.267%20477.6%20645.867%20503.6%20637.333C527.6%20629.333%20543.333%20620%20560.267%20603.6C590.133%20574.667%20604.4%20536.267%20602.267%20489.733C600.533%20450.267%20588.267%20420%20564%20395.333C546.8%20377.867%20531.6%20368.4%20506.267%20360C482.933%20352.133%20474.533%20351.2%20427.067%20350.4L384%20349.733V462.933Z'%20fill='%233B5695'/%3e%3c/svg%3e",i2=(e,t)=>{const n=e.__vccOpts||e;for(const[i,l]of t)n[i]=l;return n},M0={name:"Logo"},D0={src:v0,alt:"DDict Logo",class:"w-6 h-6 cursor-pointer"};function R0(e,t,n,i,l,s){return o.openBlock(),o.createElementBlock("img",D0)}const T0=i2(M0,[["render",R0]]),H0="data:image/gif;base64,R0lGODlhQAAmAPQAAM3Nzerq6sbGxu3t7dnZ2eHh4bW1tfv7+/Ly8re3t7y8vPz8/MLCwvX19fj4+N7e3rq6ur6+vsDAwPb29tLS0vDw8MnJydzc3OT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EUBM5EBnIymAZqDxW7EryOHgekZsIkmk01HoGGx5NeiMPCIYiGoSKIoiOjIWKkIqSjh+VhpeOmnqclImWjZ2im6SUE3mBF6iGDx4TBIAmbD0eAZMvCkYiHg0UciMSGCm+BwWrJgkbZSRfAHsPRyY5BMIfBgAIUiULAQ8N3UkIGkMCA1w3LooeA1vjIQAh+QQFAwAfACwpABMAEQATAAAFZuAnjovTeGOaloUEbROqfsfCCcYYPY4sLgNAbibgLEQISmKWMlgGHguTCVlIp6qEFZvdckfa6/cTHovKZvRYCzB/FKWHgpvYnD6eCWGpMgAQPiIeCBpDHwIBR1NAAhEYB4GLC5EiIQAh+QQFQwAfACwpABMAEQATAAAFYuAnjp/nkSjpNQQ1nKnoOU8kQhsCj97BMQaU4uGAeQKWYOzDwCw+g8SSZCgcpyjCFTvSBrjdLdgLFpHL57GnogAbMKZGRhozAF48BEA5YgSeKQsBAiIKGAc7KT0YBUVlJkshADs=",O0={name:"Loading"},G0=e=>(o.pushScopeId("data-v-a0957544"),e=e(),o.popScopeId(),e),V0={class:"rounded-lg bg-white p-1 border shadow-custom border-solid border-neutral-300"},J0=[G0(()=>o.createElementVNode("img",{src:H0,alt:"Loading",class:"w-12"},null,-1))];function U0(e,t,n,i,l,s){return o.openBlock(),o.createElementBlock("div",V0,J0)}const N0=i2(O0,[["render",U0],["__scopeId","data-v-a0957544"]]),Y0={name:"Phonetic",props:["phonetic"]},K0={class:"p-0 m-0"},W0={class:"text-xs font-md text-slate-400"};function Z0(e,t,n,i,l,s){return o.openBlock(),o.createElementBlock("p",K0,[o.createElementVNode("span",W0,"/"+o.toDisplayString(n.phonetic)+"/",1)])}const q0=i2(Y0,[["render",Z0]]),j0={class:"flex flex-col gap-2"},z0={__name:"Sentences",props:{sentences:{type:String,default:""}},setup(e){const t=e,n=o.computed(()=>t.sentences.split(`
2
- `));return(i,l)=>(o.openBlock(),o.createElementBlock("div",j0,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.value,(s,a)=>(o.openBlock(),o.createElementBlock("p",{key:a,class:"text-base text-textCustom leading-tight p-0 mr-2"},o.toDisplayString(s),1))),128))]))}},P0={class:"capitalize text-base italic font-normal text-slate-400"},$0={class:"text-base leading-6 text-textCustom"},X0={__name:"Dict",props:{dictionary:Array},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",null,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.dictionary,(i,l)=>(o.openBlock(),o.createElementBlock("div",{key:l,class:"mt-2"},[o.createElementVNode("p",P0,o.toDisplayString(i.pos),1),o.createElementVNode("span",$0,o.toDisplayString(i.terms.join(", ")),1)]))),128))]))}},_0={class:""},ee=o.createElementVNode("p",{class:"capitalize text-base italic font-normal text-slate-400 mt-2"},"AI Summary",-1),te={key:0,class:"list-none list-outside mt-2"},ne=["innerHTML"],oe={__name:"Explanation",props:{explanation:Object},setup(e){return(t,n)=>{var i,l;return o.openBlock(),o.createElementBlock("div",_0,[ee,(i=e.explanation)!=null&&i.result?(o.openBlock(),o.createElementBlock("ul",te,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(((l=e.explanation)==null?void 0:l.result.split(`
3
- `))||[],(s,a)=>(o.openBlock(),o.createElementBlock("li",{key:`${s}-${a}`,innerHTML:s,class:"text-base text-textCustom"},null,8,ne))),128))])):o.createCommentVNode("",!0)])}}},ie="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.33325%204.66667H3.51125C3.82693%204.6667%204.13239%204.55473%204.37325%204.35067L6.83392%202.26667C6.99592%202.12953%207.19374%202.04156%207.40407%202.01312C7.61441%201.98468%207.82849%202.01696%208.02109%202.10615C8.21369%202.19534%208.37678%202.33772%208.49114%202.51652C8.60551%202.69532%208.66638%202.90309%208.66659%203.11534V12.8847C8.66649%2013.097%208.60565%2013.305%208.49125%2013.4839C8.37685%2013.6628%208.21367%2013.8053%208.02094%2013.8945C7.82822%2013.9837%207.614%2014.0159%207.40356%2013.9874C7.19312%2013.9588%206.99523%2013.8707%206.83325%2013.7333L4.37325%2011.6487C4.13229%2011.4449%203.82685%2011.3331%203.51125%2011.3333H2.33325C2.06804%2011.3333%201.81368%2011.228%201.62615%2011.0404C1.43861%2010.8529%201.33325%2010.5986%201.33325%2010.3333V5.66667C1.33325%205.40145%201.43861%205.1471%201.62615%204.95956C1.81368%204.77203%202.06804%204.66667%202.33325%204.66667ZM11.1779%2011.18C11.5969%2010.763%2011.9294%2010.2674%2012.1562%209.72156C12.3831%209.17572%2012.4999%208.59044%2012.4999%207.99934C12.4999%207.40823%2012.3831%206.82295%2012.1562%206.27711C11.9294%205.73127%2011.5969%205.23564%2011.1779%204.81867C11.1317%204.77098%2011.0765%204.73297%2011.0155%204.70686C10.9544%204.68075%2010.8888%204.66705%2010.8224%204.66657C10.756%204.66609%2010.6902%204.67883%2010.6288%204.70406C10.5674%204.72929%2010.5116%204.76649%2010.4647%204.8135C10.4179%204.86051%2010.3808%204.91639%2010.3558%204.97787C10.3307%205.03935%2010.3181%205.10521%2010.3188%205.17159C10.3195%205.23798%2010.3334%205.30357%2010.3597%205.36453C10.3859%205.42549%2010.4241%205.48061%2010.4719%205.52667C10.7977%205.85079%2011.0562%206.23609%2011.2326%206.66043C11.409%207.08477%2011.4998%207.53979%2011.4998%207.99934C11.4998%208.45888%2011.409%208.9139%2011.2326%209.33824C11.0562%209.76258%2010.7977%2010.1479%2010.4719%2010.472C10.4241%2010.5181%2010.3859%2010.5732%2010.3597%2010.6341C10.3334%2010.6951%2010.3195%2010.7607%2010.3188%2010.8271C10.3181%2010.8935%2010.3307%2010.9593%2010.3558%2011.0208C10.3808%2011.0823%2010.4179%2011.1382%2010.4647%2011.1852C10.5116%2011.2322%2010.5674%2011.2694%2010.6288%2011.2946C10.6902%2011.3198%2010.756%2011.3326%2010.8224%2011.3321C10.8888%2011.3316%2010.9544%2011.3179%2011.0155%2011.2918C11.0765%2011.2657%2011.1317%2011.2277%2011.1779%2011.18ZM12.7113%2013.2127C12.6123%2013.2126%2012.5157%2013.1832%2012.4335%2013.1281C12.3513%2013.0731%2012.2873%2012.9949%2012.2495%2012.9035C12.2118%2012.8121%2012.202%2012.7115%2012.2214%2012.6146C12.2408%2012.5176%2012.2886%2012.4285%2012.3586%2012.3587C12.9317%2011.7866%2013.3865%2011.1071%2013.6967%2010.359C14.0069%209.61101%2014.1666%208.80915%2014.1666%207.99934C14.1666%207.18952%2014.0069%206.38766%2013.6967%205.63963C13.3865%204.8916%2012.9317%204.2121%2012.3586%203.64C12.3122%203.59351%2012.2754%203.53834%2012.2503%203.47764C12.2252%203.41693%2012.2124%203.35188%2012.2124%203.2862C12.2125%203.22052%2012.2255%203.15549%2012.2507%203.09483C12.2759%203.03417%2012.3128%202.97907%2012.3593%202.93267C12.4057%202.88627%2012.4609%202.84948%2012.5216%202.8244C12.5823%202.79932%2012.6474%202.78645%2012.7131%202.78651C12.7787%202.78657%2012.8438%202.79957%2012.9044%202.82476C12.9651%202.84995%2013.0202%202.88685%2013.0666%202.93334C13.7327%203.59825%2014.2612%204.38801%2014.6218%205.25741C14.9824%206.12681%2015.168%207.05879%2015.168%208C15.168%208.94122%2014.9824%209.87319%2014.6218%2010.7426C14.2612%2011.612%2013.7327%2012.4018%2013.0666%2013.0667C13.02%2013.1134%2012.9646%2013.1504%2012.9036%2013.1756C12.8426%2013.2007%2012.7772%2013.2129%2012.7113%2013.2127Z'%20fill='%233B5695'/%3e%3c/svg%3e",le="data:image/svg+xml,%3csvg%20class='swap-on%20fill-current%20h-4%20w-4'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill-rule='evenodd'%20d='M4.5%207.5a3%203%200%200%201%203-3h9a3%203%200%200%201%203%203v9a3%203%200%200%201-3%203h-9a3%203%200%200%201-3-3v-9Z'%20clip-rule='evenodd'%20fill='%238595BE'/%3e%3c/svg%3e",se=["disabled"],ae=["disabled"],re={__name:"Player",props:{tts:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["loadTTS"],setup(e,{emit:t}){const n=e,i=t,l=o.computed(()=>n.tts),s=o.ref(!1),a=new Audio,c=new(window.AudioContext||window.webkitAudioContext);let r=null;o.watch(l,()=>{if(!l.value){s.value=!1;return}f()},{immediate:!0}),o.onUnmounted(()=>{m(),a.src="",c.close()});function d(){if(l.value){f();return}s.value=!0,i("loadTTS")}async function f(){if(l.value){s.value=!0;try{a.src=l.value,a.playbackRate=.7,await a.play(),a.onended=()=>{s.value=!1}}catch{await g()}}}async function g(){try{const C=await(await fetch(l.value)).arrayBuffer(),p=await c.decodeAudioData(C);r=c.createBufferSource(),r.buffer=p,r.playbackRate.value=.7,r.connect(c.destination),r.start(),r.onended=()=>{s.value=!1,r=null}}catch{s.value=!1}}function m(){r&&(r.stop(),r.disconnect(),r=null),a.pause(),a.currentTime=0,s.value=!1}return(A,C)=>s.value?(o.openBlock(),o.createElementBlock("button",{key:1,class:o.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-white !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled,onClick:m},[o.createElementVNode("img",{class:o.normalizeClass(["w-5",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),src:le,alt:"Stop"},null,2)],10,ae)):(o.openBlock(),o.createElementBlock("button",{key:0,class:o.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-white !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled,onClick:d},[o.createElementVNode("img",{class:o.normalizeClass(["w-5",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),src:ie,alt:"Play"},null,2)],10,se))}},ce="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.9491%205.89315C14.8278%205.53128%2014.5111%205.27252%2014.1226%205.21783L10.5264%204.7114L8.91813%201.55315C8.74435%201.21195%208.39257%201%207.99998%201C7.60739%201%207.25557%201.21195%207.08183%201.55315L5.47358%204.7114L1.8774%205.21783C1.48888%205.27252%201.17219%205.53128%201.05086%205.89315C0.929554%206.25501%201.02881%206.64477%201.30993%206.91038L3.91217%209.36871L3.29786%2012.8399C3.2315%2013.215%203.38755%2013.5868%203.7052%2013.8105C3.88128%2013.9344%204.08938%2014%204.30704%2014C4.47232%2014%204.63705%2013.9606%204.78341%2013.886L7.99995%2012.2471L11.2165%2013.886C11.3628%2013.9606%2011.5276%2014%2011.6929%2014C11.9106%2014%2012.1187%2013.9345%2012.2948%2013.8105C12.6124%2013.5868%2012.7685%2013.215%2012.7021%2012.84L12.0878%209.36871L14.6901%206.91035C14.9712%206.64477%2015.0704%206.25498%2014.9491%205.89315ZM14.0266%206.25082L11.2455%208.87813C11.1335%208.98392%2011.0824%209.13637%2011.1089%209.28575L11.7654%2012.9956C11.7701%2013.0226%2011.759%2013.0493%2011.7362%2013.0653C11.7202%2013.0766%2011.7038%2013.079%2011.6929%2013.079C11.6809%2013.079%2011.6694%2013.0762%2011.6587%2013.0708L8.22108%2011.3192C8.15189%2011.284%208.07593%2011.2663%207.99998%2011.2663C7.92402%2011.2663%207.84807%2011.284%207.77882%2011.3193L4.34118%2013.0708C4.33052%2013.0763%204.31904%2013.079%204.30701%2013.079C4.29611%2013.079%204.27969%2013.0767%204.26373%2013.0654C4.24092%2013.0494%204.22975%2013.0226%204.2345%2012.9957L4.89104%209.28584C4.91747%209.13646%204.86637%208.98401%204.75439%208.87822L1.97327%206.25091C1.95308%206.23184%201.94595%206.20383%201.95466%206.17786C1.9634%206.15185%201.98612%206.13326%202.01405%206.12933L5.85743%205.58807C6.0122%205.56626%206.14599%205.47208%206.21521%205.33616L7.93404%201.9608C7.94653%201.9363%207.97178%201.92107%207.99998%201.92107C8.02818%201.92107%208.05343%201.9363%208.06591%201.9608L9.78468%205.33607C9.85391%205.47199%209.9877%205.5662%2010.1425%205.58799L13.9859%206.12924C14.0138%206.1332%2014.0365%206.15176%2014.0452%206.17777C14.0539%206.20374%2014.0468%206.23175%2014.0266%206.25082Z'%20fill='%231A1F2A'/%3e%3c/svg%3e",de="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.47207%201.31905C7.57125%201.12371%207.77589%201%208.00001%201C8.22413%201%208.42877%201.12367%208.52795%201.31905L10.3721%204.95175L14.4959%205.53427C14.7177%205.5656%2014.9019%205.7166%2014.9712%205.9238C15.0404%206.13101%2014.9827%206.35843%2014.8222%206.51049L11.8382%209.33816L12.5427%2013.3309C12.5806%2013.5456%2012.4897%2013.7626%2012.3084%2013.8906C12.1272%2014.0187%2011.8868%2014.0356%2011.6884%2013.9342L8.00004%2012.0491L4.31158%2013.9343C4.11323%2014.0356%203.87286%2014.0187%203.69157%2013.8907C3.51028%2013.7627%203.4195%2013.5457%203.45736%2013.3309L4.1618%209.33819L1.17781%206.51052C1.01735%206.35846%200.959571%206.13101%201.02884%205.92383C1.09807%205.71663%201.28232%205.56563%201.50409%205.53431L5.62787%204.95178L7.47207%201.31905Z'%20fill='%23FFC857'/%3e%3c/svg%3e",fe={class:"bg-white tooltip tooltip-top before:!bottom-[100%] before:!bg-white before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary after:!border-transparent","data-tip":"Favorite"},Ae=["disabled"],ge=["src","alt"],Ce={__name:"Favorite",props:{isFilled:Boolean,disabled:Boolean},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",fe,[o.createElementVNode("button",{class:o.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-transparent !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled},[o.createElementVNode("img",{src:e.isFilled?o.unref(de):o.unref(ce),alt:e.isFilled?"Unfavorite":"Favorite",class:o.normalizeClass(["w-5",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]])},null,10,ge)],10,Ae)]))}},ue="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='18'%20cy='12'%20r='0'%20fill='currentColor'%3e%3canimate%20attributeName='r'%20begin='.67'%20calcMode='spline'%20dur='1.5s'%20keySplines='0.2%200.2%200.4%200.8;0.2%200.2%200.4%200.8;0.2%200.2%200.4%200.8'%20repeatCount='indefinite'%20values='0;2;0;0'/%3e%3c/circle%3e%3ccircle%20cx='12'%20cy='12'%20r='0'%20fill='currentColor'%3e%3canimate%20attributeName='r'%20begin='.33'%20calcMode='spline'%20dur='1.5s'%20keySplines='0.2%200.2%200.4%200.8;0.2%200.2%200.4%200.8;0.2%200.2%200.4%200.8'%20repeatCount='indefinite'%20values='0;2;0;0'/%3e%3c/circle%3e%3ccircle%20cx='6'%20cy='12'%20r='0'%20fill='currentColor'%3e%3canimate%20attributeName='r'%20begin='0'%20calcMode='spline'%20dur='1.5s'%20keySplines='0.2%200.2%200.4%200.8;0.2%200.2%200.4%200.8;0.2%200.2%200.4%200.8'%20repeatCount='indefinite'%20values='0;2;0;0'/%3e%3c/circle%3e%3c/svg%3e",me=["src"],G2={__name:"Spinning",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("img",{src:o.unref(ue),alt:"Loading",class:"w-6 h-6"},null,8,me))}},he="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='%23FFC857'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='%23FFC857'/%3e%3ccircle%20cx='3.5'%20cy='3.5'%20r='1.5'%20fill='%23FFC857'/%3e%3cellipse%20cx='4.5'%20cy='10'%20rx='0.5'%20ry='1'%20fill='%23FFC857'/%3e%3cpath%20d='M3.5%201L4.79904%202.5H2.20096L3.5%201Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6%203.5L4.5%204.79904L4.5%202.20096L6%203.5Z'%20fill='%23FFC857'/%3e%3cpath%20d='M10.3697%206.67832L8.22108%207.01422L9.5776%204.65296L10.3697%206.67832Z'%20fill='%23FFC857'/%3e%3cpath%20d='M8.27756%205.34149L10.768%206.00067L9.11199%207.77878L8.27756%205.34149Z'%20fill='%23FFC857'/%3e%3cpath%20d='M1%203.5L2.5%202.20096L2.5%204.79904L1%203.5Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.5%206L2.20096%204.5L4.79904%204.5L3.5%206Z'%20fill='%23FFC857'/%3e%3ccircle%20cx='9'%20cy='6'%20r='1'%20fill='%23FFC857'/%3e%3cpath%20d='M5.49718%209.92495L4.03391%2010.4693L3.96891%209.60573L5.49718%209.92495Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.54089%209.71696L5.10212%209.72621L4.857%2010.5568L3.54089%209.71696Z'%20fill='%23FFC857'/%3e%3cpath%20d='M3.50071%209.96247L5.0159%209.58606L4.9834%2010.4515L3.50071%209.96247Z'%20fill='%23FFC857'/%3e%3c/svg%3e",pe="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6.8544%203.20309C5.39975%202.89815%204.26277%201.76117%203.95787%200.30649C3.92042%200.12792%203.76292%200%203.58041%200C3.3979%200%203.2404%200.12792%203.20297%200.30652C2.89805%201.76117%201.76107%202.89812%200.306418%203.20302C0.127818%203.24045%20-0.00012207%203.39798%20-0.00012207%203.58046C-0.00012207%203.76295%200.127798%203.92047%200.306418%203.9579C1.76105%204.26285%202.89798%205.3998%203.2029%206.85448C3.24033%207.03307%203.39783%207.16102%203.58034%207.16102C3.76282%207.16102%203.92035%207.0331%203.95778%206.85448C4.26272%205.39983%205.39973%204.26287%206.85438%203.95799C7.03297%203.92056%207.16092%203.76306%207.16092%203.58056C7.1609%203.39805%207.03297%203.24052%206.8544%203.20309ZM3.58036%205.60938C3.14292%204.73132%202.42956%204.01792%201.55151%203.58049C2.42958%203.14305%203.14297%202.42968%203.58041%201.55161C4.01785%202.4297%204.73122%203.14307%205.60926%203.58053C4.73119%204.01797%204.0178%204.73132%203.58036%205.60938Z'%20fill='%23FFC857'/%3e%3cpath%20d='M6.21683%209.574C5.53147%209.4303%204.99578%208.8947%204.85209%208.2093C4.81466%208.0307%204.65716%207.90271%204.47465%207.90271C4.29217%207.90271%204.13464%208.0306%204.09721%208.2092C3.95352%208.8946%203.4178%209.4303%202.73244%209.574C2.55385%209.6114%202.4259%209.7689%202.4259%209.9514C2.4259%2010.1339%202.55383%2010.2914%202.73244%2010.3288C3.41778%2010.4725%203.95349%2011.0082%204.09716%2011.6936C4.13459%2011.8722%204.2921%2012.0002%204.4746%2012.0002C4.65709%2012.0002%204.81461%2011.8723%204.85204%2011.6936C4.99574%2011.0082%205.53145%2010.4725%206.21683%2010.3289C6.39543%2010.2914%206.52337%2010.1339%206.52337%209.9514C6.52337%209.7689%206.39545%209.6114%206.21683%209.574ZM4.47463%2010.6408C4.29163%2010.3688%204.05725%2010.1345%203.78526%209.9515C4.0573%209.7684%204.29163%209.5341%204.47463%209.2621C4.65765%209.5341%204.892%209.7685%205.164%209.9515C4.892%2010.1345%204.65763%2010.3688%204.47463%2010.6408Z'%20fill='%23FFC857'/%3e%3cpath%20d='M11.4271%206.00324C10.5007%205.80904%209.7766%205.08496%209.5825%204.15859C9.545%203.98%209.3875%203.85205%209.205%203.85205C9.0225%203.85205%208.865%203.97995%208.8276%204.15857C8.6334%205.08496%207.90932%205.80902%206.98293%206.0032C6.80434%206.04063%206.67639%206.19815%206.67639%206.38064C6.67639%206.56312%206.80431%206.72062%206.98293%206.75807C7.9093%206.95228%208.6334%207.67633%208.8275%208.6027C8.865%208.7813%209.0225%208.9093%209.205%208.9093C9.3875%208.9093%209.545%208.7814%209.5824%208.6027C9.7766%207.67633%2010.5007%206.95228%2011.4271%206.75812C11.6057%206.72067%2011.7336%206.56317%2011.7336%206.38068C11.7336%206.1982%2011.6057%206.04067%2011.4271%206.00324ZM9.205%207.47681C8.9365%207.02634%208.5593%206.64914%208.1089%206.38066C8.5593%206.11218%208.9365%205.73502%209.205%205.28453C9.4735%205.73502%209.8507%206.11221%2010.3012%206.38068C9.8507%206.64916%209.4735%207.02636%209.205%207.47681Z'%20fill='%23FFC857'/%3e%3c/svg%3e",we={class:"bg-white tooltip tooltip-top before:!bottom-[100%] before:!bg-white before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary after:!border-transparent","data-tip":"AI Translate"},Be=["disabled"],xe=["src"],be={__name:"AITranslateBtn",props:{isLoading:Boolean,disabled:Boolean,isFilled:Boolean},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",we,[e.isLoading?(o.openBlock(),o.createBlock(G2,{key:0,class:"inset-0 flex items-center justify-center"})):(o.openBlock(),o.createElementBlock("button",{key:1,class:o.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-transparent !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled},[o.createElementVNode("img",{src:e.isFilled?o.unref(he):o.unref(pe),alt:"AI",class:o.normalizeClass(["w-5",[{"opacity-100":!e.disabled},{"opacity-50 transform ":e.disabled}]])},null,10,xe)],10,Be))]))}},Ee="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20fill='%23FFC857'%20d='M12%207a5%205%200%200%200-2%209.584V19h4v-2.416A5.001%205.001%200%200%200%2012%207z'/%3e%3cpath%20stroke='%23FFC857'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e",ye="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%3e%3cpath%20stroke='%23FFC857'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%20d='M21%2012h1m-3.5-6.5%201-1M12%203V2M5.5%205.5l-1-1M3%2012H2m8%2010h4m3-10a5%205%200%201%200-7%204.584V19h4v-2.416A5.001%205.001%200%200%200%2017%2012z'/%3e%3c/svg%3e",Ie={class:"bg-white tooltip tooltip-top before:!bottom-[100%] before:!bg-white before:!border before:!border-solid before:!border-gray-200 before:![box-shadow:0px_1px_8px_0px_#3D44514D] before:!rounded-md before:!text-textSecondary after:!border-transparent","data-tip":"AI Summarize"},ke=["disabled"],Le=["src"],Fe={__name:"AIExplainBtn",props:{isLoading:Boolean,disabled:Boolean,isFilled:Boolean},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",Ie,[e.isLoading?(o.openBlock(),o.createBlock(G2,{key:0})):(o.openBlock(),o.createElementBlock("button",{key:1,class:o.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-transparent !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled},[o.createElementVNode("img",{src:e.isFilled?o.unref(Ee):o.unref(ye),alt:"AI",class:o.normalizeClass(["w-6",[{"opacity-100":!e.disabled},{"opacity-50 transform ":e.disabled}]])},null,10,Le)],10,ke))]))}},Se="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.12596%201.63869C9.46935%201.54364%209.83221%201.70329%209.99413%202.02068C10.3672%202.75191%2011.1261%203.25%2012%203.25C12.8739%203.25%2013.6328%202.75191%2014.0059%202.02068C14.1678%201.70329%2014.5307%201.54364%2014.874%201.63869C16.5585%202.10497%2018.0759%202.9704%2019.3184%204.12574C19.5611%204.35137%2019.6269%204.70948%2019.4804%205.00666C19.3331%205.30535%2019.25%205.6419%2019.25%206C19.25%207.24263%2020.2574%208.25%2021.5%208.25L21.5314%208.24977C21.8629%208.24504%2022.1583%208.45859%2022.2576%208.77495C22.5777%209.79397%2022.75%2010.8776%2022.75%2012C22.75%2012.7408%2022.6749%2013.4649%2022.5318%2014.1648C22.4548%2014.5411%2022.1059%2014.7985%2021.7237%2014.7609C21.6504%2014.7537%2021.5758%2014.75%2021.5%2014.75C20.2574%2014.75%2019.25%2015.7574%2019.25%2017C19.25%2017.5531%2019.4486%2018.0579%2019.7793%2018.4498C20.027%2018.7434%2020.0128%2019.1767%2019.7465%2019.4535C18.4777%2020.7719%2016.8745%2021.7678%2015.0721%2022.3044C14.6807%2022.4209%2014.2681%2022.2029%2014.1437%2021.814C13.8535%2020.906%2013.0024%2020.25%2012%2020.25C10.9976%2020.25%2010.1465%2020.906%209.85629%2021.814C9.73195%2022.2029%209.31927%2022.4209%208.92789%2022.3044C7.12545%2021.7678%205.52229%2020.7719%204.25353%2019.4535C3.98716%2019.1767%203.97299%2018.7434%204.22072%2018.4498C4.55139%2018.0579%204.75%2017.5531%204.75%2017C4.75%2015.7574%203.74264%2014.75%202.5%2014.75C2.42423%2014.75%202.34963%2014.7537%202.27634%2014.7609C1.89406%2014.7985%201.54519%2014.5411%201.46821%2014.1648C1.32505%2013.4649%201.25%2012.7408%201.25%2012C1.25%2010.8776%201.42227%209.79398%201.74236%208.77494C1.84173%208.45859%202.13705%208.24504%202.4686%208.24977L2.5%208.25C3.74264%208.25%204.75%207.24263%204.75%206C4.75%205.6419%204.66689%205.30535%204.51962%205.00666C4.3731%204.70948%204.43894%204.35137%204.68159%204.12574C5.92411%202.9704%207.44153%202.10497%209.12596%201.63869ZM6.08277%204.88991C6.19152%205.24123%206.25%205.61424%206.25%206C6.25%207.88945%204.85261%209.45253%203.03493%209.71213C2.84898%2010.4432%202.75%2011.2096%202.75%2012C2.75%2012.4294%202.77921%2012.8516%202.83567%2013.2648C4.74948%2013.4346%206.25%2015.0421%206.25%2017C6.25%2017.6669%206.0754%2018.2941%205.76971%2018.8372C6.62645%2019.6184%207.63002%2020.2404%208.73362%2020.657C9.37706%2019.5189%2010.598%2018.75%2012%2018.75C13.402%2018.75%2014.6229%2019.5189%2015.2664%2020.657C16.37%2020.2404%2017.3735%2019.6184%2018.2303%2018.8372C17.9246%2018.2941%2017.75%2017.6669%2017.75%2017C17.75%2015.0421%2019.2505%2013.4346%2021.1643%2013.2648C21.2208%2012.8516%2021.25%2012.4294%2021.25%2012C21.25%2011.2096%2021.151%2010.4432%2020.9651%209.71213C19.1474%209.45252%2017.75%207.88945%2017.75%206C17.75%205.61424%2017.8085%205.24123%2017.9172%204.88991C17.0618%204.1771%2016.0762%203.61614%2015.0018%203.24775C14.3184%204.15897%2013.2287%204.75%2012%204.75C10.7713%204.75%209.68158%204.15897%208.99819%203.24775C7.92382%203.61614%206.93823%204.1771%206.08277%204.88991Z'%20fill='%237E7E7E'/%3e%3cpath%20d='M7.75%2012C7.75%209.65278%209.65279%207.75%2012%207.75C14.3472%207.75%2016.25%209.65278%2016.25%2012C16.25%2014.3472%2014.3472%2016.25%2012%2016.25C9.65279%2016.25%207.75%2014.3472%207.75%2012ZM12%209.25C10.4812%209.25%209.25%2010.4812%209.25%2012C9.25%2013.5188%2010.4812%2014.75%2012%2014.75C13.5188%2014.75%2014.75%2013.5188%2014.75%2012C14.75%2010.4812%2013.5188%209.25%2012%209.25Z'%20fill='%237E7E7E'/%3e%3c/svg%3e",Qe={},ve={class:"btn btn-xs btn-ghost btn-circle mb-1"},Me=[o.createElementVNode("img",{class:"w-5",src:Se,alt:"Icon description"},null,-1)];function De(e,t){return o.openBlock(),o.createElementBlock("button",ve,Me)}const Re=i2(Qe,[["render",De]]),Te="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3.19102%203.19102C3.44571%202.93633%203.85864%202.93633%204.11333%203.19102L12.809%2011.8867C13.0637%2012.1414%2013.0637%2012.5543%2012.809%2012.809C12.5543%2013.0637%2012.1414%2013.0637%2011.8867%2012.809L3.19102%204.11333C2.93633%203.85864%202.93633%203.44571%203.19102%203.19102Z'%20fill='%231A1F2A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.809%203.19102C13.0637%203.44571%2013.0637%203.85864%2012.809%204.11333L4.11333%2012.809C3.85864%2013.0637%203.44571%2013.0637%203.19102%2012.809C2.93633%2012.5543%202.93633%2012.1414%203.19102%2011.8867L11.8867%203.19102C12.1414%202.93633%2012.5543%202.93633%2012.809%203.19102Z'%20fill='%231A1F2A'/%3e%3c/svg%3e",He={},Oe={class:"btn btn-xs btn-circle btn-ghost"},Ge=[o.createElementVNode("img",{class:"w-5",src:Te,alt:"Clear"},null,-1)];function Ve(e,t){return o.openBlock(),o.createElementBlock("button",Oe,Ge)}const Je=i2(He,[["render",Ve]]),Ue={class:"flex flex-col"},Ne={class:"flex p-2 pt-2 pb-1 flex-row justify-between"},Ye={class:"justify-start items-center"},Ke={class:"flex items-center gap-1"},We=o.createElementVNode("div",{class:"w-5"},null,-1),Ze={class:"justify-end items-center"},V2={__name:"Header",props:{tts:String,isServiceUnavailable:Boolean,isFavorite:Boolean,isFavoriteFeatureEnabled:Boolean,isAITranslate:Boolean,isAIExplain:Boolean,isAITranslationLoading:Boolean,isAIExplainLoading:Boolean,isAIExplainVisible:Boolean,isAITranslateVisible:Boolean},emits:["favorite","setting","close","loadTTS","aiTranslate","aiExplain"],setup(e,{emit:t}){const n=e,i=t;return(l,s)=>(o.openBlock(),o.createElementBlock("div",Ue,[o.createElementVNode("div",Ne,[o.createElementVNode("div",Ye,[e.isServiceUnavailable?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(re,{key:0,disabled:e.isAITranslationLoading||e.isAIExplainLoading,tts:n.tts,onLoadTTS:s[0]||(s[0]=a=>l.$emit("loadTTS"))},null,8,["disabled","tts"]))]),o.createElementVNode("div",Ke,[We,!e.isServiceUnavailable&&e.isAITranslateVisible?(o.openBlock(),o.createBlock(be,{key:0,isLoading:e.isAITranslationLoading,isFilled:e.isAITranslate,onClick:s[1]||(s[1]=a=>i("aiTranslate"))},null,8,["isLoading","isFilled"])):o.createCommentVNode("",!0),!e.isServiceUnavailable&&e.isAIExplainVisible?(o.openBlock(),o.createBlock(Fe,{key:1,isLoading:e.isAIExplainLoading,isFilled:e.isAIExplain,onClick:s[2]||(s[2]=a=>i("aiExplain"))},null,8,["isLoading","isFilled"])):o.createCommentVNode("",!0),!e.isServiceUnavailable&&n.isFavoriteFeatureEnabled?(o.openBlock(),o.createBlock(Ce,{key:2,isFilled:n.isFavorite,onClick:s[3]||(s[3]=a=>i("favorite")),disabled:e.isAITranslationLoading||e.isAIExplainLoading},null,8,["isFilled","disabled"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",Ze,[o.createVNode(Re,{onClick:s[4]||(s[4]=a=>i("setting"))}),o.createVNode(Je,{onClick:s[5]||(s[5]=a=>i("close"))})])])]))}},e2={LOGO:"LOGO",LOADING:"LOADING",DATA:"DATA",ERROR:"ERROR",HIDDEN:"HIDDEN"},qe=["ar","fa","iw","yi","ur","pa"],je={key:0,class:"flex justify-center"},ze={key:1,class:"flex justify-center"},Pe={class:o.normalizeClass(["bg-white rounded-md relative z-10"])},$e={class:"p-3 border-t border-[#D3D4D9]"},Xe=Object.assign({name:"Bubble",props:["translation","explanation","tts","status","isFavorite","isFavoriteFeatureEnabled","isAITranslate","isAIExplain","aiExplainMinLength"],emits:["logo","favorite","settings","close","loadTTS","aiTranslate","aiExplain"],data(){return{data:null,isLongSentence:!1,isServiceUnavailable:!1,isAITranslationLoading:!1,isAIExplainLoading:!1}},methods:{handleAITranslate(){this.isAITranslationLoading=!0,this.$emit("aiTranslate")},handleAIExplain(){this.isAIExplainLoading=!0,this.$emit("aiExplain")}},watch:{translation:{handler(){var e,t,n,i;try{this.data=this.translation,this.isLongSentence=!((t=(e=this.data)==null?void 0:e.phonetic)!=null&&t.src||((i=(n=this.data)==null?void 0:n.dictionary)==null?void 0:i.length)>0),this.isServiceUnavailable=!1}catch{this.isServiceUnavailable=!0}finally{this.isAITranslationLoading=!1,this.isAIExplainLoading=!1}},immediate:!0},explanation:{handler(){this.isAIExplainLoading=!1},immediate:!0},status(){this.status===e2.ERROR&&(this.isServiceUnavailable=!0)}}},{setup(e){return(t,n)=>{var i,l,s,a,c,r,d,f,g,m,A;return e.status===o.unref(e2).LOGO?(o.openBlock(),o.createElementBlock("div",je,[o.createVNode(T0,{onClick:n[0]||(n[0]=C=>t.$emit("logo"))})])):e.status===o.unref(e2).LOADING?(o.openBlock(),o.createElementBlock("div",ze,[o.createVNode(N0)])):e.status!==o.unref(e2).HIDDEN?(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(["wrapper rounded-lg text-slate-900 text-sm shadow-lg relative bg-[length:300%_300%] bg-[position:0%_50%]",{"p-0.5 bg-gradient-to-br from-[#8556f0] via-[#d6b379] via-[#6bedd1] to-[#439beb] animate-moveGradient":e.isAITranslate||e.isAIExplain,"p-0.5 bg-gray-100":!e.isAITranslate&&!e.isAIExplain}])},[o.createElementVNode("div",Pe,[t.isServiceUnavailable?(o.openBlock(),o.createBlock(V2,{key:0,isServiceUnavailable:t.isServiceUnavailable,isLongSentence:!1,onFavorite:n[1]||(n[1]=C=>t.$emit("favorite")),onSetting:n[2]||(n[2]=C=>t.$emit("settings")),onClose:n[3]||(n[3]=C=>t.$emit("close")),onLoadTTS:n[4]||(n[4]=C=>t.$emit("loadTTS"))},null,8,["isServiceUnavailable"])):(o.openBlock(),o.createBlock(V2,{key:1,tts:e.tts,isFavorite:e.isFavorite,isAITranslate:e.isAITranslate,isAITranslateVisible:((l=(i=t.data)==null?void 0:i.dictionary)==null?void 0:l.length)===0,isAIExplain:e.isAIExplain,isAIExplainVisible:((a=(s=t.data)==null?void 0:s.text)==null?void 0:a.length)>=e.aiExplainMinLength,isAITranslationLoading:t.isAITranslationLoading,isAIExplainLoading:t.isAIExplainLoading,isFavoriteFeatureEnabled:e.isFavoriteFeatureEnabled,isLongSentence:t.isLongSentence,onFavorite:n[5]||(n[5]=C=>t.$emit("favorite")),onSetting:n[6]||(n[6]=C=>t.$emit("settings")),onClose:n[7]||(n[7]=C=>t.$emit("close")),onLoadTTS:n[8]||(n[8]=C=>t.$emit("loadTTS")),onAiTranslate:t.handleAITranslate,onAiExplain:t.handleAIExplain},null,8,["tts","isFavorite","isAITranslate","isAITranslateVisible","isAIExplain","isAIExplainVisible","isAITranslationLoading","isAIExplainLoading","isFavoriteFeatureEnabled","isLongSentence","onAiTranslate","onAiExplain"])),o.createElementVNode("div",$e,[(r=(c=t.data)==null?void 0:c.phonetic)!=null&&r.src?(o.openBlock(),o.createBlock(q0,{key:0,phonetic:(f=(d=t.data)==null?void 0:d.phonetic)==null?void 0:f.src},null,8,["phonetic"])):o.createCommentVNode("",!0),o.createVNode(z0,{sentences:t.isServiceUnavailable?"Service Unavailable":(g=t.data)==null?void 0:g.result},null,8,["sentences"])]),!t.isServiceUnavailable&&((A=(m=t.data)==null?void 0:m.dictionary)==null?void 0:A.length)>0?(o.openBlock(),o.createBlock(X0,{key:2,class:"p-3 pt-0 border-t border-[#D3D4D9]",dictionary:t.data.dictionary},null,8,["dictionary"])):o.createCommentVNode("",!0),!t.isServiceUnavailable&&e.isAIExplain&&e.explanation?(o.openBlock(),o.createBlock(oe,{key:3,class:"p-3 pt-0 border-t border-[#D3D4D9]",explanation:e.explanation},null,8,["explanation"])):o.createCommentVNode("",!0)])],2)):o.createCommentVNode("",!0)}}});function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J2={exports:{}};(function(e){(function(){var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n=typeof window<"u",i=n&&window.mozInnerScreenX!=null;function l(s,a,c){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=c&&c.debug||!1;if(r){var d=document.querySelector("#input-textarea-caret-position-mirror-div");d&&d.parentNode.removeChild(d)}var f=document.createElement("div");f.id="input-textarea-caret-position-mirror-div",document.body.appendChild(f);var g=f.style,m=window.getComputedStyle?window.getComputedStyle(s):s.currentStyle,A=s.nodeName==="INPUT";g.whiteSpace="pre-wrap",A||(g.wordWrap="break-word"),g.position="absolute",r||(g.visibility="hidden"),t.forEach(function(w){A&&w==="lineHeight"?g.lineHeight=m.height:g[w]=m[w]}),i?s.scrollHeight>parseInt(m.height)&&(g.overflowY="scroll"):g.overflow="hidden",f.textContent=s.value.substring(0,a),A&&(f.textContent=f.textContent.replace(/\s/g," "));var C=document.createElement("span");C.textContent=s.value.substring(a)||".",f.appendChild(C);var p={top:C.offsetTop+parseInt(m.borderTopWidth),left:C.offsetLeft+parseInt(m.borderLeftWidth),height:parseInt(m.lineHeight)};return r?C.style.backgroundColor="#aaa":document.body.removeChild(f),p}e.exports=l})()})(J2);var et=J2.exports;const U2=_e(et);function l2(e){const t=window.getSelection();let n=t+"";if(n=n.trim(),e&&e.type==="password"||!n.length&&(!(e&&e.selectionEnd)||(n=e.value.substring(e.selectionStart,e.selectionEnd),n=n.trim(),!n.length)))return!1;let l=t.getRangeAt(0).getBoundingClientRect(),{top:s,bottom:a,left:c,width:r,height:d}=l;if(!a&&!c){if(!e.selectionEnd)return!1;let f=U2(e,e.selectionStart),g=U2(e,e.selectionEnd);l=e.getBoundingClientRect(),c=l.left+f.left,r=g.left-f.left,f.top!=g.top&&(c=l.left,r=l.width),s=l.top+f.top,a=l.top+g.top+20}return d===0&&(d=a-s),{text:n,x:c,y:s,top:s,bottom:a,left:c,right:c+r,width:r,height:d}}function tt(){const e=document.getElementsByTagName("ddict-div");for(let t of e)if(!t.parentNode.matches('wrapper[dir="rtl"]')){const n=document.createElement("wrapper");n.setAttribute("dir","rtl"),t.parentNode.insertBefore(n,t),n.appendChild(t)}}function nt(){const e=document.querySelectorAll('wrapper[dir="rtl"]');for(let t of e){const n=t.querySelector("ddict-div");n&&(t.parentNode.insertBefore(n,t),t.remove())}}const N2={supportRTL:tt,removeRTL:nt},ot={__name:"HotKeysListener",props:{textSelected:String},emits:["toggleKey","close"],setup(e,{emit:t}){const n=e,i=t,l=()=>{setTimeout(()=>{n.textSelected&&c("DoubleClick")},50)},s=r=>{(r.altKey&&r.key.toLowerCase()==="w"||r.key==="∑")&&n.textSelected&&(c("Alt+W"),r.preventDefault()),r.key==="Escape"&&(c("Escape"),r.preventDefault())},a=r=>{r.key==="Shift"&&n.textSelected&&c("Shift")},c=r=>{switch(r){case"DoubleClick":i("toggleKey","DoubleClick");break;case"Shift":i("toggleKey","Shift");break;case"Alt+W":i("toggleKey","Alt+W");break;case"Escape":i("close");break}};return o.onMounted(()=>{window.addEventListener("dblclick",l),window.addEventListener("keydown",s),window.addEventListener("keyup",a)}),o.onUnmounted(()=>{window.removeEventListener("dblclick",l),window.removeEventListener("keydown",s),window.removeEventListener("keyup",a)}),(r,d)=>(o.openBlock(),o.createElementBlock("div"))}},it={__name:"BubbleWrapper",props:{translation:Object,explanation:Object,isFavoriteFeatureEnabled:Boolean,isAITranslate:Boolean,isAIExplain:Boolean,isFavorite:Boolean,tts:String,status:String,scale:{type:Number,default:1},aiExplainMinLength:{type:Number,default:0}},emits:["toggleKey","logo","favorite","settings","close","loadTTS","aiTranslate","aiExplain"],setup(e,{emit:t}){const n=e,i=t,l=o.ref(null),s=o.ref(null),a=o.ref(null),c=o.ref(!1),r=o.ref(""),d=o.computed(()=>typeof window>"u"||!a.value||!r.value?null:{getBoundingClientRect:()=>l2(a.value),getClientRects:()=>l2(a.value)}),f=o.computed(()=>{if(!A.value.arrow||n.status===e2.LOGO)return{display:"none"};const{x:h,y:u}=A.value.arrow,y={top:"bottom",right:"left",bottom:"top",left:"right"}[A.value.offset.placement];return{left:h!=null?`${h}px`:"",top:u!=null?`${u}px`:"",[y]:"-8px",position:"absolute"}}),g=o.computed(()=>{var u;switch((u=A.value.offset)==null?void 0:u.placement){case"top":return{transform:"rotate(180deg)"};case"left":return{transform:"rotate(90deg)"};case"right":return{transform:"rotate(-90deg)"};default:return{}}}),{floatingStyles:m,middlewareData:A,update:C}=Q0(d,l,{placement:"bottom",middleware:[b0(4),y0(),E0(),S0({element:s}),I0({apply({rects:h,elements:u}){Object.assign(u.floating.style,{maxWidth:`${h.reference.width>250?h.reference.width/n.scale:250}px`,zIndex:9999})}})],whileElementsMounted(h,u,y){return x0(h,u,y,{ancestorScroll:!0})}}),p=o.computed(()=>{if(n.scale===1)return m.value;const h=m.value.transform;return{...m.value,transform:`${h} scale(${n.scale})`}});o.onMounted(()=>{document.addEventListener("keyup",h=>{if(!l2(h.target)){r.value="",x();return}}),document.documentElement.onclick=h=>{const u=l2(h.target);if(!u){r.value="",x();return}w(u,h)},document.documentElement.ontouchend=h=>{const u=l2(h.target);if(!u){r.value="",x();return}w(u,h)}}),o.onUnmounted(()=>{document.documentElement.onclick=null,document.documentElement.ontouchend=null});const w=(h,u)=>{n.status!==e2.LOGO&&i("close"),a.value=u.target,r.value=h.text,c.value=!0,o.nextTick(C)},B=h=>{h.stopPropagation()},x=async()=>{c.value=!1,i("close")},b=()=>{var u;const h=(u=n==null?void 0:n.translation)==null?void 0:u.target;qe.includes(h)?N2.supportRTL():N2.removeRTL()};return o.watch(()=>n.status,()=>{c.value&&o.nextTick(C),b()}),(h,u)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[c.value?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"floatingEl",ref:l,style:o.normalizeStyle(p.value),onClick:B},[o.createElementVNode("div",{ref_key:"arrowEl",ref:s,style:o.normalizeStyle(f.value),class:"absolute transform"},[o.createElementVNode("img",{style:o.normalizeStyle(g.value),class:"w-5",src:Y2,alt:"arrow"},null,4)],4),o.createVNode(Xe,{translation:n.translation,explanation:n.explanation,tts:n.tts,status:n.status,isFavorite:n.isFavorite,isFavoriteFeatureEnabled:n.isFavoriteFeatureEnabled,isAITranslate:n.isAITranslate,isAIExplain:n.isAIExplain,aiExplainMinLength:n.aiExplainMinLength,onLogo:u[0]||(u[0]=y=>i("logo")),onFavorite:u[1]||(u[1]=y=>i("favorite")),onSettings:u[2]||(u[2]=y=>i("settings")),onClose:x,onLoadTTS:u[3]||(u[3]=y=>i("loadTTS")),onAiTranslate:u[4]||(u[4]=y=>i("aiTranslate")),onAiExplain:u[5]||(u[5]=y=>i("aiExplain"))},null,8,["translation","explanation","tts","status","isFavorite","isFavoriteFeatureEnabled","isAITranslate","isAIExplain","aiExplainMinLength"])],4)):o.createCommentVNode("",!0),o.createVNode(ot,{textSelected:r.value,onToggleKey:u[6]||(u[6]=y=>i("toggleKey",y)),onClose:x},null,8,["textSelected"])],64))}};K.default=it,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(z,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(z=typeof globalThis<"u"?globalThis:z||self,n(z.Bubble={},z.Vue))})(this,function(z,n){"use strict";const N=Math.min,L=Math.max,ie=Math.round,le=Math.floor,R=e=>({x:e,y:e}),Ze={left:"right",right:"left",bottom:"top",top:"bottom"},Ue={start:"end",end:"start"};function be(e,t,o){return L(e,N(t,o))}function q(e,t){return typeof e=="function"?e(t):e}function I(e){return e.split("-")[0]}function X(e){return e.split("-")[1]}function we(e){return e==="x"?"y":"x"}function ye(e){return e==="y"?"height":"width"}function P(e){return["top","bottom"].includes(I(e))?"y":"x"}function xe(e){return we(P(e))}function je(e,t,o){o===void 0&&(o=!1);const i=X(e),l=xe(e),a=ye(l);let r=l==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=ae(r)),[r,ae(r)]}function Ke(e){const t=ae(e);return[de(e),t,de(t)]}function de(e){return e.replace(/start|end/g,t=>Ue[t])}function Ge(e,t,o){const i=["left","right"],l=["right","left"],a=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return o?t?l:i:t?i:l;case"left":case"right":return t?a:r;default:return[]}}function qe(e,t,o,i){const l=X(e);let a=Ge(I(e),o==="start",i);return l&&(a=a.map(r=>r+"-"+l),t&&(a=a.concat(a.map(de)))),a}function ae(e){return e.replace(/left|right|bottom|top/g,t=>Ze[t])}function Xe(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ye(e){return typeof e!="number"?Xe(e):{top:e,right:e,bottom:e,left:e}}function re(e){const{x:t,y:o,width:i,height:l}=e;return{width:i,height:l,top:o,left:t,right:t+i,bottom:o+l,x:t,y:o}}function Ee(e,t,o){let{reference:i,floating:l}=e;const a=P(t),r=xe(t),c=ye(r),s=I(t),d=a==="y",f=i.x+i.width/2-l.width/2,u=i.y+i.height/2-l.height/2,g=i[c]/2-l[c]/2;let m;switch(s){case"top":m={x:f,y:i.y-l.height};break;case"bottom":m={x:f,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:u};break;case"left":m={x:i.x-l.width,y:u};break;default:m={x:i.x,y:i.y}}switch(X(t)){case"start":m[r]-=g*(o&&d?-1:1);break;case"end":m[r]+=g*(o&&d?-1:1);break}return m}const Je=async(e,t,o)=>{const{placement:i="bottom",strategy:l="absolute",middleware:a=[],platform:r}=o,c=a.filter(Boolean),s=await(r.isRTL==null?void 0:r.isRTL(t));let d=await r.getElementRects({reference:e,floating:t,strategy:l}),{x:f,y:u}=Ee(d,i,s),g=i,m={},p=0;for(let b=0;b<c.length;b++){const{name:w,fn:y}=c[b],{x:h,y:C,data:x,reset:E}=await y({x:f,y:u,initialPlacement:i,placement:g,strategy:l,middlewareData:m,rects:d,platform:r,elements:{reference:e,floating:t}});f=h??f,u=C??u,m={...m,[w]:{...m[w],...x}},E&&p<=50&&(p++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(d=E.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:l}):E.rects),{x:f,y:u}=Ee(d,g,s)),b=-1)}return{x:f,y:u,placement:g,strategy:l,middlewareData:m}};async function fe(e,t){var o;t===void 0&&(t={});const{x:i,y:l,platform:a,rects:r,elements:c,strategy:s}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:g=!1,padding:m=0}=q(t,e),p=Ye(m),w=c[g?u==="floating"?"reference":"floating":u],y=re(await a.getClippingRect({element:(o=await(a.isElement==null?void 0:a.isElement(w)))==null||o?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:f,strategy:s})),h=u==="floating"?{x:i,y:l,width:r.floating.width,height:r.floating.height}:r.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),x=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=re(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:h,offsetParent:C,strategy:s}):h);return{top:(y.top-E.top+p.top)/x.y,bottom:(E.bottom-y.bottom+p.bottom)/x.y,left:(y.left-E.left+p.left)/x.x,right:(E.right-y.right+p.right)/x.x}}const Qe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,i;const{placement:l,middlewareData:a,rects:r,initialPlacement:c,platform:s,elements:d}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...w}=q(e,t);if((o=a.arrow)!=null&&o.alignmentOffset)return{};const y=I(l),h=P(c),C=I(c)===c,x=await(s.isRTL==null?void 0:s.isRTL(d.floating)),E=g||(C||!b?[ae(c)]:Ke(c)),v=p!=="none";!g&&v&&E.push(...qe(c,b,p,x));const k=[c,...E],_=await fe(t,w),A=[];let F=((i=a.flip)==null?void 0:i.overflows)||[];if(f&&A.push(_[y]),u){const U=je(l,r,x);A.push(_[U[0]],_[U[1]])}if(F=[...F,{placement:l,overflows:A}],!A.every(U=>U<=0)){var ne,Pe;const U=(((ne=a.flip)==null?void 0:ne.index)||0)+1,We=k[U];if(We)return{data:{index:U,overflows:F},reset:{placement:We}};let oe=(Pe=F.filter(G=>G.overflows[0]<=0).sort((G,O)=>G.overflows[1]-O.overflows[1])[0])==null?void 0:Pe.placement;if(!oe)switch(m){case"bestFit":{var He;const G=(He=F.filter(O=>{if(v){const D=P(O.placement);return D===h||D==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(D=>D>0).reduce((D,ho)=>D+ho,0)]).sort((O,D)=>O[1]-D[1])[0])==null?void 0:He[0];G&&(oe=G);break}case"initialPlacement":oe=c;break}if(l!==oe)return{reset:{placement:oe}}}return{}}}};async function et(e,t){const{placement:o,platform:i,elements:l}=e,a=await(i.isRTL==null?void 0:i.isRTL(l.floating)),r=I(o),c=X(o),s=P(o)==="y",d=["left","top"].includes(r)?-1:1,f=a&&s?-1:1,u=q(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return c&&typeof p=="number"&&(m=c==="end"?p*-1:p),s?{x:m*f,y:g*d}:{x:g*d,y:m*f}}const tt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,i;const{x:l,y:a,placement:r,middlewareData:c}=t,s=await et(t,e);return r===((o=c.offset)==null?void 0:o.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:l+s.x,y:a+s.y,data:{...s,placement:r}}}}},nt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:i,placement:l}=t,{mainAxis:a=!0,crossAxis:r=!1,limiter:c={fn:w=>{let{x:y,y:h}=w;return{x:y,y:h}}},...s}=q(e,t),d={x:o,y:i},f=await fe(t,s),u=P(I(l)),g=we(u);let m=d[g],p=d[u];if(a){const w=g==="y"?"top":"left",y=g==="y"?"bottom":"right",h=m+f[w],C=m-f[y];m=be(h,m,C)}if(r){const w=u==="y"?"top":"left",y=u==="y"?"bottom":"right",h=p+f[w],C=p-f[y];p=be(h,p,C)}const b=c.fn({...t,[g]:m,[u]:p});return{...b,data:{x:b.x-o,y:b.y-i}}}}},ot=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:o,rects:i,platform:l,elements:a}=t,{apply:r=()=>{},...c}=q(e,t),s=await fe(t,c),d=I(o),f=X(o),u=P(o)==="y",{width:g,height:m}=i.floating;let p,b;d==="top"||d==="bottom"?(p=d,b=f===(await(l.isRTL==null?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(b=d,p=f==="end"?"top":"bottom");const w=m-s.top-s.bottom,y=g-s.left-s.right,h=N(m-s[p],w),C=N(g-s[b],y),x=!t.middlewareData.shift;let E=h,v=C;if(u?v=f||x?N(C,y):y:E=f||x?N(h,w):w,x&&!f){const _=L(s.left,0),A=L(s.right,0),F=L(s.top,0),ne=L(s.bottom,0);u?v=g-2*(_!==0||A!==0?_+A:L(s.left,s.right)):E=m-2*(F!==0||ne!==0?F+ne:L(s.top,s.bottom))}await r({...t,availableWidth:v,availableHeight:E});const k=await l.getDimensions(a.floating);return g!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function H(e){return ue(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){var t;return(t=(ue(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ue(e){return e instanceof Node||e instanceof B(e).Node}function T(e){return e instanceof Element||e instanceof B(e).Element}function $(e){return e instanceof HTMLElement||e instanceof B(e).HTMLElement}function ke(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}function Y(e){const{overflow:t,overflowX:o,overflowY:i,display:l}=S(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&!["inline","contents"].includes(l)}function it(e){return["table","td","th"].includes(H(e))}function se(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function me(e){const t=he(),o=S(e);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(o.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(o.contain||"").includes(i))}function lt(e){let t=M(e);for(;$(t)&&!j(t);){if(se(t))return null;if(me(t))return t;t=M(t)}return null}function he(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function j(e){return["html","body","#document"].includes(H(e))}function S(e){return B(e).getComputedStyle(e)}function ce(e){return T(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function M(e){if(H(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ke(e)&&e.host||V(e);return ke(t)?t.host:t}function Le(e){const t=M(e);return j(t)?e.ownerDocument?e.ownerDocument.body:e.body:$(t)&&Y(t)?t:Le(t)}function J(e,t,o){var i;t===void 0&&(t=[]),o===void 0&&(o=!0);const l=Le(e),a=l===((i=e.ownerDocument)==null?void 0:i.body),r=B(l);return a?t.concat(r,r.visualViewport||[],Y(l)?l:[],r.frameElement&&o?J(r.frameElement):[]):t.concat(l,J(l,[],o))}function Be(e){const t=S(e);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const l=$(e),a=l?e.offsetWidth:o,r=l?e.offsetHeight:i,c=ie(o)!==a||ie(i)!==r;return c&&(o=a,i=r),{width:o,height:i,$:c}}function pe(e){return T(e)?e:e.contextElement}function K(e){const t=pe(e);if(!$(t))return R(1);const o=t.getBoundingClientRect(),{width:i,height:l,$:a}=Be(t);let r=(a?ie(o.width):o.width)/i,c=(a?ie(o.height):o.height)/l;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const at=R(0);function ve(e){const t=B(e);return!he()||!t.visualViewport?at:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rt(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==B(e)?!1:t}function W(e,t,o,i){t===void 0&&(t=!1),o===void 0&&(o=!1);const l=e.getBoundingClientRect(),a=pe(e);let r=R(1);t&&(i?T(i)&&(r=K(i)):r=K(e));const c=rt(a,o,i)?ve(a):R(0);let s=(l.left+c.x)/r.x,d=(l.top+c.y)/r.y,f=l.width/r.x,u=l.height/r.y;if(a){const g=B(a),m=i&&T(i)?B(i):i;let p=g,b=p.frameElement;for(;b&&i&&m!==p;){const w=K(b),y=b.getBoundingClientRect(),h=S(b),C=y.left+(b.clientLeft+parseFloat(h.paddingLeft))*w.x,x=y.top+(b.clientTop+parseFloat(h.paddingTop))*w.y;s*=w.x,d*=w.y,f*=w.x,u*=w.y,s+=C,d+=x,p=B(b),b=p.frameElement}}return re({width:f,height:u,x:s,y:d})}function st(e){let{elements:t,rect:o,offsetParent:i,strategy:l}=e;const a=l==="fixed",r=V(i),c=t?se(t.floating):!1;if(i===r||c&&a)return o;let s={scrollLeft:0,scrollTop:0},d=R(1);const f=R(0),u=$(i);if((u||!u&&!a)&&((H(i)!=="body"||Y(r))&&(s=ce(i)),$(i))){const g=W(i);d=K(i),f.x=g.x+i.clientLeft,f.y=g.y+i.clientTop}return{width:o.width*d.x,height:o.height*d.y,x:o.x*d.x-s.scrollLeft*d.x+f.x,y:o.y*d.y-s.scrollTop*d.y+f.y}}function ct(e){return Array.from(e.getClientRects())}function Se(e){return W(V(e)).left+ce(e).scrollLeft}function dt(e){const t=V(e),o=ce(e),i=e.ownerDocument.body,l=L(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=L(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-o.scrollLeft+Se(e);const c=-o.scrollTop;return S(i).direction==="rtl"&&(r+=L(t.clientWidth,i.clientWidth)-l),{width:l,height:a,x:r,y:c}}function ft(e,t){const o=B(e),i=V(e),l=o.visualViewport;let a=i.clientWidth,r=i.clientHeight,c=0,s=0;if(l){a=l.width,r=l.height;const d=he();(!d||d&&t==="fixed")&&(c=l.offsetLeft,s=l.offsetTop)}return{width:a,height:r,x:c,y:s}}function ut(e,t){const o=W(e,!0,t==="fixed"),i=o.top+e.clientTop,l=o.left+e.clientLeft,a=$(e)?K(e):R(1),r=e.clientWidth*a.x,c=e.clientHeight*a.y,s=l*a.x,d=i*a.y;return{width:r,height:c,x:s,y:d}}function Te(e,t,o){let i;if(t==="viewport")i=ft(e,o);else if(t==="document")i=dt(V(e));else if(T(t))i=ut(t,o);else{const l=ve(e);i={...t,x:t.x-l.x,y:t.y-l.y}}return re(i)}function $e(e,t){const o=M(e);return o===t||!T(o)||j(o)?!1:S(o).position==="fixed"||$e(o,t)}function mt(e,t){const o=t.get(e);if(o)return o;let i=J(e,[],!1).filter(c=>T(c)&&H(c)!=="body"),l=null;const a=S(e).position==="fixed";let r=a?M(e):e;for(;T(r)&&!j(r);){const c=S(r),s=me(r);!s&&c.position==="fixed"&&(l=null),(a?!s&&!l:!s&&c.position==="static"&&!!l&&["absolute","fixed"].includes(l.position)||Y(r)&&!s&&$e(e,r))?i=i.filter(f=>f!==r):l=c,r=M(r)}return t.set(e,i),i}function ht(e){let{element:t,boundary:o,rootBoundary:i,strategy:l}=e;const r=[...o==="clippingAncestors"?se(t)?[]:mt(t,this._c):[].concat(o),i],c=r[0],s=r.reduce((d,f)=>{const u=Te(t,f,l);return d.top=L(u.top,d.top),d.right=N(u.right,d.right),d.bottom=N(u.bottom,d.bottom),d.left=L(u.left,d.left),d},Te(t,c,l));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function pt(e){const{width:t,height:o}=Be(e);return{width:t,height:o}}function Ct(e,t,o){const i=$(t),l=V(t),a=o==="fixed",r=W(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const s=R(0);if(i||!i&&!a)if((H(t)!=="body"||Y(l))&&(c=ce(t)),i){const u=W(t,!0,a,t);s.x=u.x+t.clientLeft,s.y=u.y+t.clientTop}else l&&(s.x=Se(l));const d=r.left+c.scrollLeft-s.x,f=r.top+c.scrollTop-s.y;return{x:d,y:f,width:r.width,height:r.height}}function Ce(e){return S(e).position==="static"}function Ae(e,t){return!$(e)||S(e).position==="fixed"?null:t?t(e):e.offsetParent}function Ve(e,t){const o=B(e);if(se(e))return o;if(!$(e)){let l=M(e);for(;l&&!j(l);){if(T(l)&&!Ce(l))return l;l=M(l)}return o}let i=Ae(e,t);for(;i&&it(i)&&Ce(i);)i=Ae(i,t);return i&&j(i)&&Ce(i)&&!me(i)?o:i||lt(e)||o}const gt=async function(e){const t=this.getOffsetParent||Ve,o=this.getDimensions,i=await o(e.floating);return{reference:Ct(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function bt(e){return S(e).direction==="rtl"}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:st,getDocumentElement:V,getClippingRect:ht,getOffsetParent:Ve,getElementRects:gt,getClientRects:ct,getDimensions:pt,getScale:K,isElement:T,isRTL:bt};function yt(e,t){let o=null,i;const l=V(e);function a(){var c;clearTimeout(i),(c=o)==null||c.disconnect(),o=null}function r(c,s){c===void 0&&(c=!1),s===void 0&&(s=1),a();const{left:d,top:f,width:u,height:g}=e.getBoundingClientRect();if(c||t(),!u||!g)return;const m=le(f),p=le(l.clientWidth-(d+u)),b=le(l.clientHeight-(f+g)),w=le(d),h={rootMargin:-m+"px "+-p+"px "+-b+"px "+-w+"px",threshold:L(0,N(1,s))||1};let C=!0;function x(E){const v=E[0].intersectionRatio;if(v!==s){if(!C)return r();v?r(!1,v):i=setTimeout(()=>{r(!1,1e-7)},1e3)}C=!1}try{o=new IntersectionObserver(x,{...h,root:l.ownerDocument})}catch{o=new IntersectionObserver(x,h)}o.observe(e)}return r(!0),a}function xt(e,t,o,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:a=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:s=!1}=i,d=pe(e),f=l||a?[...d?J(d):[],...J(t)]:[];f.forEach(y=>{l&&y.addEventListener("scroll",o,{passive:!0}),a&&y.addEventListener("resize",o)});const u=d&&c?yt(d,o):null;let g=-1,m=null;r&&(m=new ResizeObserver(y=>{let[h]=y;h&&h.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),o()}),d&&!s&&m.observe(d),m.observe(t));let p,b=s?W(e):null;s&&w();function w(){const y=W(e);b&&(y.x!==b.x||y.y!==b.y||y.width!==b.width||y.height!==b.height)&&o(),b=y,p=requestAnimationFrame(w)}return o(),()=>{var y;f.forEach(h=>{l&&h.removeEventListener("scroll",o),a&&h.removeEventListener("resize",o)}),u==null||u(),(y=m)==null||y.disconnect(),m=null,s&&cancelAnimationFrame(p)}}const Et=tt,kt=nt,Lt=Qe,Bt=ot,vt=(e,t,o)=>{const i=new Map,l={platform:wt,...o},a={...l.platform,_c:i};return Je(e,t,{...l,platform:a})};function St(e){return e!=null&&typeof e=="object"&&"$el"in e}function _e(e){if(St(e)){const t=e.$el;return ue(t)&&H(t)==="#comment"?null:t}return e}function Q(e){return typeof e=="function"?e():n.unref(e)}function Ne(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Re(e,t){const o=Ne(e);return Math.round(t*o)/o}function Tt(e,t,o){o===void 0&&(o={});const i=o.whileElementsMounted,l=n.computed(()=>{var k;return(k=Q(o.open))!=null?k:!0}),a=n.computed(()=>Q(o.middleware)),r=n.computed(()=>{var k;return(k=Q(o.placement))!=null?k:"bottom"}),c=n.computed(()=>{var k;return(k=Q(o.strategy))!=null?k:"absolute"}),s=n.computed(()=>{var k;return(k=Q(o.transform))!=null?k:!0}),d=n.computed(()=>_e(e.value)),f=n.computed(()=>_e(t.value)),u=n.ref(0),g=n.ref(0),m=n.ref(c.value),p=n.ref(r.value),b=n.shallowRef({}),w=n.ref(!1),y=n.computed(()=>{const k={position:m.value,left:"0",top:"0"};if(!f.value)return k;const _=Re(f.value,u.value),A=Re(f.value,g.value);return s.value?{...k,transform:"translate("+_+"px, "+A+"px)",...Ne(f.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:_+"px",top:A+"px"}});let h;function C(){d.value==null||f.value==null||vt(d.value,f.value,{middleware:a.value,placement:r.value,strategy:c.value}).then(k=>{u.value=k.x,g.value=k.y,m.value=k.strategy,p.value=k.placement,b.value=k.middlewareData,w.value=!0})}function x(){typeof h=="function"&&(h(),h=void 0)}function E(){if(x(),i===void 0){C();return}if(d.value!=null&&f.value!=null){h=i(d.value,f.value,C);return}}function v(){l.value||(w.value=!1)}return n.watch([a,r,c],C,{flush:"sync"}),n.watch([d,f],E,{flush:"sync"}),n.watch(l,v,{flush:"sync"}),n.getCurrentScope()&&n.onScopeDispose(x),{x:n.shallowReadonly(u),y:n.shallowReadonly(g),strategy:n.shallowReadonly(m),placement:n.shallowReadonly(p),middlewareData:n.shallowReadonly(b),isPositioned:n.shallowReadonly(w),floatingStyles:y,update:C}}const $t="data:image/svg+xml,%3csvg%20width='1324'%20height='1326'%20viewBox='0%200%201324%201326'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='141'%20y='78'%20width='1042'%20height='1170'%20fill='white'/%3e%3cpath%20d='M184.533%201.99984C135.867%207.19984%2089.8666%2029.8665%2056.4%2065.1998C29.6%2093.4665%2012.5333%20126.266%203.73329%20166.4L0.666626%20180V663.333V1146.67L3.73329%201160.27C12.5333%201200.4%2029.6%201233.2%2056.4%201261.47C90.4%201297.33%20135.333%201319.33%20185.6%201324.67C203.333%201326.53%201122.53%201326.4%201139.73%201324.53C1188.53%201319.33%201229.07%201299.73%201264.13%201264.8C1294.27%201234.67%201311.47%201202.67%201320.8%201159.33C1323.2%201148.4%201323.33%201130%201323.33%20663.333C1323.33%20196.667%201323.2%20178.266%201320.8%20167.333C1311.47%20124%201294.27%2091.9998%201264.13%2061.8664C1229.07%2026.9331%201188.53%207.33314%201139.73%202.13314C1124.67%200.399809%20200%200.399842%20184.533%201.99984ZM732.933%20151.466C746.8%20152.933%20763.333%20157.6%20774%20163.067C800.267%20176.267%20822.4%20200.4%20833.2%20227.333C841.867%20249.333%20841.467%20233.467%20841.067%20502C840.533%20777.6%20841.733%20750.267%20829.2%20776.133C822.133%20790.933%20810.667%20806.533%20800.267%20815.2C795.2%20819.6%20793.2%20822.267%20792%20827.067C786.133%20848.267%20768.667%20885.867%20755.2%20906.133C724.533%20952%20681.2%20986.133%20624%201009.33C615.6%201012.8%20608.4%201015.87%20608.133%201016.13C607.867%201016.27%20614.533%201023.33%20622.933%201031.6C633.467%201042.13%20639.333%201049.07%20642.133%201054.4C646.933%201063.87%20645.467%201064%20672.667%201050.8C724.933%201025.47%20762.933%20994.8%20794.933%20952C811.467%20929.867%20829.867%20895.333%20839.333%20868.267C841.333%20862.667%20843.467%20858%20844.133%20858C844.667%20858%20845.6%20859.333%20846.133%20860.933C848.267%20868.133%20863.333%20900.8%20870.133%20913.2C898%20963.867%20931.6%201001.2%20975.333%201030.27C989.867%201040%201017.2%201054.4%201031.6%201059.73L1037.2%201061.87L1041.33%201054.67C1048.4%201042.4%201056.67%201032.27%201067.87%201022.4L1078.67%201012.8L1071.6%201010.27C1067.87%201008.8%201060.53%201006%201055.6%201004.13C1040.93%20998.533%201013.73%20984%201000%20974.267C985.733%20964.133%20960.8%20940.667%20948.933%20926.267C935.067%20909.333%20921.467%20887.467%20910%20864C900.133%20844%20887.2%20812.133%20884.667%20801.6L883.733%20798H971.867H1060V769.333V740.667H963.333H866.533L867.333%20736.267C868.4%20729.867%20870.4%20693.067%20871.467%20662.933C872.267%20639.067%20872.533%20636.4%20874.8%20635.2C878.667%20633.2%20881.333%20626.667%20882.267%20617.333L883.067%20608.667H872.133C864.133%20608.667%20861.067%20608.133%20860.533%20606.8C860%20605.467%20881.2%20466%20886.133%20438.267L886.933%20433.867L977.867%20434.4C1066.67%20434.8%201068.93%20434.8%201079.87%20437.733C1124.8%20449.6%201158.67%20482.533%201172.93%20528L1176.67%20540V808V1076L1172.93%201087.73C1158.53%201133.6%201126.13%201164.93%201078.93%201178.4L1068.67%201181.33L812.667%201181.73C638.8%201182%20552.667%201181.73%20544.4%201180.67C488.667%201174.4%20443.2%201132.13%20432.533%201076.93C431.067%201068.93%20430.667%201046.4%20430.667%20956.667V846.133L340.4%20845.6C252.8%20845.2%20249.6%20845.067%20239.067%20842.267C196.533%20831.067%20164.533%20800.133%20151.067%20757.333L147.333%20745.333V499.333V253.333L150.4%20242C159.067%20209.067%20180.4%20181.866%20210.667%20164.933C221.2%20159.066%20240.4%20152.933%20252.667%20151.6C268.533%20149.733%20716.933%20149.6%20732.933%20151.466Z'%20fill='%233B5695'/%3e%3cpath%20d='M256.533%20213.333C232.933%20218.533%20214.133%20237.067%20209.333%20259.733C208.4%20264.533%20208%20337.2%20208.267%20502L208.667%20737.333L211.733%20744.933C218.533%20761.733%20231.733%20774.533%20248.667%20780.933L256.667%20784L490%20784.4C749.2%20784.8%20734.4%20785.333%20750.133%20776C764.267%20767.6%20775.467%20752.4%20778.667%20737.067C779.6%20732.8%20780%20652.133%20779.733%20494L779.333%20257.333L775.067%20248.267C767.2%20231.6%20756.933%20222%20740.133%20215.467L731.333%20212L498%20211.733C306.8%20211.6%20263.2%20211.867%20256.533%20213.333ZM492%20281.2C546.267%20290.267%20590.267%20311.2%20622.533%20343.333C653.867%20374.667%20671.867%20409.867%20680.267%20456.667C684.133%20478.533%20684.133%20516.267%20680.133%20538.533C665.467%20621.067%20606.933%20684.4%20524%20707.467C490%20716.933%20488.4%20716.933%20392.4%20717.6L305.333%20718.133V498V277.867L391.733%20278.4C465.733%20278.8%20480%20279.2%20492%20281.2Z'%20fill='%233B5695'/%3e%3cpath%20d='M384%20462.933V576.133L345.067%20611.467C306.533%20646.267%20306.133%20646.667%20310.667%20647.067C313.2%20647.333%20348.933%20647.333%20390%20646.933C472.667%20646.267%20477.6%20645.867%20503.6%20637.333C527.6%20629.333%20543.333%20620%20560.267%20603.6C590.133%20574.667%20604.4%20536.267%20602.267%20489.733C600.533%20450.267%20588.267%20420%20564%20395.333C546.8%20377.867%20531.6%20368.4%20506.267%20360C482.933%20352.133%20474.533%20351.2%20427.067%20350.4L384%20349.733V462.933Z'%20fill='%233B5695'/%3e%3c/svg%3e",Z=(e,t)=>{const o=e.__vccOpts||e;for(const[i,l]of t)o[i]=l;return o},At={name:"Logo"},Vt={src:$t,alt:"DDict Logo",class:"w-6 h-6 cursor-pointer"};function _t(e,t,o,i,l,a){return n.openBlock(),n.createElementBlock("img",Vt)}const Nt=Z(At,[["render",_t]]),Rt={},It={class:"w-12 h-12 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Mt=[n.createStaticVNode('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>',3)];function Ft(e,t){return n.openBlock(),n.createElementBlock("svg",It,Mt)}const Ot=Z(Rt,[["render",Ft]]),Dt={class:"rounded-lg bg-base-100 px-4 py-2 border border-base-300 shadow-lg"},zt={class:"flex justify-center"},Pt={__name:"Loading",setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",Dt,[n.createElementVNode("div",zt,[n.createVNode(Ot)])]))}},Ht={name:"Phonetic",props:["phonetic"]},Wt={class:"p-0 m-0"},Zt={class:"text-xs font-md text-base-content/60"};function Ut(e,t,o,i,l,a){return n.openBlock(),n.createElementBlock("p",Wt,[n.createElementVNode("span",Zt,"/"+n.toDisplayString(o.phonetic)+"/",1)])}const jt=Z(Ht,[["render",Ut]]),Kt={class:"flex flex-col gap-2"},Gt={__name:"Sentences",props:{sentences:{type:String,default:""}},setup(e){const t=e,o=n.computed(()=>t.sentences.split(`
2
+ `));return(i,l)=>(n.openBlock(),n.createElementBlock("div",Kt,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,(a,r)=>(n.openBlock(),n.createElementBlock("p",{key:r,class:"text-base text-base-content leading-tight p-0 mr-2"},n.toDisplayString(a),1))),128))]))}},qt={class:"capitalize text-base italic font-normal text-base-content/60"},Xt={class:"text-base leading-6 text-base-content"},Yt={__name:"Dict",props:{dictionary:Array},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.dictionary,(i,l)=>(n.openBlock(),n.createElementBlock("div",{key:l,class:"mt-2"},[n.createElementVNode("p",qt,n.toDisplayString(i.pos),1),n.createElementVNode("span",Xt,n.toDisplayString(i.terms.join(", ")),1)]))),128))]))}},Jt={class:""},Qt=n.createElementVNode("p",{class:"capitalize text-base italic font-normal text-base-content/60 mt-2"},"AI Summary",-1),en={key:0,class:"list-none list-outside mt-2"},tn=["innerHTML"],nn={__name:"Explanation",props:{explanation:Object},setup(e){return(t,o)=>{var i,l;return n.openBlock(),n.createElementBlock("div",Jt,[Qt,(i=e.explanation)!=null&&i.result?(n.openBlock(),n.createElementBlock("ul",en,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(((l=e.explanation)==null?void 0:l.result.split(`
3
+ `))||[],(a,r)=>(n.openBlock(),n.createElementBlock("li",{key:`${a}-${r}`,innerHTML:a,class:"text-base text-base-content"},null,8,tn))),128))])):n.createCommentVNode("",!0)])}}},on=["disabled"],ln=[n.createElementVNode("path",{d:"M2.33325 4.66667H3.51125C3.82693 4.6667 4.13239 4.55473 4.37325 4.35067L6.83392 2.26667C6.99592 2.12953 7.19374 2.04156 7.40407 2.01312C7.61441 1.98468 7.82849 2.01696 8.02109 2.10615C8.21369 2.19534 8.37678 2.33772 8.49114 2.51652C8.60551 2.69532 8.66638 2.90309 8.66659 3.11534V12.8847C8.66649 13.097 8.60565 13.305 8.49125 13.4839C8.37685 13.6628 8.21367 13.8053 8.02094 13.8945C7.82822 13.9837 7.614 14.0159 7.40356 13.9874C7.19312 13.9588 6.99523 13.8707 6.83325 13.7333L4.37325 11.6487C4.13229 11.4449 3.82685 11.3331 3.51125 11.3333H2.33325C2.06804 11.3333 1.81368 11.228 1.62615 11.0404C1.43861 10.8529 1.33325 10.5986 1.33325 10.3333V5.66667C1.33325 5.40145 1.43861 5.1471 1.62615 4.95956C1.81368 4.77203 2.06804 4.66667 2.33325 4.66667ZM11.1779 11.18C11.5969 10.763 11.9294 10.2674 12.1562 9.72156C12.3831 9.17572 12.4999 8.59044 12.4999 7.99934C12.4999 7.40823 12.3831 6.82295 12.1562 6.27711C11.9294 5.73127 11.5969 5.23564 11.1779 4.81867C11.1317 4.77098 11.0765 4.73297 11.0155 4.70686C10.9544 4.68075 10.8888 4.66705 10.8224 4.66657C10.756 4.66609 10.6902 4.67883 10.6288 4.70406C10.5674 4.72929 10.5116 4.76649 10.4647 4.8135C10.4179 4.86051 10.3808 4.91639 10.3558 4.97787C10.3307 5.03935 10.3181 5.10521 10.3188 5.17159C10.3195 5.23798 10.3334 5.30357 10.3597 5.36453C10.3859 5.42549 10.4241 5.48061 10.4719 5.52667C10.7977 5.85079 11.0562 6.23609 11.2326 6.66043C11.409 7.08477 11.4998 7.53979 11.4998 7.99934C11.4998 8.45888 11.409 8.9139 11.2326 9.33824C11.0562 9.76258 10.7977 10.1479 10.4719 10.472C10.4241 10.5181 10.3859 10.5732 10.3597 10.6341C10.3334 10.6951 10.3195 10.7607 10.3188 10.8271C10.3181 10.8935 10.3307 10.9593 10.3558 11.0208C10.3808 11.0823 10.4179 11.1382 10.4647 11.1852C10.5116 11.2322 10.5674 11.2694 10.6288 11.2946C10.6902 11.3198 10.756 11.3326 10.8224 11.3321C10.8888 11.3316 10.9544 11.3179 11.0155 11.2918C11.0765 11.2657 11.1317 11.2277 11.1779 11.18ZM12.7113 13.2127C12.6123 13.2126 12.5157 13.1832 12.4335 13.1281C12.3513 13.0731 12.2873 12.9949 12.2495 12.9035C12.2118 12.8121 12.202 12.7115 12.2214 12.6146C12.2408 12.5176 12.2886 12.4285 12.3586 12.3587C12.9317 11.7866 13.3865 11.1071 13.6967 10.359C14.0069 9.61101 14.1666 8.80915 14.1666 7.99934C14.1666 7.18952 14.0069 6.38766 13.6967 5.63963C13.3865 4.8916 12.9317 4.2121 12.3586 3.64C12.3122 3.59351 12.2754 3.53834 12.2503 3.47764C12.2252 3.41693 12.2124 3.35188 12.2124 3.2862C12.2125 3.22052 12.2255 3.15549 12.2507 3.09483C12.2759 3.03417 12.3128 2.97907 12.3593 2.93267C12.4057 2.88627 12.4609 2.84948 12.5216 2.8244C12.5823 2.79932 12.6474 2.78645 12.7131 2.78651C12.7787 2.78657 12.8438 2.79957 12.9044 2.82476C12.9651 2.84995 13.0202 2.88685 13.0666 2.93334C13.7327 3.59825 14.2612 4.38801 14.6218 5.25741C14.9824 6.12681 15.168 7.05879 15.168 8C15.168 8.94122 14.9824 9.87319 14.6218 10.7426C14.2612 11.612 13.7327 12.4018 13.0666 13.0667C13.02 13.1134 12.9646 13.1504 12.9036 13.1756C12.8426 13.2007 12.7772 13.2129 12.7113 13.2127Z",fill:"currentColor"},null,-1)],an=["disabled"],rn=[n.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.5 7.5a3 3 0 0 1 3-3h9a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3h-9a3 3 0 0 1-3-3v-9Z","clip-rule":"evenodd",fill:"currentColor"},null,-1)],sn={__name:"Player",props:{tts:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["loadTTS"],setup(e,{emit:t}){const o=e,i=t,l=n.computed(()=>o.tts),a=n.ref(!1),r=new Audio,c=new(window.AudioContext||window.webkitAudioContext);let s=null;n.watch(l,()=>{if(!l.value){a.value=!1;return}f()},{immediate:!0}),n.onUnmounted(()=>{g(),r.src="",c.close()});function d(){if(l.value){f();return}a.value=!0,i("loadTTS")}async function f(){if(l.value){a.value=!0;try{r.src=l.value,r.playbackRate=.7,await r.play(),r.onended=()=>{a.value=!1}}catch{await u()}}}async function u(){try{const p=await(await fetch(l.value)).arrayBuffer(),b=await c.decodeAudioData(p);s=c.createBufferSource(),s.buffer=b,s.playbackRate.value=.7,s.connect(c.destination),s.start(),s.onended=()=>{a.value=!1,s=null}}catch{a.value=!1}}function g(){s&&(s.stop(),s.disconnect(),s=null),r.pause(),r.currentTime=0,a.value=!1}return(m,p)=>a.value?(n.openBlock(),n.createElementBlock("button",{key:1,class:n.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-transparent !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled,onClick:g},[(n.openBlock(),n.createElementBlock("svg",{class:n.normalizeClass(["w-4 h-4 text-primary",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},rn,2))],10,an)):(n.openBlock(),n.createElementBlock("button",{key:0,class:n.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-transparent !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled,onClick:d},[(n.openBlock(),n.createElementBlock("svg",{class:n.normalizeClass(["w-4 h-4 text-primary",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ln,2))],10,on))}},cn={class:"bg-base-100 tooltip tooltip-top before:!bottom-[100%] before:!bg-base-100 before:!border before:!border-solid before:!border-base-300 before:!shadow-lg before:!rounded-md before:!text-base-content after:!border-transparent","data-tip":"Favorite"},dn=["disabled"],fn=[n.createElementVNode("path",{d:"M14.9491 5.89315C14.8278 5.53128 14.5111 5.27252 14.1226 5.21783L10.5264 4.7114L8.91813 1.55315C8.74435 1.21195 8.39257 1 7.99998 1C7.60739 1 7.25557 1.21195 7.08183 1.55315L5.47358 4.7114L1.8774 5.21783C1.48888 5.27252 1.17219 5.53128 1.05086 5.89315C0.929554 6.25501 1.02881 6.64477 1.30993 6.91038L3.91217 9.36871L3.29786 12.8399C3.2315 13.215 3.38755 13.5868 3.7052 13.8105C3.88128 13.9344 4.08938 14 4.30704 14C4.47232 14 4.63705 13.9606 4.78341 13.886L7.99995 12.2471L11.2165 13.886C11.3628 13.9606 11.5276 14 11.6929 14C11.9106 14 12.1187 13.9345 12.2948 13.8105C12.6124 13.5868 12.7685 13.215 12.7021 12.84L12.0878 9.36871L14.6901 6.91035C14.9712 6.64477 15.0704 6.25498 14.9491 5.89315ZM14.0266 6.25082L11.2455 8.87813C11.1335 8.98392 11.0824 9.13637 11.1089 9.28575L11.7654 12.9956C11.7701 13.0226 11.759 13.0493 11.7362 13.0653C11.7202 13.0766 11.7038 13.079 11.6929 13.079C11.6809 13.079 11.6694 13.0762 11.6587 13.0708L8.22108 11.3192C8.15189 11.284 8.07593 11.2663 7.99998 11.2663C7.92402 11.2663 7.84807 11.284 7.77882 11.3193L4.34118 13.0708C4.33052 13.0763 4.31904 13.079 4.30701 13.079C4.29611 13.079 4.27969 13.0767 4.26373 13.0654C4.24092 13.0494 4.22975 13.0226 4.2345 12.9957L4.89104 9.28584C4.91747 9.13646 4.86637 8.98401 4.75439 8.87822L1.97327 6.25091C1.95308 6.23184 1.94595 6.20383 1.95466 6.17786C1.9634 6.15185 1.98612 6.13326 2.01405 6.12933L5.85743 5.58807C6.0122 5.56626 6.14599 5.47208 6.21521 5.33616L7.93404 1.9608C7.94653 1.9363 7.97178 1.92107 7.99998 1.92107C8.02818 1.92107 8.05343 1.9363 8.06591 1.9608L9.78468 5.33607C9.85391 5.47199 9.9877 5.5662 10.1425 5.58799L13.9859 6.12924C14.0138 6.1332 14.0365 6.15176 14.0452 6.17777C14.0539 6.20374 14.0468 6.23175 14.0266 6.25082Z",fill:"currentColor"},null,-1)],un=[n.createElementVNode("path",{d:"M7.47207 1.31905C7.57125 1.12371 7.77589 1 8.00001 1C8.22413 1 8.42877 1.12367 8.52795 1.31905L10.3721 4.95175L14.4959 5.53427C14.7177 5.5656 14.9019 5.7166 14.9712 5.9238C15.0404 6.13101 14.9827 6.35843 14.8222 6.51049L11.8382 9.33816L12.5427 13.3309C12.5806 13.5456 12.4897 13.7626 12.3084 13.8906C12.1272 14.0187 11.8868 14.0356 11.6884 13.9342L8.00004 12.0491L4.31158 13.9343C4.11323 14.0356 3.87286 14.0187 3.69157 13.8907C3.51028 13.7627 3.4195 13.5457 3.45736 13.3309L4.1618 9.33819L1.17781 6.51052C1.01735 6.35846 0.959571 6.13101 1.02884 5.92383C1.09807 5.71663 1.28232 5.56563 1.50409 5.53431L5.62787 4.95178L7.47207 1.31905Z",fill:"currentColor"},null,-1)],mn={__name:"Favorite",props:{isFilled:Boolean,disabled:Boolean},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",cn,[n.createElementVNode("button",{class:n.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-transparent !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled},[e.isFilled?(n.openBlock(),n.createElementBlock("svg",{key:1,class:n.normalizeClass(["w-4 h-4 text-primary",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},un,2)):(n.openBlock(),n.createElementBlock("svg",{key:0,class:n.normalizeClass(["w-4 h-4 text-primary",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},fn,2))],10,dn)]))}},hn={},pn={class:"w-6 h-6 text-primary",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Cn=[n.createStaticVNode('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>',3)];function gn(e,t){return n.openBlock(),n.createElementBlock("svg",pn,Cn)}const Ie=Z(hn,[["render",gn]]),bn={class:"bg-base-100 tooltip tooltip-top before:!bottom-[100%] before:!bg-base-100 before:!border before:!border-solid before:!border-base-300 before:!shadow-lg before:!rounded-md before:!text-base-content after:!border-transparent","data-tip":"AI Translate"},wn=["disabled"],yn=[n.createElementVNode("path",{d:"M6.8544 3.20309C5.39975 2.89815 4.26277 1.76117 3.95787 0.30649C3.92042 0.12792 3.76292 0 3.58041 0C3.3979 0 3.2404 0.12792 3.20297 0.30652C2.89805 1.76117 1.76107 2.89812 0.306418 3.20302C0.127818 3.24045 -0.00012207 3.39798 -0.00012207 3.58046C-0.00012207 3.76295 0.127798 3.92047 0.306418 3.9579C1.76105 4.26285 2.89798 5.3998 3.2029 6.85448C3.24033 7.03307 3.39783 7.16102 3.58034 7.16102C3.76282 7.16102 3.92035 7.0331 3.95778 6.85448C4.26272 5.39983 5.39973 4.26287 6.85438 3.95799C7.03297 3.92056 7.16092 3.76306 7.16092 3.58056C7.1609 3.39805 7.03297 3.24052 6.8544 3.20309ZM3.58036 5.60938C3.14292 4.73132 2.42956 4.01792 1.55151 3.58049C2.42958 3.14305 3.14297 2.42968 3.58041 1.55161C4.01785 2.4297 4.73122 3.14307 5.60926 3.58053C4.73119 4.01797 4.0178 4.73132 3.58036 5.60938Z",fill:"currentColor"},null,-1),n.createElementVNode("path",{d:"M6.21683 9.574C5.53147 9.4303 4.99578 8.8947 4.85209 8.2093C4.81466 8.0307 4.65716 7.90271 4.47465 7.90271C4.29217 7.90271 4.13464 8.0306 4.09721 8.2092C3.95352 8.8946 3.4178 9.4303 2.73244 9.574C2.55385 9.6114 2.4259 9.7689 2.4259 9.9514C2.4259 10.1339 2.55383 10.2914 2.73244 10.3288C3.41778 10.4725 3.95349 11.0082 4.09716 11.6936C4.13459 11.8722 4.2921 12.0002 4.4746 12.0002C4.65709 12.0002 4.81461 11.8723 4.85204 11.6936C4.99574 11.0082 5.53145 10.4725 6.21683 10.3289C6.39543 10.2914 6.52337 10.1339 6.52337 9.9514C6.52337 9.7689 6.39545 9.6114 6.21683 9.574ZM4.47463 10.6408C4.29163 10.3688 4.05725 10.1345 3.78526 9.9515C4.0573 9.7684 4.29163 9.5341 4.47463 9.2621C4.65765 9.5341 4.892 9.7685 5.164 9.9515C4.892 10.1345 4.65763 10.3688 4.47463 10.6408Z",fill:"currentColor"},null,-1),n.createElementVNode("path",{d:"M11.4271 6.00324C10.5007 5.80904 9.7766 5.08496 9.5825 4.15859C9.545 3.98 9.3875 3.85205 9.205 3.85205C9.0225 3.85205 8.865 3.97995 8.8276 4.15857C8.6334 5.08496 7.90932 5.80902 6.98293 6.0032C6.80434 6.04063 6.67639 6.19815 6.67639 6.38064C6.67639 6.56312 6.80431 6.72062 6.98293 6.75807C7.9093 6.95228 8.6334 7.67633 8.8275 8.6027C8.865 8.7813 9.0225 8.9093 9.205 8.9093C9.3875 8.9093 9.545 8.7814 9.5824 8.6027C9.7766 7.67633 10.5007 6.95228 11.4271 6.75812C11.6057 6.72067 11.7336 6.56317 11.7336 6.38068C11.7336 6.1982 11.6057 6.04067 11.4271 6.00324ZM9.205 7.47681C8.9365 7.02634 8.5593 6.64914 8.1089 6.38066C8.5593 6.11218 8.9365 5.73502 9.205 5.28453C9.4735 5.73502 9.8507 6.11221 10.3012 6.38068C9.8507 6.64916 9.4735 7.02636 9.205 7.47681Z",fill:"currentColor"},null,-1)],xn=[n.createStaticVNode('<path d="M6.8544 3.20309C5.39975 2.89815 4.26277 1.76117 3.95787 0.30649C3.92042 0.12792 3.76292 0 3.58041 0C3.3979 0 3.2404 0.12792 3.20297 0.30652C2.89805 1.76117 1.76107 2.89812 0.306418 3.20302C0.127818 3.24045 -0.00012207 3.39798 -0.00012207 3.58046C-0.00012207 3.76295 0.127798 3.92047 0.306418 3.9579C1.76105 4.26285 2.89798 5.3998 3.2029 6.85448C3.24033 7.03307 3.39783 7.16102 3.58034 7.16102C3.76282 7.16102 3.92035 7.0331 3.95778 6.85448C4.26272 5.39983 5.39973 4.26287 6.85438 3.95799C7.03297 3.92056 7.16092 3.76306 7.16092 3.58056C7.1609 3.39805 7.03297 3.24052 6.8544 3.20309ZM3.58036 5.60938C3.14292 4.73132 2.42956 4.01792 1.55151 3.58049C2.42958 3.14305 3.14297 2.42968 3.58041 1.55161C4.01785 2.4297 4.73122 3.14307 5.60926 3.58053C4.73119 4.01797 4.0178 4.73132 3.58036 5.60938Z" fill="currentColor"></path><path d="M6.21683 9.574C5.53147 9.4303 4.99578 8.8947 4.85209 8.2093C4.81466 8.0307 4.65716 7.90271 4.47465 7.90271C4.29217 7.90271 4.13464 8.0306 4.09721 8.2092C3.95352 8.8946 3.4178 9.4303 2.73244 9.574C2.55385 9.6114 2.4259 9.7689 2.4259 9.9514C2.4259 10.1339 2.55383 10.2914 2.73244 10.3288C3.41778 10.4725 3.95349 11.0082 4.09716 11.6936C4.13459 11.8722 4.2921 12.0002 4.4746 12.0002C4.65709 12.0002 4.81461 11.8723 4.85204 11.6936C4.99574 11.0082 5.53145 10.4725 6.21683 10.3289C6.39543 10.2914 6.52337 10.1339 6.52337 9.9514C6.52337 9.7689 6.39545 9.6114 6.21683 9.574ZM4.47463 10.6408C4.29163 10.3688 4.05725 10.1345 3.78526 9.9515C4.0573 9.7684 4.29163 9.5341 4.47463 9.2621C4.65765 9.5341 4.892 9.7685 5.164 9.9515C4.892 10.1345 4.65763 10.3688 4.47463 10.6408Z" fill="currentColor"></path><path d="M11.4271 6.00324C10.5007 5.80904 9.7766 5.08496 9.5825 4.15859C9.545 3.98 9.3875 3.85205 9.205 3.85205C9.0225 3.85205 8.865 3.97995 8.8276 4.15857C8.6334 5.08496 7.90932 5.80902 6.98293 6.0032C6.80434 6.04063 6.67639 6.19815 6.67639 6.38064C6.67639 6.56312 6.80431 6.72062 6.98293 6.75807C7.9093 6.95228 8.6334 7.67633 8.8275 8.6027C8.865 8.7813 9.0225 8.9093 9.205 8.9093C9.3875 8.9093 9.545 8.7814 9.5824 8.6027C9.7766 7.67633 10.5007 6.95228 11.4271 6.75812C11.6057 6.72067 11.7336 6.56317 11.7336 6.38068C11.7336 6.1982 11.6057 6.04067 11.4271 6.00324ZM9.205 7.47681C8.9365 7.02634 8.5593 6.64914 8.1089 6.38066C8.5593 6.11218 8.9365 5.73502 9.205 5.28453C9.4735 5.73502 9.8507 6.11221 10.3012 6.38068C9.8507 6.64916 9.4735 7.02636 9.205 7.47681Z" fill="currentColor"></path><circle cx="3.5" cy="3.5" r="1.5" fill="currentColor"></circle><ellipse cx="4.5" cy="10" rx="0.5" ry="1" fill="currentColor"></ellipse><circle cx="9" cy="6" r="1" fill="currentColor"></circle>',6)],En={__name:"AITranslateBtn",props:{isLoading:Boolean,disabled:Boolean,isFilled:Boolean},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",bn,[e.isLoading?(n.openBlock(),n.createBlock(Ie,{key:0,class:"inset-0 flex items-center justify-center"})):(n.openBlock(),n.createElementBlock("button",{key:1,class:n.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-transparent !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled},[e.isFilled?(n.openBlock(),n.createElementBlock("svg",{key:1,class:n.normalizeClass(["w-4 h-4 text-primary",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xn,2)):(n.openBlock(),n.createElementBlock("svg",{key:0,class:n.normalizeClass(["w-4 h-4 text-primary",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},yn,2))],10,wn))]))}},kn={class:"bg-base-100 tooltip tooltip-top before:!bottom-[100%] before:!bg-base-100 before:!border before:!border-solid before:!border-base-300 before:!shadow-lg before:!rounded-md before:!text-base-content after:!border-transparent","data-tip":"AI Summarize"},Ln=["disabled"],Bn=[n.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12h1m-3.5-6.5 1-1M12 3V2M5.5 5.5l-1-1M3 12H2m8 10h4m3-10a5 5 0 1 0-7 4.584V19h4v-2.416A5.001 5.001 0 0 0 17 12z"},null,-1)],vn=[n.createElementVNode("path",{fill:"currentColor",d:"M12 7a5 5 0 0 0-2 9.584V19h4v-2.416A5.001 5.001 0 0 0 12 7z"},null,-1),n.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12h1m-3.5-6.5 1-1M12 3V2M5.5 5.5l-1-1M3 12H2m8 10h4m3-10a5 5 0 1 0-7 4.584V19h4v-2.416A5.001 5.001 0 0 0 17 12z"},null,-1)],Sn={__name:"AIExplainBtn",props:{isLoading:Boolean,disabled:Boolean,isFilled:Boolean},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",kn,[e.isLoading?(n.openBlock(),n.createBlock(Ie,{key:0})):(n.openBlock(),n.createElementBlock("button",{key:1,class:n.normalizeClass(["btn btn-xs btn-circle",[{"btn-ghost":!e.disabled},{"!bg-transparent !border-none !shadow-none !ring-0":e.disabled}]]),disabled:e.disabled},[e.isFilled?(n.openBlock(),n.createElementBlock("svg",{key:1,class:n.normalizeClass(["w-4 h-4 text-primary",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vn,2)):(n.openBlock(),n.createElementBlock("svg",{key:0,class:n.normalizeClass(["w-4 h-4 text-primary",[{"opacity-100":!e.disabled},{"opacity-50 transform":e.disabled}]]),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Bn,2))],10,Ln))]))}},Tn={},$n={class:"btn btn-xs btn-ghost btn-circle"},An=[n.createElementVNode("svg",{class:"w-4 h-4 text-primary",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{d:"M9.12596 1.63869C9.46935 1.54364 9.83221 1.70329 9.99413 2.02068C10.3672 2.75191 11.1261 3.25 12 3.25C12.8739 3.25 13.6328 2.75191 14.0059 2.02068C14.1678 1.70329 14.5307 1.54364 14.874 1.63869C16.5585 2.10497 18.0759 2.9704 19.3184 4.12574C19.5611 4.35137 19.6269 4.70948 19.4804 5.00666C19.3331 5.30535 19.25 5.6419 19.25 6C19.25 7.24263 20.2574 8.25 21.5 8.25L21.5314 8.24977C21.8629 8.24504 22.1583 8.45859 22.2576 8.77495C22.5777 9.79397 22.75 10.8776 22.75 12C22.75 12.7408 22.6749 13.4649 22.5318 14.1648C22.4548 14.5411 22.1059 14.7985 21.7237 14.7609C21.6504 14.7537 21.5758 14.75 21.5 14.75C20.2574 14.75 19.25 15.7574 19.25 17C19.25 17.5531 19.4486 18.0579 19.7793 18.4498C20.027 18.7434 20.0128 19.1767 19.7465 19.4535C18.4777 20.7719 16.8745 21.7678 15.0721 22.3044C14.6807 22.4209 14.2681 22.2029 14.1437 21.814C13.8535 20.906 13.0024 20.25 12 20.25C10.9976 20.25 10.1465 20.906 9.85629 21.814C9.73195 22.2029 9.31927 22.4209 8.92789 22.3044C7.12545 21.7678 5.52229 20.7719 4.25353 19.4535C3.98716 19.1767 3.97299 18.7434 4.22072 18.4498C4.55139 18.0579 4.75 17.5531 4.75 17C4.75 15.7574 3.74264 14.75 2.5 14.75C2.42423 14.75 2.34963 14.7537 2.27634 14.7609C1.89406 14.7985 1.54519 14.5411 1.46821 14.1648C1.32505 13.4649 1.25 12.7408 1.25 12C1.25 10.8776 1.42227 9.79398 1.74236 8.77494C1.84173 8.45859 2.13705 8.24504 2.4686 8.24977L2.5 8.25C3.74264 8.25 4.75 7.24263 4.75 6C4.75 5.6419 4.66689 5.30535 4.51962 5.00666C4.3731 4.70948 4.43894 4.35137 4.68159 4.12574C5.92411 2.9704 7.44153 2.10497 9.12596 1.63869ZM6.08277 4.88991C6.19152 5.24123 6.25 5.61424 6.25 6C6.25 7.88945 4.85261 9.45253 3.03493 9.71213C2.84898 10.4432 2.75 11.2096 2.75 12C2.75 12.4294 2.77921 12.8516 2.83567 13.2648C4.74948 13.4346 6.25 15.0421 6.25 17C6.25 17.6669 6.0754 18.2941 5.76971 18.8372C6.62645 19.6184 7.63002 20.2404 8.73362 20.657C9.37706 19.5189 10.598 18.75 12 18.75C13.402 18.75 14.6229 19.5189 15.2664 20.657C16.37 20.2404 17.3735 19.6184 18.2303 18.8372C17.9246 18.2941 17.75 17.6669 17.75 17C17.75 15.0421 19.2505 13.4346 21.1643 13.2648C21.2208 12.8516 21.25 12.4294 21.25 12C21.25 11.2096 21.151 10.4432 20.9651 9.71213C19.1474 9.45252 17.75 7.88945 17.75 6C17.75 5.61424 17.8085 5.24123 17.9172 4.88991C17.0618 4.1771 16.0762 3.61614 15.0018 3.24775C14.3184 4.15897 13.2287 4.75 12 4.75C10.7713 4.75 9.68158 4.15897 8.99819 3.24775C7.92382 3.61614 6.93823 4.1771 6.08277 4.88991Z",fill:"currentColor"}),n.createElementVNode("path",{d:"M7.75 12C7.75 9.65278 9.65279 7.75 12 7.75C14.3472 7.75 16.25 9.65278 16.25 12C16.25 14.3472 14.3472 16.25 12 16.25C9.65279 16.25 7.75 14.3472 7.75 12ZM12 9.25C10.4812 9.25 9.25 10.4812 9.25 12C9.25 13.5188 10.4812 14.75 12 14.75C13.5188 14.75 14.75 13.5188 14.75 12C14.75 10.4812 13.5188 9.25 12 9.25Z",fill:"currentColor"})],-1)];function Vn(e,t){return n.openBlock(),n.createElementBlock("button",$n,An)}const _n=Z(Tn,[["render",Vn]]),Nn={},Rn={class:"btn btn-xs btn-circle btn-ghost"},In=[n.createElementVNode("svg",{class:"w-4 h-4 text-primary",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.19102 3.19102C3.44571 2.93633 3.85864 2.93633 4.11333 3.19102L12.809 11.8867C13.0637 12.1414 13.0637 12.5543 12.809 12.809C12.5543 13.0637 12.1414 13.0637 11.8867 12.809L3.19102 4.11333C2.93633 3.85864 2.93633 3.44571 3.19102 3.19102Z",fill:"currentColor"}),n.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.809 3.19102C13.0637 3.44571 13.0637 3.85864 12.809 4.11333L4.11333 12.809C3.85864 13.0637 3.44571 13.0637 3.19102 12.809C2.93633 12.5543 2.93633 12.1414 3.19102 11.8867L11.8867 3.19102C12.1414 2.93633 12.5543 2.93633 12.809 3.19102Z",fill:"currentColor"})],-1)];function Mn(e,t){return n.openBlock(),n.createElementBlock("button",Rn,In)}const Fn=Z(Nn,[["render",Mn]]),On={name:"ThemeSelector",props:{currentTheme:{type:String,default:"lofi"}},data(){return{availableThemes:[{value:"lofi",name:"Lo-Fi",color:"#0f0f23"},{value:"pastel",name:"Pastel",color:"#d1c1d7"},{value:"fantasy",name:"Fantasy",color:"#6e0b75"},{value:"autumn",name:"Autumn",color:"#8c0327"},{value:"retro",name:"Retro",color:"#ef9995"},{value:"synthwave",name:"Synthwave",color:"#e779c1"},{value:"halloween",name:"Halloween",color:"#f28c18"},{value:"dracula",name:"Dracula",color:"#ff79c6"},{value:"coffee",name:"Coffee",color:"#db924b"},{value:"dim",name:"Dim",color:"#9fe88d"},{value:"sunset",name:"Sunset",color:"#ff865b"},{value:"cyberpunk",name:"Cyberpunk",color:"#ff7598"}]}},methods:{handleThemeChange(e){this.$emit("themeChange",e)}}},Dn={class:"dropdown dropdown-end z-50"},zn=n.createElementVNode("div",{tabindex:"0",role:"button",class:"btn btn-ghost btn-circle btn-xs"},[n.createElementVNode("svg",{class:"w-4 h-4 text-primary",fill:"currentColor",viewBox:"0 0 20 20"},[n.createElementVNode("path",{d:"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"})])],-1),Pn={tabindex:"0",class:"dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52 max-h-96 overflow-y-auto z-50 border border-base-300"},Hn=["id","value","checked","onChange"],Wn=["for"],Zn={class:"flex items-center gap-2"};function Un(e,t,o,i,l,a){return n.openBlock(),n.createElementBlock("div",Dn,[zn,n.createElementVNode("ul",Pn,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(l.availableThemes,r=>(n.openBlock(),n.createElementBlock("li",{key:r.value},[n.createElementVNode("input",{type:"radio",id:`theme-${r.value}`,value:r.value,checked:o.currentTheme===r.value,onChange:c=>a.handleThemeChange(r.value),class:"theme-controller sr-only"},null,40,Hn),n.createElementVNode("label",{for:`theme-${r.value}`,class:n.normalizeClass(["cursor-pointer rounded-lg px-2 py-1 hover:bg-base-200",{"bg-primary text-primary-content":o.currentTheme===r.value}])},[n.createElementVNode("span",Zn,[n.createElementVNode("span",{class:"w-3 h-3 rounded-full",style:n.normalizeStyle({backgroundColor:r.color})},null,4),n.createTextVNode(" "+n.toDisplayString(r.name),1)])],10,Wn)]))),128))])])}const jn=Z(On,[["render",Un]]),Kn={class:"flex flex-col"},Gn={class:"flex p-2 pt-2 pb-1 flex-row justify-between"},qn={class:"flex justify-start items-center"},Xn={class:"flex items-center gap-1"},Yn=n.createElementVNode("div",{class:"w-5"},null,-1),Jn={class:"flex justify-end items-center"},Me={__name:"Header",props:{tts:String,isServiceUnavailable:Boolean,isFavorite:Boolean,isFavoriteFeatureEnabled:Boolean,isAITranslate:Boolean,isAIExplain:Boolean,isAITranslationLoading:Boolean,isAIExplainLoading:Boolean,isAIExplainVisible:Boolean,isAITranslateVisible:Boolean,theme:{type:String,default:"lofi"},showThemeSelector:{type:Boolean,default:!0}},emits:["favorite","setting","close","loadTTS","aiTranslate","aiExplain","themeChange"],setup(e,{emit:t}){const o=e,i=t;return(l,a)=>(n.openBlock(),n.createElementBlock("div",Kn,[n.createElementVNode("div",Gn,[n.createElementVNode("div",qn,[e.isServiceUnavailable?n.createCommentVNode("",!0):(n.openBlock(),n.createBlock(sn,{key:0,disabled:e.isAITranslationLoading||e.isAIExplainLoading,tts:o.tts,onLoadTTS:a[0]||(a[0]=r=>l.$emit("loadTTS"))},null,8,["disabled","tts"]))]),n.createElementVNode("div",Xn,[Yn,!e.isServiceUnavailable&&e.isAITranslateVisible?(n.openBlock(),n.createBlock(En,{key:0,isLoading:e.isAITranslationLoading,isFilled:e.isAITranslate,onClick:a[1]||(a[1]=r=>i("aiTranslate"))},null,8,["isLoading","isFilled"])):n.createCommentVNode("",!0),!e.isServiceUnavailable&&e.isAIExplainVisible?(n.openBlock(),n.createBlock(Sn,{key:1,isLoading:e.isAIExplainLoading,isFilled:e.isAIExplain,onClick:a[2]||(a[2]=r=>i("aiExplain"))},null,8,["isLoading","isFilled"])):n.createCommentVNode("",!0),!e.isServiceUnavailable&&o.isFavoriteFeatureEnabled?(n.openBlock(),n.createBlock(mn,{key:2,isFilled:o.isFavorite,onClick:a[3]||(a[3]=r=>i("favorite")),disabled:e.isAITranslationLoading||e.isAIExplainLoading},null,8,["isFilled","disabled"])):n.createCommentVNode("",!0)]),n.createElementVNode("div",Jn,[e.showThemeSelector?(n.openBlock(),n.createBlock(jn,{key:0,"current-theme":e.theme,onThemeChange:a[4]||(a[4]=r=>i("themeChange",r))},null,8,["current-theme"])):n.createCommentVNode("",!0),n.createVNode(_n,{onClick:a[5]||(a[5]=r=>i("setting"))}),n.createVNode(Fn,{onClick:a[6]||(a[6]=r=>i("close"))})])])]))}},ee={LOGO:"LOGO",LOADING:"LOADING",DATA:"DATA",ERROR:"ERROR",HIDDEN:"HIDDEN"},Fe=500,Qn=["ar","fa","iw","yi","ur","pa"],eo={key:0,class:"flex justify-center"},to={key:1,class:"flex justify-center"},no={class:n.normalizeClass(["bg-base-100 rounded-md relative z-10"])},oo={class:"p-3 border-t border-base-300"},io=Object.assign({name:"Bubble",props:["translation","explanation","tts","status","isFavorite","isFavoriteFeatureEnabled","isAITranslate","isAIExplain","aiExplainMinLength","theme","showThemeSelector"],emits:["logo","favorite","settings","close","loadTTS","aiTranslate","aiExplain","themeChange"],data(){return{data:null,isLongSentence:!1,isServiceUnavailable:!1,isAITranslationLoading:!1,isAIExplainLoading:!1}},methods:{handleAITranslate(){this.isAITranslationLoading=!0,this.$emit("aiTranslate")},handleAIExplain(){this.isAIExplainLoading=!0,this.$emit("aiExplain")}},watch:{translation:{handler(){var e,t,o,i;try{this.data=this.translation,this.isLongSentence=!((t=(e=this.data)==null?void 0:e.phonetic)!=null&&t.src||((i=(o=this.data)==null?void 0:o.dictionary)==null?void 0:i.length)>0),this.isServiceUnavailable=!1}catch{this.isServiceUnavailable=!0}finally{this.isAITranslationLoading=!1,this.isAIExplainLoading=!1}},immediate:!0},explanation:{handler(){this.isAIExplainLoading=!1},immediate:!0},status(){this.status===ee.ERROR&&(this.isServiceUnavailable=!0)}}},{setup(e){return(t,o)=>{var i,l,a,r,c,s,d,f,u,g,m;return e.status===n.unref(ee).LOGO?(n.openBlock(),n.createElementBlock("div",eo,[n.createVNode(Nt,{onClick:o[0]||(o[0]=p=>t.$emit("logo"))})])):e.status===n.unref(ee).LOADING?(n.openBlock(),n.createElementBlock("div",to,[n.createVNode(Pt)])):e.status!==n.unref(ee).HIDDEN?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(["wrapper rounded-lg text-base-content text-sm shadow-lg relative bg-[length:300%_300%] bg-[position:0%_50%]",{"p-0.5 bg-gradient-to-br from-primary via-secondary via-accent to-info animate-moveGradient":e.isAITranslate||e.isAIExplain,"p-0.5 bg-base-300":!e.isAITranslate&&!e.isAIExplain}])},[n.createElementVNode("div",no,[t.isServiceUnavailable?(n.openBlock(),n.createBlock(Me,{key:0,isServiceUnavailable:t.isServiceUnavailable,isLongSentence:!1,theme:e.theme,showThemeSelector:e.showThemeSelector,onFavorite:o[1]||(o[1]=p=>t.$emit("favorite")),onSetting:o[2]||(o[2]=p=>t.$emit("settings")),onClose:o[3]||(o[3]=p=>t.$emit("close")),onLoadTTS:o[4]||(o[4]=p=>t.$emit("loadTTS")),onThemeChange:o[5]||(o[5]=p=>t.$emit("themeChange",p))},null,8,["isServiceUnavailable","theme","showThemeSelector"])):(n.openBlock(),n.createBlock(Me,{key:1,tts:e.tts,isFavorite:e.isFavorite,isAITranslate:e.isAITranslate,isAITranslateVisible:((l=(i=t.data)==null?void 0:i.dictionary)==null?void 0:l.length)===0,isAIExplain:e.isAIExplain,isAIExplainVisible:((r=(a=t.data)==null?void 0:a.text)==null?void 0:r.length)>=e.aiExplainMinLength,isAITranslationLoading:t.isAITranslationLoading,isAIExplainLoading:t.isAIExplainLoading,isFavoriteFeatureEnabled:e.isFavoriteFeatureEnabled,isLongSentence:t.isLongSentence,theme:e.theme,showThemeSelector:e.showThemeSelector,onFavorite:o[6]||(o[6]=p=>t.$emit("favorite")),onSetting:o[7]||(o[7]=p=>t.$emit("settings")),onClose:o[8]||(o[8]=p=>t.$emit("close")),onLoadTTS:o[9]||(o[9]=p=>t.$emit("loadTTS")),onAiTranslate:t.handleAITranslate,onAiExplain:t.handleAIExplain,onThemeChange:o[10]||(o[10]=p=>t.$emit("themeChange",p))},null,8,["tts","isFavorite","isAITranslate","isAITranslateVisible","isAIExplain","isAIExplainVisible","isAITranslationLoading","isAIExplainLoading","isFavoriteFeatureEnabled","isLongSentence","theme","showThemeSelector","onAiTranslate","onAiExplain"])),n.createElementVNode("div",oo,[(s=(c=t.data)==null?void 0:c.phonetic)!=null&&s.src?(n.openBlock(),n.createBlock(jt,{key:0,phonetic:(f=(d=t.data)==null?void 0:d.phonetic)==null?void 0:f.src},null,8,["phonetic"])):n.createCommentVNode("",!0),n.createVNode(Gt,{sentences:t.isServiceUnavailable?"Service Unavailable":(u=t.data)==null?void 0:u.result},null,8,["sentences"])]),!t.isServiceUnavailable&&((m=(g=t.data)==null?void 0:g.dictionary)==null?void 0:m.length)>0?(n.openBlock(),n.createBlock(Yt,{key:2,class:"p-3 pt-0 border-t border-base-300",dictionary:t.data.dictionary},null,8,["dictionary"])):n.createCommentVNode("",!0),!t.isServiceUnavailable&&e.isAIExplain&&e.explanation?(n.openBlock(),n.createBlock(nn,{key:3,class:"p-3 pt-0 border-t border-base-300",explanation:e.explanation},null,8,["explanation"])):n.createCommentVNode("",!0)])],2)):n.createCommentVNode("",!0)}}});function lo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ge={exports:{}},Oe;function ao(){return Oe||(Oe=1,function(e){(function(){var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],o=typeof window<"u",i=o&&window.mozInnerScreenX!=null;function l(a,r,c){if(!o)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var s=c&&c.debug||!1;if(s){var d=document.querySelector("#input-textarea-caret-position-mirror-div");d&&d.parentNode.removeChild(d)}var f=document.createElement("div");f.id="input-textarea-caret-position-mirror-div",document.body.appendChild(f);var u=f.style,g=window.getComputedStyle?window.getComputedStyle(a):a.currentStyle,m=a.nodeName==="INPUT";u.whiteSpace="pre-wrap",m||(u.wordWrap="break-word"),u.position="absolute",s||(u.visibility="hidden"),t.forEach(function(w){m&&w==="lineHeight"?u.lineHeight=g.height:u[w]=g[w]}),i?a.scrollHeight>parseInt(g.height)&&(u.overflowY="scroll"):u.overflow="hidden",f.textContent=a.value.substring(0,r),m&&(f.textContent=f.textContent.replace(/\s/g," "));var p=document.createElement("span");p.textContent=a.value.substring(r)||".",f.appendChild(p);var b={top:p.offsetTop+parseInt(g.borderTopWidth),left:p.offsetLeft+parseInt(g.borderLeftWidth),height:parseInt(g.lineHeight)};return s?p.style.backgroundColor="#aaa":document.body.removeChild(f),b}e.exports=l})()}(ge)),ge.exports}var ro=ao();const De=lo(ro);function te(e){const t=window.getSelection();let o=t+"";if(o=o.trim(),e&&e.type==="password"||!o.length&&(!(e&&e.selectionEnd)||(o=e.value.substring(e.selectionStart,e.selectionEnd),o=o.trim(),!o.length)))return!1;let l=t.getRangeAt(0).getBoundingClientRect(),{top:a,bottom:r,left:c,width:s,height:d}=l;if(!r&&!c){if(!e.selectionEnd)return!1;let f=De(e,e.selectionStart),u=De(e,e.selectionEnd);l=e.getBoundingClientRect(),c=l.left+f.left,s=u.left-f.left,f.top!=u.top&&(c=l.left,s=l.width),a=l.top+f.top,r=l.top+u.top+20}return d===0&&(d=r-a),{text:o,x:c,y:a,top:a,bottom:r,left:c,right:c+s,width:s,height:d}}function so(){const e=document.getElementsByTagName("ddict-div");for(let t of e)if(!t.parentNode.matches('wrapper[dir="rtl"]')){const o=document.createElement("wrapper");o.setAttribute("dir","rtl"),t.parentNode.insertBefore(o,t),o.appendChild(t)}}function co(){const e=document.querySelectorAll('wrapper[dir="rtl"]');for(let t of e){const o=t.querySelector("ddict-div");o&&(t.parentNode.insertBefore(o,t),t.remove())}}const ze={supportRTL:so,removeRTL:co},fo={__name:"HotKeysListener",props:{textSelected:String},emits:["toggleKey","close"],setup(e,{emit:t}){const o=e,i=t,l=()=>{setTimeout(()=>{o.textSelected&&c("DoubleClick")},50)},a=s=>{(s.altKey&&s.key.toLowerCase()==="w"||s.key==="∑")&&o.textSelected&&(c("Alt+W"),s.preventDefault()),s.key==="Escape"&&(c("Escape"),s.preventDefault())},r=s=>{s.key==="Shift"&&o.textSelected&&c("Shift")},c=s=>{switch(s){case"DoubleClick":i("toggleKey","DoubleClick");break;case"Shift":i("toggleKey","Shift");break;case"Alt+W":i("toggleKey","Alt+W");break;case"Escape":i("close");break}};return n.onMounted(()=>{window.addEventListener("dblclick",l),window.addEventListener("keydown",a),window.addEventListener("keyup",r)}),n.onUnmounted(()=>{window.removeEventListener("dblclick",l),window.removeEventListener("keydown",a),window.removeEventListener("keyup",r)}),(s,d)=>(n.openBlock(),n.createElementBlock("div"))}},uo=["data-theme"],mo={__name:"BubbleWrapper",props:{translation:Object,explanation:Object,isFavoriteFeatureEnabled:Boolean,isAITranslate:Boolean,isAIExplain:Boolean,isFavorite:Boolean,tts:String,status:String,scale:{type:Number,default:1},aiExplainMinLength:{type:Number,default:0},theme:{type:String,default:"lofi"},showThemeSelector:{type:Boolean,default:!0}},emits:["toggleKey","logo","favorite","settings","close","loadTTS","aiTranslate","aiExplain","themeChange"],setup(e,{emit:t}){const o=e,i=t,l=n.ref(null),a=n.ref(null),r=n.ref(!1),c=n.ref(""),s=n.ref(o.theme),d=n.computed(()=>typeof window>"u"||!a.value||!c.value?null:{getBoundingClientRect:()=>te(a.value),getClientRects:()=>te(a.value)}),{floatingStyles:f,update:u}=Tt(d,l,{placement:"bottom",middleware:[Et(4),Lt(),kt(),Bt({apply({rects:h,elements:C}){let x=h.reference.width>250?h.reference.width/o.scale:250;x>Fe&&(x=Fe),Object.assign(C.floating.style,{maxWidth:x+"px",zIndex:9999})}})],whileElementsMounted(h,C,x){return xt(h,C,x,{ancestorScroll:!0})}}),g=n.computed(()=>{const h=f.value;if(o.scale===1)return h;const C=h.transform||"";return{...h,transform:`${C} scale(${o.scale})`}});n.onMounted(()=>{document.addEventListener("keyup",h=>{if(!te(h.target)){c.value="",b();return}}),document.documentElement.onclick=h=>{const C=te(h.target);if(!C){c.value="",b();return}m(C,h)},document.documentElement.ontouchend=h=>{const C=te(h.target);if(!C){c.value="",b();return}m(C,h)}}),n.onUnmounted(()=>{document.documentElement.onclick=null,document.documentElement.ontouchend=null});const m=(h,C)=>{o.status!==ee.LOGO&&i("close"),a.value=C.target,c.value=h.text,r.value=!0,n.nextTick(u)},p=h=>{h.stopPropagation()},b=async()=>{r.value=!1,i("close")},w=h=>{s.value=h,i("themeChange",h)},y=()=>{var C;const h=(C=o==null?void 0:o.translation)==null?void 0:C.target;Qn.includes(h)?ze.supportRTL():ze.removeRTL()};return n.watch(()=>o.status,()=>{r.value&&n.nextTick(u),y()}),n.watch(()=>o.theme,h=>{s.value=h}),(h,C)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[r.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"floatingEl",ref:l,class:"rounded-lg",style:n.normalizeStyle(g.value),"data-theme":s.value,onClick:p},[n.createVNode(io,{translation:o.translation,explanation:o.explanation,tts:o.tts,status:o.status,isFavorite:o.isFavorite,isFavoriteFeatureEnabled:o.isFavoriteFeatureEnabled,isAITranslate:o.isAITranslate,isAIExplain:o.isAIExplain,aiExplainMinLength:o.aiExplainMinLength,theme:s.value,showThemeSelector:o.showThemeSelector,onLogo:C[0]||(C[0]=x=>i("logo")),onFavorite:C[1]||(C[1]=x=>i("favorite")),onSettings:C[2]||(C[2]=x=>i("settings")),onClose:b,onLoadTTS:C[3]||(C[3]=x=>i("loadTTS")),onAiTranslate:C[4]||(C[4]=x=>i("aiTranslate")),onAiExplain:C[5]||(C[5]=x=>i("aiExplain")),onThemeChange:w},null,8,["translation","explanation","tts","status","isFavorite","isFavoriteFeatureEnabled","isAITranslate","isAIExplain","aiExplainMinLength","theme","showThemeSelector"])],12,uo)):n.createCommentVNode("",!0),n.createVNode(fo,{textSelected:c.value,onToggleKey:C[6]||(C[6]=x=>i("toggleKey",x)),onClose:b},null,8,["textSelected"])],64))}};z.default=mo,Object.defineProperties(z,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddict/bubble",
3
- "version": "1.2.10",
3
+ "version": "1.3.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -40,8 +40,8 @@
40
40
  "prettier": "^3.3.3",
41
41
  "start-server-and-test": "^2.0.4",
42
42
  "tailwindcss": "^3.4.4",
43
- "vite": "^5.3.3",
44
- "vite-plugin-static-copy": "^1.0.6"
43
+ "vite": "^6.3.5",
44
+ "vite-plugin-static-copy": "^3.1.0"
45
45
  },
46
46
  "optionalDependencies": {
47
47
  "@rollup/rollup-darwin-arm64": "^4.18.1",
@@ -1,3 +0,0 @@
1
- <svg width="14" height="9" viewBox="0 0 14 9" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M5.36153 1.34067C6.15774 0.203232 7.84226 0.203229 8.63846 1.34066L14 9H0L5.36153 1.34067Z" fill="white" stroke-width="0.5"/>
3
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle></svg>
@@ -1,3 +0,0 @@
1
- <svg class="swap-on fill-current h-4 w-4" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2
- <path fill-rule="evenodd" d="M4.5 7.5a3 3 0 0 1 3-3h9a3 3 0 0 1 3 3v9a3 3 0 0 1-3 3h-9a3 3 0 0 1-3-3v-9Z" clip-rule="evenodd" fill="#8595BE"/>
3
- </svg>
@@ -1,3 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M2.33325 4.66667H3.51125C3.82693 4.6667 4.13239 4.55473 4.37325 4.35067L6.83392 2.26667C6.99592 2.12953 7.19374 2.04156 7.40407 2.01312C7.61441 1.98468 7.82849 2.01696 8.02109 2.10615C8.21369 2.19534 8.37678 2.33772 8.49114 2.51652C8.60551 2.69532 8.66638 2.90309 8.66659 3.11534V12.8847C8.66649 13.097 8.60565 13.305 8.49125 13.4839C8.37685 13.6628 8.21367 13.8053 8.02094 13.8945C7.82822 13.9837 7.614 14.0159 7.40356 13.9874C7.19312 13.9588 6.99523 13.8707 6.83325 13.7333L4.37325 11.6487C4.13229 11.4449 3.82685 11.3331 3.51125 11.3333H2.33325C2.06804 11.3333 1.81368 11.228 1.62615 11.0404C1.43861 10.8529 1.33325 10.5986 1.33325 10.3333V5.66667C1.33325 5.40145 1.43861 5.1471 1.62615 4.95956C1.81368 4.77203 2.06804 4.66667 2.33325 4.66667ZM11.1779 11.18C11.5969 10.763 11.9294 10.2674 12.1562 9.72156C12.3831 9.17572 12.4999 8.59044 12.4999 7.99934C12.4999 7.40823 12.3831 6.82295 12.1562 6.27711C11.9294 5.73127 11.5969 5.23564 11.1779 4.81867C11.1317 4.77098 11.0765 4.73297 11.0155 4.70686C10.9544 4.68075 10.8888 4.66705 10.8224 4.66657C10.756 4.66609 10.6902 4.67883 10.6288 4.70406C10.5674 4.72929 10.5116 4.76649 10.4647 4.8135C10.4179 4.86051 10.3808 4.91639 10.3558 4.97787C10.3307 5.03935 10.3181 5.10521 10.3188 5.17159C10.3195 5.23798 10.3334 5.30357 10.3597 5.36453C10.3859 5.42549 10.4241 5.48061 10.4719 5.52667C10.7977 5.85079 11.0562 6.23609 11.2326 6.66043C11.409 7.08477 11.4998 7.53979 11.4998 7.99934C11.4998 8.45888 11.409 8.9139 11.2326 9.33824C11.0562 9.76258 10.7977 10.1479 10.4719 10.472C10.4241 10.5181 10.3859 10.5732 10.3597 10.6341C10.3334 10.6951 10.3195 10.7607 10.3188 10.8271C10.3181 10.8935 10.3307 10.9593 10.3558 11.0208C10.3808 11.0823 10.4179 11.1382 10.4647 11.1852C10.5116 11.2322 10.5674 11.2694 10.6288 11.2946C10.6902 11.3198 10.756 11.3326 10.8224 11.3321C10.8888 11.3316 10.9544 11.3179 11.0155 11.2918C11.0765 11.2657 11.1317 11.2277 11.1779 11.18ZM12.7113 13.2127C12.6123 13.2126 12.5157 13.1832 12.4335 13.1281C12.3513 13.0731 12.2873 12.9949 12.2495 12.9035C12.2118 12.8121 12.202 12.7115 12.2214 12.6146C12.2408 12.5176 12.2886 12.4285 12.3586 12.3587C12.9317 11.7866 13.3865 11.1071 13.6967 10.359C14.0069 9.61101 14.1666 8.80915 14.1666 7.99934C14.1666 7.18952 14.0069 6.38766 13.6967 5.63963C13.3865 4.8916 12.9317 4.2121 12.3586 3.64C12.3122 3.59351 12.2754 3.53834 12.2503 3.47764C12.2252 3.41693 12.2124 3.35188 12.2124 3.2862C12.2125 3.22052 12.2255 3.15549 12.2507 3.09483C12.2759 3.03417 12.3128 2.97907 12.3593 2.93267C12.4057 2.88627 12.4609 2.84948 12.5216 2.8244C12.5823 2.79932 12.6474 2.78645 12.7131 2.78651C12.7787 2.78657 12.8438 2.79957 12.9044 2.82476C12.9651 2.84995 13.0202 2.88685 13.0666 2.93334C13.7327 3.59825 14.2612 4.38801 14.6218 5.25741C14.9824 6.12681 15.168 7.05879 15.168 8C15.168 8.94122 14.9824 9.87319 14.6218 10.7426C14.2612 11.612 13.7327 12.4018 13.0666 13.0667C13.02 13.1134 12.9646 13.1504 12.9036 13.1756C12.8426 13.2007 12.7772 13.2129 12.7113 13.2127Z" fill="#3B5695"/>
3
- </svg>
Binary file