@vonage/vivid 5.8.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/affix.js +1 -1
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/data-grid.options.cjs +1 -0
- package/bundled/data-grid.options.js +29 -0
- package/bundled/definition10.js +4 -4
- package/bundled/definition2.cjs +1 -1
- package/bundled/definition2.js +1 -1
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition7.js +3 -3
- package/bundled/definition9.cjs +9 -9
- package/bundled/definition9.js +113 -1342
- package/bundled/floating-ui.dom.cjs +1 -0
- package/bundled/floating-ui.dom.js +1242 -0
- package/bundled/host-semantics.js +4 -4
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +21 -16
- package/bundled/mixins.cjs +2 -2
- package/bundled/mixins.js +6 -6
- package/bundled/slottable-request.cjs +4 -0
- package/bundled/slottable-request.js +2907 -0
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +89 -69
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +10 -10
- package/card/index.js +42 -42
- package/combobox/definition.cjs +14 -15
- package/combobox/definition.js +15 -16
- package/combobox/index.cjs +4 -4
- package/combobox/index.js +82 -87
- package/country/definition.cjs +340 -0
- package/country/definition.js +334 -0
- package/country/index.cjs +12 -0
- package/country/index.js +317 -0
- package/custom-elements.json +4835 -613
- package/data-grid/definition.cjs +23 -49
- package/data-grid/definition.js +1 -27
- package/data-grid/index.cjs +27 -27
- package/data-grid/index.js +44 -64
- package/file-picker/definition.cjs +10 -8
- package/file-picker/definition.js +10 -8
- package/file-picker/index.cjs +5 -5
- package/file-picker/index.js +12 -12
- package/icon/definition.cjs +1 -1
- package/icon/definition.js +1 -1
- package/index.cjs +38 -4
- package/index.js +7 -2
- package/lib/components.d.ts +6 -1
- package/lib/country/countries-data.d.ts +6 -0
- package/lib/country/country-code-to-flag-icon.d.ts +5 -0
- package/lib/country/country.d.ts +5 -0
- package/lib/country/country.template.d.ts +3 -0
- package/lib/country/definition.d.ts +3 -0
- package/lib/popover/definition.d.ts +4 -0
- package/lib/popover/locale.d.ts +3 -0
- package/lib/popover/popover.d.ts +781 -0
- package/lib/popover/popover.template.d.ts +3 -0
- package/lib/rich-text-editor/locale.d.ts +2 -0
- package/lib/rich-text-editor/popover.d.ts +1 -0
- package/lib/rich-text-editor/rte/config.d.ts +5 -1
- package/lib/rich-text-editor/rte/document.d.ts +2 -0
- package/lib/rich-text-editor/rte/exports.d.ts +5 -0
- package/lib/rich-text-editor/rte/feature.d.ts +7 -1
- package/lib/rich-text-editor/rte/features/internal/basic-text-blocks.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/foreign-html.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/history.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/internal/input-rules.d.ts +15 -0
- package/lib/rich-text-editor/rte/instance.d.ts +4 -2
- package/lib/rich-text-editor/rte/utils/feature-state.d.ts +8 -0
- package/lib/rich-text-editor/rte/utils/text-before-cursor.d.ts +2 -0
- package/lib/rich-text-editor/rte/utils/ui.d.ts +2 -0
- package/lib/rich-text-editor/rte/view.d.ts +30 -0
- package/lib/rich-text-view/definition.d.ts +5 -0
- package/lib/rich-text-view/rich-text-view.d.ts +19 -0
- package/lib/rich-text-view/rich-text-view.template.d.ts +3 -0
- package/lib/selectable-box/selectable-box.d.ts +1 -0
- package/lib/status/definition.d.ts +4 -0
- package/lib/status/status.d.ts +388 -0
- package/lib/status/status.template.d.ts +3 -0
- package/lib/table/definition.d.ts +8 -0
- package/lib/table/table-body.d.ts +3 -0
- package/lib/table/table-body.template.d.ts +3 -0
- package/lib/table/table-cell.d.ts +381 -0
- package/lib/table/table-cell.template.d.ts +3 -0
- package/lib/table/table-head.d.ts +3 -0
- package/lib/table/table-head.template.d.ts +3 -0
- package/lib/table/table-header-cell.d.ts +381 -0
- package/lib/table/table-header-cell.template.d.ts +3 -0
- package/lib/table/table-row.d.ts +381 -0
- package/lib/table/table-row.template.d.ts +3 -0
- package/lib/table/table.d.ts +3 -0
- package/lib/table/table.template.d.ts +3 -0
- package/lib/tag/tag.d.ts +1 -1
- package/lib/tag-name-map.d.ts +11 -1
- package/locales/de-DE.cjs +6 -1
- package/locales/de-DE.js +6 -1
- package/locales/en-GB.cjs +6 -1
- package/locales/en-GB.js +6 -1
- package/locales/en-US.cjs +6 -1
- package/locales/en-US.js +6 -1
- package/locales/ja-JP.cjs +6 -1
- package/locales/ja-JP.js +6 -1
- package/locales/zh-CN.cjs +6 -1
- package/locales/zh-CN.js +6 -1
- package/package.json +10 -9
- package/popover/definition.cjs +363 -0
- package/popover/definition.js +357 -0
- package/popover/index.cjs +27 -0
- package/popover/index.js +263 -0
- package/rich-text-editor/definition.cjs +12125 -14657
- package/rich-text-editor/definition.js +8876 -11412
- package/rich-text-editor/index.cjs +20 -22
- package/rich-text-editor/index.js +5046 -7096
- package/rich-text-view/definition.cjs +171 -0
- package/rich-text-view/definition.js +165 -0
- package/rich-text-view/index.cjs +1 -0
- package/rich-text-view/index.js +103 -0
- package/selectable-box/definition.cjs +16 -5
- package/selectable-box/definition.js +16 -5
- package/selectable-box/index.cjs +11 -9
- package/selectable-box/index.js +86 -78
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/utils/slottable-request.d.ts +7 -0
- package/status/definition.cjs +76 -0
- package/status/definition.js +70 -0
- package/status/index.cjs +11 -0
- package/status/index.js +55 -0
- package/styles/core/all.css +2 -2
- package/styles/core/theme.css +2 -2
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/table/definition.cjs +168 -0
- package/table/definition.js +152 -0
- package/table/index.cjs +37 -0
- package/table/index.js +107 -0
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +24 -24
- package/tag/index.js +89 -89
- package/unbundled/_commonjsHelpers.cjs +26 -0
- package/unbundled/_commonjsHelpers.js +26 -1
- package/unbundled/data-grid.options.cjs +34 -0
- package/unbundled/data-grid.options.js +28 -0
- package/unbundled/definition.cjs +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/slottable-request.cjs +3702 -0
- package/unbundled/slottable-request.js +3684 -0
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +11 -1
- package/video-player/definition.js +12 -2
- package/video-player/index.cjs +30 -30
- package/video-player/index.js +705 -702
- package/vivid.api.json +1957 -143
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const Dt=["top","right","bottom","left"],vt=["start","end"],bt=Dt.reduce((t,e)=>t.concat(e,e+"-"+vt[0],e+"-"+vt[1]),[]),N=Math.min,L=Math.max,it=Math.round,ot=Math.floor,I=t=>({x:t,y:t}),Xt={left:"right",right:"left",bottom:"top",top:"bottom"},Yt={start:"end",end:"start"};function dt(t,e,n){return L(t,N(e,n))}function j(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function H(t){return t.split("-")[1]}function Ft(t){return t==="x"?"y":"x"}function ht(t){return t==="y"?"height":"width"}const jt=new Set(["top","bottom"]);function z(t){return jt.has(W(t))?"y":"x"}function gt(t){return Ft(z(t))}function Mt(t,e,n){n===void 0&&(n=!1);const o=H(t),i=gt(t),s=ht(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=rt(r)),[r,rt(r)]}function qt(t){const e=rt(t);return[st(t),e,st(e)]}function st(t){return t.replace(/start|end/g,e=>Yt[e])}const Rt=["left","right"],Ot=["right","left"],Ut=["top","bottom"],Kt=["bottom","top"];function Gt(t,e,n){switch(t){case"top":case"bottom":return n?e?Ot:Rt:e?Rt:Ot;case"left":case"right":return e?Ut:Kt;default:return[]}}function Jt(t,e,n,o){const i=H(t);let s=Gt(W(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(st)))),s}function rt(t){return t.replace(/left|right|bottom|top/g,e=>Xt[e])}function Qt(t){return{top:0,right:0,bottom:0,left:0,...t}}function pt(t){return typeof t!="number"?Qt(t):{top:t,right:t,bottom:t,left:t}}function J(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function At(t,e,n){let{reference:o,floating:i}=t;const s=z(e),r=gt(e),c=ht(r),a=W(e),f=s==="y",u=o.x+o.width/2-i.width/2,l=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let d;switch(a){case"top":d={x:u,y:o.y-i.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:l};break;case"left":d={x:o.x-i.width,y:l};break;default:d={x:o.x,y:o.y}}switch(H(e)){case"start":d[r]-=m*(n&&f?-1:1);break;case"end":d[r]+=m*(n&&f?-1:1);break}return d}const Zt=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e));let f=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:l}=At(f,o,a),m=o,d={},h=0;for(let g=0;g<c.length;g++){const{name:p,fn:w}=c[g],{x,y:v,data:R,reset:b}=await w({x:u,y:l,initialPlacement:o,placement:m,strategy:i,middlewareData:d,rects:f,platform:r,elements:{reference:t,floating:e}});u=x??u,l=v??l,d={...d,[p]:{...d[p],...R}},b&&h<=50&&(h++,typeof b=="object"&&(b.placement&&(m=b.placement),b.rects&&(f=b.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:u,y:l}=At(f,m,a)),g=-1)}return{x:u,y:l,placement:m,strategy:i,middlewareData:d}};async function Q(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:m=!1,padding:d=0}=j(e,t),h=pt(d),p=c[m?l==="floating"?"reference":"floating":l],w=J(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:u,strategy:a})),x=l==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),R=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},b=J(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:v,strategy:a}):x);return{top:(w.top-b.top+h.top)/R.y,bottom:(b.bottom-w.bottom+h.bottom)/R.y,left:(w.left-b.left+h.left)/R.x,right:(b.right-w.right+h.right)/R.x}}const te=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:a}=e,{element:f,padding:u=0}=j(t,e)||{};if(f==null)return{};const l=pt(u),m={x:n,y:o},d=gt(i),h=ht(d),g=await r.getDimensions(f),p=d==="y",w=p?"top":"left",x=p?"bottom":"right",v=p?"clientHeight":"clientWidth",R=s.reference[h]+s.reference[d]-m[d]-s.floating[h],b=m[d]-s.reference[d],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(f));let O=A?A[v]:0;(!O||!await(r.isElement==null?void 0:r.isElement(A)))&&(O=c.floating[v]||s.floating[h]);const B=R/2-b/2,P=O/2-g[h]/2-1,y=N(l[w],P),S=N(l[x],P),T=y,E=O-g[h]-S,C=O/2-g[h]/2+B,$=dt(T,C,E),k=!a.arrow&&H(i)!=null&&C!==$&&s.reference[h]/2-(C<T?y:S)-g[h]/2<0,D=k?C<T?C-T:C-E:0;return{[d]:m[d]+D,data:{[d]:$,centerOffset:C-$-D,...k&&{alignmentOffset:D}},reset:k}}});function ee(t,e,n){return(t?[...n.filter(i=>H(i)===t),...n.filter(i=>H(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?H(i)===t||(e?st(i)!==i:!1):!0)}const ne=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:s,middlewareData:r,placement:c,platform:a,elements:f}=e,{crossAxis:u=!1,alignment:l,allowedPlacements:m=bt,autoAlignment:d=!0,...h}=j(t,e),g=l!==void 0||m===bt?ee(l||null,d,m):m,p=await Q(e,h),w=((n=r.autoPlacement)==null?void 0:n.index)||0,x=g[w];if(x==null)return{};const v=Mt(x,s,await(a.isRTL==null?void 0:a.isRTL(f.floating)));if(c!==x)return{reset:{placement:g[0]}};const R=[p[W(x)],p[v[0]],p[v[1]]],b=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:R}],A=g[w+1];if(A)return{data:{index:w+1,overflows:b},reset:{placement:A}};const O=b.map(y=>{const S=H(y.placement);return[y.placement,S&&u?y.overflows.slice(0,2).reduce((T,E)=>T+E,0):y.overflows[0],y.overflows]}).sort((y,S)=>y[1]-S[1]),P=((i=O.filter(y=>y[2].slice(0,H(y[0])?2:3).every(S=>S<=0))[0])==null?void 0:i[0])||O[0][0];return P!==c?{data:{index:w+1,overflows:b},reset:{placement:P}}:{}}}},oe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:f}=e,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...p}=j(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=W(i),x=z(c),v=W(c)===c,R=await(a.isRTL==null?void 0:a.isRTL(f.floating)),b=m||(v||!g?[rt(c)]:qt(c)),A=h!=="none";!m&&A&&b.push(...Jt(c,g,h,R));const O=[c,...b],B=await Q(e,p),P=[];let y=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&P.push(B[w]),l){const C=Mt(i,r,R);P.push(B[C[0]],B[C[1]])}if(y=[...y,{placement:i,overflows:P}],!P.every(C=>C<=0)){var S,T;const C=(((S=s.flip)==null?void 0:S.index)||0)+1,$=O[C];if($&&(!(l==="alignment"?x!==z($):!1)||y.every(F=>z(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:C,overflows:y},reset:{placement:$}};let k=(T=y.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:T.placement;if(!k)switch(d){case"bestFit":{var E;const D=(E=y.filter(F=>{if(A){const q=z(F.placement);return q===x||q==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(q=>q>0).reduce((q,It)=>q+It,0)]).sort((F,q)=>F[1]-q[1])[0])==null?void 0:E[0];D&&(k=D);break}case"initialPlacement":k=c;break}if(i!==k)return{reset:{placement:k}}}return{}}}};function St(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ct(t){return Dt.some(e=>t[e]>=0)}const ie=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=j(t,e);switch(o){case"referenceHidden":{const s=await Q(e,{...i,elementContext:"reference"}),r=St(s,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ct(r)}}}case"escaped":{const s=await Q(e,{...i,altBoundary:!0}),r=St(s,n.floating);return{data:{escapedOffsets:r,escaped:Ct(r)}}}default:return{}}}}};function Bt(t){const e=N(...t.map(s=>s.left)),n=N(...t.map(s=>s.top)),o=L(...t.map(s=>s.right)),i=L(...t.map(s=>s.bottom));return{x:e,y:n,width:o-e,height:i-n}}function se(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let o=null;for(let i=0;i<e.length;i++){const s=e[i];!o||s.y-o.y>o.height/2?n.push([s]):n[n.length-1].push(s),o=s}return n.map(i=>J(Bt(i)))}const re=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:s,strategy:r}=e,{padding:c=2,x:a,y:f}=j(t,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(o.reference))||[]),l=se(u),m=J(Bt(u)),d=pt(c);function h(){if(l.length===2&&l[0].left>l[1].right&&a!=null&&f!=null)return l.find(p=>a>p.left-d.left&&a<p.right+d.right&&f>p.top-d.top&&f<p.bottom+d.bottom)||m;if(l.length>=2){if(z(n)==="y"){const y=l[0],S=l[l.length-1],T=W(n)==="top",E=y.top,C=S.bottom,$=T?y.left:S.left,k=T?y.right:S.right,D=k-$,F=C-E;return{top:E,bottom:C,left:$,right:k,width:D,height:F,x:$,y:E}}const p=W(n)==="left",w=L(...l.map(y=>y.right)),x=N(...l.map(y=>y.left)),v=l.filter(y=>p?y.left===x:y.right===w),R=v[0].top,b=v[v.length-1].bottom,A=x,O=w,B=O-A,P=b-R;return{top:R,bottom:b,left:A,right:O,width:B,height:P,x:A,y:R}}return m}const g=await s.getElementRects({reference:{getBoundingClientRect:h},floating:o.floating,strategy:r});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},ce=new Set(["left","top"]);async function le(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=W(n),c=H(n),a=z(n)==="y",f=ce.has(r)?-1:1,u=s&&a?-1:1,l=j(e,t);let{mainAxis:m,crossAxis:d,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof h=="number"&&(d=c==="end"?h*-1:h),a?{x:d*u,y:m*f}:{x:m*f,y:d*u}}const ae=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,a=await le(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},fe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...a}=j(t,e),f={x:n,y:o},u=await Q(e,a),l=z(W(i)),m=Ft(l);let d=f[m],h=f[l];if(s){const p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=d+u[p],v=d-u[w];d=dt(x,d,v)}if(r){const p=l==="y"?"top":"left",w=l==="y"?"bottom":"right",x=h+u[p],v=h-u[w];h=dt(x,h,v)}const g=c.fn({...e,[m]:d,[l]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:s,[l]:r}}}}}},ue=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:s,platform:r,elements:c}=e,{apply:a=()=>{},...f}=j(t,e),u=await Q(e,f),l=W(i),m=H(i),d=z(i)==="y",{width:h,height:g}=s.floating;let p,w;l==="top"||l==="bottom"?(p=l,w=m===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(w=l,p=m==="end"?"top":"bottom");const x=g-u.top-u.bottom,v=h-u.left-u.right,R=N(g-u[p],x),b=N(h-u[w],v),A=!e.middlewareData.shift;let O=R,B=b;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=v),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(O=x),A&&!m){const y=L(u.left,0),S=L(u.right,0),T=L(u.top,0),E=L(u.bottom,0);d?B=h-2*(y!==0||S!==0?y+S:L(u.left,u.right)):O=g-2*(T!==0||E!==0?T+E:L(u.top,u.bottom))}await a({...e,availableWidth:B,availableHeight:O});const P=await r.getDimensions(c.floating);return h!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function ct(){return typeof window<"u"}function tt(t){return kt(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function kt(t){return ct()?t instanceof Node||t instanceof M(t).Node:!1}function V(t){return ct()?t instanceof Element||t instanceof M(t).Element:!1}function X(t){return ct()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function Lt(t){return!ct()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}const de=new Set(["inline","contents"]);function nt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=_(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!de.has(i)}const me=new Set(["table","td","th"]);function he(t){return me.has(tt(t))}const ge=[":popover-open",":modal"];function lt(t){return ge.some(e=>{try{return t.matches(e)}catch{return!1}})}const pe=["transform","translate","scale","rotate","perspective"],we=["transform","translate","scale","rotate","perspective","filter"],xe=["paint","layout","strict","content"];function wt(t){const e=xt(),n=V(t)?_(t):t;return pe.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||we.some(o=>(n.willChange||"").includes(o))||xe.some(o=>(n.contain||"").includes(o))}function ye(t){let e=U(t);for(;X(e)&&!Z(e);){if(wt(e))return e;if(lt(e))return null;e=U(e)}return null}function xt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ve=new Set(["html","body","#document"]);function Z(t){return ve.has(tt(t))}function _(t){return M(t).getComputedStyle(t)}function at(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lt(t)&&t.host||Y(t);return Lt(e)?e.host:e}function Wt(t){const e=U(t);return Z(e)?t.ownerDocument?t.ownerDocument.body:t.body:X(e)&&nt(e)?e:Wt(e)}function et(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Wt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=M(i);if(s){const c=mt(r);return e.concat(r,r.visualViewport||[],nt(i)?i:[],c&&n?et(c):[])}return e.concat(i,et(i,[],n))}function mt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function $t(t){const e=_(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=X(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=it(n)!==s||it(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function yt(t){return V(t)?t:t.contextElement}function G(t){const e=yt(t);if(!X(e))return I(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=$t(e);let r=(s?it(n.width):n.width)/o,c=(s?it(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const be=I(0);function Ht(t){const e=M(t);return!xt()||!e.visualViewport?be:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Re(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==M(t)?!1:e}function K(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=yt(t);let r=I(1);e&&(o?V(o)&&(r=G(o)):r=G(t));const c=Re(s,n,o)?Ht(s):I(0);let a=(i.left+c.x)/r.x,f=(i.top+c.y)/r.y,u=i.width/r.x,l=i.height/r.y;if(s){const m=M(s),d=o&&V(o)?M(o):o;let h=m,g=mt(h);for(;g&&o&&d!==h;){const p=G(g),w=g.getBoundingClientRect(),x=_(g),v=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*p.x,R=w.top+(g.clientTop+parseFloat(x.paddingTop))*p.y;a*=p.x,f*=p.y,u*=p.x,l*=p.y,a+=v,f+=R,h=M(g),g=mt(h)}}return J({width:u,height:l,x:a,y:f})}function ft(t,e){const n=at(t).scrollLeft;return e?e.left+n:K(Y(t)).left+n}function Nt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-ft(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Oe(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=Y(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},f=I(1);const u=I(0),l=X(o);if((l||!l&&!s)&&((tt(o)!=="body"||nt(r))&&(a=at(o)),X(o))){const d=K(o);f=G(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const m=r&&!l&&!s?Nt(r,a):I(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+u.x+m.x,y:n.y*f.y-a.scrollTop*f.y+u.y+m.y}}function Ae(t){return Array.from(t.getClientRects())}function Se(t){const e=Y(t),n=at(t),o=t.ownerDocument.body,i=L(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=L(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ft(t);const c=-n.scrollTop;return _(o).direction==="rtl"&&(r+=L(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:c}}const Pt=25;function Ce(t,e){const n=M(t),o=Y(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,c=0,a=0;if(i){s=i.width,r=i.height;const u=xt();(!u||u&&e==="fixed")&&(c=i.offsetLeft,a=i.offsetTop)}const f=ft(o);if(f<=0){const u=o.ownerDocument,l=u.body,m=getComputedStyle(l),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-l.clientWidth-d);h<=Pt&&(s-=h)}else f<=Pt&&(s+=f);return{width:s,height:r,x:c,y:a}}const Le=new Set(["absolute","fixed"]);function Pe(t,e){const n=K(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=X(t)?G(t):I(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,f=o*s.y;return{width:r,height:c,x:a,y:f}}function Tt(t,e,n){let o;if(e==="viewport")o=Ce(t,n);else if(e==="document")o=Se(Y(t));else if(V(e))o=Pe(e,n);else{const i=Ht(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return J(o)}function Vt(t,e){const n=U(t);return n===e||!V(n)||Z(n)?!1:_(n).position==="fixed"||Vt(n,e)}function Te(t,e){const n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(c=>V(c)&&tt(c)!=="body"),i=null;const s=_(t).position==="fixed";let r=s?U(t):t;for(;V(r)&&!Z(r);){const c=_(r),a=wt(r);!a&&c.position==="fixed"&&(i=null),(s?!a&&!i:!a&&c.position==="static"&&!!i&&Le.has(i.position)||nt(r)&&!a&&Vt(t,r))?o=o.filter(u=>u!==r):i=c,r=U(r)}return e.set(t,o),o}function Ee(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?lt(e)?[]:Te(e,this._c):[].concat(n),o],c=r[0],a=r.reduce((f,u)=>{const l=Tt(e,u,i);return f.top=L(l.top,f.top),f.right=N(l.right,f.right),f.bottom=N(l.bottom,f.bottom),f.left=L(l.left,f.left),f},Tt(e,c,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function De(t){const{width:e,height:n}=$t(t);return{width:e,height:n}}function Fe(t,e,n){const o=X(e),i=Y(e),s=n==="fixed",r=K(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const a=I(0);function f(){a.x=ft(i)}if(o||!o&&!s)if((tt(e)!=="body"||nt(i))&&(c=at(e)),o){const d=K(e,!0,s,e);a.x=d.x+e.clientLeft,a.y=d.y+e.clientTop}else i&&f();s&&!o&&i&&f();const u=i&&!o&&!s?Nt(i,c):I(0),l=r.left+c.scrollLeft-a.x-u.x,m=r.top+c.scrollTop-a.y-u.y;return{x:l,y:m,width:r.width,height:r.height}}function ut(t){return _(t).position==="static"}function Et(t,e){if(!X(t)||_(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function _t(t,e){const n=M(t);if(lt(t))return n;if(!X(t)){let i=U(t);for(;i&&!Z(i);){if(V(i)&&!ut(i))return i;i=U(i)}return n}let o=Et(t,e);for(;o&&he(o)&&ut(o);)o=Et(o,e);return o&&Z(o)&&ut(o)&&!wt(o)?n:o||ye(t)||n}const Me=async function(t){const e=this.getOffsetParent||_t,n=this.getDimensions,o=await n(t.floating);return{reference:Fe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Be(t){return _(t).direction==="rtl"}const ke={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:Y,getClippingRect:Ee,getOffsetParent:_t,getElementRects:Me,getClientRects:Ae,getDimensions:De,getScale:G,isElement:V,isRTL:Be};function zt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function We(t,e){let n=null,o;const i=Y(t);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function r(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),s();const f=t.getBoundingClientRect(),{left:u,top:l,width:m,height:d}=f;if(c||e(),!m||!d)return;const h=ot(l),g=ot(i.clientWidth-(u+m)),p=ot(i.clientHeight-(l+d)),w=ot(u),v={rootMargin:-h+"px "+-g+"px "+-p+"px "+-w+"px",threshold:L(0,N(1,a))||1};let R=!0;function b(A){const O=A[0].intersectionRatio;if(O!==a){if(!R)return r();O?r(!1,O):o=setTimeout(()=>{r(!1,1e-7)},1e3)}O===1&&!zt(f,t.getBoundingClientRect())&&r(),R=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(t)}return r(!0),s}function $e(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,f=yt(t),u=i||s?[...f?et(f):[],...et(e)]:[];u.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const l=f&&c?We(f,n):null;let m=-1,d=null;r&&(d=new ResizeObserver(w=>{let[x]=w;x&&x.target===f&&d&&(d.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(e)})),n()}),f&&!a&&d.observe(f),d.observe(e));let h,g=a?K(t):null;a&&p();function p(){const w=K(t);g&&!zt(g,w)&&n(),g=w,h=requestAnimationFrame(p)}return n(),()=>{var w;u.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),l?.(),(w=d)==null||w.disconnect(),d=null,a&&cancelAnimationFrame(h)}}const He=ae,Ne=ne,Ve=fe,_e=oe,ze=ue,Ie=ie,Xe=te,Ye=re,je=(t,e,n)=>{const o=new Map,i={platform:ke,...n},s={...i.platform,_c:o};return Zt(t,e,{...i,platform:s})};exports.arrow=Xe;exports.autoPlacement=Ne;exports.autoUpdate=$e;exports.computePosition=je;exports.flip=_e;exports.hide=Ie;exports.inline=Ye;exports.offset=He;exports.shift=Ve;exports.size=ze;
|