@aquera/nile-elements 1.2.7-beta-1.0 → 1.2.7-beta-1.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.
- package/demo/index.html +253 -25
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +6 -6
- package/dist/nile-light-tooltip/index.cjs.js +1 -1
- package/dist/nile-light-tooltip/index.esm.js +1 -1
- package/dist/nile-light-tooltip/nile-light-tooltip.cjs.js +1 -1
- package/dist/nile-light-tooltip/nile-light-tooltip.cjs.js.map +1 -1
- package/dist/nile-light-tooltip/nile-light-tooltip.esm.js +1 -1
- package/dist/nile-light-tooltip/utils.cjs.js +2 -0
- package/dist/nile-light-tooltip/utils.cjs.js.map +1 -0
- package/dist/nile-light-tooltip/utils.esm.js +1 -0
- package/dist/src/nile-light-tooltip/nile-light-tooltip.d.ts +37 -16
- package/dist/src/nile-light-tooltip/nile-light-tooltip.js +221 -48
- package/dist/src/nile-light-tooltip/nile-light-tooltip.js.map +1 -1
- package/dist/src/nile-light-tooltip/utils.d.ts +2 -0
- package/dist/src/nile-light-tooltip/utils.js +29 -0
- package/dist/src/nile-light-tooltip/utils.js.map +1 -0
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-light-tooltip/nile-light-tooltip.ts +246 -56
- package/src/nile-light-tooltip/utils.ts +33 -0
- package/vscode-html-custom-data.json +106 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{property as n,customElement as e}from"lit/decorators.js";import{s as r}from"./nile-light-tooltip.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import"lit";var i="top",a="bottom",u="right",c="left",f=[i,a,u,c],p=f.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),d=[].concat(f,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),s=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function l(t){return t?(t.nodeName||"").toLowerCase():null}function v(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function m(t){return t instanceof v(t).Element||t instanceof Element}function b(t){return t instanceof v(t).HTMLElement||t instanceof HTMLElement}function h(t){return"undefined"!=typeof ShadowRoot&&(t instanceof v(t).ShadowRoot||t instanceof ShadowRoot)}var y={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},o=n.elements[t];b(o)&&l(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?o.removeAttribute(t):o.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});b(r)&&l(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]};function x(t){return t.split("-")[0]}var g=Math.max,w=Math.min,O=Math.round;function j(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function k(){return!/^((?!chrome|android).)*safari/i.test(j())}function T(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t.getBoundingClientRect(),o=1,i=1;n&&b(t)&&(o=t.offsetWidth>0&&O(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&O(r.height)/t.offsetHeight||1);var a=(m(t)?v(t):window).visualViewport,u=!k()&&e,c=(r.left+(u&&a?a.offsetLeft:0))/o,f=(r.top+(u&&a?a.offsetTop:0))/i,p=r.width/o,d=r.height/i;return{width:p,height:d,top:f,right:c+p,bottom:f+d,left:c,x:c,y:f}}function A(t){var n=T(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function S(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&h(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function M(t){return v(t).getComputedStyle(t)}function E(t){return["table","td","th"].indexOf(l(t))>=0}function B(t){return((m(t)?t.ownerDocument:t.document)||window.document).documentElement}function C(t){return"html"===l(t)?t:t.assignedSlot||t.parentNode||(h(t)?t.host:null)||B(t)}function R(t){return b(t)&&"fixed"!==M(t).position?t.offsetParent:null}function q(t){for(var n=v(t),e=R(t);e&&E(e)&&"static"===M(e).position;)e=R(e);return e&&("html"===l(e)||"body"===l(e)&&"static"===M(e).position)?n:e||function(t){var n=/firefox/i.test(j());if(/Trident/i.test(j())&&b(t)&&"fixed"===M(t).position)return null;var e=C(t);for(h(e)&&(e=e.host);b(e)&&["html","body"].indexOf(l(e))<0;){var r=M(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function U(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function H(t,n,e){return g(t,w(n,e))}function P(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function W(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}var L={name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,r=t.name,o=t.options,p=e.elements.arrow,d=e.modifiersData.popperOffsets,s=x(e.placement),l=U(s),v=[c,u].indexOf(s)>=0?"height":"width";if(p&&d){var m=function(t,n){return P("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:W(t,f))}(o.padding,e),b=A(p),h="y"===l?i:c,y="y"===l?a:u,g=e.rects.reference[v]+e.rects.reference[l]-d[l]-e.rects.popper[v],w=d[l]-e.rects.reference[l],O=q(p),j=O?"y"===l?O.clientHeight||0:O.clientWidth||0:0,k=g/2-w/2,T=m[h],S=j-b[v]-m[y],M=j/2-b[v]/2+k,E=H(T,M,S),B=l;e.modifiersData[r]=((n={})[B]=E,n.centerOffset=E-M,n)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&S(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function F(t){return t.split("-")[1]}var I={top:"auto",right:"auto",bottom:"auto",left:"auto"};function z(t){var n,e=t.popper,r=t.popperRect,o=t.placement,f=t.variation,p=t.offsets,d=t.position,s=t.gpuAcceleration,l=t.adaptive,m=t.roundOffsets,b=t.isFixed,h=p.x,y=void 0===h?0:h,x=p.y,g=void 0===x?0:x,w="function"==typeof m?m({x:y,y:g}):{x:y,y:g};y=w.x,g=w.y;var j=p.hasOwnProperty("x"),k=p.hasOwnProperty("y"),T=c,A=i,S=window;if(l){var E=q(e),C="clientHeight",R="clientWidth";if(E===v(e)&&"static"!==M(E=B(e)).position&&"absolute"===d&&(C="scrollHeight",R="scrollWidth"),o===i||(o===c||o===u)&&"end"===f)A=a,g-=(b&&E===S&&S.visualViewport?S.visualViewport.height:E[C])-r.height,g*=s?1:-1;if(o===c||(o===i||o===a)&&"end"===f)T=u,y-=(b&&E===S&&S.visualViewport?S.visualViewport.width:E[R])-r.width,y*=s?1:-1}var U,H=Object.assign({position:d},l&&I),P=!0===m?function(t,n){var e=t.x,r=t.y,o=n.devicePixelRatio||1;return{x:O(e*o)/o||0,y:O(r*o)/o||0}}({x:y,y:g},v(e)):{x:y,y:g};return y=P.x,g=P.y,s?Object.assign({},H,((U={})[A]=k?"0":"",U[T]=j?"0":"",U.transform=(S.devicePixelRatio||1)<=1?"translate("+y+"px, "+g+"px)":"translate3d("+y+"px, "+g+"px, 0)",U)):Object.assign({},H,((n={})[A]=k?g+"px":"",n[T]=j?y+"px":"",n.transform="",n))}var D={passive:!0};var N={left:"right",right:"left",bottom:"top",top:"bottom"};function V(t){return t.replace(/left|right|bottom|top/g,(function(t){return N[t]}))}var $={start:"end",end:"start"};function J(t){return t.replace(/start|end/g,(function(t){return $[t]}))}function _(t){var n=v(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function G(t){return T(B(t)).left+_(t).scrollLeft}function K(t){var n=M(t),e=n.overflow,r=n.overflowX,o=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+o+r)}function Q(t){return["html","body","#document"].indexOf(l(t))>=0?t.ownerDocument.body:b(t)&&K(t)?t:Q(C(t))}function X(t,n){var e;void 0===n&&(n=[]);var r=Q(t),o=r===(null==(e=t.ownerDocument)?void 0:e.body),i=v(r),a=o?[i].concat(i.visualViewport||[],K(r)?r:[]):r,u=n.concat(a);return o?u:u.concat(X(C(a)))}function Y(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Z(t,n,e){return"viewport"===n?Y(function(t,n){var e=v(t),r=B(t),o=e.visualViewport,i=r.clientWidth,a=r.clientHeight,u=0,c=0;if(o){i=o.width,a=o.height;var f=k();(f||!f&&"fixed"===n)&&(u=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:u+G(t),y:c}}(t,e)):m(n)?function(t,n){var e=T(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):Y(function(t){var n,e=B(t),r=_(t),o=null==(n=t.ownerDocument)?void 0:n.body,i=g(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=g(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+G(t),c=-r.scrollTop;return"rtl"===M(o||e).direction&&(u+=g(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:u,y:c}}(B(t)))}function tt(t,n,e,r){var o="clippingParents"===n?function(t){var n=X(C(t)),e=["absolute","fixed"].indexOf(M(t).position)>=0&&b(t)?q(t):t;return m(e)?n.filter((function(t){return m(t)&&S(t,e)&&"body"!==l(t)})):[]}(t):[].concat(n),i=[].concat(o,[e]),a=i[0],u=i.reduce((function(n,e){var o=Z(t,e,r);return n.top=g(o.top,n.top),n.right=w(o.right,n.right),n.bottom=w(o.bottom,n.bottom),n.left=g(o.left,n.left),n}),Z(t,a,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function nt(t){var n,e=t.reference,r=t.element,o=t.placement,f=o?x(o):null,p=o?F(o):null,d=e.x+e.width/2-r.width/2,s=e.y+e.height/2-r.height/2;switch(f){case i:n={x:d,y:e.y-r.height};break;case a:n={x:d,y:e.y+e.height};break;case u:n={x:e.x+e.width,y:s};break;case c:n={x:e.x-r.width,y:s};break;default:n={x:e.x,y:e.y}}var l=f?U(f):null;if(null!=l){var v="y"===l?"height":"width";switch(p){case"start":n[l]=n[l]-(e[v]/2-r[v]/2);break;case"end":n[l]=n[l]+(e[v]/2-r[v]/2)}}return n}function et(t,n){void 0===n&&(n={});var e=n,r=e.placement,o=void 0===r?t.placement:r,c=e.strategy,p=void 0===c?t.strategy:c,d=e.boundary,s=void 0===d?"clippingParents":d,l=e.rootBoundary,v=void 0===l?"viewport":l,b=e.elementContext,h=void 0===b?"popper":b,y=e.altBoundary,x=void 0!==y&&y,g=e.padding,w=void 0===g?0:g,O=P("number"!=typeof w?w:W(w,f)),j="popper"===h?"reference":"popper",k=t.rects.popper,A=t.elements[x?j:h],S=tt(m(A)?A:A.contextElement||B(t.elements.popper),s,v,p),M=T(t.elements.reference),E=nt({reference:M,element:k,strategy:"absolute",placement:o}),C=Y(Object.assign({},k,E)),R="popper"===h?C:M,q={top:S.top-R.top+O.top,bottom:R.bottom-S.bottom+O.bottom,left:S.left-R.left+O.left,right:R.right-S.right+O.right},U=t.modifiersData.offset;if("popper"===h&&U){var H=U[o];Object.keys(q).forEach((function(t){var n=[u,a].indexOf(t)>=0?1:-1,e=[i,a].indexOf(t)>=0?"y":"x";q[t]+=H[e]*n}))}return q}function rt(t,n){void 0===n&&(n={});var e=n,r=e.placement,o=e.boundary,i=e.rootBoundary,a=e.padding,u=e.flipVariations,c=e.allowedAutoPlacements,s=void 0===c?d:c,l=F(r),v=l?u?p:p.filter((function(t){return F(t)===l})):f,m=v.filter((function(t){return s.indexOf(t)>=0}));0===m.length&&(m=v);var b=m.reduce((function(n,e){return n[e]=et(t,{placement:e,boundary:o,rootBoundary:i,padding:a})[x(e)],n}),{});return Object.keys(b).sort((function(t,n){return b[t]-b[n]}))}var ot={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,r=t.name;if(!n.modifiersData[r]._skip){for(var o=e.mainAxis,f=void 0===o||o,p=e.altAxis,d=void 0===p||p,s=e.fallbackPlacements,l=e.padding,v=e.boundary,m=e.rootBoundary,b=e.altBoundary,h=e.flipVariations,y=void 0===h||h,g=e.allowedAutoPlacements,w=n.options.placement,O=x(w),j=s||(O===w||!y?[V(w)]:function(t){if("auto"===x(t))return[];var n=V(t);return[J(t),n,J(n)]}(w)),k=[w].concat(j).reduce((function(t,e){return t.concat("auto"===x(e)?rt(n,{placement:e,boundary:v,rootBoundary:m,padding:l,flipVariations:y,allowedAutoPlacements:g}):e)}),[]),T=n.rects.reference,A=n.rects.popper,S=new Map,M=!0,E=k[0],B=0;B<k.length;B++){var C=k[B],R=x(C),q="start"===F(C),U=[i,a].indexOf(R)>=0,H=U?"width":"height",P=et(n,{placement:C,boundary:v,rootBoundary:m,altBoundary:b,padding:l}),W=U?q?u:c:q?a:i;T[H]>A[H]&&(W=V(W));var L=V(W),I=[];if(f&&I.push(P[R]<=0),d&&I.push(P[W]<=0,P[L]<=0),I.every((function(t){return t}))){E=C,M=!1;break}S.set(C,I)}if(M)for(var z=function(t){var n=k.find((function(n){var e=S.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return E=n,"break"},D=y?3:1;D>0;D--){if("break"===z(D))break}n.placement!==E&&(n.modifiersData[r]._skip=!0,n.placement=E,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function it(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function at(t){return[i,u,a,c].some((function(n){return t[n]>=0}))}var ut={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,r=t.name,o=e.offset,a=void 0===o?[0,0]:o,f=d.reduce((function(t,e){return t[e]=function(t,n,e){var r=x(t),o=[c,i].indexOf(r)>=0?-1:1,a="function"==typeof e?e(Object.assign({},n,{placement:t})):e,f=a[0],p=a[1];return f=f||0,p=(p||0)*o,[c,u].indexOf(r)>=0?{x:p,y:f}:{x:f,y:p}}(e,n.rects,a),t}),{}),p=f[n.placement],s=p.x,l=p.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=s,n.modifiersData.popperOffsets.y+=l),n.modifiersData[r]=f}};var ct={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,r=t.name,o=e.mainAxis,f=void 0===o||o,p=e.altAxis,d=void 0!==p&&p,s=e.boundary,l=e.rootBoundary,v=e.altBoundary,m=e.padding,b=e.tether,h=void 0===b||b,y=e.tetherOffset,O=void 0===y?0:y,j=et(n,{boundary:s,rootBoundary:l,padding:m,altBoundary:v}),k=x(n.placement),T=F(n.placement),S=!T,M=U(k),E="x"===M?"y":"x",B=n.modifiersData.popperOffsets,C=n.rects.reference,R=n.rects.popper,P="function"==typeof O?O(Object.assign({},n.rects,{placement:n.placement})):O,W="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),L=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,I={x:0,y:0};if(B){if(f){var z,D="y"===M?i:c,N="y"===M?a:u,V="y"===M?"height":"width",$=B[M],J=$+j[D],_=$-j[N],G=h?-R[V]/2:0,K="start"===T?C[V]:R[V],Q="start"===T?-R[V]:-C[V],X=n.elements.arrow,Y=h&&X?A(X):{width:0,height:0},Z=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},tt=Z[D],nt=Z[N],rt=H(0,C[V],Y[V]),ot=S?C[V]/2-G-rt-tt-W.mainAxis:K-rt-tt-W.mainAxis,it=S?-C[V]/2+G+rt+nt+W.mainAxis:Q+rt+nt+W.mainAxis,at=n.elements.arrow&&q(n.elements.arrow),ut=at?"y"===M?at.clientTop||0:at.clientLeft||0:0,ct=null!=(z=null==L?void 0:L[M])?z:0,ft=$+it-ct,pt=H(h?w(J,$+ot-ct-ut):J,$,h?g(_,ft):_);B[M]=pt,I[M]=pt-$}if(d){var dt,st="x"===M?i:c,lt="x"===M?a:u,vt=B[E],mt="y"===E?"height":"width",bt=vt+j[st],ht=vt-j[lt],yt=-1!==[i,c].indexOf(k),xt=null!=(dt=null==L?void 0:L[E])?dt:0,gt=yt?bt:vt-C[mt]-R[mt]-xt+W.altAxis,wt=yt?vt+C[mt]+R[mt]-xt-W.altAxis:ht,Ot=h&&yt?function(t,n,e){var r=H(t,n,e);return r>e?e:r}(gt,vt,wt):H(h?gt:bt,vt,h?wt:ht);B[E]=Ot,I[E]=Ot-vt}n.modifiersData[r]=I}},requiresIfExists:["offset"]};function ft(t,n,e){void 0===e&&(e=!1);var r,o,i=b(n),a=b(n)&&function(t){var n=t.getBoundingClientRect(),e=O(n.width)/t.offsetWidth||1,r=O(n.height)/t.offsetHeight||1;return 1!==e||1!==r}(n),u=B(n),c=T(t,a,e),f={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(i||!i&&!e)&&(("body"!==l(n)||K(u))&&(f=(r=n)!==v(r)&&b(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:_(r)),b(n)?((p=T(n,!0)).x+=n.clientLeft,p.y+=n.clientTop):u&&(p.x=G(u))),{x:c.left+f.scrollLeft-p.x,y:c.top+f.scrollTop-p.y,width:c.width,height:c.height}}function pt(t){var n=new Map,e=new Set,r=[];function o(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||o(t)})),r}var dt={placement:"bottom",modifiers:[],strategy:"absolute"};function st(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function lt(t){void 0===t&&(t={});var n=t,e=n.defaultModifiers,r=void 0===e?[]:e,o=n.defaultOptions,i=void 0===o?dt:o;return function(t,n,e){void 0===e&&(e=i);var o,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},dt,i),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},c=[],f=!1,p={state:u,setOptions:function(e){var o="function"==typeof e?e(u.options):e;d(),u.options=Object.assign({},i,u.options,o),u.scrollParents={reference:m(t)?X(t):t.contextElement?X(t.contextElement):[],popper:X(n)};var a,f,l=function(t){var n=pt(t);return s.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(r,u.options.modifiers),f=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(f).map((function(t){return f[t]}))));return u.orderedModifiers=l.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var n=t.name,e=t.options,r=void 0===e?{}:e,o=t.effect;if("function"==typeof o){var i=o({state:u,name:n,instance:p,options:r}),a=function(){};c.push(i||a)}})),p.update()},forceUpdate:function(){if(!f){var t=u.elements,n=t.reference,e=t.popper;if(st(n,e)){u.rects={reference:ft(n,q(e),"fixed"===u.options.strategy),popper:A(e)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<u.orderedModifiers.length;r++)if(!0!==u.reset){var o=u.orderedModifiers[r],i=o.fn,a=o.options,c=void 0===a?{}:a,d=o.name;"function"==typeof i&&(u=i({state:u,options:c,name:d,instance:p})||u)}else u.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(t){p.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){d(),f=!0}};if(!st(t,n))return p;function d(){c.forEach((function(t){return t()})),c=[]}return p.setOptions(e).then((function(t){!f&&e.onFirstUpdate&&e.onFirstUpdate(t)})),p}}var vt=lt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,a=r.resize,u=void 0===a||a,c=v(n.elements.popper),f=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&f.forEach((function(t){t.addEventListener("scroll",e.update,D)})),u&&c.addEventListener("resize",e.update,D),function(){i&&f.forEach((function(t){t.removeEventListener("scroll",e.update,D)})),u&&c.removeEventListener("resize",e.update,D)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state,e=t.name;n.modifiersData[e]=nt({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,o=void 0===r||r,i=e.adaptive,a=void 0===i||i,u=e.roundOffsets,c=void 0===u||u,f={placement:x(n.placement),variation:F(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,z(Object.assign({},f,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:c})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,z(Object.assign({},f,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},y,ut,ot,ct,L,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,o=n.rects.popper,i=n.modifiersData.preventOverflow,a=et(n,{elementContext:"reference"}),u=et(n,{altBoundary:!0}),c=it(a,r),f=it(u,o,i),p=at(c),d=at(f);n.modifiersData[e]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d})}}]}),mt={passive:!0,capture:!0},bt=function(){return document.body};function ht(t,n,e){if(Array.isArray(t)){var r=t[n];return null==r?Array.isArray(e)?e[n]:e:r}return t}function yt(t,n){var e={}.toString.call(t);return 0===e.indexOf("[object")&&e.indexOf(n+"]")>-1}function xt(t,n){return"function"==typeof t?t.apply(void 0,n):t}function gt(t,n){return 0===n?t:function(r){clearTimeout(e),e=setTimeout((function(){t(r)}),n)};var e}function wt(t){return[].concat(t)}function Ot(t,n){-1===t.indexOf(n)&&t.push(n)}function jt(t){return[].slice.call(t)}function kt(t){return Object.keys(t).reduce((function(n,e){return void 0!==t[e]&&(n[e]=t[e]),n}),{})}function Tt(){return document.createElement("div")}function At(t){return["Element","Fragment"].some((function(n){return yt(t,n)}))}function St(t){return At(t)?[t]:function(t){return yt(t,"NodeList")}(t)?jt(t):Array.isArray(t)?t:jt(document.querySelectorAll(t))}function Mt(t,n){t.forEach((function(t){t&&(t.style.transitionDuration=n+"ms")}))}function Et(t,n){t.forEach((function(t){t&&t.setAttribute("data-state",n)}))}function Bt(t,n,e){var r=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[r](n,e)}))}function Ct(t,n){for(var e=n;e;){var r;if(t.contains(e))return!0;e=null==e.getRootNode||null==(r=e.getRootNode())?void 0:r.host}return!1}var Rt={isTouch:!1},qt=0;function Ut(){Rt.isTouch||(Rt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ht))}function Ht(){var t=performance.now();t-qt<20&&(Rt.isTouch=!1,document.removeEventListener("mousemove",Ht)),qt=t}function Pt(){var t,n=document.activeElement;if((t=n)&&t._tippy&&t._tippy.reference===t){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}var Wt=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,Lt=Object.assign({appendTo:bt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Ft=Object.keys(Lt);function It(t){var n=(t.plugins||[]).reduce((function(n,e){var r,o=e.name,i=e.defaultValue;o&&(n[o]=void 0!==t[o]?t[o]:null!=(r=Lt[o])?r:i);return n}),{});return Object.assign({},t,n)}function zt(t,n){var e=Object.assign({},n,{content:xt(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys(It(Object.assign({},Lt,{plugins:n}))):Ft).reduce((function(n,e){var r=(t.getAttribute("data-tippy-"+e)||"").trim();if(!r)return n;if("content"===e)n[e]=r;else try{n[e]=JSON.parse(r)}catch(t){n[e]=r}return n}),{})}(t,n.plugins));return e.aria=Object.assign({},Lt.aria,e.aria),e.aria={expanded:"auto"===e.aria.expanded?n.interactive:e.aria.expanded,content:"auto"===e.aria.content?n.interactive?null:"describedby":e.aria.content},e}function Dt(t,n){t.innerHTML=n}function Nt(t){var n=Tt();return!0===t?n.className="tippy-arrow":(n.className="tippy-svg-arrow",At(t)?n.appendChild(t):Dt(n,t)),n}function Vt(t,n){At(n.content)?(Dt(t,""),t.appendChild(n.content)):"function"!=typeof n.content&&(n.allowHTML?Dt(t,n.content):t.textContent=n.content)}function $t(t){var n=t.firstElementChild,e=jt(n.children);return{box:n,content:e.find((function(t){return t.classList.contains("tippy-content")})),arrow:e.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:e.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function Jt(t){var n=Tt(),e=Tt();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var r=Tt();function o(e,r){var o=$t(n),i=o.box,a=o.content,u=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),e.content===r.content&&e.allowHTML===r.allowHTML||Vt(a,t.props),r.arrow?u?e.arrow!==r.arrow&&(i.removeChild(u),i.appendChild(Nt(r.arrow))):i.appendChild(Nt(r.arrow)):u&&i.removeChild(u)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),Vt(r,t.props),n.appendChild(e),e.appendChild(r),o(t.props,t.props),{popper:n,onUpdate:o}}Jt.$$tippy=!0;var _t=1,Gt=[],Kt=[];function Qt(t,n){var e,r,o,i,a,u,c,f,p=zt(t,Object.assign({},Lt,It(kt(n)))),d=!1,s=!1,l=!1,v=!1,m=[],b=gt(_,p.interactiveDebounce),h=_t++,y=(f=p.plugins).filter((function(t,n){return f.indexOf(t)===n})),x={id:h,reference:t,popper:Tt(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(e),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(n){if(x.state.isDestroyed)return;q("onBeforeUpdate",[x,n]),$();var e=x.props,r=zt(t,Object.assign({},e,kt(n),{ignoreAttributes:!0}));x.props=r,V(),e.interactiveDebounce!==r.interactiveDebounce&&(P(),b=gt(_,r.interactiveDebounce));e.triggerTarget&&!r.triggerTarget?wt(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):r.triggerTarget&&t.removeAttribute("aria-expanded");H(),R(),O&&O(e,r);x.popperInstance&&(X(),Z().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));q("onAfterUpdate",[x,n])},setContent:function(t){x.setProps({content:t})},show:function(){var t=x.state.isVisible,n=x.state.isDestroyed,e=!x.state.isEnabled,r=Rt.isTouch&&!x.props.touch,o=ht(x.props.duration,0,Lt.duration);if(t||n||e||r)return;if(M().hasAttribute("disabled"))return;if(q("onShow",[x],!1),!1===x.props.onShow(x))return;x.state.isVisible=!0,S()&&(w.style.visibility="visible");R(),I(),x.state.isMounted||(w.style.transition="none");if(S()){var i=B(),a=i.box,c=i.content;Mt([a,c],0)}u=function(){var t;if(x.state.isVisible&&!v){if(v=!0,w.offsetHeight,w.style.transition=x.props.moveTransition,S()&&x.props.animation){var n=B(),e=n.box,r=n.content;Mt([e,r],o),Et([e,r],"visible")}U(),H(),Ot(Kt,x),null==(t=x.popperInstance)||t.forceUpdate(),q("onMount",[x]),x.props.animation&&S()&&function(t,n){D(t,n)}(o,(function(){x.state.isShown=!0,q("onShown",[x])}))}},function(){var t,n=x.props.appendTo,e=M();t=x.props.interactive&&n===bt||"parent"===n?e.parentNode:xt(n,[e]);t.contains(w)||t.appendChild(w);x.state.isMounted=!0,X()}()},hide:function(){var t=!x.state.isVisible,n=x.state.isDestroyed,e=!x.state.isEnabled,r=ht(x.props.duration,1,Lt.duration);if(t||n||e)return;if(q("onHide",[x],!1),!1===x.props.onHide(x))return;x.state.isVisible=!1,x.state.isShown=!1,v=!1,d=!1,S()&&(w.style.visibility="hidden");if(P(),z(),R(!0),S()){var o=B(),i=o.box,a=o.content;x.props.animation&&(Mt([i,a],r),Et([i,a],"hidden"))}U(),H(),x.props.animation?S()&&function(t,n){D(t,(function(){!x.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&n()}))}(r,x.unmount):x.unmount()},hideWithInteractivity:function(t){E().addEventListener("mousemove",b),Ot(Gt,b),b(t)},enable:function(){x.state.isEnabled=!0},disable:function(){x.hide(),x.state.isEnabled=!1},unmount:function(){x.state.isVisible&&x.hide();if(!x.state.isMounted)return;Y(),Z().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);Kt=Kt.filter((function(t){return t!==x})),x.state.isMounted=!1,q("onHidden",[x])},destroy:function(){if(x.state.isDestroyed)return;x.clearDelayTimeouts(),x.unmount(),$(),delete t._tippy,x.state.isDestroyed=!0,q("onDestroy",[x])}};if(!p.render)return x;var g=p.render(x),w=g.popper,O=g.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+x.id,x.popper=w,t._tippy=x,w._tippy=x;var j=y.map((function(t){return t.fn(x)})),k=t.hasAttribute("aria-expanded");return V(),H(),R(),q("onCreate",[x]),p.showOnCreate&&tt(),w.addEventListener("mouseenter",(function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&E().addEventListener("mousemove",b)})),x;function T(){var t=x.props.touch;return Array.isArray(t)?t:[t,0]}function A(){return"hold"===T()[0]}function S(){var t;return!(null==(t=x.props.render)||!t.$$tippy)}function M(){return c||t}function E(){var t,n,e=M().parentNode;return e?null!=(n=wt(e)[0])&&null!=(t=n.ownerDocument)&&t.body?n.ownerDocument:document:document}function B(){return $t(w)}function C(t){return x.state.isMounted&&!x.state.isVisible||Rt.isTouch||i&&"focus"===i.type?0:ht(x.props.delay,t?0:1,Lt.delay)}function R(t){void 0===t&&(t=!1),w.style.pointerEvents=x.props.interactive&&!t?"":"none",w.style.zIndex=""+x.props.zIndex}function q(t,n,e){var r;(void 0===e&&(e=!0),j.forEach((function(e){e[t]&&e[t].apply(e,n)})),e)&&(r=x.props)[t].apply(r,n)}function U(){var n=x.props.aria;if(n.content){var e="aria-"+n.content,r=w.id;wt(x.props.triggerTarget||t).forEach((function(t){var n=t.getAttribute(e);if(x.state.isVisible)t.setAttribute(e,n?n+" "+r:r);else{var o=n&&n.replace(r,"").trim();o?t.setAttribute(e,o):t.removeAttribute(e)}}))}}function H(){!k&&x.props.aria.expanded&&wt(x.props.triggerTarget||t).forEach((function(t){x.props.interactive?t.setAttribute("aria-expanded",x.state.isVisible&&t===M()?"true":"false"):t.removeAttribute("aria-expanded")}))}function P(){E().removeEventListener("mousemove",b),Gt=Gt.filter((function(t){return t!==b}))}function W(n){if(!Rt.isTouch||!l&&"mousedown"!==n.type){var e=n.composedPath&&n.composedPath()[0]||n.target;if(!x.props.interactive||!Ct(w,e)){if(wt(x.props.triggerTarget||t).some((function(t){return Ct(t,e)}))){if(Rt.isTouch)return;if(x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else q("onClickOutside",[x,n]);!0===x.props.hideOnClick&&(x.clearDelayTimeouts(),x.hide(),s=!0,setTimeout((function(){s=!1})),x.state.isMounted||z())}}}function L(){l=!0}function F(){l=!1}function I(){var t=E();t.addEventListener("mousedown",W,!0),t.addEventListener("touchend",W,mt),t.addEventListener("touchstart",F,mt),t.addEventListener("touchmove",L,mt)}function z(){var t=E();t.removeEventListener("mousedown",W,!0),t.removeEventListener("touchend",W,mt),t.removeEventListener("touchstart",F,mt),t.removeEventListener("touchmove",L,mt)}function D(t,n){var e=B().box;function r(t){t.target===e&&(Bt(e,"remove",r),n())}if(0===t)return n();Bt(e,"remove",a),Bt(e,"add",r),a=r}function N(n,e,r){void 0===r&&(r=!1),wt(x.props.triggerTarget||t).forEach((function(t){t.addEventListener(n,e,r),m.push({node:t,eventType:n,handler:e,options:r})}))}function V(){var t;A()&&(N("touchstart",J,{passive:!0}),N("touchend",G,{passive:!0})),(t=x.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(N(t,J),t){case"mouseenter":N("mouseleave",G);break;case"focus":N(Wt?"focusout":"blur",K);break;case"focusin":N("focusout",K)}}))}function $(){m.forEach((function(t){var n=t.node,e=t.eventType,r=t.handler,o=t.options;n.removeEventListener(e,r,o)})),m=[]}function J(t){var n,e=!1;if(x.state.isEnabled&&!Q(t)&&!s){var r="focus"===(null==(n=i)?void 0:n.type);i=t,c=t.currentTarget,H(),!x.state.isVisible&&yt(t,"MouseEvent")&&Gt.forEach((function(n){return n(t)})),"click"===t.type&&(x.props.trigger.indexOf("mouseenter")<0||d)&&!1!==x.props.hideOnClick&&x.state.isVisible?e=!0:tt(t),"click"===t.type&&(d=!e),e&&!r&&nt(t)}}function _(t){var n=t.target,e=M().contains(n)||w.contains(n);if("mousemove"!==t.type||!e){var r=Z().concat(w).map((function(t){var n,e=null==(n=t._tippy.popperInstance)?void 0:n.state;return e?{popperRect:t.getBoundingClientRect(),popperState:e,props:p}:null})).filter(Boolean);(function(t,n){var e=n.clientX,r=n.clientY;return t.every((function(t){var n=t.popperRect,o=t.popperState,i=t.props.interactiveBorder,a=o.placement.split("-")[0],u=o.modifiersData.offset;if(!u)return!0;var c="bottom"===a?u.top.y:0,f="top"===a?u.bottom.y:0,p="right"===a?u.left.x:0,d="left"===a?u.right.x:0,s=n.top-r+c>i,l=r-n.bottom-f>i,v=n.left-e+p>i,m=e-n.right-d>i;return s||l||v||m}))})(r,t)&&(P(),nt(t))}}function G(t){Q(t)||x.props.trigger.indexOf("click")>=0&&d||(x.props.interactive?x.hideWithInteractivity(t):nt(t))}function K(t){x.props.trigger.indexOf("focusin")<0&&t.target!==M()||x.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||nt(t)}function Q(t){return!!Rt.isTouch&&A()!==t.type.indexOf("touch")>=0}function X(){Y();var n=x.props,e=n.popperOptions,r=n.placement,o=n.offset,i=n.getReferenceClientRect,a=n.moveTransition,c=S()?$t(w).arrow:null,f=i?{getBoundingClientRect:i,contextElement:i.contextElement||M()}:t,p={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var n=t.state;if(S()){var e=B().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?e.setAttribute("data-placement",n.placement):n.attributes.popper["data-popper-"+t]?e.setAttribute("data-"+t,""):e.removeAttribute("data-"+t)})),n.attributes.popper={}}}},d=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},p];S()&&c&&d.push({name:"arrow",options:{element:c,padding:3}}),d.push.apply(d,(null==e?void 0:e.modifiers)||[]),x.popperInstance=vt(f,w,Object.assign({},e,{placement:r,onFirstUpdate:u,modifiers:d}))}function Y(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function Z(){return jt(w.querySelectorAll("[data-tippy-root]"))}function tt(t){x.clearDelayTimeouts(),t&&q("onTrigger",[x,t]),I();var n=C(!0),r=T(),o=r[0],i=r[1];Rt.isTouch&&"hold"===o&&i&&(n=i),n?e=setTimeout((function(){x.show()}),n):x.show()}function nt(t){if(x.clearDelayTimeouts(),q("onUntrigger",[x,t]),x.state.isVisible){if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&d)){var n=C(!1);n?r=setTimeout((function(){x.state.isVisible&&x.hide()}),n):o=requestAnimationFrame((function(){x.hide()}))}}else z()}}function Xt(t,n){void 0===n&&(n={});var e=Lt.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",Ut,mt),window.addEventListener("blur",Pt);var r=Object.assign({},n,{plugins:e}),o=St(t).reduce((function(t,n){var e=n&&Qt(n,r);return e&&t.push(e),t}),[]);return At(t)?o[0]:o}Xt.defaultProps=Lt,Xt.setDefaultProps=function(t){Object.keys(t).forEach((function(n){Lt[n]=t[n]}))},Xt.currentInput=Rt,Object.assign({},y,{effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow)}}),Xt.setDefaultProps({render:Jt});let Yt=class extends o{constructor(){super(),this.content="",this.placement="top",this.trigger="mouseenter focus",this.injectTippyStyles()}static get styles(){return[r]}createRenderRoot(){return this}injectTippyStyles(){const t="nile-tippy-styles";if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent='\n .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}\n [data-tippy-root]{max-width:calc(100vw - 10px)}\n .tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}\n .tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}\n .tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}\n .tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}\n .tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}\n .tippy-box[data-placement^=left]>.tippy-arrow{right:0}\n .tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}\n .tippy-box[data-placement^=right]>.tippy-arrow{left:0}\n .tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}\n .tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}\n .tippy-arrow{width:16px;height:16px;color:#333}\n .tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}\n .tippy-content{position:relative;padding:5px 9px;z-index:1}\n ',document.head.appendChild(n)}firstUpdated(){const t=this.querySelectorAll("*");t.length>0&&(this.tooltipInstance=Xt(t,{content:this.content,placement:this.placement,trigger:this.trigger,theme:"light",animation:"fade"}))}disconnectedCallback(){super.disconnectedCallback(),this.tooltipInstance?.forEach((t=>t.destroy()))}updated(t){super.updated(t),t.has("content")&&this.tooltipInstance?.forEach((t=>t.setContent(this.content)))}};t([n({type:String})],Yt.prototype,"content",void 0),t([n({type:String})],Yt.prototype,"placement",void 0),t([n({type:String})],Yt.prototype,"trigger",void 0),Yt=t([e("nile-light-tooltip")],Yt);export{Yt as N};
|
|
1
|
+
import{__decorate as t}from"tslib";import{property as n,customElement as e}from"lit/decorators.js";import{s as o}from"./nile-light-tooltip.css.esm.js";import{N as i}from"../internal/nile-element.esm.js";import{p as r,a}from"./utils.esm.js";import"lit";var u="top",c="bottom",f="right",p="left",s=[u,c,f,p],d=s.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),l=[].concat(s,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),v=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function h(t){return t?(t.nodeName||"").toLowerCase():null}function m(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function b(t){return t instanceof m(t).Element||t instanceof Element}function y(t){return t instanceof m(t).HTMLElement||t instanceof HTMLElement}function g(t){return"undefined"!=typeof ShadowRoot&&(t instanceof m(t).ShadowRoot||t instanceof ShadowRoot)}var x={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},o=n.attributes[t]||{},i=n.elements[t];y(i)&&h(i)&&(Object.assign(i.style,e),Object.keys(o).forEach((function(t){var n=o[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var o=n.elements[t],i=n.attributes[t]||{},r=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});y(o)&&h(o)&&(Object.assign(o.style,r),Object.keys(i).forEach((function(t){o.removeAttribute(t)})))}))}},requires:["computeStyles"]};function w(t){return t.split("-")[0]}var O=Math.max,j=Math.min,k=Math.round;function T(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function S(){return!/^((?!chrome|android).)*safari/i.test(T())}function M(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var o=t.getBoundingClientRect(),i=1,r=1;n&&y(t)&&(i=t.offsetWidth>0&&k(o.width)/t.offsetWidth||1,r=t.offsetHeight>0&&k(o.height)/t.offsetHeight||1);var a=(b(t)?m(t):window).visualViewport,u=!S()&&e,c=(o.left+(u&&a?a.offsetLeft:0))/i,f=(o.top+(u&&a?a.offsetTop:0))/r,p=o.width/i,s=o.height/r;return{width:p,height:s,top:f,right:c+p,bottom:f+s,left:c,x:c,y:f}}function C(t){var n=M(t),e=t.offsetWidth,o=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-o)<=1&&(o=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:o}}function A(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&g(e)){var o=n;do{if(o&&t.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function B(t){return m(t).getComputedStyle(t)}function R(t){return["table","td","th"].indexOf(h(t))>=0}function E(t){return((b(t)?t.ownerDocument:t.document)||window.document).documentElement}function H(t){return"html"===h(t)?t:t.assignedSlot||t.parentNode||(g(t)?t.host:null)||E(t)}function z(t){return y(t)&&"fixed"!==B(t).position?t.offsetParent:null}function U(t){for(var n=m(t),e=z(t);e&&R(e)&&"static"===B(e).position;)e=z(e);return e&&("html"===h(e)||"body"===h(e)&&"static"===B(e).position)?n:e||function(t){var n=/firefox/i.test(T());if(/Trident/i.test(T())&&y(t)&&"fixed"===B(t).position)return null;var e=H(t);for(g(e)&&(e=e.host);y(e)&&["html","body"].indexOf(h(e))<0;){var o=B(e);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||n&&"filter"===o.willChange||n&&o.filter&&"none"!==o.filter)return e;e=e.parentNode}return null}(t)||n}function q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function L(t,n,e){return O(t,j(n,e))}function P(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function W(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}var D={name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e=t.state,o=t.name,i=t.options,r=e.elements.arrow,a=e.modifiersData.popperOffsets,d=w(e.placement),l=q(d),v=[p,f].indexOf(d)>=0?"height":"width";if(r&&a){var h=function(t,n){return P("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:W(t,s))}(i.padding,e),m=C(r),b="y"===l?u:p,y="y"===l?c:f,g=e.rects.reference[v]+e.rects.reference[l]-a[l]-e.rects.popper[v],x=a[l]-e.rects.reference[l],O=U(r),j=O?"y"===l?O.clientHeight||0:O.clientWidth||0:0,k=g/2-x/2,T=h[b],S=j-m[v]-h[y],M=j/2-m[v]/2+k,A=L(T,M,S),B=l;e.modifiersData[o]=((n={})[B]=A,n.centerOffset=A-M,n)}},effect:function(t){var n=t.state,e=t.options.element,o=void 0===e?"[data-popper-arrow]":e;null!=o&&("string"!=typeof o||(o=n.elements.popper.querySelector(o)))&&A(n.elements.popper,o)&&(n.elements.arrow=o)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function F(t){return t.split("-")[1]}var I={top:"auto",right:"auto",bottom:"auto",left:"auto"};function N(t){var n,e=t.popper,o=t.popperRect,i=t.placement,r=t.variation,a=t.offsets,s=t.position,d=t.gpuAcceleration,l=t.adaptive,v=t.roundOffsets,h=t.isFixed,b=a.x,y=void 0===b?0:b,g=a.y,x=void 0===g?0:g,w="function"==typeof v?v({x:y,y:x}):{x:y,y:x};y=w.x,x=w.y;var O=a.hasOwnProperty("x"),j=a.hasOwnProperty("y"),T=p,S=u,M=window;if(l){var C=U(e),A="clientHeight",R="clientWidth";if(C===m(e)&&"static"!==B(C=E(e)).position&&"absolute"===s&&(A="scrollHeight",R="scrollWidth"),i===u||(i===p||i===f)&&"end"===r)S=c,x-=(h&&C===M&&M.visualViewport?M.visualViewport.height:C[A])-o.height,x*=d?1:-1;if(i===p||(i===u||i===c)&&"end"===r)T=f,y-=(h&&C===M&&M.visualViewport?M.visualViewport.width:C[R])-o.width,y*=d?1:-1}var H,z=Object.assign({position:s},l&&I),q=!0===v?function(t,n){var e=t.x,o=t.y,i=n.devicePixelRatio||1;return{x:k(e*i)/i||0,y:k(o*i)/i||0}}({x:y,y:x},m(e)):{x:y,y:x};return y=q.x,x=q.y,d?Object.assign({},z,((H={})[S]=j?"0":"",H[T]=O?"0":"",H.transform=(M.devicePixelRatio||1)<=1?"translate("+y+"px, "+x+"px)":"translate3d("+y+"px, "+x+"px, 0)",H)):Object.assign({},z,((n={})[S]=j?x+"px":"",n[T]=O?y+"px":"",n.transform="",n))}var $={passive:!0};var V={left:"right",right:"left",bottom:"top",top:"bottom"};function X(t){return t.replace(/left|right|bottom|top/g,(function(t){return V[t]}))}var Y={start:"end",end:"start"};function J(t){return t.replace(/start|end/g,(function(t){return Y[t]}))}function _(t){var n=m(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function G(t){return M(E(t)).left+_(t).scrollLeft}function K(t){var n=B(t),e=n.overflow,o=n.overflowX,i=n.overflowY;return/auto|scroll|overlay|hidden/.test(e+i+o)}function Q(t){return["html","body","#document"].indexOf(h(t))>=0?t.ownerDocument.body:y(t)&&K(t)?t:Q(H(t))}function Z(t,n){var e;void 0===n&&(n=[]);var o=Q(t),i=o===(null==(e=t.ownerDocument)?void 0:e.body),r=m(o),a=i?[r].concat(r.visualViewport||[],K(o)?o:[]):o,u=n.concat(a);return i?u:u.concat(Z(H(a)))}function tt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function nt(t,n,e){return"viewport"===n?tt(function(t,n){var e=m(t),o=E(t),i=e.visualViewport,r=o.clientWidth,a=o.clientHeight,u=0,c=0;if(i){r=i.width,a=i.height;var f=S();(f||!f&&"fixed"===n)&&(u=i.offsetLeft,c=i.offsetTop)}return{width:r,height:a,x:u+G(t),y:c}}(t,e)):b(n)?function(t,n){var e=M(t,!1,"fixed"===n);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(n,e):tt(function(t){var n,e=E(t),o=_(t),i=null==(n=t.ownerDocument)?void 0:n.body,r=O(e.scrollWidth,e.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=O(e.scrollHeight,e.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-o.scrollLeft+G(t),c=-o.scrollTop;return"rtl"===B(i||e).direction&&(u+=O(e.clientWidth,i?i.clientWidth:0)-r),{width:r,height:a,x:u,y:c}}(E(t)))}function et(t,n,e,o){var i="clippingParents"===n?function(t){var n=Z(H(t)),e=["absolute","fixed"].indexOf(B(t).position)>=0&&y(t)?U(t):t;return b(e)?n.filter((function(t){return b(t)&&A(t,e)&&"body"!==h(t)})):[]}(t):[].concat(n),r=[].concat(i,[e]),a=r[0],u=r.reduce((function(n,e){var i=nt(t,e,o);return n.top=O(i.top,n.top),n.right=j(i.right,n.right),n.bottom=j(i.bottom,n.bottom),n.left=O(i.left,n.left),n}),nt(t,a,o));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function ot(t){var n,e=t.reference,o=t.element,i=t.placement,r=i?w(i):null,a=i?F(i):null,s=e.x+e.width/2-o.width/2,d=e.y+e.height/2-o.height/2;switch(r){case u:n={x:s,y:e.y-o.height};break;case c:n={x:s,y:e.y+e.height};break;case f:n={x:e.x+e.width,y:d};break;case p:n={x:e.x-o.width,y:d};break;default:n={x:e.x,y:e.y}}var l=r?q(r):null;if(null!=l){var v="y"===l?"height":"width";switch(a){case"start":n[l]=n[l]-(e[v]/2-o[v]/2);break;case"end":n[l]=n[l]+(e[v]/2-o[v]/2)}}return n}function it(t,n){void 0===n&&(n={});var e=n,o=e.placement,i=void 0===o?t.placement:o,r=e.strategy,a=void 0===r?t.strategy:r,p=e.boundary,d=void 0===p?"clippingParents":p,l=e.rootBoundary,v=void 0===l?"viewport":l,h=e.elementContext,m=void 0===h?"popper":h,y=e.altBoundary,g=void 0!==y&&y,x=e.padding,w=void 0===x?0:x,O=P("number"!=typeof w?w:W(w,s)),j="popper"===m?"reference":"popper",k=t.rects.popper,T=t.elements[g?j:m],S=et(b(T)?T:T.contextElement||E(t.elements.popper),d,v,a),C=M(t.elements.reference),A=ot({reference:C,element:k,strategy:"absolute",placement:i}),B=tt(Object.assign({},k,A)),R="popper"===m?B:C,H={top:S.top-R.top+O.top,bottom:R.bottom-S.bottom+O.bottom,left:S.left-R.left+O.left,right:R.right-S.right+O.right},z=t.modifiersData.offset;if("popper"===m&&z){var U=z[i];Object.keys(H).forEach((function(t){var n=[f,c].indexOf(t)>=0?1:-1,e=[u,c].indexOf(t)>=0?"y":"x";H[t]+=U[e]*n}))}return H}function rt(t,n){void 0===n&&(n={});var e=n,o=e.placement,i=e.boundary,r=e.rootBoundary,a=e.padding,u=e.flipVariations,c=e.allowedAutoPlacements,f=void 0===c?l:c,p=F(o),v=p?u?d:d.filter((function(t){return F(t)===p})):s,h=v.filter((function(t){return f.indexOf(t)>=0}));0===h.length&&(h=v);var m=h.reduce((function(n,e){return n[e]=it(t,{placement:e,boundary:i,rootBoundary:r,padding:a})[w(e)],n}),{});return Object.keys(m).sort((function(t,n){return m[t]-m[n]}))}var at={name:"flip",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,o=t.name;if(!n.modifiersData[o]._skip){for(var i=e.mainAxis,r=void 0===i||i,a=e.altAxis,s=void 0===a||a,d=e.fallbackPlacements,l=e.padding,v=e.boundary,h=e.rootBoundary,m=e.altBoundary,b=e.flipVariations,y=void 0===b||b,g=e.allowedAutoPlacements,x=n.options.placement,O=w(x),j=d||(O===x||!y?[X(x)]:function(t){if("auto"===w(t))return[];var n=X(t);return[J(t),n,J(n)]}(x)),k=[x].concat(j).reduce((function(t,e){return t.concat("auto"===w(e)?rt(n,{placement:e,boundary:v,rootBoundary:h,padding:l,flipVariations:y,allowedAutoPlacements:g}):e)}),[]),T=n.rects.reference,S=n.rects.popper,M=new Map,C=!0,A=k[0],B=0;B<k.length;B++){var R=k[B],E=w(R),H="start"===F(R),z=[u,c].indexOf(E)>=0,U=z?"width":"height",q=it(n,{placement:R,boundary:v,rootBoundary:h,altBoundary:m,padding:l}),L=z?H?f:p:H?c:u;T[U]>S[U]&&(L=X(L));var P=X(L),W=[];if(r&&W.push(q[E]<=0),s&&W.push(q[L]<=0,q[P]<=0),W.every((function(t){return t}))){A=R,C=!1;break}M.set(R,W)}if(C)for(var D=function(t){var n=k.find((function(n){var e=M.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return A=n,"break"},I=y?3:1;I>0;I--){if("break"===D(I))break}n.placement!==A&&(n.modifiersData[o]._skip=!0,n.placement=A,n.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function ut(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function ct(t){return[u,f,c,p].some((function(n){return t[n]>=0}))}var ft={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var n=t.state,e=t.options,o=t.name,i=e.offset,r=void 0===i?[0,0]:i,a=l.reduce((function(t,e){return t[e]=function(t,n,e){var o=w(t),i=[p,u].indexOf(o)>=0?-1:1,r="function"==typeof e?e(Object.assign({},n,{placement:t})):e,a=r[0],c=r[1];return a=a||0,c=(c||0)*i,[p,f].indexOf(o)>=0?{x:c,y:a}:{x:a,y:c}}(e,n.rects,r),t}),{}),c=a[n.placement],s=c.x,d=c.y;null!=n.modifiersData.popperOffsets&&(n.modifiersData.popperOffsets.x+=s,n.modifiersData.popperOffsets.y+=d),n.modifiersData[o]=a}};var pt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n=t.state,e=t.options,o=t.name,i=e.mainAxis,r=void 0===i||i,a=e.altAxis,s=void 0!==a&&a,d=e.boundary,l=e.rootBoundary,v=e.altBoundary,h=e.padding,m=e.tether,b=void 0===m||m,y=e.tetherOffset,g=void 0===y?0:y,x=it(n,{boundary:d,rootBoundary:l,padding:h,altBoundary:v}),k=w(n.placement),T=F(n.placement),S=!T,M=q(k),A="x"===M?"y":"x",B=n.modifiersData.popperOffsets,R=n.rects.reference,E=n.rects.popper,H="function"==typeof g?g(Object.assign({},n.rects,{placement:n.placement})):g,z="number"==typeof H?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),P=n.modifiersData.offset?n.modifiersData.offset[n.placement]:null,W={x:0,y:0};if(B){if(r){var D,I="y"===M?u:p,N="y"===M?c:f,$="y"===M?"height":"width",V=B[M],X=V+x[I],Y=V-x[N],J=b?-E[$]/2:0,_="start"===T?R[$]:E[$],G="start"===T?-E[$]:-R[$],K=n.elements.arrow,Q=b&&K?C(K):{width:0,height:0},Z=n.modifiersData["arrow#persistent"]?n.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},tt=Z[I],nt=Z[N],et=L(0,R[$],Q[$]),ot=S?R[$]/2-J-et-tt-z.mainAxis:_-et-tt-z.mainAxis,rt=S?-R[$]/2+J+et+nt+z.mainAxis:G+et+nt+z.mainAxis,at=n.elements.arrow&&U(n.elements.arrow),ut=at?"y"===M?at.clientTop||0:at.clientLeft||0:0,ct=null!=(D=null==P?void 0:P[M])?D:0,ft=V+rt-ct,pt=L(b?j(X,V+ot-ct-ut):X,V,b?O(Y,ft):Y);B[M]=pt,W[M]=pt-V}if(s){var st,dt="x"===M?u:p,lt="x"===M?c:f,vt=B[A],ht="y"===A?"height":"width",mt=vt+x[dt],bt=vt-x[lt],yt=-1!==[u,p].indexOf(k),gt=null!=(st=null==P?void 0:P[A])?st:0,xt=yt?mt:vt-R[ht]-E[ht]-gt+z.altAxis,wt=yt?vt+R[ht]+E[ht]-gt-z.altAxis:bt,Ot=b&&yt?function(t,n,e){var o=L(t,n,e);return o>e?e:o}(xt,vt,wt):L(b?xt:mt,vt,b?wt:bt);B[A]=Ot,W[A]=Ot-vt}n.modifiersData[o]=W}},requiresIfExists:["offset"]};function st(t,n,e){void 0===e&&(e=!1);var o,i,r=y(n),a=y(n)&&function(t){var n=t.getBoundingClientRect(),e=k(n.width)/t.offsetWidth||1,o=k(n.height)/t.offsetHeight||1;return 1!==e||1!==o}(n),u=E(n),c=M(t,a,e),f={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(r||!r&&!e)&&(("body"!==h(n)||K(u))&&(f=(o=n)!==m(o)&&y(o)?{scrollLeft:(i=o).scrollLeft,scrollTop:i.scrollTop}:_(o)),y(n)?((p=M(n,!0)).x+=n.clientLeft,p.y+=n.clientTop):u&&(p.x=G(u))),{x:c.left+f.scrollLeft-p.x,y:c.top+f.scrollTop-p.y,width:c.width,height:c.height}}function dt(t){var n=new Map,e=new Set,o=[];function i(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var o=n.get(t);o&&i(o)}})),o.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||i(t)})),o}var lt={placement:"bottom",modifiers:[],strategy:"absolute"};function vt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function ht(t){void 0===t&&(t={});var n=t,e=n.defaultModifiers,o=void 0===e?[]:e,i=n.defaultOptions,r=void 0===i?lt:i;return function(t,n,e){void 0===e&&(e=r);var i,a,u={placement:"bottom",orderedModifiers:[],options:Object.assign({},lt,r),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},c=[],f=!1,p={state:u,setOptions:function(e){var i="function"==typeof e?e(u.options):e;s(),u.options=Object.assign({},r,u.options,i),u.scrollParents={reference:b(t)?Z(t):t.contextElement?Z(t.contextElement):[],popper:Z(n)};var a,f,d=function(t){var n=dt(t);return v.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((a=[].concat(o,u.options.modifiers),f=a.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(f).map((function(t){return f[t]}))));return u.orderedModifiers=d.filter((function(t){return t.enabled})),u.orderedModifiers.forEach((function(t){var n=t.name,e=t.options,o=void 0===e?{}:e,i=t.effect;if("function"==typeof i){var r=i({state:u,name:n,instance:p,options:o}),a=function(){};c.push(r||a)}})),p.update()},forceUpdate:function(){if(!f){var t=u.elements,n=t.reference,e=t.popper;if(vt(n,e)){u.rects={reference:st(n,U(e),"fixed"===u.options.strategy),popper:C(e)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach((function(t){return u.modifiersData[t.name]=Object.assign({},t.data)}));for(var o=0;o<u.orderedModifiers.length;o++)if(!0!==u.reset){var i=u.orderedModifiers[o],r=i.fn,a=i.options,c=void 0===a?{}:a,s=i.name;"function"==typeof r&&(u=r({state:u,options:c,name:s,instance:p})||u)}else u.reset=!1,o=-1}}},update:(i=function(){return new Promise((function(t){p.forceUpdate(),t(u)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(i())}))}))),a}),destroy:function(){s(),f=!0}};if(!vt(t,n))return p;function s(){c.forEach((function(t){return t()})),c=[]}return p.setOptions(e).then((function(t){!f&&e.onFirstUpdate&&e.onFirstUpdate(t)})),p}}var mt=ht({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,o=t.options,i=o.scroll,r=void 0===i||i,a=o.resize,u=void 0===a||a,c=m(n.elements.popper),f=[].concat(n.scrollParents.reference,n.scrollParents.popper);return r&&f.forEach((function(t){t.addEventListener("scroll",e.update,$)})),u&&c.addEventListener("resize",e.update,$),function(){r&&f.forEach((function(t){t.removeEventListener("scroll",e.update,$)})),u&&c.removeEventListener("resize",e.update,$)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state,e=t.name;n.modifiersData[e]=ot({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,o=e.gpuAcceleration,i=void 0===o||o,r=e.adaptive,a=void 0===r||r,u=e.roundOffsets,c=void 0===u||u,f={placement:w(n.placement),variation:F(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:i,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,N(Object.assign({},f,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:c})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,N(Object.assign({},f,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},x,ft,at,pt,D,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,o=n.rects.reference,i=n.rects.popper,r=n.modifiersData.preventOverflow,a=it(n,{elementContext:"reference"}),u=it(n,{altBoundary:!0}),c=ut(a,o),f=ut(u,i,r),p=ct(c),s=ct(f);n.modifiersData[e]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:s},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":s})}}]}),bt={passive:!0,capture:!0},yt=function(){return document.body};function gt(t,n,e){if(Array.isArray(t)){var o=t[n];return null==o?Array.isArray(e)?e[n]:e:o}return t}function xt(t,n){var e={}.toString.call(t);return 0===e.indexOf("[object")&&e.indexOf(n+"]")>-1}function wt(t,n){return"function"==typeof t?t.apply(void 0,n):t}function Ot(t,n){return 0===n?t:function(o){clearTimeout(e),e=setTimeout((function(){t(o)}),n)};var e}function jt(t){return[].concat(t)}function kt(t,n){-1===t.indexOf(n)&&t.push(n)}function Tt(t){return[].slice.call(t)}function St(t){return Object.keys(t).reduce((function(n,e){return void 0!==t[e]&&(n[e]=t[e]),n}),{})}function Mt(){return document.createElement("div")}function Ct(t){return["Element","Fragment"].some((function(n){return xt(t,n)}))}function At(t){return xt(t,"MouseEvent")}function Bt(t){return Ct(t)?[t]:function(t){return xt(t,"NodeList")}(t)?Tt(t):Array.isArray(t)?t:Tt(document.querySelectorAll(t))}function Rt(t,n){t.forEach((function(t){t&&(t.style.transitionDuration=n+"ms")}))}function Et(t,n){t.forEach((function(t){t&&t.setAttribute("data-state",n)}))}function Ht(t){var n,e=jt(t)[0];return null!=e&&null!=(n=e.ownerDocument)&&n.body?e.ownerDocument:document}function zt(t,n,e){var o=n+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(n){t[o](n,e)}))}function Ut(t,n){for(var e=n;e;){var o;if(t.contains(e))return!0;e=null==e.getRootNode||null==(o=e.getRootNode())?void 0:o.host}return!1}var qt={isTouch:!1},Lt=0;function Pt(){qt.isTouch||(qt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Wt))}function Wt(){var t=performance.now();t-Lt<20&&(qt.isTouch=!1,document.removeEventListener("mousemove",Wt)),Lt=t}function Dt(){var t,n=document.activeElement;if((t=n)&&t._tippy&&t._tippy.reference===t){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}var Ft=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,It=Object.assign({appendTo:yt,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Nt=Object.keys(It);function $t(t){var n=(t.plugins||[]).reduce((function(n,e){var o,i=e.name,r=e.defaultValue;i&&(n[i]=void 0!==t[i]?t[i]:null!=(o=It[i])?o:r);return n}),{});return Object.assign({},t,n)}function Vt(t,n){var e=Object.assign({},n,{content:wt(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys($t(Object.assign({},It,{plugins:n}))):Nt).reduce((function(n,e){var o=(t.getAttribute("data-tippy-"+e)||"").trim();if(!o)return n;if("content"===e)n[e]=o;else try{n[e]=JSON.parse(o)}catch(t){n[e]=o}return n}),{})}(t,n.plugins));return e.aria=Object.assign({},It.aria,e.aria),e.aria={expanded:"auto"===e.aria.expanded?n.interactive:e.aria.expanded,content:"auto"===e.aria.content?n.interactive?null:"describedby":e.aria.content},e}function Xt(t,n){t.innerHTML=n}function Yt(t){var n=Mt();return!0===t?n.className="tippy-arrow":(n.className="tippy-svg-arrow",Ct(t)?n.appendChild(t):Xt(n,t)),n}function Jt(t,n){Ct(n.content)?(Xt(t,""),t.appendChild(n.content)):"function"!=typeof n.content&&(n.allowHTML?Xt(t,n.content):t.textContent=n.content)}function _t(t){var n=t.firstElementChild,e=Tt(n.children);return{box:n,content:e.find((function(t){return t.classList.contains("tippy-content")})),arrow:e.find((function(t){return t.classList.contains("tippy-arrow")||t.classList.contains("tippy-svg-arrow")})),backdrop:e.find((function(t){return t.classList.contains("tippy-backdrop")}))}}function Gt(t){var n=Mt(),e=Mt();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var o=Mt();function i(e,o){var i=_t(n),r=i.box,a=i.content,u=i.arrow;o.theme?r.setAttribute("data-theme",o.theme):r.removeAttribute("data-theme"),"string"==typeof o.animation?r.setAttribute("data-animation",o.animation):r.removeAttribute("data-animation"),o.inertia?r.setAttribute("data-inertia",""):r.removeAttribute("data-inertia"),r.style.maxWidth="number"==typeof o.maxWidth?o.maxWidth+"px":o.maxWidth,o.role?r.setAttribute("role",o.role):r.removeAttribute("role"),e.content===o.content&&e.allowHTML===o.allowHTML||Jt(a,t.props),o.arrow?u?e.arrow!==o.arrow&&(r.removeChild(u),r.appendChild(Yt(o.arrow))):r.appendChild(Yt(o.arrow)):u&&r.removeChild(u)}return o.className="tippy-content",o.setAttribute("data-state","hidden"),Jt(o,t.props),n.appendChild(e),e.appendChild(o),i(t.props,t.props),{popper:n,onUpdate:i}}Gt.$$tippy=!0;var Kt=1,Qt=[],Zt=[];function tn(t,n){var e,o,i,r,a,u,c,f,p=Vt(t,Object.assign({},It,$t(St(n)))),s=!1,d=!1,l=!1,v=!1,h=[],m=Ot(Y,p.interactiveDebounce),b=Kt++,y=(f=p.plugins).filter((function(t,n){return f.indexOf(t)===n})),g={id:b,reference:t,popper:Mt(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(e),clearTimeout(o),cancelAnimationFrame(i)},setProps:function(n){if(g.state.isDestroyed)return;H("onBeforeUpdate",[g,n]),V();var e=g.props,o=Vt(t,Object.assign({},e,St(n),{ignoreAttributes:!0}));g.props=o,$(),e.interactiveDebounce!==o.interactiveDebounce&&(q(),m=Ot(Y,o.interactiveDebounce));e.triggerTarget&&!o.triggerTarget?jt(e.triggerTarget).forEach((function(t){t.removeAttribute("aria-expanded")})):o.triggerTarget&&t.removeAttribute("aria-expanded");U(),E(),O&&O(e,o);g.popperInstance&&(K(),Z().forEach((function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)})));H("onAfterUpdate",[g,n])},setContent:function(t){g.setProps({content:t})},show:function(){var t=g.state.isVisible,n=g.state.isDestroyed,e=!g.state.isEnabled,o=qt.isTouch&&!g.props.touch,i=gt(g.props.duration,0,It.duration);if(t||n||e||o)return;if(C().hasAttribute("disabled"))return;if(H("onShow",[g],!1),!1===g.props.onShow(g))return;g.state.isVisible=!0,M()&&(w.style.visibility="visible");E(),D(),g.state.isMounted||(w.style.transition="none");if(M()){var r=B(),a=r.box,c=r.content;Rt([a,c],0)}u=function(){var t;if(g.state.isVisible&&!v){if(v=!0,w.offsetHeight,w.style.transition=g.props.moveTransition,M()&&g.props.animation){var n=B(),e=n.box,o=n.content;Rt([e,o],i),Et([e,o],"visible")}z(),U(),kt(Zt,g),null==(t=g.popperInstance)||t.forceUpdate(),H("onMount",[g]),g.props.animation&&M()&&function(t,n){I(t,n)}(i,(function(){g.state.isShown=!0,H("onShown",[g])}))}},function(){var t,n=g.props.appendTo,e=C();t=g.props.interactive&&n===yt||"parent"===n?e.parentNode:wt(n,[e]);t.contains(w)||t.appendChild(w);g.state.isMounted=!0,K()}()},hide:function(){var t=!g.state.isVisible,n=g.state.isDestroyed,e=!g.state.isEnabled,o=gt(g.props.duration,1,It.duration);if(t||n||e)return;if(H("onHide",[g],!1),!1===g.props.onHide(g))return;g.state.isVisible=!1,g.state.isShown=!1,v=!1,s=!1,M()&&(w.style.visibility="hidden");if(q(),F(),E(!0),M()){var i=B(),r=i.box,a=i.content;g.props.animation&&(Rt([r,a],o),Et([r,a],"hidden"))}z(),U(),g.props.animation?M()&&function(t,n){I(t,(function(){!g.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&n()}))}(o,g.unmount):g.unmount()},hideWithInteractivity:function(t){A().addEventListener("mousemove",m),kt(Qt,m),m(t)},enable:function(){g.state.isEnabled=!0},disable:function(){g.hide(),g.state.isEnabled=!1},unmount:function(){g.state.isVisible&&g.hide();if(!g.state.isMounted)return;Q(),Z().forEach((function(t){t._tippy.unmount()})),w.parentNode&&w.parentNode.removeChild(w);Zt=Zt.filter((function(t){return t!==g})),g.state.isMounted=!1,H("onHidden",[g])},destroy:function(){if(g.state.isDestroyed)return;g.clearDelayTimeouts(),g.unmount(),V(),delete t._tippy,g.state.isDestroyed=!0,H("onDestroy",[g])}};if(!p.render)return g;var x=p.render(g),w=x.popper,O=x.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+g.id,g.popper=w,t._tippy=g,w._tippy=g;var j=y.map((function(t){return t.fn(g)})),k=t.hasAttribute("aria-expanded");return $(),U(),E(),H("onCreate",[g]),p.showOnCreate&&tt(),w.addEventListener("mouseenter",(function(){g.props.interactive&&g.state.isVisible&&g.clearDelayTimeouts()})),w.addEventListener("mouseleave",(function(){g.props.interactive&&g.props.trigger.indexOf("mouseenter")>=0&&A().addEventListener("mousemove",m)})),g;function T(){var t=g.props.touch;return Array.isArray(t)?t:[t,0]}function S(){return"hold"===T()[0]}function M(){var t;return!(null==(t=g.props.render)||!t.$$tippy)}function C(){return c||t}function A(){var t=C().parentNode;return t?Ht(t):document}function B(){return _t(w)}function R(t){return g.state.isMounted&&!g.state.isVisible||qt.isTouch||r&&"focus"===r.type?0:gt(g.props.delay,t?0:1,It.delay)}function E(t){void 0===t&&(t=!1),w.style.pointerEvents=g.props.interactive&&!t?"":"none",w.style.zIndex=""+g.props.zIndex}function H(t,n,e){var o;(void 0===e&&(e=!0),j.forEach((function(e){e[t]&&e[t].apply(e,n)})),e)&&(o=g.props)[t].apply(o,n)}function z(){var n=g.props.aria;if(n.content){var e="aria-"+n.content,o=w.id;jt(g.props.triggerTarget||t).forEach((function(t){var n=t.getAttribute(e);if(g.state.isVisible)t.setAttribute(e,n?n+" "+o:o);else{var i=n&&n.replace(o,"").trim();i?t.setAttribute(e,i):t.removeAttribute(e)}}))}}function U(){!k&&g.props.aria.expanded&&jt(g.props.triggerTarget||t).forEach((function(t){g.props.interactive?t.setAttribute("aria-expanded",g.state.isVisible&&t===C()?"true":"false"):t.removeAttribute("aria-expanded")}))}function q(){A().removeEventListener("mousemove",m),Qt=Qt.filter((function(t){return t!==m}))}function L(n){if(!qt.isTouch||!l&&"mousedown"!==n.type){var e=n.composedPath&&n.composedPath()[0]||n.target;if(!g.props.interactive||!Ut(w,e)){if(jt(g.props.triggerTarget||t).some((function(t){return Ut(t,e)}))){if(qt.isTouch)return;if(g.state.isVisible&&g.props.trigger.indexOf("click")>=0)return}else H("onClickOutside",[g,n]);!0===g.props.hideOnClick&&(g.clearDelayTimeouts(),g.hide(),d=!0,setTimeout((function(){d=!1})),g.state.isMounted||F())}}}function P(){l=!0}function W(){l=!1}function D(){var t=A();t.addEventListener("mousedown",L,!0),t.addEventListener("touchend",L,bt),t.addEventListener("touchstart",W,bt),t.addEventListener("touchmove",P,bt)}function F(){var t=A();t.removeEventListener("mousedown",L,!0),t.removeEventListener("touchend",L,bt),t.removeEventListener("touchstart",W,bt),t.removeEventListener("touchmove",P,bt)}function I(t,n){var e=B().box;function o(t){t.target===e&&(zt(e,"remove",o),n())}if(0===t)return n();zt(e,"remove",a),zt(e,"add",o),a=o}function N(n,e,o){void 0===o&&(o=!1),jt(g.props.triggerTarget||t).forEach((function(t){t.addEventListener(n,e,o),h.push({node:t,eventType:n,handler:e,options:o})}))}function $(){var t;S()&&(N("touchstart",X,{passive:!0}),N("touchend",J,{passive:!0})),(t=g.props.trigger,t.split(/\s+/).filter(Boolean)).forEach((function(t){if("manual"!==t)switch(N(t,X),t){case"mouseenter":N("mouseleave",J);break;case"focus":N(Ft?"focusout":"blur",_);break;case"focusin":N("focusout",_)}}))}function V(){h.forEach((function(t){var n=t.node,e=t.eventType,o=t.handler,i=t.options;n.removeEventListener(e,o,i)})),h=[]}function X(t){var n,e=!1;if(g.state.isEnabled&&!G(t)&&!d){var o="focus"===(null==(n=r)?void 0:n.type);r=t,c=t.currentTarget,U(),!g.state.isVisible&&At(t)&&Qt.forEach((function(n){return n(t)})),"click"===t.type&&(g.props.trigger.indexOf("mouseenter")<0||s)&&!1!==g.props.hideOnClick&&g.state.isVisible?e=!0:tt(t),"click"===t.type&&(s=!e),e&&!o&&nt(t)}}function Y(t){var n=t.target,e=C().contains(n)||w.contains(n);if("mousemove"!==t.type||!e){var o=Z().concat(w).map((function(t){var n,e=null==(n=t._tippy.popperInstance)?void 0:n.state;return e?{popperRect:t.getBoundingClientRect(),popperState:e,props:p}:null})).filter(Boolean);(function(t,n){var e=n.clientX,o=n.clientY;return t.every((function(t){var n=t.popperRect,i=t.popperState,r=t.props.interactiveBorder,a=i.placement.split("-")[0],u=i.modifiersData.offset;if(!u)return!0;var c="bottom"===a?u.top.y:0,f="top"===a?u.bottom.y:0,p="right"===a?u.left.x:0,s="left"===a?u.right.x:0,d=n.top-o+c>r,l=o-n.bottom-f>r,v=n.left-e+p>r,h=e-n.right-s>r;return d||l||v||h}))})(o,t)&&(q(),nt(t))}}function J(t){G(t)||g.props.trigger.indexOf("click")>=0&&s||(g.props.interactive?g.hideWithInteractivity(t):nt(t))}function _(t){g.props.trigger.indexOf("focusin")<0&&t.target!==C()||g.props.interactive&&t.relatedTarget&&w.contains(t.relatedTarget)||nt(t)}function G(t){return!!qt.isTouch&&S()!==t.type.indexOf("touch")>=0}function K(){Q();var n=g.props,e=n.popperOptions,o=n.placement,i=n.offset,r=n.getReferenceClientRect,a=n.moveTransition,c=M()?_t(w).arrow:null,f=r?{getBoundingClientRect:r,contextElement:r.contextElement||C()}:t,p={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var n=t.state;if(M()){var e=B().box;["placement","reference-hidden","escaped"].forEach((function(t){"placement"===t?e.setAttribute("data-placement",n.placement):n.attributes.popper["data-popper-"+t]?e.setAttribute("data-"+t,""):e.removeAttribute("data-"+t)})),n.attributes.popper={}}}},s=[{name:"offset",options:{offset:i}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},p];M()&&c&&s.push({name:"arrow",options:{element:c,padding:3}}),s.push.apply(s,(null==e?void 0:e.modifiers)||[]),g.popperInstance=mt(f,w,Object.assign({},e,{placement:o,onFirstUpdate:u,modifiers:s}))}function Q(){g.popperInstance&&(g.popperInstance.destroy(),g.popperInstance=null)}function Z(){return Tt(w.querySelectorAll("[data-tippy-root]"))}function tt(t){g.clearDelayTimeouts(),t&&H("onTrigger",[g,t]),D();var n=R(!0),o=T(),i=o[0],r=o[1];qt.isTouch&&"hold"===i&&r&&(n=r),n?e=setTimeout((function(){g.show()}),n):g.show()}function nt(t){if(g.clearDelayTimeouts(),H("onUntrigger",[g,t]),g.state.isVisible){if(!(g.props.trigger.indexOf("mouseenter")>=0&&g.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&s)){var n=R(!1);n?o=setTimeout((function(){g.state.isVisible&&g.hide()}),n):i=requestAnimationFrame((function(){g.hide()}))}}else F()}}function nn(t,n){void 0===n&&(n={});var e=It.plugins.concat(n.plugins||[]);document.addEventListener("touchstart",Pt,bt),window.addEventListener("blur",Dt);var o=Object.assign({},n,{plugins:e}),i=Bt(t).reduce((function(t,n){var e=n&&tn(n,o);return e&&t.push(e),t}),[]);return Ct(t)?i[0]:i}nn.defaultProps=It,nn.setDefaultProps=function(t){Object.keys(t).forEach((function(n){It[n]=t[n]}))},nn.currentInput=qt,Object.assign({},x,{effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow)}});var en={clientX:0,clientY:0},on=[];function rn(t){var n=t.clientX,e=t.clientY;en={clientX:n,clientY:e}}var an={name:"followCursor",defaultValue:!1,fn:function(t){var n=t.reference,e=Ht(t.props.triggerTarget||n),o=!1,i=!1,r=!0,a=t.props;function u(){return"initial"===t.props.followCursor&&t.state.isVisible}function c(){e.addEventListener("mousemove",s)}function f(){e.removeEventListener("mousemove",s)}function p(){o=!0,t.setProps({getReferenceClientRect:null}),o=!1}function s(e){var o=!e.target||n.contains(e.target),i=t.props.followCursor,r=e.clientX,a=e.clientY,u=n.getBoundingClientRect(),c=r-u.left,f=a-u.top;!o&&t.props.interactive||t.setProps({getReferenceClientRect:function(){var t=n.getBoundingClientRect(),e=r,o=a;"initial"===i&&(e=t.left+c,o=t.top+f);var u="horizontal"===i?t.top:o,p="vertical"===i?t.right:e,s="horizontal"===i?t.bottom:o,d="vertical"===i?t.left:e;return{width:p-d,height:s-u,top:u,right:p,bottom:s,left:d}}})}function d(){t.props.followCursor&&(on.push({instance:t,doc:e}),function(t){t.addEventListener("mousemove",rn)}(e))}function l(){0===(on=on.filter((function(n){return n.instance!==t}))).filter((function(t){return t.doc===e})).length&&function(t){t.removeEventListener("mousemove",rn)}(e)}return{onCreate:d,onDestroy:l,onBeforeUpdate:function(){a=t.props},onAfterUpdate:function(n,e){var r=e.followCursor;o||void 0!==r&&a.followCursor!==r&&(l(),r?(d(),!t.state.isMounted||i||u()||c()):(f(),p()))},onMount:function(){t.props.followCursor&&!i&&(r&&(s(en),r=!1),u()||c())},onTrigger:function(t,n){At(n)&&(en={clientX:n.clientX,clientY:n.clientY}),i="focus"===n.type},onHidden:function(){t.props.followCursor&&(p(),f(),r=!0)}}}};nn.setDefaultProps({render:Gt});let un=class extends i{constructor(){super(),this.for=null,this.content="",this.size="small",this.duration=200,this.placement="top",this.disabled=!1,this.distance=8,this.skidding=0,this.open=!1,this.trigger="mouseenter focus",this.hoist=!1,this.allowHTML=!1,this.followCursor=!1,this.arrow="default",this.injectTippyStyles()}static get styles(){return[o]}createRenderRoot(){return this}injectTippyStyles(){const t="nile-light-tooltip-styles";if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent='\n .tippy-box[data-animation=fade][data-state=hidden] { opacity: 0; }\n [data-tippy-root] { max-width: calc(100vw - 10px); }\n .tippy-box {\n position: relative;\n background-color: #333;\n color: #fff;\n border-radius: 4px;\n font-size: 14px;\n line-height: 1.4;\n white-space: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n /* Placement-specific arrows */\n .tippy-box[data-placement^=top] > .tippy-arrow { bottom: 0; }\n .tippy-box[data-placement^=top] > .tippy-arrow:before {\n bottom: -7px;\n border-width: 8px 8px 0;\n border-top-color: initial;\n }\n\n .tippy-box[data-placement^=bottom] > .tippy-arrow { top: 0; }\n .tippy-box[data-placement^=bottom] > .tippy-arrow:before {\n top: -7px;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n }\n\n .tippy-box[data-placement^=left] > .tippy-arrow { right: 0; }\n .tippy-box[data-placement^=left] > .tippy-arrow:before {\n right: -7px;\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n }\n\n .tippy-box[data-placement^=right] > .tippy-arrow { left: 0; }\n .tippy-box[data-placement^=right] > .tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n }\n\n .tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);\n }\n\n .tippy-box.large { font-size: 16px; padding: 8px 12px; }\n .tippy-arrow { width: 16px; height: 16px; color: #333; }\n .tippy-arrow:before {\n content: "";\n position: absolute;\n border-color: transparent;\n border-style: solid;\n }\n\n .tippy-content {\n position: relative;\n padding: 5px 9px;\n z-index: 1;\n }\n\t\t.tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}\n ',document.head.appendChild(n)}firstUpdated(){this.attachTooltip()}attachTooltip(){if(this.destroyTooltips(),this.disabled)return;const t={content:this.content,placement:this.placement,trigger:this.trigger,offset:[this.skidding,this.distance],theme:"light",animation:"fade",duration:r(this.duration),allowHTML:this.allowHTML,appendTo:this.hoist?document.body:void 0,followCursor:a(this.followCursor),plugins:a(this.followCursor)?[an]:[],arrow:'<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',onShow:t=>{this.open=!0},onHide:t=>{this.open=!1}};if(this.for){if(this.targetEl=document.getElementById(this.for),!this.targetEl)return;this.id||(this.generatedId=`nile-tooltip-${Math.random().toString(36).slice(2,9)}`,this.id=this.generatedId),this.prevDescribedby=this.targetEl.getAttribute("aria-describedby");const n=this.prevDescribedby?`${this.prevDescribedby} ${this.id}`:this.id;return this.targetEl.setAttribute("aria-describedby",n),this.singleInstance=nn(this.targetEl,t),this.size&&this.singleInstance.popper.querySelector(".tippy-box")?.classList.add(this.size),void(this.open&&queueMicrotask((()=>this.singleInstance?.show())))}const n=this.querySelectorAll("*");n.length>0&&(this.tooltipInstances=nn(n,t),this.tooltipInstances.forEach((t=>t.popper.querySelector(".tippy-box")?.classList.add(this.size))),this.open&&this.tooltipInstances.forEach((t=>t.show())))}destroyTooltips(){if(this.tooltipInstances?.forEach((t=>t.destroy())),this.singleInstance?.destroy(),this.tooltipInstances=void 0,this.singleInstance=void 0,this.targetEl&&this.id){const t=this.targetEl.getAttribute("aria-describedby")?.split(" ").filter((t=>t!==this.id)).join(" ").trim();t?this.targetEl.setAttribute("aria-describedby",t):this.targetEl.removeAttribute("aria-describedby")}}disconnectedCallback(){super.disconnectedCallback(),this.destroyTooltips()}updated(t){super.updated(t),["for","content","placement","distance","skidding","trigger","disabled","hoist","size","arrow"].some((n=>t.has(n)))&&this.attachTooltip(),t.has("open")&&(this.open?(this.singleInstance?.show(),this.tooltipInstances?.forEach((t=>t.show()))):(this.singleInstance?.hide(),this.tooltipInstances?.forEach((t=>t.hide()))))}};t([n({type:String,attribute:"for"})],un.prototype,"for",void 0),t([n({type:String,reflect:!0})],un.prototype,"content",void 0),t([n({type:String,reflect:!0})],un.prototype,"size",void 0),t([n({type:String,reflect:!0})],un.prototype,"duration",void 0),t([n({type:String})],un.prototype,"placement",void 0),t([n({type:Boolean})],un.prototype,"disabled",void 0),t([n({type:Number})],un.prototype,"distance",void 0),t([n({type:Number})],un.prototype,"skidding",void 0),t([n({type:Boolean,reflect:!0})],un.prototype,"open",void 0),t([n({type:String})],un.prototype,"trigger",void 0),t([n({type:Boolean,reflect:!0})],un.prototype,"hoist",void 0),t([n({type:Boolean,reflect:!0})],un.prototype,"allowHTML",void 0),t([n({type:String,reflect:!0,attribute:!0})],un.prototype,"followCursor",void 0),t([n({type:String,reflect:!0,attribute:!0})],un.prototype,"arrow",void 0),un=t([e("nile-light-tooltip")],un);export{un as N};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register([],function(_export,_context){"use strict";function r(r){return!0===r||"true"===r||!1!==r&&"false"!==r&&!!["initial","horizontal","vertical"].includes(String(r))&&r;}function t(r){if(Array.isArray(r))return r;if("number"==typeof r)return r;if("string"==typeof r){if(r.includes(",")){return r.split(",").map(function(r){return parseInt(r.trim(),10);});}var _t=parseInt(r,10);if(!isNaN(_t))return _t;}return 200;}_export({a:r,p:t});return{setters:[],execute:function execute(){}};});
|
|
2
|
+
//# sourceMappingURL=utils.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs.js","sources":["../../../src/nile-light-tooltip/utils.ts"],"sourcesContent":[" \nexport function parseFollowCursor(\n value: boolean | 'initial' | 'horizontal' | 'vertical' | 'true' | 'false'\n): boolean | 'initial' | 'horizontal' | 'vertical' {\n if (value === true || value === 'true') return true;\n if (value === false || value === 'false') return false;\n if (['initial', 'horizontal', 'vertical'].includes(String(value))) {\n return value as 'initial' | 'horizontal' | 'vertical';\n }\n return false;\n}\n\n\nexport function parseDuration(\n value: string | number | [number, number] | undefined\n ): number | [number, number] {\n if (Array.isArray(value)) return value;\n if (typeof value === 'number') return value;\n \n if (typeof value === 'string') {\n // Handle comma-separated (e.g. \"200,100\")\n if (value.includes(',')) {\n const parts = value.split(',').map(v => parseInt(v.trim(), 10));\n return parts as [number, number];\n }\n \n // Single numeric string\n const num = parseInt(value, 10);\n if (!isNaN(num)) return num;\n }\n \n return 200; // default fallback\n }"],"names":["parseFollowCursor","value","includes","String","parseDuration","Array","isArray","split","map","v","parseInt","trim","num","isNaN"],"mappings":"2DACM,QAAUA,CAAAA,CACdC,CAAAA,CAAAA,CAAAA,CAEA,MAAc,CAAA,CAAA,GAAVA,GAA4B,MAAVA,GAAAA,CAAAA,EAAAA,CACR,CAAVA,GAAAA,CAAAA,EAA6B,OAAVA,GAAAA,CAAAA,EAAAA,CAAAA,CACnB,CAAC,SAAA,CAAW,aAAc,UAAYC,CAAAA,CAAAA,QAAAA,CAASC,MAAOF,CAAAA,CAAAA,CAAAA,CAAAA,EACjDA,CAGX,EAGM,QAAUG,CAAAA,CAAAA,CACZH,GAEA,GAAII,KAAAA,CAAMC,OAAQL,CAAAA,CAAAA,CAAAA,CAAQ,MAAOA,CAAAA,CAAAA,CACjC,GAAqB,QAAA,EAAA,MAAVA,CAAAA,EAAoB,MAAOA,CAAAA,CAAAA,CAEtC,GAAqB,QAAA,EAAA,MAAVA,CAAAA,CAAoB,CAAA,CAE7B,GAAIA,CAAAA,CAAMC,SAAS,GAAM,CAAA,CAAA,CAEvB,MADcD,CAAAA,CAAAA,CAAMM,KAAM,CAAA,GAAA,CAAA,CAAKC,GAAIC,CAAAA,SAAAA,CAAAA,QAAKC,CAAAA,SAASD,CAAEE,CAAAA,IAAAA,CAAAA,CAAAA,CAAQ,EAE5D,CAAA,EAAA,CAAA,EAGD,GAAMC,CAAAA,EAAAA,CAAMF,QAAST,CAAAA,CAAAA,CAAO,IAC5B,GAAKY,CAAAA,KAAAA,CAAMD,EAAM,CAAA,CAAA,MAAOA,CAAAA,EACzB,EAED,MAAO,IACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(r){return!0===r||"true"===r||!1!==r&&"false"!==r&&(!!["initial","horizontal","vertical"].includes(String(r))&&r)}function t(r){if(Array.isArray(r))return r;if("number"==typeof r)return r;if("string"==typeof r){if(r.includes(",")){return r.split(",").map((r=>parseInt(r.trim(),10)))}const t=parseInt(r,10);if(!isNaN(t))return t}return 200}export{r as a,t as p};
|
|
@@ -1,36 +1,57 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Aquera Inc 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
1
|
import { CSSResultArray, PropertyValues } from 'lit';
|
|
8
2
|
import NileElement from '../internal/nile-element';
|
|
9
3
|
import { Props } from 'tippy.js';
|
|
10
4
|
/**
|
|
11
5
|
* Nile light-tooltip component.
|
|
12
6
|
*
|
|
7
|
+
* Supports wrapper and sibling (for) modes.
|
|
8
|
+
* Aligns with Tippy.js props and Nile design system.
|
|
9
|
+
*
|
|
13
10
|
* @tag nile-light-tooltip
|
|
14
11
|
*/
|
|
15
12
|
export declare class NileLightTooltip extends NileElement {
|
|
16
13
|
static get styles(): CSSResultArray;
|
|
17
14
|
protected createRenderRoot(): this;
|
|
18
|
-
/**
|
|
15
|
+
/** ID of the target element (for sibling mode) */
|
|
16
|
+
for: string | null;
|
|
17
|
+
/** Tooltip content text or HTML */
|
|
19
18
|
content: string;
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
/**
|
|
19
|
+
/** Tooltip size (applies CSS class) */
|
|
20
|
+
size: 'small' | 'large';
|
|
21
|
+
/** Animation duration for show/hide (ms). Can be a single value or [show, hide]. */
|
|
22
|
+
duration: string | number | [number, number];
|
|
23
|
+
/** Placement of the tooltip */
|
|
24
|
+
placement: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'auto' | 'auto-start' | 'auto-end';
|
|
25
|
+
/** Disabled state */
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
/** Distance (Popper offset Y or main axis) */
|
|
28
|
+
distance: number;
|
|
29
|
+
/** Skidding (Popper offset X or cross axis) */
|
|
30
|
+
skidding: number;
|
|
31
|
+
/** Whether tooltip is open (controlled mode) */
|
|
32
|
+
open: boolean;
|
|
33
|
+
/** Trigger behavior */
|
|
23
34
|
trigger: Props['trigger'];
|
|
24
|
-
|
|
35
|
+
/** Hoist the tooltip to body (avoid clipping) */
|
|
36
|
+
hoist: boolean;
|
|
37
|
+
/** Allow HTML content rendering */
|
|
38
|
+
allowHTML: boolean;
|
|
39
|
+
/** Cursor following mode */
|
|
40
|
+
followCursor: boolean | 'initial' | 'horizontal' | 'vertical' | 'true' | 'false';
|
|
41
|
+
/** Arrow type for tooltip */
|
|
42
|
+
arrow: 'default' | 'round' | 'large' | 'small' | 'wide' | 'narrow' | 'none';
|
|
43
|
+
private tooltipInstances?;
|
|
44
|
+
private singleInstance?;
|
|
45
|
+
private targetEl?;
|
|
46
|
+
private generatedId?;
|
|
47
|
+
private prevDescribedby?;
|
|
25
48
|
constructor();
|
|
26
|
-
/**
|
|
27
|
-
* Injects Tippy.js base styles into the Light DOM (document.head)
|
|
28
|
-
* if not already present.
|
|
29
|
-
*/
|
|
30
49
|
private injectTippyStyles;
|
|
31
50
|
firstUpdated(): void;
|
|
51
|
+
private attachTooltip;
|
|
52
|
+
private destroyTooltips;
|
|
32
53
|
disconnectedCallback(): void;
|
|
33
|
-
updated(
|
|
54
|
+
updated(changed: PropertyValues): void;
|
|
34
55
|
}
|
|
35
56
|
export default NileLightTooltip;
|
|
36
57
|
declare global {
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Aquera Inc 2025
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
1
|
import { __decorate } from "tslib";
|
|
8
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
9
3
|
import { styles } from './nile-light-tooltip.css';
|
|
10
4
|
import NileElement from '../internal/nile-element';
|
|
11
|
-
import tippy from 'tippy.js';
|
|
5
|
+
import tippy, { followCursor, roundArrow } from 'tippy.js';
|
|
6
|
+
import { parseFollowCursor, parseDuration } from './utils';
|
|
12
7
|
/**
|
|
13
8
|
* Nile light-tooltip component.
|
|
14
9
|
*
|
|
10
|
+
* Supports wrapper and sibling (for) modes.
|
|
11
|
+
* Aligns with Tippy.js props and Nile design system.
|
|
12
|
+
*
|
|
15
13
|
* @tag nile-light-tooltip
|
|
16
14
|
*/
|
|
17
15
|
let NileLightTooltip = class NileLightTooltip extends NileElement {
|
|
@@ -19,80 +17,255 @@ let NileLightTooltip = class NileLightTooltip extends NileElement {
|
|
|
19
17
|
return [styles];
|
|
20
18
|
}
|
|
21
19
|
createRenderRoot() {
|
|
22
|
-
|
|
23
|
-
return this;
|
|
20
|
+
return this; // Light DOM
|
|
24
21
|
}
|
|
25
22
|
constructor() {
|
|
26
23
|
super();
|
|
27
|
-
|
|
24
|
+
// ───────────── Props ─────────────
|
|
25
|
+
/** ID of the target element (for sibling mode) */
|
|
26
|
+
this.for = null;
|
|
27
|
+
/** Tooltip content text or HTML */
|
|
28
28
|
this.content = '';
|
|
29
|
-
/**
|
|
29
|
+
/** Tooltip size (applies CSS class) */
|
|
30
|
+
this.size = 'small';
|
|
31
|
+
/** Animation duration for show/hide (ms). Can be a single value or [show, hide]. */
|
|
32
|
+
this.duration = 200;
|
|
33
|
+
/** Placement of the tooltip */
|
|
30
34
|
this.placement = 'top';
|
|
31
|
-
/**
|
|
35
|
+
/** Disabled state */
|
|
36
|
+
this.disabled = false;
|
|
37
|
+
/** Distance (Popper offset Y or main axis) */
|
|
38
|
+
this.distance = 8;
|
|
39
|
+
/** Skidding (Popper offset X or cross axis) */
|
|
40
|
+
this.skidding = 0;
|
|
41
|
+
/** Whether tooltip is open (controlled mode) */
|
|
42
|
+
this.open = false;
|
|
43
|
+
/** Trigger behavior */
|
|
32
44
|
this.trigger = 'mouseenter focus';
|
|
45
|
+
/** Hoist the tooltip to body (avoid clipping) */
|
|
46
|
+
this.hoist = false;
|
|
47
|
+
/** Allow HTML content rendering */
|
|
48
|
+
this.allowHTML = false;
|
|
49
|
+
/** Cursor following mode */
|
|
50
|
+
this.followCursor = false;
|
|
51
|
+
/** Arrow type for tooltip */
|
|
52
|
+
this.arrow = 'default';
|
|
33
53
|
this.injectTippyStyles();
|
|
34
54
|
}
|
|
35
|
-
|
|
36
|
-
* Injects Tippy.js base styles into the Light DOM (document.head)
|
|
37
|
-
* if not already present.
|
|
38
|
-
*/
|
|
55
|
+
// Inject custom styles for tooltips
|
|
39
56
|
injectTippyStyles() {
|
|
40
|
-
const STYLE_ID = 'nile-
|
|
57
|
+
const STYLE_ID = 'nile-light-tooltip-styles';
|
|
41
58
|
if (document.getElementById(STYLE_ID))
|
|
42
|
-
return;
|
|
59
|
+
return;
|
|
43
60
|
const style = document.createElement('style');
|
|
44
61
|
style.id = STYLE_ID;
|
|
45
62
|
style.textContent = `
|
|
46
|
-
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}
|
|
47
|
-
[data-tippy-root]{max-width:calc(100vw - 10px)}
|
|
48
|
-
.tippy-box{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
.tippy-box[data-animation=fade][data-state=hidden] { opacity: 0; }
|
|
64
|
+
[data-tippy-root] { max-width: calc(100vw - 10px); }
|
|
65
|
+
.tippy-box {
|
|
66
|
+
position: relative;
|
|
67
|
+
background-color: #333;
|
|
68
|
+
color: #fff;
|
|
69
|
+
border-radius: 4px;
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
line-height: 1.4;
|
|
72
|
+
white-space: normal;
|
|
73
|
+
outline: 0;
|
|
74
|
+
transition-property: transform, visibility, opacity;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Placement-specific arrows */
|
|
78
|
+
.tippy-box[data-placement^=top] > .tippy-arrow { bottom: 0; }
|
|
79
|
+
.tippy-box[data-placement^=top] > .tippy-arrow:before {
|
|
80
|
+
bottom: -7px;
|
|
81
|
+
border-width: 8px 8px 0;
|
|
82
|
+
border-top-color: initial;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.tippy-box[data-placement^=bottom] > .tippy-arrow { top: 0; }
|
|
86
|
+
.tippy-box[data-placement^=bottom] > .tippy-arrow:before {
|
|
87
|
+
top: -7px;
|
|
88
|
+
border-width: 0 8px 8px;
|
|
89
|
+
border-bottom-color: initial;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.tippy-box[data-placement^=left] > .tippy-arrow { right: 0; }
|
|
93
|
+
.tippy-box[data-placement^=left] > .tippy-arrow:before {
|
|
94
|
+
right: -7px;
|
|
95
|
+
border-width: 8px 0 8px 8px;
|
|
96
|
+
border-left-color: initial;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.tippy-box[data-placement^=right] > .tippy-arrow { left: 0; }
|
|
100
|
+
.tippy-box[data-placement^=right] > .tippy-arrow:before {
|
|
101
|
+
left: -7px;
|
|
102
|
+
border-width: 8px 8px 8px 0;
|
|
103
|
+
border-right-color: initial;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.tippy-box[data-inertia][data-state=visible] {
|
|
107
|
+
transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.tippy-box.large { font-size: 16px; padding: 8px 12px; }
|
|
111
|
+
.tippy-arrow { width: 16px; height: 16px; color: #333; }
|
|
112
|
+
.tippy-arrow:before {
|
|
113
|
+
content: "";
|
|
114
|
+
position: absolute;
|
|
115
|
+
border-color: transparent;
|
|
116
|
+
border-style: solid;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.tippy-content {
|
|
120
|
+
position: relative;
|
|
121
|
+
padding: 5px 9px;
|
|
122
|
+
z-index: 1;
|
|
123
|
+
}
|
|
124
|
+
.tippy-box[data-placement^=top]>.tippy-svg-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-svg-arrow:after,.tippy-box[data-placement^=top]>.tippy-svg-arrow>svg{top:16px;transform:rotate(180deg)}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-svg-arrow>svg{bottom:16px}.tippy-box[data-placement^=left]>.tippy-svg-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-svg-arrow:after,.tippy-box[data-placement^=left]>.tippy-svg-arrow>svg{transform:rotate(90deg);top:calc(50% - 3px);left:11px}.tippy-box[data-placement^=right]>.tippy-svg-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-svg-arrow:after,.tippy-box[data-placement^=right]>.tippy-svg-arrow>svg{transform:rotate(-90deg);top:calc(50% - 3px);right:11px}.tippy-svg-arrow{width:16px;height:16px;fill:#333;text-align:initial}.tippy-svg-arrow,.tippy-svg-arrow>svg{position:absolute}
|
|
61
125
|
`;
|
|
62
126
|
document.head.appendChild(style);
|
|
63
127
|
}
|
|
64
128
|
firstUpdated() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
129
|
+
this.attachTooltip();
|
|
130
|
+
}
|
|
131
|
+
attachTooltip() {
|
|
132
|
+
this.destroyTooltips();
|
|
133
|
+
if (this.disabled)
|
|
134
|
+
return;
|
|
135
|
+
const options = {
|
|
136
|
+
content: this.content,
|
|
137
|
+
placement: this.placement,
|
|
138
|
+
trigger: this.trigger,
|
|
139
|
+
offset: [this.skidding, this.distance],
|
|
140
|
+
theme: 'light',
|
|
141
|
+
animation: 'fade',
|
|
142
|
+
duration: parseDuration(this.duration),
|
|
143
|
+
allowHTML: this.allowHTML,
|
|
144
|
+
appendTo: this.hoist ? document.body : undefined,
|
|
145
|
+
followCursor: parseFollowCursor(this.followCursor),
|
|
146
|
+
plugins: parseFollowCursor(this.followCursor) ? [followCursor] : [],
|
|
147
|
+
arrow: roundArrow,
|
|
148
|
+
onShow: instance => { this.open = true; return undefined; },
|
|
149
|
+
onHide: instance => { this.open = false; return undefined; }
|
|
150
|
+
};
|
|
151
|
+
// Sibling mode
|
|
152
|
+
if (this.for) {
|
|
153
|
+
this.targetEl = document.getElementById(this.for);
|
|
154
|
+
if (!this.targetEl)
|
|
155
|
+
return;
|
|
156
|
+
if (!this.id) {
|
|
157
|
+
this.generatedId = `nile-tooltip-${Math.random().toString(36).slice(2, 9)}`;
|
|
158
|
+
this.id = this.generatedId;
|
|
159
|
+
}
|
|
160
|
+
this.prevDescribedby = this.targetEl.getAttribute('aria-describedby');
|
|
161
|
+
const describedby = this.prevDescribedby
|
|
162
|
+
? `${this.prevDescribedby} ${this.id}`
|
|
163
|
+
: this.id;
|
|
164
|
+
this.targetEl.setAttribute('aria-describedby', describedby);
|
|
165
|
+
this.singleInstance = tippy(this.targetEl, options);
|
|
166
|
+
if (this.size)
|
|
167
|
+
this.singleInstance.popper
|
|
168
|
+
.querySelector('.tippy-box')
|
|
169
|
+
?.classList.add(this.size);
|
|
170
|
+
if (this.open) {
|
|
171
|
+
queueMicrotask(() => this.singleInstance?.show());
|
|
172
|
+
}
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
// Wrapper mode
|
|
176
|
+
const children = this.querySelectorAll('*');
|
|
177
|
+
if (children.length > 0) {
|
|
178
|
+
this.tooltipInstances = tippy(children, options);
|
|
179
|
+
this.tooltipInstances.forEach(t => t.popper.querySelector('.tippy-box')?.classList.add(this.size));
|
|
180
|
+
if (this.open)
|
|
181
|
+
this.tooltipInstances.forEach(t => t.show());
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
destroyTooltips() {
|
|
185
|
+
this.tooltipInstances?.forEach(t => t.destroy());
|
|
186
|
+
this.singleInstance?.destroy();
|
|
187
|
+
this.tooltipInstances = undefined;
|
|
188
|
+
this.singleInstance = undefined;
|
|
189
|
+
if (this.targetEl && this.id) {
|
|
190
|
+
const current = this.targetEl
|
|
191
|
+
.getAttribute('aria-describedby')
|
|
192
|
+
?.split(' ')
|
|
193
|
+
.filter(id => id !== this.id)
|
|
194
|
+
.join(' ')
|
|
195
|
+
.trim();
|
|
196
|
+
if (current) {
|
|
197
|
+
this.targetEl.setAttribute('aria-describedby', current);
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
this.targetEl.removeAttribute('aria-describedby');
|
|
201
|
+
}
|
|
74
202
|
}
|
|
75
203
|
}
|
|
76
204
|
disconnectedCallback() {
|
|
77
205
|
super.disconnectedCallback();
|
|
78
|
-
this.
|
|
206
|
+
this.destroyTooltips();
|
|
79
207
|
}
|
|
80
|
-
updated(
|
|
81
|
-
super.updated(
|
|
82
|
-
if (
|
|
83
|
-
|
|
208
|
+
updated(changed) {
|
|
209
|
+
super.updated(changed);
|
|
210
|
+
if (['for', 'content', 'placement', 'distance', 'skidding', 'trigger', 'disabled', 'hoist', 'size', 'arrow']
|
|
211
|
+
.some(p => changed.has(p))) {
|
|
212
|
+
this.attachTooltip();
|
|
213
|
+
}
|
|
214
|
+
// Controlled open/close
|
|
215
|
+
if (changed.has('open')) {
|
|
216
|
+
if (this.open) {
|
|
217
|
+
this.singleInstance?.show();
|
|
218
|
+
this.tooltipInstances?.forEach(t => t.show());
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
this.singleInstance?.hide();
|
|
222
|
+
this.tooltipInstances?.forEach(t => t.hide());
|
|
223
|
+
}
|
|
84
224
|
}
|
|
85
225
|
}
|
|
86
226
|
};
|
|
87
227
|
__decorate([
|
|
88
|
-
property({ type: String })
|
|
228
|
+
property({ type: String, attribute: 'for' })
|
|
229
|
+
], NileLightTooltip.prototype, "for", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
property({ type: String, reflect: true })
|
|
89
232
|
], NileLightTooltip.prototype, "content", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
property({ type: String, reflect: true })
|
|
235
|
+
], NileLightTooltip.prototype, "size", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
property({ type: String, reflect: true })
|
|
238
|
+
], NileLightTooltip.prototype, "duration", void 0);
|
|
90
239
|
__decorate([
|
|
91
240
|
property({ type: String })
|
|
92
241
|
], NileLightTooltip.prototype, "placement", void 0);
|
|
242
|
+
__decorate([
|
|
243
|
+
property({ type: Boolean })
|
|
244
|
+
], NileLightTooltip.prototype, "disabled", void 0);
|
|
245
|
+
__decorate([
|
|
246
|
+
property({ type: Number })
|
|
247
|
+
], NileLightTooltip.prototype, "distance", void 0);
|
|
248
|
+
__decorate([
|
|
249
|
+
property({ type: Number })
|
|
250
|
+
], NileLightTooltip.prototype, "skidding", void 0);
|
|
251
|
+
__decorate([
|
|
252
|
+
property({ type: Boolean, reflect: true })
|
|
253
|
+
], NileLightTooltip.prototype, "open", void 0);
|
|
93
254
|
__decorate([
|
|
94
255
|
property({ type: String })
|
|
95
256
|
], NileLightTooltip.prototype, "trigger", void 0);
|
|
257
|
+
__decorate([
|
|
258
|
+
property({ type: Boolean, reflect: true })
|
|
259
|
+
], NileLightTooltip.prototype, "hoist", void 0);
|
|
260
|
+
__decorate([
|
|
261
|
+
property({ type: Boolean, reflect: true })
|
|
262
|
+
], NileLightTooltip.prototype, "allowHTML", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
property({ type: String, reflect: true, attribute: true })
|
|
265
|
+
], NileLightTooltip.prototype, "followCursor", void 0);
|
|
266
|
+
__decorate([
|
|
267
|
+
property({ type: String, reflect: true, attribute: true })
|
|
268
|
+
], NileLightTooltip.prototype, "arrow", void 0);
|
|
96
269
|
NileLightTooltip = __decorate([
|
|
97
270
|
customElement('nile-light-tooltip')
|
|
98
271
|
], NileLightTooltip);
|